Skip to content

Commit 6715555

Browse files
authored
[AutoPR compute/resource-manager] added autoOSUpgradePolicy to UpgradePolicy (#2505)
* Generated from 57e4037bd66b30a7f95fda331085521b2d669c94 added autoOSUpgradePolicy * Generated from 27752fd2417b688d4aba3bcde1ada9231659d208 added deafult value as false * Generated from 27752fd2417b688d4aba3bcde1ada9231659d208 added deafult value as false
1 parent 1f8f3f6 commit 6715555

File tree

5 files changed

+74
-1
lines changed

5 files changed

+74
-1
lines changed

azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
from .virtual_machine_instance_view_py3 import VirtualMachineInstanceView
6666
from .virtual_machine_py3 import VirtualMachine
6767
from .virtual_machine_update_py3 import VirtualMachineUpdate
68+
from .auto_os_upgrade_policy_py3 import AutoOSUpgradePolicy
6869
from .rolling_upgrade_policy_py3 import RollingUpgradePolicy
6970
from .upgrade_policy_py3 import UpgradePolicy
7071
from .image_os_disk_py3 import ImageOSDisk
@@ -192,6 +193,7 @@
192193
from .virtual_machine_instance_view import VirtualMachineInstanceView
193194
from .virtual_machine import VirtualMachine
194195
from .virtual_machine_update import VirtualMachineUpdate
196+
from .auto_os_upgrade_policy import AutoOSUpgradePolicy
195197
from .rolling_upgrade_policy import RollingUpgradePolicy
196198
from .upgrade_policy import UpgradePolicy
197199
from .image_os_disk import ImageOSDisk
@@ -358,6 +360,7 @@
358360
'VirtualMachineInstanceView',
359361
'VirtualMachine',
360362
'VirtualMachineUpdate',
363+
'AutoOSUpgradePolicy',
361364
'RollingUpgradePolicy',
362365
'UpgradePolicy',
363366
'ImageOSDisk',
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class AutoOSUpgradePolicy(Model):
16+
"""The configuration parameters used for performing automatic OS upgrade.
17+
18+
:param disable_auto_rollback: Whether OS image rollback feature should be
19+
disabled. Default value is false.
20+
:type disable_auto_rollback: bool
21+
"""
22+
23+
_attribute_map = {
24+
'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'},
25+
}
26+
27+
def __init__(self, **kwargs):
28+
super(AutoOSUpgradePolicy, self).__init__(**kwargs)
29+
self.disable_auto_rollback = kwargs.get('disable_auto_rollback', None)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class AutoOSUpgradePolicy(Model):
16+
"""The configuration parameters used for performing automatic OS upgrade.
17+
18+
:param disable_auto_rollback: Whether OS image rollback feature should be
19+
disabled. Default value is false.
20+
:type disable_auto_rollback: bool
21+
"""
22+
23+
_attribute_map = {
24+
'disable_auto_rollback': {'key': 'disableAutoRollback', 'type': 'bool'},
25+
}
26+
27+
def __init__(self, *, disable_auto_rollback: bool=None, **kwargs) -> None:
28+
super(AutoOSUpgradePolicy, self).__init__(**kwargs)
29+
self.disable_auto_rollback = disable_auto_rollback

azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,22 @@ class UpgradePolicy(Model):
3030
applied to scale set instances in a rolling fashion when a newer version
3131
of the image becomes available.
3232
:type automatic_os_upgrade: bool
33+
:param auto_os_upgrade_policy: Configuration parameters used for
34+
performing automatic OS Upgrade.
35+
:type auto_os_upgrade_policy:
36+
~azure.mgmt.compute.v2017_12_01.models.AutoOSUpgradePolicy
3337
"""
3438

3539
_attribute_map = {
3640
'mode': {'key': 'mode', 'type': 'UpgradeMode'},
3741
'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'},
3842
'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'},
43+
'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'},
3944
}
4045

4146
def __init__(self, **kwargs):
4247
super(UpgradePolicy, self).__init__(**kwargs)
4348
self.mode = kwargs.get('mode', None)
4449
self.rolling_upgrade_policy = kwargs.get('rolling_upgrade_policy', None)
4550
self.automatic_os_upgrade = kwargs.get('automatic_os_upgrade', None)
51+
self.auto_os_upgrade_policy = kwargs.get('auto_os_upgrade_policy', None)

azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/upgrade_policy_py3.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,22 @@ class UpgradePolicy(Model):
3030
applied to scale set instances in a rolling fashion when a newer version
3131
of the image becomes available.
3232
:type automatic_os_upgrade: bool
33+
:param auto_os_upgrade_policy: Configuration parameters used for
34+
performing automatic OS Upgrade.
35+
:type auto_os_upgrade_policy:
36+
~azure.mgmt.compute.v2017_12_01.models.AutoOSUpgradePolicy
3337
"""
3438

3539
_attribute_map = {
3640
'mode': {'key': 'mode', 'type': 'UpgradeMode'},
3741
'rolling_upgrade_policy': {'key': 'rollingUpgradePolicy', 'type': 'RollingUpgradePolicy'},
3842
'automatic_os_upgrade': {'key': 'automaticOSUpgrade', 'type': 'bool'},
43+
'auto_os_upgrade_policy': {'key': 'autoOSUpgradePolicy', 'type': 'AutoOSUpgradePolicy'},
3944
}
4045

41-
def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, **kwargs) -> None:
46+
def __init__(self, *, mode=None, rolling_upgrade_policy=None, automatic_os_upgrade: bool=None, auto_os_upgrade_policy=None, **kwargs) -> None:
4247
super(UpgradePolicy, self).__init__(**kwargs)
4348
self.mode = mode
4449
self.rolling_upgrade_policy = rolling_upgrade_policy
4550
self.automatic_os_upgrade = automatic_os_upgrade
51+
self.auto_os_upgrade_policy = auto_os_upgrade_policy

0 commit comments

Comments
 (0)