Remove default role-name from merge network param script

The merge-new-params-nic-config-script.py previosly had the
'Controller' role as the default for --role-name. It is not
obvious that this parameter must be changed when merging
nic config templates.

Remove the default and make the argument required. Improves
UX since user error is less likely.

Making the mistake of using a Role with too many networks
is'nt as forgiving since we now only pass parameters for
the role.networks.

Related-Bug: #1800811
Change-Id: Iff9e364db66ad09a30ac10a7814a3c01d50caf58
This commit is contained in:
Harald Jensås 2019-01-07 22:38:02 +01:00
parent 0f4d029597
commit c740b54214
2 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1,8 @@
---
other:
- |
The utility script ``tools/merge-new-params-nic-config-script.py``
previously used the ``Controller`` role by default if the ``--role-name``
argument was not specified. The argument (``--role-name``) no longer have a
default. It is now mandatory to specify the role when merging new
parameters into existing network configuration templates.

View File

@ -39,12 +39,11 @@ def parse_opts(argv):
default=('%s/network_data.yaml') % DEFAULT_THT_DIR)
parser.add_argument('--role-name', metavar='ROLE-NAME',
help="Name of the role the NIC config is used for.",
default='Controller')
required=True)
parser.add_argument('-t', '--template', metavar='TEMPLATE_FILE',
help=("Existing NIC config template to merge "
"parameter too."),
required=True,
)
required=True)
parser.add_argument('--tht-dir', metavar='THT_DIR',
help=("Path to tripleo-heat-templates (THT) "
"directory"),