Skip to content

[AutoPR automation/resource-manager] Swagger change for Update configuration dynamic group #3552

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

Merged
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
11 changes: 11 additions & 0 deletions azure-mgmt-automation/azure/mgmt/automation/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
from .watcher_update_parameters_py3 import WatcherUpdateParameters
from .windows_properties_py3 import WindowsProperties
from .linux_properties_py3 import LinuxProperties
from .tag_settings_properties_py3 import TagSettingsProperties
from .azure_query_properties_py3 import AzureQueryProperties
from .target_properties_py3 import TargetProperties
from .update_configuration_py3 import UpdateConfiguration
from .software_update_configuration_py3 import SoftwareUpdateConfiguration
from .collection_item_update_configuration_py3 import CollectionItemUpdateConfiguration
Expand Down Expand Up @@ -208,6 +211,9 @@
from .watcher_update_parameters import WatcherUpdateParameters
from .windows_properties import WindowsProperties
from .linux_properties import LinuxProperties
from .tag_settings_properties import TagSettingsProperties
from .azure_query_properties import AzureQueryProperties
from .target_properties import TargetProperties
from .update_configuration import UpdateConfiguration
from .software_update_configuration import SoftwareUpdateConfiguration
from .collection_item_update_configuration import CollectionItemUpdateConfiguration
Expand Down Expand Up @@ -308,6 +314,7 @@
OperatingSystemType,
WindowsUpdateClasses,
LinuxUpdateClasses,
TagOperators,
SourceType,
TokenType,
ProvisioningState,
Expand Down Expand Up @@ -395,6 +402,9 @@
'WatcherUpdateParameters',
'WindowsProperties',
'LinuxProperties',
'TagSettingsProperties',
'AzureQueryProperties',
'TargetProperties',
'UpdateConfiguration',
'SoftwareUpdateConfiguration',
'CollectionItemUpdateConfiguration',
Expand Down Expand Up @@ -494,6 +504,7 @@
'OperatingSystemType',
'WindowsUpdateClasses',
'LinuxUpdateClasses',
'TagOperators',
'SourceType',
'TokenType',
'ProvisioningState',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ class LinuxUpdateClasses(str, Enum):
other = "Other"


class TagOperators(str, Enum):

all = "All"
any = "Any"


class SourceType(str, Enum):

vso_git = "VsoGit"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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 AzureQueryProperties(Model):
"""Azure query for the update configuration.

:param scope: List of Subscription or Resource Group ARM Ids.
:type scope: list[str]
:param location: List of locations to scope the query to.
:type location: list[str]
:param tag_settings: Tag settings for the VM.
:type tag_settings: ~azure.mgmt.automation.models.TagSettingsProperties
"""

_attribute_map = {
'scope': {'key': 'scope', 'type': '[str]'},
'location': {'key': 'location', 'type': '[str]'},
'tag_settings': {'key': 'tagSettings', 'type': 'TagSettingsProperties'},
}

def __init__(self, **kwargs):
super(AzureQueryProperties, self).__init__(**kwargs)
self.scope = kwargs.get('scope', None)
self.location = kwargs.get('location', None)
self.tag_settings = kwargs.get('tag_settings', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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 AzureQueryProperties(Model):
"""Azure query for the update configuration.

:param scope: List of Subscription or Resource Group ARM Ids.
:type scope: list[str]
:param location: List of locations to scope the query to.
:type location: list[str]
:param tag_settings: Tag settings for the VM.
:type tag_settings: ~azure.mgmt.automation.models.TagSettingsProperties
"""

_attribute_map = {
'scope': {'key': 'scope', 'type': '[str]'},
'location': {'key': 'location', 'type': '[str]'},
'tag_settings': {'key': 'tagSettings', 'type': 'TagSettingsProperties'},
}

def __init__(self, *, scope=None, location=None, tag_settings=None, **kwargs) -> None:
super(AzureQueryProperties, self).__init__(**kwargs)
self.scope = scope
self.location = location
self.tag_settings = tag_settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 TagSettingsProperties(Model):
"""Tag filter information for the VM.

:param tags: Dictionary of tags with its list of values.
:type tags: dict[str, list[str]]
:param filter_operator: Filter VMs by Any or All specified tags. Possible
values include: 'All', 'Any'
:type filter_operator: str or ~azure.mgmt.automation.models.TagOperators
"""

_attribute_map = {
'tags': {'key': 'tags', 'type': '{[str]}'},
'filter_operator': {'key': 'filterOperator', 'type': 'TagOperators'},
}

def __init__(self, **kwargs):
super(TagSettingsProperties, self).__init__(**kwargs)
self.tags = kwargs.get('tags', None)
self.filter_operator = kwargs.get('filter_operator', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 TagSettingsProperties(Model):
"""Tag filter information for the VM.

:param tags: Dictionary of tags with its list of values.
:type tags: dict[str, list[str]]
:param filter_operator: Filter VMs by Any or All specified tags. Possible
values include: 'All', 'Any'
:type filter_operator: str or ~azure.mgmt.automation.models.TagOperators
"""

_attribute_map = {
'tags': {'key': 'tags', 'type': '{[str]}'},
'filter_operator': {'key': 'filterOperator', 'type': 'TagOperators'},
}

def __init__(self, *, tags=None, filter_operator=None, **kwargs) -> None:
super(TagSettingsProperties, self).__init__(**kwargs)
self.tags = tags
self.filter_operator = filter_operator
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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 TargetProperties(Model):
"""Group specific to the update configuration.

:param azure_queries: List of Azure queries in the software update
configuration.
:type azure_queries:
list[~azure.mgmt.automation.models.AzureQueryProperties]
"""

_attribute_map = {
'azure_queries': {'key': 'azureQueries', 'type': '[AzureQueryProperties]'},
}

def __init__(self, **kwargs):
super(TargetProperties, self).__init__(**kwargs)
self.azure_queries = kwargs.get('azure_queries', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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 TargetProperties(Model):
"""Group specific to the update configuration.

:param azure_queries: List of Azure queries in the software update
configuration.
:type azure_queries:
list[~azure.mgmt.automation.models.AzureQueryProperties]
"""

_attribute_map = {
'azure_queries': {'key': 'azureQueries', 'type': '[AzureQueryProperties]'},
}

def __init__(self, *, azure_queries=None, **kwargs) -> None:
super(TargetProperties, self).__init__(**kwargs)
self.azure_queries = azure_queries
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class UpdateConfiguration(Model):
:param non_azure_computer_names: List of names of non-azure machines
targeted by the software update configuration.
:type non_azure_computer_names: list[str]
:param targets: Group targets for the software update configuration.
:type targets: ~azure.mgmt.automation.models.TargetProperties
"""

_validation = {
Expand All @@ -48,6 +50,7 @@ class UpdateConfiguration(Model):
'duration': {'key': 'duration', 'type': 'duration'},
'azure_virtual_machines': {'key': 'azureVirtualMachines', 'type': '[str]'},
'non_azure_computer_names': {'key': 'nonAzureComputerNames', 'type': '[str]'},
'targets': {'key': 'targets', 'type': 'TargetProperties'},
}

def __init__(self, **kwargs):
Expand All @@ -58,3 +61,4 @@ def __init__(self, **kwargs):
self.duration = kwargs.get('duration', None)
self.azure_virtual_machines = kwargs.get('azure_virtual_machines', None)
self.non_azure_computer_names = kwargs.get('non_azure_computer_names', None)
self.targets = kwargs.get('targets', None)
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class UpdateConfiguration(Model):
:param non_azure_computer_names: List of names of non-azure machines
targeted by the software update configuration.
:type non_azure_computer_names: list[str]
:param targets: Group targets for the software update configuration.
:type targets: ~azure.mgmt.automation.models.TargetProperties
"""

_validation = {
Expand All @@ -48,13 +50,15 @@ class UpdateConfiguration(Model):
'duration': {'key': 'duration', 'type': 'duration'},
'azure_virtual_machines': {'key': 'azureVirtualMachines', 'type': '[str]'},
'non_azure_computer_names': {'key': 'nonAzureComputerNames', 'type': '[str]'},
'targets': {'key': 'targets', 'type': 'TargetProperties'},
}

def __init__(self, *, operating_system, windows=None, linux=None, duration=None, azure_virtual_machines=None, non_azure_computer_names=None, **kwargs) -> None:
def __init__(self, *, operating_system, windows=None, linux=None, duration=None, azure_virtual_machines=None, non_azure_computer_names=None, targets=None, **kwargs) -> None:
super(UpdateConfiguration, self).__init__(**kwargs)
self.operating_system = operating_system
self.windows = windows
self.linux = linux
self.duration = duration
self.azure_virtual_machines = azure_virtual_machines
self.non_azure_computer_names = non_azure_computer_names
self.targets = targets