Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-mgmt-compute] Removing VirtualMachineSizeTypes enum as updating the sizes is not maintainable. #2810

Open
wants to merge 1 commit into
base: release/v3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class ComputeManagementClient(MultiApiClientMixin, SDKClient):
'virtual_machine_scale_set_extensions': '2020-06-01',
'virtual_machine_scale_set_rolling_upgrades': '2020-06-01',
'virtual_machine_scale_set_vm_extensions': '2020-06-01',
'virtual_machine_scale_set_vm_run_commands': '2020-06-01',
'virtual_machine_scale_set_vms': '2020-06-01',
'virtual_machine_scale_sets': '2020-06-01',
'virtual_machine_sizes': '2020-06-01',
Expand Down Expand Up @@ -1043,6 +1044,19 @@ def virtual_machine_scale_set_vm_extensions(self):
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def virtual_machine_scale_set_vm_run_commands(self):
"""Instance depends on the API version:

* 2020-06-01: :class:`VirtualMachineScaleSetVMRunCommandsOperations<azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetVMRunCommandsOperations>`
"""
api_version = self._get_api_version('virtual_machine_scale_set_vm_run_commands')
if api_version == '2020-06-01':
from .v2020_06_01.operations import VirtualMachineScaleSetVMRunCommandsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def virtual_machine_scale_set_vms(self):
"""Instance depends on the API version:
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 @@ -304,6 +308,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 @@ -364,6 +372,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 All @@ -380,7 +389,6 @@
PatchAssessmentState,
PatchOperationStatus,
OperatingSystemTypes,
VirtualMachineSizeTypes,
CachingTypes,
DiskCreateOptionTypes,
StorageAccountTypes,
Expand Down Expand Up @@ -410,6 +418,7 @@
RollingUpgradeActionType,
IntervalInMins,
OrchestrationServiceStateAction,
ExecutionState,
InstanceViewTypes,
)

Expand Down Expand Up @@ -536,6 +545,10 @@
'VirtualMachineInstanceView',
'VirtualMachinePatchStatus',
'VirtualMachineReimageParameters',
'VirtualMachineRunCommand',
'VirtualMachineRunCommandInstanceView',
'VirtualMachineRunCommandScriptSource',
'VirtualMachineRunCommandUpdate',
'VirtualMachineScaleSet',
'VirtualMachineScaleSetDataDisk',
'VirtualMachineScaleSetExtension',
Expand Down Expand Up @@ -601,6 +614,7 @@
'VirtualMachineScaleSetExtensionPaged',
'VirtualMachineScaleSetVMPaged',
'RunCommandDocumentBasePaged',
'VirtualMachineRunCommandPaged',
'VmDiskTypes',
'HyperVGenerationTypes',
'StatusLevelTypes',
Expand All @@ -611,7 +625,6 @@
'PatchAssessmentState',
'PatchOperationStatus',
'OperatingSystemTypes',
'VirtualMachineSizeTypes',
'CachingTypes',
'DiskCreateOptionTypes',
'StorageAccountTypes',
Expand Down Expand Up @@ -641,5 +654,6 @@
'RollingUpgradeActionType',
'IntervalInMins',
'OrchestrationServiceStateAction',
'ExecutionState',
'InstanceViewTypes',
]
Original file line number Diff line number Diff line change
Expand Up @@ -81,176 +81,6 @@ class OperatingSystemTypes(str, Enum):
linux = "Linux"


class VirtualMachineSizeTypes(str, Enum):

basic_a0 = "Basic_A0"
basic_a1 = "Basic_A1"
basic_a2 = "Basic_A2"
basic_a3 = "Basic_A3"
basic_a4 = "Basic_A4"
standard_a0 = "Standard_A0"
standard_a1 = "Standard_A1"
standard_a2 = "Standard_A2"
standard_a3 = "Standard_A3"
standard_a4 = "Standard_A4"
standard_a5 = "Standard_A5"
standard_a6 = "Standard_A6"
standard_a7 = "Standard_A7"
standard_a8 = "Standard_A8"
standard_a9 = "Standard_A9"
standard_a10 = "Standard_A10"
standard_a11 = "Standard_A11"
standard_a1_v2 = "Standard_A1_v2"
standard_a2_v2 = "Standard_A2_v2"
standard_a4_v2 = "Standard_A4_v2"
standard_a8_v2 = "Standard_A8_v2"
standard_a2m_v2 = "Standard_A2m_v2"
standard_a4m_v2 = "Standard_A4m_v2"
standard_a8m_v2 = "Standard_A8m_v2"
standard_b1s = "Standard_B1s"
standard_b1ms = "Standard_B1ms"
standard_b2s = "Standard_B2s"
standard_b2ms = "Standard_B2ms"
standard_b4ms = "Standard_B4ms"
standard_b8ms = "Standard_B8ms"
standard_d1 = "Standard_D1"
standard_d2 = "Standard_D2"
standard_d3 = "Standard_D3"
standard_d4 = "Standard_D4"
standard_d11 = "Standard_D11"
standard_d12 = "Standard_D12"
standard_d13 = "Standard_D13"
standard_d14 = "Standard_D14"
standard_d1_v2 = "Standard_D1_v2"
standard_d2_v2 = "Standard_D2_v2"
standard_d3_v2 = "Standard_D3_v2"
standard_d4_v2 = "Standard_D4_v2"
standard_d5_v2 = "Standard_D5_v2"
standard_d2_v3 = "Standard_D2_v3"
standard_d4_v3 = "Standard_D4_v3"
standard_d8_v3 = "Standard_D8_v3"
standard_d16_v3 = "Standard_D16_v3"
standard_d32_v3 = "Standard_D32_v3"
standard_d64_v3 = "Standard_D64_v3"
standard_d2s_v3 = "Standard_D2s_v3"
standard_d4s_v3 = "Standard_D4s_v3"
standard_d8s_v3 = "Standard_D8s_v3"
standard_d16s_v3 = "Standard_D16s_v3"
standard_d32s_v3 = "Standard_D32s_v3"
standard_d64s_v3 = "Standard_D64s_v3"
standard_d11_v2 = "Standard_D11_v2"
standard_d12_v2 = "Standard_D12_v2"
standard_d13_v2 = "Standard_D13_v2"
standard_d14_v2 = "Standard_D14_v2"
standard_d15_v2 = "Standard_D15_v2"
standard_ds1 = "Standard_DS1"
standard_ds2 = "Standard_DS2"
standard_ds3 = "Standard_DS3"
standard_ds4 = "Standard_DS4"
standard_ds11 = "Standard_DS11"
standard_ds12 = "Standard_DS12"
standard_ds13 = "Standard_DS13"
standard_ds14 = "Standard_DS14"
standard_ds1_v2 = "Standard_DS1_v2"
standard_ds2_v2 = "Standard_DS2_v2"
standard_ds3_v2 = "Standard_DS3_v2"
standard_ds4_v2 = "Standard_DS4_v2"
standard_ds5_v2 = "Standard_DS5_v2"
standard_ds11_v2 = "Standard_DS11_v2"
standard_ds12_v2 = "Standard_DS12_v2"
standard_ds13_v2 = "Standard_DS13_v2"
standard_ds14_v2 = "Standard_DS14_v2"
standard_ds15_v2 = "Standard_DS15_v2"
standard_ds13_4_v2 = "Standard_DS13-4_v2"
standard_ds13_2_v2 = "Standard_DS13-2_v2"
standard_ds14_8_v2 = "Standard_DS14-8_v2"
standard_ds14_4_v2 = "Standard_DS14-4_v2"
standard_e2_v3 = "Standard_E2_v3"
standard_e4_v3 = "Standard_E4_v3"
standard_e8_v3 = "Standard_E8_v3"
standard_e16_v3 = "Standard_E16_v3"
standard_e32_v3 = "Standard_E32_v3"
standard_e64_v3 = "Standard_E64_v3"
standard_e2s_v3 = "Standard_E2s_v3"
standard_e4s_v3 = "Standard_E4s_v3"
standard_e8s_v3 = "Standard_E8s_v3"
standard_e16s_v3 = "Standard_E16s_v3"
standard_e32s_v3 = "Standard_E32s_v3"
standard_e64s_v3 = "Standard_E64s_v3"
standard_e32_16_v3 = "Standard_E32-16_v3"
standard_e32_8s_v3 = "Standard_E32-8s_v3"
standard_e64_32s_v3 = "Standard_E64-32s_v3"
standard_e64_16s_v3 = "Standard_E64-16s_v3"
standard_f1 = "Standard_F1"
standard_f2 = "Standard_F2"
standard_f4 = "Standard_F4"
standard_f8 = "Standard_F8"
standard_f16 = "Standard_F16"
standard_f1s = "Standard_F1s"
standard_f2s = "Standard_F2s"
standard_f4s = "Standard_F4s"
standard_f8s = "Standard_F8s"
standard_f16s = "Standard_F16s"
standard_f2s_v2 = "Standard_F2s_v2"
standard_f4s_v2 = "Standard_F4s_v2"
standard_f8s_v2 = "Standard_F8s_v2"
standard_f16s_v2 = "Standard_F16s_v2"
standard_f32s_v2 = "Standard_F32s_v2"
standard_f64s_v2 = "Standard_F64s_v2"
standard_f72s_v2 = "Standard_F72s_v2"
standard_g1 = "Standard_G1"
standard_g2 = "Standard_G2"
standard_g3 = "Standard_G3"
standard_g4 = "Standard_G4"
standard_g5 = "Standard_G5"
standard_gs1 = "Standard_GS1"
standard_gs2 = "Standard_GS2"
standard_gs3 = "Standard_GS3"
standard_gs4 = "Standard_GS4"
standard_gs5 = "Standard_GS5"
standard_gs4_8 = "Standard_GS4-8"
standard_gs4_4 = "Standard_GS4-4"
standard_gs5_16 = "Standard_GS5-16"
standard_gs5_8 = "Standard_GS5-8"
standard_h8 = "Standard_H8"
standard_h16 = "Standard_H16"
standard_h8m = "Standard_H8m"
standard_h16m = "Standard_H16m"
standard_h16r = "Standard_H16r"
standard_h16mr = "Standard_H16mr"
standard_l4s = "Standard_L4s"
standard_l8s = "Standard_L8s"
standard_l16s = "Standard_L16s"
standard_l32s = "Standard_L32s"
standard_m64s = "Standard_M64s"
standard_m64ms = "Standard_M64ms"
standard_m128s = "Standard_M128s"
standard_m128ms = "Standard_M128ms"
standard_m64_32ms = "Standard_M64-32ms"
standard_m64_16ms = "Standard_M64-16ms"
standard_m128_64ms = "Standard_M128-64ms"
standard_m128_32ms = "Standard_M128-32ms"
standard_nc6 = "Standard_NC6"
standard_nc12 = "Standard_NC12"
standard_nc24 = "Standard_NC24"
standard_nc24r = "Standard_NC24r"
standard_nc6s_v2 = "Standard_NC6s_v2"
standard_nc12s_v2 = "Standard_NC12s_v2"
standard_nc24s_v2 = "Standard_NC24s_v2"
standard_nc24rs_v2 = "Standard_NC24rs_v2"
standard_nc6s_v3 = "Standard_NC6s_v3"
standard_nc12s_v3 = "Standard_NC12s_v3"
standard_nc24s_v3 = "Standard_NC24s_v3"
standard_nc24rs_v3 = "Standard_NC24rs_v3"
standard_nd6s = "Standard_ND6s"
standard_nd12s = "Standard_ND12s"
standard_nd24s = "Standard_ND24s"
standard_nd24rs = "Standard_ND24rs"
standard_nv6 = "Standard_NV6"
standard_nv12 = "Standard_NV12"
standard_nv24 = "Standard_NV24"


class CachingTypes(str, Enum):

none = "None"
Expand Down Expand Up @@ -444,6 +274,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