From 9efcde492701b26d850eff79f71f6f5d9f758ee0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 5 Nov 2018 11:45:31 -0800 Subject: [PATCH] [AutoPR] containerinstance/resource-manager (#3736) * Generated from b28170d473471c298dc43f09299dd655d8e03982 (#3729) Update swagger with DNSConfig and GPU * ACI 1.3.0 --- azure-mgmt-containerinstance/HISTORY.rst | 9 ++++ .../mgmt/containerinstance/models/__init__.py | 8 ++++ .../models/container_group.py | 4 ++ .../models/container_group_py3.py | 6 ++- ...tainer_instance_management_client_enums.py | 7 +++ .../models/dns_configuration.py | 43 +++++++++++++++++++ .../models/dns_configuration_py3.py | 43 +++++++++++++++++++ .../containerinstance/models/gpu_resource.py | 40 +++++++++++++++++ .../models/gpu_resource_py3.py | 40 +++++++++++++++++ .../models/resource_limits.py | 4 ++ .../models/resource_limits_py3.py | 6 ++- .../models/resource_requests.py | 4 ++ .../models/resource_requests_py3.py | 6 ++- .../azure/mgmt/containerinstance/version.py | 2 +- 14 files changed, 218 insertions(+), 4 deletions(-) create mode 100644 azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration.py create mode 100644 azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration_py3.py create mode 100644 azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource.py create mode 100644 azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource_py3.py diff --git a/azure-mgmt-containerinstance/HISTORY.rst b/azure-mgmt-containerinstance/HISTORY.rst index e45c2e0d1290..6aae6bdc3d16 100644 --- a/azure-mgmt-containerinstance/HISTORY.rst +++ b/azure-mgmt-containerinstance/HISTORY.rst @@ -3,6 +3,15 @@ Release History =============== +1.3.0 (2018-11-05) +++++++++++++++++++ + +**Features** + +- Model ResourceLimits has a new parameter gpu +- Model ResourceRequests has a new parameter gpu +- Model ContainerGroup has a new parameter dns_config + 1.2.1 (2018-10-16) ++++++++++++++++++ diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py index 58553cbce4f9..29648c6c4f55 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py @@ -15,6 +15,7 @@ from .container_state_py3 import ContainerState from .event_py3 import Event from .container_properties_instance_view_py3 import ContainerPropertiesInstanceView + from .gpu_resource_py3 import GpuResource from .resource_requests_py3 import ResourceRequests from .resource_limits_py3 import ResourceLimits from .resource_requirements_py3 import ResourceRequirements @@ -35,6 +36,7 @@ from .log_analytics_py3 import LogAnalytics from .container_group_diagnostics_py3 import ContainerGroupDiagnostics from .container_group_network_profile_py3 import ContainerGroupNetworkProfile + from .dns_configuration_py3 import DnsConfiguration from .container_group_py3 import ContainerGroup from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation @@ -53,6 +55,7 @@ from .container_state import ContainerState from .event import Event from .container_properties_instance_view import ContainerPropertiesInstanceView + from .gpu_resource import GpuResource from .resource_requests import ResourceRequests from .resource_limits import ResourceLimits from .resource_requirements import ResourceRequirements @@ -73,6 +76,7 @@ from .log_analytics import LogAnalytics from .container_group_diagnostics import ContainerGroupDiagnostics from .container_group_network_profile import ContainerGroupNetworkProfile + from .dns_configuration import DnsConfiguration from .container_group import ContainerGroup from .operation_display import OperationDisplay from .operation import Operation @@ -88,6 +92,7 @@ from .container_group_paged import ContainerGroupPaged from .container_instance_management_client_enums import ( ContainerNetworkProtocol, + GpuSku, ResourceIdentityType, ContainerGroupRestartPolicy, ContainerGroupNetworkProtocol, @@ -103,6 +108,7 @@ 'ContainerState', 'Event', 'ContainerPropertiesInstanceView', + 'GpuResource', 'ResourceRequests', 'ResourceLimits', 'ResourceRequirements', @@ -123,6 +129,7 @@ 'LogAnalytics', 'ContainerGroupDiagnostics', 'ContainerGroupNetworkProfile', + 'DnsConfiguration', 'ContainerGroup', 'OperationDisplay', 'Operation', @@ -137,6 +144,7 @@ 'Resource', 'ContainerGroupPaged', 'ContainerNetworkProtocol', + 'GpuSku', 'ResourceIdentityType', 'ContainerGroupRestartPolicy', 'ContainerGroupNetworkProtocol', diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py index 517e4ac6e1c3..94962b923a53 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py @@ -71,6 +71,8 @@ class ContainerGroup(Resource): group. :type network_profile: ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile + :param dns_config: The DNS config information for a container group. + :type dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration """ _validation = { @@ -100,6 +102,7 @@ class ContainerGroup(Resource): 'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'}, 'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'}, 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'}, + 'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfiguration'}, } def __init__(self, **kwargs): @@ -115,3 +118,4 @@ def __init__(self, **kwargs): self.instance_view = None self.diagnostics = kwargs.get('diagnostics', None) self.network_profile = kwargs.get('network_profile', None) + self.dns_config = kwargs.get('dns_config', None) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py index 4b0781493e32..2c31e749d5bd 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py @@ -71,6 +71,8 @@ class ContainerGroup(Resource): group. :type network_profile: ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile + :param dns_config: The DNS config information for a container group. + :type dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration """ _validation = { @@ -100,9 +102,10 @@ class ContainerGroup(Resource): 'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'}, 'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'}, 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'}, + 'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfiguration'}, } - def __init__(self, *, containers, os_type, location: str=None, tags=None, identity=None, image_registry_credentials=None, restart_policy=None, ip_address=None, volumes=None, diagnostics=None, network_profile=None, **kwargs) -> None: + def __init__(self, *, containers, os_type, location: str=None, tags=None, identity=None, image_registry_credentials=None, restart_policy=None, ip_address=None, volumes=None, diagnostics=None, network_profile=None, dns_config=None, **kwargs) -> None: super(ContainerGroup, self).__init__(location=location, tags=tags, **kwargs) self.identity = identity self.provisioning_state = None @@ -115,3 +118,4 @@ def __init__(self, *, containers, os_type, location: str=None, tags=None, identi self.instance_view = None self.diagnostics = diagnostics self.network_profile = network_profile + self.dns_config = dns_config diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py index ada6501a1dd9..b7556beaa4f9 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py @@ -18,6 +18,13 @@ class ContainerNetworkProtocol(str, Enum): udp = "UDP" +class GpuSku(str, Enum): + + k80 = "K80" + p100 = "P100" + v100 = "V100" + + class ResourceIdentityType(str, Enum): system_assigned = "SystemAssigned" diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration.py new file mode 100644 index 000000000000..d9775ab31ee1 --- /dev/null +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration.py @@ -0,0 +1,43 @@ +# 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 DnsConfiguration(Model): + """DNS configuration for the container group. + + All required parameters must be populated in order to send to Azure. + + :param name_servers: Required. The DNS servers for the container group. + :type name_servers: list[str] + :param search_domains: The DNS search domains for hostname lookup in the + container group. + :type search_domains: str + :param options: The DNS options for the container group. + :type options: str + """ + + _validation = { + 'name_servers': {'required': True}, + } + + _attribute_map = { + 'name_servers': {'key': 'nameServers', 'type': '[str]'}, + 'search_domains': {'key': 'searchDomains', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DnsConfiguration, self).__init__(**kwargs) + self.name_servers = kwargs.get('name_servers', None) + self.search_domains = kwargs.get('search_domains', None) + self.options = kwargs.get('options', None) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration_py3.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration_py3.py new file mode 100644 index 000000000000..73be32358552 --- /dev/null +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/dns_configuration_py3.py @@ -0,0 +1,43 @@ +# 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 DnsConfiguration(Model): + """DNS configuration for the container group. + + All required parameters must be populated in order to send to Azure. + + :param name_servers: Required. The DNS servers for the container group. + :type name_servers: list[str] + :param search_domains: The DNS search domains for hostname lookup in the + container group. + :type search_domains: str + :param options: The DNS options for the container group. + :type options: str + """ + + _validation = { + 'name_servers': {'required': True}, + } + + _attribute_map = { + 'name_servers': {'key': 'nameServers', 'type': '[str]'}, + 'search_domains': {'key': 'searchDomains', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'str'}, + } + + def __init__(self, *, name_servers, search_domains: str=None, options: str=None, **kwargs) -> None: + super(DnsConfiguration, self).__init__(**kwargs) + self.name_servers = name_servers + self.search_domains = search_domains + self.options = options diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource.py new file mode 100644 index 000000000000..6b9bf7d7bf06 --- /dev/null +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource.py @@ -0,0 +1,40 @@ +# 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 GpuResource(Model): + """The GPU resource. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. The count of the GPU resource. + :type count: int + :param sku: Required. The SKU of the GPU resource. Possible values + include: 'K80', 'P100', 'V100' + :type sku: str or ~azure.mgmt.containerinstance.models.GpuSku + """ + + _validation = { + 'count': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GpuResource, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource_py3.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource_py3.py new file mode 100644 index 000000000000..c2b110219889 --- /dev/null +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/gpu_resource_py3.py @@ -0,0 +1,40 @@ +# 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 GpuResource(Model): + """The GPU resource. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. The count of the GPU resource. + :type count: int + :param sku: Required. The SKU of the GPU resource. Possible values + include: 'K80', 'P100', 'V100' + :type sku: str or ~azure.mgmt.containerinstance.models.GpuSku + """ + + _validation = { + 'count': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, *, count: int, sku, **kwargs) -> None: + super(GpuResource, self).__init__(**kwargs) + self.count = count + self.sku = sku diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits.py index b30fddc28856..d3f4972ff33c 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits.py @@ -19,14 +19,18 @@ class ResourceLimits(Model): :type memory_in_gb: float :param cpu: The CPU limit of this container instance. :type cpu: float + :param gpu: The GPU limit of this container instance. + :type gpu: ~azure.mgmt.containerinstance.models.GpuResource """ _attribute_map = { 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, 'cpu': {'key': 'cpu', 'type': 'float'}, + 'gpu': {'key': 'gpu', 'type': 'GpuResource'}, } def __init__(self, **kwargs): super(ResourceLimits, self).__init__(**kwargs) self.memory_in_gb = kwargs.get('memory_in_gb', None) self.cpu = kwargs.get('cpu', None) + self.gpu = kwargs.get('gpu', None) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits_py3.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits_py3.py index ec57b66a1458..a702acaf33b4 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits_py3.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits_py3.py @@ -19,14 +19,18 @@ class ResourceLimits(Model): :type memory_in_gb: float :param cpu: The CPU limit of this container instance. :type cpu: float + :param gpu: The GPU limit of this container instance. + :type gpu: ~azure.mgmt.containerinstance.models.GpuResource """ _attribute_map = { 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, 'cpu': {'key': 'cpu', 'type': 'float'}, + 'gpu': {'key': 'gpu', 'type': 'GpuResource'}, } - def __init__(self, *, memory_in_gb: float=None, cpu: float=None, **kwargs) -> None: + def __init__(self, *, memory_in_gb: float=None, cpu: float=None, gpu=None, **kwargs) -> None: super(ResourceLimits, self).__init__(**kwargs) self.memory_in_gb = memory_in_gb self.cpu = cpu + self.gpu = gpu diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests.py index 1ab6580d6eda..74817e729c42 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests.py @@ -22,6 +22,8 @@ class ResourceRequests(Model): :type memory_in_gb: float :param cpu: Required. The CPU request of this container instance. :type cpu: float + :param gpu: The GPU request of this container instance. + :type gpu: ~azure.mgmt.containerinstance.models.GpuResource """ _validation = { @@ -32,9 +34,11 @@ class ResourceRequests(Model): _attribute_map = { 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, 'cpu': {'key': 'cpu', 'type': 'float'}, + 'gpu': {'key': 'gpu', 'type': 'GpuResource'}, } def __init__(self, **kwargs): super(ResourceRequests, self).__init__(**kwargs) self.memory_in_gb = kwargs.get('memory_in_gb', None) self.cpu = kwargs.get('cpu', None) + self.gpu = kwargs.get('gpu', None) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests_py3.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests_py3.py index a0c78fc84cd9..f4ab13f5efa8 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests_py3.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests_py3.py @@ -22,6 +22,8 @@ class ResourceRequests(Model): :type memory_in_gb: float :param cpu: Required. The CPU request of this container instance. :type cpu: float + :param gpu: The GPU request of this container instance. + :type gpu: ~azure.mgmt.containerinstance.models.GpuResource """ _validation = { @@ -32,9 +34,11 @@ class ResourceRequests(Model): _attribute_map = { 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, 'cpu': {'key': 'cpu', 'type': 'float'}, + 'gpu': {'key': 'gpu', 'type': 'GpuResource'}, } - def __init__(self, *, memory_in_gb: float, cpu: float, **kwargs) -> None: + def __init__(self, *, memory_in_gb: float, cpu: float, gpu=None, **kwargs) -> None: super(ResourceRequests, self).__init__(**kwargs) self.memory_in_gb = memory_in_gb self.cpu = cpu + self.gpu = gpu diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py index 4745e686810c..d24076f8d84b 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.2.1" +VERSION = "1.3.0"