Merge "Fix "device" as the optional para on volume-attach"
This commit is contained in:
commit
708af32f03
@ -1790,6 +1790,13 @@ class ShellTest(utils.TestCase):
|
||||
{'device': '/dev/vdb',
|
||||
'volumeId': 'Work'}})
|
||||
|
||||
def test_volume_attach_without_device(self):
|
||||
self.run_command('volume-attach sample-server Work')
|
||||
self.assert_called('POST', '/servers/1234/os-volume_attachments',
|
||||
{'volumeAttachment':
|
||||
{'device': None,
|
||||
'volumeId': 'Work'}})
|
||||
|
||||
def test_volume_update(self):
|
||||
self.run_command('volume-update sample-server Work Work')
|
||||
self.assert_called('PUT', '/servers/1234/os-volume_attachments/Work',
|
||||
|
@ -1706,7 +1706,7 @@ def do_volume_delete(cs, args):
|
||||
@utils.arg('volume',
|
||||
metavar='<volume>',
|
||||
help='ID of the volume to attach.')
|
||||
@utils.arg('device', metavar='<device>',
|
||||
@utils.arg('device', metavar='<device>', default=None, nargs='?',
|
||||
help='Name of the device e.g. /dev/vdb. '
|
||||
'Use "auto" for autoassign (if supported)')
|
||||
def do_volume_attach(cs, args):
|
||||
|
@ -1535,7 +1535,7 @@ def do_volume_delete(cs, args):
|
||||
@utils.arg('volume',
|
||||
metavar='<volume>',
|
||||
help='ID of the volume to attach.')
|
||||
@utils.arg('device', metavar='<device>',
|
||||
@utils.arg('device', metavar='<device>', default=None, nargs='?',
|
||||
help='Name of the device e.g. /dev/vdb. '
|
||||
'Use "auto" for autoassign (if supported)')
|
||||
def do_volume_attach(cs, args):
|
||||
|
Loading…
x
Reference in New Issue
Block a user