Skip to content

Commit cbec338

Browse files
[AutoRelease] t2-storagecache-2022-07-06-35884(Do not merge) (#25089)
* code and test * Update CHANGELOG.md Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: zhenbiao wei <[email protected]>
1 parent f296315 commit cbec338

36 files changed

+4527
-1610
lines changed

sdk/storage/azure-mgmt-storagecache/CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Release History
22

3+
## 1.3.0 (2022-07-07)
4+
5+
**Features**
6+
7+
- Added operation CachesOperations.begin_pause_priming_job
8+
- Added operation CachesOperations.begin_resume_priming_job
9+
- Added operation CachesOperations.begin_space_allocation
10+
- Added operation CachesOperations.begin_start_priming_job
11+
- Added operation CachesOperations.begin_stop_priming_job
12+
- Model ApiOperationPropertiesServiceSpecification has a new parameter log_specifications
13+
- Model Cache has a new parameter priming_jobs
14+
- Model Cache has a new parameter space_allocation
15+
- Model Cache has a new parameter upgrade_settings
16+
- Model StorageTarget has a new parameter allocation_percentage
17+
318
## 1.2.0 (2022-03-22)
419

520
**Features**
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"autorest": "3.7.2",
33
"use": [
4-
"@autorest/python@5.12.0",
4+
"@autorest/python@5.16.0",
55
"@autorest/[email protected]"
66
],
7-
"commit": "2c66a689c610dbef623d6c4e4c4e913446d5ac68",
7+
"commit": "58a1320584b1d26bf7dab969a2593cd22b39caec",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/storagecache/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/[email protected] --version=3.7.2",
9+
"autorest_command": "autorest specification/storagecache/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.16.0 --use=@autorest/[email protected] --version=3.7.2",
1010
"readme": "specification/storagecache/resource-manager/readme.md"
1111
}

sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/__init__.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@
1010
from ._version import VERSION
1111

1212
__version__ = VERSION
13+
14+
try:
15+
from ._patch import __all__ as _patch_all
16+
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
17+
except ImportError:
18+
_patch_all = []
19+
from ._patch import patch_sdk as _patch_sdk
1320
__all__ = ['StorageCacheManagementClient']
21+
__all__.extend([p for p in _patch_all if p not in __all__])
1422

15-
# `._patch.py` is used for handwritten extensions to the generated code
16-
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
17-
from ._patch import patch_sdk
18-
patch_sdk()
23+
_patch_sdk()

sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_configuration.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,20 @@
1919
from azure.core.credentials import TokenCredential
2020

2121

22-
class StorageCacheManagementClientConfiguration(Configuration):
22+
class StorageCacheManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2323
"""Configuration for StorageCacheManagementClient.
2424
2525
Note that all parameters used to create this instance are saved as instance
2626
attributes.
2727
2828
:param credential: Credential needed for the client to connect to Azure.
2929
:type credential: ~azure.core.credentials.TokenCredential
30-
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
30+
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure
31+
subscription. The subscription ID forms part of the URI for every service call.
3132
:type subscription_id: str
33+
:keyword api_version: Api Version. Default value is "2022-05-01". Note that overriding this
34+
default value may result in unsupported behavior.
35+
:paramtype api_version: str
3236
"""
3337

3438
def __init__(
@@ -38,14 +42,16 @@ def __init__(
3842
**kwargs: Any
3943
) -> None:
4044
super(StorageCacheManagementClientConfiguration, self).__init__(**kwargs)
45+
api_version = kwargs.pop('api_version', "2022-05-01") # type: str
46+
4147
if credential is None:
4248
raise ValueError("Parameter 'credential' must not be None.")
4349
if subscription_id is None:
4450
raise ValueError("Parameter 'subscription_id' must not be None.")
4551

4652
self.credential = credential
4753
self.subscription_id = subscription_id
48-
self.api_version = "2022-01-01"
54+
self.api_version = api_version
4955
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5056
kwargs.setdefault('sdk_moniker', 'mgmt-storagecache/{}'.format(VERSION))
5157
self._configure(**kwargs)

sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_metadata.json

-109
This file was deleted.

sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_management_client.py

+44-22
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, Optional, TYPE_CHECKING
10+
from typing import Any, TYPE_CHECKING
11+
12+
from msrest import Deserializer, Serializer
1113

1214
from azure.core.rest import HttpRequest, HttpResponse
1315
from azure.mgmt.core import ARMPipelineClient
14-
from msrest import Deserializer, Serializer
1516

1617
from . import models
1718
from ._configuration import StorageCacheManagementClientConfiguration
@@ -21,32 +22,37 @@
2122
# pylint: disable=unused-import,ungrouped-imports
2223
from azure.core.credentials import TokenCredential
2324

24-
class StorageCacheManagementClient:
25-
"""A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches.
25+
class StorageCacheManagementClient: # pylint: disable=too-many-instance-attributes
26+
"""A Storage Cache provides scalable caching service for NAS clients, serving data from either
27+
NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to
28+
manage Caches.
2629
2730
:ivar operations: Operations operations
28-
:vartype operations: storage_cache_management_client.operations.Operations
31+
:vartype operations: azure.mgmt.storagecache.operations.Operations
2932
:ivar skus: SkusOperations operations
30-
:vartype skus: storage_cache_management_client.operations.SkusOperations
33+
:vartype skus: azure.mgmt.storagecache.operations.SkusOperations
3134
:ivar usage_models: UsageModelsOperations operations
32-
:vartype usage_models: storage_cache_management_client.operations.UsageModelsOperations
35+
:vartype usage_models: azure.mgmt.storagecache.operations.UsageModelsOperations
3336
:ivar asc_operations: AscOperationsOperations operations
34-
:vartype asc_operations: storage_cache_management_client.operations.AscOperationsOperations
37+
:vartype asc_operations: azure.mgmt.storagecache.operations.AscOperationsOperations
3538
:ivar asc_usages: AscUsagesOperations operations
36-
:vartype asc_usages: storage_cache_management_client.operations.AscUsagesOperations
39+
:vartype asc_usages: azure.mgmt.storagecache.operations.AscUsagesOperations
3740
:ivar caches: CachesOperations operations
38-
:vartype caches: storage_cache_management_client.operations.CachesOperations
41+
:vartype caches: azure.mgmt.storagecache.operations.CachesOperations
3942
:ivar storage_targets: StorageTargetsOperations operations
40-
:vartype storage_targets: storage_cache_management_client.operations.StorageTargetsOperations
43+
:vartype storage_targets: azure.mgmt.storagecache.operations.StorageTargetsOperations
4144
:ivar storage_target: StorageTargetOperations operations
42-
:vartype storage_target: storage_cache_management_client.operations.StorageTargetOperations
45+
:vartype storage_target: azure.mgmt.storagecache.operations.StorageTargetOperations
4346
:param credential: Credential needed for the client to connect to Azure.
4447
:type credential: ~azure.core.credentials.TokenCredential
4548
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure
4649
subscription. The subscription ID forms part of the URI for every service call.
4750
:type subscription_id: str
48-
:param base_url: Service URL. Default value is 'https://management.azure.com'.
51+
:param base_url: Service URL. Default value is "https://management.azure.com".
4952
:type base_url: str
53+
:keyword api_version: Api Version. Default value is "2022-05-01". Note that overriding this
54+
default value may result in unsupported behavior.
55+
:paramtype api_version: str
5056
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
5157
Retry-After header is present.
5258
"""
@@ -65,19 +71,35 @@ def __init__(
6571
self._serialize = Serializer(client_models)
6672
self._deserialize = Deserializer(client_models)
6773
self._serialize.client_side_validation = False
68-
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
69-
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
70-
self.usage_models = UsageModelsOperations(self._client, self._config, self._serialize, self._deserialize)
71-
self.asc_operations = AscOperationsOperations(self._client, self._config, self._serialize, self._deserialize)
72-
self.asc_usages = AscUsagesOperations(self._client, self._config, self._serialize, self._deserialize)
73-
self.caches = CachesOperations(self._client, self._config, self._serialize, self._deserialize)
74-
self.storage_targets = StorageTargetsOperations(self._client, self._config, self._serialize, self._deserialize)
75-
self.storage_target = StorageTargetOperations(self._client, self._config, self._serialize, self._deserialize)
74+
self.operations = Operations(
75+
self._client, self._config, self._serialize, self._deserialize
76+
)
77+
self.skus = SkusOperations(
78+
self._client, self._config, self._serialize, self._deserialize
79+
)
80+
self.usage_models = UsageModelsOperations(
81+
self._client, self._config, self._serialize, self._deserialize
82+
)
83+
self.asc_operations = AscOperationsOperations(
84+
self._client, self._config, self._serialize, self._deserialize
85+
)
86+
self.asc_usages = AscUsagesOperations(
87+
self._client, self._config, self._serialize, self._deserialize
88+
)
89+
self.caches = CachesOperations(
90+
self._client, self._config, self._serialize, self._deserialize
91+
)
92+
self.storage_targets = StorageTargetsOperations(
93+
self._client, self._config, self._serialize, self._deserialize
94+
)
95+
self.storage_target = StorageTargetOperations(
96+
self._client, self._config, self._serialize, self._deserialize
97+
)
7698

7799

78100
def _send_request(
79101
self,
80-
request, # type: HttpRequest
102+
request: HttpRequest,
81103
**kwargs: Any
82104
) -> HttpResponse:
83105
"""Runs the network request through the client's chained policies.

sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.2.0"
9+
VERSION = "1.3.0"

sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/aio/__init__.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@
77
# --------------------------------------------------------------------------
88

99
from ._storage_cache_management_client import StorageCacheManagementClient
10+
11+
try:
12+
from ._patch import __all__ as _patch_all
13+
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
14+
except ImportError:
15+
_patch_all = []
16+
from ._patch import patch_sdk as _patch_sdk
1017
__all__ = ['StorageCacheManagementClient']
18+
__all__.extend([p for p in _patch_all if p not in __all__])
1119

12-
# `._patch.py` is used for handwritten extensions to the generated code
13-
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
14-
from ._patch import patch_sdk
15-
patch_sdk()
20+
_patch_sdk()

0 commit comments

Comments
 (0)