Merge "Refactor BM deployment to use '--work-dir' - [2/2]"
This commit is contained in:
commit
b8e84e77bb
|
@ -352,7 +352,6 @@ class TestProvisionNode(fakes.TestOvercloudNode):
|
|||
'node_timeout': 3600,
|
||||
'concurrency': 20,
|
||||
'manage_network_ports': False,
|
||||
'output_dir': mock.ANY,
|
||||
'working_dir': mock.ANY,
|
||||
},
|
||||
inventory='localhost,',
|
||||
|
|
|
@ -256,15 +256,6 @@ class ProvisionNode(command.Command):
|
|||
help=_('Enable provisioning of network ports'),
|
||||
default=False,
|
||||
action="store_true")
|
||||
# TODO(hjensas): Remove 'output-dir' use common 'workdir' instead.
|
||||
# See: https://review.opendev.org/775302
|
||||
parser.add_argument('--output-dir',
|
||||
help=_('Directory to use for saved output. '
|
||||
'When not specified, '
|
||||
'$HOME/config-download/node-config will be '
|
||||
'used.'),
|
||||
action='store',
|
||||
default=None)
|
||||
parser.add_argument(
|
||||
'--working-dir', action='store',
|
||||
help=_('The working directory for the deployment where all '
|
||||
|
@ -278,9 +269,8 @@ class ProvisionNode(command.Command):
|
|||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
|
||||
if not parsed_args.working_dir:
|
||||
working_dir = os.path.join(
|
||||
os.path.expanduser('~'),
|
||||
"overcloud-deploy-%s" % parsed_args.stack)
|
||||
working_dir = oooutils.get_default_working_dir(
|
||||
parsed_args.stack)
|
||||
else:
|
||||
working_dir = os.path.abspath(parsed_args.working_dir)
|
||||
oooutils.makedirs(working_dir)
|
||||
|
@ -293,11 +283,6 @@ class ProvisionNode(command.Command):
|
|||
ssh_key = fp.read()
|
||||
|
||||
output_path = os.path.abspath(parsed_args.output)
|
||||
if parsed_args.output_dir:
|
||||
output_dir = os.path.abspath(parsed_args.output_dir)
|
||||
else:
|
||||
output_dir = os.path.join(constants.DEFAULT_WORK_DIR,
|
||||
'node-config')
|
||||
|
||||
extra_vars = {
|
||||
"stack_name": parsed_args.stack,
|
||||
|
@ -309,7 +294,6 @@ class ProvisionNode(command.Command):
|
|||
"node_timeout": parsed_args.timeout,
|
||||
"concurrency": parsed_args.concurrency,
|
||||
"manage_network_ports": parsed_args.network_ports,
|
||||
"output_dir": output_dir,
|
||||
"working_dir": working_dir
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue