Skip to content

Commit 9b5fa8c

Browse files
authored
GA containerinstance (Azure#15538)
1 parent efb2ade commit 9b5fa8c

File tree

11 files changed

+359
-238
lines changed

11 files changed

+359
-238
lines changed

sdk/containerinstance/azure-mgmt-containerinstance/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Release History
22

3+
## 7.0.0 (2020-11-25)
4+
35
## 7.0.0b1 (2020-10-12)
46

57
This is beta preview version.

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "7.0.0b1"
9+
VERSION = "7.0.0"

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_container_groups_operations.py

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from azure.mgmt.core.exceptions import ARMErrorFormat
1717
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
1818

19-
from ... import models
19+
from ... import models as _models
2020

2121
T = TypeVar('T')
2222
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -35,7 +35,7 @@ class ContainerGroupsOperations:
3535
:param deserializer: An object model deserializer.
3636
"""
3737

38-
models = models
38+
models = _models
3939

4040
def __init__(self, client, config, serializer, deserializer) -> None:
4141
self._client = client
@@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4646
def list(
4747
self,
4848
**kwargs
49-
) -> AsyncIterable["models.ContainerGroupListResult"]:
49+
) -> AsyncIterable["_models.ContainerGroupListResult"]:
5050
"""Get a list of container groups in the specified subscription.
5151
5252
Get a list of container groups in the specified subscription. This operation returns properties
@@ -58,7 +58,7 @@ def list(
5858
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerinstance.models.ContainerGroupListResult]
5959
:raises: ~azure.core.exceptions.HttpResponseError
6060
"""
61-
cls = kwargs.pop('cls', None) # type: ClsType["models.ContainerGroupListResult"]
61+
cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerGroupListResult"]
6262
error_map = {
6363
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6464
}
@@ -117,7 +117,7 @@ def list_by_resource_group(
117117
self,
118118
resource_group_name: str,
119119
**kwargs
120-
) -> AsyncIterable["models.ContainerGroupListResult"]:
120+
) -> AsyncIterable["_models.ContainerGroupListResult"]:
121121
"""Get a list of container groups in the specified subscription and resource group.
122122
123123
Get a list of container groups in a specified subscription and resource group. This operation
@@ -131,7 +131,7 @@ def list_by_resource_group(
131131
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerinstance.models.ContainerGroupListResult]
132132
:raises: ~azure.core.exceptions.HttpResponseError
133133
"""
134-
cls = kwargs.pop('cls', None) # type: ClsType["models.ContainerGroupListResult"]
134+
cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerGroupListResult"]
135135
error_map = {
136136
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
137137
}
@@ -192,7 +192,7 @@ async def get(
192192
resource_group_name: str,
193193
container_group_name: str,
194194
**kwargs
195-
) -> "models.ContainerGroup":
195+
) -> "_models.ContainerGroup":
196196
"""Get the properties of the specified container group.
197197
198198
Gets the properties of the specified container group in the specified subscription and resource
@@ -208,7 +208,7 @@ async def get(
208208
:rtype: ~azure.mgmt.containerinstance.models.ContainerGroup
209209
:raises: ~azure.core.exceptions.HttpResponseError
210210
"""
211-
cls = kwargs.pop('cls', None) # type: ClsType["models.ContainerGroup"]
211+
cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerGroup"]
212212
error_map = {
213213
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
214214
}
@@ -253,10 +253,10 @@ async def _create_or_update_initial(
253253
self,
254254
resource_group_name: str,
255255
container_group_name: str,
256-
container_group: "models.ContainerGroup",
256+
container_group: "_models.ContainerGroup",
257257
**kwargs
258-
) -> "models.ContainerGroup":
259-
cls = kwargs.pop('cls', None) # type: ClsType["models.ContainerGroup"]
258+
) -> "_models.ContainerGroup":
259+
cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerGroup"]
260260
error_map = {
261261
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
262262
}
@@ -310,9 +310,9 @@ async def begin_create_or_update(
310310
self,
311311
resource_group_name: str,
312312
container_group_name: str,
313-
container_group: "models.ContainerGroup",
313+
container_group: "_models.ContainerGroup",
314314
**kwargs
315-
) -> AsyncLROPoller["models.ContainerGroup"]:
315+
) -> AsyncLROPoller["_models.ContainerGroup"]:
316316
"""Create or update container groups.
317317
318318
Create or update container groups with specified configurations.
@@ -334,7 +334,7 @@ async def begin_create_or_update(
334334
:raises ~azure.core.exceptions.HttpResponseError:
335335
"""
336336
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
337-
cls = kwargs.pop('cls', None) # type: ClsType["models.ContainerGroup"]
337+
cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerGroup"]
338338
lro_delay = kwargs.pop(
339339
'polling_interval',
340340
self._config.polling_interval
@@ -359,7 +359,13 @@ def get_long_running_output(pipeline_response):
359359
return cls(pipeline_response, deserialized, {})
360360
return deserialized
361361

362-
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
362+
path_format_arguments = {
363+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
364+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
365+
'containerGroupName': self._serialize.url("container_group_name", container_group_name, 'str'),
366+
}
367+
368+
if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
363369
elif polling is False: polling_method = AsyncNoPolling()
364370
else: polling_method = polling
365371
if cont_token:
@@ -377,9 +383,9 @@ async def update(
377383
self,
378384
resource_group_name: str,
379385
container_group_name: str,
380-
resource: "models.Resource",
386+
resource: "_models.Resource",
381387
**kwargs
382-
) -> "models.ContainerGroup":
388+
) -> "_models.ContainerGroup":
383389
"""Update container groups.
384390
385391
Updates container group tags with specified values.
@@ -395,7 +401,7 @@ async def update(
395401
:rtype: ~azure.mgmt.containerinstance.models.ContainerGroup
396402
:raises: ~azure.core.exceptions.HttpResponseError
397403
"""
398-
cls = kwargs.pop('cls', None) # type: ClsType["models.ContainerGroup"]
404+
cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerGroup"]
399405
error_map = {
400406
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
401407
}
@@ -446,8 +452,8 @@ async def _delete_initial(
446452
resource_group_name: str,
447453
container_group_name: str,
448454
**kwargs
449-
) -> Optional["models.ContainerGroup"]:
450-
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ContainerGroup"]]
455+
) -> Optional["_models.ContainerGroup"]:
456+
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ContainerGroup"]]
451457
error_map = {
452458
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
453459
}
@@ -495,7 +501,7 @@ async def begin_delete(
495501
resource_group_name: str,
496502
container_group_name: str,
497503
**kwargs
498-
) -> AsyncLROPoller["models.ContainerGroup"]:
504+
) -> AsyncLROPoller["_models.ContainerGroup"]:
499505
"""Delete the specified container group.
500506
501507
Delete the specified container group in the specified subscription and resource group. The
@@ -516,7 +522,7 @@ async def begin_delete(
516522
:raises ~azure.core.exceptions.HttpResponseError:
517523
"""
518524
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
519-
cls = kwargs.pop('cls', None) # type: ClsType["models.ContainerGroup"]
525+
cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerGroup"]
520526
lro_delay = kwargs.pop(
521527
'polling_interval',
522528
self._config.polling_interval
@@ -540,7 +546,13 @@ def get_long_running_output(pipeline_response):
540546
return cls(pipeline_response, deserialized, {})
541547
return deserialized
542548

543-
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
549+
path_format_arguments = {
550+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
551+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
552+
'containerGroupName': self._serialize.url("container_group_name", container_group_name, 'str'),
553+
}
554+
555+
if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
544556
elif polling is False: polling_method = AsyncNoPolling()
545557
else: polling_method = polling
546558
if cont_token:
@@ -645,7 +657,13 @@ def get_long_running_output(pipeline_response):
645657
if cls:
646658
return cls(pipeline_response, None, {})
647659

648-
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
660+
path_format_arguments = {
661+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
662+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
663+
'containerGroupName': self._serialize.url("container_group_name", container_group_name, 'str'),
664+
}
665+
666+
if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
649667
elif polling is False: polling_method = AsyncNoPolling()
650668
else: polling_method = polling
651669
if cont_token:
@@ -808,7 +826,13 @@ def get_long_running_output(pipeline_response):
808826
if cls:
809827
return cls(pipeline_response, None, {})
810828

811-
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
829+
path_format_arguments = {
830+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
831+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
832+
'containerGroupName': self._serialize.url("container_group_name", container_group_name, 'str'),
833+
}
834+
835+
if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
812836
elif polling is False: polling_method = AsyncNoPolling()
813837
else: polling_method = polling
814838
if cont_token:

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_containers_operations.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1414
from azure.mgmt.core.exceptions import ARMErrorFormat
1515

16-
from ... import models
16+
from ... import models as _models
1717

1818
T = TypeVar('T')
1919
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -32,7 +32,7 @@ class ContainersOperations:
3232
:param deserializer: An object model deserializer.
3333
"""
3434

35-
models = models
35+
models = _models
3636

3737
def __init__(self, client, config, serializer, deserializer) -> None:
3838
self._client = client
@@ -47,7 +47,7 @@ async def list_logs(
4747
container_name: str,
4848
tail: Optional[int] = None,
4949
**kwargs
50-
) -> "models.Logs":
50+
) -> "_models.Logs":
5151
"""Get the logs for a specified container instance.
5252
5353
Get the logs for a specified container instance in a specified resource group and container
@@ -67,7 +67,7 @@ async def list_logs(
6767
:rtype: ~azure.mgmt.containerinstance.models.Logs
6868
:raises: ~azure.core.exceptions.HttpResponseError
6969
"""
70-
cls = kwargs.pop('cls', None) # type: ClsType["models.Logs"]
70+
cls = kwargs.pop('cls', None) # type: ClsType["_models.Logs"]
7171
error_map = {
7272
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
7373
}
@@ -116,9 +116,9 @@ async def execute_command(
116116
resource_group_name: str,
117117
container_group_name: str,
118118
container_name: str,
119-
container_exec_request: "models.ContainerExecRequest",
119+
container_exec_request: "_models.ContainerExecRequest",
120120
**kwargs
121-
) -> "models.ContainerExecResponse":
121+
) -> "_models.ContainerExecResponse":
122122
"""Executes a command in a specific container instance.
123123
124124
Executes a command for a specific container instance in a specified resource group and
@@ -137,7 +137,7 @@ async def execute_command(
137137
:rtype: ~azure.mgmt.containerinstance.models.ContainerExecResponse
138138
:raises: ~azure.core.exceptions.HttpResponseError
139139
"""
140-
cls = kwargs.pop('cls', None) # type: ClsType["models.ContainerExecResponse"]
140+
cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerExecResponse"]
141141
error_map = {
142142
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
143143
}

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_location_operations.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1515
from azure.mgmt.core.exceptions import ARMErrorFormat
1616

17-
from ... import models
17+
from ... import models as _models
1818

1919
T = TypeVar('T')
2020
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -33,7 +33,7 @@ class LocationOperations:
3333
:param deserializer: An object model deserializer.
3434
"""
3535

36-
models = models
36+
models = _models
3737

3838
def __init__(self, client, config, serializer, deserializer) -> None:
3939
self._client = client
@@ -45,7 +45,7 @@ def list_usage(
4545
self,
4646
location: str,
4747
**kwargs
48-
) -> AsyncIterable["models.UsageListResult"]:
48+
) -> AsyncIterable["_models.UsageListResult"]:
4949
"""Get the usage for a subscription.
5050
5151
:param location: The identifier for the physical azure location.
@@ -55,7 +55,7 @@ def list_usage(
5555
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerinstance.models.UsageListResult]
5656
:raises: ~azure.core.exceptions.HttpResponseError
5757
"""
58-
cls = kwargs.pop('cls', None) # type: ClsType["models.UsageListResult"]
58+
cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageListResult"]
5959
error_map = {
6060
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6161
}
@@ -115,7 +115,7 @@ def list_cached_images(
115115
self,
116116
location: str,
117117
**kwargs
118-
) -> AsyncIterable["models.CachedImagesListResult"]:
118+
) -> AsyncIterable["_models.CachedImagesListResult"]:
119119
"""Get the list of cached images.
120120
121121
Get the list of cached images on specific OS type for a subscription in a region.
@@ -127,7 +127,7 @@ def list_cached_images(
127127
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerinstance.models.CachedImagesListResult]
128128
:raises: ~azure.core.exceptions.HttpResponseError
129129
"""
130-
cls = kwargs.pop('cls', None) # type: ClsType["models.CachedImagesListResult"]
130+
cls = kwargs.pop('cls', None) # type: ClsType["_models.CachedImagesListResult"]
131131
error_map = {
132132
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
133133
}
@@ -187,7 +187,7 @@ def list_capabilities(
187187
self,
188188
location: str,
189189
**kwargs
190-
) -> AsyncIterable["models.CapabilitiesListResult"]:
190+
) -> AsyncIterable["_models.CapabilitiesListResult"]:
191191
"""Get the list of capabilities of the location.
192192
193193
Get the list of CPU/memory/GPU capabilities of a region.
@@ -199,7 +199,7 @@ def list_capabilities(
199199
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerinstance.models.CapabilitiesListResult]
200200
:raises: ~azure.core.exceptions.HttpResponseError
201201
"""
202-
cls = kwargs.pop('cls', None) # type: ClsType["models.CapabilitiesListResult"]
202+
cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilitiesListResult"]
203203
error_map = {
204204
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
205205
}

sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1515
from azure.mgmt.core.exceptions import ARMErrorFormat
1616

17-
from ... import models
17+
from ... import models as _models
1818

1919
T = TypeVar('T')
2020
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -33,7 +33,7 @@ class Operations:
3333
:param deserializer: An object model deserializer.
3434
"""
3535

36-
models = models
36+
models = _models
3737

3838
def __init__(self, client, config, serializer, deserializer) -> None:
3939
self._client = client
@@ -44,15 +44,15 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4444
def list(
4545
self,
4646
**kwargs
47-
) -> AsyncIterable["models.OperationListResult"]:
47+
) -> AsyncIterable["_models.OperationListResult"]:
4848
"""List the operations for Azure Container Instance service.
4949
5050
:keyword callable cls: A custom type or function that will be passed the direct response
5151
:return: An iterator like instance of either OperationListResult or the result of cls(response)
5252
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerinstance.models.OperationListResult]
5353
:raises: ~azure.core.exceptions.HttpResponseError
5454
"""
55-
cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"]
55+
cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"]
5656
error_map = {
5757
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
5858
}

0 commit comments

Comments
 (0)