Merge "Add snapshot support for v1 volume"

This commit is contained in:
Jenkins 2013-03-15 16:03:54 +00:00 committed by Gerrit Code Review
commit 554e026c14
2 changed files with 12 additions and 0 deletions

View File

@ -46,6 +46,11 @@ def find_resource(manager, name_or_id):
# Eventually this should be pulled from a common set
# of client exceptions.
except Exception as ex:
try:
return manager.find(display_name=name_or_id)
except:
pass
if type(ex).__name__ == 'NotFound':
msg = "No %s with a name or ID of '%s' exists." % \
(manager.resource_class.__name__.lower(), name_or_id)

View File

@ -182,6 +182,13 @@ setuptools.setup(
'list_volume=openstackclient.volume.v1.volume:ListVolume',
'set_volume=openstackclient.volume.v1.volume:SetVolume',
'show_volume=openstackclient.volume.v1.volume:ShowVolume',
'create_snapshot=' +
'openstackclient.volume.v1.snapshot:CreateSnapshot',
'delete_snapshot=' +
'openstackclient.volume.v1.snapshot:DeleteSnapshot',
'list_snapshot=openstackclient.volume.v1.snapshot:ListSnapshot',
'set_snapshot=openstackclient.volume.v1.snapshot:SetSnapshot',
'show_snapshot=openstackclient.volume.v1.snapshot:ShowSnapshot',
]
}
)