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

[T2-GA] Storage #13786

Merged
merged 1 commit into from
Sep 17, 2020
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
12 changes: 12 additions & 0 deletions sdk/storage/azure-mgmt-storage/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Release History

## 16.0.0 (2020-09-15)

**Features**

- Model RestorePolicyProperties has a new parameter min_restore_time

**Breaking changes**

- Operation ManagementPoliciesOperations.create_or_update has a new signature
- Operation ManagementPoliciesOperations.delete has a new signature
- Operation ManagementPoliciesOperations.get has a new signature

## 16.0.0b2 (2020-06-29)

This is beta preview version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
__all__ = ['StorageManagementClient']

try:
from ._patch import patch_sdk
from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from ._version import VERSION

Expand Down Expand Up @@ -43,8 +44,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.credential_scopes = ['https://management.azure.com/.default']
self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'azure-mgmt-storage/{}'.format(VERSION))
self._configure(**kwargs)

Expand All @@ -57,6 +57,7 @@ def _configure(
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ def __init__(
self._config = StorageManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(StorageManagementClient, self).__init__(
credential,
self._config,
api_version=api_version,
profile=profile
)
Expand Down Expand Up @@ -129,7 +127,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-06-01':
from .v2019_06_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} is not available".format(api_version))

@property
def blob_containers(self):
Expand All @@ -156,7 +154,7 @@ def blob_containers(self):
elif api_version == '2019-06-01':
from .v2019_06_01.operations import BlobContainersOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'blob_containers'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -178,7 +176,7 @@ def blob_services(self):
elif api_version == '2019-06-01':
from .v2019_06_01.operations import BlobServicesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'blob_services'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -191,7 +189,7 @@ def encryption_scopes(self):
if api_version == '2019-06-01':
from .v2019_06_01.operations import EncryptionScopesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'encryption_scopes'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -207,7 +205,7 @@ def file_services(self):
elif api_version == '2019-06-01':
from .v2019_06_01.operations import FileServicesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'file_services'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -223,7 +221,7 @@ def file_shares(self):
elif api_version == '2019-06-01':
from .v2019_06_01.operations import FileSharesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'file_shares'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -245,7 +243,7 @@ def management_policies(self):
elif api_version == '2019-06-01':
from .v2019_06_01.operations import ManagementPoliciesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'management_policies'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -258,7 +256,7 @@ def object_replication_policies(self):
if api_version == '2019-06-01':
from .v2019_06_01.operations import ObjectReplicationPoliciesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'object_replication_policies'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand Down Expand Up @@ -292,7 +290,7 @@ def operations(self):
elif api_version == '2019-06-01':
from .v2019_06_01.operations import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -305,7 +303,7 @@ def private_endpoint_connections(self):
if api_version == '2019-06-01':
from .v2019_06_01.operations import PrivateEndpointConnectionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -318,7 +316,7 @@ def private_link_resources(self):
if api_version == '2019-06-01':
from .v2019_06_01.operations import PrivateLinkResourcesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -331,7 +329,7 @@ def queue(self):
if api_version == '2019-06-01':
from .v2019_06_01.operations import QueueOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'queue'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -344,7 +342,7 @@ def queue_services(self):
if api_version == '2019-06-01':
from .v2019_06_01.operations import QueueServicesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'queue_services'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand Down Expand Up @@ -378,7 +376,7 @@ def skus(self):
elif api_version == '2019-06-01':
from .v2019_06_01.operations import SkusOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'skus'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand Down Expand Up @@ -421,7 +419,7 @@ def storage_accounts(self):
elif api_version == '2019-06-01':
from .v2019_06_01.operations import StorageAccountsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'storage_accounts'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -434,7 +432,7 @@ def table(self):
if api_version == '2019-06-01':
from .v2019_06_01.operations import TableOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'table'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -447,7 +445,7 @@ def table_services(self):
if api_version == '2019-06-01':
from .v2019_06_01.operations import TableServicesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'table_services'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand Down Expand Up @@ -475,7 +473,7 @@ def usage(self):
elif api_version == '2018-02-01':
from .v2018_02_01.operations import UsageOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'usage'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -500,7 +498,7 @@ def usages(self):
elif api_version == '2019-06-01':
from .v2019_06_01.operations import UsagesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
raise ValueError("API version {} does not have operation group 'usages'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

def close(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "16.0.0b2"
VERSION = "16.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._storage_management_client_async import StorageManagementClient
from ._storage_management_client import StorageManagementClient
__all__ = ['StorageManagementClient']
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from .._version import VERSION

Expand All @@ -34,7 +35,6 @@ def __init__(
subscription_id, # type: str
**kwargs # type: Any
) -> None:
# type: (...) -> None
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
Expand All @@ -43,8 +43,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.credential_scopes = ['https://management.azure.com/.default']
self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'azure-mgmt-storage/{}'.format(VERSION))
self._configure(**kwargs)

Expand All @@ -56,6 +55,7 @@ def _configure(
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
Expand Down
Loading