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 machinelearningcompute/resource-manager] chore: jsonfmt machinelearningcompute #5507

Closed
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 @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand Down Expand Up @@ -50,7 +50,7 @@ def __init__(
self.subscription_id = subscription_id


class MachineLearningComputeManagementClient(object):
class MachineLearningComputeManagementClient(SDKClient):
"""These APIs allow end users to operate on Azure Machine Learning Compute resources. They support the following operations:<ul><li>Create or update a cluster</li><li>Get a cluster</li><li>Patch a cluster</li><li>Delete a cluster</li><li>Get keys for a cluster</li><li>Check if updates are available for system services in a cluster</li><li>Update system services in a cluster</li><li>Get all clusters in a resource group</li><li>Get all clusters in a subscription</li></ul>

:ivar config: Configuration for client.
Expand All @@ -73,7 +73,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = MachineLearningComputeManagementClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(MachineLearningComputeManagementClient, 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 = '2017-08-01-preview'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,62 @@
# regenerated.
# --------------------------------------------------------------------------

from .resource import Resource
from .error_detail import ErrorDetail
from .error_response import ErrorResponse
from .error_response_wrapper import ErrorResponseWrapper, ErrorResponseWrapperException
from .storage_account_properties import StorageAccountProperties
from .container_registry_properties import ContainerRegistryProperties
from .service_principal_properties import ServicePrincipalProperties
from .kubernetes_cluster_properties import KubernetesClusterProperties
from .system_service import SystemService
from .acs_cluster_properties import AcsClusterProperties
from .app_insights_properties import AppInsightsProperties
from .ssl_configuration import SslConfiguration
from .service_auth_configuration import ServiceAuthConfiguration
from .auto_scale_configuration import AutoScaleConfiguration
from .global_service_configuration import GlobalServiceConfiguration
from .operationalization_cluster import OperationalizationCluster
from .operationalization_cluster_update_parameters import OperationalizationClusterUpdateParameters
from .storage_account_credentials import StorageAccountCredentials
from .container_registry_credentials import ContainerRegistryCredentials
from .container_service_credentials import ContainerServiceCredentials
from .app_insights_credentials import AppInsightsCredentials
from .operationalization_cluster_credentials import OperationalizationClusterCredentials
from .check_system_services_updates_available_response import CheckSystemServicesUpdatesAvailableResponse
from .update_system_services_response import UpdateSystemServicesResponse
from .resource_operation_display import ResourceOperationDisplay
from .resource_operation import ResourceOperation
from .available_operations import AvailableOperations
try:
from .resource_py3 import Resource
from .error_detail_py3 import ErrorDetail
from .error_response_py3 import ErrorResponse
from .error_response_wrapper_py3 import ErrorResponseWrapper, ErrorResponseWrapperException
from .storage_account_properties_py3 import StorageAccountProperties
from .container_registry_properties_py3 import ContainerRegistryProperties
from .service_principal_properties_py3 import ServicePrincipalProperties
from .kubernetes_cluster_properties_py3 import KubernetesClusterProperties
from .system_service_py3 import SystemService
from .acs_cluster_properties_py3 import AcsClusterProperties
from .app_insights_properties_py3 import AppInsightsProperties
from .ssl_configuration_py3 import SslConfiguration
from .service_auth_configuration_py3 import ServiceAuthConfiguration
from .auto_scale_configuration_py3 import AutoScaleConfiguration
from .global_service_configuration_py3 import GlobalServiceConfiguration
from .operationalization_cluster_py3 import OperationalizationCluster
from .operationalization_cluster_update_parameters_py3 import OperationalizationClusterUpdateParameters
from .storage_account_credentials_py3 import StorageAccountCredentials
from .container_registry_credentials_py3 import ContainerRegistryCredentials
from .container_service_credentials_py3 import ContainerServiceCredentials
from .app_insights_credentials_py3 import AppInsightsCredentials
from .operationalization_cluster_credentials_py3 import OperationalizationClusterCredentials
from .check_system_services_updates_available_response_py3 import CheckSystemServicesUpdatesAvailableResponse
from .update_system_services_response_py3 import UpdateSystemServicesResponse
from .resource_operation_display_py3 import ResourceOperationDisplay
from .resource_operation_py3 import ResourceOperation
from .available_operations_py3 import AvailableOperations
except (SyntaxError, ImportError):
from .resource import Resource
from .error_detail import ErrorDetail
from .error_response import ErrorResponse
from .error_response_wrapper import ErrorResponseWrapper, ErrorResponseWrapperException
from .storage_account_properties import StorageAccountProperties
from .container_registry_properties import ContainerRegistryProperties
from .service_principal_properties import ServicePrincipalProperties
from .kubernetes_cluster_properties import KubernetesClusterProperties
from .system_service import SystemService
from .acs_cluster_properties import AcsClusterProperties
from .app_insights_properties import AppInsightsProperties
from .ssl_configuration import SslConfiguration
from .service_auth_configuration import ServiceAuthConfiguration
from .auto_scale_configuration import AutoScaleConfiguration
from .global_service_configuration import GlobalServiceConfiguration
from .operationalization_cluster import OperationalizationCluster
from .operationalization_cluster_update_parameters import OperationalizationClusterUpdateParameters
from .storage_account_credentials import StorageAccountCredentials
from .container_registry_credentials import ContainerRegistryCredentials
from .container_service_credentials import ContainerServiceCredentials
from .app_insights_credentials import AppInsightsCredentials
from .operationalization_cluster_credentials import OperationalizationClusterCredentials
from .check_system_services_updates_available_response import CheckSystemServicesUpdatesAvailableResponse
from .update_system_services_response import UpdateSystemServicesResponse
from .resource_operation_display import ResourceOperationDisplay
from .resource_operation import ResourceOperation
from .available_operations import AvailableOperations
from .operationalization_cluster_paged import OperationalizationClusterPaged
from .machine_learning_compute_management_client_enums import (
OperationStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ class AcsClusterProperties(Model):
Variables are only populated by the server, and will be ignored when
sending a request.

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

:ivar cluster_fqdn: The FQDN of the cluster.
:vartype cluster_fqdn: str
:param orchestrator_type: Type of orchestrator. It cannot be changed once
the cluster is created. Possible values include: 'Kubernetes', 'None'
:param orchestrator_type: Required. Type of orchestrator. It cannot be
changed once the cluster is created. Possible values include:
'Kubernetes', 'None'
:type orchestrator_type: str or
~azure.mgmt.machinelearningcompute.models.OrchestratorType
:param orchestrator_properties: Orchestrator specific properties
Expand Down Expand Up @@ -73,12 +76,12 @@ class AcsClusterProperties(Model):
'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'},
}

def __init__(self, orchestrator_type, orchestrator_properties=None, system_services=None, master_count=1, agent_count=2, agent_vm_size="Standard_D3_v2"):
super(AcsClusterProperties, self).__init__()
def __init__(self, **kwargs):
super(AcsClusterProperties, self).__init__(**kwargs)
self.cluster_fqdn = None
self.orchestrator_type = orchestrator_type
self.orchestrator_properties = orchestrator_properties
self.system_services = system_services
self.master_count = master_count
self.agent_count = agent_count
self.agent_vm_size = agent_vm_size
self.orchestrator_type = kwargs.get('orchestrator_type', None)
self.orchestrator_properties = kwargs.get('orchestrator_properties', None)
self.system_services = kwargs.get('system_services', None)
self.master_count = kwargs.get('master_count', 1)
self.agent_count = kwargs.get('agent_count', 2)
self.agent_vm_size = kwargs.get('agent_vm_size', "Standard_D3_v2")
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# 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 AcsClusterProperties(Model):
"""Information about the container service backing the cluster.

Variables are only populated by the server, and will be ignored when
sending a request.

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

:ivar cluster_fqdn: The FQDN of the cluster.
:vartype cluster_fqdn: str
:param orchestrator_type: Required. Type of orchestrator. It cannot be
changed once the cluster is created. Possible values include:
'Kubernetes', 'None'
:type orchestrator_type: str or
~azure.mgmt.machinelearningcompute.models.OrchestratorType
:param orchestrator_properties: Orchestrator specific properties
:type orchestrator_properties:
~azure.mgmt.machinelearningcompute.models.KubernetesClusterProperties
:param system_services: The system services deployed to the cluster
:type system_services:
list[~azure.mgmt.machinelearningcompute.models.SystemService]
:param master_count: The number of master nodes in the container service.
Default value: 1 .
:type master_count: int
:param agent_count: The number of agent nodes in the Container Service.
This can be changed to scale the cluster. Default value: 2 .
:type agent_count: int
:param agent_vm_size: The Azure VM size of the agent VM nodes. This cannot
be changed once the cluster is created. This list is non exhaustive; refer
to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes
for the possible VM sizes. Possible values include: 'Standard_A0',
'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5',
'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9',
'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2',
'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12',
'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2',
'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2',
'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_G1',
'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5',
'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4',
'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14',
'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4',
'Standard_GS5'. Default value: "Standard_D3_v2" .
:type agent_vm_size: str or
~azure.mgmt.machinelearningcompute.models.AgentVMSizeTypes
"""

_validation = {
'cluster_fqdn': {'readonly': True},
'orchestrator_type': {'required': True},
'master_count': {'maximum': 5, 'minimum': 1},
'agent_count': {'maximum': 100, 'minimum': 1},
}

_attribute_map = {
'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'},
'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'},
'orchestrator_properties': {'key': 'orchestratorProperties', 'type': 'KubernetesClusterProperties'},
'system_services': {'key': 'systemServices', 'type': '[SystemService]'},
'master_count': {'key': 'masterCount', 'type': 'int'},
'agent_count': {'key': 'agentCount', 'type': 'int'},
'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'},
}

def __init__(self, *, orchestrator_type, orchestrator_properties=None, system_services=None, master_count: int=1, agent_count: int=2, agent_vm_size="Standard_D3_v2", **kwargs) -> None:
super(AcsClusterProperties, self).__init__(**kwargs)
self.cluster_fqdn = None
self.orchestrator_type = orchestrator_type
self.orchestrator_properties = orchestrator_properties
self.system_services = system_services
self.master_count = master_count
self.agent_count = agent_count
self.agent_vm_size = agent_vm_size
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AppInsightsCredentials(Model):
'instrumentation_key': {'key': 'instrumentationKey', 'type': 'str'},
}

def __init__(self, app_id=None, instrumentation_key=None):
super(AppInsightsCredentials, self).__init__()
self.app_id = app_id
self.instrumentation_key = instrumentation_key
def __init__(self, **kwargs):
super(AppInsightsCredentials, self).__init__(**kwargs)
self.app_id = kwargs.get('app_id', None)
self.instrumentation_key = kwargs.get('instrumentation_key', 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 AppInsightsCredentials(Model):
"""AppInsights credentials.

:param app_id: The AppInsights application ID.
:type app_id: str
:param instrumentation_key: The AppInsights instrumentation key. This is
not returned in response of GET/PUT on the resource. To see this please
call listKeys API.
:type instrumentation_key: str
"""

_attribute_map = {
'app_id': {'key': 'appId', 'type': 'str'},
'instrumentation_key': {'key': 'instrumentationKey', 'type': 'str'},
}

def __init__(self, *, app_id: str=None, instrumentation_key: str=None, **kwargs) -> None:
super(AppInsightsCredentials, self).__init__(**kwargs)
self.app_id = app_id
self.instrumentation_key = instrumentation_key
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ class AppInsightsProperties(Model):
'resource_id': {'key': 'resourceId', 'type': 'str'},
}

def __init__(self, resource_id=None):
super(AppInsightsProperties, self).__init__()
self.resource_id = resource_id
def __init__(self, **kwargs):
super(AppInsightsProperties, self).__init__(**kwargs)
self.resource_id = kwargs.get('resource_id', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 AppInsightsProperties(Model):
"""Properties of App Insights.

:param resource_id: ARM resource ID of the App Insights.
:type resource_id: str
"""

_attribute_map = {
'resource_id': {'key': 'resourceId', 'type': 'str'},
}

def __init__(self, *, resource_id: str=None, **kwargs) -> None:
super(AppInsightsProperties, self).__init__(**kwargs)
self.resource_id = resource_id
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ class AutoScaleConfiguration(Model):
'refresh_period_in_seconds': {'key': 'refreshPeriodInSeconds', 'type': 'int'},
}

def __init__(self, status="Disabled", min_replicas=1, max_replicas=100, target_utilization=None, refresh_period_in_seconds=None):
super(AutoScaleConfiguration, self).__init__()
self.status = status
self.min_replicas = min_replicas
self.max_replicas = max_replicas
self.target_utilization = target_utilization
self.refresh_period_in_seconds = refresh_period_in_seconds
def __init__(self, **kwargs):
super(AutoScaleConfiguration, self).__init__(**kwargs)
self.status = kwargs.get('status', "Disabled")
self.min_replicas = kwargs.get('min_replicas', 1)
self.max_replicas = kwargs.get('max_replicas', 100)
self.target_utilization = kwargs.get('target_utilization', None)
self.refresh_period_in_seconds = kwargs.get('refresh_period_in_seconds', None)
Loading