Skip to content

Commit 9efcde4

Browse files
AutorestCIlmazuel
authored andcommitted
[AutoPR] containerinstance/resource-manager (#3736)
* Generated from b28170d473471c298dc43f09299dd655d8e03982 (#3729) Update swagger with DNSConfig and GPU * ACI 1.3.0
1 parent 23f8e27 commit 9efcde4

14 files changed

+218
-4
lines changed

azure-mgmt-containerinstance/HISTORY.rst

+9
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
Release History
44
===============
55

6+
1.3.0 (2018-11-05)
7+
++++++++++++++++++
8+
9+
**Features**
10+
11+
- Model ResourceLimits has a new parameter gpu
12+
- Model ResourceRequests has a new parameter gpu
13+
- Model ContainerGroup has a new parameter dns_config
14+
615
1.2.1 (2018-10-16)
716
++++++++++++++++++
817

azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py

+8
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from .container_state_py3 import ContainerState
1616
from .event_py3 import Event
1717
from .container_properties_instance_view_py3 import ContainerPropertiesInstanceView
18+
from .gpu_resource_py3 import GpuResource
1819
from .resource_requests_py3 import ResourceRequests
1920
from .resource_limits_py3 import ResourceLimits
2021
from .resource_requirements_py3 import ResourceRequirements
@@ -35,6 +36,7 @@
3536
from .log_analytics_py3 import LogAnalytics
3637
from .container_group_diagnostics_py3 import ContainerGroupDiagnostics
3738
from .container_group_network_profile_py3 import ContainerGroupNetworkProfile
39+
from .dns_configuration_py3 import DnsConfiguration
3840
from .container_group_py3 import ContainerGroup
3941
from .operation_display_py3 import OperationDisplay
4042
from .operation_py3 import Operation
@@ -53,6 +55,7 @@
5355
from .container_state import ContainerState
5456
from .event import Event
5557
from .container_properties_instance_view import ContainerPropertiesInstanceView
58+
from .gpu_resource import GpuResource
5659
from .resource_requests import ResourceRequests
5760
from .resource_limits import ResourceLimits
5861
from .resource_requirements import ResourceRequirements
@@ -73,6 +76,7 @@
7376
from .log_analytics import LogAnalytics
7477
from .container_group_diagnostics import ContainerGroupDiagnostics
7578
from .container_group_network_profile import ContainerGroupNetworkProfile
79+
from .dns_configuration import DnsConfiguration
7680
from .container_group import ContainerGroup
7781
from .operation_display import OperationDisplay
7882
from .operation import Operation
@@ -88,6 +92,7 @@
8892
from .container_group_paged import ContainerGroupPaged
8993
from .container_instance_management_client_enums import (
9094
ContainerNetworkProtocol,
95+
GpuSku,
9196
ResourceIdentityType,
9297
ContainerGroupRestartPolicy,
9398
ContainerGroupNetworkProtocol,
@@ -103,6 +108,7 @@
103108
'ContainerState',
104109
'Event',
105110
'ContainerPropertiesInstanceView',
111+
'GpuResource',
106112
'ResourceRequests',
107113
'ResourceLimits',
108114
'ResourceRequirements',
@@ -123,6 +129,7 @@
123129
'LogAnalytics',
124130
'ContainerGroupDiagnostics',
125131
'ContainerGroupNetworkProfile',
132+
'DnsConfiguration',
126133
'ContainerGroup',
127134
'OperationDisplay',
128135
'Operation',
@@ -137,6 +144,7 @@
137144
'Resource',
138145
'ContainerGroupPaged',
139146
'ContainerNetworkProtocol',
147+
'GpuSku',
140148
'ResourceIdentityType',
141149
'ContainerGroupRestartPolicy',
142150
'ContainerGroupNetworkProtocol',

azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py

+4
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ class ContainerGroup(Resource):
7171
group.
7272
:type network_profile:
7373
~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile
74+
:param dns_config: The DNS config information for a container group.
75+
:type dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration
7476
"""
7577

7678
_validation = {
@@ -100,6 +102,7 @@ class ContainerGroup(Resource):
100102
'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'},
101103
'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'},
102104
'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'},
105+
'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfiguration'},
103106
}
104107

105108
def __init__(self, **kwargs):
@@ -115,3 +118,4 @@ def __init__(self, **kwargs):
115118
self.instance_view = None
116119
self.diagnostics = kwargs.get('diagnostics', None)
117120
self.network_profile = kwargs.get('network_profile', None)
121+
self.dns_config = kwargs.get('dns_config', None)

azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ class ContainerGroup(Resource):
7171
group.
7272
:type network_profile:
7373
~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile
74+
:param dns_config: The DNS config information for a container group.
75+
:type dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration
7476
"""
7577

7678
_validation = {
@@ -100,9 +102,10 @@ class ContainerGroup(Resource):
100102
'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'},
101103
'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'},
102104
'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'},
105+
'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfiguration'},
103106
}
104107

105-
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:
108+
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:
106109
super(ContainerGroup, self).__init__(location=location, tags=tags, **kwargs)
107110
self.identity = identity
108111
self.provisioning_state = None
@@ -115,3 +118,4 @@ def __init__(self, *, containers, os_type, location: str=None, tags=None, identi
115118
self.instance_view = None
116119
self.diagnostics = diagnostics
117120
self.network_profile = network_profile
121+
self.dns_config = dns_config

azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ class ContainerNetworkProtocol(str, Enum):
1818
udp = "UDP"
1919

2020

21+
class GpuSku(str, Enum):
22+
23+
k80 = "K80"
24+
p100 = "P100"
25+
v100 = "V100"
26+
27+
2128
class ResourceIdentityType(str, Enum):
2229

2330
system_assigned = "SystemAssigned"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 DnsConfiguration(Model):
16+
"""DNS configuration for the container group.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param name_servers: Required. The DNS servers for the container group.
21+
:type name_servers: list[str]
22+
:param search_domains: The DNS search domains for hostname lookup in the
23+
container group.
24+
:type search_domains: str
25+
:param options: The DNS options for the container group.
26+
:type options: str
27+
"""
28+
29+
_validation = {
30+
'name_servers': {'required': True},
31+
}
32+
33+
_attribute_map = {
34+
'name_servers': {'key': 'nameServers', 'type': '[str]'},
35+
'search_domains': {'key': 'searchDomains', 'type': 'str'},
36+
'options': {'key': 'options', 'type': 'str'},
37+
}
38+
39+
def __init__(self, **kwargs):
40+
super(DnsConfiguration, self).__init__(**kwargs)
41+
self.name_servers = kwargs.get('name_servers', None)
42+
self.search_domains = kwargs.get('search_domains', None)
43+
self.options = kwargs.get('options', None)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 DnsConfiguration(Model):
16+
"""DNS configuration for the container group.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param name_servers: Required. The DNS servers for the container group.
21+
:type name_servers: list[str]
22+
:param search_domains: The DNS search domains for hostname lookup in the
23+
container group.
24+
:type search_domains: str
25+
:param options: The DNS options for the container group.
26+
:type options: str
27+
"""
28+
29+
_validation = {
30+
'name_servers': {'required': True},
31+
}
32+
33+
_attribute_map = {
34+
'name_servers': {'key': 'nameServers', 'type': '[str]'},
35+
'search_domains': {'key': 'searchDomains', 'type': 'str'},
36+
'options': {'key': 'options', 'type': 'str'},
37+
}
38+
39+
def __init__(self, *, name_servers, search_domains: str=None, options: str=None, **kwargs) -> None:
40+
super(DnsConfiguration, self).__init__(**kwargs)
41+
self.name_servers = name_servers
42+
self.search_domains = search_domains
43+
self.options = options
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 GpuResource(Model):
16+
"""The GPU resource.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param count: Required. The count of the GPU resource.
21+
:type count: int
22+
:param sku: Required. The SKU of the GPU resource. Possible values
23+
include: 'K80', 'P100', 'V100'
24+
:type sku: str or ~azure.mgmt.containerinstance.models.GpuSku
25+
"""
26+
27+
_validation = {
28+
'count': {'required': True},
29+
'sku': {'required': True},
30+
}
31+
32+
_attribute_map = {
33+
'count': {'key': 'count', 'type': 'int'},
34+
'sku': {'key': 'sku', 'type': 'str'},
35+
}
36+
37+
def __init__(self, **kwargs):
38+
super(GpuResource, self).__init__(**kwargs)
39+
self.count = kwargs.get('count', None)
40+
self.sku = kwargs.get('sku', None)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 GpuResource(Model):
16+
"""The GPU resource.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param count: Required. The count of the GPU resource.
21+
:type count: int
22+
:param sku: Required. The SKU of the GPU resource. Possible values
23+
include: 'K80', 'P100', 'V100'
24+
:type sku: str or ~azure.mgmt.containerinstance.models.GpuSku
25+
"""
26+
27+
_validation = {
28+
'count': {'required': True},
29+
'sku': {'required': True},
30+
}
31+
32+
_attribute_map = {
33+
'count': {'key': 'count', 'type': 'int'},
34+
'sku': {'key': 'sku', 'type': 'str'},
35+
}
36+
37+
def __init__(self, *, count: int, sku, **kwargs) -> None:
38+
super(GpuResource, self).__init__(**kwargs)
39+
self.count = count
40+
self.sku = sku

azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits.py

+4
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@ class ResourceLimits(Model):
1919
:type memory_in_gb: float
2020
:param cpu: The CPU limit of this container instance.
2121
:type cpu: float
22+
:param gpu: The GPU limit of this container instance.
23+
:type gpu: ~azure.mgmt.containerinstance.models.GpuResource
2224
"""
2325

2426
_attribute_map = {
2527
'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'},
2628
'cpu': {'key': 'cpu', 'type': 'float'},
29+
'gpu': {'key': 'gpu', 'type': 'GpuResource'},
2730
}
2831

2932
def __init__(self, **kwargs):
3033
super(ResourceLimits, self).__init__(**kwargs)
3134
self.memory_in_gb = kwargs.get('memory_in_gb', None)
3235
self.cpu = kwargs.get('cpu', None)
36+
self.gpu = kwargs.get('gpu', None)

azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_limits_py3.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@ class ResourceLimits(Model):
1919
:type memory_in_gb: float
2020
:param cpu: The CPU limit of this container instance.
2121
:type cpu: float
22+
:param gpu: The GPU limit of this container instance.
23+
:type gpu: ~azure.mgmt.containerinstance.models.GpuResource
2224
"""
2325

2426
_attribute_map = {
2527
'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'},
2628
'cpu': {'key': 'cpu', 'type': 'float'},
29+
'gpu': {'key': 'gpu', 'type': 'GpuResource'},
2730
}
2831

29-
def __init__(self, *, memory_in_gb: float=None, cpu: float=None, **kwargs) -> None:
32+
def __init__(self, *, memory_in_gb: float=None, cpu: float=None, gpu=None, **kwargs) -> None:
3033
super(ResourceLimits, self).__init__(**kwargs)
3134
self.memory_in_gb = memory_in_gb
3235
self.cpu = cpu
36+
self.gpu = gpu

azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests.py

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class ResourceRequests(Model):
2222
:type memory_in_gb: float
2323
:param cpu: Required. The CPU request of this container instance.
2424
:type cpu: float
25+
:param gpu: The GPU request of this container instance.
26+
:type gpu: ~azure.mgmt.containerinstance.models.GpuResource
2527
"""
2628

2729
_validation = {
@@ -32,9 +34,11 @@ class ResourceRequests(Model):
3234
_attribute_map = {
3335
'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'},
3436
'cpu': {'key': 'cpu', 'type': 'float'},
37+
'gpu': {'key': 'gpu', 'type': 'GpuResource'},
3538
}
3639

3740
def __init__(self, **kwargs):
3841
super(ResourceRequests, self).__init__(**kwargs)
3942
self.memory_in_gb = kwargs.get('memory_in_gb', None)
4043
self.cpu = kwargs.get('cpu', None)
44+
self.gpu = kwargs.get('gpu', None)

azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/resource_requests_py3.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class ResourceRequests(Model):
2222
:type memory_in_gb: float
2323
:param cpu: Required. The CPU request of this container instance.
2424
:type cpu: float
25+
:param gpu: The GPU request of this container instance.
26+
:type gpu: ~azure.mgmt.containerinstance.models.GpuResource
2527
"""
2628

2729
_validation = {
@@ -32,9 +34,11 @@ class ResourceRequests(Model):
3234
_attribute_map = {
3335
'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'},
3436
'cpu': {'key': 'cpu', 'type': 'float'},
37+
'gpu': {'key': 'gpu', 'type': 'GpuResource'},
3538
}
3639

37-
def __init__(self, *, memory_in_gb: float, cpu: float, **kwargs) -> None:
40+
def __init__(self, *, memory_in_gb: float, cpu: float, gpu=None, **kwargs) -> None:
3841
super(ResourceRequests, self).__init__(**kwargs)
3942
self.memory_in_gb = memory_in_gb
4043
self.cpu = cpu
44+
self.gpu = gpu

0 commit comments

Comments
 (0)