Skip to content

Commit

Permalink
[AutoPR containerinstance/resource-manager] Adding Container Exec Spec (
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
AutorestCI authored Mar 13, 2018
1 parent afe33d1 commit 10ace4d
Show file tree
Hide file tree
Showing 12 changed files with 327 additions and 44 deletions.
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 row: The row size of the terminal
:type row: int
:param column: The column size of the terminal
:type column: int
"""

_attribute_map = {
'row': {'key': 'row', 'type': 'int'},
'column': {'key': 'column', 'type': 'int'},
}

def __init__(self, row=None, column=None):
super(ContainerExecRequestTerminalSize, self).__init__()
self.row = row
self.column = column
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 10ace4d

Please sign in to comment.