Skip to content

Commit

Permalink
Generated from 661409da4d2789164dfb43b5afc29e796a180795 (#4895)
Browse files Browse the repository at this point in the history
Added back ProximityPlaceGroup APIs which are missing in 2019-03-01
  • Loading branch information
AutorestCI authored Apr 19, 2019
1 parent ed77d0f commit e4eeb28
Show file tree
Hide file tree
Showing 22 changed files with 770 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ def proximity_placement_groups(self):
* 2018-04-01: :class:`ProximityPlacementGroupsOperations<azure.mgmt.compute.v2018_04_01.operations.ProximityPlacementGroupsOperations>`
* 2018-06-01: :class:`ProximityPlacementGroupsOperations<azure.mgmt.compute.v2018_06_01.operations.ProximityPlacementGroupsOperations>`
* 2018-10-01: :class:`ProximityPlacementGroupsOperations<azure.mgmt.compute.v2018_10_01.operations.ProximityPlacementGroupsOperations>`
* 2019-03-01: :class:`ProximityPlacementGroupsOperations<azure.mgmt.compute.v2019_03_01.operations.ProximityPlacementGroupsOperations>`
"""
api_version = self._get_api_version('proximity_placement_groups')
if api_version == '2018-04-01':
Expand All @@ -365,6 +366,8 @@ def proximity_placement_groups(self):
from .v2018_06_01.operations import ProximityPlacementGroupsOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import ProximityPlacementGroupsOperations as OperationClass
elif api_version == '2019-03-01':
from .v2019_03_01.operations import ProximityPlacementGroupsOperations 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 @@ -54,8 +54,6 @@
SnapshotStorageAccountTypes,
AccessLevel,
)
# Manual change to avoid major release until the next major release
StorageAccountTypes = DiskStorageAccountTypes

__all__ = [
'Resource',
Expand All @@ -77,7 +75,6 @@
'DiskPaged',
'SnapshotPaged',
'DiskStorageAccountTypes',
'StorageAccountTypes',
'OperatingSystemTypes',
'HyperVGeneration',
'DiskCreateOption',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from .version import VERSION
from .operations.operations import Operations
from .operations.availability_sets_operations import AvailabilitySetsOperations
from .operations.proximity_placement_groups_operations import ProximityPlacementGroupsOperations
from .operations.virtual_machine_extension_images_operations import VirtualMachineExtensionImagesOperations
from .operations.virtual_machine_extensions_operations import VirtualMachineExtensionsOperations
from .operations.virtual_machine_images_operations import VirtualMachineImagesOperations
Expand Down Expand Up @@ -78,6 +79,8 @@ class ComputeManagementClient(SDKClient):
:vartype operations: azure.mgmt.compute.v2019_03_01.operations.Operations
:ivar availability_sets: AvailabilitySets operations
:vartype availability_sets: azure.mgmt.compute.v2019_03_01.operations.AvailabilitySetsOperations
:ivar proximity_placement_groups: ProximityPlacementGroups operations
:vartype proximity_placement_groups: azure.mgmt.compute.v2019_03_01.operations.ProximityPlacementGroupsOperations
:ivar virtual_machine_extension_images: VirtualMachineExtensionImages operations
:vartype virtual_machine_extension_images: azure.mgmt.compute.v2019_03_01.operations.VirtualMachineExtensionImagesOperations
:ivar virtual_machine_extensions: VirtualMachineExtensions operations
Expand Down Expand Up @@ -136,6 +139,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.availability_sets = AvailabilitySetsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.proximity_placement_groups = ProximityPlacementGroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.virtual_machine_extensions = VirtualMachineExtensionsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
from .sku_py3 import Sku
from .availability_set_py3 import AvailabilitySet
from .availability_set_update_py3 import AvailabilitySetUpdate
from .proximity_placement_group_py3 import ProximityPlacementGroup
from .proximity_placement_group_update_py3 import ProximityPlacementGroupUpdate
from .virtual_machine_size_py3 import VirtualMachineSize
from .virtual_machine_extension_image_py3 import VirtualMachineExtensionImage
from .virtual_machine_image_resource_py3 import VirtualMachineImageResource
Expand Down Expand Up @@ -174,6 +176,8 @@
from .sku import Sku
from .availability_set import AvailabilitySet
from .availability_set_update import AvailabilitySetUpdate
from .proximity_placement_group import ProximityPlacementGroup
from .proximity_placement_group_update import ProximityPlacementGroupUpdate
from .virtual_machine_size import VirtualMachineSize
from .virtual_machine_extension_image import VirtualMachineExtensionImage
from .virtual_machine_image_resource import VirtualMachineImageResource
Expand Down Expand Up @@ -328,6 +332,7 @@
from .compute_operation_value_paged import ComputeOperationValuePaged
from .availability_set_paged import AvailabilitySetPaged
from .virtual_machine_size_paged import VirtualMachineSizePaged
from .proximity_placement_group_paged import ProximityPlacementGroupPaged
from .usage_paged import UsagePaged
from .virtual_machine_paged import VirtualMachinePaged
from .image_paged import ImagePaged
Expand All @@ -343,6 +348,7 @@
from .compute_management_client_enums import (
StatusLevelTypes,
AvailabilitySetSkuTypes,
ProximityPlacementGroupType,
OperatingSystemTypes,
VirtualMachineSizeTypes,
CachingTypes,
Expand Down Expand Up @@ -381,6 +387,8 @@
'Sku',
'AvailabilitySet',
'AvailabilitySetUpdate',
'ProximityPlacementGroup',
'ProximityPlacementGroupUpdate',
'VirtualMachineSize',
'VirtualMachineExtensionImage',
'VirtualMachineImageResource',
Expand Down Expand Up @@ -535,6 +543,7 @@
'ComputeOperationValuePaged',
'AvailabilitySetPaged',
'VirtualMachineSizePaged',
'ProximityPlacementGroupPaged',
'UsagePaged',
'VirtualMachinePaged',
'ImagePaged',
Expand All @@ -549,6 +558,7 @@
'GalleryImageVersionPaged',
'StatusLevelTypes',
'AvailabilitySetSkuTypes',
'ProximityPlacementGroupType',
'OperatingSystemTypes',
'VirtualMachineSizeTypes',
'CachingTypes',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ class AvailabilitySet(Resource):
the availability set.
:type virtual_machines:
list[~azure.mgmt.compute.v2019_03_01.models.SubResource]
:param proximity_placement_group: Specifies information about the
proximity placement group that the availability set should be assigned to.
<br><br>Minimum api-version: 2018-04-01.
:type proximity_placement_group:
~azure.mgmt.compute.v2019_03_01.models.SubResource
:ivar statuses: The resource status information.
:vartype statuses:
list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus]
Expand Down Expand Up @@ -75,6 +80,7 @@ class AvailabilitySet(Resource):
'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'},
'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'},
'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'},
'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'},
'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'},
'sku': {'key': 'sku', 'type': 'Sku'},
}
Expand All @@ -84,5 +90,6 @@ def __init__(self, **kwargs):
self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None)
self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None)
self.virtual_machines = kwargs.get('virtual_machines', None)
self.proximity_placement_group = kwargs.get('proximity_placement_group', None)
self.statuses = None
self.sku = kwargs.get('sku', None)
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ class AvailabilitySet(Resource):
the availability set.
:type virtual_machines:
list[~azure.mgmt.compute.v2019_03_01.models.SubResource]
:param proximity_placement_group: Specifies information about the
proximity placement group that the availability set should be assigned to.
<br><br>Minimum api-version: 2018-04-01.
:type proximity_placement_group:
~azure.mgmt.compute.v2019_03_01.models.SubResource
:ivar statuses: The resource status information.
:vartype statuses:
list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus]
Expand Down Expand Up @@ -75,14 +80,16 @@ class AvailabilitySet(Resource):
'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'},
'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'},
'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'},
'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'},
'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'},
'sku': {'key': 'sku', 'type': 'Sku'},
}

def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, sku=None, **kwargs) -> None:
def __init__(self, *, location: str, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None:
super(AvailabilitySet, self).__init__(location=location, tags=tags, **kwargs)
self.platform_update_domain_count = platform_update_domain_count
self.platform_fault_domain_count = platform_fault_domain_count
self.virtual_machines = virtual_machines
self.proximity_placement_group = proximity_placement_group
self.statuses = None
self.sku = sku
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ class AvailabilitySetUpdate(UpdateResource):
the availability set.
:type virtual_machines:
list[~azure.mgmt.compute.v2019_03_01.models.SubResource]
:param proximity_placement_group: Specifies information about the
proximity placement group that the availability set should be assigned to.
<br><br>Minimum api-version: 2018-04-01.
:type proximity_placement_group:
~azure.mgmt.compute.v2019_03_01.models.SubResource
:ivar statuses: The resource status information.
:vartype statuses:
list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus]
Expand All @@ -45,6 +50,7 @@ class AvailabilitySetUpdate(UpdateResource):
'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'},
'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'},
'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'},
'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'},
'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'},
'sku': {'key': 'sku', 'type': 'Sku'},
}
Expand All @@ -54,5 +60,6 @@ def __init__(self, **kwargs):
self.platform_update_domain_count = kwargs.get('platform_update_domain_count', None)
self.platform_fault_domain_count = kwargs.get('platform_fault_domain_count', None)
self.virtual_machines = kwargs.get('virtual_machines', None)
self.proximity_placement_group = kwargs.get('proximity_placement_group', None)
self.statuses = None
self.sku = kwargs.get('sku', None)
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ class AvailabilitySetUpdate(UpdateResource):
the availability set.
:type virtual_machines:
list[~azure.mgmt.compute.v2019_03_01.models.SubResource]
:param proximity_placement_group: Specifies information about the
proximity placement group that the availability set should be assigned to.
<br><br>Minimum api-version: 2018-04-01.
:type proximity_placement_group:
~azure.mgmt.compute.v2019_03_01.models.SubResource
:ivar statuses: The resource status information.
:vartype statuses:
list[~azure.mgmt.compute.v2019_03_01.models.InstanceViewStatus]
Expand All @@ -45,14 +50,16 @@ class AvailabilitySetUpdate(UpdateResource):
'platform_update_domain_count': {'key': 'properties.platformUpdateDomainCount', 'type': 'int'},
'platform_fault_domain_count': {'key': 'properties.platformFaultDomainCount', 'type': 'int'},
'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'},
'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'SubResource'},
'statuses': {'key': 'properties.statuses', 'type': '[InstanceViewStatus]'},
'sku': {'key': 'sku', 'type': 'Sku'},
}

def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, sku=None, **kwargs) -> None:
def __init__(self, *, tags=None, platform_update_domain_count: int=None, platform_fault_domain_count: int=None, virtual_machines=None, proximity_placement_group=None, sku=None, **kwargs) -> None:
super(AvailabilitySetUpdate, self).__init__(tags=tags, **kwargs)
self.platform_update_domain_count = platform_update_domain_count
self.platform_fault_domain_count = platform_fault_domain_count
self.virtual_machines = virtual_machines
self.proximity_placement_group = proximity_placement_group
self.statuses = None
self.sku = sku
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ class AvailabilitySetSkuTypes(str, Enum):
aligned = "Aligned"


class ProximityPlacementGroupType(str, Enum):

standard = "Standard"
ultra = "Ultra"


class OperatingSystemTypes(str, Enum):

windows = "Windows"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# 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 .resource import Resource


class ProximityPlacementGroup(Resource):
"""Specifies information about the proximity placement group.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
:param proximity_placement_group_type: Specifies the type of the proximity
placement group. <br><br> Possible values are: <br><br> **Standard**
<br><br> **Ultra**. Possible values include: 'Standard', 'Ultra'
:type proximity_placement_group_type: str or
~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroupType
:ivar virtual_machines: A list of references to all virtual machines in
the proximity placement group.
:vartype virtual_machines:
list[~azure.mgmt.compute.v2019_03_01.models.SubResource]
:ivar virtual_machine_scale_sets: A list of references to all virtual
machine scale sets in the proximity placement group.
:vartype virtual_machine_scale_sets:
list[~azure.mgmt.compute.v2019_03_01.models.SubResource]
:ivar availability_sets: A list of references to all availability sets in
the proximity placement group.
:vartype availability_sets:
list[~azure.mgmt.compute.v2019_03_01.models.SubResource]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'virtual_machines': {'readonly': True},
'virtual_machine_scale_sets': {'readonly': True},
'availability_sets': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'proximity_placement_group_type': {'key': 'properties.proximityPlacementGroupType', 'type': 'str'},
'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[SubResource]'},
'virtual_machine_scale_sets': {'key': 'properties.virtualMachineScaleSets', 'type': '[SubResource]'},
'availability_sets': {'key': 'properties.availabilitySets', 'type': '[SubResource]'},
}

def __init__(self, **kwargs):
super(ProximityPlacementGroup, self).__init__(**kwargs)
self.proximity_placement_group_type = kwargs.get('proximity_placement_group_type', None)
self.virtual_machines = None
self.virtual_machine_scale_sets = None
self.availability_sets = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.paging import Paged


class ProximityPlacementGroupPaged(Paged):
"""
A paging container for iterating over a list of :class:`ProximityPlacementGroup <azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[ProximityPlacementGroup]'}
}

def __init__(self, *args, **kwargs):

super(ProximityPlacementGroupPaged, self).__init__(*args, **kwargs)
Loading

0 comments on commit e4eeb28

Please sign in to comment.