From f10842848b03aa652a50d04ce4732356300736f4 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 --- 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 685c81fb5..5dfa3eaf0 100644 --- a/tripleoclient/v1/overcloud_cell.py +++ b/tripleoclient/v1/overcloud_cell.py @@ -32,9 +32,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='', @@ -66,9 +63,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, @@ -106,7 +105,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: @@ -123,7 +122,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