From a769ed7af082a91bf50ac637358a20ee6968bd8d Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Mon, 2 Aug 2021 13:29:15 +0200 Subject: [PATCH] Remove name parameter from cell export Initially the idea was to have for each cell export information for the additional cell to deploy. The name of the new cell is provided to the export command to create the export file name, if not specified via --output-file. Since the exported information is not in all cases specific to the new cell and can be shared with multiple cells, it does not make sense to have the new cell name as a required parameter. Lets remove the name parameter is it is right now that the export information file name is generic to be used for multiple cells. Change-Id: If8b15fd206a32dbd5b2edb1cd500f4e2151313d9 (cherry picked from commit f10842848b03aa652a50d04ce4732356300736f4) (cherry picked from commit 035f9b6a29240cc9a6c17a5b4f09618199724f92) (cherry picked from commit 456dc483ff03452983fd2b4fcc0585d5ed701aca) --- tripleoclient/v1/overcloud_cell.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tripleoclient/v1/overcloud_cell.py b/tripleoclient/v1/overcloud_cell.py index f70b2030c..f9d20e374 100644 --- a/tripleoclient/v1/overcloud_cell.py +++ b/tripleoclient/v1/overcloud_cell.py @@ -34,9 +34,6 @@ class ExportCell(command.Command): def get_parser(self, prog_name): parser = super(ExportCell, self).get_parser(prog_name) - parser.add_argument('name', metavar='', - help=_('Name of the stack used for the additional ' - 'cell.')) parser.add_argument('--control-plane-stack', dest='control_plane_stack', metavar='', @@ -68,9 +65,11 @@ class ExportCell(command.Command): control_plane_stack = parsed_args.control_plane_stack cell_stack = parsed_args.cell_stack - cell_name = parsed_args.name + cell_name = control_plane_stack + if cell_stack: + cell_name = cell_stack output_file = parsed_args.output_file or \ - '%s-cell-input.yaml' % cell_name + '%s-cell-export.yaml' % cell_name self.log.info('Running at %s with parameters %s', self.now, @@ -108,7 +107,7 @@ class ExportCell(command.Command): with open(output_file, 'w') as f: yaml.safe_dump(data, f, default_flow_style=False) - print("Cell input information exported to %s." % output_file) + print("Cell information exported to %s." % output_file) msg = """ \n\n Next steps: @@ -125,7 +124,7 @@ class ExportCell(command.Command): - additional environment files used for overcloud stack - --stack - cell role file created - - the exported cell input information file {output_file} + - the exported cell information file {output_file} - other specific parameter files for the cell\n For more details check https://docs.openstack.org/ project-deploy-guide/tripleo-docs/latest/features/deploy_cellv2.html