Skip to content

Commit 0c3ff58

Browse files
Fixing test errors
1 parent 34db472 commit 0c3ff58

File tree

10 files changed

+3808
-692
lines changed

10 files changed

+3808
-692
lines changed

src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/configuration/_config_download.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
class Download(AAZCommand):
2222
"""Download configurations available at specified hierarchical entity
2323
:example: Download configuration
24-
az workload-orchestration configuration download --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-resource-group rg1 --template-name template1 --version 1.0.0
24+
az workload-orchestration configuration download --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-rg rg1 --template-name template1 --version 1.0.0
2525
:example: Download a Solution Template Configuration
26-
az workload-orchestration configuration download --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-resource-group rg1 --template-name solutionTemplate1 --version 1.0.0 --solution
26+
az workload-orchestration configuration download --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-rg rg1 --template-name solutionTemplate1 --version 1.0.0 --solution
2727
"""
2828

2929
_aaz_info = {
@@ -57,16 +57,16 @@ def _build_arguments_schema(cls, *args, **kwargs):
5757
)
5858

5959
_args_schema.template_subscription = AAZStrArg(
60-
options=["--template_subscription"],
60+
options=["--template-subscription"],
6161
help="Subscription ID for the template. Only needed if the subscription ID for the template is different than the current subscription ID.",
6262
required=False,
6363
fmt=AAZStrArgFormat(
6464
pattern="^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
6565
),
6666
)
6767

68-
_args_schema.template_resource_group = AAZStrArg(
69-
options=["--template-resource-group", "-g"],
68+
_args_schema.template_rg = AAZStrArg(
69+
options=["--template-rg", "-g"],
7070
help="Resource group name for the template.",
7171
required=True,
7272
)
@@ -150,7 +150,7 @@ def __call__(self, *args, **kwargs):
150150
solution_flag = self.ctx.args.solution if self.ctx.args.solution else False
151151
self.dynamic_configuration_name = ConfigurationHelper.getTemplateUniqueIdentifier(
152152
template_subscription,
153-
self.ctx.args.template_resource_group,
153+
self.ctx.args.template_rg,
154154
self.ctx.args.template_name,
155155
solution_flag,
156156
self.client

src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/configuration/_config_set.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
class ShowConfig2(AAZCommand):
2525
"""To set the values to configurations available at specified hierarchical entity
2626
:example: Set a Configuration through editor
27-
az workload-orchestration configuration set --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-resource-group rg1 --template-name template1 --version 1.0.0
27+
az workload-orchestration configuration set --hierarchy-id \"/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1\" --template-rg rg1 --template-name template1 --version 1.0.0
2828
:example: Set a Configuration through file
29-
az workload-orchestration configuration set --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-resource-group rg1 --template-name template1 --version 1.0.0 --file /path/to/config.yaml
29+
az workload-orchestration configuration set --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-rg rg1 --template-name template1 --version 1.0.0 --file /path/to/config.yaml
3030
:example: Set a Solution Template Configuration
31-
az workload-orchestration configuration set --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-resource-group rg1 --template-name solutionTemplate1 --version 1.0.0 --solution
31+
az workload-orchestration configuration set --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-rg rg1 --template-name solutionTemplate1 --version 1.0.0 --solution
3232
"""
3333

3434
_aaz_info = {
@@ -61,16 +61,16 @@ def _build_arguments_schema(cls, *args, **kwargs):
6161
)
6262

6363
_args_schema.template_subscription = AAZStrArg(
64-
options=["--template_subscription"],
64+
options=["--template-subscription"],
6565
help="Subscription ID for the template. Only needed if the subscription ID for the template is different than the current subscription ID.",
6666
required=False,
6767
fmt=AAZStrArgFormat(
6868
pattern="^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
6969
),
7070
)
7171

72-
_args_schema.template_resource_group = AAZStrArg(
73-
options=["--template-resource-group", "-g"],
72+
_args_schema.template_rg = AAZStrArg(
73+
options=["--template-rg", "-g"],
7474
help="Resource group name for the template.",
7575
required=True,
7676
)
@@ -156,7 +156,7 @@ def __call__(self, *args, **kwargs):
156156
solution_flag = self.ctx.args.solution if self.ctx.args.solution else False
157157
self.dynamic_configuration_name = ConfigurationHelper.getTemplateUniqueIdentifier(
158158
template_subscription,
159-
self.ctx.args.template_resource_group,
159+
self.ctx.args.template_rg,
160160
self.ctx.args.template_name,
161161
solution_flag,
162162
self.client
@@ -223,7 +223,7 @@ def __call__(self, *args, **kwargs):
223223
# Step 0: Validate that the template version exists
224224
ConfigurationHelper.validateTemplateVersion(
225225
template_subscription,
226-
self.ctx.args.template_resource_group,
226+
self.ctx.args.template_rg,
227227
self.ctx.args.template_name,
228228
self.ctx.args.version,
229229
solution_flag,
@@ -235,7 +235,7 @@ def __call__(self, *args, **kwargs):
235235
ConfigurationHelper.matchCapabilities(
236236
self.ctx.args.hierarchy_id,
237237
template_subscription,
238-
self.ctx.args.template_resource_group,
238+
self.ctx.args.template_rg,
239239
self.ctx.args.template_name,
240240
self.client
241241
)
@@ -244,7 +244,7 @@ def __call__(self, *args, **kwargs):
244244
ConfigurationHelper.checkLinking(
245245
self.ctx.args.hierarchy_id,
246246
template_subscription,
247-
self.ctx.args.template_resource_group,
247+
self.ctx.args.template_rg,
248248
self.ctx.args.template_name,
249249
self.client
250250
)
@@ -278,7 +278,7 @@ def __call__(self, *args, **kwargs):
278278
try:
279279
placeholder_content = self.getConfigPlaceholderFromSchema(
280280
template_subscription,
281-
self.ctx.args.template_resource_group,
281+
self.ctx.args.template_rg,
282282
self.ctx.args.template_name,
283283
self.ctx.args.version,
284284
solution_flag

src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/configuration/_config_show.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
class ShowConfig(AAZCommand):
2121
"""To get a configurations available at specified hierarchical entity
2222
:example: Show a Configuration
23-
az workload-orchestration configuration show --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-resource-group rg1 --template-name template1 --version 1.0.0
23+
az workload-orchestration configuration show --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-rg rg1 --template-name template1 --version 1.0.0
2424
:example: Show a Solution Template Configuration
25-
az workload-orchestration configuration show --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-resource-group rg1 --template-name solutionTemplate1 --version 1.0.0 --solution
25+
az workload-orchestration configuration show --hierarchy-id "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Edge/sites/site1" --template-rg rg1 --template-name solutionTemplate1 --version 1.0.0 --solution
2626
"""
2727

2828
_aaz_info = {
@@ -56,16 +56,16 @@ def _build_arguments_schema(cls, *args, **kwargs):
5656
)
5757

5858
_args_schema.template_subscription = AAZStrArg(
59-
options=["--template_subscription"],
59+
options=["--template-subscription"],
6060
help="Subscription ID for the template. Only needed if the subscription ID for the template is different than the current subscription ID.",
6161
required=False,
6262
fmt=AAZStrArgFormat(
6363
pattern="^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
6464
),
6565
)
6666

67-
_args_schema.template_resource_group = AAZStrArg(
68-
options=["--template-resource-group", "-g"],
67+
_args_schema.template_rg = AAZStrArg(
68+
options=["--template-rg", "-g"],
6969
help="Resource group name for the template.",
7070
required=True,
7171
)
@@ -132,7 +132,7 @@ def __call__(self, *args, **kwargs):
132132
solution_flag = self.ctx.args.solution if self.ctx.args.solution else False
133133
self.dynamic_configuration_name = ConfigurationHelper.getTemplateUniqueIdentifier(
134134
template_subscription,
135-
self.ctx.args.template_resource_group,
135+
self.ctx.args.template_rg,
136136
self.ctx.args.template_name,
137137
solution_flag,
138138
self.client

src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/configuration/schema/_show.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
class Show(AAZCommand):
2020
"""Show the schema placeholder for a configuration template or solution template
2121
:example: Show schema for a Configuration Template
22-
az workload-orchestration configuration schema show --template-resource-group rg1 --template-name template1 --version 1.0.0
22+
az workload-orchestration configuration schema show --template-rg rg1 --template-name template1 --version 1.0.0
2323
:example: Show schema for a Solution Template
24-
az workload-orchestration configuration schema show --template-resource-group rg1 --template-name solutionTemplate1 --version 1.0.0 --solution
24+
az workload-orchestration configuration schema show --template-rg rg1 --template-name solutionTemplate1 --version 1.0.0 --solution
2525
:example: Show schema for a template in different subscription
26-
az workload-orchestration configuration schema show --template-subscription sub1 --template-resource-group rg1 --template-name template1 --version 1.0.0
26+
az workload-orchestration configuration schema show --template-subscription sub1 --template-rg rg1 --template-name template1 --version 1.0.0
2727
"""
2828

2929
_aaz_info = {
@@ -60,8 +60,8 @@ def _build_arguments_schema(cls, *args, **kwargs):
6060
),
6161
)
6262

63-
_args_schema.template_resource_group = AAZStrArg(
64-
options=["--template-resource-group", "-g"],
63+
_args_schema.template_rg = AAZStrArg(
64+
options=["--template-rg", "-g"],
6565
help="Resource group name for the template.",
6666
required=True,
6767
)
@@ -132,7 +132,7 @@ def __call__(self, *args, **kwargs):
132132
try:
133133
schema_value = ConfigurationHelper.getTemplateSchema(
134134
template_subscription,
135-
self.ctx.args.template_resource_group,
135+
self.ctx.args.template_rg,
136136
self.ctx.args.template_name,
137137
self.ctx.args.version,
138138
solution_flag,

0 commit comments

Comments
 (0)