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 commit87a53cc452
) (cherry picked from commitc3f3f62b09
) (cherry picked from commitf5e8060441
)
This commit is contained in:
parent
bcc88d4cad
commit
8e0ed9d853
|
@ -1323,10 +1323,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