Skip to content

Commit cbc6a71

Browse files
authored
[AutoPR containerinstance/resource-manager] Adding June Swagger Update - Azure Container Instance (#2676)
* Generated from dd1d82ca6db8078870ccf13fe430a75a1ebe90d7 updating api version * Generated from 2988a6ef3f5b633295691d3c0bacdd5cce3fb651 updating basic information to point at correct tag
1 parent d8610be commit cbc6a71

35 files changed

+583
-254
lines changed

azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from msrest.service_client import ServiceClient
12+
from msrest.service_client import SDKClient
1313
from msrest import Serializer, Deserializer
1414
from msrestazure import AzureConfiguration
1515
from .version import VERSION
@@ -55,7 +55,7 @@ def __init__(
5555
self.subscription_id = subscription_id
5656

5757

58-
class ContainerInstanceManagementClient(object):
58+
class ContainerInstanceManagementClient(SDKClient):
5959
"""ContainerInstanceManagementClient
6060
6161
:ivar config: Configuration for client.
@@ -86,10 +86,10 @@ def __init__(
8686
self, credentials, subscription_id, base_url=None):
8787

8888
self.config = ContainerInstanceManagementClientConfiguration(credentials, subscription_id, base_url)
89-
self._client = ServiceClient(self.config.credentials, self.config)
89+
super(ContainerInstanceManagementClient, self).__init__(self.config.credentials, self.config)
9090

9191
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
92-
self.api_version = '2018-04-01'
92+
self.api_version = '2018-06-01'
9393
self._serialize = Serializer(client_models)
9494
self._deserialize = Deserializer(client_models)
9595

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
from .resource_limits_py3 import ResourceLimits
2020
from .resource_requirements_py3 import ResourceRequirements
2121
from .volume_mount_py3 import VolumeMount
22+
from .container_exec_py3 import ContainerExec
23+
from .container_http_get_py3 import ContainerHttpGet
24+
from .container_probe_py3 import ContainerProbe
2225
from .container_py3 import Container
2326
from .azure_file_volume_py3 import AzureFileVolume
2427
from .git_repo_volume_py3 import GitRepoVolume
@@ -27,6 +30,8 @@
2730
from .port_py3 import Port
2831
from .ip_address_py3 import IpAddress
2932
from .container_group_properties_instance_view_py3 import ContainerGroupPropertiesInstanceView
33+
from .log_analytics_py3 import LogAnalytics
34+
from .container_group_diagnostics_py3 import ContainerGroupDiagnostics
3035
from .container_group_py3 import ContainerGroup
3136
from .operation_display_py3 import OperationDisplay
3237
from .operation_py3 import Operation
@@ -49,6 +54,9 @@
4954
from .resource_limits import ResourceLimits
5055
from .resource_requirements import ResourceRequirements
5156
from .volume_mount import VolumeMount
57+
from .container_exec import ContainerExec
58+
from .container_http_get import ContainerHttpGet
59+
from .container_probe import ContainerProbe
5260
from .container import Container
5361
from .azure_file_volume import AzureFileVolume
5462
from .git_repo_volume import GitRepoVolume
@@ -57,6 +65,8 @@
5765
from .port import Port
5866
from .ip_address import IpAddress
5967
from .container_group_properties_instance_view import ContainerGroupPropertiesInstanceView
68+
from .log_analytics import LogAnalytics
69+
from .container_group_diagnostics import ContainerGroupDiagnostics
6070
from .container_group import ContainerGroup
6171
from .operation_display import OperationDisplay
6272
from .operation import Operation
@@ -88,6 +98,9 @@
8898
'ResourceLimits',
8999
'ResourceRequirements',
90100
'VolumeMount',
101+
'ContainerExec',
102+
'ContainerHttpGet',
103+
'ContainerProbe',
91104
'Container',
92105
'AzureFileVolume',
93106
'GitRepoVolume',
@@ -96,6 +109,8 @@
96109
'Port',
97110
'IpAddress',
98111
'ContainerGroupPropertiesInstanceView',
112+
'LogAnalytics',
113+
'ContainerGroupDiagnostics',
99114
'ContainerGroup',
100115
'OperationDisplay',
101116
'Operation',

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class Container(Model):
4545
instance.
4646
:type volume_mounts:
4747
list[~azure.mgmt.containerinstance.models.VolumeMount]
48+
:param liveness_probe: The liveness probe.
49+
:type liveness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe
50+
:param readiness_probe: The readiness probe.
51+
:type readiness_probe: ~azure.mgmt.containerinstance.models.ContainerProbe
4852
"""
4953

5054
_validation = {
@@ -63,6 +67,8 @@ class Container(Model):
6367
'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerPropertiesInstanceView'},
6468
'resources': {'key': 'properties.resources', 'type': 'ResourceRequirements'},
6569
'volume_mounts': {'key': 'properties.volumeMounts', 'type': '[VolumeMount]'},
70+
'liveness_probe': {'key': 'properties.livenessProbe', 'type': 'ContainerProbe'},
71+
'readiness_probe': {'key': 'properties.readinessProbe', 'type': 'ContainerProbe'},
6672
}
6773

6874
def __init__(self, **kwargs):
@@ -75,3 +81,5 @@ def __init__(self, **kwargs):
7581
self.instance_view = None
7682
self.resources = kwargs.get('resources', None)
7783
self.volume_mounts = kwargs.get('volume_mounts', None)
84+
self.liveness_probe = kwargs.get('liveness_probe', None)
85+
self.readiness_probe = kwargs.get('readiness_probe', None)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 ContainerExec(Model):
16+
"""The container execution command, for liveness or readiness probe.
17+
18+
:param command: The commands to execute within the container.
19+
:type command: list[str]
20+
"""
21+
22+
_attribute_map = {
23+
'command': {'key': 'command', 'type': '[str]'},
24+
}
25+
26+
def __init__(self, **kwargs):
27+
super(ContainerExec, self).__init__(**kwargs)
28+
self.command = kwargs.get('command', None)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 ContainerExec(Model):
16+
"""The container execution command, for liveness or readiness probe.
17+
18+
:param command: The commands to execute within the container.
19+
:type command: list[str]
20+
"""
21+
22+
_attribute_map = {
23+
'command': {'key': 'command', 'type': '[str]'},
24+
}
25+
26+
def __init__(self, *, command=None, **kwargs) -> None:
27+
super(ContainerExec, self).__init__(**kwargs)
28+
self.command = command

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

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,18 @@
1515
class ContainerExecResponse(Model):
1616
"""The information for the container exec command.
1717
18-
Variables are only populated by the server, and will be ignored when
19-
sending a request.
20-
21-
:ivar web_socket_uri: The uri for the exec websocket.
22-
:vartype web_socket_uri: str
23-
:ivar password: The password to start the exec command.
24-
:vartype password: str
18+
:param web_socket_uri: The uri for the exec websocket.
19+
:type web_socket_uri: str
20+
:param password: The password to start the exec command.
21+
:type password: str
2522
"""
2623

27-
_validation = {
28-
'web_socket_uri': {'readonly': True},
29-
'password': {'readonly': True},
30-
}
31-
3224
_attribute_map = {
3325
'web_socket_uri': {'key': 'webSocketUri', 'type': 'str'},
3426
'password': {'key': 'password', 'type': 'str'},
3527
}
3628

3729
def __init__(self, **kwargs):
3830
super(ContainerExecResponse, self).__init__(**kwargs)
39-
self.web_socket_uri = None
40-
self.password = None
31+
self.web_socket_uri = kwargs.get('web_socket_uri', None)
32+
self.password = kwargs.get('password', None)

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

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,18 @@
1515
class ContainerExecResponse(Model):
1616
"""The information for the container exec command.
1717
18-
Variables are only populated by the server, and will be ignored when
19-
sending a request.
20-
21-
:ivar web_socket_uri: The uri for the exec websocket.
22-
:vartype web_socket_uri: str
23-
:ivar password: The password to start the exec command.
24-
:vartype password: str
18+
:param web_socket_uri: The uri for the exec websocket.
19+
:type web_socket_uri: str
20+
:param password: The password to start the exec command.
21+
:type password: str
2522
"""
2623

27-
_validation = {
28-
'web_socket_uri': {'readonly': True},
29-
'password': {'readonly': True},
30-
}
31-
3224
_attribute_map = {
3325
'web_socket_uri': {'key': 'webSocketUri', 'type': 'str'},
3426
'password': {'key': 'password', 'type': 'str'},
3527
}
3628

37-
def __init__(self, **kwargs) -> None:
29+
def __init__(self, *, web_socket_uri: str=None, password: str=None, **kwargs) -> None:
3830
super(ContainerExecResponse, self).__init__(**kwargs)
39-
self.web_socket_uri = None
40-
self.password = None
31+
self.web_socket_uri = web_socket_uri
32+
self.password = password

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ class ContainerGroup(Resource):
6161
in response.
6262
:vartype instance_view:
6363
~azure.mgmt.containerinstance.models.ContainerGroupPropertiesInstanceView
64+
:param diagnostics: The diagnostic information for a container group.
65+
:type diagnostics:
66+
~azure.mgmt.containerinstance.models.ContainerGroupDiagnostics
6467
"""
6568

6669
_validation = {
@@ -87,6 +90,7 @@ class ContainerGroup(Resource):
8790
'os_type': {'key': 'properties.osType', 'type': 'str'},
8891
'volumes': {'key': 'properties.volumes', 'type': '[Volume]'},
8992
'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'},
93+
'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'},
9094
}
9195

9296
def __init__(self, **kwargs):
@@ -99,3 +103,4 @@ def __init__(self, **kwargs):
99103
self.os_type = kwargs.get('os_type', None)
100104
self.volumes = kwargs.get('volumes', None)
101105
self.instance_view = None
106+
self.diagnostics = kwargs.get('diagnostics', None)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 ContainerGroupDiagnostics(Model):
16+
"""Container group diagnostic information.
17+
18+
:param log_analytics: Container group log analytics information.
19+
:type log_analytics: ~azure.mgmt.containerinstance.models.LogAnalytics
20+
"""
21+
22+
_attribute_map = {
23+
'log_analytics': {'key': 'logAnalytics', 'type': 'LogAnalytics'},
24+
}
25+
26+
def __init__(self, **kwargs):
27+
super(ContainerGroupDiagnostics, self).__init__(**kwargs)
28+
self.log_analytics = kwargs.get('log_analytics', None)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 ContainerGroupDiagnostics(Model):
16+
"""Container group diagnostic information.
17+
18+
:param log_analytics: Container group log analytics information.
19+
:type log_analytics: ~azure.mgmt.containerinstance.models.LogAnalytics
20+
"""
21+
22+
_attribute_map = {
23+
'log_analytics': {'key': 'logAnalytics', 'type': 'LogAnalytics'},
24+
}
25+
26+
def __init__(self, *, log_analytics=None, **kwargs) -> None:
27+
super(ContainerGroupDiagnostics, self).__init__(**kwargs)
28+
self.log_analytics = log_analytics

0 commit comments

Comments
 (0)