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

Added Cloudwatt driver #338

Closed
wants to merge 4 commits into
base: trunk
from

Conversation

Projects
None yet
3 participants
@ZuluPro
Contributor

ZuluPro commented Jul 13, 2014

Added Driver for new French cloud provider Cloudwatt https://www.cloudwatt.com/fr/

This provider is based on OpenStack but uses a custom kind of authentication,
The request data must look like below:
{'auth': {
'passwordCredentials': {
'username': 'THE_USERNAME',
'password': 'THE_PASSWORD'
},
'tenantId': 'THE_TENANT_ID
}}

So, I adapt classes to accept tenant_id argument.

I manually tested it with a custom script and Driver.list_nodes().

@sebgoa

View changes

Show outdated Hide outdated libcloud/compute/types.py
@sebgoa

View changes

Show outdated Hide outdated libcloud/compute/drivers/cloudwatt.py
def __init__(self, key, secret, tenant_id, secure=True, tenant_name=None,
host=None, port=None, **kwargs):
"""
@inherits: :class:`NodeDriver.__init__`

This comment has been minimized.

@sebgoa

sebgoa Jul 17, 2014

Member

inherits CloudwattNodeDriver ?

@sebgoa

sebgoa Jul 17, 2014

Member

inherits CloudwattNodeDriver ?

This comment has been minimized.

@sebgoa

sebgoa Jul 17, 2014

Member

Never mind, my bad

@sebgoa

sebgoa Jul 17, 2014

Member

Never mind, my bad

@@ -0,0 +1,147 @@
# contributor license agreements. See the NOTICE file distributed with

This comment has been minimized.

@Kami

Kami Jul 20, 2014

Member

Missing first line of the license header - # Licensed to the Apache Software Foundation (ASF) under one or more

@Kami

Kami Jul 20, 2014

Member

Missing first line of the license header - # Licensed to the Apache Software Foundation (ASF) under one or more

@Kami

View changes

Show outdated Hide outdated libcloud/compute/drivers/cloudwatt.py
name = 'Cloudwatt Auth'
def __init__(self, *args, **kwargs):
self._ex_tenant_id = kwargs.pop('ex_tenant_id')

This comment has been minimized.

@Kami

Kami Jul 20, 2014

Member

Hm, could we maybe use an existing ex_tenant_name argument here?

@Kami

Kami Jul 20, 2014

Member

Hm, could we maybe use an existing ex_tenant_name argument here?

@Kami

View changes

Show outdated Hide outdated libcloud/compute/drivers/cloudwatt.py
@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Jul 30, 2014

Member

@ZuluPro Let me know once those comments have been addressed and I will get the PR merged.

Member

Kami commented Jul 30, 2014

@ZuluPro Let me know once those comments have been addressed and I will get the PR merged.

@ZuluPro

This comment has been minimized.

Show comment
Hide comment
@ZuluPro

ZuluPro Aug 17, 2014

Contributor

Ok, thx! I'm not dead only in holydays...

Contributor

ZuluPro commented Aug 17, 2014

Ok, thx! I'm not dead only in holydays...

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Oct 23, 2014

Member

@ZuluPro Hey, any progress on this?

It would be great if those comments would get addressed so the driver can be included in the next release.

Member

Kami commented Oct 23, 2014

@ZuluPro Hey, any progress on this?

It would be great if those comments would get addressed so the driver can be included in the next release.

Fix license 1st line
Fix import simplejson as json
Moved service_type & auth_url in Connection
@ZuluPro

This comment has been minimized.

Show comment
Hide comment
@ZuluPro

ZuluPro Oct 29, 2014

Contributor

All your requests are now fixed at master of my fork.

I fixed the first line of License
Fix import statement, now with try/except, import simplejson as json
I moved service_type & auth_url in Connection class

Contributor

ZuluPro commented Oct 29, 2014

All your requests are now fixed at master of my fork.

I fixed the first line of License
Fix import statement, now with try/except, import simplejson as json
I moved service_type & auth_url in Connection class

@ZuluPro

This comment has been minimized.

Show comment
Hide comment
@ZuluPro

ZuluPro Jan 31, 2015

Contributor

Do you want me to remake this patch from actual trunk ?

Contributor

ZuluPro commented Jan 31, 2015

Do you want me to remake this patch from actual trunk ?

@sebgoa

This comment has been minimized.

Show comment
Hide comment
@sebgoa

sebgoa Feb 27, 2015

Member

Hi @ZuluPro sorry for the delay. Can you rebase on trunk and squash your commits. We will then look into merging it.

Member

sebgoa commented Feb 27, 2015

Hi @ZuluPro sorry for the delay. Can you rebase on trunk and squash your commits. We will then look into merging it.

@ZuluPro

This comment has been minimized.

Show comment
Hide comment
@ZuluPro

ZuluPro Mar 17, 2015

Contributor

Ok, I will make !

Contributor

ZuluPro commented Mar 17, 2015

Ok, I will make !

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Mar 29, 2015

Member

@ZuluPro Thanks.

Is it possible to get a test Cloudwatt account / credentials? I would like to test this driver before merging those changes into trunk.

Member

Kami commented Mar 29, 2015

@ZuluPro Thanks.

Is it possible to get a test Cloudwatt account / credentials? I would like to test this driver before merging those changes into trunk.

@ZuluPro

This comment has been minimized.

Show comment
Hide comment
@ZuluPro

ZuluPro Apr 15, 2015

Contributor

@Kami, Sorry, my account is only for work purpose, Maybe you can ask them one account with notoriety of libcloud ?

Contributor

ZuluPro commented Apr 15, 2015

@Kami, Sorry, my account is only for work purpose, Maybe you can ask them one account with notoriety of libcloud ?

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami May 17, 2015

Member

@ZuluPro I've made some changes so it works with the latest OpenStack auth refactoring (8aa3e27) and merged changes into trunk.

Next time please make sure you create a branch for your changes and don't directly commit to trunk - this will make it easier for both of us (this time, I needed to do some git foo and rebase to get it into mergable state).

Please also submit a new pull request which inclues documentation and usage examples for the driver (see libcloud/compute/drivers*.rst` for an examples) - driver without documentation (and tests) is not really useful.

Thanks.

Member

Kami commented May 17, 2015

@ZuluPro I've made some changes so it works with the latest OpenStack auth refactoring (8aa3e27) and merged changes into trunk.

Next time please make sure you create a branch for your changes and don't directly commit to trunk - this will make it easier for both of us (this time, I needed to do some git foo and rebase to get it into mergable state).

Please also submit a new pull request which inclues documentation and usage examples for the driver (see libcloud/compute/drivers*.rst` for an examples) - driver without documentation (and tests) is not really useful.

Thanks.

@asfgit asfgit closed this in c661cb5 May 17, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment