Merge "Send config parameters in cluster update"

This commit is contained in:
Zuul 2020-11-03 23:00:39 +00:00 committed by Gerrit Code Review
commit aeb56bd25c
2 changed files with 9 additions and 2 deletions

View File

@ -273,6 +273,9 @@ class TestClusterUpdate(TestCluster):
"nk1": "nv1",
"nk2": "nv2",
},
"config": {
"cluster.stop_node_before_delete": "true",
},
"name": 'new_cluster',
"profile_id": 'new_profile',
"profile_only": False,
@ -314,6 +317,7 @@ class TestClusterUpdate(TestCluster):
def test_cluster_update_defaults(self):
arglist = ['--name', 'new_cluster', '--metadata', 'nk1=nv1;nk2=nv2',
'--config', 'cluster.stop_node_before_delete=true',
'--profile', 'new_profile', '--timeout', '30', '45edadcb']
parsed_args = self.check_parser(self.cmd, arglist, [])
self.cmd.take_action(parsed_args)

View File

@ -243,9 +243,11 @@ class UpdateCluster(command.ShowOne):
parser.add_argument(
'--config',
metavar='<"key1=value1;key2=value2...">',
help=_('s of the cluster. Default to {}. '
help=_('Configuration of the cluster. '
'This can be specified multiple times, or once with '
'key-value pairs separated by a semicolon.'),
'key-value pairs separated by a semicolon. '
'Any existing configuration values on the cluster are '
'wiped out when using this option.'),
action='append'
)
parser.add_argument(
@ -303,6 +305,7 @@ class UpdateCluster(command.ShowOne):
strict=True,
),
'metadata': senlin_utils.format_parameters(parsed_args.metadata),
'config': senlin_utils.format_parameters(parsed_args.config),
'timeout': parsed_args.timeout,
}