Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LIBCLOUD-536] Add support for the Outscale SAS cloud. #285

Closed
wants to merge 1 commit into from

Conversation

@benoit-canet
Copy link

@benoit-canet benoit-canet commented Apr 29, 2014

This commit introduce the Outscale SAS cloud an european cloud provider
featuring an EC2 compatible API.

Special care have been taken to leave room for Outscale INC an US based cloud
using the same infrastructure but governed by US laws.

Signed-off-by: Benoît Canet benoit@irqsave.net

message = "Attribute %s not implemented" % (attribute)
raise NotImplementedError(message)

return super(OutscaleNodeDriver, self).ex_modify_instance_attribute(

This comment has been minimized.

@Kami

Kami May 5, 2014
Member

Looks good, but for readability purposes please use keyword arguments everywhere.

This comment has been minimized.

@benoit-canet

benoit-canet May 5, 2014
Author

I though about this but if I start passing disable_api_termination and friend as keywords the OutscaleNodeDriver will differs from the EC2NodeDriver and polymorphism wont work.
Are you sure it's not an issue ?

This comment has been minimized.

@Kami

Kami May 5, 2014
Member

Yeah, I don't think this should be an issue.

"""
pass

def ex_get_limits(self):

This comment has been minimized.

@Kami

Kami May 5, 2014
Member

This is more of a note for myself - seems like some of those methods should be moved from BaseEC2NodeDriver to EC2NodeDriver.

This way you don't need to include stub methods.

return sizes


class OutscaleSasUSEastNodeDriver(OutscaleNodeDriver):

This comment has been minimized.

@Kami

Kami May 5, 2014
Member

One class per region model has been replace with region argument so you can get rid of those region specific classes.

This comment has been minimized.

@benoit-canet

benoit-canet May 5, 2014
Author

Providers constants are different from region name.
I dont understand how compute/provider.py will know how to pass the correct region to the OutscaleNodeDriver.

This comment has been minimized.

@Kami

Kami May 5, 2014
Member

Yes.

In the past we used a model where you needed 1 class per region. This approach isn't as scalable and nice to we deprecated it in favor of using a single constant and class which constructor takes region argument.

With this new approach you specify a region when instantiating a class so multiple classes and constants are not desired and needed anymore. For example:

cls = get_driver(Provider.OUTSCALE_SAS)
driver = cls('api key', 'api secret', region='us-east-1')

This comment has been minimized.

@benoit-canet

benoit-canet May 5, 2014
Author

ok I'll drop the extra types.py constant so.

@inherits: :class:`EC2NodeDriver.ex_detach_network_interface`
"""
return False

This comment has been minimized.

@Kami

Kami May 5, 2014
Member

For methods which are not supported, you should raise NotImplementedError('This method is not supported in the Outscale driver).

regions in another constant.
"""
OUTSCALE_REGION_DETAILS = {
'osc-sas-eu-west-3': {

This comment has been minimized.

@Kami

Kami May 5, 2014
Member

For consistency with EC2 and other drivers, I would drop osc-sas- prefix from the region name and only use eu-west-3 and so on.

This comment has been minimized.

@benoit-canet

benoit-canet May 5, 2014
Author

Ok,
How can I pave the way for the future Outscale INC driver ?
Will adding another constant dictionary for it be ok ?

This comment has been minimized.

@Kami

Kami May 5, 2014
Member

How is Outscale INC different from Outscale SAS?

This comment has been minimized.

@benoit-canet

benoit-canet May 5, 2014
Author

Same codebase, and datacenters (regions) but differents corporate entities governed by differents laws (patriot act etc..)
Outscale SAS is a french company which target the european customers whereas Outscale SAS target US based customers.

This comment has been minimized.

@benoit-canet

benoit-canet May 5, 2014
Author

Also Outscale SAS prices are in euros and Outscale INC prices in $

This comment has been minimized.

@Kami

Kami May 5, 2014
Member

That's what I thought, thanks for the clarification.

Since it's not just a different region it sounds like that Outscale INC should be a separate class. You can handle regions by adding another "regions" dict for Outscale INC.

host = None


class OutscaleNodeDriver(BaseEC2NodeDriver):

This comment has been minimized.

@Kami

Kami May 7, 2014
Member

This is an abstract class similar to BaseEC2NodeDriver and should never be instantiated directly, right?

If so, you should document that.

This commit introduce the Outscale SAS cloud an european cloud provider
featuring an EC2 compatible API.

Special care have been taken to leave room for Outscale INC an US based cloud
using the same infrastructure but governed by US laws.

Signed-off-by: Benoît Canet <benoit@irqsave.net>
@asfgit asfgit closed this in 0a049c4 May 7, 2014
@Kami
Copy link
Member

@Kami Kami commented May 8, 2014

Merged into trunk. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.