pycontribs / pyrax

The Python SDK for the Rackspace Cloud
developer.rackspace.com
Apache License 2.0
237 stars 208 forks source link

Expose rename for block storage volumes #504

Open lcannon opened 9 years ago

lcannon commented 9 years ago

As part of our deploy process, a server will be deployed to test, tested, then switched to production. As part of this, we want to rename volumes, as the instance name is part of the volume name we set. This is easily managed by using pyrax.cloud_blockstorage._manager.rename, but this is an undocumented API. It would be great if this method could be directly exposed on a volume.

EdLeafe commented 9 years ago

You could use:

pyrax.cloud_blockstorage.update(vol, display_name="new_name")

but I do agree that it would be nice to have a rename() method for convenience. I'll add that, along with one for snapshots, too.