Skip to content

Commit

Permalink
changed param description for kb-numbers-to-include (#8043)
Browse files Browse the repository at this point in the history
* changed param description for kb-numbers-to-include

* updated version
cleaned up comments

* addressed github actions requirements

* Update HISTORY.rst

* Update setup.py

* Update src/maintenance/setup.py

Co-authored-by: kai ru <[email protected]>

---------

Co-authored-by: Bogdan Oros <[email protected]>
Co-authored-by: kai ru <[email protected]>
  • Loading branch information
3 people authored Oct 9, 2024
1 parent 0ee5fbc commit fcad2eb
Show file tree
Hide file tree
Showing 14 changed files with 8,792 additions and 5,342 deletions.
4 changes: 4 additions & 0 deletions src/maintenance/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Release History
===============
1.7.0b1
++++++
* Changed incorrect parameter name

1.6.0
++++++
* Added support for approving scheduled events
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
)
class CreateOrUpdate(AAZCommand):
"""Create maintenance updates to resource
:example: ApplyUpdates_CreateOrUpdate
az maintenance applyupdate create-or-update --apply-update-name "20230921151000" --provider-name "Microsoft.Maintenance" --resource-group "Maintenance-RG-1598" --resource-name "configuration1" --resource-type "maintenanceConfigurations" --status "Cancel"
"""

_aaz_info = {
"version": "2023-09-01-preview",
"version": "2023-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/{}/{}/{}/providers/microsoft.maintenance/applyupdates/{}", "2023-09-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/{}/{}/{}/providers/microsoft.maintenance/applyupdates/{}", "2023-10-01-preview"],
]
}

Expand Down Expand Up @@ -170,7 +167,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01-preview",
"api-version", "2023-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
)
class Update(AAZCommand):
"""Update maintenance updates to resource
:example: ApplyUpdates_Update
az maintenance applyupdate update --apply-update-name "20230921151000" --provider-name "Microsoft.Maintenance" --resource-group "Maintenance-RG-1598" --resource-name "configuration1" --resource-type "maintenanceConfigurations" --status "Cancel"
"""

_aaz_info = {
"version": "2023-09-01-preview",
"version": "2023-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/{}/{}/{}/providers/microsoft.maintenance/applyupdates/{}", "2023-09-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/{}/{}/{}/providers/microsoft.maintenance/applyupdates/{}", "2023-10-01-preview"],
]
}

Expand Down Expand Up @@ -188,7 +185,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01-preview",
"api-version", "2023-10-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -283,7 +280,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01-preview",
"api-version", "2023-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CreateOrUpdateResourceGroup(AAZCommand):
"""Create configuration for resource.
:example: ConfigurationAssignments_CreateOrUpdateResourceGroup
az maintenance assignment create-or-update-resource-group --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/exmaplerg2/providers/Microsoft. Maintenance/maintenanceConfigurations/config1" --name assignmentname --filter-locations eastus2euap centraluseuap --filter-os-types windows linux --filter-tags "{{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}}" --filter-tags-operator All --resource-group examplerg1
az maintenance assignment create-or-update-resource-group --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/exmaplerg2/providers/Microsoft. Maintenance/maintenanceConfigurations/config1" --name assignmentname --filter-locations eastus2euap centraluseuap --filter-os-types windows linux --filter-tags "{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}" --filter-tags-operator All --resource-group examplerg1
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CreateOrUpdateSubscription(AAZCommand):
"""Create configuration for resource.
:example: ConfigurationAssignments_CreateOrUpdateSubscription
az maintenance assignment create-or-update-subscription --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/exmaplerg2/providers/Microsoft. Maintenance/maintenanceConfigurations/config1" --name assignmentname --filter-locations eastus2euap centraluseuap --filter-os-types windows linux --filter-tags "{{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}}" --filter-tags-operator All
az maintenance assignment create-or-update-subscription --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/exmaplerg2/providers/Microsoft. Maintenance/maintenanceConfigurations/config1" --name assignmentname --filter-locations eastus2euap centraluseuap --filter-os-types windows linux --filter-tags "{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}" --filter-tags-operator All
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class UpdateResourceGroup(AAZCommand):
"""Update configuration for resource.
:example: ConfigurationAssignments_UpdateResourceGroup
az maintenance assignment create-or-update-resource-group --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/exmaplerg2/providers/Microsoft. Maintenance/maintenanceConfigurations/config1" --name assignmentname --filter-locations eastus2euap centraluseuap --filter-os-types windows linux --filter-tags "{{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}}" --filter-tags-operator All --resource-group examplerg1
az maintenance assignment create-or-update-resource-group --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/exmaplerg2/providers/Microsoft. Maintenance/maintenanceConfigurations/config1" --name assignmentname --filter-locations eastus2euap centraluseuap --filter-os-types windows linux --filter-tags "{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}" --filter-tags-operator All --resource-group examplerg1
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class UpdateSubscription(AAZCommand):
"""Update configuration for resource.
:example: ConfigurationAssignments_UpdateSubscription
az maintenance assignment update-subscription --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/exmaplerg2/providers/Microsoft. Maintenance/maintenanceConfigurations/config1" --name assignmentname --filter-locations eastus2euap centraluseuap --filter-os-types windows linux --filter-tags "{{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}}" --filter-tags-operator All
az maintenance assignment update-subscription --maintenance-configuration-id "/subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/exmaplerg2/providers/Microsoft. Maintenance/maintenanceConfigurations/config1" --name assignmentname --filter-locations eastus2euap centraluseuap --filter-os-types windows linux --filter-tags "{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}" --filter-tags-operator All
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
)
install_patches_windows_parameters.kb_numbers_to_include_list = AAZListArg(
options=["kb-numbers-to-include-list"],
singular_options=["kb-numbers-to-include"],
singular_options=["kb-numbers-to-exclude"],
help="Windows KBID to be included for patching.",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Scheduled event actions
"""ScheduledEvents action
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@
is_preview=True,
)
class Acknowledge(AAZCommand):
"""Post Scheduled Event Acknowledgement
"""Acknowledge Scheduled Event
:example: Acknowledge scheduled event of a VM
az --resource-group {resourceGroup} --resource-name {VMname} --scheduled-event-id {GuidEventId} --subscription {subscriptionId}
:example: Acknowledge scheduled event of a VirtualMachine
az maintenance scheduledevent acknowledge --resource-group {resourceGroupName} --resource-type "virtualMachines" --resource-name {VMname} --scheduled-event-id {scheduledEventId} --subscription {subscriptionId}
az maintenance scheduledevent acknowledge --ids /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.compute/virtualMachines/{resourceName}/providers/microsoft.maintenance/scheduledevents/{scheduledEventId}
:example: Acknowledge scheduled event of a VMSS
az --resource-group {resourceGroup} --resource-name {VMSSname} --scheduled-event-id {GuidEventId} --subscription {subscriptionId}
:example: Acknowledge scheduled event of a VirtualMachineScaleSets
az maintenance scheduledevent acknowledge --resource-group {resourceGroup} --resource-type "virtualMachineScaleSets" --resource-name {VMSSname} --scheduled-event-id {scheduledEventId} --subscription {subscriptionId}
az maintenance scheduledevent acknowledge --ids /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.compute/virtualMachineScaleSets/{resourceName}/providers/microsoft.maintenance/scheduledevents/{scheduledEventId}
:example: Acknowledge scheduled event of a AvailabilitySet
az --resource-group {resourceGroup} --resource-name {AVSetname} --scheduled-event-id {GuidEventId} --subscription {subscriptionId}
az maintenance scheduledevent acknowledge--resource-group {resourceGroupName} --resource-type "availabilitySets"--resource-name {AVSetname} --scheduled-event-id {scheduledEventId} --subscription {subscriptionId}
az maintenance scheduledevent acknowledge --ids /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.compute/AvalabilitySets/{resourceName}/providers/microsoft.maintenance/scheduledevents/{scheduledEventId}
"""

_aaz_info = {
Expand Down
4 changes: 2 additions & 2 deletions src/maintenance/azext_maintenance/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"azext.isExperimental": true,
"azext.minCliCoreVersion": "2.56.0"
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.61.0"
}
Loading

0 comments on commit fcad2eb

Please sign in to comment.