Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR] containerinstance/resource-manager #2155

Merged
merged 6 commits into from
Mar 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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