Skip to content

Commit

Permalink
[AutoRelease] t2-storagecache-2022-07-06-35884(Do not merge) (#25089)
Browse files Browse the repository at this point in the history
* code and test

* Update CHANGELOG.md

Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
Co-authored-by: zhenbiao wei <424401670@qq.com>
  • Loading branch information
azure-sdk and Wzb123456789 committed Jul 7, 2022
1 parent f296315 commit cbec338
Show file tree
Hide file tree
Showing 36 changed files with 4,527 additions and 1,610 deletions.
15 changes: 15 additions & 0 deletions sdk/storage/azure-mgmt-storagecache/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Release History

## 1.3.0 (2022-07-07)

**Features**

- Added operation CachesOperations.begin_pause_priming_job
- Added operation CachesOperations.begin_resume_priming_job
- Added operation CachesOperations.begin_space_allocation
- Added operation CachesOperations.begin_start_priming_job
- Added operation CachesOperations.begin_stop_priming_job
- Model ApiOperationPropertiesServiceSpecification has a new parameter log_specifications
- Model Cache has a new parameter priming_jobs
- Model Cache has a new parameter space_allocation
- Model Cache has a new parameter upgrade_settings
- Model StorageTarget has a new parameter allocation_percentage

## 1.2.0 (2022-03-22)

**Features**
Expand Down
6 changes: 3 additions & 3 deletions sdk/storage/azure-mgmt-storagecache/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/python@5.12.0",
"@autorest/python@5.16.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "2c66a689c610dbef623d6c4e4c4e913446d5ac68",
"commit": "58a1320584b1d26bf7dab969a2593cd22b39caec",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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/modelerfour@4.19.3 --version=3.7.2",
"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/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/storagecache/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['StorageCacheManagementClient']
__all__.extend([p for p in _patch_all if p not in __all__])

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@
from azure.core.credentials import TokenCredential


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

def __init__(
Expand All @@ -38,14 +42,16 @@ def __init__(
**kwargs: Any
) -> None:
super(StorageCacheManagementClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2022-05-01") # type: str

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2022-01-01"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-storagecache/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Optional, TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient
from msrest import Deserializer, Serializer

from . import models
from ._configuration import StorageCacheManagementClientConfiguration
Expand All @@ -21,32 +22,37 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential

class StorageCacheManagementClient:
"""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.
class StorageCacheManagementClient: # pylint: disable=too-many-instance-attributes
"""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.
:ivar operations: Operations operations
:vartype operations: storage_cache_management_client.operations.Operations
:vartype operations: azure.mgmt.storagecache.operations.Operations
:ivar skus: SkusOperations operations
:vartype skus: storage_cache_management_client.operations.SkusOperations
:vartype skus: azure.mgmt.storagecache.operations.SkusOperations
:ivar usage_models: UsageModelsOperations operations
:vartype usage_models: storage_cache_management_client.operations.UsageModelsOperations
:vartype usage_models: azure.mgmt.storagecache.operations.UsageModelsOperations
:ivar asc_operations: AscOperationsOperations operations
:vartype asc_operations: storage_cache_management_client.operations.AscOperationsOperations
:vartype asc_operations: azure.mgmt.storagecache.operations.AscOperationsOperations
:ivar asc_usages: AscUsagesOperations operations
:vartype asc_usages: storage_cache_management_client.operations.AscUsagesOperations
:vartype asc_usages: azure.mgmt.storagecache.operations.AscUsagesOperations
:ivar caches: CachesOperations operations
:vartype caches: storage_cache_management_client.operations.CachesOperations
:vartype caches: azure.mgmt.storagecache.operations.CachesOperations
:ivar storage_targets: StorageTargetsOperations operations
:vartype storage_targets: storage_cache_management_client.operations.StorageTargetsOperations
:vartype storage_targets: azure.mgmt.storagecache.operations.StorageTargetsOperations
:ivar storage_target: StorageTargetOperations operations
:vartype storage_target: storage_cache_management_client.operations.StorageTargetOperations
:vartype storage_target: azure.mgmt.storagecache.operations.StorageTargetOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure
subscription. The subscription ID forms part of the URI for every service call.
:type subscription_id: str
:param base_url: Service URL. Default value is 'https://management.azure.com'.
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2022-05-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
Expand All @@ -65,19 +71,35 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
self.usage_models = UsageModelsOperations(self._client, self._config, self._serialize, self._deserialize)
self.asc_operations = AscOperationsOperations(self._client, self._config, self._serialize, self._deserialize)
self.asc_usages = AscUsagesOperations(self._client, self._config, self._serialize, self._deserialize)
self.caches = CachesOperations(self._client, self._config, self._serialize, self._deserialize)
self.storage_targets = StorageTargetsOperations(self._client, self._config, self._serialize, self._deserialize)
self.storage_target = StorageTargetOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize
)
self.skus = SkusOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.usage_models = UsageModelsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.asc_operations = AscOperationsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.asc_usages = AscUsagesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.caches = CachesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.storage_targets = StorageTargetsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.storage_target = StorageTargetOperations(
self._client, self._config, self._serialize, self._deserialize
)


def _send_request(
self,
request, # type: HttpRequest
request: HttpRequest,
**kwargs: Any
) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.2.0"
VERSION = "1.3.0"
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
# --------------------------------------------------------------------------

from ._storage_cache_management_client import StorageCacheManagementClient

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['StorageCacheManagementClient']
__all__.extend([p for p in _patch_all if p not in __all__])

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

0 comments on commit cbec338

Please sign in to comment.