Fix --max-count handling for nova-manage cell_v2 map_instances
Code is added to define destination for cell_uuid and max_count
argument, otherwise specifying --max-count fails with:
TypeError: map_instances() got an unexpected keyword argument 'max-count'
Change-Id: I9328a20b97977bfffa21df55bd4d60e711a406a7
Closes-Bug: #1715533
(cherry picked from commit 87a53cc452
)
This commit is contained in:
parent
edd59ae12d
commit
c3f3f62b09
|
@ -1282,10 +1282,11 @@ class CellV2Commands(object):
|
|||
marker = instances[-1].uuid
|
||||
return marker
|
||||
|
||||
@args('--cell_uuid', metavar='<cell_uuid>', required=True,
|
||||
help='Unmigrated instances will be mapped to the cell with the '
|
||||
'uuid provided.')
|
||||
@args('--max-count', metavar='<max_count>',
|
||||
@args('--cell_uuid', metavar='<cell_uuid>', dest='cell_uuid',
|
||||
required=True,
|
||||
help='Unmigrated instances will be mapped to the cell with the '
|
||||
'uuid provided.')
|
||||
@args('--max-count', metavar='<max_count>', dest='max_count',
|
||||
help='Maximum number of instances to map')
|
||||
def map_instances(self, cell_uuid, max_count=None):
|
||||
"""Map instances into the provided cell.
|
||||
|
|
Loading…
Reference in New Issue