From 05bd04a318304479846ce5b6dd7c517ee93d0d9b Mon Sep 17 00:00:00 2001 From: Tanyi Chen Date: Tue, 26 Jul 2022 14:59:32 +0800 Subject: [PATCH] change --store-connstr to --config-connstr to match webapp word (#23332) --- .../azure/cli/command_modules/serviceconnector/_params.py | 4 ++-- .../azure/cli/command_modules/serviceconnector/custom.py | 4 ++-- .../tests/latest/test_webpp_connection_scenario.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/serviceconnector/_params.py b/src/azure-cli/azure/cli/command_modules/serviceconnector/_params.py index fdf3810672b..c3d4c785b82 100644 --- a/src/azure-cli/azure/cli/command_modules/serviceconnector/_params.py +++ b/src/azure-cli/azure/cli/command_modules/serviceconnector/_params.py @@ -150,9 +150,9 @@ def add_vnet_block(context, target): def add_connection_string_argument(context, source, target): if source == RESOURCE.WebApp and target in TARGET_RESOURCES_CONNECTION_STRING: - context.argument('store_in_connection_string', options_list=['--store-connstr'], + context.argument('store_in_connection_string', options_list=['--config-connstr'], arg_type=get_three_state_flag(), default=False, is_preview=True, - help='Store configuration into connection string, ' + help='Store configuration into connection strings, ' 'only could be used together with dotnet client_type') else: context.ignore('store_in_connection_string') diff --git a/src/azure-cli/azure/cli/command_modules/serviceconnector/custom.py b/src/azure-cli/azure/cli/command_modules/serviceconnector/custom.py index 009942b1584..458b41be050 100644 --- a/src/azure-cli/azure/cli/command_modules/serviceconnector/custom.py +++ b/src/azure-cli/azure/cli/command_modules/serviceconnector/custom.py @@ -196,7 +196,7 @@ def connection_create(cmd, client, # pylint: disable=too-many-locals disable=to if client_type == CLIENT_TYPE.Dotnet.value: client_type = CLIENT_TYPE.DotnetConnectionString.value else: - logger.warning('client_type is not dotnet, ignore "--store-in-connection-string"') + logger.warning('client_type is not dotnet, ignore "--config-connstr"') parameters = { 'target_service': { @@ -325,7 +325,7 @@ def connection_update(cmd, client, # pylint: disable=too-many-locals if client_type == CLIENT_TYPE.Dotnet.value: client_type = CLIENT_TYPE.DotnetConnectionString.value else: - logger.warning('client_type is not dotnet, ignore "--store-in-connection-string"') + logger.warning('client_type is not dotnet, ignore "--config-connstr"') parameters = { 'target_service': linker.get('targetService'), diff --git a/src/azure-cli/azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py b/src/azure-cli/azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py index 438b166cd61..58fbd8bcc5f 100644 --- a/src/azure-cli/azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py +++ b/src/azure-cli/azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py @@ -938,7 +938,7 @@ def test_webapp_sql_connection_string(self): # create connection self.cmd('webapp connection create sql --connection {} --source-id {} --target-id {} --secret name={} secret={} ' - '--client-type dotnet --store-connstr'.format(name, source_id, target_id, user, password)) + '--client-type dotnet --config-connstr'.format(name, source_id, target_id, user, password)) # list connection connections = self.cmd( @@ -952,7 +952,7 @@ def test_webapp_sql_connection_string(self): connection_id = connections[0].get('id') # update connection - self.cmd('webapp connection update sql --id {} --client-type dotnet --store-connstr ' + self.cmd('webapp connection update sql --id {} --client-type dotnet --config-connstr ' '--secret name={} secret={}'.format(connection_id, user, password), checks = [ self.check('clientType', 'dotnet-connectionString') ])