Skip to content

Commit

Permalink
[AutoPR compute/resource-manager] added autoOSUpgradePolicy to Upgrad…
Browse files Browse the repository at this point in the history
…ePolicy (#2505)

* Generated from 57e4037bd66b30a7f95fda331085521b2d669c94

added autoOSUpgradePolicy

* Generated from 27752fd2417b688d4aba3bcde1ada9231659d208

added deafult value as false

* Generated from 27752fd2417b688d4aba3bcde1ada9231659d208

added deafult value as false
  • Loading branch information
AutorestCI authored May 8, 2018
1 parent 1f8f3f6 commit 6715555
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 1 deletion.
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

0 comments on commit 6715555

Please sign in to comment.