From 1b68eeb0dbd27b4c99e831a4c68c2334d4692808 Mon Sep 17 00:00:00 2001 From: changlong-liu <59815250+changlong-liu@users.noreply.github.com> Date: Wed, 14 Apr 2021 19:45:40 +0800 Subject: [PATCH] for #814 (#819) * for #814 * clean * for #820 * clean * for #802 * gen output after merge Co-authored-by: Qiaoqiao Zhang <55688292+qiaozha@users.noreply.github.com> --- src/generate/CodeModelAz.ts | 3 +- src/generate/CodeModelAzImpl.ts | 34 +++++++++++++++---- src/generate/renders/CliTopAction.ts | 2 +- src/generate/renders/CliTopCustom.ts | 2 +- src/generate/renders/CliTopHelp.ts | 2 +- src/generate/renders/extraExt/CliExtReadme.ts | 8 ++--- .../azure/cli/command_modules/vm/_actions.py | 1 - .../azure/cli/command_modules/vm/_actions.py | 1 - .../kusto/tests/latest/example_steps.py | 1 + .../kusto/tests/latest/example_steps.py | 1 + .../ext_default_folder/src/kusto/README.md | 2 +- .../azext_kusto/tests/latest/example_steps.py | 1 + .../src/kusto/README.md | 2 +- .../azext_kusto/tests/latest/example_steps.py | 1 + .../output/src/managed-network/README.md | 3 +- .../tests/latest/example_steps.py | 2 ++ .../synapse/tests/latest/example_steps.py | 9 +++-- .../ext_default_folder/src/synapse/README.md | 8 +++-- .../tests/latest/example_steps.py | 9 +++-- .../output/extflatten/src/synapse/README.md | 8 +++-- .../tests/latest/example_steps.py | 9 +++-- .../src/synapse/README.md | 8 +++-- .../tests/latest/example_steps.py | 9 +++-- 23 files changed, 84 insertions(+), 42 deletions(-) diff --git a/src/generate/CodeModelAz.ts b/src/generate/CodeModelAz.ts index 6cb8787b..a84182d6 100644 --- a/src/generate/CodeModelAz.ts +++ b/src/generate/CodeModelAz.ts @@ -67,6 +67,7 @@ export class ExampleParam { export class CommandExample { // this should be "create", "update", "list", "show", or custom name public Method: string; + public Command: string; public Id: string; public Title: string; public Parameters: ExampleParam[]; @@ -80,7 +81,6 @@ export class CommandExample { public ExampleObj: any; public commandStringItems: string[]; public CommandString: string; - public WaitCommandString: string; } export interface CodeModelAz { @@ -267,6 +267,7 @@ export interface CodeModelAz { minimum: boolean, step?: TestStepExampleFileRestCall, ): string[][]; + GetExampleWait(example: CommandExample): string[]; SelectFirstAzExample(): boolean; SelectNextAzExample(): boolean; AzExample: CommandExample; diff --git a/src/generate/CodeModelAzImpl.ts b/src/generate/CodeModelAzImpl.ts index 9a941bbe..f1a9265c 100644 --- a/src/generate/CodeModelAzImpl.ts +++ b/src/generate/CodeModelAzImpl.ts @@ -1148,6 +1148,14 @@ export class CodeModelCliImpl implements CodeModelAz { return customName; } + public get CommandGroup_ShowExample(): CommandExample { + return this.CommandGroup?.['az-show-example']; + } + + public set CommandGroup_ShowExample(example: CommandExample) { + if (this.CommandGroup) this.CommandGroup['az-show-example'] = example; + } + // ----------------------------------------------------------------------------------------------------------------- // Commands // @@ -3048,7 +3056,7 @@ export class CodeModelCliImpl implements CodeModelAz { let rawValue = deepCopy(netValue); if (methodParam.value['isPolyOfSimple']) { const keyToMatch = - methodParam.value.schema.discriminator?.property?.language?.default?.name; + methodParam.value.schema.discriminator?.property?.language?.cli?.cliKey; if (keyToMatch) { for (const methodParam of methodParamList) { const polySubParamObj = methodParam.value; @@ -3232,7 +3240,12 @@ export class CodeModelCliImpl implements CodeModelAz { Object.entries(this.Examples).forEach(([id, exampleObj]) => { if (includeGenerated || !isGeneratedExampleId(id)) { const example = this.CreateCommandExample(id, exampleObj); - if (!isNullOrUndefined(example)) examples.push(example); + if (!isNullOrUndefined(example)) { + examples.push(example); + if (this.Command_MethodName === 'show') { + this.CommandGroup_ShowExample = example; + } + } } }); } @@ -3267,6 +3280,7 @@ export class CodeModelCliImpl implements CodeModelAz { const example = new CommandExample(); example.Method = this.Command_MethodName; + example.Command = this.Command_Name; example.Id = `/${this.CommandGroup_Key}/${this.Method_HttpMethod}/${id}`; example.Title = exampleObj.title || id; example.Path = this.Method_Path; @@ -3295,7 +3309,6 @@ export class CodeModelCliImpl implements CodeModelAz { } example.commandStringItems = this.GetExampleItems(example, false, undefined); example.CommandString = example.commandStringItems.join(' '); - example.WaitCommandString = this.GetExampleWait(example).join(' '); return example; } return undefined; @@ -3435,16 +3448,23 @@ export class CodeModelCliImpl implements CodeModelAz { return property?.language?.['cli']?.cliKey === 'provisioningState'; }) ) { - let words = this.Command_Name.split(' '); + const showExample = this.CommandGroup_ShowExample; + if (isNullOrUndefined(showExample)) return []; + let words = showExample.Command.split(' '); words = words.slice(0, words.length - 1); words.push('wait'); parameters.push(`az ${words.join(' ')} --created`); for (const param of example.Parameters) { const paramKey = param.methodParam.value.language?.['cli']?.cliKey; if ( - paramKey === 'resourceGroupName' || - this.resourcePool.isResource(paramKey, param.rawValue) === - example.ResourceClassName + showExample.Parameters.some((showParam) => { + return ( + showParam.methodParam.value.language?.['cli']?.cliKey == + param.methodParam.value.language?.['cli']?.cliKey && + showParam.methodParam.value.language?.['default']?.cliKey == + param.methodParam.value.language?.['default']?.cliKey + ); + }) ) { let paramValue = param.value; let replacedValue = this.resourcePool.addParamResource( diff --git a/src/generate/renders/CliTopAction.ts b/src/generate/renders/CliTopAction.ts index 52d93562..b1c91a47 100644 --- a/src/generate/renders/CliTopAction.ts +++ b/src/generate/renders/CliTopAction.ts @@ -65,7 +65,7 @@ export class CliTopAction extends TemplateBase { const keepLineIdx = keepHeaderLines(baseSplit); let hasLoadLogic = false; if (skipLineIdx !== -1) { - for (let i: number = skipLineIdx + 1; i < baseSplit.length; ++i) { + for (let i: number = skipLineIdx; i < baseSplit.length; ++i) { if (baseSplit[i].indexOf('from .generated.action import *') > -1) { hasLoadLogic = true; break; diff --git a/src/generate/renders/CliTopCustom.ts b/src/generate/renders/CliTopCustom.ts index 24f1f1ef..05f9d60a 100644 --- a/src/generate/renders/CliTopCustom.ts +++ b/src/generate/renders/CliTopCustom.ts @@ -58,7 +58,7 @@ export class CliTopCustom extends TemplateBase { const keepLineIdx = keepHeaderLines(baseSplit); let hasLoadLogic = false; if (skipLineIdx !== -1) { - for (let i: number = skipLineIdx + 1; i < baseSplit.length; ++i) { + for (let i: number = skipLineIdx; i < baseSplit.length; ++i) { if (baseSplit[i].indexOf('from .generated.custom import *') > -1) { hasLoadLogic = true; break; diff --git a/src/generate/renders/CliTopHelp.ts b/src/generate/renders/CliTopHelp.ts index ed8e70ed..e749e830 100644 --- a/src/generate/renders/CliTopHelp.ts +++ b/src/generate/renders/CliTopHelp.ts @@ -53,7 +53,7 @@ export class CliTopHelp extends TemplateBase { let hasLoadLogic = false; if (skipLineIdx !== -1) { - for (let i: number = skipLineIdx + 1; i < baseSplit.length; ++i) { + for (let i: number = skipLineIdx; i < baseSplit.length; ++i) { if (baseSplit[i].indexOf('from .generated._help import helps') > -1) { hasLoadLogic = true; break; diff --git a/src/generate/renders/extraExt/CliExtReadme.ts b/src/generate/renders/extraExt/CliExtReadme.ts index 3349a3fa..9cd976fb 100644 --- a/src/generate/renders/extraExt/CliExtReadme.ts +++ b/src/generate/renders/extraExt/CliExtReadme.ts @@ -62,12 +62,10 @@ export class CliExtReadme extends TemplateBase { const temp = CmdToMultiLines(example.CommandString); exampleCommandList.push(...temp); } - if ( - !isNullOrUndefined(example.WaitCommandString) && - example.WaitCommandString !== '' - ) { + const waitCommandString = this.model.GetExampleWait(example).join(' '); + if (!isNullOrUndefined(waitCommandString) && waitCommandString !== '') { exampleCommandList.push(''); - const temp = CmdToMultiLines(example.WaitCommandString); + const temp = CmdToMultiLines(waitCommandString); exampleCommandList.push(...temp); } exampleCommandList.push('```'); diff --git a/test/scenarios/compute/basecli/src/azure-cli/azure/cli/command_modules/vm/_actions.py b/test/scenarios/compute/basecli/src/azure-cli/azure/cli/command_modules/vm/_actions.py index f387bb4b..336bb496 100644 --- a/test/scenarios/compute/basecli/src/azure-cli/azure/cli/command_modules/vm/_actions.py +++ b/test/scenarios/compute/basecli/src/azure-cli/azure/cli/command_modules/vm/_actions.py @@ -9,7 +9,6 @@ # # Generation mode: Incremental # -------------------------------------------------------------------------- - from .generated.action import * # noqa: F403 try: from .manual.action import * # noqa: F403 diff --git a/test/scenarios/compute/output/core_Incremental/src/azure-cli/azure/cli/command_modules/vm/_actions.py b/test/scenarios/compute/output/core_Incremental/src/azure-cli/azure/cli/command_modules/vm/_actions.py index f387bb4b..336bb496 100644 --- a/test/scenarios/compute/output/core_Incremental/src/azure-cli/azure/cli/command_modules/vm/_actions.py +++ b/test/scenarios/compute/output/core_Incremental/src/azure-cli/azure/cli/command_modules/vm/_actions.py @@ -9,7 +9,6 @@ # # Generation mode: Incremental # -------------------------------------------------------------------------- - from .generated.action import * # noqa: F403 try: from .manual.action import * # noqa: F403 diff --git a/test/scenarios/kusto/output/coredefault/src/azure-cli/azure/cli/command_modules/kusto/tests/latest/example_steps.py b/test/scenarios/kusto/output/coredefault/src/azure-cli/azure/cli/command_modules/kusto/tests/latest/example_steps.py index 61030463..c533047c 100644 --- a/test/scenarios/kusto/output/coredefault/src/azure-cli/azure/cli/command_modules/kusto/tests/latest/example_steps.py +++ b/test/scenarios/kusto/output/coredefault/src/azure-cli/azure/cli/command_modules/kusto/tests/latest/example_steps.py @@ -29,6 +29,7 @@ def step_attached_database_configuration_create(test, checks=None): checks=[]) test.cmd('az kusto attached-database-configuration wait --created ' '--name "{myAttachedDatabaseConfiguration2}" ' + '--cluster-name "{myCluster}" ' '--resource-group "{rg}"', checks=checks) diff --git a/test/scenarios/kusto/output/coretrack2/src/azure-cli/azure/cli/command_modules/kusto/tests/latest/example_steps.py b/test/scenarios/kusto/output/coretrack2/src/azure-cli/azure/cli/command_modules/kusto/tests/latest/example_steps.py index 61030463..c533047c 100644 --- a/test/scenarios/kusto/output/coretrack2/src/azure-cli/azure/cli/command_modules/kusto/tests/latest/example_steps.py +++ b/test/scenarios/kusto/output/coretrack2/src/azure-cli/azure/cli/command_modules/kusto/tests/latest/example_steps.py @@ -29,6 +29,7 @@ def step_attached_database_configuration_create(test, checks=None): checks=[]) test.cmd('az kusto attached-database-configuration wait --created ' '--name "{myAttachedDatabaseConfiguration2}" ' + '--cluster-name "{myCluster}" ' '--resource-group "{rg}"', checks=checks) diff --git a/test/scenarios/kusto/output/ext_default_folder/src/kusto/README.md b/test/scenarios/kusto/output/ext_default_folder/src/kusto/README.md index 5b97b8a5..36117260 100644 --- a/test/scenarios/kusto/output/ext_default_folder/src/kusto/README.md +++ b/test/scenarios/kusto/output/ext_default_folder/src/kusto/README.md @@ -177,7 +177,7 @@ az kusto attached-database-configuration create --name "attachedDatabaseConfigur --database-name "kustodatabase" --default-principals-modification-kind "Union" --resource-group "kustorptest" az kusto attached-database-configuration wait --created --name "{myAttachedDatabaseConfiguration2}" \ - --resource-group "{rg}" + --cluster-name "{myCluster}" --resource-group "{rg}" ``` ##### Show ##### ``` diff --git a/test/scenarios/kusto/output/ext_default_folder/src/kusto/azext_kusto/tests/latest/example_steps.py b/test/scenarios/kusto/output/ext_default_folder/src/kusto/azext_kusto/tests/latest/example_steps.py index d5928569..cdd3138c 100644 --- a/test/scenarios/kusto/output/ext_default_folder/src/kusto/azext_kusto/tests/latest/example_steps.py +++ b/test/scenarios/kusto/output/ext_default_folder/src/kusto/azext_kusto/tests/latest/example_steps.py @@ -29,6 +29,7 @@ def step_attached_database_configuration_create(test, checks=None): checks=[]) test.cmd('az kusto attached-database-configuration wait --created ' '--name "{myAttachedDatabaseConfiguration2}" ' + '--cluster-name "{myCluster}" ' '--resource-group "{rg}"', checks=checks) diff --git a/test/scenarios/kusto/output/extnosdknoflattentrack1/src/kusto/README.md b/test/scenarios/kusto/output/extnosdknoflattentrack1/src/kusto/README.md index 5b97b8a5..36117260 100644 --- a/test/scenarios/kusto/output/extnosdknoflattentrack1/src/kusto/README.md +++ b/test/scenarios/kusto/output/extnosdknoflattentrack1/src/kusto/README.md @@ -177,7 +177,7 @@ az kusto attached-database-configuration create --name "attachedDatabaseConfigur --database-name "kustodatabase" --default-principals-modification-kind "Union" --resource-group "kustorptest" az kusto attached-database-configuration wait --created --name "{myAttachedDatabaseConfiguration2}" \ - --resource-group "{rg}" + --cluster-name "{myCluster}" --resource-group "{rg}" ``` ##### Show ##### ``` diff --git a/test/scenarios/kusto/output/extnosdknoflattentrack1/src/kusto/azext_kusto/tests/latest/example_steps.py b/test/scenarios/kusto/output/extnosdknoflattentrack1/src/kusto/azext_kusto/tests/latest/example_steps.py index d5928569..cdd3138c 100644 --- a/test/scenarios/kusto/output/extnosdknoflattentrack1/src/kusto/azext_kusto/tests/latest/example_steps.py +++ b/test/scenarios/kusto/output/extnosdknoflattentrack1/src/kusto/azext_kusto/tests/latest/example_steps.py @@ -29,6 +29,7 @@ def step_attached_database_configuration_create(test, checks=None): checks=[]) test.cmd('az kusto attached-database-configuration wait --created ' '--name "{myAttachedDatabaseConfiguration2}" ' + '--cluster-name "{myCluster}" ' '--resource-group "{rg}"', checks=checks) diff --git a/test/scenarios/managed-network/output/src/managed-network/README.md b/test/scenarios/managed-network/output/src/managed-network/README.md index a470af39..13cd8dc9 100644 --- a/test/scenarios/managed-network/output/src/managed-network/README.md +++ b/test/scenarios/managed-network/output/src/managed-network/README.md @@ -59,7 +59,8 @@ az managed-network mn group create --management-groups "[]" \ --virtual-networks id="/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB" \ --group-name "myManagedNetworkGroup" --managed-network-name "myManagedNetwork" --resource-group "myResourceGroup" -az managed-network mn group wait --created --group-name "{myManagedNetworkGroup}" --resource-group "{rg}" +az managed-network mn group wait --created --group-name "{myManagedNetworkGroup}" \ + --managed-network-name "{myManagedNetwork}" --resource-group "{rg}" ``` ##### Show ##### ``` diff --git a/test/scenarios/managed-network/output/src/managed-network/azext_managed_network/tests/latest/example_steps.py b/test/scenarios/managed-network/output/src/managed-network/azext_managed_network/tests/latest/example_steps.py index ad8906b9..705f9e63 100644 --- a/test/scenarios/managed-network/output/src/managed-network/azext_managed_network/tests/latest/example_steps.py +++ b/test/scenarios/managed-network/output/src/managed-network/azext_managed_network/tests/latest/example_steps.py @@ -115,6 +115,7 @@ def step_mn_group_create(test, checks=None): checks=[]) test.cmd('az managed-network mn group wait --created ' '--group-name "{myManagedNetworkGroup}" ' + '--managed-network-name "{myManagedNetwork}" ' '--resource-group "{rg}"', checks=checks) @@ -129,6 +130,7 @@ def step_mn_group_create_min(test, checks=None): checks=[]) test.cmd('az managed-network mn group wait --created ' '--group-name "{myManagedNetworkGroup}" ' + '--managed-network-name "{myManagedNetwork}" ' '--resource-group "{rg}"', checks=checks) diff --git a/test/scenarios/synapse/output/coredefault/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/example_steps.py b/test/scenarios/synapse/output/coredefault/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/example_steps.py index 2dcd3cb8..5a92b43c 100644 --- a/test/scenarios/synapse/output/coredefault/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/example_steps.py +++ b/test/scenarios/synapse/output/coredefault/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/example_steps.py @@ -104,7 +104,8 @@ def step_big_data_pool_create(test, checks=None): checks=[]) test.cmd('az synapse big-data-pool wait --created ' '--name "{myBigDataPool}" ' - '--resource-group "{rg}"', + '--resource-group "{rg}" ' + '--workspace-name "{myWorkspace}"', checks=checks) @@ -504,7 +505,8 @@ def step_private_endpoint_connection_create(test, checks=None): checks=[]) test.cmd('az synapse private-endpoint-connection wait --created ' '--name "{myPrivateEndpointConnection}" ' - '--resource-group "{rg}"', + '--resource-group "{rg}" ' + '--workspace-name "{myWorkspace}"', checks=checks) @@ -642,7 +644,8 @@ def step_sql_pool_create(test, checks=None): checks=[]) test.cmd('az synapse sql-pool wait --created ' '--resource-group "{rg}" ' - '--name "{mySqlPool2}"', + '--name "{mySqlPool2}" ' + '--workspace-name "{myWorkspace}"', checks=checks) diff --git a/test/scenarios/synapse/output/ext_default_folder/src/synapse/README.md b/test/scenarios/synapse/output/ext_default_folder/src/synapse/README.md index 478e1a27..9ec04268 100644 --- a/test/scenarios/synapse/output/ext_default_folder/src/synapse/README.md +++ b/test/scenarios/synapse/output/ext_default_folder/src/synapse/README.md @@ -17,7 +17,8 @@ az synapse big-data-pool create --location "West US 2" --auto-pause delay-in-min --node-size-family "MemoryOptimized" --spark-events-folder "/events" --spark-version "2.4" --tags key="value" \ --name "ExamplePool" --resource-group "ExampleResourceGroup" --workspace-name "ExampleWorkspace" -az synapse big-data-pool wait --created --name "{myBigDataPool}" --resource-group "{rg}" +az synapse big-data-pool wait --created --name "{myBigDataPool}" --resource-group "{rg}" \ + --workspace-name "{myWorkspace}" ``` ##### Show ##### ``` @@ -82,7 +83,7 @@ az synapse sql-pool create --resource-group "ExampleResourceGroup" --location "W --restore-point-in-time "1970-01-01T00:00:00.000Z" --source-database-id "" --sku name="" tier="" \ --name "ExampleSqlPool" --workspace-name "ExampleWorkspace" -az synapse sql-pool wait --created --resource-group "{rg}" --name "{mySqlPool2}" +az synapse sql-pool wait --created --resource-group "{rg}" --name "{mySqlPool2}" --workspace-name "{myWorkspace}" ``` ##### List ##### ``` @@ -546,7 +547,8 @@ az synapse private-link-resource show --name "sql" --resource-group "ExampleReso az synapse private-endpoint-connection create --name "ExamplePrivateEndpointConnection" \ --resource-group "ExampleResourceGroup" --workspace-name "ExampleWorkspace" -az synapse private-endpoint-connection wait --created --name "{myPrivateEndpointConnection}" --resource-group "{rg}" +az synapse private-endpoint-connection wait --created --name "{myPrivateEndpointConnection}" --resource-group "{rg}" \ + --workspace-name "{myWorkspace}" ``` ##### Show ##### ``` diff --git a/test/scenarios/synapse/output/ext_default_folder/src/synapse/azext_synapse/tests/latest/example_steps.py b/test/scenarios/synapse/output/ext_default_folder/src/synapse/azext_synapse/tests/latest/example_steps.py index 2dcd3cb8..5a92b43c 100644 --- a/test/scenarios/synapse/output/ext_default_folder/src/synapse/azext_synapse/tests/latest/example_steps.py +++ b/test/scenarios/synapse/output/ext_default_folder/src/synapse/azext_synapse/tests/latest/example_steps.py @@ -104,7 +104,8 @@ def step_big_data_pool_create(test, checks=None): checks=[]) test.cmd('az synapse big-data-pool wait --created ' '--name "{myBigDataPool}" ' - '--resource-group "{rg}"', + '--resource-group "{rg}" ' + '--workspace-name "{myWorkspace}"', checks=checks) @@ -504,7 +505,8 @@ def step_private_endpoint_connection_create(test, checks=None): checks=[]) test.cmd('az synapse private-endpoint-connection wait --created ' '--name "{myPrivateEndpointConnection}" ' - '--resource-group "{rg}"', + '--resource-group "{rg}" ' + '--workspace-name "{myWorkspace}"', checks=checks) @@ -642,7 +644,8 @@ def step_sql_pool_create(test, checks=None): checks=[]) test.cmd('az synapse sql-pool wait --created ' '--resource-group "{rg}" ' - '--name "{mySqlPool2}"', + '--name "{mySqlPool2}" ' + '--workspace-name "{myWorkspace}"', checks=checks) diff --git a/test/scenarios/synapse/output/extflatten/src/synapse/README.md b/test/scenarios/synapse/output/extflatten/src/synapse/README.md index 478e1a27..9ec04268 100644 --- a/test/scenarios/synapse/output/extflatten/src/synapse/README.md +++ b/test/scenarios/synapse/output/extflatten/src/synapse/README.md @@ -17,7 +17,8 @@ az synapse big-data-pool create --location "West US 2" --auto-pause delay-in-min --node-size-family "MemoryOptimized" --spark-events-folder "/events" --spark-version "2.4" --tags key="value" \ --name "ExamplePool" --resource-group "ExampleResourceGroup" --workspace-name "ExampleWorkspace" -az synapse big-data-pool wait --created --name "{myBigDataPool}" --resource-group "{rg}" +az synapse big-data-pool wait --created --name "{myBigDataPool}" --resource-group "{rg}" \ + --workspace-name "{myWorkspace}" ``` ##### Show ##### ``` @@ -82,7 +83,7 @@ az synapse sql-pool create --resource-group "ExampleResourceGroup" --location "W --restore-point-in-time "1970-01-01T00:00:00.000Z" --source-database-id "" --sku name="" tier="" \ --name "ExampleSqlPool" --workspace-name "ExampleWorkspace" -az synapse sql-pool wait --created --resource-group "{rg}" --name "{mySqlPool2}" +az synapse sql-pool wait --created --resource-group "{rg}" --name "{mySqlPool2}" --workspace-name "{myWorkspace}" ``` ##### List ##### ``` @@ -546,7 +547,8 @@ az synapse private-link-resource show --name "sql" --resource-group "ExampleReso az synapse private-endpoint-connection create --name "ExamplePrivateEndpointConnection" \ --resource-group "ExampleResourceGroup" --workspace-name "ExampleWorkspace" -az synapse private-endpoint-connection wait --created --name "{myPrivateEndpointConnection}" --resource-group "{rg}" +az synapse private-endpoint-connection wait --created --name "{myPrivateEndpointConnection}" --resource-group "{rg}" \ + --workspace-name "{myWorkspace}" ``` ##### Show ##### ``` diff --git a/test/scenarios/synapse/output/extflatten/src/synapse/azext_synapse/tests/latest/example_steps.py b/test/scenarios/synapse/output/extflatten/src/synapse/azext_synapse/tests/latest/example_steps.py index 2dcd3cb8..5a92b43c 100644 --- a/test/scenarios/synapse/output/extflatten/src/synapse/azext_synapse/tests/latest/example_steps.py +++ b/test/scenarios/synapse/output/extflatten/src/synapse/azext_synapse/tests/latest/example_steps.py @@ -104,7 +104,8 @@ def step_big_data_pool_create(test, checks=None): checks=[]) test.cmd('az synapse big-data-pool wait --created ' '--name "{myBigDataPool}" ' - '--resource-group "{rg}"', + '--resource-group "{rg}" ' + '--workspace-name "{myWorkspace}"', checks=checks) @@ -504,7 +505,8 @@ def step_private_endpoint_connection_create(test, checks=None): checks=[]) test.cmd('az synapse private-endpoint-connection wait --created ' '--name "{myPrivateEndpointConnection}" ' - '--resource-group "{rg}"', + '--resource-group "{rg}" ' + '--workspace-name "{myWorkspace}"', checks=checks) @@ -642,7 +644,8 @@ def step_sql_pool_create(test, checks=None): checks=[]) test.cmd('az synapse sql-pool wait --created ' '--resource-group "{rg}" ' - '--name "{mySqlPool2}"', + '--name "{mySqlPool2}" ' + '--workspace-name "{myWorkspace}"', checks=checks) diff --git a/test/scenarios/synapse/output/extnosdknoflattentrack1/src/synapse/README.md b/test/scenarios/synapse/output/extnosdknoflattentrack1/src/synapse/README.md index 478e1a27..9ec04268 100644 --- a/test/scenarios/synapse/output/extnosdknoflattentrack1/src/synapse/README.md +++ b/test/scenarios/synapse/output/extnosdknoflattentrack1/src/synapse/README.md @@ -17,7 +17,8 @@ az synapse big-data-pool create --location "West US 2" --auto-pause delay-in-min --node-size-family "MemoryOptimized" --spark-events-folder "/events" --spark-version "2.4" --tags key="value" \ --name "ExamplePool" --resource-group "ExampleResourceGroup" --workspace-name "ExampleWorkspace" -az synapse big-data-pool wait --created --name "{myBigDataPool}" --resource-group "{rg}" +az synapse big-data-pool wait --created --name "{myBigDataPool}" --resource-group "{rg}" \ + --workspace-name "{myWorkspace}" ``` ##### Show ##### ``` @@ -82,7 +83,7 @@ az synapse sql-pool create --resource-group "ExampleResourceGroup" --location "W --restore-point-in-time "1970-01-01T00:00:00.000Z" --source-database-id "" --sku name="" tier="" \ --name "ExampleSqlPool" --workspace-name "ExampleWorkspace" -az synapse sql-pool wait --created --resource-group "{rg}" --name "{mySqlPool2}" +az synapse sql-pool wait --created --resource-group "{rg}" --name "{mySqlPool2}" --workspace-name "{myWorkspace}" ``` ##### List ##### ``` @@ -546,7 +547,8 @@ az synapse private-link-resource show --name "sql" --resource-group "ExampleReso az synapse private-endpoint-connection create --name "ExamplePrivateEndpointConnection" \ --resource-group "ExampleResourceGroup" --workspace-name "ExampleWorkspace" -az synapse private-endpoint-connection wait --created --name "{myPrivateEndpointConnection}" --resource-group "{rg}" +az synapse private-endpoint-connection wait --created --name "{myPrivateEndpointConnection}" --resource-group "{rg}" \ + --workspace-name "{myWorkspace}" ``` ##### Show ##### ``` diff --git a/test/scenarios/synapse/output/extnosdknoflattentrack1/src/synapse/azext_synapse/tests/latest/example_steps.py b/test/scenarios/synapse/output/extnosdknoflattentrack1/src/synapse/azext_synapse/tests/latest/example_steps.py index 2dcd3cb8..5a92b43c 100644 --- a/test/scenarios/synapse/output/extnosdknoflattentrack1/src/synapse/azext_synapse/tests/latest/example_steps.py +++ b/test/scenarios/synapse/output/extnosdknoflattentrack1/src/synapse/azext_synapse/tests/latest/example_steps.py @@ -104,7 +104,8 @@ def step_big_data_pool_create(test, checks=None): checks=[]) test.cmd('az synapse big-data-pool wait --created ' '--name "{myBigDataPool}" ' - '--resource-group "{rg}"', + '--resource-group "{rg}" ' + '--workspace-name "{myWorkspace}"', checks=checks) @@ -504,7 +505,8 @@ def step_private_endpoint_connection_create(test, checks=None): checks=[]) test.cmd('az synapse private-endpoint-connection wait --created ' '--name "{myPrivateEndpointConnection}" ' - '--resource-group "{rg}"', + '--resource-group "{rg}" ' + '--workspace-name "{myWorkspace}"', checks=checks) @@ -642,7 +644,8 @@ def step_sql_pool_create(test, checks=None): checks=[]) test.cmd('az synapse sql-pool wait --created ' '--resource-group "{rg}" ' - '--name "{mySqlPool2}"', + '--name "{mySqlPool2}" ' + '--workspace-name "{myWorkspace}"', checks=checks)