Skip to content

Commit

Permalink
CodeGen from PR 11704 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Microsoft.Compute: Include CloudServices Resource Swagger under API Version 2020-10-01-preview (Azure#11704)

Co-authored-by: Sanchit Kumar <Sanchit.Kumar@microsoft.com>
  • Loading branch information
SDKAuto and Sanchit Kumar committed Nov 20, 2020
1 parent b94a7a9 commit 302692d
Show file tree
Hide file tree
Showing 19 changed files with 2,077 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,9 @@ def _perform_maintenance_initial(

def perform_maintenance(
self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config):
"""Performs maintenance on a virtual machine in a VM scale set.
"""Shuts down the virtual machine in a VMScaleSet, moves it to an already
updated node, and powers it back on during the self-service phase of
planned maintenance.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,12 @@ def convert_to_managed_disks(
self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Converts virtual machine disks from blob-based to managed disks.
Virtual machine must be stop-deallocated before invoking this
operation.
operation. <br>For Windows, please refer to [Convert a virtual machine
from unmanaged disks to managed
disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks).<br>For
Linux, please refer to [Convert a virtual machine from unmanaged disks
to managed
disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/convert-unmanaged-to-managed-disks).
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down Expand Up @@ -1614,7 +1619,9 @@ def _perform_maintenance_initial(

def perform_maintenance(
self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""The operation to perform maintenance on a virtual machine.
"""Shuts down the virtual machine, moves it to an already updated node,
and powers it back on during the self-service phase of planned
maintenance.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,9 @@ def _perform_maintenance_initial(

def perform_maintenance(
self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config):
"""Performs maintenance on a virtual machine in a VM scale set.
"""Shuts down the virtual machine in a VMScaleSet, moves it to an already
updated node, and powers it back on during the self-service phase of
planned maintenance.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,12 @@ def convert_to_managed_disks(
self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Converts virtual machine disks from blob-based to managed disks.
Virtual machine must be stop-deallocated before invoking this
operation.
operation. <br>For Windows, please refer to [Convert a virtual machine
from unmanaged disks to managed
disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks).<br>For
Linux, please refer to [Convert a virtual machine from unmanaged disks
to managed
disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/convert-unmanaged-to-managed-disks).
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down Expand Up @@ -1614,7 +1619,9 @@ def _perform_maintenance_initial(

def perform_maintenance(
self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""The operation to perform maintenance on a virtual machine.
"""Shuts down the virtual machine, moves it to an already updated node,
and powers it back on during the self-service phase of planned
maintenance.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from .operations import VirtualMachineScaleSetVMsOperations
from .operations import LogAnalyticsOperations
from .operations import VirtualMachineRunCommandsOperations
from .operations import VirtualMachineScaleSetVMRunCommandsOperations
from . import models


Expand Down Expand Up @@ -82,6 +83,8 @@ class ComputeManagementClient(SDKClient):
:vartype log_analytics: azure.mgmt.compute.v2020_06_01.operations.LogAnalyticsOperations
:ivar virtual_machine_run_commands: VirtualMachineRunCommands operations
:vartype virtual_machine_run_commands: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineRunCommandsOperations
:ivar virtual_machine_scale_set_vm_run_commands: VirtualMachineScaleSetVMRunCommands operations
:vartype virtual_machine_scale_set_vm_run_commands: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetVMRunCommandsOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -144,3 +147,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.virtual_machine_scale_set_vm_run_commands = VirtualMachineScaleSetVMRunCommandsOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@
from ._models_py3 import VirtualMachineInstanceView
from ._models_py3 import VirtualMachinePatchStatus
from ._models_py3 import VirtualMachineReimageParameters
from ._models_py3 import VirtualMachineRunCommand
from ._models_py3 import VirtualMachineRunCommandInstanceView
from ._models_py3 import VirtualMachineRunCommandScriptSource
from ._models_py3 import VirtualMachineRunCommandUpdate
from ._models_py3 import VirtualMachineScaleSet
from ._models_py3 import VirtualMachineScaleSetDataDisk
from ._models_py3 import VirtualMachineScaleSetExtension
Expand Down Expand Up @@ -165,7 +169,10 @@
from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile
from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile
from ._models_py3 import VirtualMachineScaleSetVM
from ._models_py3 import VirtualMachineScaleSetVMExtension
from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult
from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary
from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate
from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs
from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs
from ._models_py3 import VirtualMachineScaleSetVMInstanceView
Expand Down Expand Up @@ -304,6 +311,10 @@
from ._models import VirtualMachineInstanceView
from ._models import VirtualMachinePatchStatus
from ._models import VirtualMachineReimageParameters
from ._models import VirtualMachineRunCommand
from ._models import VirtualMachineRunCommandInstanceView
from ._models import VirtualMachineRunCommandScriptSource
from ._models import VirtualMachineRunCommandUpdate
from ._models import VirtualMachineScaleSet
from ._models import VirtualMachineScaleSetDataDisk
from ._models import VirtualMachineScaleSetExtension
Expand Down Expand Up @@ -337,7 +348,10 @@
from ._models import VirtualMachineScaleSetUpdateStorageProfile
from ._models import VirtualMachineScaleSetUpdateVMProfile
from ._models import VirtualMachineScaleSetVM
from ._models import VirtualMachineScaleSetVMExtension
from ._models import VirtualMachineScaleSetVMExtensionsListResult
from ._models import VirtualMachineScaleSetVMExtensionsSummary
from ._models import VirtualMachineScaleSetVMExtensionUpdate
from ._models import VirtualMachineScaleSetVMInstanceIDs
from ._models import VirtualMachineScaleSetVMInstanceRequiredIDs
from ._models import VirtualMachineScaleSetVMInstanceView
Expand All @@ -364,6 +378,7 @@
from ._paged_models import UpgradeOperationHistoricalStatusInfoPaged
from ._paged_models import UsagePaged
from ._paged_models import VirtualMachinePaged
from ._paged_models import VirtualMachineRunCommandPaged
from ._paged_models import VirtualMachineScaleSetExtensionPaged
from ._paged_models import VirtualMachineScaleSetPaged
from ._paged_models import VirtualMachineScaleSetSkuPaged
Expand Down Expand Up @@ -410,6 +425,7 @@
RollingUpgradeActionType,
IntervalInMins,
OrchestrationServiceStateAction,
ExecutionState,
InstanceViewTypes,
)

Expand Down Expand Up @@ -536,6 +552,10 @@
'VirtualMachineInstanceView',
'VirtualMachinePatchStatus',
'VirtualMachineReimageParameters',
'VirtualMachineRunCommand',
'VirtualMachineRunCommandInstanceView',
'VirtualMachineRunCommandScriptSource',
'VirtualMachineRunCommandUpdate',
'VirtualMachineScaleSet',
'VirtualMachineScaleSetDataDisk',
'VirtualMachineScaleSetExtension',
Expand Down Expand Up @@ -569,7 +589,10 @@
'VirtualMachineScaleSetUpdateStorageProfile',
'VirtualMachineScaleSetUpdateVMProfile',
'VirtualMachineScaleSetVM',
'VirtualMachineScaleSetVMExtension',
'VirtualMachineScaleSetVMExtensionsListResult',
'VirtualMachineScaleSetVMExtensionsSummary',
'VirtualMachineScaleSetVMExtensionUpdate',
'VirtualMachineScaleSetVMInstanceIDs',
'VirtualMachineScaleSetVMInstanceRequiredIDs',
'VirtualMachineScaleSetVMInstanceView',
Expand Down Expand Up @@ -601,6 +624,7 @@
'VirtualMachineScaleSetExtensionPaged',
'VirtualMachineScaleSetVMPaged',
'RunCommandDocumentBasePaged',
'VirtualMachineRunCommandPaged',
'VmDiskTypes',
'HyperVGenerationTypes',
'StatusLevelTypes',
Expand Down Expand Up @@ -641,5 +665,6 @@
'RollingUpgradeActionType',
'IntervalInMins',
'OrchestrationServiceStateAction',
'ExecutionState',
'InstanceViewTypes',
]
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,17 @@ class OrchestrationServiceStateAction(str, Enum):
suspend = "Suspend"


class ExecutionState(str, Enum):

unknown = "Unknown"
pending = "Pending"
running = "Running"
failed = "Failed"
succeeded = "Succeeded"
timed_out = "TimedOut"
canceled = "Canceled"


class InstanceViewTypes(str, Enum):

instance_view = "instanceView"
Loading

0 comments on commit 302692d

Please sign in to comment.