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 #3736

Merged
merged 2 commits into from
Nov 5, 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
9 changes: 9 additions & 0 deletions azure-mgmt-containerinstance/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
Release History
===============

1.3.0 (2018-11-05)
++++++++++++++++++

**Features**

- Model ResourceLimits has a new parameter gpu
- Model ResourceRequests has a new parameter gpu
- Model ContainerGroup has a new parameter dns_config

1.2.1 (2018-10-16)
++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from .container_state_py3 import ContainerState
from .event_py3 import Event
from .container_properties_instance_view_py3 import ContainerPropertiesInstanceView
from .gpu_resource_py3 import GpuResource
from .resource_requests_py3 import ResourceRequests
from .resource_limits_py3 import ResourceLimits
from .resource_requirements_py3 import ResourceRequirements
Expand All @@ -35,6 +36,7 @@
from .log_analytics_py3 import LogAnalytics
from .container_group_diagnostics_py3 import ContainerGroupDiagnostics
from .container_group_network_profile_py3 import ContainerGroupNetworkProfile
from .dns_configuration_py3 import DnsConfiguration
from .container_group_py3 import ContainerGroup
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
Expand All @@ -53,6 +55,7 @@
from .container_state import ContainerState
from .event import Event
from .container_properties_instance_view import ContainerPropertiesInstanceView
from .gpu_resource import GpuResource
from .resource_requests import ResourceRequests
from .resource_limits import ResourceLimits
from .resource_requirements import ResourceRequirements
Expand All @@ -73,6 +76,7 @@
from .log_analytics import LogAnalytics
from .container_group_diagnostics import ContainerGroupDiagnostics
from .container_group_network_profile import ContainerGroupNetworkProfile
from .dns_configuration import DnsConfiguration
from .container_group import ContainerGroup
from .operation_display import OperationDisplay
from .operation import Operation
Expand All @@ -88,6 +92,7 @@
from .container_group_paged import ContainerGroupPaged
from .container_instance_management_client_enums import (
ContainerNetworkProtocol,
GpuSku,
ResourceIdentityType,
ContainerGroupRestartPolicy,
ContainerGroupNetworkProtocol,
Expand All @@ -103,6 +108,7 @@
'ContainerState',
'Event',
'ContainerPropertiesInstanceView',
'GpuResource',
'ResourceRequests',
'ResourceLimits',
'ResourceRequirements',
Expand All @@ -123,6 +129,7 @@
'LogAnalytics',
'ContainerGroupDiagnostics',
'ContainerGroupNetworkProfile',
'DnsConfiguration',
'ContainerGroup',
'OperationDisplay',
'Operation',
Expand All @@ -137,6 +144,7 @@
'Resource',
'ContainerGroupPaged',
'ContainerNetworkProtocol',
'GpuSku',
'ResourceIdentityType',
'ContainerGroupRestartPolicy',
'ContainerGroupNetworkProtocol',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ class ContainerGroup(Resource):
group.
:type network_profile:
~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile
:param dns_config: The DNS config information for a container group.
:type dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration
"""

_validation = {
Expand Down Expand Up @@ -100,6 +102,7 @@ class ContainerGroup(Resource):
'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'},
'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'},
'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'},
'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfiguration'},
}

def __init__(self, **kwargs):
Expand All @@ -115,3 +118,4 @@ def __init__(self, **kwargs):
self.instance_view = None
self.diagnostics = kwargs.get('diagnostics', None)
self.network_profile = kwargs.get('network_profile', None)
self.dns_config = kwargs.get('dns_config', None)
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ class ContainerGroup(Resource):
group.
:type network_profile:
~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile
:param dns_config: The DNS config information for a container group.
:type dns_config: ~azure.mgmt.containerinstance.models.DnsConfiguration
"""

_validation = {
Expand Down Expand Up @@ -100,9 +102,10 @@ class ContainerGroup(Resource):
'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'},
'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'},
'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'},
'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfiguration'},
}

def __init__(self, *, containers, os_type, location: str=None, tags=None, identity=None, image_registry_credentials=None, restart_policy=None, ip_address=None, volumes=None, diagnostics=None, network_profile=None, **kwargs) -> None:
def __init__(self, *, containers, os_type, location: str=None, tags=None, identity=None, image_registry_credentials=None, restart_policy=None, ip_address=None, volumes=None, diagnostics=None, network_profile=None, dns_config=None, **kwargs) -> None:
super(ContainerGroup, self).__init__(location=location, tags=tags, **kwargs)
self.identity = identity
self.provisioning_state = None
Expand All @@ -115,3 +118,4 @@ def __init__(self, *, containers, os_type, location: str=None, tags=None, identi
self.instance_view = None
self.diagnostics = diagnostics
self.network_profile = network_profile
self.dns_config = dns_config
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ class ContainerNetworkProtocol(str, Enum):
udp = "UDP"


class GpuSku(str, Enum):

k80 = "K80"
p100 = "P100"
v100 = "V100"


class ResourceIdentityType(str, Enum):

system_assigned = "SystemAssigned"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 DnsConfiguration(Model):
"""DNS configuration for the container group.

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

:param name_servers: Required. The DNS servers for the container group.
:type name_servers: list[str]
:param search_domains: The DNS search domains for hostname lookup in the
container group.
:type search_domains: str
:param options: The DNS options for the container group.
:type options: str
"""

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

_attribute_map = {
'name_servers': {'key': 'nameServers', 'type': '[str]'},
'search_domains': {'key': 'searchDomains', 'type': 'str'},
'options': {'key': 'options', 'type': 'str'},
}

def __init__(self, **kwargs):
super(DnsConfiguration, self).__init__(**kwargs)
self.name_servers = kwargs.get('name_servers', None)
self.search_domains = kwargs.get('search_domains', None)
self.options = kwargs.get('options', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 DnsConfiguration(Model):
"""DNS configuration for the container group.

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

:param name_servers: Required. The DNS servers for the container group.
:type name_servers: list[str]
:param search_domains: The DNS search domains for hostname lookup in the
container group.
:type search_domains: str
:param options: The DNS options for the container group.
:type options: str
"""

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

_attribute_map = {
'name_servers': {'key': 'nameServers', 'type': '[str]'},
'search_domains': {'key': 'searchDomains', 'type': 'str'},
'options': {'key': 'options', 'type': 'str'},
}

def __init__(self, *, name_servers, search_domains: str=None, options: str=None, **kwargs) -> None:
super(DnsConfiguration, self).__init__(**kwargs)
self.name_servers = name_servers
self.search_domains = search_domains
self.options = options
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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 GpuResource(Model):
"""The GPU resource.

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

:param count: Required. The count of the GPU resource.
:type count: int
:param sku: Required. The SKU of the GPU resource. Possible values
include: 'K80', 'P100', 'V100'
:type sku: str or ~azure.mgmt.containerinstance.models.GpuSku
"""

_validation = {
'count': {'required': True},
'sku': {'required': True},
}

_attribute_map = {
'count': {'key': 'count', 'type': 'int'},
'sku': {'key': 'sku', 'type': 'str'},
}

def __init__(self, **kwargs):
super(GpuResource, self).__init__(**kwargs)
self.count = kwargs.get('count', None)
self.sku = kwargs.get('sku', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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 GpuResource(Model):
"""The GPU resource.

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

:param count: Required. The count of the GPU resource.
:type count: int
:param sku: Required. The SKU of the GPU resource. Possible values
include: 'K80', 'P100', 'V100'
:type sku: str or ~azure.mgmt.containerinstance.models.GpuSku
"""

_validation = {
'count': {'required': True},
'sku': {'required': True},
}

_attribute_map = {
'count': {'key': 'count', 'type': 'int'},
'sku': {'key': 'sku', 'type': 'str'},
}

def __init__(self, *, count: int, sku, **kwargs) -> None:
super(GpuResource, self).__init__(**kwargs)
self.count = count
self.sku = sku
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ class ResourceLimits(Model):
:type memory_in_gb: float
:param cpu: The CPU limit of this container instance.
:type cpu: float
:param gpu: The GPU limit of this container instance.
:type gpu: ~azure.mgmt.containerinstance.models.GpuResource
"""

_attribute_map = {
'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'},
'cpu': {'key': 'cpu', 'type': 'float'},
'gpu': {'key': 'gpu', 'type': 'GpuResource'},
}

def __init__(self, **kwargs):
super(ResourceLimits, self).__init__(**kwargs)
self.memory_in_gb = kwargs.get('memory_in_gb', None)
self.cpu = kwargs.get('cpu', None)
self.gpu = kwargs.get('gpu', None)
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ class ResourceLimits(Model):
:type memory_in_gb: float
:param cpu: The CPU limit of this container instance.
:type cpu: float
:param gpu: The GPU limit of this container instance.
:type gpu: ~azure.mgmt.containerinstance.models.GpuResource
"""

_attribute_map = {
'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'},
'cpu': {'key': 'cpu', 'type': 'float'},
'gpu': {'key': 'gpu', 'type': 'GpuResource'},
}

def __init__(self, *, memory_in_gb: float=None, cpu: float=None, **kwargs) -> None:
def __init__(self, *, memory_in_gb: float=None, cpu: float=None, gpu=None, **kwargs) -> None:
super(ResourceLimits, self).__init__(**kwargs)
self.memory_in_gb = memory_in_gb
self.cpu = cpu
self.gpu = gpu
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class ResourceRequests(Model):
:type memory_in_gb: float
:param cpu: Required. The CPU request of this container instance.
:type cpu: float
:param gpu: The GPU request of this container instance.
:type gpu: ~azure.mgmt.containerinstance.models.GpuResource
"""

_validation = {
Expand All @@ -32,9 +34,11 @@ class ResourceRequests(Model):
_attribute_map = {
'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'},
'cpu': {'key': 'cpu', 'type': 'float'},
'gpu': {'key': 'gpu', 'type': 'GpuResource'},
}

def __init__(self, **kwargs):
super(ResourceRequests, self).__init__(**kwargs)
self.memory_in_gb = kwargs.get('memory_in_gb', None)
self.cpu = kwargs.get('cpu', None)
self.gpu = kwargs.get('gpu', None)
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class ResourceRequests(Model):
:type memory_in_gb: float
:param cpu: Required. The CPU request of this container instance.
:type cpu: float
:param gpu: The GPU request of this container instance.
:type gpu: ~azure.mgmt.containerinstance.models.GpuResource
"""

_validation = {
Expand All @@ -32,9 +34,11 @@ class ResourceRequests(Model):
_attribute_map = {
'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'},
'cpu': {'key': 'cpu', 'type': 'float'},
'gpu': {'key': 'gpu', 'type': 'GpuResource'},
}

def __init__(self, *, memory_in_gb: float, cpu: float, **kwargs) -> None:
def __init__(self, *, memory_in_gb: float, cpu: float, gpu=None, **kwargs) -> None:
super(ResourceRequests, self).__init__(**kwargs)
self.memory_in_gb = memory_in_gb
self.cpu = cpu
self.gpu = gpu
Loading