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 compute/resource-manager] Add AutomaticOSUpgradeProperties in GET VMImageVersion API #3454

Merged
merged 1 commit into from
Sep 28, 2018
Merged
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 @@ -26,6 +26,7 @@
from .purchase_plan_py3 import PurchasePlan
from .os_disk_image_py3 import OSDiskImage
from .data_disk_image_py3 import DataDiskImage
from .automatic_os_upgrade_properties_py3 import AutomaticOSUpgradeProperties
from .virtual_machine_image_py3 import VirtualMachineImage
from .usage_name_py3 import UsageName
from .usage_py3 import Usage
Expand Down Expand Up @@ -157,6 +158,7 @@
from .purchase_plan import PurchasePlan
from .os_disk_image import OSDiskImage
from .data_disk_image import DataDiskImage
from .automatic_os_upgrade_properties import AutomaticOSUpgradeProperties
from .virtual_machine_image import VirtualMachineImage
from .usage_name import UsageName
from .usage import Usage
Expand Down Expand Up @@ -329,6 +331,7 @@
'PurchasePlan',
'OSDiskImage',
'DataDiskImage',
'AutomaticOSUpgradeProperties',
'VirtualMachineImage',
'UsageName',
'Usage',
Expand Down
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 AutomaticOSUpgradeProperties(Model):
"""Describes automatic OS upgrade properties on the image.

All required parameters must be populated in order to send to Azure.

:param automatic_os_upgrade_supported: Required. Specifies whether
automatic OS upgrade is supported on the image.
:type automatic_os_upgrade_supported: bool
"""

_validation = {
'automatic_os_upgrade_supported': {'required': True},
}

_attribute_map = {
'automatic_os_upgrade_supported': {'key': 'automaticOSUpgradeSupported', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(AutomaticOSUpgradeProperties, self).__init__(**kwargs)
self.automatic_os_upgrade_supported = kwargs.get('automatic_os_upgrade_supported', 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 AutomaticOSUpgradeProperties(Model):
"""Describes automatic OS upgrade properties on the image.

All required parameters must be populated in order to send to Azure.

:param automatic_os_upgrade_supported: Required. Specifies whether
automatic OS upgrade is supported on the image.
:type automatic_os_upgrade_supported: bool
"""

_validation = {
'automatic_os_upgrade_supported': {'required': True},
}

_attribute_map = {
'automatic_os_upgrade_supported': {'key': 'automaticOSUpgradeSupported', 'type': 'bool'},
}

def __init__(self, *, automatic_os_upgrade_supported: bool, **kwargs) -> None:
super(AutomaticOSUpgradeProperties, self).__init__(**kwargs)
self.automatic_os_upgrade_supported = automatic_os_upgrade_supported
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class VirtualMachineImage(VirtualMachineImageResource):
:param data_disk_images:
:type data_disk_images:
list[~azure.mgmt.compute.v2018_10_01.models.DataDiskImage]
:param automatic_os_upgrade_properties:
:type automatic_os_upgrade_properties:
~azure.mgmt.compute.v2018_10_01.models.AutomaticOSUpgradeProperties
"""

_validation = {
Expand All @@ -50,10 +53,12 @@ class VirtualMachineImage(VirtualMachineImageResource):
'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'},
'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'},
'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'},
'automatic_os_upgrade_properties': {'key': 'properties.automaticOSUpgradeProperties', 'type': 'AutomaticOSUpgradeProperties'},
}

def __init__(self, **kwargs):
super(VirtualMachineImage, self).__init__(**kwargs)
self.plan = kwargs.get('plan', None)
self.os_disk_image = kwargs.get('os_disk_image', None)
self.data_disk_images = kwargs.get('data_disk_images', None)
self.automatic_os_upgrade_properties = kwargs.get('automatic_os_upgrade_properties', None)
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class VirtualMachineImage(VirtualMachineImageResource):
:param data_disk_images:
:type data_disk_images:
list[~azure.mgmt.compute.v2018_10_01.models.DataDiskImage]
:param automatic_os_upgrade_properties:
:type automatic_os_upgrade_properties:
~azure.mgmt.compute.v2018_10_01.models.AutomaticOSUpgradeProperties
"""

_validation = {
Expand All @@ -50,10 +53,12 @@ class VirtualMachineImage(VirtualMachineImageResource):
'plan': {'key': 'properties.plan', 'type': 'PurchasePlan'},
'os_disk_image': {'key': 'properties.osDiskImage', 'type': 'OSDiskImage'},
'data_disk_images': {'key': 'properties.dataDiskImages', 'type': '[DataDiskImage]'},
'automatic_os_upgrade_properties': {'key': 'properties.automaticOSUpgradeProperties', 'type': 'AutomaticOSUpgradeProperties'},
}

def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, **kwargs) -> None:
def __init__(self, *, name: str, location: str, id: str=None, tags=None, plan=None, os_disk_image=None, data_disk_images=None, automatic_os_upgrade_properties=None, **kwargs) -> None:
super(VirtualMachineImage, self).__init__(id=id, name=name, location=location, tags=tags, **kwargs)
self.plan = plan
self.os_disk_image = os_disk_image
self.data_disk_images = data_disk_images
self.automatic_os_upgrade_properties = automatic_os_upgrade_properties