Skip to content

Commit

Permalink
[AutoPR compute/resource-manager] Swagger changes for adding diffdisk…
Browse files Browse the repository at this point in the history
…settings property for the Ephemeral OS Disks (#3373)

* Generated from 2f5219561aefc8c0d87bb9b62d5fc8f222f2b842

updated comment

* Generated from 3286411fb1aa50b4ef9633cfdd4403f6357d1cf0

 updated swagger specs for diffdisksettings property

* Generated from f8934d4e93099dec66995c9fdeccd02d7fb535bd

 updated swagger spec comments  for diff disk settings [property

* Generated from 474d5b03008f5780dcb546ed5264bae7eb3d8e59

 updated 2018-10-01 version specs with diffdisk property
  • Loading branch information
AutorestCI authored Sep 24, 2018
1 parent 8a3f760 commit cd8a3e3
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from .key_vault_key_reference_py3 import KeyVaultKeyReference
from .disk_encryption_settings_py3 import DiskEncryptionSettings
from .virtual_hard_disk_py3 import VirtualHardDisk
from .diff_disk_settings_py3 import DiffDiskSettings
from .managed_disk_parameters_py3 import ManagedDiskParameters
from .os_disk_py3 import OSDisk
from .data_disk_py3 import DataDisk
Expand Down Expand Up @@ -202,6 +203,7 @@
from .key_vault_key_reference import KeyVaultKeyReference
from .disk_encryption_settings import DiskEncryptionSettings
from .virtual_hard_disk import VirtualHardDisk
from .diff_disk_settings import DiffDiskSettings
from .managed_disk_parameters import ManagedDiskParameters
from .os_disk import OSDisk
from .data_disk import DataDisk
Expand Down Expand Up @@ -362,6 +364,7 @@
CachingTypes,
DiskCreateOptionTypes,
StorageAccountTypes,
DiffDiskOptions,
PassNames,
ComponentNames,
SettingNames,
Expand Down Expand Up @@ -419,6 +422,7 @@
'KeyVaultKeyReference',
'DiskEncryptionSettings',
'VirtualHardDisk',
'DiffDiskSettings',
'ManagedDiskParameters',
'OSDisk',
'DataDisk',
Expand Down Expand Up @@ -578,6 +582,7 @@
'CachingTypes',
'DiskCreateOptionTypes',
'StorageAccountTypes',
'DiffDiskOptions',
'PassNames',
'ComponentNames',
'SettingNames',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ class StorageAccountTypes(str, Enum):
ultra_ssd_lrs = "UltraSSD_LRS"


class DiffDiskOptions(str, Enum):

local = "Local"


class PassNames(str, Enum):

oobe_system = "OobeSystem"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 DiffDiskSettings(Model):
"""Describes the parameters of differencing disk settings that can be be
specified for operating system disk. <br><br> NOTE: The differencing disk
settings can only be specified for managed disk.
:param option: Specifies the differencing disk settings for operating
system disk. Possible values include: 'Local'
:type option: str or
~azure.mgmt.compute.v2018_06_01.models.DiffDiskOptions
"""

_attribute_map = {
'option': {'key': 'option', 'type': 'str'},
}

def __init__(self, **kwargs):
super(DiffDiskSettings, self).__init__(**kwargs)
self.option = kwargs.get('option', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 DiffDiskSettings(Model):
"""Describes the parameters of differencing disk settings that can be be
specified for operating system disk. <br><br> NOTE: The differencing disk
settings can only be specified for managed disk.
:param option: Specifies the differencing disk settings for operating
system disk. Possible values include: 'Local'
:type option: str or
~azure.mgmt.compute.v2018_06_01.models.DiffDiskOptions
"""

_attribute_map = {
'option': {'key': 'option', 'type': 'str'},
}

def __init__(self, *, option=None, **kwargs) -> None:
super(DiffDiskSettings, self).__init__(**kwargs)
self.option = option
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ class OSDisk(Model):
:param write_accelerator_enabled: Specifies whether writeAccelerator
should be enabled or disabled on the disk.
:type write_accelerator_enabled: bool
:param diff_disk_settings: Specifies the differencing Disk Settings for
the operating system disk used by the virtual machine.
:type diff_disk_settings:
~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings
:param create_option: Required. Specifies how the virtual machine should
be created.<br><br> Possible values are:<br><br> **Attach** \\u2013 This
value is used when you are using a specialized disk to create the virtual
Expand Down Expand Up @@ -78,6 +82,7 @@ class OSDisk(Model):
'image': {'key': 'image', 'type': 'VirtualHardDisk'},
'caching': {'key': 'caching', 'type': 'CachingTypes'},
'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'},
'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'},
'create_option': {'key': 'createOption', 'type': 'str'},
'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'},
Expand All @@ -92,6 +97,7 @@ def __init__(self, **kwargs):
self.image = kwargs.get('image', None)
self.caching = kwargs.get('caching', None)
self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None)
self.diff_disk_settings = kwargs.get('diff_disk_settings', None)
self.create_option = kwargs.get('create_option', None)
self.disk_size_gb = kwargs.get('disk_size_gb', None)
self.managed_disk = kwargs.get('managed_disk', None)
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ class OSDisk(Model):
:param write_accelerator_enabled: Specifies whether writeAccelerator
should be enabled or disabled on the disk.
:type write_accelerator_enabled: bool
:param diff_disk_settings: Specifies the differencing Disk Settings for
the operating system disk used by the virtual machine.
:type diff_disk_settings:
~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings
:param create_option: Required. Specifies how the virtual machine should
be created.<br><br> Possible values are:<br><br> **Attach** \\u2013 This
value is used when you are using a specialized disk to create the virtual
Expand Down Expand Up @@ -78,12 +82,13 @@ class OSDisk(Model):
'image': {'key': 'image', 'type': 'VirtualHardDisk'},
'caching': {'key': 'caching', 'type': 'CachingTypes'},
'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'},
'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'},
'create_option': {'key': 'createOption', 'type': 'str'},
'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
'managed_disk': {'key': 'managedDisk', 'type': 'ManagedDiskParameters'},
}

def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None:
def __init__(self, *, create_option, os_type=None, encryption_settings=None, name: str=None, vhd=None, image=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, managed_disk=None, **kwargs) -> None:
super(OSDisk, self).__init__(**kwargs)
self.os_type = os_type
self.encryption_settings = encryption_settings
Expand All @@ -92,6 +97,7 @@ def __init__(self, *, create_option, os_type=None, encryption_settings=None, nam
self.image = image
self.caching = caching
self.write_accelerator_enabled = write_accelerator_enabled
self.diff_disk_settings = diff_disk_settings
self.create_option = create_option
self.disk_size_gb = disk_size_gb
self.managed_disk = managed_disk
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class VirtualMachineScaleSetOSDisk(Model):
Possible values include: 'FromImage', 'Empty', 'Attach'
:type create_option: str or
~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes
:param diff_disk_settings: Specifies the differencing Disk Settings for
the operating system disk used by the virtual machine scale set.
:type diff_disk_settings:
~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings
:param disk_size_gb: Specifies the size of the operating system disk in
gigabytes. This element can be used to overwrite the size of the disk in a
virtual machine image. <br><br> This value cannot be larger than 1023 GB
Expand Down Expand Up @@ -66,6 +70,7 @@ class VirtualMachineScaleSetOSDisk(Model):
'caching': {'key': 'caching', 'type': 'CachingTypes'},
'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'},
'create_option': {'key': 'createOption', 'type': 'str'},
'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'},
'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
'image': {'key': 'image', 'type': 'VirtualHardDisk'},
Expand All @@ -79,6 +84,7 @@ def __init__(self, **kwargs):
self.caching = kwargs.get('caching', None)
self.write_accelerator_enabled = kwargs.get('write_accelerator_enabled', None)
self.create_option = kwargs.get('create_option', None)
self.diff_disk_settings = kwargs.get('diff_disk_settings', None)
self.disk_size_gb = kwargs.get('disk_size_gb', None)
self.os_type = kwargs.get('os_type', None)
self.image = kwargs.get('image', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class VirtualMachineScaleSetOSDisk(Model):
Possible values include: 'FromImage', 'Empty', 'Attach'
:type create_option: str or
~azure.mgmt.compute.v2018_06_01.models.DiskCreateOptionTypes
:param diff_disk_settings: Specifies the differencing Disk Settings for
the operating system disk used by the virtual machine scale set.
:type diff_disk_settings:
~azure.mgmt.compute.v2018_06_01.models.DiffDiskSettings
:param disk_size_gb: Specifies the size of the operating system disk in
gigabytes. This element can be used to overwrite the size of the disk in a
virtual machine image. <br><br> This value cannot be larger than 1023 GB
Expand Down Expand Up @@ -66,19 +70,21 @@ class VirtualMachineScaleSetOSDisk(Model):
'caching': {'key': 'caching', 'type': 'CachingTypes'},
'write_accelerator_enabled': {'key': 'writeAcceleratorEnabled', 'type': 'bool'},
'create_option': {'key': 'createOption', 'type': 'str'},
'diff_disk_settings': {'key': 'diffDiskSettings', 'type': 'DiffDiskSettings'},
'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
'image': {'key': 'image', 'type': 'VirtualHardDisk'},
'vhd_containers': {'key': 'vhdContainers', 'type': '[str]'},
'managed_disk': {'key': 'managedDisk', 'type': 'VirtualMachineScaleSetManagedDiskParameters'},
}

def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, disk_size_gb: int=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None:
def __init__(self, *, create_option, name: str=None, caching=None, write_accelerator_enabled: bool=None, diff_disk_settings=None, disk_size_gb: int=None, os_type=None, image=None, vhd_containers=None, managed_disk=None, **kwargs) -> None:
super(VirtualMachineScaleSetOSDisk, self).__init__(**kwargs)
self.name = name
self.caching = caching
self.write_accelerator_enabled = write_accelerator_enabled
self.create_option = create_option
self.diff_disk_settings = diff_disk_settings
self.disk_size_gb = disk_size_gb
self.os_type = os_type
self.image = image
Expand Down

0 comments on commit cd8a3e3

Please sign in to comment.