Don't report 'exiting' when mapping cells
When running 'nova-manage simple_cell_setup...' if there are not hosts to map, but there remaining instances to map, an '..., exiting' message is produced. This is misleading because "exiting" implies a return of control to the user. That doesn't happen if there are many instances left to inspect or map. This change gets around that by getting rid of the exiting message in the case where instance mapping can still happen. Change-Id: I62b20a3676429b5cc756884275138566785b347e Closes-Bug: #1821737
This commit is contained in:
parent
d569ade170
commit
8ab3300d5d
|
@ -1332,7 +1332,7 @@ class CellV2Commands(object):
|
|||
# we should support.
|
||||
cell_mapping_uuid = host_mapping.cell_mapping.uuid
|
||||
if not missing_nodes:
|
||||
print(_('All hosts are already mapped to cell(s), exiting.'))
|
||||
print(_('All hosts are already mapped to cell(s).'))
|
||||
return cell_mapping_uuid
|
||||
# Create the cell mapping in the API database
|
||||
if cell_mapping_uuid is not None:
|
||||
|
|
|
@ -1103,7 +1103,7 @@ class CellV2CommandsTestCase(test.NoDBTestCase):
|
|||
for i in range(3):
|
||||
expected += ('Host host%s is already mapped to cell %s\n' %
|
||||
(i, cell_mapping_uuid))
|
||||
expected += 'All hosts are already mapped to cell(s), exiting.'
|
||||
expected += 'All hosts are already mapped to cell(s).'
|
||||
self.assertEqual(expected, output)
|
||||
|
||||
def test_map_cell_and_hosts_partial_update(self):
|
||||
|
|
Loading…
Reference in New Issue