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

Added Cloudwatt driver #338

Closed
wants to merge 4 commits into from
Closed

Added Cloudwatt driver #338

wants to merge 4 commits into from

Conversation

@ZuluPro
Copy link
Contributor

@ZuluPro 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().

ZuluPro added 2 commits Jul 13, 2014
@@ -121,6 +121,7 @@ class Provider(object):
IKOULA = 'ikoula'
OUTSCALE_SAS = 'outscale_sas'
OUTSCALE_INC = 'outscale_inc'
CLOUDWATT = 'cloudwatt'

This comment has been minimized.

@sebgoa

sebgoa Jul 17, 2014
Member

Hi, can you put this under the #OpenStack based providers ….couple lines below ?

:param tenant_id: ID of tenant required for Cloudwatt auth
:type tenant_id: ``str``
Note: tenant_name argument is required for HP cloud.

This comment has been minimized.

@sebgoa

sebgoa Jul 17, 2014
Member

Maybe replace HP cloud with Cloudwatt cloud ?

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 ?

This comment has been minimized.

@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

Cloudwatt driver.
"""
import sys
import json

This comment has been minimized.

@Kami

Kami Jul 20, 2014
Member

Please use

try:
    import simplejson as json
except ImportError:
    import json

Otherwise it won't work with Python 2.5.

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?

website = 'https://www.cloudwatt.com/'
connectionCls = CloudwattConnection
auth_url = BASE_URL
service_type = 'compute'

This comment has been minimized.

@Kami

Kami Jul 20, 2014
Member

IIRC, service_type and auth_url should be set on the Connection and not NodeDriver class.

@Kami
Copy link
Member

@Kami Kami commented Jul 30, 2014

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

@ZuluPro
Copy link
Contributor Author

@ZuluPro ZuluPro commented Aug 17, 2014

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

@Kami
Copy link
Member

@Kami 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 import simplejson as json
Moved service_type & auth_url in Connection
@ZuluPro
Copy link
Contributor Author

@ZuluPro 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
Copy link
Contributor Author

@ZuluPro ZuluPro commented Jan 31, 2015

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

@sebgoa
Copy link
Member

@sebgoa 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
Copy link
Contributor Author

@ZuluPro ZuluPro commented Mar 17, 2015

Ok, I will make !

@Kami
Copy link
Member

@Kami 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
Copy link
Contributor Author

@ZuluPro 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
Copy link
Member

@Kami 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

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