baremetal provision expose concurrency and timeout

These arguments are available in the workflow but are not exposed as
arguments. This change fixes that, allowing users to tune for their
environment.

The new ansible version of this command already has these arguments
(next change in this series)

Change-Id: I00b224ec7e2334afd2dfe549f36dbec2987a1be1
This commit is contained in:
Steve Baker 2020-02-27 16:35:02 +13:00
parent ed75570496
commit 74d4b37cde
2 changed files with 14 additions and 2 deletions

View File

@ -1313,7 +1313,9 @@ class TestProvisionNode(fakes.TestOvercloudNode):
{'name': 'Controller'}],
'plan': 'overcloud',
'ssh_keys': ['I am a key'],
'ssh_user_name': 'heat-admin'}
'ssh_user_name': 'heat-admin',
'concurrency': 20,
'timeout': 3600}
)

View File

@ -621,6 +621,14 @@ class ProvisionNode(command.Command):
help=_('Key path for ssh access to'
'overcloud nodes. When undefined the key'
'will be autodetected.'))
parser.add_argument('--concurrency', type=int,
default=20,
help=_('Maximum number of nodes to provision at '
'once. (default=20)'))
parser.add_argument('--timeout', type=int,
default=3600,
help=_('Number of seconds to wait for the node '
'provision to complete. (default=3600)'))
return parser
def take_action(self, parsed_args):
@ -638,7 +646,9 @@ class ProvisionNode(command.Command):
plan=parsed_args.stack,
roles=roles,
ssh_keys=[ssh_key],
ssh_user_name=parsed_args.overcloud_ssh_user
ssh_user_name=parsed_args.overcloud_ssh_user,
concurrency=parsed_args.concurrency,
timeout=parsed_args.timeout
)
with open(parsed_args.output, 'w') as fp: