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] storage/resource-manager #3352

Merged
merged 4 commits into from
Sep 27, 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
20 changes: 20 additions & 0 deletions azure-mgmt-storage/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
Release History
===============

3.0.0 (2018-09-27)
++++++++++++++++++

**Features**

- Model StorageAccount has a new parameter enable_azure_files_aad_integration
- Model StorageAccountCreateParameters has a new parameter enable_azure_files_aad_integration
- Model StorageAccountUpdateParameters has a new parameter enable_azure_files_aad_integration
- Added operation group ManagementPoliciesOperations. This is considered preview and breaking changes might happen.

**Breaking changes**

- "usage" has been renamed "usages", and the "list" operation has been replaced by "list_by_location".
Ability to make usage requests locally is not available anymore.

**Note**

- azure-mgmt-nspkg is not installed anymore on Python 3 (PEP420-based namespace package)


2.0.0 (2018-08-01)
++++++++++++++++++

Expand Down
38 changes: 35 additions & 3 deletions azure-mgmt-storage/azure/mgmt/storage/storage_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class StorageManagementClient(MultiApiClientMixin, SDKClient):
By default, uses latest API version available on public Azure.
For production, you should stick a particular api-version and/or profile.
The profile sets a mapping between the operation group and an API version.
The api-version parameter sets the default API version if the operation
The api-version parameter sets the default API version if the operation
group is not described in the profile.

:ivar config: Configuration for client.
Expand All @@ -80,7 +80,7 @@ class StorageManagementClient(MultiApiClientMixin, SDKClient):
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION='2018-02-01'
DEFAULT_API_VERSION='2018-07-01'
_PROFILE_TAG = "azure.mgmt.storage.StorageManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand Down Expand Up @@ -115,6 +115,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2017-10-01: :mod:`v2017_10_01.models<azure.mgmt.storage.v2017_10_01.models>`
* 2018-02-01: :mod:`v2018_02_01.models<azure.mgmt.storage.v2018_02_01.models>`
* 2018-03-01-preview: :mod:`v2018_03_01_preview.models<azure.mgmt.storage.v2018_03_01_preview.models>`
* 2018-07-01: :mod:`v2018_07_01.models<azure.mgmt.storage.v2018_07_01.models>`
"""
if api_version == '2015-06-15':
from .v2015_06_15 import models
Expand All @@ -137,20 +138,39 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2018-03-01-preview':
from .v2018_03_01_preview import models
return models
elif api_version == '2018-07-01':
from .v2018_07_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
def blob_containers(self):
"""Instance depends on the API version:

* 2018-02-01: :class:`BlobContainersOperations<azure.mgmt.storage.v2018_02_01.operations.BlobContainersOperations>`
* 2018-03-01-preview: :class:`BlobContainersOperations<azure.mgmt.storage.v2018_03_01_preview.operations.BlobContainersOperations>`
* 2018-07-01: :class:`BlobContainersOperations<azure.mgmt.storage.v2018_07_01.operations.BlobContainersOperations>`
"""
api_version = self._get_api_version('blob_containers')
if api_version == '2018-02-01':
from .v2018_02_01.operations import BlobContainersOperations as OperationClass
elif api_version == '2018-03-01-preview':
from .v2018_03_01_preview.operations import BlobContainersOperations as OperationClass
elif api_version == '2018-07-01':
from .v2018_07_01.operations import BlobContainersOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def management_policies(self):
"""Instance depends on the API version:

* 2018-07-01: :class:`ManagementPoliciesOperations<azure.mgmt.storage.v2018_07_01.operations.ManagementPoliciesOperations>`
"""
api_version = self._get_api_version('management_policies')
if api_version == '2018-07-01':
from .v2018_07_01.operations import ManagementPoliciesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -163,6 +183,7 @@ def operations(self):
* 2017-10-01: :class:`Operations<azure.mgmt.storage.v2017_10_01.operations.Operations>`
* 2018-02-01: :class:`Operations<azure.mgmt.storage.v2018_02_01.operations.Operations>`
* 2018-03-01-preview: :class:`Operations<azure.mgmt.storage.v2018_03_01_preview.operations.Operations>`
* 2018-07-01: :class:`Operations<azure.mgmt.storage.v2018_07_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2017-06-01':
Expand All @@ -173,6 +194,8 @@ def operations(self):
from .v2018_02_01.operations import Operations as OperationClass
elif api_version == '2018-03-01-preview':
from .v2018_03_01_preview.operations import Operations as OperationClass
elif api_version == '2018-07-01':
from .v2018_07_01.operations import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -185,6 +208,7 @@ def skus(self):
* 2017-10-01: :class:`SkusOperations<azure.mgmt.storage.v2017_10_01.operations.SkusOperations>`
* 2018-02-01: :class:`SkusOperations<azure.mgmt.storage.v2018_02_01.operations.SkusOperations>`
* 2018-03-01-preview: :class:`SkusOperations<azure.mgmt.storage.v2018_03_01_preview.operations.SkusOperations>`
* 2018-07-01: :class:`SkusOperations<azure.mgmt.storage.v2018_07_01.operations.SkusOperations>`
"""
api_version = self._get_api_version('skus')
if api_version == '2017-06-01':
Expand All @@ -195,6 +219,8 @@ def skus(self):
from .v2018_02_01.operations import SkusOperations as OperationClass
elif api_version == '2018-03-01-preview':
from .v2018_03_01_preview.operations import SkusOperations as OperationClass
elif api_version == '2018-07-01':
from .v2018_07_01.operations import SkusOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -210,6 +236,7 @@ def storage_accounts(self):
* 2017-10-01: :class:`StorageAccountsOperations<azure.mgmt.storage.v2017_10_01.operations.StorageAccountsOperations>`
* 2018-02-01: :class:`StorageAccountsOperations<azure.mgmt.storage.v2018_02_01.operations.StorageAccountsOperations>`
* 2018-03-01-preview: :class:`StorageAccountsOperations<azure.mgmt.storage.v2018_03_01_preview.operations.StorageAccountsOperations>`
* 2018-07-01: :class:`StorageAccountsOperations<azure.mgmt.storage.v2018_07_01.operations.StorageAccountsOperations>`
"""
api_version = self._get_api_version('storage_accounts')
if api_version == '2015-06-15':
Expand All @@ -226,6 +253,8 @@ def storage_accounts(self):
from .v2018_02_01.operations import StorageAccountsOperations as OperationClass
elif api_version == '2018-03-01-preview':
from .v2018_03_01_preview.operations import StorageAccountsOperations as OperationClass
elif api_version == '2018-07-01':
from .v2018_07_01.operations import StorageAccountsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down Expand Up @@ -263,10 +292,13 @@ def usages(self):
"""Instance depends on the API version:

* 2018-03-01-preview: :class:`UsagesOperations<azure.mgmt.storage.v2018_03_01_preview.operations.UsagesOperations>`
* 2018-07-01: :class:`UsagesOperations<azure.mgmt.storage.v2018_07_01.operations.UsagesOperations>`
"""
api_version = self._get_api_version('usages')
if api_version == '2018-03-01-preview':
from .v2018_03_01_preview.operations import UsagesOperations as OperationClass
elif api_version == '2018-07-01':
from .v2018_07_01.operations import UsagesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def check_name_availability(

# 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 @@ -86,9 +87,8 @@ def check_name_availability(
body_content = self._serialize.body(account_name, 'StorageAccountCheckNameAvailabilityParameters')

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

if response.status_code not in [200]:
exp = CloudError(response)
Expand Down Expand Up @@ -125,6 +125,7 @@ def _create_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 @@ -137,9 +138,8 @@ def _create_initial(
body_content = self._serialize.body(parameters, 'StorageAccountCreateParameters')

# 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, 202]:
exp = CloudError(response)
Expand Down Expand Up @@ -251,7 +251,6 @@ def delete(

# 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 @@ -260,8 +259,8 @@ def delete(
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, 204]:
exp = CloudError(response)
Expand Down Expand Up @@ -311,7 +310,7 @@ def get_properties(

# 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 @@ -320,8 +319,8 @@ def get_properties(
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]:
exp = CloudError(response)
Expand Down Expand Up @@ -388,6 +387,7 @@ def update(

# 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 @@ -400,9 +400,8 @@ def update(
body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters')

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

if response.status_code not in [200]:
exp = CloudError(response)
Expand Down Expand Up @@ -457,7 +456,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 @@ -466,9 +465,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]:
exp = CloudError(response)
Expand Down Expand Up @@ -528,7 +526,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 @@ -537,9 +535,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]:
exp = CloudError(response)
Expand Down Expand Up @@ -595,7 +592,7 @@ def list_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 @@ -604,8 +601,8 @@ def list_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]:
exp = CloudError(response)
Expand Down Expand Up @@ -664,6 +661,7 @@ def regenerate_key(

# 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 @@ -676,9 +674,8 @@ def regenerate_key(
body_content = self._serialize.body(regenerate_key1, 'StorageAccountRegenerateKeyParameters')

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

if response.status_code not in [200]:
exp = CloudError(response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,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 @@ -81,9 +81,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]:
exp = CloudError(response)
Expand Down
Loading