Skip to content

Commit d01f05b

Browse files
william051200bebound
authored andcommitted
{Compute} az vm install-patches: Migrate command to aaz-based implementation (#32763)
1 parent f6baa5c commit d01f05b

File tree

6 files changed

+497
-9
lines changed

6 files changed

+497
-9
lines changed

src/azure-cli/azure/cli/command_modules/vm/_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
from azure.cli.command_modules.monitor.validators import validate_metric_dimension
3131
from azure.cli.command_modules.monitor.actions import get_period_type
32+
from ._vm_utils import RebootSetting, VMGuestPatchClassificationWindows, VMGuestPatchClassificationLinux
3233

3334

3435
# pylint: disable=too-many-statements, too-many-branches, too-many-locals, too-many-lines
@@ -40,7 +41,6 @@ def load_arguments(self, _):
4041
HyperVGenerationTypes = self.get_models('HyperVGenerationTypes')
4142
DedicatedHostLicenseTypes = self.get_models('DedicatedHostLicenseTypes')
4243
OrchestrationServiceNames, OrchestrationServiceStateAction = self.get_models('OrchestrationServiceNames', 'OrchestrationServiceStateAction', operation_group='virtual_machine_scale_sets')
43-
RebootSetting, VMGuestPatchClassificationWindows, VMGuestPatchClassificationLinux = self.get_models('VMGuestPatchRebootSetting', 'VMGuestPatchClassificationWindows', 'VMGuestPatchClassificationLinux')
4444
ReplicationMode = self.get_models('ReplicationMode', operation_group='gallery_image_versions')
4545
DiskControllerTypes = self.get_models('DiskControllerTypes', operation_group='virtual_machines')
4646

src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,29 @@ class IdentityType(Enum):
782782
NONE = 'None'
783783

784784

785+
class RebootSetting(Enum):
786+
ALWAYS = 'Always'
787+
IF_REQUIRED = 'IfRequired'
788+
NEVER = 'Never'
789+
790+
791+
class VMGuestPatchClassificationWindows(Enum):
792+
CRITICAL = 'Critical'
793+
DEFINITION = 'Definition'
794+
FEATURE_PACK = 'FeaturePack'
795+
SECURITY = 'Security'
796+
SERVICE_PACK = 'ServicePack'
797+
TOOLS = 'Tools'
798+
UPDATES = 'Updates'
799+
UPDATE_ROLL_UP = 'UpdateRollUp'
800+
801+
802+
class VMGuestPatchClassificationLinux(Enum):
803+
CRITICAL = 'Critical'
804+
OTHER = 'Other'
805+
SECURITY = 'Security'
806+
807+
785808
class DiskCreateOptionTypes(Enum):
786809
ATTACH = 'Attach'
787810
COPY = 'Copy'

src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from ._deallocate import *
1717
from ._delete import *
1818
from ._generalize import *
19+
from ._install_patches import *
1920
from ._list import *
2021
from ._list_all import *
2122
from ._list_sizes import *

0 commit comments

Comments
 (0)