-
Notifications
You must be signed in to change notification settings - Fork 924
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
Implement create_ and destroy_volume_snapshot for OS #478
Implement create_ and destroy_volume_snapshot for OS #478
Conversation
@@ -1611,6 +1611,41 @@ def list_volume_snapshots(self, volume): | |||
return [snapshot for snapshot in self.ex_list_snapshots() | |||
if snapshot.extra['volume_id'] == volume.id] | |||
|
|||
def create_volume_snapshot(self, volume, name, ex_description=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is name optional here? Or does OpenStack mandate a name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, should be optional, like the base driver. Updating in 3, 2, 1.
@allardhoeve will you merge this ? |
If you give the 👍, yes. |
Seems you got conflicts. Usually I also try to squash commits. Since it touches base let's get @Kami to chime in |
I prefer to merge trunk into my branch, because that way I only have to deal with recent changes. But I get the feeling you guys prefer linear history? That is: simple |
cf78667
to
6839d64
Compare
@Kami, what do you think of the API change? |
@@ -15,6 +15,12 @@ General | |||
Compute | |||
~~~~~~~ | |||
|
|||
- Deprecated ex_create_snapshot and ex_delete_snapshot in favor of | |||
create_storage_volume and destroy_storage_volume. Updated base driver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should say create_volume_snapshot
and destroy_volume_snapshot
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also say that you deprecated those methods in the OpenStack driver.
Thanks. Change looks good to me - +1 |
- Document create_volume_snapshot arguments properly - Document destroy_volume_snapshot arguments properly - Update signature to match all existing implementations - name should be optional closes apache#478
9b39dd6
to
b81ede3
Compare
The OS driver currently implements
ex_create_snapshot
andex_delete_snapshot
instead ofcreate_volume_snapshot
anddelete_volume_snapshot
. This PR fixes that.libcloud.compute.drivers.openstack.create_volume_snapshot
.libcloud.compute.drivers.openstack.destroy_volume_snapshot
.name
argument.