Skip to content
Closed
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 @@ -54,7 +54,7 @@ class ComputeManagementClient(MultiApiClientMixin, SDKClient):
'availability_sets': '2019-03-01',
'dedicated_host_groups': '2019-03-01',
'dedicated_hosts': '2019-03-01',
'disks': '2019-03-01',
'disks': '2018-09-30',
'galleries': '2019-03-01',
'gallery_application_versions': '2019-03-01',
'gallery_applications': '2019-03-01',
Expand All @@ -64,7 +64,7 @@ class ComputeManagementClient(MultiApiClientMixin, SDKClient):
'log_analytics': '2019-03-01',
'operations': '2019-03-01',
'proximity_placement_groups': '2019-03-01',
'snapshots': '2019-03-01',
'snapshots': '2018-09-30',
'usage': '2019-03-01',
'virtual_machine_extension_images': '2019-03-01',
'virtual_machine_extensions': '2019-03-01',
Expand Down Expand Up @@ -220,7 +220,6 @@ def disks(self):
* 2018-04-01: :class:`DisksOperations<azure.mgmt.compute.v2018_04_01.operations.DisksOperations>`
* 2018-06-01: :class:`DisksOperations<azure.mgmt.compute.v2018_06_01.operations.DisksOperations>`
* 2018-09-30: :class:`DisksOperations<azure.mgmt.compute.v2018_09_30.operations.DisksOperations>`
* 2019-03-01: :class:`DisksOperations<azure.mgmt.compute.v2019_03_01.operations.DisksOperations>`
"""
api_version = self._get_api_version('disks')
if api_version == '2016-04-30-preview':
Expand All @@ -233,8 +232,6 @@ def disks(self):
from .v2018_06_01.operations import DisksOperations as OperationClass
elif api_version == '2018-09-30':
from .v2018_09_30.operations import DisksOperations as OperationClass
elif api_version == '2019-03-01':
from .v2019_03_01.operations import DisksOperations 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)))
Expand Down Expand Up @@ -444,7 +441,6 @@ def snapshots(self):
* 2018-04-01: :class:`SnapshotsOperations<azure.mgmt.compute.v2018_04_01.operations.SnapshotsOperations>`
* 2018-06-01: :class:`SnapshotsOperations<azure.mgmt.compute.v2018_06_01.operations.SnapshotsOperations>`
* 2018-09-30: :class:`SnapshotsOperations<azure.mgmt.compute.v2018_09_30.operations.SnapshotsOperations>`
* 2019-03-01: :class:`SnapshotsOperations<azure.mgmt.compute.v2019_03_01.operations.SnapshotsOperations>`
"""
api_version = self._get_api_version('snapshots')
if api_version == '2016-04-30-preview':
Expand All @@ -457,8 +453,6 @@ def snapshots(self):
from .v2018_06_01.operations import SnapshotsOperations as OperationClass
elif api_version == '2018-09-30':
from .v2018_09_30.operations import SnapshotsOperations as OperationClass
elif api_version == '2019-03-01':
from .v2019_03_01.operations import SnapshotsOperations 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)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ class ComputeManagementClientConfiguration(AzureConfiguration):
Microsoft Azure subscription. The subscription ID forms part of the URI
for every service call.
:type subscription_id: str
:param filter: The filter to apply on the operation.
:type filter: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):
self, credentials, subscription_id, filter=None, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
Expand All @@ -48,3 +50,4 @@ def __init__(

self.credentials = credentials
self.subscription_id = subscription_id
self.filter = filter
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .v2018_09_30.models import *
from .v2019_03_01.models import *
from .v2019_04_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
from .operations import GalleryImageVersionsOperations
from .operations import GalleryApplicationsOperations
from .operations import GalleryApplicationVersionsOperations
from .operations import DisksOperations
from .operations import SnapshotsOperations
from . import models


Expand Down Expand Up @@ -93,10 +91,6 @@ class ComputeManagementClient(SDKClient):
:vartype gallery_applications: azure.mgmt.compute.v2019_03_01.operations.GalleryApplicationsOperations
:ivar gallery_application_versions: GalleryApplicationVersions operations
:vartype gallery_application_versions: azure.mgmt.compute.v2019_03_01.operations.GalleryApplicationVersionsOperations
:ivar disks: Disks operations
:vartype disks: azure.mgmt.compute.v2019_03_01.operations.DisksOperations
:ivar snapshots: Snapshots operations
:vartype snapshots: azure.mgmt.compute.v2019_03_01.operations.SnapshotsOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -165,7 +159,3 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.gallery_application_versions = GalleryApplicationVersionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.disks = DisksOperations(
self._client, self.config, self._serialize, self._deserialize)
self.snapshots = SnapshotsOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# --------------------------------------------------------------------------

try:
from ._models_py3 import AccessUri
from ._models_py3 import AdditionalCapabilities
from ._models_py3 import AdditionalUnattendContent
from ._models_py3 import ApiEntityReference
Expand All @@ -24,7 +23,6 @@
from ._models_py3 import BootDiagnostics
from ._models_py3 import BootDiagnosticsInstanceView
from ._models_py3 import ComputeOperationValue
from ._models_py3 import CreationData
from ._models_py3 import DataDisk
from ._models_py3 import DataDiskImage
from ._models_py3 import DedicatedHost
Expand All @@ -37,13 +35,8 @@
from ._models_py3 import DiagnosticsProfile
from ._models_py3 import DiffDiskSettings
from ._models_py3 import Disallowed
from ._models_py3 import Disk
from ._models_py3 import DiskEncryptionSettings
from ._models_py3 import DiskInstanceView
from ._models_py3 import DiskSku
from ._models_py3 import DiskUpdate
from ._models_py3 import EncryptionSettingsCollection
from ._models_py3 import EncryptionSettingsElement
from ._models_py3 import Gallery
from ._models_py3 import GalleryApplication
from ._models_py3 import GalleryApplicationVersion
Expand All @@ -59,20 +52,16 @@
from ._models_py3 import GalleryImageVersionPublishingProfile
from ._models_py3 import GalleryImageVersionStorageProfile
from ._models_py3 import GalleryOSDiskImage
from ._models_py3 import GrantAccessData
from ._models_py3 import HardwareProfile
from ._models_py3 import Image
from ._models_py3 import ImageDataDisk
from ._models_py3 import ImageDiskReference
from ._models_py3 import ImageOSDisk
from ._models_py3 import ImagePurchasePlan
from ._models_py3 import ImageReference
from ._models_py3 import ImageStorageProfile
from ._models_py3 import ImageUpdate
from ._models_py3 import InnerError
from ._models_py3 import InstanceViewStatus
from ._models_py3 import KeyVaultAndKeyReference
from ._models_py3 import KeyVaultAndSecretReference
from ._models_py3 import KeyVaultKeyReference
from ._models_py3 import KeyVaultSecretReference
from ._models_py3 import LinuxConfiguration
Expand Down Expand Up @@ -112,10 +101,6 @@
from ._models_py3 import ScaleInPolicy
from ._models_py3 import ScheduledEventsProfile
from ._models_py3 import Sku
from ._models_py3 import Snapshot
from ._models_py3 import SnapshotSku
from ._models_py3 import SnapshotUpdate
from ._models_py3 import SourceVault
from ._models_py3 import SshConfiguration
from ._models_py3 import SshPublicKey
from ._models_py3 import StorageProfile
Expand Down Expand Up @@ -200,7 +185,6 @@
from ._models_py3 import WinRMConfiguration
from ._models_py3 import WinRMListener
except (SyntaxError, ImportError):
from ._models import AccessUri
from ._models import AdditionalCapabilities
from ._models import AdditionalUnattendContent
from ._models import ApiEntityReference
Expand All @@ -214,7 +198,6 @@
from ._models import BootDiagnostics
from ._models import BootDiagnosticsInstanceView
from ._models import ComputeOperationValue
from ._models import CreationData
from ._models import DataDisk
from ._models import DataDiskImage
from ._models import DedicatedHost
Expand All @@ -227,13 +210,8 @@
from ._models import DiagnosticsProfile
from ._models import DiffDiskSettings
from ._models import Disallowed
from ._models import Disk
from ._models import DiskEncryptionSettings
from ._models import DiskInstanceView
from ._models import DiskSku
from ._models import DiskUpdate
from ._models import EncryptionSettingsCollection
from ._models import EncryptionSettingsElement
from ._models import Gallery
from ._models import GalleryApplication
from ._models import GalleryApplicationVersion
Expand All @@ -249,20 +227,16 @@
from ._models import GalleryImageVersionPublishingProfile
from ._models import GalleryImageVersionStorageProfile
from ._models import GalleryOSDiskImage
from ._models import GrantAccessData
from ._models import HardwareProfile
from ._models import Image
from ._models import ImageDataDisk
from ._models import ImageDiskReference
from ._models import ImageOSDisk
from ._models import ImagePurchasePlan
from ._models import ImageReference
from ._models import ImageStorageProfile
from ._models import ImageUpdate
from ._models import InnerError
from ._models import InstanceViewStatus
from ._models import KeyVaultAndKeyReference
from ._models import KeyVaultAndSecretReference
from ._models import KeyVaultKeyReference
from ._models import KeyVaultSecretReference
from ._models import LinuxConfiguration
Expand Down Expand Up @@ -302,10 +276,6 @@
from ._models import ScaleInPolicy
from ._models import ScheduledEventsProfile
from ._models import Sku
from ._models import Snapshot
from ._models import SnapshotSku
from ._models import SnapshotUpdate
from ._models import SourceVault
from ._models import SshConfiguration
from ._models import SshPublicKey
from ._models import StorageProfile
Expand Down Expand Up @@ -393,7 +363,6 @@
from ._paged_models import ComputeOperationValuePaged
from ._paged_models import DedicatedHostGroupPaged
from ._paged_models import DedicatedHostPaged
from ._paged_models import DiskPaged
from ._paged_models import GalleryApplicationPaged
from ._paged_models import GalleryApplicationVersionPaged
from ._paged_models import GalleryImagePaged
Expand All @@ -402,7 +371,6 @@
from ._paged_models import ImagePaged
from ._paged_models import ProximityPlacementGroupPaged
from ._paged_models import RunCommandDocumentBasePaged
from ._paged_models import SnapshotPaged
from ._paged_models import UpgradeOperationHistoricalStatusInfoPaged
from ._paged_models import UsagePaged
from ._paged_models import VirtualMachinePaged
Expand Down Expand Up @@ -446,18 +414,11 @@
ReplicationState,
StorageAccountType,
HostCaching,
DiskStorageAccountTypes,
HyperVGeneration,
DiskCreateOption,
DiskState,
SnapshotStorageAccountTypes,
AccessLevel,
InstanceViewTypes,
ReplicationStatusTypes,
)

__all__ = [
'AccessUri',
'AdditionalCapabilities',
'AdditionalUnattendContent',
'ApiEntityReference',
Expand All @@ -471,7 +432,6 @@
'BootDiagnostics',
'BootDiagnosticsInstanceView',
'ComputeOperationValue',
'CreationData',
'DataDisk',
'DataDiskImage',
'DedicatedHost',
Expand All @@ -484,13 +444,8 @@
'DiagnosticsProfile',
'DiffDiskSettings',
'Disallowed',
'Disk',
'DiskEncryptionSettings',
'DiskInstanceView',
'DiskSku',
'DiskUpdate',
'EncryptionSettingsCollection',
'EncryptionSettingsElement',
'Gallery',
'GalleryApplication',
'GalleryApplicationVersion',
Expand All @@ -506,20 +461,16 @@
'GalleryImageVersionPublishingProfile',
'GalleryImageVersionStorageProfile',
'GalleryOSDiskImage',
'GrantAccessData',
'HardwareProfile',
'Image',
'ImageDataDisk',
'ImageDiskReference',
'ImageOSDisk',
'ImagePurchasePlan',
'ImageReference',
'ImageStorageProfile',
'ImageUpdate',
'InnerError',
'InstanceViewStatus',
'KeyVaultAndKeyReference',
'KeyVaultAndSecretReference',
'KeyVaultKeyReference',
'KeyVaultSecretReference',
'LinuxConfiguration',
Expand Down Expand Up @@ -559,10 +510,6 @@
'ScaleInPolicy',
'ScheduledEventsProfile',
'Sku',
'Snapshot',
'SnapshotSku',
'SnapshotUpdate',
'SourceVault',
'SshConfiguration',
'SshPublicKey',
'StorageProfile',
Expand Down Expand Up @@ -666,8 +613,6 @@
'GalleryImageVersionPaged',
'GalleryApplicationPaged',
'GalleryApplicationVersionPaged',
'DiskPaged',
'SnapshotPaged',
'HyperVGenerationTypes',
'StatusLevelTypes',
'AvailabilitySetSkuTypes',
Expand Down Expand Up @@ -702,12 +647,6 @@
'ReplicationState',
'StorageAccountType',
'HostCaching',
'DiskStorageAccountTypes',
'HyperVGeneration',
'DiskCreateOption',
'DiskState',
'SnapshotStorageAccountTypes',
'AccessLevel',
'InstanceViewTypes',
'ReplicationStatusTypes',
]
Original file line number Diff line number Diff line change
Expand Up @@ -401,55 +401,6 @@ class HostCaching(str, Enum):
read_write = "ReadWrite"


class DiskStorageAccountTypes(str, Enum):

standard_lrs = "Standard_LRS" #: Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access.
premium_lrs = "Premium_LRS" #: Premium SSD locally redundant storage. Best for production and performance sensitive workloads.
standard_ssd_lrs = "StandardSSD_LRS" #: Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev/test.
ultra_ssd_lrs = "UltraSSD_LRS" #: Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top tier databases (for example, SQL, Oracle), and other transaction-heavy workloads.


class HyperVGeneration(str, Enum):

v1 = "V1"
v2 = "V2"


class DiskCreateOption(str, Enum):

empty = "Empty" #: Create an empty data disk of a size given by diskSizeGB.
attach = "Attach" #: Disk will be attached to a VM.
from_image = "FromImage" #: Create a new disk from a platform image specified by the given imageReference.
import_enum = "Import" #: Create a disk by importing from a blob specified by a sourceUri in a storage account specified by storageAccountId.
copy = "Copy" #: Create a new disk or snapshot by copying from a disk or snapshot specified by the given sourceResourceId.
restore = "Restore" #: Create a new disk by copying from a backup recovery point.
upload = "Upload" #: Create a new disk by obtaining a write token and using it to directly upload the contents of the disk.


class DiskState(str, Enum):

unattached = "Unattached" #: The disk is not being used and can be attached to a VM.
attached = "Attached" #: The disk is currently mounted to a running VM.
reserved = "Reserved" #: The disk is mounted to a stopped-deallocated VM
active_sas = "ActiveSAS" #: The disk currently has an Active SAS Uri associated with it.
ready_to_upload = "ReadyToUpload" #: A disk is ready to be created by upload by requesting a write token.
active_upload = "ActiveUpload" #: A disk is created for upload and a write token has been issued for uploading to it.


class SnapshotStorageAccountTypes(str, Enum):

standard_lrs = "Standard_LRS" #: Standard HDD locally redundant storage
premium_lrs = "Premium_LRS" #: Premium SSD locally redundant storage
standard_zrs = "Standard_ZRS" #: Standard zone redundant storage


class AccessLevel(str, Enum):

none = "None"
read = "Read"
write = "Write"


class InstanceViewTypes(str, Enum):

instance_view = "instanceView"
Expand Down
Loading