Skip to content

Refactor with an eye toward separation of git-core and specific provider #20

Closed
wants to merge 3 commits into from

4 participants

@wchrisjohnson

I'm currently working on the rewrite of the OpenStack provider in a separate gem. As a result, the 'require' for the provider needs to occur within the context of the new gem, not fog-core.

@wchrisjohnson

Will this change break other providers, other than the Rackspace provider? It just occurred to me that it might be useful to validate that...

@tokengeek
fog member

Not sure about this.

That pattern got setup as a way to defer the require until the service/provider is first used.

So Fog::Identity.new(:provider => :openstack) should still work after require "fog" but would be the point `require "fog/openstack/identity" is required.

I may be missing something as to why it is being removed because it can be required multiple times if you must require it before the call to Identity.new.

Also not sure which other providers expose an identity service.

@elight
@wchrisjohnson

I have the new openstack provider (named openstackcommon) working locally with that line commented out. With that line of code in place, it fails.

We are replacing the current provider, not updating it. In the new gem, the folder structure is not the same. As I understand it, the fog//identity is used to refer to the file that contains the identity service provider. In the single fog project, all of the providers were under the fog project, and this require worked. In this new approach, that is no longer the case.

Does this help?

The more I think about this though, the more convinced I am that this might break existing providers if it goes in. Let me test this with the existing HP provider before moving forward here; we might have to adjust...

@wchrisjohnson

@elight I ran the test suite locally - it works (see the Travis CI build report above too)

@elight
@wchrisjohnson

Hey @elight how is your stuff set up to to be able to test/run stuff on top of fog-core? Is it? Or did you just depend on the test suite?

Trying to determine how to test the above change with the traditional HP provider...

@wchrisjohnson

Close as Evan's PR #30 will correct this.

@geemus
fog member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.