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 machinelearningservices/resource-manager] Masable/update workspace #3350

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-machinelearningservices/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:

Release History
===============

0.1.0 (1970-01-01)
++++++++++++++++++

* Initial Release
2 changes: 2 additions & 0 deletions azure-mgmt-machinelearningservices/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include *.rst
include azure_bdist_wheel.py
49 changes: 49 additions & 0 deletions azure-mgmt-machinelearningservices/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure MyService Management Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

For code examples, see `MyService Management
<https://docs.microsoft.com/python/api/overview/azure/>`__
on docs.microsoft.com.


Provide Feedback
================

If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.
1 change: 1 addition & 0 deletions azure-mgmt-machinelearningservices/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
1 change: 1 addition & 0 deletions azure-mgmt-machinelearningservices/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class Workspace(Resource):
:ivar creation_time: The creation time of the machine learning workspace
in ISO8601 format.
:vartype creation_time: datetime
:param batchai_workspace: ARM id of the Batch AI workspace associated with
this workspace. This cannot be changed once the workspace has been created
:type batchai_workspace: str
:param key_vault: ARM id of the key vault associated with this workspace.
This cannot be changed once the workspace has been created
:type key_vault: str
Expand Down Expand Up @@ -86,6 +89,7 @@ class Workspace(Resource):
'description': {'key': 'properties.description', 'type': 'str'},
'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
'batchai_workspace': {'key': 'properties.batchaiWorkspace', 'type': 'str'},
'key_vault': {'key': 'properties.keyVault', 'type': 'str'},
'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'},
'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'},
Expand All @@ -100,6 +104,7 @@ def __init__(self, **kwargs):
self.description = kwargs.get('description', None)
self.friendly_name = kwargs.get('friendly_name', None)
self.creation_time = None
self.batchai_workspace = kwargs.get('batchai_workspace', None)
self.key_vault = kwargs.get('key_vault', None)
self.application_insights = kwargs.get('application_insights', None)
self.container_registry = kwargs.get('container_registry', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class Workspace(Resource):
:ivar creation_time: The creation time of the machine learning workspace
in ISO8601 format.
:vartype creation_time: datetime
:param batchai_workspace: ARM id of the Batch AI workspace associated with
this workspace. This cannot be changed once the workspace has been created
:type batchai_workspace: str
:param key_vault: ARM id of the key vault associated with this workspace.
This cannot be changed once the workspace has been created
:type key_vault: str
Expand Down Expand Up @@ -86,6 +89,7 @@ class Workspace(Resource):
'description': {'key': 'properties.description', 'type': 'str'},
'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
'batchai_workspace': {'key': 'properties.batchaiWorkspace', 'type': 'str'},
'key_vault': {'key': 'properties.keyVault', 'type': 'str'},
'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'},
'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'},
Expand All @@ -94,12 +98,13 @@ class Workspace(Resource):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}

def __init__(self, *, location: str=None, tags=None, description: str=None, friendly_name: str=None, key_vault: str=None, application_insights: str=None, container_registry: str=None, storage_account: str=None, discovery_url: str=None, **kwargs) -> None:
def __init__(self, *, location: str=None, tags=None, description: str=None, friendly_name: str=None, batchai_workspace: str=None, key_vault: str=None, application_insights: str=None, container_registry: str=None, storage_account: str=None, discovery_url: str=None, **kwargs) -> None:
super(Workspace, self).__init__(location=location, tags=tags, **kwargs)
self.workspace_id = None
self.description = description
self.friendly_name = friendly_name
self.creation_time = None
self.batchai_workspace = batchai_workspace
self.key_vault = key_vault
self.application_insights = application_insights
self.container_registry = container_registry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -93,9 +93,8 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.MachineLearningServiceErrorException(self._deserialize, response)
Expand Down Expand Up @@ -153,7 +152,7 @@ def get(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -162,8 +161,8 @@ def get(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.MachineLearningServiceErrorException(self._deserialize, response)
Expand Down Expand Up @@ -199,6 +198,7 @@ def _create_or_update_initial(

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
Expand All @@ -211,9 +211,8 @@ def _create_or_update_initial(
body_content = self._serialize.body(parameters, 'ComputeResource')

# Construct and send request
request = self._client.put(url, query_parameters)
response = self._client.send(
request, header_parameters, body_content, stream=False, **operation_config)
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 201]:
raise models.MachineLearningServiceErrorException(self._deserialize, response)
Expand Down Expand Up @@ -320,7 +319,6 @@ def _delete_initial(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -329,8 +327,8 @@ def _delete_initial(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.delete(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.delete(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 202]:
raise models.MachineLearningServiceErrorException(self._deserialize, response)
Expand Down Expand Up @@ -433,7 +431,7 @@ def get_keys(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -442,8 +440,8 @@ def get_keys(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.post(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.MachineLearningServiceErrorException(self._deserialize, response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -77,9 +77,8 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.MachineLearningServiceErrorException(self._deserialize, response)
Expand Down
Loading