Skip to content

Commit ac3f6a2

Browse files
SethuramSSethuram S
andauthored
Add list of allowed classifications in description for Maintenance Configuration (#8381)
* Add list of allowed classifications in description for Maintenance Configuration * Update HISTORY.rst * Update setup.py and tests --------- Co-authored-by: Sethuram S <[email protected]>
1 parent 8b98964 commit ac3f6a2

File tree

7 files changed

+7035
-5141
lines changed

7 files changed

+7035
-5141
lines changed

src/maintenance/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
33
Release History
44
===============
5+
1.7.0b2
6+
++++++
7+
* Added list of allowed classifications in description for Maintenance Configuration
8+
59
1.7.0b1
610
++++++
711
* Changed incorrect parameter name

src/maintenance/azext_maintenance/aaz/latest/maintenance/configuration/_create.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Create(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2023-04-01",
25+
"version": "2023-10-01-preview",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.maintenance/maintenanceconfigurations/{}", "2023-04-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.maintenance/maintenanceconfigurations/{}", "2023-10-01-preview"],
2828
]
2929
}
3030

@@ -96,7 +96,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
9696
install_patches_linux_parameters.classifications_to_include_list = AAZListArg(
9797
options=["classifications-to-include-list"],
9898
singular_options=["classifications-to-include"],
99-
help="Classification category of patches to be patched",
99+
help="Classification category of patches to be patched. Allowed values are 'Critical', 'Security', and 'Other'.",
100100
)
101101
install_patches_linux_parameters.package_name_masks_to_exclude_list = AAZListArg(
102102
options=["package-name-masks-to-exclude-list"],
@@ -122,7 +122,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
122122
install_patches_windows_parameters.classifications_to_include_list = AAZListArg(
123123
options=["classifications-to-include-list"],
124124
singular_options=["classifications-to-include"],
125-
help="Classification category of patches to be patched",
125+
help="Classification category of patches to be patched. Allowed values are 'Critical', 'Security', 'UpdateRollup', 'FeaturePack', 'ServicePack', 'Definition', 'Tools', and 'Updates'.",
126126
)
127127
install_patches_windows_parameters.exclude_kbs_requiring_reboot = AAZBoolArg(
128128
options=["exclude-kbs-requiring-reboot"],
@@ -272,7 +272,7 @@ def url_parameters(self):
272272
def query_parameters(self):
273273
parameters = {
274274
**self.serialize_query_param(
275-
"api-version", "2023-04-01",
275+
"api-version", "2023-10-01-preview",
276276
required=True,
277277
),
278278
}

src/maintenance/azext_maintenance/aaz/latest/maintenance/configuration/_update.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Update(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2023-04-01",
25+
"version": "2023-10-01-preview",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.maintenance/maintenanceconfigurations/{}", "2023-04-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.maintenance/maintenanceconfigurations/{}", "2023-10-01-preview"],
2828
]
2929
}
3030

@@ -97,7 +97,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
9797
install_patches_linux_parameters.classifications_to_include_list = AAZListArg(
9898
options=["classifications-to-include-list"],
9999
singular_options=["classifications-to-include"],
100-
help="Classification category of patches to be patched",
100+
help="Classification category of patches to be patched. Allowed values are 'Critical', 'Security', and 'Other'.",
101101
)
102102
install_patches_linux_parameters.package_name_masks_to_exclude_list = AAZListArg(
103103
options=["package-name-masks-to-exclude-list"],
@@ -123,7 +123,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
123123
install_patches_windows_parameters.classifications_to_include_list = AAZListArg(
124124
options=["classifications-to-include-list"],
125125
singular_options=["classifications-to-include"],
126-
help="Classification category of patches to be patched",
126+
help="Classification category of patches to be patched. Allowed values are 'Critical', 'Security', 'UpdateRollup', 'FeaturePack', 'ServicePack', 'Definition', 'Tools', and 'Updates'.",
127127
)
128128
install_patches_windows_parameters.exclude_kbs_requiring_reboot = AAZBoolArg(
129129
options=["exclude-kbs-requiring-reboot"],
@@ -273,7 +273,7 @@ def url_parameters(self):
273273
def query_parameters(self):
274274
parameters = {
275275
**self.serialize_query_param(
276-
"api-version", "2023-04-01",
276+
"api-version", "2023-10-01-preview",
277277
required=True,
278278
),
279279
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"azext.isPreview": true,
3-
"azext.minCliCoreVersion": "2.61.0"
3+
"azext.minCliCoreVersion": "2.67.0"
44
}

src/maintenance/azext_maintenance/tests/latest/recordings/test_maintenance_Scenario.yaml

Lines changed: 7010 additions & 5122 deletions
Large diffs are not rendered by default.

src/maintenance/azext_maintenance/tests/latest/test_maintenance_scenario.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,9 @@ def step_assignment_list_parent(test):
283283

284284

285285
def step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_getforresource(test):
286-
test.cmd('az maintenance public-configuration show ''--resource-name "sql3"',
287-
checks=[])
286+
test.cmd('az maintenance public-configuration show '
287+
'--resource-name "{publicMaintenanceConfiguration}"',
288+
checks=[])
288289

289290

290291
def step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_list(test):
@@ -323,7 +324,7 @@ def step__maintenanceconfigurations_delete_maintenanceconfigurations_deleteforre
323324
def step__maintenanceconfigurations_delete_publicmaintenanceconfigurations_delete(test):
324325
test.cmd('az maintenance configuration delete '
325326
'--resource-group "{rg}" '
326-
'--resource-name "sqlcli" '
327+
'--resource-name "{publicMaintenanceConfiguration}" '
327328
'--yes ',
328329
checks=[])
329330

@@ -340,8 +341,8 @@ def step__maintenanceconfigurations_put_publicmaintenanceconfigurations_createor
340341
'--namespace "Microsoft.Maintenance" '
341342
'--visibility "Public" '
342343
'--resource-group "{rg}" '
343-
'--resource-name "sqlcli" '
344-
'--extension-properties publicMaintenanceConfigurationId=sqlcli isAvailable=true',
344+
'--resource-name "{publicMaintenanceConfiguration}" '
345+
'--extension-properties publicMaintenanceConfigurationId={publicMaintenanceConfiguration} isAvailable=true',
345346
checks=[])
346347

347348

@@ -540,9 +541,9 @@ def call_scenario(test):
540541
step__configurationassignments_get_configurationassignments_show(test)
541542

542543
# public maintenance config
543-
step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_getforresource(test)
544544
step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_list(test)
545545
step__maintenanceconfigurations_put_publicmaintenanceconfigurations_createorupdateforresource(test)
546+
step__publicmaintenanceconfigurations_get_publicmaintenanceconfigurations_getforresource(test)
546547
step__maintenanceconfigurations_delete_publicmaintenanceconfigurations_delete(test)
547548

548549
# pending updates for vmss
@@ -609,7 +610,8 @@ def __init__(self, *args, **kwargs):
609610
'myMaintenanceConfiguration2': 'configuration2',
610611
'myConfigurationAssignment': 'workervmPolicy2',
611612
'myConfigurationAssignment2': 'workervmConfiguration2',
612-
'HSProbeSettings': '{"protocol": "https", "port": "80", "requestPath": "/"}'
613+
'HSProbeSettings': '{"protocol": "https", "port": "80", "requestPath": "/"}',
614+
'publicMaintenanceConfiguration': 'sqlcli'
613615
})
614616

615617
@AllowLargeResponse()

src/maintenance/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from setuptools import setup, find_packages
1111

1212
# HISTORY.rst entry.
13-
VERSION = '1.7.0b1'
13+
VERSION = '1.7.0b2'
1414
try:
1515
from azext_maintenance.manual.version import VERSION
1616
except ImportError:

0 commit comments

Comments
 (0)