Merge "Add snapshot support for v1 volume"
This commit is contained in:
commit
554e026c14
|
@ -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)
|
||||
|
|
7
setup.py
7
setup.py
|
@ -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',
|
||||
]
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue