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] added autoOSUpgradePolicy to UpgradePolicy #2505

Merged
merged 3 commits into from
May 8, 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 @@ -65,6 +65,7 @@
from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView
from .virtual_machine_py3 import VirtualMachine
from .virtual_machine_update_py3 import VirtualMachineUpdate
from .auto_os_upgrade_policy_py3 import AutoOSUpgradePolicy
from .rolling_upgrade_policy_py3 import RollingUpgradePolicy
from .upgrade_policy_py3 import UpgradePolicy
from .image_os_disk_py3 import ImageOSDisk
Expand Down Expand Up @@ -192,6 +193,7 @@
from .virtual_machine_instance_view import VirtualMachineInstanceView
from .virtual_machine import VirtualMachine
from .virtual_machine_update import VirtualMachineUpdate
from .auto_os_upgrade_policy import AutoOSUpgradePolicy
from .rolling_upgrade_policy import RollingUpgradePolicy
from .upgrade_policy import UpgradePolicy
from .image_os_disk import ImageOSDisk
Expand Down Expand Up @@ -358,6 +360,7 @@
'VirtualMachineInstanceView',
'VirtualMachine',
'VirtualMachineUpdate',
'AutoOSUpgradePolicy',
'RollingUpgradePolicy',
'UpgradePolicy',
'ImageOSDisk',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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 AutoOSUpgradePolicy(Model):
"""The configuration parameters used for performing automatic OS upgrade.

:param disable_auto_rollback: Whether OS image rollback feature should be
disabled. Default value is false.
:type disable_auto_rollback: bool
"""

_attribute_map = {
'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(AutoOSUpgradePolicy, self).__init__(**kwargs)
self.disable_auto_rollback = kwargs.get('disable_auto_rollback', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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 AutoOSUpgradePolicy(Model):
"""The configuration parameters used for performing automatic OS upgrade.

:param disable_auto_rollback: Whether OS image rollback feature should be
disabled. Default value is false.
:type disable_auto_rollback: bool
"""

_attribute_map = {
'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'},
}

def __init__(self, *, disable_auto_rollback: bool=None, **kwargs) -> None:
super(AutoOSUpgradePolicy, self).__init__(**kwargs)
self.disable_auto_rollback = disable_auto_rollback
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,22 @@ class UpgradePolicy(Model):
applied to scale set instances in a rolling fashion when a newer version
of the image becomes available.
:type automatic_os_upgrade: bool
:param auto_os_upgrade_policy: Configuration parameters used for
performing automatic OS Upgrade.
:type auto_os_upgrade_policy:
~azure.mgmt.compute.v2017_12_01.models.AutoOSUpgradePolicy
"""

_attribute_map = {
'mode': {'key': 'mode', 'type': 'UpgradeMode'},
'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'},
'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'},
'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'},
}

def __init__(self, **kwargs):
super(UpgradePolicy, self).__init__(**kwargs)
self.mode = kwargs.get('mode', None)
self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None)
self.automatic_os_upgrade = kwargs.get('automatic_os_upgrade', None)
self.auto_os_upgrade_policy = kwargs.get('auto_os_upgrade_policy', None)
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,22 @@ class UpgradePolicy(Model):
applied to scale set instances in a rolling fashion when a newer version
of the image becomes available.
:type automatic_os_upgrade: bool
:param auto_os_upgrade_policy: Configuration parameters used for
performing automatic OS Upgrade.
:type auto_os_upgrade_policy:
~azure.mgmt.compute.v2017_12_01.models.AutoOSUpgradePolicy
"""

_attribute_map = {
'mode': {'key': 'mode', 'type': 'UpgradeMode'},
'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'},
'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'},
'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'},
}

def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, **kwargs) -> None:
def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, auto_os_upgrade_policy=None, **kwargs) -> None:
super(UpgradePolicy, self).__init__(**kwargs)
self.mode = mode
self.rolling_upgrade_policy = rolling_upgrade_policy
self.automatic_os_upgrade = automatic_os_upgrade
self.auto_os_upgrade_policy = auto_os_upgrade_policy