diff --git a/sdk/storage/azure-mgmt-storagecache/HISTORY.rst b/sdk/storage/azure-mgmt-storagecache/HISTORY.rst index 241fc24a9031..7c52d7fe1271 100644 --- a/sdk/storage/azure-mgmt-storagecache/HISTORY.rst +++ b/sdk/storage/azure-mgmt-storagecache/HISTORY.rst @@ -3,6 +3,20 @@ Release History =============== +0.2.0 (2019-11-12) +++++++++++++++++++ + +**Features** + +- Added operation CachesOperations.create_or_update +- Added operation StorageTargetsOperations.create_or_update + +**Breaking changes** + +- Removed operation CachesOperations.create +- Removed operation StorageTargetsOperations.create +- Removed operation StorageTargetsOperations.update + 0.1.0rc1 (2019-09-03) +++++++++++++++++++++ diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/__init__.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/__init__.py index 9a98763a96c3..155ba86249d0 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/__init__.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/__init__.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import StorageCacheMgmtClientConfiguration -from ._storage_cache_mgmt_client import StorageCacheMgmtClient -__all__ = ['StorageCacheMgmtClient', 'StorageCacheMgmtClientConfiguration'] +from ._configuration import StorageCacheManagementClientConfiguration +from ._storage_cache_management_client import StorageCacheManagementClient +__all__ = ['StorageCacheManagementClient', 'StorageCacheManagementClientConfiguration'] from .version import VERSION diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_configuration.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_configuration.py index 059a165ddc3d..0a0d9b0492c9 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_configuration.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_configuration.py @@ -13,8 +13,8 @@ from .version import VERSION -class StorageCacheMgmtClientConfiguration(AzureConfiguration): - """Configuration for StorageCacheMgmtClient +class StorageCacheManagementClientConfiguration(AzureConfiguration): + """Configuration for StorageCacheManagementClient Note that all parameters used to create this instance are saved as instance attributes. @@ -38,7 +38,7 @@ def __init__( if not base_url: base_url = 'https://management.azure.com' - super(StorageCacheMgmtClientConfiguration, self).__init__(base_url) + super(StorageCacheManagementClientConfiguration, self).__init__(base_url) # Starting Autorest.Python 4.0.64, make connection pool activated by default self.keep_alive = True diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_mgmt_client.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_management_client.py similarity index 87% rename from sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_mgmt_client.py rename to sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_management_client.py index 314d0bdae40d..484aac2ab33b 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_mgmt_client.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_management_client.py @@ -12,7 +12,7 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from ._configuration import StorageCacheMgmtClientConfiguration +from ._configuration import StorageCacheManagementClientConfiguration from .operations import Operations from .operations import SkusOperations from .operations import UsageModelsOperations @@ -21,11 +21,11 @@ from . import models -class StorageCacheMgmtClient(SDKClient): - """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(SDKClient): + """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 config: Configuration for client. - :vartype config: StorageCacheMgmtClientConfiguration + :vartype config: StorageCacheManagementClientConfiguration :ivar operations: Operations operations :vartype operations: azure.mgmt.storagecache.operations.Operations @@ -51,11 +51,11 @@ class StorageCacheMgmtClient(SDKClient): def __init__( self, credentials, subscription_id, base_url=None): - self.config = StorageCacheMgmtClientConfiguration(credentials, subscription_id, base_url) - super(StorageCacheMgmtClient, self).__init__(self.config.credentials, self.config) + self.config = StorageCacheManagementClientConfiguration(credentials, subscription_id, base_url) + super(StorageCacheManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-08-01-preview' + self.api_version = '2019-11-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/__init__.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/__init__.py index 3e9d672c67da..7a17d7f6a8d7 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/__init__.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/__init__.py @@ -17,7 +17,6 @@ from ._models_py3 import CacheSku from ._models_py3 import CacheUpgradeStatus from ._models_py3 import ClfsTarget - from ._models_py3 import CloudError, CloudErrorException from ._models_py3 import CloudErrorBody from ._models_py3 import NamespaceJunction from ._models_py3 import Nfs3Target @@ -37,7 +36,6 @@ from ._models import CacheSku from ._models import CacheUpgradeStatus from ._models import ClfsTarget - from ._models import CloudError, CloudErrorException from ._models import CloudErrorBody from ._models import NamespaceJunction from ._models import Nfs3Target @@ -54,7 +52,7 @@ from ._paged_models import ResourceSkuPaged from ._paged_models import StorageTargetPaged from ._paged_models import UsageModelPaged -from ._storage_cache_mgmt_client_enums import ( +from ._storage_cache_management_client_enums import ( HealthStateType, ProvisioningStateType, FirmwareStatusType, @@ -70,7 +68,6 @@ 'CacheSku', 'CacheUpgradeStatus', 'ClfsTarget', - 'CloudError', 'CloudErrorException', 'CloudErrorBody', 'NamespaceJunction', 'Nfs3Target', diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models.py index cc865ef3e194..ff6a1ce2f01e 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models.py @@ -41,7 +41,7 @@ class ApiOperationDisplay(Model): :type operation: str :param provider: Service provider: Microsoft.StorageCache :type provider: str - :param resource: Resource on which the operation is performed: cache, etc. + :param resource: Resource on which the operation is performed: Cache, etc. :type resource: str """ @@ -59,7 +59,7 @@ def __init__(self, **kwargs): class Cache(Model): - """A cache instance. Follows Azure Resource Manager standards: + """A Cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md. Variables are only populated by the server, and will be ignored when @@ -67,17 +67,17 @@ class Cache(Model): :param tags: ARM tags as name/value pairs. :type tags: object - :ivar id: Fully qualified URL of the cache. + :ivar id: Resource ID of the Cache. :vartype id: str :param location: Region name string. :type location: str - :ivar name: Name of cache. + :ivar name: Name of Cache. :vartype name: str - :ivar type: Type for the cache; Microsoft.StorageCache/Cache + :ivar type: Type of the Cache; Microsoft.StorageCache/Cache :vartype type: str - :param cache_size_gb: The size of this cache's cache, in GB. + :param cache_size_gb: The size of this Cache, in GB. :type cache_size_gb: int - :ivar health: Health of the cache. + :ivar health: Health of the Cache. :vartype health: ~azure.mgmt.storagecache.models.CacheHealth :ivar mount_addresses: Array of IP addresses that can be used by clients mounting this Cache. @@ -88,11 +88,11 @@ class Cache(Model): 'Deleting', 'Updating' :type provisioning_state: str or ~azure.mgmt.storagecache.models.ProvisioningStateType - :param subnet: Subnet used for the cache. + :param subnet: Subnet used for the Cache. :type subnet: str - :param upgrade_status: Upgrade status of the cache. + :param upgrade_status: Upgrade status of the Cache. :type upgrade_status: ~azure.mgmt.storagecache.models.CacheUpgradeStatus - :param sku: Sku for the cache. + :param sku: SKU for the Cache. :type sku: ~azure.mgmt.storagecache.models.CacheSku """ @@ -136,10 +136,10 @@ def __init__(self, **kwargs): class CacheHealth(Model): - """An indication of cache health. Gives more information about health than + """An indication of Cache health. Gives more information about health than just that related to provisioning. - :param state: List of cache health states. Possible values include: + :param state: List of Cache health states. Possible values include: 'Unknown', 'Healthy', 'Degraded', 'Down', 'Transitioning', 'Stopping', 'Stopped', 'Upgrading', 'Flushing' :type state: str or ~azure.mgmt.storagecache.models.HealthStateType @@ -159,9 +159,9 @@ def __init__(self, **kwargs): class CacheSku(Model): - """Sku for the cache. + """SKU for the Cache. - :param name: Sku name for this cache. + :param name: SKU name for this Cache. :type name: str """ @@ -175,22 +175,22 @@ def __init__(self, **kwargs): class CacheUpgradeStatus(Model): - """Properties describing the software upgrade state of the cache. + """Properties describing the software upgrade state of the Cache. Variables are only populated by the server, and will be ignored when sending a request. :ivar current_firmware_version: Version string of the firmware currently - installed on this cache. + installed on this Cache. :vartype current_firmware_version: str :ivar firmware_update_status: True if there is a firmware update ready to - install on this cache. The firmware will automatically be installed after + install on this Cache. The firmware will automatically be installed after firmwareUpdateDeadline if not triggered earlier via the upgrade operation. Possible values include: 'available', 'unavailable' :vartype firmware_update_status: str or ~azure.mgmt.storagecache.models.FirmwareStatusType :ivar firmware_update_deadline: Time at which the pending firmware update - will automatically be installed on the cache. + will automatically be installed on the Cache. :vartype firmware_update_deadline: datetime :ivar last_firmware_update: Time of the last successful firmware update. :vartype last_firmware_update: datetime @@ -225,9 +225,9 @@ def __init__(self, **kwargs): class ClfsTarget(Model): - """Storage container for use as a CLFS StorageTarget. + """Storage container for use as a CLFS Storage Target. - :param target: URL of storage container. + :param target: Resource ID of storage container. :type target: str """ @@ -302,9 +302,9 @@ def __init__(self, **kwargs): class NamespaceJunction(Model): """A namespace junction. - :param namespace_path: Namespace path on a cache for a storage target. + :param namespace_path: Namespace path on a Cache for a Storage Target. :type namespace_path: str - :param target_path: Path in storage target to which namespacePath points. + :param target_path: Path in Storage Target to which namespacePath points. :type target_path: str :param nfs_export: NFS export where targetPath exists. :type nfs_export: str @@ -324,12 +324,13 @@ def __init__(self, **kwargs): class Nfs3Target(Model): - """An NFS mount point for use as a StorageTarget. + """An NFSv3 mount point for use as a Storage Target. - :param target: IP or name of an NFS Storage Target host, ie: 10.0.44.44 + :param target: IP address or host name of an NFSv3 host (e.g., + 10.0.44.44). :type target: str :param usage_model: Identifies the primary usage model to be used for this - storage target. GET choices from .../usageModels + Storage Target. Get choices from .../usageModels :type usage_model: str """ @@ -354,22 +355,22 @@ class ResourceSku(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar resource_type: The type of resource the sku applies to. + :ivar resource_type: The type of resource the SKU applies to. :vartype resource_type: str :param capabilities: A list of capabilities of this SKU, such as - throughput or ops/sec + throughput or ops/sec. :type capabilities: list[~azure.mgmt.storagecache.models.ResourceSkuCapabilities] :ivar locations: The set of locations that the SKU is available. This will - be supported and registered Azure Geo Regions (e.g. West US, East US, + be supported and registered Azure Geo Regions (e.g., West US, East US, Southeast Asia, etc.). :vartype locations: list[str] :param location_info: The set of locations that the SKU is available. :type location_info: list[~azure.mgmt.storagecache.models.ResourceSkuLocationInfo] - :param name: The name of this sku. + :param name: The name of this SKU. :type name: str - :param restrictions: The restrictions because of which SKU cannot be used. + :param restrictions: The restrictions preventing this SKU from being used. This is empty if there are no restrictions. :type restrictions: list[~azure.mgmt.storagecache.models.Restriction] """ @@ -401,9 +402,9 @@ def __init__(self, **kwargs): class ResourceSkuCapabilities(Model): """A resource SKU capability. - :param name: Name of a capability, such as ops/sec + :param name: Name of a capability, such as ops/sec. :type name: str - :param value: Quantity, if the capability is measured by quantity + :param value: Quantity, if the capability is measured by quantity. :type value: str """ @@ -421,7 +422,7 @@ def __init__(self, **kwargs): class ResourceSkuLocationInfo(Model): """Resource SKU location information. - :param location: Location where this Sku is available + :param location: Location where this SKU is available. :type location: str :param zones: Zones if any. :type zones: list[str] @@ -439,22 +440,24 @@ def __init__(self, **kwargs): class Restriction(Model): - """The restriction because of which SKU cannot be used. + """The restrictions preventing this SKU from being used. Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The type of restrictions. As of now only possible value for - this is location. + :ivar type: The type of restrictions. In this version, the only possible + value for this is location. :vartype type: str :ivar values: The value of restrictions. If the restriction type is set to - location. This would be different locations where the SKU is restricted. + location, then this would be the different locations where the SKU is + restricted. :vartype values: list[str] :param reason_code: The reason for the restriction. As of now this can be - "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU + "QuotaId" or "NotAvailableForSubscription". "QuotaId" is set when the SKU has requiredQuotas parameter as the subscription does not belong to that - quota. The "NotAvailableForSubscription" is related to capacity at DC. - Possible values include: 'QuotaId', 'NotAvailableForSubscription' + quota. "NotAvailableForSubscription" is related to capacity at the + datacenter. Possible values include: 'QuotaId', + 'NotAvailableForSubscription' :type reason_code: str or ~azure.mgmt.storagecache.models.ReasonCode """ @@ -482,17 +485,17 @@ class StorageTarget(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: A fully qualified URL. + :ivar name: Name of the Storage Target. :vartype name: str - :ivar id: Resource Id + :ivar id: Resource ID of the Storage Target. :vartype id: str - :ivar type: Type for the storage target; + :ivar type: Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget :vartype type: str - :param junctions: List of cache namespace to target namespace - associations. + :param junctions: List of Cache namespace junctions to target for + namespace associations. :type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction] - :param target_type: Type for storage target. Possible values include: + :param target_type: Type of the Storage Target. Possible values include: 'nfs3', 'clfs', 'unknown' :type target_type: str or ~azure.mgmt.storagecache.models.StorageTargetType @@ -502,11 +505,11 @@ class StorageTarget(Model): 'Deleting', 'Updating' :type provisioning_state: str or ~azure.mgmt.storagecache.models.ProvisioningStateType - :param nfs3: Properties when nfs3 target. + :param nfs3: Properties when targetType is nfs3. :type nfs3: ~azure.mgmt.storagecache.models.Nfs3Target - :param clfs: Properties when clfs target. + :param clfs: Properties when targetType is clfs. :type clfs: ~azure.mgmt.storagecache.models.ClfsTarget - :param unknown: Properties when unknown target. + :param unknown: Properties when targetType is unknown. :type unknown: ~azure.mgmt.storagecache.models.UnknownTarget """ @@ -542,10 +545,10 @@ def __init__(self, **kwargs): class UnknownTarget(Model): - """Storage container for use as a Unknown StorageTarget. + """Storage container for use as an Unknown Storage Target. :param unknown_map: Dictionary of string->string pairs containing - information about the StorageTarget. + information about the Storage Target. :type unknown_map: dict[str, str] """ @@ -563,10 +566,10 @@ class UsageModel(Model): :param display: Localized information describing this usage model. :type display: ~azure.mgmt.storagecache.models.UsageModelDisplay - :param model_name: Non localized keyword naming this usage model. + :param model_name: Non-localized keyword name for this usage model. :type model_name: str :param target_type: The type of Storage Target to which this model is - applicable (only nfs for now) + applicable (only nfs3 as of this version). :type target_type: str """ diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models_py3.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models_py3.py index cba9afa03a63..ea71abebfc88 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models_py3.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models_py3.py @@ -41,7 +41,7 @@ class ApiOperationDisplay(Model): :type operation: str :param provider: Service provider: Microsoft.StorageCache :type provider: str - :param resource: Resource on which the operation is performed: cache, etc. + :param resource: Resource on which the operation is performed: Cache, etc. :type resource: str """ @@ -59,7 +59,7 @@ def __init__(self, *, operation: str=None, provider: str=None, resource: str=Non class Cache(Model): - """A cache instance. Follows Azure Resource Manager standards: + """A Cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md. Variables are only populated by the server, and will be ignored when @@ -67,17 +67,17 @@ class Cache(Model): :param tags: ARM tags as name/value pairs. :type tags: object - :ivar id: Fully qualified URL of the cache. + :ivar id: Resource ID of the Cache. :vartype id: str :param location: Region name string. :type location: str - :ivar name: Name of cache. + :ivar name: Name of Cache. :vartype name: str - :ivar type: Type for the cache; Microsoft.StorageCache/Cache + :ivar type: Type of the Cache; Microsoft.StorageCache/Cache :vartype type: str - :param cache_size_gb: The size of this cache's cache, in GB. + :param cache_size_gb: The size of this Cache, in GB. :type cache_size_gb: int - :ivar health: Health of the cache. + :ivar health: Health of the Cache. :vartype health: ~azure.mgmt.storagecache.models.CacheHealth :ivar mount_addresses: Array of IP addresses that can be used by clients mounting this Cache. @@ -88,11 +88,11 @@ class Cache(Model): 'Deleting', 'Updating' :type provisioning_state: str or ~azure.mgmt.storagecache.models.ProvisioningStateType - :param subnet: Subnet used for the cache. + :param subnet: Subnet used for the Cache. :type subnet: str - :param upgrade_status: Upgrade status of the cache. + :param upgrade_status: Upgrade status of the Cache. :type upgrade_status: ~azure.mgmt.storagecache.models.CacheUpgradeStatus - :param sku: Sku for the cache. + :param sku: SKU for the Cache. :type sku: ~azure.mgmt.storagecache.models.CacheSku """ @@ -136,10 +136,10 @@ def __init__(self, *, tags=None, location: str=None, cache_size_gb: int=None, pr class CacheHealth(Model): - """An indication of cache health. Gives more information about health than + """An indication of Cache health. Gives more information about health than just that related to provisioning. - :param state: List of cache health states. Possible values include: + :param state: List of Cache health states. Possible values include: 'Unknown', 'Healthy', 'Degraded', 'Down', 'Transitioning', 'Stopping', 'Stopped', 'Upgrading', 'Flushing' :type state: str or ~azure.mgmt.storagecache.models.HealthStateType @@ -159,9 +159,9 @@ def __init__(self, *, state=None, status_description: str=None, **kwargs) -> Non class CacheSku(Model): - """Sku for the cache. + """SKU for the Cache. - :param name: Sku name for this cache. + :param name: SKU name for this Cache. :type name: str """ @@ -175,22 +175,22 @@ def __init__(self, *, name: str=None, **kwargs) -> None: class CacheUpgradeStatus(Model): - """Properties describing the software upgrade state of the cache. + """Properties describing the software upgrade state of the Cache. Variables are only populated by the server, and will be ignored when sending a request. :ivar current_firmware_version: Version string of the firmware currently - installed on this cache. + installed on this Cache. :vartype current_firmware_version: str :ivar firmware_update_status: True if there is a firmware update ready to - install on this cache. The firmware will automatically be installed after + install on this Cache. The firmware will automatically be installed after firmwareUpdateDeadline if not triggered earlier via the upgrade operation. Possible values include: 'available', 'unavailable' :vartype firmware_update_status: str or ~azure.mgmt.storagecache.models.FirmwareStatusType :ivar firmware_update_deadline: Time at which the pending firmware update - will automatically be installed on the cache. + will automatically be installed on the Cache. :vartype firmware_update_deadline: datetime :ivar last_firmware_update: Time of the last successful firmware update. :vartype last_firmware_update: datetime @@ -225,9 +225,9 @@ def __init__(self, **kwargs) -> None: class ClfsTarget(Model): - """Storage container for use as a CLFS StorageTarget. + """Storage container for use as a CLFS Storage Target. - :param target: URL of storage container. + :param target: Resource ID of storage container. :type target: str """ @@ -302,9 +302,9 @@ def __init__(self, *, code: str=None, details=None, message: str=None, target: s class NamespaceJunction(Model): """A namespace junction. - :param namespace_path: Namespace path on a cache for a storage target. + :param namespace_path: Namespace path on a Cache for a Storage Target. :type namespace_path: str - :param target_path: Path in storage target to which namespacePath points. + :param target_path: Path in Storage Target to which namespacePath points. :type target_path: str :param nfs_export: NFS export where targetPath exists. :type nfs_export: str @@ -324,12 +324,13 @@ def __init__(self, *, namespace_path: str=None, target_path: str=None, nfs_expor class Nfs3Target(Model): - """An NFS mount point for use as a StorageTarget. + """An NFSv3 mount point for use as a Storage Target. - :param target: IP or name of an NFS Storage Target host, ie: 10.0.44.44 + :param target: IP address or host name of an NFSv3 host (e.g., + 10.0.44.44). :type target: str :param usage_model: Identifies the primary usage model to be used for this - storage target. GET choices from .../usageModels + Storage Target. Get choices from .../usageModels :type usage_model: str """ @@ -354,22 +355,22 @@ class ResourceSku(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar resource_type: The type of resource the sku applies to. + :ivar resource_type: The type of resource the SKU applies to. :vartype resource_type: str :param capabilities: A list of capabilities of this SKU, such as - throughput or ops/sec + throughput or ops/sec. :type capabilities: list[~azure.mgmt.storagecache.models.ResourceSkuCapabilities] :ivar locations: The set of locations that the SKU is available. This will - be supported and registered Azure Geo Regions (e.g. West US, East US, + be supported and registered Azure Geo Regions (e.g., West US, East US, Southeast Asia, etc.). :vartype locations: list[str] :param location_info: The set of locations that the SKU is available. :type location_info: list[~azure.mgmt.storagecache.models.ResourceSkuLocationInfo] - :param name: The name of this sku. + :param name: The name of this SKU. :type name: str - :param restrictions: The restrictions because of which SKU cannot be used. + :param restrictions: The restrictions preventing this SKU from being used. This is empty if there are no restrictions. :type restrictions: list[~azure.mgmt.storagecache.models.Restriction] """ @@ -401,9 +402,9 @@ def __init__(self, *, capabilities=None, location_info=None, name: str=None, res class ResourceSkuCapabilities(Model): """A resource SKU capability. - :param name: Name of a capability, such as ops/sec + :param name: Name of a capability, such as ops/sec. :type name: str - :param value: Quantity, if the capability is measured by quantity + :param value: Quantity, if the capability is measured by quantity. :type value: str """ @@ -421,7 +422,7 @@ def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: class ResourceSkuLocationInfo(Model): """Resource SKU location information. - :param location: Location where this Sku is available + :param location: Location where this SKU is available. :type location: str :param zones: Zones if any. :type zones: list[str] @@ -439,22 +440,24 @@ def __init__(self, *, location: str=None, zones=None, **kwargs) -> None: class Restriction(Model): - """The restriction because of which SKU cannot be used. + """The restrictions preventing this SKU from being used. Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The type of restrictions. As of now only possible value for - this is location. + :ivar type: The type of restrictions. In this version, the only possible + value for this is location. :vartype type: str :ivar values: The value of restrictions. If the restriction type is set to - location. This would be different locations where the SKU is restricted. + location, then this would be the different locations where the SKU is + restricted. :vartype values: list[str] :param reason_code: The reason for the restriction. As of now this can be - "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU + "QuotaId" or "NotAvailableForSubscription". "QuotaId" is set when the SKU has requiredQuotas parameter as the subscription does not belong to that - quota. The "NotAvailableForSubscription" is related to capacity at DC. - Possible values include: 'QuotaId', 'NotAvailableForSubscription' + quota. "NotAvailableForSubscription" is related to capacity at the + datacenter. Possible values include: 'QuotaId', + 'NotAvailableForSubscription' :type reason_code: str or ~azure.mgmt.storagecache.models.ReasonCode """ @@ -482,17 +485,17 @@ class StorageTarget(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: A fully qualified URL. + :ivar name: Name of the Storage Target. :vartype name: str - :ivar id: Resource Id + :ivar id: Resource ID of the Storage Target. :vartype id: str - :ivar type: Type for the storage target; + :ivar type: Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget :vartype type: str - :param junctions: List of cache namespace to target namespace - associations. + :param junctions: List of Cache namespace junctions to target for + namespace associations. :type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction] - :param target_type: Type for storage target. Possible values include: + :param target_type: Type of the Storage Target. Possible values include: 'nfs3', 'clfs', 'unknown' :type target_type: str or ~azure.mgmt.storagecache.models.StorageTargetType @@ -502,11 +505,11 @@ class StorageTarget(Model): 'Deleting', 'Updating' :type provisioning_state: str or ~azure.mgmt.storagecache.models.ProvisioningStateType - :param nfs3: Properties when nfs3 target. + :param nfs3: Properties when targetType is nfs3. :type nfs3: ~azure.mgmt.storagecache.models.Nfs3Target - :param clfs: Properties when clfs target. + :param clfs: Properties when targetType is clfs. :type clfs: ~azure.mgmt.storagecache.models.ClfsTarget - :param unknown: Properties when unknown target. + :param unknown: Properties when targetType is unknown. :type unknown: ~azure.mgmt.storagecache.models.UnknownTarget """ @@ -542,10 +545,10 @@ def __init__(self, *, junctions=None, target_type=None, provisioning_state=None, class UnknownTarget(Model): - """Storage container for use as a Unknown StorageTarget. + """Storage container for use as an Unknown Storage Target. :param unknown_map: Dictionary of string->string pairs containing - information about the StorageTarget. + information about the Storage Target. :type unknown_map: dict[str, str] """ @@ -563,10 +566,10 @@ class UsageModel(Model): :param display: Localized information describing this usage model. :type display: ~azure.mgmt.storagecache.models.UsageModelDisplay - :param model_name: Non localized keyword naming this usage model. + :param model_name: Non-localized keyword name for this usage model. :type model_name: str :param target_type: The type of Storage Target to which this model is - applicable (only nfs for now) + applicable (only nfs3 as of this version). :type target_type: str """ diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_storage_cache_mgmt_client_enums.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_storage_cache_management_client_enums.py similarity index 100% rename from sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_storage_cache_mgmt_client_enums.py rename to sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_storage_cache_management_client_enums.py diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_caches_operations.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_caches_operations.py index c30b4857a12c..007c1d108a86 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_caches_operations.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_caches_operations.py @@ -27,7 +27,7 @@ class CachesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-08-01-preview". + :ivar api_version: Client API version. Constant value: "2019-11-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01-preview" + self.api_version = "2019-11-01" self.config = config @@ -109,8 +109,7 @@ def internal_paging(next_link=None): def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Returns all Caches the user has access to under a resource group and - subscription. + """Returns all Caches the user has access to under a resource group. :param resource_group_name: Target resource group. :type resource_group_name: str @@ -233,7 +232,7 @@ def delete( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of cache. + :param cache_name: Name of Cache. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -278,7 +277,7 @@ def get( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of cache. + :param cache_name: Name of Cache. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -334,10 +333,10 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}'} - def _create_initial( + def _create_or_update_initial( self, resource_group_name, cache_name, cache=None, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.create.metadata['url'] + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), @@ -388,16 +387,16 @@ def _create_initial( return deserialized - def create( + def create_or_update( self, resource_group_name, cache_name, cache=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Create/update a Cache instance. + """Create or update a Cache. :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of cache. + :param cache_name: Name of Cache. :type cache_name: str - :param cache: Object containing the user selectable properties of the - new cache. If read-only properties are included, they must match the + :param cache: Object containing the user-selectable properties of the + new Cache. If read-only properties are included, they must match the existing values of those properties. :type cache: ~azure.mgmt.storagecache.models.Cache :param dict custom_headers: headers that will be added to the request @@ -413,7 +412,7 @@ def create( ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.storagecache.models.Cache]] :raises: :class:`CloudError` """ - raw_result = self._create_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, cache_name=cache_name, cache=cache, @@ -438,7 +437,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}'} def update( self, resource_group_name, cache_name, cache=None, custom_headers=None, raw=False, **operation_config): @@ -446,10 +445,10 @@ def update( :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of cache. + :param cache_name: Name of Cache. :type cache_name: str - :param cache: Object containing the user selectable properties of the - new cache. If read-only properties are included, they must match the + :param cache: Object containing the user-selectable properties of the + Cache. If read-only properties are included, they must match the existing values of those properties. :type cache: ~azure.mgmt.storagecache.models.Cache :param dict custom_headers: headers that will be added to the request @@ -542,7 +541,7 @@ def _flush_initial( 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, 202]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -553,6 +552,8 @@ def _flush_initial( deserialized = self._deserialize('object', response) if response.status_code == 202: deserialized = self._deserialize('object', response) + if response.status_code == 204: + deserialized = self._deserialize('object', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -562,13 +563,13 @@ def _flush_initial( def flush( self, resource_group_name, cache_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Tells a cache to write all dirty data to the StorageTarget(s). During + """Tells a Cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors returned until the flush is complete. :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of cache. + :param cache_name: Name of Cache. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -637,7 +638,7 @@ def _start_initial( 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, 202]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -648,6 +649,8 @@ def _start_initial( deserialized = self._deserialize('object', response) if response.status_code == 202: deserialized = self._deserialize('object', response) + if response.status_code == 204: + deserialized = self._deserialize('object', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -657,11 +660,11 @@ def _start_initial( def start( self, resource_group_name, cache_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Tells a Stopped state cache to transition to Active state. + """Tells a Stopped state Cache to transition to Active state. :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of cache. + :param cache_name: Name of Cache. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -730,7 +733,7 @@ def _stop_initial( 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, 202]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -741,6 +744,8 @@ def _stop_initial( deserialized = self._deserialize('object', response) if response.status_code == 202: deserialized = self._deserialize('object', response) + if response.status_code == 204: + deserialized = self._deserialize('object', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -750,11 +755,11 @@ def _stop_initial( def stop( self, resource_group_name, cache_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Tells an Active cache to transition to Stopped state. + """Tells an Active Cache to transition to Stopped state. :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of cache. + :param cache_name: Name of Cache. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -823,7 +828,7 @@ def _upgrade_firmware_initial( request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [201, 202]: + if response.status_code not in [201, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -834,6 +839,8 @@ def _upgrade_firmware_initial( deserialized = self._deserialize('object', response) if response.status_code == 202: deserialized = self._deserialize('object', response) + if response.status_code == 204: + deserialized = self._deserialize('object', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -843,11 +850,12 @@ def _upgrade_firmware_initial( def upgrade_firmware( self, resource_group_name, cache_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Tells a cache to upgrade its firmware. + """Upgrade a Cache's firmware if a new version is available. Otherwise, + this operation has no effect. :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of cache. + :param cache_name: Name of Cache. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_operations.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_operations.py index af6469ed3574..0dd535cde85e 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_operations.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-08-01-preview". + :ivar api_version: Client API version. Constant value: "2019-11-01". """ models = models @@ -35,13 +35,13 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01-preview" + self.api_version = "2019-11-01" self.config = config def list( self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available RP operations. + """Lists all of the available Resource Provider operations. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_skus_operations.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_skus_operations.py index b766b81dcef0..1a448146522a 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_skus_operations.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_skus_operations.py @@ -25,7 +25,7 @@ class SkusOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-08-01-preview". + :ivar api_version: Client API version. Constant value: "2019-11-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01-preview" + self.api_version = "2019-11-01" self.config = config diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_storage_targets_operations.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_storage_targets_operations.py index 352f4d8e1d20..ed72a5fabe2c 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_storage_targets_operations.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_storage_targets_operations.py @@ -27,7 +27,7 @@ class StorageTargetsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-08-01-preview". + :ivar api_version: Client API version. Constant value: "2019-11-01". """ models = models @@ -37,18 +37,17 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01-preview" + self.api_version = "2019-11-01" self.config = config def list_by_cache( self, resource_group_name, cache_name, custom_headers=None, raw=False, **operation_config): - """Returns the StorageTargets for this cache in the subscription and - resource group. + """Returns a list of Storage Targets for the specified Cache. :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of cache. + :param cache_name: Name of Cache. :type cache_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -167,15 +166,17 @@ def _delete_initial( def delete( self, resource_group_name, cache_name, storage_target_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Removes a storage target from a cache. This operation is allowed at - any time, but if the cache is down or unhealthy, the actual removal of - the storage target may be delayed until the cache is healthy again. + """Removes a Storage Target from a Cache. This operation is allowed at any + time, but if the Cache is down or unhealthy, the actual removal of the + Storage Target may be delayed until the Cache is healthy again. Note + that if the Cache has data to flush to the Storage Target, the data + will be flushed before the Storage Target will be deleted. :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of cache. + :param cache_name: Name of Cache. :type cache_name: str - :param storage_target_name: Name of storage target. + :param storage_target_name: Name of Storage Target. :type storage_target_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -217,13 +218,13 @@ def get_long_running_output(response): def get( self, resource_group_name, cache_name, storage_target_name, custom_headers=None, raw=False, **operation_config): - """Returns a storage target from a cache. + """Returns a Storage Target from a Cache. :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of cache. + :param cache_name: Name of Cache. :type cache_name: str - :param storage_target_name: Name of storage target. + :param storage_target_name: Name of the Storage Target. :type storage_target_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -280,10 +281,10 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}'} - def _create_initial( + def _create_or_update_initial( self, resource_group_name, cache_name, storage_target_name, storagetarget=None, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.create.metadata['url'] + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), @@ -335,20 +336,21 @@ def _create_initial( return deserialized - def create( + def create_or_update( self, resource_group_name, cache_name, storage_target_name, storagetarget=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Create/update a storage target. This operation is allowed at any time, - but if the cache is down or unhealthy, the actual creation/modification - of the storage target may be delayed until the cache is healthy again. + """Create or update a Storage Target. This operation is allowed at any + time, but if the Cache is down or unhealthy, the actual + creation/modification of the Storage Target may be delayed until the + Cache is healthy again. :param resource_group_name: Target resource group. :type resource_group_name: str - :param cache_name: Name of cache. + :param cache_name: Name of Cache. :type cache_name: str - :param storage_target_name: Name of storage target. + :param storage_target_name: Name of the Storage Target. :type storage_target_name: str - :param storagetarget: Object containing the definition of a storage - target. + :param storagetarget: Object containing the definition of a Storage + Target. :type storagetarget: ~azure.mgmt.storagecache.models.StorageTarget :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -363,7 +365,7 @@ def create( ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.storagecache.models.StorageTarget]] :raises: :class:`CloudError` """ - raw_result = self._create_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, cache_name=cache_name, storage_target_name=storage_target_name, @@ -389,80 +391,4 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}'} - - def update( - self, resource_group_name, cache_name, storage_target_name, storagetarget=None, custom_headers=None, raw=False, **operation_config): - """Update a storage target. This operation is allowed at any time, but if - the cache is down or unhealthy, the actual creation/modification of the - storage target may be delayed until the cache is healthy again. - - :param resource_group_name: Target resource group. - :type resource_group_name: str - :param cache_name: Name of cache. - :type cache_name: str - :param storage_target_name: Name of storage target. - :type storage_target_name: str - :param storagetarget: Object containing the definition of a storage - target. - :type storagetarget: ~azure.mgmt.storagecache.models.StorageTarget - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: StorageTarget or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.storagecache.models.StorageTarget or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'cacheName': self._serialize.url("cache_name", cache_name, 'str', pattern=r'^[-0-9a-zA-Z_]{1,31}$'), - 'storageTargetName': self._serialize.url("storage_target_name", storage_target_name, 'str', pattern=r'^[-0-9a-zA-Z_]{1,31}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # 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()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if storagetarget is not None: - body_content = self._serialize.body(storagetarget, 'StorageTarget') - else: - body_content = None - - # Construct and send request - 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) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('StorageTarget', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}'} diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_usage_models_operations.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_usage_models_operations.py index 78698d784eff..3a29bcfff3eb 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_usage_models_operations.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_usage_models_operations.py @@ -25,7 +25,7 @@ class UsageModelsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-08-01-preview". + :ivar api_version: Client API version. Constant value: "2019-11-01". """ models = models @@ -35,13 +35,13 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01-preview" + self.api_version = "2019-11-01" self.config = config def list( self, custom_headers=None, raw=False, **operation_config): - """Get the list of cache Usage Models available to this subscription. + """Get the list of Cache Usage Models available to this subscription. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/version.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/version.py index 0529c1b3b0f0..9bd1dfac7ecb 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/version.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0rc1" +VERSION = "0.2.0"