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

Gandi Compute Driver improvement #534

Closed
wants to merge 5 commits into from
Closed

Gandi Compute Driver improvement #534

wants to merge 5 commits into from

Conversation

@ZuluPro
Copy link
Contributor

ZuluPro commented Jun 4, 2015

  • Added sphinx documentation with example of node creation
  • Added docstring for all public methods
  • Added SSH keypair management: list, get, import, delete
  • Change authentification initialisation in create_node: User must choose between login/password, SSH keys or both
  • Added ex_get_node and ex_get_volume
  • Added tests for all commit
@ZuluPro ZuluPro force-pushed the ZuluPro:gandi_pr branch from 710151d to ce0209c Jun 4, 2015
if kwargs.get('login') is None or kwargs.get('password') is None:
raise GandiException(
1020, 'login and password must be defined for node creation')
if not kwargs.get('login') and not kwargs.get('keypairs'):

This comment has been minimized.

@Kami

Kami Jun 5, 2015 Member

We need to fix this to use auth argument, but that's fine for now.

kps = self.connection.request('hosting.ssh.list').object
return self._to_key_pairs(kps)

def get_key_pair(self, key_id):

This comment has been minimized.

@Kami

Kami Jun 5, 2015 Member

For consistency with the base API, the first argument should be called name.

@Kami
Copy link
Member

Kami commented Jun 5, 2015

There are some minor style issues (method ordering), besides that it looks good to me.

@ZuluPro ZuluPro force-pushed the ZuluPro:gandi_pr branch from ce0209c to 68c374e Jun 8, 2015
@ZuluPro
Copy link
Contributor Author

ZuluPro commented Jun 8, 2015

I changed key_id for name. I also change the function behavior for list and filter instead of directly get object.

For next commits, how must I raise Error for an unfound KeyPair ? Is there a hierarchy of Exceptions to use ?

@Kami
Copy link
Member

Kami commented Jun 13, 2015

@ZuluPro Great.

There is libcloud.compute.types.KeyPairDoesNotExistError.

@asfgit asfgit closed this in 562e4d2 Jun 13, 2015
asfgit pushed a commit that referenced this pull request Jun 13, 2015
Closes #534

Signed-off-by: Tomaz Muraus <tomaz@tomaz.me>
asfgit pushed a commit that referenced this pull request Jun 13, 2015
Closes #534

Signed-off-by: Tomaz Muraus <tomaz@tomaz.me>
asfgit pushed a commit that referenced this pull request Jun 13, 2015
Closes #534

Signed-off-by: Tomaz Muraus <tomaz@tomaz.me>
asfgit pushed a commit that referenced this pull request Jun 13, 2015
Closes #534

Signed-off-by: Tomaz Muraus <tomaz@tomaz.me>
@Kami
Copy link
Member

Kami commented Jun 13, 2015

Changes 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.