Skip to content

Commit

Permalink
BatchAI. SDK for 2018-03-01 Rest API (Azure#2211)
Browse files Browse the repository at this point in the history
* BatchAI. Generated new SDK for 2018-03-01 API spec

* BatchAI. Updated unit tests

* BatchAI. Updated unit tests recordings

* BatchAI. Updated setup.py

* Rebuild by Azure#2211

* BatchAI. Updated unit test to be compatible with new code generator

* Update version.py
  • Loading branch information
AlexanderYukhanov authored and lmazuel committed Mar 19, 2018
1 parent 7d68689 commit 747acf8
Show file tree
Hide file tree
Showing 167 changed files with 11,867 additions and 5,669 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.operations import Operations
from .operations.usage_operations import UsageOperations
from .operations.clusters_operations import ClustersOperations
from .operations.jobs_operations import JobsOperations
from .operations.file_servers_operations import FileServersOperations
Expand All @@ -40,14 +41,12 @@ def __init__(
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not isinstance(subscription_id, str):
raise TypeError("Parameter 'subscription_id' must be str.")
if not base_url:
base_url = 'https://management.azure.com'

super(BatchAIManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('batchaimanagementclient/{}'.format(VERSION))
self.add_user_agent('azure-mgmt-batchai/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
Expand All @@ -62,6 +61,8 @@ class BatchAIManagementClient(object):
:ivar operations: Operations operations
:vartype operations: azure.mgmt.batchai.operations.Operations
:ivar usage: Usage operations
:vartype usage: azure.mgmt.batchai.operations.UsageOperations
:ivar clusters: Clusters operations
:vartype clusters: azure.mgmt.batchai.operations.ClustersOperations
:ivar jobs: Jobs operations
Expand All @@ -84,12 +85,14 @@ 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 = '2017-09-01-preview'
self.api_version = '2018-03-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.usage = UsageOperations(
self._client, self.config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.jobs = JobsOperations(
Expand Down
201 changes: 141 additions & 60 deletions azure-mgmt-batchai/azure/mgmt/batchai/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,66 +9,140 @@
# regenerated.
# --------------------------------------------------------------------------

from .user_account_settings import UserAccountSettings
from .ssh_configuration import SshConfiguration
from .data_disks import DataDisks
from .resource_id import ResourceId
from .mount_settings import MountSettings
from .file_server import FileServer
from .key_vault_secret_reference import KeyVaultSecretReference
from .key_vault_key_reference import KeyVaultKeyReference
from .file_server_create_parameters import FileServerCreateParameters
from .manual_scale_settings import ManualScaleSettings
from .auto_scale_settings import AutoScaleSettings
from .scale_settings import ScaleSettings
from .image_reference import ImageReference
from .virtual_machine_configuration import VirtualMachineConfiguration
from .environment_setting import EnvironmentSetting
from .setup_task import SetupTask
from .azure_storage_credentials_info import AzureStorageCredentialsInfo
from .azure_file_share_reference import AzureFileShareReference
from .azure_blob_file_system_reference import AzureBlobFileSystemReference
from .file_server_reference import FileServerReference
from .unmanaged_file_system_reference import UnmanagedFileSystemReference
from .mount_volumes import MountVolumes
from .node_setup import NodeSetup
from .node_state_counts import NodeStateCounts
from .cluster_create_parameters import ClusterCreateParameters
from .cluster_update_parameters import ClusterUpdateParameters
from .name_value_pair import NameValuePair
from .batch_ai_error import BatchAIError
from .cluster import Cluster
from .private_registry_credentials import PrivateRegistryCredentials
from .image_source_registry import ImageSourceRegistry
from .container_settings import ContainerSettings
from .cnt_ksettings import CNTKsettings
from .tensor_flow_settings import TensorFlowSettings
from .caffe_settings import CaffeSettings
from .caffe2_settings import Caffe2Settings
from .chainer_settings import ChainerSettings
from .custom_toolkit_settings import CustomToolkitSettings
from .job_preparation import JobPreparation
from .input_directory import InputDirectory
from .output_directory import OutputDirectory
from .job_base_properties_constraints import JobBasePropertiesConstraints
from .job_create_parameters import JobCreateParameters
from .job_properties_constraints import JobPropertiesConstraints
from .job_properties_execution_info import JobPropertiesExecutionInfo
from .job import Job
from .remote_login_information import RemoteLoginInformation
from .file import File
from .resource import Resource
from .local_data_volume import LocalDataVolume
from .operation_display import OperationDisplay
from .operation import Operation
from .clusters_list_options import ClustersListOptions
from .clusters_list_by_resource_group_options import ClustersListByResourceGroupOptions
from .jobs_list_options import JobsListOptions
from .jobs_list_by_resource_group_options import JobsListByResourceGroupOptions
from .jobs_list_output_files_options import JobsListOutputFilesOptions
from .file_servers_list_options import FileServersListOptions
from .file_servers_list_by_resource_group_options import FileServersListByResourceGroupOptions
try:
from .usage_name_py3 import UsageName
from .usage_py3 import Usage
from .user_account_settings_py3 import UserAccountSettings
from .ssh_configuration_py3 import SshConfiguration
from .data_disks_py3 import DataDisks
from .resource_id_py3 import ResourceId
from .mount_settings_py3 import MountSettings
from .file_server_py3 import FileServer
from .key_vault_secret_reference_py3 import KeyVaultSecretReference
from .key_vault_key_reference_py3 import KeyVaultKeyReference
from .file_server_create_parameters_py3 import FileServerCreateParameters
from .manual_scale_settings_py3 import ManualScaleSettings
from .auto_scale_settings_py3 import AutoScaleSettings
from .scale_settings_py3 import ScaleSettings
from .image_reference_py3 import ImageReference
from .virtual_machine_configuration_py3 import VirtualMachineConfiguration
from .environment_variable_py3 import EnvironmentVariable
from .environment_variable_with_secret_value_py3 import EnvironmentVariableWithSecretValue
from .setup_task_py3 import SetupTask
from .azure_storage_credentials_info_py3 import AzureStorageCredentialsInfo
from .azure_file_share_reference_py3 import AzureFileShareReference
from .azure_blob_file_system_reference_py3 import AzureBlobFileSystemReference
from .file_server_reference_py3 import FileServerReference
from .unmanaged_file_system_reference_py3 import UnmanagedFileSystemReference
from .mount_volumes_py3 import MountVolumes
from .app_insights_reference_py3 import AppInsightsReference
from .performance_counters_settings_py3 import PerformanceCountersSettings
from .node_setup_py3 import NodeSetup
from .node_state_counts_py3 import NodeStateCounts
from .cluster_create_parameters_py3 import ClusterCreateParameters
from .cluster_update_parameters_py3 import ClusterUpdateParameters
from .name_value_pair_py3 import NameValuePair
from .batch_ai_error_py3 import BatchAIError
from .cluster_py3 import Cluster
from .private_registry_credentials_py3 import PrivateRegistryCredentials
from .image_source_registry_py3 import ImageSourceRegistry
from .container_settings_py3 import ContainerSettings
from .cnt_ksettings_py3 import CNTKsettings
from .py_torch_settings_py3 import PyTorchSettings
from .tensor_flow_settings_py3 import TensorFlowSettings
from .caffe_settings_py3 import CaffeSettings
from .caffe2_settings_py3 import Caffe2Settings
from .chainer_settings_py3 import ChainerSettings
from .custom_toolkit_settings_py3 import CustomToolkitSettings
from .job_preparation_py3 import JobPreparation
from .input_directory_py3 import InputDirectory
from .output_directory_py3 import OutputDirectory
from .job_base_properties_constraints_py3 import JobBasePropertiesConstraints
from .job_create_parameters_py3 import JobCreateParameters
from .job_properties_constraints_py3 import JobPropertiesConstraints
from .job_properties_execution_info_py3 import JobPropertiesExecutionInfo
from .job_py3 import Job
from .remote_login_information_py3 import RemoteLoginInformation
from .file_py3 import File
from .resource_py3 import Resource
from .local_data_volume_py3 import LocalDataVolume
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .clusters_list_options_py3 import ClustersListOptions
from .clusters_list_by_resource_group_options_py3 import ClustersListByResourceGroupOptions
from .jobs_list_options_py3 import JobsListOptions
from .jobs_list_by_resource_group_options_py3 import JobsListByResourceGroupOptions
from .jobs_list_output_files_options_py3 import JobsListOutputFilesOptions
from .file_servers_list_options_py3 import FileServersListOptions
from .file_servers_list_by_resource_group_options_py3 import FileServersListByResourceGroupOptions
except (SyntaxError, ImportError):
from .usage_name import UsageName
from .usage import Usage
from .user_account_settings import UserAccountSettings
from .ssh_configuration import SshConfiguration
from .data_disks import DataDisks
from .resource_id import ResourceId
from .mount_settings import MountSettings
from .file_server import FileServer
from .key_vault_secret_reference import KeyVaultSecretReference
from .key_vault_key_reference import KeyVaultKeyReference
from .file_server_create_parameters import FileServerCreateParameters
from .manual_scale_settings import ManualScaleSettings
from .auto_scale_settings import AutoScaleSettings
from .scale_settings import ScaleSettings
from .image_reference import ImageReference
from .virtual_machine_configuration import VirtualMachineConfiguration
from .environment_variable import EnvironmentVariable
from .environment_variable_with_secret_value import EnvironmentVariableWithSecretValue
from .setup_task import SetupTask
from .azure_storage_credentials_info import AzureStorageCredentialsInfo
from .azure_file_share_reference import AzureFileShareReference
from .azure_blob_file_system_reference import AzureBlobFileSystemReference
from .file_server_reference import FileServerReference
from .unmanaged_file_system_reference import UnmanagedFileSystemReference
from .mount_volumes import MountVolumes
from .app_insights_reference import AppInsightsReference
from .performance_counters_settings import PerformanceCountersSettings
from .node_setup import NodeSetup
from .node_state_counts import NodeStateCounts
from .cluster_create_parameters import ClusterCreateParameters
from .cluster_update_parameters import ClusterUpdateParameters
from .name_value_pair import NameValuePair
from .batch_ai_error import BatchAIError
from .cluster import Cluster
from .private_registry_credentials import PrivateRegistryCredentials
from .image_source_registry import ImageSourceRegistry
from .container_settings import ContainerSettings
from .cnt_ksettings import CNTKsettings
from .py_torch_settings import PyTorchSettings
from .tensor_flow_settings import TensorFlowSettings
from .caffe_settings import CaffeSettings
from .caffe2_settings import Caffe2Settings
from .chainer_settings import ChainerSettings
from .custom_toolkit_settings import CustomToolkitSettings
from .job_preparation import JobPreparation
from .input_directory import InputDirectory
from .output_directory import OutputDirectory
from .job_base_properties_constraints import JobBasePropertiesConstraints
from .job_create_parameters import JobCreateParameters
from .job_properties_constraints import JobPropertiesConstraints
from .job_properties_execution_info import JobPropertiesExecutionInfo
from .job import Job
from .remote_login_information import RemoteLoginInformation
from .file import File
from .resource import Resource
from .local_data_volume import LocalDataVolume
from .operation_display import OperationDisplay
from .operation import Operation
from .clusters_list_options import ClustersListOptions
from .clusters_list_by_resource_group_options import ClustersListByResourceGroupOptions
from .jobs_list_options import JobsListOptions
from .jobs_list_by_resource_group_options import JobsListByResourceGroupOptions
from .jobs_list_output_files_options import JobsListOutputFilesOptions
from .file_servers_list_options import FileServersListOptions
from .file_servers_list_by_resource_group_options import FileServersListByResourceGroupOptions
from .operation_paged import OperationPaged
from .usage_paged import UsagePaged
from .remote_login_information_paged import RemoteLoginInformationPaged
from .cluster_paged import ClusterPaged
from .job_paged import JobPaged
Expand All @@ -89,6 +163,8 @@
)

__all__ = [
'UsageName',
'Usage',
'UserAccountSettings',
'SshConfiguration',
'DataDisks',
Expand All @@ -103,14 +179,17 @@
'ScaleSettings',
'ImageReference',
'VirtualMachineConfiguration',
'EnvironmentSetting',
'EnvironmentVariable',
'EnvironmentVariableWithSecretValue',
'SetupTask',
'AzureStorageCredentialsInfo',
'AzureFileShareReference',
'AzureBlobFileSystemReference',
'FileServerReference',
'UnmanagedFileSystemReference',
'MountVolumes',
'AppInsightsReference',
'PerformanceCountersSettings',
'NodeSetup',
'NodeStateCounts',
'ClusterCreateParameters',
Expand All @@ -122,6 +201,7 @@
'ImageSourceRegistry',
'ContainerSettings',
'CNTKsettings',
'PyTorchSettings',
'TensorFlowSettings',
'CaffeSettings',
'Caffe2Settings',
Expand Down Expand Up @@ -149,6 +229,7 @@
'FileServersListOptions',
'FileServersListByResourceGroupOptions',
'OperationPaged',
'UsagePaged',
'RemoteLoginInformationPaged',
'ClusterPaged',
'JobPaged',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 AppInsightsReference(Model):
"""Specifies Azure Application Insights information for performance counters
reporting.
All required parameters must be populated in order to send to Azure.
:param component: Required. Specifies the Azure Application Insights
component resource id.
:type component: ~azure.mgmt.batchai.models.ResourceId
:param instrumentation_key: Value of the Azure Application Insights
instrumentation key.
:type instrumentation_key: str
:param instrumentation_key_secret_reference: Specifies a KeyVault Secret
containing Azure Application Insights instrumentation key. Specifies
KeyVault Store and Secret which contains Azure Application Insights
instrumentation key. One of instumentationKey or
instrumentationKeySecretReference must be specified.
:type instrumentation_key_secret_reference:
~azure.mgmt.batchai.models.KeyVaultSecretReference
"""

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

_attribute_map = {
'component': {'key': 'component', 'type': 'ResourceId'},
'instrumentation_key': {'key': 'instrumentationKey', 'type': 'str'},
'instrumentation_key_secret_reference': {'key': 'instrumentationKeySecretReference', 'type': 'KeyVaultSecretReference'},
}

def __init__(self, **kwargs):
super(AppInsightsReference, self).__init__(**kwargs)
self.component = kwargs.get('component', None)
self.instrumentation_key = kwargs.get('instrumentation_key', None)
self.instrumentation_key_secret_reference = kwargs.get('instrumentation_key_secret_reference', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 AppInsightsReference(Model):
"""Specifies Azure Application Insights information for performance counters
reporting.
All required parameters must be populated in order to send to Azure.
:param component: Required. Specifies the Azure Application Insights
component resource id.
:type component: ~azure.mgmt.batchai.models.ResourceId
:param instrumentation_key: Value of the Azure Application Insights
instrumentation key.
:type instrumentation_key: str
:param instrumentation_key_secret_reference: Specifies a KeyVault Secret
containing Azure Application Insights instrumentation key. Specifies
KeyVault Store and Secret which contains Azure Application Insights
instrumentation key. One of instumentationKey or
instrumentationKeySecretReference must be specified.
:type instrumentation_key_secret_reference:
~azure.mgmt.batchai.models.KeyVaultSecretReference
"""

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

_attribute_map = {
'component': {'key': 'component', 'type': 'ResourceId'},
'instrumentation_key': {'key': 'instrumentationKey', 'type': 'str'},
'instrumentation_key_secret_reference': {'key': 'instrumentationKeySecretReference', 'type': 'KeyVaultSecretReference'},
}

def __init__(self, *, component, instrumentation_key: str=None, instrumentation_key_secret_reference=None, **kwargs) -> None:
super(AppInsightsReference, self).__init__(**kwargs)
self.component = component
self.instrumentation_key = instrumentation_key
self.instrumentation_key_secret_reference = instrumentation_key_secret_reference
Loading

0 comments on commit 747acf8

Please sign in to comment.