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 Runabove volume management & fixed many little things #561

Closed
wants to merge 1 commit into from

Conversation

@ZuluPro
Copy link
Contributor

ZuluPro commented Aug 9, 2015

RunAbove has added volume management recently to their API, I added this to libcloud with tests.

I also:

  • Added docstrings
  • Added example of volume management in docs
  • Fixed some typo and bad doc
@ZuluPro ZuluPro force-pushed the ZuluPro:runabove2 branch from 70656ac to 3b936e2 Aug 9, 2015
@Kami
Copy link
Member

Kami commented Aug 9, 2015

Great, this will go into 0.18.0 is the voting thread for 0.18.0 passes :)

:return: List of node objects that the API key can access
:returns: List of node objects

This comment has been minimized.

@Kami

Kami Aug 9, 2015 Member

I think it's just return (at least that's what most other code uses). It might also be that both works, but return is preferred for consistency reasons.

This comment has been minimized.

@ZuluPro

ZuluPro Aug 9, 2015 Author Contributor

Corrected!

:returns: Created node
:rtype : :class:`Node`
"""
action = API_ROOT + '/instance/' + node_id
response = self.connection.request(action, method='GET')
return self._to_node(response.object)

def create_node(self, **kwargs):

This comment has been minimized.

@Kami

Kami Aug 9, 2015 Member

It would also be good to explicitly declare the arguments here.

This comment has been minimized.

@ZuluPro

ZuluPro Aug 9, 2015 Author Contributor

What do you want to say by "to explicitly declare the arguments here." ?

This comment has been minimized.

@Kami

Kami Aug 15, 2015 Member

Sorry, I just mean you should declare all the arguments in the method signature, e.g. def create_node(self, name, image, size, location, ex_keyname=None).

@@ -104,6 +126,15 @@ def create_node(self, **kwargs):
return self._to_node(response.object)

def destroy_node(self, node):
"""

This comment has been minimized.

@Kami

Kami Aug 9, 2015 Member

Docstrings for methods which are part of the standard API are not required (unless you changed the method signature) since they are inherited from the parent class.

This comment has been minimized.

@ZuluPro

ZuluPro Aug 9, 2015 Author Contributor

Fixed!

@@ -52,13 +39,20 @@ class RunAboveNodeDriver(NodeDriver):
api_name = 'runabove'

NODE_STATE_MAP = OpenStackNodeDriver.NODE_STATE_MAP
VOLUME_STATE_MAP = OpenStackNodeDriver.VOLUME_STATE_MAP

This comment has been minimized.

@Kami

Kami Aug 9, 2015 Member

I've missed this when originally reviewing the PR - it looks like their offering is based on OpenStack.

Any particular reason why you didn't inherit from the base OpenStack driver (that's what a lot of other drivers for providers which are based on the OpenStack do).

The auth is not using Keystone, but I quickly glanced over other methods and at least some of them look similar to the ones implemented in the OpenStack driver :)

This comment has been minimized.

@ZuluPro

ZuluPro Aug 9, 2015 Author Contributor

RunAbove is based on OpenStack but they propose their own API, which is more simple than the OpenStack one. It has an abstraction layer which notably make easy to deal between datacenters.

This comment has been minimized.

@Kami

Kami Aug 15, 2015 Member

Yeah, I assumed something like that was the case, but I just wanted to confirm it.

"simple" vs "standard" could be debated, but that's unrelated to this pr :)

@ZuluPro ZuluPro force-pushed the ZuluPro:runabove2 branch 2 times, most recently from 6bfb591 to 272cc16 Aug 9, 2015
@Kami
Copy link
Member

Kami commented Aug 15, 2015

I've made the "create_node" changed and merged patch into trunk. Thanks!

@asfgit asfgit closed this in 7bc2d29 Aug 15, 2015
@ZuluPro
Copy link
Contributor Author

ZuluPro commented Aug 15, 2015

Oh! I made a git commit --amend for less commit!

Le 15 août 2015 à 21:30, Tomaz Muraus notifications@github.com a écrit :

I've made the "create_node" changed and merged patch into trunk. Thanks!


Reply to this email directly or view it on GitHub.

@Kami
Copy link
Member

Kami commented Aug 15, 2015

Heh, thanks and no problem (changes were already merged).

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.