Skip to content

Commit

Permalink
[AutoPR batchai/resource-manager] DO NOT MERGE. BatchAI. Specificatio…
Browse files Browse the repository at this point in the history
…n for new 2018-05-01 API version (#2423)

* Generated from 9d2dd94a3fef664168ddda7bc83bb471700e1b23

BatchAI. SDK 2018-05-01

Changes:
- Added first class support for Horovod framework
- Added first class support for custom mpi commands
- Introduced workspaces
- Introduces experiments as a grouping mechanism for related jobs
- Moved jobs from the top level into workpace/experiment
- Moved clusters and file servers from the top level into workspaces
- Removing filter and select parameters as they are not suppported yet
- Removing FileServer type as only NFS is supporter
- Removed type of output directories - server doesn't support it
- Removed 'createNew' attribute of output directory because there is no
use-case scenario for having it equal to false.

* Generated from ad43bbe835e6a244af9cd39cd0ab6be757e9b42c

Addressed CR feedback

* Generated from 1ed70938835b3689a0effeb616d3a2c2589d2fc3

BatchAI. Get rid of booleans and added readonly attributes to where applicable
  • Loading branch information
AutorestCI authored Apr 27, 2018
1 parent 241e7c7 commit df9c4b9
Show file tree
Hide file tree
Showing 84 changed files with 3,074 additions and 1,363 deletions.
36 changes: 23 additions & 13 deletions azure-mgmt-batchai/azure/mgmt/batchai/batch_ai_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@
# 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
from .operations.operations import Operations
from .operations.usage_operations import UsageOperations
from .operations.usages_operations import UsagesOperations
from .operations.clusters_operations import ClustersOperations
from .operations.jobs_operations import JobsOperations
from .operations.file_servers_operations import FileServersOperations
from .operations.workspaces_operations import WorkspacesOperations
from .operations.experiments_operations import ExperimentsOperations
from .operations.jobs_operations import JobsOperations
from . import models


Expand Down Expand Up @@ -53,22 +55,26 @@ def __init__(
self.subscription_id = subscription_id


class BatchAIManagementClient(object):
class BatchAIManagementClient(SDKClient):
"""The Azure BatchAI Management API.
:ivar config: Configuration for client.
:vartype config: BatchAIManagementClientConfiguration
:ivar operations: Operations operations
:vartype operations: azure.mgmt.batchai.operations.Operations
:ivar usage: Usage operations
:vartype usage: azure.mgmt.batchai.operations.UsageOperations
:ivar usages: Usages operations
:vartype usages: azure.mgmt.batchai.operations.UsagesOperations
:ivar clusters: Clusters operations
:vartype clusters: azure.mgmt.batchai.operations.ClustersOperations
:ivar jobs: Jobs operations
:vartype jobs: azure.mgmt.batchai.operations.JobsOperations
:ivar file_servers: FileServers operations
:vartype file_servers: azure.mgmt.batchai.operations.FileServersOperations
:ivar workspaces: Workspaces operations
:vartype workspaces: azure.mgmt.batchai.operations.WorkspacesOperations
:ivar experiments: Experiments operations
:vartype experiments: azure.mgmt.batchai.operations.ExperimentsOperations
:ivar jobs: Jobs operations
:vartype jobs: azure.mgmt.batchai.operations.JobsOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -82,20 +88,24 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = BatchAIManagementClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(BatchAIManagementClient, 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-03-01'
self.api_version = '2018-05-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.usages = UsagesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.jobs = JobsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.file_servers = FileServersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.workspaces = WorkspacesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.experiments = ExperimentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.jobs = JobsOperations(
self._client, self.config, self._serialize, self._deserialize)
76 changes: 53 additions & 23 deletions azure-mgmt-batchai/azure/mgmt/batchai/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
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
Expand Down Expand Up @@ -54,6 +53,8 @@
from .caffe2_settings_py3 import Caffe2Settings
from .chainer_settings_py3 import ChainerSettings
from .custom_toolkit_settings_py3 import CustomToolkitSettings
from .custom_mpi_settings_py3 import CustomMpiSettings
from .horovod_settings_py3 import HorovodSettings
from .job_preparation_py3 import JobPreparation
from .input_directory_py3 import InputDirectory
from .output_directory_py3 import OutputDirectory
Expand All @@ -65,16 +66,23 @@
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 .proxy_resource_py3 import ProxyResource
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .workspace_py3 import Workspace
from .workspace_create_parameters_py3 import WorkspaceCreateParameters
from .experiment_py3 import Experiment
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 .clusters_list_by_workspace_options_py3 import ClustersListByWorkspaceOptions
from .file_servers_list_options_py3 import FileServersListOptions
from .file_servers_list_by_resource_group_options_py3 import FileServersListByResourceGroupOptions
from .file_servers_list_by_workspace_options_py3 import FileServersListByWorkspaceOptions
from .workspaces_list_options_py3 import WorkspacesListOptions
from .workspaces_list_by_resource_group_options_py3 import WorkspacesListByResourceGroupOptions
from .experiments_list_by_workspace_options_py3 import ExperimentsListByWorkspaceOptions
from .jobs_list_by_experiment_options_py3 import JobsListByExperimentOptions
from .jobs_list_output_files_options_py3 import JobsListOutputFilesOptions
except (SyntaxError, ImportError):
from .usage_name import UsageName
from .usage import Usage
Expand All @@ -85,7 +93,6 @@
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
Expand Down Expand Up @@ -120,6 +127,8 @@
from .caffe2_settings import Caffe2Settings
from .chainer_settings import ChainerSettings
from .custom_toolkit_settings import CustomToolkitSettings
from .custom_mpi_settings import CustomMpiSettings
from .horovod_settings import HorovodSettings
from .job_preparation import JobPreparation
from .input_directory import InputDirectory
from .output_directory import OutputDirectory
Expand All @@ -131,35 +140,45 @@
from .remote_login_information import RemoteLoginInformation
from .file import File
from .resource import Resource
from .local_data_volume import LocalDataVolume
from .proxy_resource import ProxyResource
from .operation_display import OperationDisplay
from .operation import Operation
from .workspace import Workspace
from .workspace_create_parameters import WorkspaceCreateParameters
from .experiment import Experiment
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 .clusters_list_by_workspace_options import ClustersListByWorkspaceOptions
from .file_servers_list_options import FileServersListOptions
from .file_servers_list_by_resource_group_options import FileServersListByResourceGroupOptions
from .file_servers_list_by_workspace_options import FileServersListByWorkspaceOptions
from .workspaces_list_options import WorkspacesListOptions
from .workspaces_list_by_resource_group_options import WorkspacesListByResourceGroupOptions
from .experiments_list_by_workspace_options import ExperimentsListByWorkspaceOptions
from .jobs_list_by_experiment_options import JobsListByExperimentOptions
from .jobs_list_output_files_options import JobsListOutputFilesOptions
from .operation_paged import OperationPaged
from .usage_paged import UsagePaged
from .remote_login_information_paged import RemoteLoginInformationPaged
from .cluster_paged import ClusterPaged
from .remote_login_information_paged import RemoteLoginInformationPaged
from .file_server_paged import FileServerPaged
from .workspace_paged import WorkspacePaged
from .experiment_paged import ExperimentPaged
from .job_paged import JobPaged
from .file_paged import FilePaged
from .file_server_paged import FileServerPaged
from .batch_ai_management_client_enums import (
UsageUnit,
CachingType,
StorageAccountType,
FileServerType,
FileServerProvisioningState,
VmPriority,
DeallocationOption,
ProvisioningState,
AllocationState,
OutputType,
JobPriority,
ToolType,
ExecutionState,
FileType,
)

__all__ = [
Expand All @@ -172,7 +191,6 @@
'MountSettings',
'FileServer',
'KeyVaultSecretReference',
'KeyVaultKeyReference',
'FileServerCreateParameters',
'ManualScaleSettings',
'AutoScaleSettings',
Expand Down Expand Up @@ -207,6 +225,8 @@
'Caffe2Settings',
'ChainerSettings',
'CustomToolkitSettings',
'CustomMpiSettings',
'HorovodSettings',
'JobPreparation',
'InputDirectory',
'OutputDirectory',
Expand All @@ -218,32 +238,42 @@
'RemoteLoginInformation',
'File',
'Resource',
'LocalDataVolume',
'ProxyResource',
'OperationDisplay',
'Operation',
'Workspace',
'WorkspaceCreateParameters',
'Experiment',
'ClustersListOptions',
'ClustersListByResourceGroupOptions',
'JobsListOptions',
'JobsListByResourceGroupOptions',
'JobsListOutputFilesOptions',
'ClustersListByWorkspaceOptions',
'FileServersListOptions',
'FileServersListByResourceGroupOptions',
'FileServersListByWorkspaceOptions',
'WorkspacesListOptions',
'WorkspacesListByResourceGroupOptions',
'ExperimentsListByWorkspaceOptions',
'JobsListByExperimentOptions',
'JobsListOutputFilesOptions',
'OperationPaged',
'UsagePaged',
'RemoteLoginInformationPaged',
'ClusterPaged',
'RemoteLoginInformationPaged',
'FileServerPaged',
'WorkspacePaged',
'ExperimentPaged',
'JobPaged',
'FilePaged',
'FileServerPaged',
'UsageUnit',
'CachingType',
'StorageAccountType',
'FileServerType',
'FileServerProvisioningState',
'VmPriority',
'DeallocationOption',
'ProvisioningState',
'AllocationState',
'OutputType',
'JobPriority',
'ToolType',
'ExecutionState',
'FileType',
]
29 changes: 19 additions & 10 deletions azure-mgmt-batchai/azure/mgmt/batchai/models/batch_ai_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,25 @@
class BatchAIError(Model):
"""An error response from the Batch AI service.
:param code: An identifier for the error. Codes are invariant and are
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar code: An identifier for the error. Codes are invariant and are
intended to be consumed programmatically.
:type code: str
:param message: A message describing the error, intended to be suitable
for display in a user interface.
:type message: str
:param details: A list of additional details about the error.
:type details: list[~azure.mgmt.batchai.models.NameValuePair]
:vartype code: str
:ivar message: A message describing the error, intended to be suitable for
display in a user interface.
:vartype message: str
:ivar details: A list of additional details about the error.
:vartype details: list[~azure.mgmt.batchai.models.NameValuePair]
"""

_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
'details': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
Expand All @@ -33,6 +42,6 @@ class BatchAIError(Model):

def __init__(self, **kwargs):
super(BatchAIError, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)
self.details = kwargs.get('details', None)
self.code = None
self.message = None
self.details = None
31 changes: 20 additions & 11 deletions azure-mgmt-batchai/azure/mgmt/batchai/models/batch_ai_error_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,33 @@
class BatchAIError(Model):
"""An error response from the Batch AI service.
:param code: An identifier for the error. Codes are invariant and are
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar code: An identifier for the error. Codes are invariant and are
intended to be consumed programmatically.
:type code: str
:param message: A message describing the error, intended to be suitable
for display in a user interface.
:type message: str
:param details: A list of additional details about the error.
:type details: list[~azure.mgmt.batchai.models.NameValuePair]
:vartype code: str
:ivar message: A message describing the error, intended to be suitable for
display in a user interface.
:vartype message: str
:ivar details: A list of additional details about the error.
:vartype details: list[~azure.mgmt.batchai.models.NameValuePair]
"""

_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
'details': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'details': {'key': 'details', 'type': '[NameValuePair]'},
}

def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None:
def __init__(self, **kwargs) -> None:
super(BatchAIError, self).__init__(**kwargs)
self.code = code
self.message = message
self.details = details
self.code = None
self.message = None
self.details = None
Loading

0 comments on commit df9c4b9

Please sign in to comment.