Skip to content

Commit

Permalink
[AutoPR containerinstance/resource-manager] Adding April Swagger For …
Browse files Browse the repository at this point in the history
…GA (#2309)

* Generated from 3f1cb3ecea72fb963c8c89dcce5a4a3fe378e878

Adding GA Swagger

* Generated from ab364c6f9db63bf093fc85506577245a35f1fbb4

Moving read only to property level
  • Loading branch information
AutorestCI committed Jun 4, 2018
1 parent 8fc953a commit d8610be
Show file tree
Hide file tree
Showing 66 changed files with 1,743 additions and 289 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __init__(
self._client = ServiceClient(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-02-01-preview'
self.api_version = '2018-04-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,66 @@
# regenerated.
# --------------------------------------------------------------------------

from .container_port import ContainerPort
from .environment_variable import EnvironmentVariable
from .container_state import ContainerState
from .event import Event
from .container_properties_instance_view import ContainerPropertiesInstanceView
from .resource_requests import ResourceRequests
from .resource_limits import ResourceLimits
from .resource_requirements import ResourceRequirements
from .volume_mount import VolumeMount
from .container import Container
from .azure_file_volume import AzureFileVolume
from .git_repo_volume import GitRepoVolume
from .volume import Volume
from .image_registry_credential import ImageRegistryCredential
from .port import Port
from .ip_address import IpAddress
from .container_group_properties_instance_view import ContainerGroupPropertiesInstanceView
from .container_group import ContainerGroup
from .operation_display import OperationDisplay
from .operation import Operation
from .operation_list_result import OperationListResult
from .usage_name import UsageName
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
try:
from .container_port_py3 import ContainerPort
from .environment_variable_py3 import EnvironmentVariable
from .container_state_py3 import ContainerState
from .event_py3 import Event
from .container_properties_instance_view_py3 import ContainerPropertiesInstanceView
from .resource_requests_py3 import ResourceRequests
from .resource_limits_py3 import ResourceLimits
from .resource_requirements_py3 import ResourceRequirements
from .volume_mount_py3 import VolumeMount
from .container_py3 import Container
from .azure_file_volume_py3 import AzureFileVolume
from .git_repo_volume_py3 import GitRepoVolume
from .volume_py3 import Volume
from .image_registry_credential_py3 import ImageRegistryCredential
from .port_py3 import Port
from .ip_address_py3 import IpAddress
from .container_group_properties_instance_view_py3 import ContainerGroupPropertiesInstanceView
from .container_group_py3 import ContainerGroup
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .operation_list_result_py3 import OperationListResult
from .usage_name_py3 import UsageName
from .usage_py3 import Usage
from .usage_list_result_py3 import UsageListResult
from .logs_py3 import Logs
from .container_exec_request_terminal_size_py3 import ContainerExecRequestTerminalSize
from .container_exec_request_py3 import ContainerExecRequest
from .container_exec_response_py3 import ContainerExecResponse
from .resource_py3 import Resource
except (SyntaxError, ImportError):
from .container_port import ContainerPort
from .environment_variable import EnvironmentVariable
from .container_state import ContainerState
from .event import Event
from .container_properties_instance_view import ContainerPropertiesInstanceView
from .resource_requests import ResourceRequests
from .resource_limits import ResourceLimits
from .resource_requirements import ResourceRequirements
from .volume_mount import VolumeMount
from .container import Container
from .azure_file_volume import AzureFileVolume
from .git_repo_volume import GitRepoVolume
from .volume import Volume
from .image_registry_credential import ImageRegistryCredential
from .port import Port
from .ip_address import IpAddress
from .container_group_properties_instance_view import ContainerGroupPropertiesInstanceView
from .container_group import ContainerGroup
from .operation_display import OperationDisplay
from .operation import Operation
from .operation_list_result import OperationListResult
from .usage_name import UsageName
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 (
ContainerNetworkProtocol,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ class AzureFileVolume(Model):
"""The properties of the Azure File volume. Azure File shares are mounted as
volumes.
:param share_name: The name of the Azure File share to be mounted as a
volume.
All required parameters must be populated in order to send to Azure.
:param share_name: Required. The name of the Azure File share to be
mounted as a volume.
:type share_name: str
:param read_only: The flag indicating whether the Azure File shared
mounted as a volume is read-only.
:type read_only: bool
:param storage_account_name: The name of the storage account that contains
the Azure File share.
:param storage_account_name: Required. The name of the storage account
that contains the Azure File share.
:type storage_account_name: str
:param storage_account_key: The storage account access key used to access
the Azure File share.
Expand All @@ -42,9 +44,9 @@ class AzureFileVolume(Model):
'storage_account_key': {'key': 'storageAccountKey', 'type': 'str'},
}

def __init__(self, share_name, storage_account_name, read_only=None, storage_account_key=None):
super(AzureFileVolume, self).__init__()
self.share_name = share_name
self.read_only = read_only
self.storage_account_name = storage_account_name
self.storage_account_key = storage_account_key
def __init__(self, **kwargs):
super(AzureFileVolume, self).__init__(**kwargs)
self.share_name = kwargs.get('share_name', None)
self.read_only = kwargs.get('read_only', None)
self.storage_account_name = kwargs.get('storage_account_name', None)
self.storage_account_key = kwargs.get('storage_account_key', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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 AzureFileVolume(Model):
"""The properties of the Azure File volume. Azure File shares are mounted as
volumes.
All required parameters must be populated in order to send to Azure.
:param share_name: Required. The name of the Azure File share to be
mounted as a volume.
:type share_name: str
:param read_only: The flag indicating whether the Azure File shared
mounted as a volume is read-only.
:type read_only: bool
:param storage_account_name: Required. The name of the storage account
that contains the Azure File share.
:type storage_account_name: str
:param storage_account_key: The storage account access key used to access
the Azure File share.
:type storage_account_key: str
"""

_validation = {
'share_name': {'required': True},
'storage_account_name': {'required': True},
}

_attribute_map = {
'share_name': {'key': 'shareName', 'type': 'str'},
'read_only': {'key': 'readOnly', 'type': 'bool'},
'storage_account_name': {'key': 'storageAccountName', 'type': 'str'},
'storage_account_key': {'key': 'storageAccountKey', 'type': 'str'},
}

def __init__(self, *, share_name: str, storage_account_name: str, read_only: bool=None, storage_account_key: str=None, **kwargs) -> None:
super(AzureFileVolume, self).__init__(**kwargs)
self.share_name = share_name
self.read_only = read_only
self.storage_account_name = storage_account_name
self.storage_account_key = storage_account_key
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ class Container(Model):
Variables are only populated by the server, and will be ignored when
sending a request.
:param name: The user-provided name of the container instance.
All required parameters must be populated in order to send to Azure.
:param name: Required. The user-provided name of the container instance.
:type name: str
:param image: The name of the image used to create the container instance.
:param image: Required. The name of the image used to create the container
instance.
:type image: str
:param command: The commands to execute within the container instance in
exec form.
Expand All @@ -35,7 +38,8 @@ class Container(Model):
valid in response.
:vartype instance_view:
~azure.mgmt.containerinstance.models.ContainerPropertiesInstanceView
:param resources: The resource requirements of the container instance.
:param resources: Required. The resource requirements of the container
instance.
:type resources: ~azure.mgmt.containerinstance.models.ResourceRequirements
:param volume_mounts: The volume mounts available to the container
instance.
Expand All @@ -61,13 +65,13 @@ class Container(Model):
'volume_mounts': {'key': 'properties.volumeMounts', 'type': '[VolumeMount]'},
}

def __init__(self, name, image, resources, command=None, ports=None, environment_variables=None, volume_mounts=None):
super(Container, self).__init__()
self.name = name
self.image = image
self.command = command
self.ports = ports
self.environment_variables = environment_variables
def __init__(self, **kwargs):
super(Container, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.image = kwargs.get('image', None)
self.command = kwargs.get('command', None)
self.ports = kwargs.get('ports', None)
self.environment_variables = kwargs.get('environment_variables', None)
self.instance_view = None
self.resources = resources
self.volume_mounts = volume_mounts
self.resources = kwargs.get('resources', None)
self.volume_mounts = kwargs.get('volume_mounts', None)
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ContainerExecRequest(Model):
'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
def __init__(self, **kwargs):
super(ContainerExecRequest, self).__init__(**kwargs)
self.command = kwargs.get('command', None)
self.terminal_size = kwargs.get('terminal_size', None)
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: str=None, terminal_size=None, **kwargs) -> None:
super(ContainerExecRequest, self).__init__(**kwargs)
self.command = command
self.terminal_size = terminal_size
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
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
:param row: The row size of the terminal
:type row: int
:param column: The column size of the terminal
:type column: int
"""

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

def __init__(self, rows=None, cols=None):
super(ContainerExecRequestTerminalSize, self).__init__()
self.rows = rows
self.cols = cols
def __init__(self, **kwargs):
super(ContainerExecRequestTerminalSize, self).__init__(**kwargs)
self.row = kwargs.get('row', None)
self.column = kwargs.get('column', None)
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: int=None, column: int=None, **kwargs) -> None:
super(ContainerExecRequestTerminalSize, self).__init__(**kwargs)
self.row = row
self.column = column
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,26 @@
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
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar web_socket_uri: The uri for the exec websocket.
:vartype web_socket_uri: str
:ivar password: The password to start the exec command.
:vartype password: str
"""

_validation = {
'web_socket_uri': {'readonly': True},
'password': {'readonly': True},
}

_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
def __init__(self, **kwargs):
super(ContainerExecResponse, self).__init__(**kwargs)
self.web_socket_uri = None
self.password = None
Loading

0 comments on commit d8610be

Please sign in to comment.