Skip to content

Commit

Permalink
[AutoPR] containerinstance/resource-manager 0.4.0 (Azure#2155)
Browse files Browse the repository at this point in the history
* [AutoPR containerinstance/resource-manager] Adding Container Exec Spec (Azure#2114)

* Generated from a60b503fd362577f4fab95a5e2518b553ec284e9

fixing small syntax error

* Generated from 1ec1e3fd40e63a08d3262affca1203988f7407ef

Updating correct examples for async operation

* Generated from 24d60116617096cd26598e974ac7e1fa00ec8169

fixing ARM header field

* Generated from 9fecbb9feb0b8ea3cbba6a02e84973b2bdf11378

remvoing extra async operations

* Generated from 338812373b418f43cc56c9cf152a99475fbe12e1

Update Python version

* Update tests and ChangeLog

* Generated from 2f0dc17f7d69b23e41058c6aa7eef3946337ffd6 (Azure#2169)

Fixing error in naming convention for rows and cols

* Adding sanity tests for start container exec

* updating the recording file

* Final release date
  • Loading branch information
AutorestCI authored and lmazuel committed Mar 20, 2018
1 parent 9a18861 commit 01b6297
Show file tree
Hide file tree
Showing 15 changed files with 456 additions and 60 deletions.
11 changes: 11 additions & 0 deletions azure-mgmt-containerinstance/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
Release History
===============

0.4.0 (2018-03-19)
++++++++++++++++++

**Breaking changes**

- container_groups.create_or_update is now a Long Running operation

**Features**

- New start_container operation group

0.3.1 (2018-02-05)
++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .operations.operations import Operations
from .operations.container_group_usage_operations import ContainerGroupUsageOperations
from .operations.container_logs_operations import ContainerLogsOperations
from .operations.start_container_operations import StartContainerOperations
from . import models


Expand Down Expand Up @@ -68,6 +69,8 @@ class ContainerInstanceManagementClient(object):
:vartype container_group_usage: azure.mgmt.containerinstance.operations.ContainerGroupUsageOperations
:ivar container_logs: ContainerLogs operations
:vartype container_logs: azure.mgmt.containerinstance.operations.ContainerLogsOperations
:ivar start_container: StartContainer operations
:vartype start_container: azure.mgmt.containerinstance.operations.StartContainerOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -98,3 +101,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.container_logs = ContainerLogsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.start_container = StartContainerOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
from .usage import Usage
from .usage_list_result import UsageListResult
from .logs import Logs
from .container_exec_request_terminal_size import ContainerExecRequestTerminalSize
from .container_exec_request import ContainerExecRequest
from .container_exec_response import ContainerExecResponse
from .resource import Resource
from .container_group_paged import ContainerGroupPaged
from .container_instance_management_client_enums import (
Expand Down Expand Up @@ -70,6 +73,9 @@
'Usage',
'UsageListResult',
'Logs',
'ContainerExecRequestTerminalSize',
'ContainerExecRequest',
'ContainerExecResponse',
'Resource',
'ContainerGroupPaged',
'ContainerNetworkProtocol',
Expand Down
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 ContainerExecRequest(Model):
"""The start container exec request.
:param command: The command to be executed.
:type command: str
:param terminal_size: The size of the terminal.
:type terminal_size:
~azure.mgmt.containerinstance.models.ContainerExecRequestTerminalSize
"""

_attribute_map = {
'command': {'key': 'command', 'type': 'str'},
'terminal_size': {'key': 'terminalSize', 'type': 'ContainerExecRequestTerminalSize'},
}

def __init__(self, command=None, terminal_size=None):
super(ContainerExecRequest, self).__init__()
self.command = command
self.terminal_size = terminal_size
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 ContainerExecRequestTerminalSize(Model):
"""The size of the terminal.
:param rows: The row size of the terminal
:type rows: int
:param cols: The column size of the terminal
:type cols: int
"""

_attribute_map = {
'rows': {'key': 'rows', 'type': 'int'},
'cols': {'key': 'cols', 'type': 'int'},
}

def __init__(self, rows=None, cols=None):
super(ContainerExecRequestTerminalSize, self).__init__()
self.rows = rows
self.cols = cols
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 ContainerExecResponse(Model):
"""The information for the container exec command.
:param web_socket_uri: The uri for the exec websocket.
:type web_socket_uri: str
:param password: The password to start the exec command.
:type password: str
"""

_attribute_map = {
'web_socket_uri': {'key': 'webSocketUri', 'type': 'str'},
'password': {'key': 'password', 'type': 'str'},
}

def __init__(self, web_socket_uri=None, password=None):
super(ContainerExecResponse, self).__init__()
self.web_socket_uri = web_socket_uri
self.password = password
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
from .operations import Operations
from .container_group_usage_operations import ContainerGroupUsageOperations
from .container_logs_operations import ContainerLogsOperations
from .start_container_operations import StartContainerOperations

__all__ = [
'ContainerGroupsOperations',
'Operations',
'ContainerGroupUsageOperations',
'ContainerLogsOperations',
'StartContainerOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ContainerGroupUsageOperations(object):
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client API version. Constant value: "2018-02-01-preview".
"""

Expand Down Expand Up @@ -54,7 +54,7 @@ def list(
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages'
url = self.list.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'location': self._serialize.url("location", location, 'str')
Expand Down Expand Up @@ -94,3 +94,4 @@ def list(
return client_raw_response

return deserialized
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages'}
Loading

0 comments on commit 01b6297

Please sign in to comment.