diff --git a/senlinclient/tests/unit/v1/test_cluster.py b/senlinclient/tests/unit/v1/test_cluster.py index 239533a0..9b5f0b1a 100644 --- a/senlinclient/tests/unit/v1/test_cluster.py +++ b/senlinclient/tests/unit/v1/test_cluster.py @@ -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) diff --git a/senlinclient/v1/cluster.py b/senlinclient/v1/cluster.py index c37d617c..867a6cda 100644 --- a/senlinclient/v1/cluster.py +++ b/senlinclient/v1/cluster.py @@ -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, }