diff --git a/src/plugins/azgenerator/TemplateAzureCliClientFactory.ts b/src/plugins/azgenerator/TemplateAzureCliClientFactory.ts index 15641b684..3a47123ba 100644 --- a/src/plugins/azgenerator/TemplateAzureCliClientFactory.ts +++ b/src/plugins/azgenerator/TemplateAzureCliClientFactory.ts @@ -13,7 +13,7 @@ export function GenerateAzureCliClientFactory(model: CodeModelAz) : string[] { model.SelectFirstCommandGroup(); output.push(""); output.push(""); - output.push("def cf_" + model.Extension_NameUnderscored + "(cli_ctx, *_):"); + output.push("def cf_" + model.Extension_NameUnderscored + "_cl(cli_ctx, *_):"); output.push(" from azure.cli.core.commands.client_factory import get_mgmt_service_client"); output.push(" from ..vendored_sdks." + model.PythonOperationsName + " import " + model.PythonMgmtClient); @@ -38,7 +38,7 @@ export function GenerateAzureCliClientFactory(model: CodeModelAz) : string[] { output.push(""); output.push("def cf_" + model.GetModuleOperationName() + "(cli_ctx, *_):"); - output.push(" return cf_" + model.Extension_NameUnderscored + "(cli_ctx)." + model.GetModuleOperationNamePython()); + output.push(" return cf_" + model.Extension_NameUnderscored + "_cl(cli_ctx)." + model.GetModuleOperationNamePython()); } } while (model.SelectNextCommandGroup()); } diff --git a/src/plugins/azgenerator/TemplateAzureCliInit.ts b/src/plugins/azgenerator/TemplateAzureCliInit.ts index b8d36383d..c693638b3 100644 --- a/src/plugins/azgenerator/TemplateAzureCliInit.ts +++ b/src/plugins/azgenerator/TemplateAzureCliInit.ts @@ -19,10 +19,10 @@ export function GenerateAzureCliInit(model: CodeModelAz) : string[] { output.push(""); output.push(" def __init__(self, cli_ctx=None):"); output.push(" from azure.cli.core.commands import CliCommandType"); - output.push(" from azext_" + model.Extension_NameUnderscored + ".generated._client_factory import cf_" + model.Extension_NameUnderscored + ""); + output.push(" from azext_" + model.Extension_NameUnderscored + ".generated._client_factory import cf_" + model.Extension_NameUnderscored + "_cl"); output.push(" " + model.Extension_NameUnderscored + "_custom = CliCommandType("); output.push(" operations_tmpl='azext_" + model.Extension_NameUnderscored + ".custom#{}',"); - output.push(" client_factory=cf_" + model.Extension_NameUnderscored + ")"); + output.push(" client_factory=cf_" + model.Extension_NameUnderscored + "_cl)"); output.push(` parent = super(${model.Extension_NameClass}CommandsLoader, self)`); ToMultiLine(` parent.__init__(cli_ctx=cli_ctx, custom_command_type=${model.Extension_NameUnderscored}_custom)`, output); output.push(""); diff --git a/src/test/scenarios/attestation/output/src/attestation/azext_attestation/__init__.py b/src/test/scenarios/attestation/output/src/attestation/azext_attestation/__init__.py index b2beb8a4a..e5bed0610 100644 --- a/src/test/scenarios/attestation/output/src/attestation/azext_attestation/__init__.py +++ b/src/test/scenarios/attestation/output/src/attestation/azext_attestation/__init__.py @@ -16,10 +16,10 @@ class AttestationManagementClientCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - from azext_attestation.generated._client_factory import cf_attestation + from azext_attestation.generated._client_factory import cf_attestation_cl attestation_custom = CliCommandType( operations_tmpl='azext_attestation.custom#{}', - client_factory=cf_attestation) + client_factory=cf_attestation_cl) parent = super(AttestationManagementClientCommandsLoader, self) parent.__init__(cli_ctx=cli_ctx, custom_command_type=attestation_custom) diff --git a/src/test/scenarios/attestation/output/src/attestation/azext_attestation/generated/_client_factory.py b/src/test/scenarios/attestation/output/src/attestation/azext_attestation/generated/_client_factory.py index e56e3cb56..ec1661216 100644 --- a/src/test/scenarios/attestation/output/src/attestation/azext_attestation/generated/_client_factory.py +++ b/src/test/scenarios/attestation/output/src/attestation/azext_attestation/generated/_client_factory.py @@ -9,15 +9,15 @@ # -------------------------------------------------------------------------- -def cf_attestation(cli_ctx, *_): +def cf_attestation_cl(cli_ctx, *_): from azure.cli.core.commands.client_factory import get_mgmt_service_client from ..vendored_sdks.attestation import AttestationManagementClient return get_mgmt_service_client(cli_ctx, AttestationManagementClient) def cf_operation(cli_ctx, *_): - return cf_attestation(cli_ctx).operation + return cf_attestation_cl(cli_ctx).operation def cf_attestation_provider(cli_ctx, *_): - return cf_attestation(cli_ctx).attestation_provider + return cf_attestation_cl(cli_ctx).attestation_provider diff --git a/src/test/scenarios/datafactory/output/src/datafactory/azext_datafactory/__init__.py b/src/test/scenarios/datafactory/output/src/datafactory/azext_datafactory/__init__.py index 2c1895a7e..ab31cd5fc 100644 --- a/src/test/scenarios/datafactory/output/src/datafactory/azext_datafactory/__init__.py +++ b/src/test/scenarios/datafactory/output/src/datafactory/azext_datafactory/__init__.py @@ -16,10 +16,10 @@ class DFAZManagementClientCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - from azext_datafactory.generated._client_factory import cf_datafactory + from azext_datafactory.generated._client_factory import cf_datafactory_cl datafactory_custom = CliCommandType( operations_tmpl='azext_datafactory.custom#{}', - client_factory=cf_datafactory) + client_factory=cf_datafactory_cl) parent = super(DFAZManagementClientCommandsLoader, self) parent.__init__(cli_ctx=cli_ctx, custom_command_type=datafactory_custom) diff --git a/src/test/scenarios/datafactory/output/src/datafactory/azext_datafactory/generated/_client_factory.py b/src/test/scenarios/datafactory/output/src/datafactory/azext_datafactory/generated/_client_factory.py index 467281d5d..bcc05649f 100644 --- a/src/test/scenarios/datafactory/output/src/datafactory/azext_datafactory/generated/_client_factory.py +++ b/src/test/scenarios/datafactory/output/src/datafactory/azext_datafactory/generated/_client_factory.py @@ -9,19 +9,19 @@ # -------------------------------------------------------------------------- -def cf_datafactory(cli_ctx, *_): +def cf_datafactory_cl(cli_ctx, *_): from azure.cli.core.commands.client_factory import get_mgmt_service_client from ..vendored_sdks.datafactory import DFAZManagementClient return get_mgmt_service_client(cli_ctx, DFAZManagementClient) def cf_factory(cli_ctx, *_): - return cf_datafactory(cli_ctx).factory + return cf_datafactory_cl(cli_ctx).factory def cf_trigger(cli_ctx, *_): - return cf_datafactory(cli_ctx).trigger + return cf_datafactory_cl(cli_ctx).trigger def cf_integration_runtime(cli_ctx, *_): - return cf_datafactory(cli_ctx).integration_runtime + return cf_datafactory_cl(cli_ctx).integration_runtime diff --git a/src/test/scenarios/managed-network/output/src/managed-network/azext_managed_network/__init__.py b/src/test/scenarios/managed-network/output/src/managed-network/azext_managed_network/__init__.py index 4a4218c04..e46204d14 100644 --- a/src/test/scenarios/managed-network/output/src/managed-network/azext_managed_network/__init__.py +++ b/src/test/scenarios/managed-network/output/src/managed-network/azext_managed_network/__init__.py @@ -16,10 +16,10 @@ class ManagedNetworkManagementClientCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - from azext_managed_network.generated._client_factory import cf_managed_network + from azext_managed_network.generated._client_factory import cf_managed_network_cl managed_network_custom = CliCommandType( operations_tmpl='azext_managed_network.custom#{}', - client_factory=cf_managed_network) + client_factory=cf_managed_network_cl) parent = super(ManagedNetworkManagementClientCommandsLoader, self) parent.__init__(cli_ctx=cli_ctx, custom_command_type=managed_network_custom) diff --git a/src/test/scenarios/managed-network/output/src/managed-network/azext_managed_network/generated/_client_factory.py b/src/test/scenarios/managed-network/output/src/managed-network/azext_managed_network/generated/_client_factory.py index d81b973bd..7a44365f1 100644 --- a/src/test/scenarios/managed-network/output/src/managed-network/azext_managed_network/generated/_client_factory.py +++ b/src/test/scenarios/managed-network/output/src/managed-network/azext_managed_network/generated/_client_factory.py @@ -9,23 +9,23 @@ # -------------------------------------------------------------------------- -def cf_managed_network(cli_ctx, *_): +def cf_managed_network_cl(cli_ctx, *_): from azure.cli.core.commands.client_factory import get_mgmt_service_client from ..vendored_sdks.managednetwork import ManagedNetworkManagementClient return get_mgmt_service_client(cli_ctx, ManagedNetworkManagementClient) def cf_mn(cli_ctx, *_): - return cf_managed_network(cli_ctx).managed_network + return cf_managed_network_cl(cli_ctx).managed_network def cf_scope_assignment(cli_ctx, *_): - return cf_managed_network(cli_ctx).scope_assignment + return cf_managed_network_cl(cli_ctx).scope_assignment def cf_managed_network_group(cli_ctx, *_): - return cf_managed_network(cli_ctx).managed_network_group + return cf_managed_network_cl(cli_ctx).managed_network_group def cf_managed_network_peering_policy(cli_ctx, *_): - return cf_managed_network(cli_ctx).managed_network_peering_policy + return cf_managed_network_cl(cli_ctx).managed_network_peering_policy