Skip to content

Commit

Permalink
[AutoPR compute/resource-manager] Swagger spec for disk.json 2018-06 (#…
Browse files Browse the repository at this point in the history
…3310)

* Generated from f128ff0876f538e2cba5b92988bc54b3c041b623

Update readme.md

* Packaging update of azure-mgmt-compute

* Change default API

* Generated from c5cdad53036869893fca1fc5c7658a1dd85e3e59

deleting duplicates

* Fix tests
  • Loading branch information
AutorestCI authored Sep 12, 2018
1 parent d29f7a7 commit 9f154e6
Show file tree
Hide file tree
Showing 66 changed files with 3,697 additions and 583 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ class ComputeManagementClient(MultiApiClientMixin, SDKClient):
_PROFILE_TAG = "azure.mgmt.compute.ComputeManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
'disks': '2018-04-01',
'resource_skus': '2017-09-01',
'snapshots': '2018-04-01',
None: DEFAULT_API_VERSION
}},
_PROFILE_TAG + " latest"
Expand Down Expand Up @@ -145,7 +143,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
from .v2018_06_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
def availability_sets(self):
"""Instance depends on the API version:
Expand Down Expand Up @@ -184,6 +182,7 @@ def disks(self):
* 2016-04-30-preview: :class:`DisksOperations<azure.mgmt.compute.v2016_04_30_preview.operations.DisksOperations>`
* 2017-03-30: :class:`DisksOperations<azure.mgmt.compute.v2017_03_30.operations.DisksOperations>`
* 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>`
"""
api_version = self._get_api_version('disks')
if api_version == '2016-04-30-preview':
Expand All @@ -192,6 +191,8 @@ def disks(self):
from .v2017_03_30.operations import DisksOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import DisksOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_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 @@ -321,6 +322,7 @@ def snapshots(self):
* 2016-04-30-preview: :class:`SnapshotsOperations<azure.mgmt.compute.v2016_04_30_preview.operations.SnapshotsOperations>`
* 2017-03-30: :class:`SnapshotsOperations<azure.mgmt.compute.v2017_03_30.operations.SnapshotsOperations>`
* 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>`
"""
api_version = self._get_api_version('snapshots')
if api_version == '2016-04-30-preview':
Expand All @@ -329,6 +331,8 @@ def snapshots(self):
from .v2017_03_30.operations import SnapshotsOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import SnapshotsOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_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
1 change: 0 additions & 1 deletion azure-mgmt-compute/azure/mgmt/compute/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import warnings

from .v2017_09_01.models import *
from .v2018_04_01.models import *
from .v2018_06_01.models import * # Note that this line is overriding some models of 2018-04-01. See link below for details.

warnings.warn("Import models from this file is deprecated. See https://aka.ms/pysdkmodels",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
from .operations.galleries_operations import GalleriesOperations
from .operations.gallery_images_operations import GalleryImagesOperations
from .operations.gallery_image_versions_operations import GalleryImageVersionsOperations
from .operations.disks_operations import DisksOperations
from .operations.snapshots_operations import SnapshotsOperations
from . import models


Expand Down Expand Up @@ -110,6 +112,10 @@ class ComputeManagementClient(SDKClient):
:vartype gallery_images: azure.mgmt.compute.v2018_06_01.operations.GalleryImagesOperations
:ivar gallery_image_versions: GalleryImageVersions operations
:vartype gallery_image_versions: azure.mgmt.compute.v2018_06_01.operations.GalleryImageVersionsOperations
:ivar disks: Disks operations
:vartype disks: azure.mgmt.compute.v2018_06_01.operations.DisksOperations
:ivar snapshots: Snapshots operations
:vartype snapshots: azure.mgmt.compute.v2018_06_01.operations.SnapshotsOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -168,3 +174,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.gallery_image_versions = GalleryImageVersionsOperations(
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 @@ -42,6 +42,7 @@
from .os_disk_py3 import OSDisk
from .data_disk_py3 import DataDisk
from .storage_profile_py3 import StorageProfile
from .additional_capabilities_py3 import AdditionalCapabilities
from .additional_unattend_content_py3 import AdditionalUnattendContent
from .win_rm_listener_py3 import WinRMListener
from .win_rm_configuration_py3 import WinRMConfiguration
Expand Down Expand Up @@ -158,6 +159,20 @@
from .gallery_artifact_source_py3 import GalleryArtifactSource
from .gallery_artifact_publishing_profile_base_py3 import GalleryArtifactPublishingProfileBase
from .gallery_disk_image_py3 import GalleryDiskImage
from .disk_sku_py3 import DiskSku
from .image_disk_reference_py3 import ImageDiskReference
from .creation_data_py3 import CreationData
from .source_vault_py3 import SourceVault
from .key_vault_and_secret_reference_py3 import KeyVaultAndSecretReference
from .key_vault_and_key_reference_py3 import KeyVaultAndKeyReference
from .encryption_settings_py3 import EncryptionSettings
from .disk_py3 import Disk
from .disk_update_py3 import DiskUpdate
from .snapshot_sku_py3 import SnapshotSku
from .grant_access_data_py3 import GrantAccessData
from .access_uri_py3 import AccessUri
from .snapshot_py3 import Snapshot
from .snapshot_update_py3 import SnapshotUpdate
except (SyntaxError, ImportError):
from .compute_operation_value import ComputeOperationValue
from .instance_view_status import InstanceViewStatus
Expand Down Expand Up @@ -191,6 +206,7 @@
from .os_disk import OSDisk
from .data_disk import DataDisk
from .storage_profile import StorageProfile
from .additional_capabilities import AdditionalCapabilities
from .additional_unattend_content import AdditionalUnattendContent
from .win_rm_listener import WinRMListener
from .win_rm_configuration import WinRMConfiguration
Expand Down Expand Up @@ -307,6 +323,20 @@
from .gallery_artifact_source import GalleryArtifactSource
from .gallery_artifact_publishing_profile_base import GalleryArtifactPublishingProfileBase
from .gallery_disk_image import GalleryDiskImage
from .disk_sku import DiskSku
from .image_disk_reference import ImageDiskReference
from .creation_data import CreationData
from .source_vault import SourceVault
from .key_vault_and_secret_reference import KeyVaultAndSecretReference
from .key_vault_and_key_reference import KeyVaultAndKeyReference
from .encryption_settings import EncryptionSettings
from .disk import Disk
from .disk_update import DiskUpdate
from .snapshot_sku import SnapshotSku
from .grant_access_data import GrantAccessData
from .access_uri import AccessUri
from .snapshot import Snapshot
from .snapshot_update import SnapshotUpdate
from .compute_operation_value_paged import ComputeOperationValuePaged
from .availability_set_paged import AvailabilitySetPaged
from .virtual_machine_size_paged import VirtualMachineSizePaged
Expand All @@ -322,6 +352,8 @@
from .gallery_paged import GalleryPaged
from .gallery_image_paged import GalleryImagePaged
from .gallery_image_version_paged import GalleryImageVersionPaged
from .disk_paged import DiskPaged
from .snapshot_paged import SnapshotPaged
from .compute_management_client_enums import (
StatusLevelTypes,
OperatingSystemTypes,
Expand Down Expand Up @@ -349,6 +381,10 @@
AggregatedReplicationState,
ReplicationState,
HostCaching,
DiskStorageAccountTypes,
DiskCreateOption,
SnapshotStorageAccountTypes,
AccessLevel,
InstanceViewTypes,
ReplicationStatusTypes,
)
Expand Down Expand Up @@ -386,6 +422,7 @@
'OSDisk',
'DataDisk',
'StorageProfile',
'AdditionalCapabilities',
'AdditionalUnattendContent',
'WinRMListener',
'WinRMConfiguration',
Expand Down Expand Up @@ -502,6 +539,20 @@
'GalleryArtifactSource',
'GalleryArtifactPublishingProfileBase',
'GalleryDiskImage',
'DiskSku',
'ImageDiskReference',
'CreationData',
'SourceVault',
'KeyVaultAndSecretReference',
'KeyVaultAndKeyReference',
'EncryptionSettings',
'Disk',
'DiskUpdate',
'SnapshotSku',
'GrantAccessData',
'AccessUri',
'Snapshot',
'SnapshotUpdate',
'ComputeOperationValuePaged',
'AvailabilitySetPaged',
'VirtualMachineSizePaged',
Expand All @@ -517,6 +568,8 @@
'GalleryPaged',
'GalleryImagePaged',
'GalleryImageVersionPaged',
'DiskPaged',
'SnapshotPaged',
'StatusLevelTypes',
'OperatingSystemTypes',
'VirtualMachineSizeTypes',
Expand All @@ -543,6 +596,10 @@
'AggregatedReplicationState',
'ReplicationState',
'HostCaching',
'DiskStorageAccountTypes',
'DiskCreateOption',
'SnapshotStorageAccountTypes',
'AccessLevel',
'InstanceViewTypes',
'ReplicationStatusTypes',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AccessUri(Model):
"""A disk access SAS uri.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar access_sas: A SAS uri for accessing a disk.
:vartype access_sas: str
"""

_validation = {
'access_sas': {'readonly': True},
}

_attribute_map = {
'access_sas': {'key': 'accessSAS', 'type': 'str'},
}

def __init__(self, **kwargs):
super(AccessUri, self).__init__(**kwargs)
self.access_sas = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AccessUri(Model):
"""A disk access SAS uri.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar access_sas: A SAS uri for accessing a disk.
:vartype access_sas: str
"""

_validation = {
'access_sas': {'readonly': True},
}

_attribute_map = {
'access_sas': {'key': 'accessSAS', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(AccessUri, self).__init__(**kwargs)
self.access_sas = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AdditionalCapabilities(Model):
"""Enables or disables a capability on the virtual machine or virtual machine
scale set.
:param ultra_ssd_enabled: Enables or disables a capability to have 1 or
more managed data disks with UltraSSD_LRS storage account on the VM or
VMSS. Managed disks with storage account type UltraSSD_LRS can be added to
a virtual machine or virtual machine scale set only if this property is
enabled.
:type ultra_ssd_enabled: bool
"""

_attribute_map = {
'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(AdditionalCapabilities, self).__init__(**kwargs)
self.ultra_ssd_enabled = kwargs.get('ultra_ssd_enabled', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AdditionalCapabilities(Model):
"""Enables or disables a capability on the virtual machine or virtual machine
scale set.
:param ultra_ssd_enabled: Enables or disables a capability to have 1 or
more managed data disks with UltraSSD_LRS storage account on the VM or
VMSS. Managed disks with storage account type UltraSSD_LRS can be added to
a virtual machine or virtual machine scale set only if this property is
enabled.
:type ultra_ssd_enabled: bool
"""

_attribute_map = {
'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'},
}

def __init__(self, *, ultra_ssd_enabled: bool=None, **kwargs) -> None:
super(AdditionalCapabilities, self).__init__(**kwargs)
self.ultra_ssd_enabled = ultra_ssd_enabled
Loading

0 comments on commit 9f154e6

Please # to comment.