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] Container Instance: Adding September Update #3265

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
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def __init__(
super(ContainerInstanceManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-06-01'
self.api_version = '2018-09-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 @@ -32,6 +32,7 @@
from .container_group_properties_instance_view_py3 import ContainerGroupPropertiesInstanceView
from .log_analytics_py3 import LogAnalytics
from .container_group_diagnostics_py3 import ContainerGroupDiagnostics
from .container_group_network_profile_py3 import ContainerGroupNetworkProfile
from .container_group_py3 import ContainerGroup
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
Expand Down Expand Up @@ -67,6 +68,7 @@
from .container_group_properties_instance_view import ContainerGroupPropertiesInstanceView
from .log_analytics import LogAnalytics
from .container_group_diagnostics import ContainerGroupDiagnostics
from .container_group_network_profile import ContainerGroupNetworkProfile
from .container_group import ContainerGroup
from .operation_display import OperationDisplay
from .operation import Operation
Expand All @@ -85,6 +87,7 @@
ContainerGroupRestartPolicy,
ContainerGroupNetworkProtocol,
OperatingSystemTypes,
LogAnalyticsLogType,
ContainerInstanceOperationsOrigin,
)

Expand All @@ -111,6 +114,7 @@
'ContainerGroupPropertiesInstanceView',
'LogAnalytics',
'ContainerGroupDiagnostics',
'ContainerGroupNetworkProfile',
'ContainerGroup',
'OperationDisplay',
'Operation',
Expand All @@ -128,5 +132,6 @@
'ContainerGroupRestartPolicy',
'ContainerGroupNetworkProtocol',
'OperatingSystemTypes',
'LogAnalyticsLogType',
'ContainerInstanceOperationsOrigin',
]
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ class ContainerGroup(Resource):
:param diagnostics: The diagnostic information for a container group.
:type diagnostics:
~azure.mgmt.containerinstance.models.ContainerGroupDiagnostics
:param network_profile: The network profile information for a container
group.
:type network_profile:
~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile
"""

_validation = {
Expand Down Expand Up @@ -91,6 +95,7 @@ class ContainerGroup(Resource):
'volumes': {'key': 'properties.volumes', 'type': '[Volume]'},
'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'},
'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'},
'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'},
}

def __init__(self, **kwargs):
Expand All @@ -104,3 +109,4 @@ def __init__(self, **kwargs):
self.volumes = kwargs.get('volumes', None)
self.instance_view = None
self.diagnostics = kwargs.get('diagnostics', None)
self.network_profile = kwargs.get('network_profile', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 ContainerGroupNetworkProfile(Model):
"""Container group network profile information.

All required parameters must be populated in order to send to Azure.

:param id: Required. The identifier for a network profile.
:type id: str
"""

_validation = {
'id': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ContainerGroupNetworkProfile, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 ContainerGroupNetworkProfile(Model):
"""Container group network profile information.

All required parameters must be populated in order to send to Azure.

:param id: Required. The identifier for a network profile.
:type id: str
"""

_validation = {
'id': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}

def __init__(self, *, id: str, **kwargs) -> None:
super(ContainerGroupNetworkProfile, self).__init__(**kwargs)
self.id = id
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ class ContainerGroup(Resource):
:param diagnostics: The diagnostic information for a container group.
:type diagnostics:
~azure.mgmt.containerinstance.models.ContainerGroupDiagnostics
:param network_profile: The network profile information for a container
group.
:type network_profile:
~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile
"""

_validation = {
Expand Down Expand Up @@ -91,9 +95,10 @@ class ContainerGroup(Resource):
'volumes': {'key': 'properties.volumes', 'type': '[Volume]'},
'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'},
'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'},
'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'},
}

def __init__(self, *, containers, os_type, location: str=None, tags=None, image_registry_credentials=None, restart_policy=None, ip_address=None, volumes=None, diagnostics=None, **kwargs) -> None:
def __init__(self, *, containers, os_type, location: str=None, tags=None, image_registry_credentials=None, restart_policy=None, ip_address=None, volumes=None, diagnostics=None, network_profile=None, **kwargs) -> None:
super(ContainerGroup, self).__init__(location=location, tags=tags, **kwargs)
self.provisioning_state = None
self.containers = containers
Expand All @@ -104,3 +109,4 @@ def __init__(self, *, containers, os_type, location: str=None, tags=None, image_
self.volumes = volumes
self.instance_view = None
self.diagnostics = diagnostics
self.network_profile = network_profile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ class OperatingSystemTypes(str, Enum):
linux = "Linux"


class LogAnalyticsLogType(str, Enum):

container_insights = "ContainerInsights"
container_instance_logs = "ContainerInstanceLogs"


class ContainerInstanceOperationsOrigin(str, Enum):

user = "User"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ class LogAnalytics(Model):
:type workspace_id: str
:param workspace_key: Required. The workspace key for log analytics
:type workspace_key: str
:param log_type: The log type to be used. Possible values include:
'ContainerInsights', 'ContainerInstanceLogs'
:type log_type: str or
~azure.mgmt.containerinstance.models.LogAnalyticsLogType
:param metadata: Metadata for log analytics.
:type metadata: dict[str, str]
"""

_validation = {
Expand All @@ -31,9 +37,13 @@ class LogAnalytics(Model):
_attribute_map = {
'workspace_id': {'key': 'workspaceId', 'type': 'str'},
'workspace_key': {'key': 'workspaceKey', 'type': 'str'},
'log_type': {'key': 'logType', 'type': 'str'},
'metadata': {'key': 'metadata', 'type': '{str}'},
}

def __init__(self, **kwargs):
super(LogAnalytics, self).__init__(**kwargs)
self.workspace_id = kwargs.get('workspace_id', None)
self.workspace_key = kwargs.get('workspace_key', None)
self.log_type = kwargs.get('log_type', None)
self.metadata = kwargs.get('metadata', None)
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ class LogAnalytics(Model):
:type workspace_id: str
:param workspace_key: Required. The workspace key for log analytics
:type workspace_key: str
:param log_type: The log type to be used. Possible values include:
'ContainerInsights', 'ContainerInstanceLogs'
:type log_type: str or
~azure.mgmt.containerinstance.models.LogAnalyticsLogType
:param metadata: Metadata for log analytics.
:type metadata: dict[str, str]
"""

_validation = {
Expand All @@ -31,9 +37,13 @@ class LogAnalytics(Model):
_attribute_map = {
'workspace_id': {'key': 'workspaceId', 'type': 'str'},
'workspace_key': {'key': 'workspaceKey', 'type': 'str'},
'log_type': {'key': 'logType', 'type': 'str'},
'metadata': {'key': 'metadata', 'type': '{str}'},
}

def __init__(self, *, workspace_id: str, workspace_key: str, **kwargs) -> None:
def __init__(self, *, workspace_id: str, workspace_key: str, log_type=None, metadata=None, **kwargs) -> None:
super(LogAnalytics, self).__init__(**kwargs)
self.workspace_id = workspace_id
self.workspace_key = workspace_key
self.log_type = log_type
self.metadata = metadata
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ContainerGroupUsageOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client API version. Constant value: "2018-06-01".
:ivar api_version: Client API version. Constant value: "2018-09-01".
"""

models = models
Expand All @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-06-01"
self.api_version = "2018-09-01"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ContainerGroupsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client API version. Constant value: "2018-06-01".
:ivar api_version: Client API version. Constant value: "2018-09-01".
"""

models = models
Expand All @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-06-01"
self.api_version = "2018-09-01"

self.config = config

Expand Down Expand Up @@ -537,7 +537,7 @@ def restart(
self, resource_group_name, container_group_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Restarts all containers in a container group.

Restarts all containers in a contaienr group in place. If container
Restarts all containers in a container group in place. If container
image has updates, new image will be downloaded.

:param resource_group_name: The name of the resource group.
Expand Down Expand Up @@ -581,7 +581,7 @@ def stop(
self, resource_group_name, container_group_name, custom_headers=None, raw=False, **operation_config):
"""Stops all containers in a container group.

Stops all containers in a contaienr group. Compute resources will be
Stops all containers in a container group. Compute resources will be
deallocated and billing will stop.

:param resource_group_name: The name of the resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ContainerOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client API version. Constant value: "2018-06-01".
:ivar api_version: Client API version. Constant value: "2018-09-01".
"""

models = models
Expand All @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-06-01"
self.api_version = "2018-09-01"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Operations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client API version. Constant value: "2018-06-01".
:ivar api_version: Client API version. Constant value: "2018-09-01".
"""

models = models
Expand All @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-06-01"
self.api_version = "2018-09-01"

self.config = config

Expand Down