From 12adf3225cc456020dad48b4fffd5406ec69d702 Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Tue, 15 Oct 2019 19:12:34 -0700 Subject: [PATCH 1/3] renames logging to ServiceAnalyticsLogging --- sdk/storage/azure-storage-blob/HISTORY.md | 1 + .../azure-storage-blob/azure/storage/blob/__init__.py | 5 ++--- .../azure-storage-blob/azure/storage/blob/aio/__init__.py | 4 ++-- .../azure/storage/blob/aio/blob_service_client_async.py | 8 ++++---- .../azure/storage/blob/blob_service_client.py | 8 ++++---- .../azure-storage-blob/azure/storage/blob/models.py | 2 +- .../azure-storage-blob/tests/test_blob_samples_service.py | 4 ++-- .../tests/test_blob_samples_service_async.py | 4 ++-- .../tests/test_blob_service_properties.py | 8 ++++---- .../tests/test_blob_service_properties_async.py | 8 ++++---- sdk/storage/azure-storage-queue/HISTORY.md | 1 + .../azure-storage-queue/azure/storage/queue/__init__.py | 4 ++-- .../azure/storage/queue/aio/__init__.py | 4 ++-- .../azure/storage/queue/aio/queue_service_client_async.py | 8 ++++---- .../azure-storage-queue/azure/storage/queue/models.py | 2 +- .../azure/storage/queue/queue_service_client.py | 8 ++++---- .../tests/test_queue_samples_service.py | 4 ++-- .../tests/test_queue_samples_service_async.py | 4 ++-- .../tests/test_queue_service_properties.py | 8 ++++---- .../tests/test_queue_service_properties_async.py | 8 ++++---- 20 files changed, 52 insertions(+), 51 deletions(-) diff --git a/sdk/storage/azure-storage-blob/HISTORY.md b/sdk/storage/azure-storage-blob/HISTORY.md index c1a63491eb3c..20443e842a96 100644 --- a/sdk/storage/azure-storage-blob/HISTORY.md +++ b/sdk/storage/azure-storage-blob/HISTORY.md @@ -6,6 +6,7 @@ - `set_container_access_policy` has required parameter `signed_identifiers`. - NoRetry policy has been removed. Use keyword argument `retry_total=0` for no retries. +- `Logging` has been renamed to `BlobAnalyticsLogging`. **New features** diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py b/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py index 3a2d77ae69d8..37e71ec860d2 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py @@ -31,7 +31,7 @@ PremiumPageBlobTier, SequenceNumberAction, PublicAccess, - Logging, + BlobAnalyticsLogging, Metrics, RetentionPolicy, StaticWebsite, @@ -58,7 +58,6 @@ __all__ = [ 'BlobServiceClient', 'ContainerClient', - 'BlobClient', 'BlobType', 'LeaseClient', 'StorageErrorCode', @@ -71,7 +70,7 @@ 'PremiumPageBlobTier', 'SequenceNumberAction', 'PublicAccess', - 'Logging', + 'BlobAnalyticsLogging', 'Metrics', 'RetentionPolicy', 'StaticWebsite', diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/__init__.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/__init__.py index 8f68faac5f79..f71661bceb06 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/__init__.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/__init__.py @@ -18,7 +18,7 @@ PremiumPageBlobTier, SequenceNumberAction, PublicAccess, - Logging, + BlobAnalyticsLogging, Metrics, RetentionPolicy, StaticWebsite, @@ -61,7 +61,7 @@ 'PremiumPageBlobTier', 'SequenceNumberAction', 'PublicAccess', - 'Logging', + 'BlobAnalyticsLogging', 'Metrics', 'RetentionPolicy', 'StaticWebsite', diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py index 53e6488fe371..fdfe437a5b99 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py @@ -35,7 +35,7 @@ from .lease_async import LeaseClient from ..models import ( BlobProperties, - Logging, + BlobAnalyticsLogging, Metrics, RetentionPolicy, StaticWebsite, @@ -235,7 +235,7 @@ async def get_service_properties(self, **kwargs): @distributed_trace_async async def set_service_properties( - self, logging=None, # type: Optional[Logging] + self, logging=None, # type: Optional[BlobAnalyticsLogging] hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] @@ -248,12 +248,12 @@ async def set_service_properties( """Sets the properties of a storage account's Blob service, including Azure Storage Analytics. - If an element (e.g. Logging) is left as None, the + If an element (e.g. BlobAnalyticsLogging) is left as None, the existing settings on the service for that functionality are preserved. :param logging: Groups the Azure Analytics Logging settings. - :type logging: ~azure.storage.blob.Logging + :type logging: ~azure.storage.blob.BlobAnalyticsLogging :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for blobs. diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py index 2a9d87b22598..e2aa35a37ae6 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py @@ -38,7 +38,7 @@ from .lease import LeaseClient from .models import ( BlobProperties, - Logging, + BlobAnalyticsLogging, Metrics, RetentionPolicy, StaticWebsite, @@ -354,7 +354,7 @@ def get_service_properties(self, **kwargs): @distributed_trace def set_service_properties( - self, logging=None, # type: Optional[Logging] + self, logging=None, # type: Optional[BlobAnalyticsLogging] hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] @@ -367,12 +367,12 @@ def set_service_properties( """Sets the properties of a storage account's Blob service, including Azure Storage Analytics. - If an element (e.g. Logging) is left as None, the + If an element (e.g. BlobAnalyticsLogging) is left as None, the existing settings on the service for that functionality are preserved. :param logging: Groups the Azure Analytics Logging settings. - :type logging: ~azure.storage.blob.Logging + :type logging: ~azure.storage.blob.BlobAnalyticsLogging :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for blobs. diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py index 30e2d7a7f454..79d477db923b 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py @@ -114,7 +114,7 @@ class PublicAccess(str, Enum): """ -class Logging(GeneratedLogging): +class BlobAnalyticsLogging(GeneratedLogging): """Azure Analytics Logging settings. :param str version: diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_samples_service.py b/sdk/storage/azure-storage-blob/tests/test_blob_samples_service.py index d32b6b3fadc0..dadf12a24979 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_samples_service.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_samples_service.py @@ -45,10 +45,10 @@ def test_blob_service_properties(self): # [START set_blob_service_properties] # Create service properties - from azure.storage.blob import Logging, Metrics, CorsRule, RetentionPolicy + from azure.storage.blob import BlobAnalyticsLogging, Metrics, CorsRule, RetentionPolicy # Create logging settings - logging = Logging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) + logging = BlobAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Create metrics for requests statistics hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_samples_service_async.py b/sdk/storage/azure-storage-blob/tests/test_blob_samples_service_async.py index dc4a8d22bf6f..2b9b8440fbec 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_samples_service_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_samples_service_async.py @@ -51,10 +51,10 @@ async def _test_blob_service_properties_async(self): # [START set_blob_service_properties] # Create service properties - from azure.storage.blob import Logging, Metrics, CorsRule, RetentionPolicy + from azure.storage.blob import BlobAnalyticsLogging, Metrics, CorsRule, RetentionPolicy # Create logging settings - logging = Logging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) + logging = BlobAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Create metrics for requests statistics hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_service_properties.py b/sdk/storage/azure-storage-blob/tests/test_blob_service_properties.py index af9c2dbb45f7..15550d107506 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_service_properties.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_service_properties.py @@ -14,7 +14,7 @@ BlobServiceClient, ContainerClient, BlobClient, - Logging, + BlobAnalyticsLogging, Metrics, CorsRule, RetentionPolicy, @@ -43,7 +43,7 @@ def setUp(self): def _assert_properties_default(self, prop): self.assertIsNotNone(prop) - self._assert_logging_equal(prop.logging, Logging()) + self._assert_logging_equal(prop.logging, BlobAnalyticsLogging()) self._assert_metrics_equal(prop.hour_metrics, Metrics()) self._assert_metrics_equal(prop.minute_metrics, Metrics()) self._assert_cors_equal(prop.cors, list()) @@ -122,7 +122,7 @@ def test_blob_service_properties(self): # Act resp = self.bsc.set_service_properties( - logging=Logging(), + logging=BlobAnalyticsLogging(), hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), @@ -310,7 +310,7 @@ def test_set_static_website_properties_does_not_impact_other_properties(self): @record def test_set_logging(self): # Arrange - logging = Logging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) + logging = BlobAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act self.bsc.set_service_properties(logging=logging) diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_service_properties_async.py b/sdk/storage/azure-storage-blob/tests/test_blob_service_properties_async.py index 06c0d82ca499..f45acb8474c1 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_service_properties_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_service_properties_async.py @@ -22,7 +22,7 @@ from multidict import CIMultiDict, CIMultiDictProxy from azure.storage.blob import ( - Logging, + BlobAnalyticsLogging, Metrics, CorsRule, RetentionPolicy, @@ -60,7 +60,7 @@ def setUp(self): def _assert_properties_default(self, prop): self.assertIsNotNone(prop) - self._assert_logging_equal(prop.logging, Logging()) + self._assert_logging_equal(prop.logging, BlobAnalyticsLogging()) self._assert_metrics_equal(prop.hour_metrics, Metrics()) self._assert_metrics_equal(prop.minute_metrics, Metrics()) self._assert_cors_equal(prop.cors, list()) @@ -138,7 +138,7 @@ async def _test_blob_service_properties_async(self): # Act resp = await self.bsc.set_service_properties( - logging=Logging(), + logging=BlobAnalyticsLogging(), hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), @@ -362,7 +362,7 @@ def test_set_static_website_properties_does_not_impact_other_properties_async(se async def _test_set_logging_async(self): # Arrange - logging = Logging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) + logging = BlobAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act await self.bsc.set_service_properties(logging=logging) diff --git a/sdk/storage/azure-storage-queue/HISTORY.md b/sdk/storage/azure-storage-queue/HISTORY.md index 541be0038198..340925fbba4f 100644 --- a/sdk/storage/azure-storage-queue/HISTORY.md +++ b/sdk/storage/azure-storage-queue/HISTORY.md @@ -15,6 +15,7 @@ To use a queue_url, the method `from_queue_url` must be used. - `timeout` etc. - `QueueMessage` has had its parameters renamed from `insertion_time`, `time_next_visible`, `expiration_time` to `inserted_on`, `next_visible_on`, `expires_on`, respectively. +- `Logging` has been renamed to `QueueAnalyticsLogging`. **New features** diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/__init__.py b/sdk/storage/azure-storage-queue/azure/storage/queue/__init__.py index 395913eaaaea..a3edb013ec2a 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/__init__.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/__init__.py @@ -30,7 +30,7 @@ QueuePropertiesPaged, QueueSasPermissions, AccessPolicy, - Logging, + QueueAnalyticsLogging, Metrics, CorsRule, RetentionPolicy, @@ -61,7 +61,7 @@ 'TextXMLDecodePolicy', 'NoEncodePolicy', 'NoDecodePolicy', - 'Logging', + 'QueueAnalyticsLogging', 'Metrics', 'CorsRule', 'RetentionPolicy', diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/__init__.py b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/__init__.py index 1085b29e6628..db7a34007b4f 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/__init__.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/__init__.py @@ -9,7 +9,7 @@ from .queue_service_client_async import QueueServiceClient from .models import MessagesPaged, QueuePropertiesPaged from ..models import ( - Logging, Metrics, RetentionPolicy, CorsRule, AccessPolicy, + QueueAnalyticsLogging, Metrics, RetentionPolicy, CorsRule, AccessPolicy, QueueMessage, QueueSasPermissions, QueueProperties) __version__ = VERSION @@ -17,7 +17,7 @@ __all__ = [ 'QueueClient', 'QueueServiceClient', - 'Logging', + 'QueueAnalyticsLogging', 'Metrics', 'RetentionPolicy', 'CorsRule', diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_service_client_async.py b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_service_client_async.py index 8089689dbf70..6c3fcc9cec49 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_service_client_async.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_service_client_async.py @@ -36,7 +36,7 @@ from azure.storage.queue.aio.models import ( QueueProperties ) - from azure.storage.queue.models import Logging, Metrics, CorsRule + from azure.storage.queue.models import QueueAnalyticsLogging, Metrics, CorsRule class QueueServiceClient(AsyncStorageAccountHostsMixin, QueueServiceClientBase): @@ -167,7 +167,7 @@ async def get_service_properties(self, **kwargs): # type: ignore @distributed_trace_async async def set_service_properties( # type: ignore - self, logging=None, # type: Optional[Logging] + self, logging=None, # type: Optional[QueueAnalyticsLogging] hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] @@ -177,12 +177,12 @@ async def set_service_properties( # type: ignore """Sets the properties of a storage account's Queue service, including Azure Storage Analytics. - If an element (e.g. Logging) is left as None, the + If an element (e.g. QueueAnalyticsLogging) is left as None, the existing settings on the service for that functionality are preserved. :param logging: Groups the Azure Analytics Logging settings. - :type logging: ~azure.storage.queue.Logging + :type logging: ~azure.storage.queue.QueueAnalyticsLogging :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for queues. diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py index 87a3992de8c8..d0eef3d745f0 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py @@ -18,7 +18,7 @@ from ._generated.models import CorsRule as GeneratedCorsRule -class Logging(GeneratedLogging): +class QueueAnalyticsLogging(GeneratedLogging): """Azure Analytics Logging settings. All required parameters must be populated in order to send to Azure. diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py index 86f6ea6c6d67..dd0aaa841414 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py @@ -32,7 +32,7 @@ from ._shared.models import AccountSasPermissions, ResourceTypes from .models import ( QueueProperties, - Logging, + QueueAnalyticsLogging, Metrics, CorsRule ) @@ -267,7 +267,7 @@ def get_service_properties(self, **kwargs): # type: ignore @distributed_trace def set_service_properties( # type: ignore - self, logging=None, # type: Optional[Logging] + self, logging=None, # type: Optional[QueueAnalyticsLogging] hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] @@ -277,12 +277,12 @@ def set_service_properties( # type: ignore """Sets the properties of a storage account's Queue service, including Azure Storage Analytics. - If an element (e.g. Logging) is left as None, the + If an element (e.g. QueueAnalyticsLogging) is left as None, the existing settings on the service for that functionality are preserved. :param logging: Groups the Azure Analytics Logging settings. - :type logging: ~azure.storage.queue.Logging + :type logging: ~azure.storage.queue.QueueAnalyticsLogging :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for queues. diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_samples_service.py b/sdk/storage/azure-storage-queue/tests/test_queue_samples_service.py index 259439dae379..46564ab05ff3 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_samples_service.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_samples_service.py @@ -23,10 +23,10 @@ def test_queue_service_properties(self, resource_group, location, storage_accoun # [START set_queue_service_properties] # Create service properties - from azure.storage.queue import Logging, Metrics, CorsRule, RetentionPolicy + from azure.storage.queue import QueueAnalyticsLogging, Metrics, CorsRule, RetentionPolicy # Create logging settings - logging = Logging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) + logging = QueueAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Create metrics for requests statistics hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_samples_service_async.py b/sdk/storage/azure-storage-queue/tests/test_queue_samples_service_async.py index 948f7d07c76b..a4629338f523 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_samples_service_async.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_samples_service_async.py @@ -26,10 +26,10 @@ async def test_queue_service_properties(self, resource_group, location, storage_ # [START async_set_queue_service_properties] # Create service properties - from azure.storage.queue.aio import Logging, Metrics, CorsRule, RetentionPolicy + from azure.storage.queue.aio import QueueAnalyticsLogging, Metrics, CorsRule, RetentionPolicy # Create logging settings - logging = Logging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) + logging = QueueAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Create metrics for requests statistics hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py index abe20183ddb1..654691034c59 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py @@ -14,7 +14,7 @@ from azure.storage.queue import ( QueueServiceClient, QueueClient, - Logging, + QueueAnalyticsLogging, Metrics, CorsRule, RetentionPolicy, @@ -33,7 +33,7 @@ class QueueServicePropertiesTest(QueueTestCase): def _assert_properties_default(self, prop): self.assertIsNotNone(prop) - self._assert_logging_equal(prop.logging, Logging()) + self._assert_logging_equal(prop.logging, QueueAnalyticsLogging()) self._assert_metrics_equal(prop.hour_metrics, Metrics()) self._assert_metrics_equal(prop.minute_metrics, Metrics()) self._assert_cors_equal(prop.cors, list()) @@ -113,7 +113,7 @@ def test_queue_service_properties(self, resource_group, location, storage_accoun qsc = QueueServiceClient(self._account_url(storage_account.name), storage_account_key) # Act resp = qsc.set_service_properties( - logging=Logging(), + logging=QueueAnalyticsLogging(), hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list()) @@ -130,7 +130,7 @@ def test_queue_service_properties(self, resource_group, location, storage_accoun def test_set_logging(self, resource_group, location, storage_account, storage_account_key): # Arrange qsc = QueueServiceClient(self._account_url(storage_account.name), storage_account_key) - logging = Logging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) + logging = QueueAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act qsc.set_service_properties(logging=logging) diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties_async.py b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties_async.py index 71a17bcdb8cb..1df49af14931 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties_async.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties_async.py @@ -16,7 +16,7 @@ from azure.storage.queue.aio import ( QueueServiceClient, QueueClient, - Logging, + QueueAnalyticsLogging, Metrics, CorsRule, RetentionPolicy @@ -42,7 +42,7 @@ class QueueServicePropertiesTest(AsyncQueueTestCase): def _assert_properties_default(self, prop): self.assertIsNotNone(prop) - self._assert_logging_equal(prop.logging, Logging()) + self._assert_logging_equal(prop.logging, QueueAnalyticsLogging()) self._assert_metrics_equal(prop.hour_metrics, Metrics()) self._assert_metrics_equal(prop.minute_metrics, Metrics()) self._assert_cors_equal(prop.cors, list()) @@ -124,7 +124,7 @@ async def test_queue_service_properties(self, resource_group, location, storage_ # Act resp = await qsc.set_service_properties( - logging=Logging(), + logging=QueueAnalyticsLogging(), hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list()) @@ -141,7 +141,7 @@ async def test_queue_service_properties(self, resource_group, location, storage_ async def test_set_logging(self, resource_group, location, storage_account, storage_account_key): # Arrange qsc = QueueServiceClient(self._account_url(storage_account.name), storage_account_key, transport=AiohttpTestTransport()) - logging = Logging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) + logging = QueueAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act await qsc.set_service_properties(logging=logging) From 63781ebd1d684d4291fe66bc5499a208e31111a5 Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Wed, 16 Oct 2019 09:06:37 -0700 Subject: [PATCH 2/3] changes param logging to analytics_logging --- .../azure-storage-blob/azure/storage/blob/__init__.py | 1 + .../storage/blob/aio/blob_service_client_async.py | 10 +++++----- .../azure/storage/blob/blob_service_client.py | 10 +++++----- .../storage/queue/aio/queue_service_client_async.py | 10 +++++----- .../azure/storage/queue/queue_service_client.py | 10 +++++----- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py b/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py index f06159c0e1b1..67f9b3cc4409 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py @@ -56,6 +56,7 @@ __all__ = [ 'BlobServiceClient', 'ContainerClient', + 'BlobClient', 'BlobType', 'LeaseClient', 'StorageErrorCode', diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py index d6fd946b4e5c..cca75e3c69c0 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py @@ -236,7 +236,7 @@ async def get_service_properties(self, **kwargs): @distributed_trace_async async def set_service_properties( - self, logging=None, # type: Optional[BlobAnalyticsLogging] + self, analytics_logging=None, # type: Optional[BlobAnalyticsLogging] hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] @@ -249,12 +249,12 @@ async def set_service_properties( """Sets the properties of a storage account's Blob service, including Azure Storage Analytics. - If an element (e.g. BlobAnalyticsLogging) is left as None, the + If an element (e.g. analytics_logging) is left as None, the existing settings on the service for that functionality are preserved. - :param logging: + :param analytics_logging: Groups the Azure Analytics Logging settings. - :type logging: ~azure.storage.blob.BlobAnalyticsLogging + :type analytics_logging: ~azure.storage.blob.BlobAnalyticsLogging :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for blobs. @@ -293,7 +293,7 @@ async def set_service_properties( :caption: Setting service properties for the blob service. """ props = StorageServiceProperties( - logging=logging, + logging=analytics_logging, hour_metrics=hour_metrics, minute_metrics=minute_metrics, cors=cors, diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py index e2aa35a37ae6..de298072a45e 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py @@ -354,7 +354,7 @@ def get_service_properties(self, **kwargs): @distributed_trace def set_service_properties( - self, logging=None, # type: Optional[BlobAnalyticsLogging] + self, analytics_logging=None, # type: Optional[BlobAnalyticsLogging] hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] @@ -367,12 +367,12 @@ def set_service_properties( """Sets the properties of a storage account's Blob service, including Azure Storage Analytics. - If an element (e.g. BlobAnalyticsLogging) is left as None, the + If an element (e.g. analytics_logging) is left as None, the existing settings on the service for that functionality are preserved. - :param logging: + :param analytics_logging: Groups the Azure Analytics Logging settings. - :type logging: ~azure.storage.blob.BlobAnalyticsLogging + :type analytics_logging: ~azure.storage.blob.BlobAnalyticsLogging :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for blobs. @@ -411,7 +411,7 @@ def set_service_properties( :caption: Setting service properties for the blob service. """ props = StorageServiceProperties( - logging=logging, + logging=analytics_logging, hour_metrics=hour_metrics, minute_metrics=minute_metrics, cors=cors, diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_service_client_async.py b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_service_client_async.py index 4438b99dfeb5..6693601a3fa2 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_service_client_async.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_service_client_async.py @@ -168,7 +168,7 @@ async def get_service_properties(self, **kwargs): # type: ignore @distributed_trace_async async def set_service_properties( # type: ignore - self, logging=None, # type: Optional[QueueAnalyticsLogging] + self, analytics_logging=None, # type: Optional[QueueAnalyticsLogging] hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] @@ -178,12 +178,12 @@ async def set_service_properties( # type: ignore """Sets the properties of a storage account's Queue service, including Azure Storage Analytics. - If an element (e.g. QueueAnalyticsLogging) is left as None, the + If an element (e.g. analytics_logging) is left as None, the existing settings on the service for that functionality are preserved. - :param logging: + :param analytics_logging: Groups the Azure Analytics Logging settings. - :type logging: ~azure.storage.queue.QueueAnalyticsLogging + :type analytics_logging: ~azure.storage.queue.QueueAnalyticsLogging :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for queues. @@ -212,7 +212,7 @@ async def set_service_properties( # type: ignore """ timeout = kwargs.pop('timeout', None) props = StorageServiceProperties( - logging=logging, + logging=analytics_logging, hour_metrics=hour_metrics, minute_metrics=minute_metrics, cors=cors diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py index dd0aaa841414..c0eed0def23f 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py @@ -267,7 +267,7 @@ def get_service_properties(self, **kwargs): # type: ignore @distributed_trace def set_service_properties( # type: ignore - self, logging=None, # type: Optional[QueueAnalyticsLogging] + self, analytics_logging=None, # type: Optional[QueueAnalyticsLogging] hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] @@ -277,12 +277,12 @@ def set_service_properties( # type: ignore """Sets the properties of a storage account's Queue service, including Azure Storage Analytics. - If an element (e.g. QueueAnalyticsLogging) is left as None, the + If an element (e.g. analytics_logging) is left as None, the existing settings on the service for that functionality are preserved. - :param logging: + :param analytics_logging: Groups the Azure Analytics Logging settings. - :type logging: ~azure.storage.queue.QueueAnalyticsLogging + :type analytics_logging: ~azure.storage.queue.QueueAnalyticsLogging :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for queues. @@ -311,7 +311,7 @@ def set_service_properties( # type: ignore """ timeout = kwargs.pop('timeout', None) props = StorageServiceProperties( - logging=logging, + logging=analytics_logging, hour_metrics=hour_metrics, minute_metrics=minute_metrics, cors=cors From 6ccb09c785a6bf0770bae013811285fd97793ff7 Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Wed, 16 Oct 2019 09:49:22 -0700 Subject: [PATCH 3/3] fixes tests due to param name change --- ...operties.test_blob_service_properties.yaml | 92 +++++++++++++++++- ...b_service_properties.test_set_logging.yaml | 91 +++++++++++++++++- ...nc.test_blob_service_properties_async.yaml | 91 ++++++++++++++++++ ...operties_async.test_set_logging_async.yaml | 93 +++++++++++++++++++ .../tests/test_blob_service_properties.py | 4 +- .../test_blob_service_properties_async.py | 4 +- ...perties.test_queue_service_properties.yaml | 14 ++- ...e_service_properties.test_set_logging.yaml | 14 ++- ...s_async.test_queue_service_properties.yaml | 14 ++- ...ice_properties_async.test_set_logging.yaml | 14 ++- .../tests/test_queue_service_properties.py | 4 +- .../test_queue_service_properties_async.py | 4 +- 12 files changed, 391 insertions(+), 48 deletions(-) diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties.test_blob_service_properties.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties.test_blob_service_properties.yaml index ff0ca6fd3700..2ace7aa83f10 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties.test_blob_service_properties.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties.test_blob_service_properties.yaml @@ -63,8 +63,8 @@ interactions: uri: https://remotestoragename.blob.core.windows.net/?restype=service&comp=properties response: body: - string: "\uFEFF1.0falsefalsefalsefalse1.0falsefalse1.0falsefalsefalsetrueindex.html2014-02-14" + string: "\uFEFF1.0falsefalsefalsefalse1.0falsefalse1.0falsefalsefalsetrueindex.html2014-02-14" headers: Content-Type: - application/xml @@ -147,8 +147,8 @@ interactions: uri: https://storagename.blob.core.windows.net/?restype=service&comp=properties response: body: - string: "\uFEFF1.0falsefalsefalsefalse1.0falsefalse1.0falsefalsefalsetrueindex.html2014-02-14" + string: "\uFEFF1.0falsefalsefalsefalse1.0falsefalse1.0falsefalsefalsetrueindex.html2014-02-14" headers: Content-Type: - application/xml @@ -167,4 +167,88 @@ interactions: status: code: 200 message: OK +- request: + body: ' + + 1.0falsefalsefalsefalse1.0falsefalse1.0falsefalse2014-02-14' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '585' + Content-Type: + - application/xml; charset=utf-8 + User-Agent: + - azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) + x-ms-client-request-id: + - 19134036-f033-11e9-a231-b831b58100e8 + x-ms-date: + - Wed, 16 Oct 2019 16:36:26 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://blobstoragename.blob.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + Content-Length: + - '0' + Date: + - Wed, 16 Oct 2019 16:36:26 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: + - aa29e103-401e-000d-773f-848b0c000000 + x-ms-version: + - '2019-02-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) + x-ms-client-request-id: + - 194772b8-f033-11e9-9f32-b831b58100e8 + x-ms-date: + - Wed, 16 Oct 2019 16:36:26 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://blobstoragename.blob.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsefalsefalsefalse1.0falsefalse1.0falsefalsefalsetrueindex.html2014-02-14" + headers: + Content-Type: + - application/xml + Date: + - Wed, 16 Oct 2019 16:36:26 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + Transfer-Encoding: + - chunked + Vary: + - Origin + x-ms-request-id: + - aa29e120-401e-000d-0d3f-848b0c000000 + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties.test_set_logging.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties.test_set_logging.yaml index 168ff108acd8..2dbf07e6fbdc 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties.test_set_logging.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties.test_set_logging.yaml @@ -62,8 +62,8 @@ interactions: uri: https://remotestoragename.blob.core.windows.net/?restype=service&comp=properties response: body: - string: "\uFEFF1.0truetruetruetrue51.0truetruetrue51.0falsefalseGETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500falsefalse2014-02-14" + string: "\uFEFF1.0truetruetruetrue51.0truetruetrue51.0falsefalseGETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500falsefalse2014-02-14" headers: Content-Type: - application/xml @@ -145,8 +145,8 @@ interactions: uri: https://storagename.blob.core.windows.net/?restype=service&comp=properties response: body: - string: "\uFEFF1.0truetruetruetrue51.0truetruetrue51.0falsefalseGETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500falsefalse2014-02-14" + string: "\uFEFF1.0truetruetruetrue51.0truetruetrue51.0falsefalseGETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500falsefalse2014-02-14" headers: Content-Type: - application/xml @@ -165,4 +165,87 @@ interactions: status: code: 200 message: OK +- request: + body: ' + + 1.0truetruetruetrue5' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '262' + Content-Type: + - application/xml; charset=utf-8 + User-Agent: + - azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) + x-ms-client-request-id: + - efb3f422-f032-11e9-80bf-b831b58100e8 + x-ms-date: + - Wed, 16 Oct 2019 16:35:17 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://blobstoragename.blob.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + Content-Length: + - '0' + Date: + - Wed, 16 Oct 2019 16:35:17 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: + - 5b54fe89-a01e-008f-463f-842a5c000000 + x-ms-version: + - '2019-02-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) + x-ms-client-request-id: + - f097f7fa-f032-11e9-99ee-b831b58100e8 + x-ms-date: + - Wed, 16 Oct 2019 16:35:18 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://blobstoragename.blob.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0truetruetruetrue51.0truetruetrue51.0truetruetrue5GETwww.xyz.com0falsetrueindex.html2014-02-14" + headers: + Content-Type: + - application/xml + Date: + - Wed, 16 Oct 2019 16:35:17 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + Transfer-Encoding: + - chunked + Vary: + - Origin + x-ms-request-id: + - 5b54febc-a01e-008f-6b3f-842a5c000000 + x-ms-version: + - '2019-02-02' + status: + code: 200 + message: OK version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties_async.test_blob_service_properties_async.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties_async.test_blob_service_properties_async.yaml index 484f6457b1ed..2838efc00b57 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties_async.test_blob_service_properties_async.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties_async.test_blob_service_properties_async.yaml @@ -95,4 +95,95 @@ interactions: - / - restype=service&comp=properties - '' +- request: + body: ' + + 1.0falsefalsefalsefalse1.0falsefalse1.0falsefalse2014-02-14' + headers: + Content-Length: + - '585' + Content-Type: + - application/xml; charset=utf-8 + User-Agent: + - azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) + x-ms-client-request-id: + - ab4e3df4-f033-11e9-840e-b831b58100e8 + x-ms-date: + - Wed, 16 Oct 2019 16:40:31 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://blobstoragename.blob.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + ? !!python/object/new:multidict._istr.istr + - Content-Length + : '0' + ? !!python/object/new:multidict._istr.istr + - Date + : Wed, 16 Oct 2019 16:40:31 GMT + ? !!python/object/new:multidict._istr.istr + - Server + : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 0db8308d-001e-000a-3140-847d89000000 + x-ms-version: '2019-02-02' + status: + code: 202 + message: Accepted + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - amqptest.blob.core.windows.net + - / + - restype=service&comp=properties + - '' +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) + x-ms-client-request-id: + - ab7d62fa-f033-11e9-bfba-b831b58100e8 + x-ms-date: + - Wed, 16 Oct 2019 16:40:32 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://blobstoragename.blob.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsefalsefalsefalse1.0falsefalse1.0falsefalsefalsetrueindex.html2014-02-14" + headers: + ? !!python/object/new:multidict._istr.istr + - Content-Type + : application/xml + ? !!python/object/new:multidict._istr.istr + - Date + : Wed, 16 Oct 2019 16:40:32 GMT + ? !!python/object/new:multidict._istr.istr + - Server + : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + ? !!python/object/new:multidict._istr.istr + - Transfer-Encoding + : chunked + x-ms-request-id: 0db830ac-001e-000a-4240-847d89000000 + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - amqptest.blob.core.windows.net + - / + - restype=service&comp=properties + - '' version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties_async.test_set_logging_async.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties_async.test_set_logging_async.yaml index 58d0f403c9b2..90e81922d09f 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties_async.test_set_logging_async.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_properties_async.test_set_logging_async.yaml @@ -94,4 +94,97 @@ interactions: - / - restype=service&comp=properties - '' +- request: + body: ' + + 1.0truetruetruetrue5' + headers: + Content-Length: + - '262' + Content-Type: + - application/xml; charset=utf-8 + User-Agent: + - azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) + x-ms-client-request-id: + - f0b2a480-f033-11e9-8adb-b831b58100e8 + x-ms-date: + - Wed, 16 Oct 2019 16:42:28 GMT + x-ms-version: + - '2019-02-02' + method: PUT + uri: https://blobstoragename.blob.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + ? !!python/object/new:multidict._istr.istr + - Content-Length + : '0' + ? !!python/object/new:multidict._istr.istr + - Date + : Wed, 16 Oct 2019 16:42:27 GMT + ? !!python/object/new:multidict._istr.istr + - Server + : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 09959a93-e01e-00aa-5940-84b2ef000000 + x-ms-version: '2019-02-02' + status: + code: 202 + message: Accepted + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - amqptest.blob.core.windows.net + - / + - restype=service&comp=properties + - '' +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) + x-ms-client-request-id: + - f0d5e4ba-f033-11e9-b17a-b831b58100e8 + x-ms-date: + - Wed, 16 Oct 2019 16:42:28 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://blobstoragename.blob.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0truetruetruetrue51.0truetruetrue51.0truetruetrue5GETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500falsetrueindex.html2014-02-14" + headers: + ? !!python/object/new:multidict._istr.istr + - Content-Type + : application/xml + ? !!python/object/new:multidict._istr.istr + - Date + : Wed, 16 Oct 2019 16:42:28 GMT + ? !!python/object/new:multidict._istr.istr + - Server + : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + ? !!python/object/new:multidict._istr.istr + - Transfer-Encoding + : chunked + ? !!python/object/new:multidict._istr.istr + - Vary + : Origin + x-ms-request-id: 09959a9c-e01e-00aa-5b40-84b2ef000000 + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: !!python/object/new:yarl.URL + state: !!python/tuple + - !!python/object/new:urllib.parse.SplitResult + - https + - amqptest.blob.core.windows.net + - / + - restype=service&comp=properties + - '' version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_service_properties.py b/sdk/storage/azure-storage-blob/tests/test_blob_service_properties.py index 15550d107506..257fb86a60bd 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_service_properties.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_service_properties.py @@ -122,7 +122,7 @@ def test_blob_service_properties(self): # Act resp = self.bsc.set_service_properties( - logging=BlobAnalyticsLogging(), + analytics_logging=BlobAnalyticsLogging(), hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), @@ -313,7 +313,7 @@ def test_set_logging(self): logging = BlobAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act - self.bsc.set_service_properties(logging=logging) + self.bsc.set_service_properties(analytics_logging=logging) # Assert received_props = self.bsc.get_service_properties() diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_service_properties_async.py b/sdk/storage/azure-storage-blob/tests/test_blob_service_properties_async.py index f45acb8474c1..79fd1ef6e713 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_service_properties_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_service_properties_async.py @@ -138,7 +138,7 @@ async def _test_blob_service_properties_async(self): # Act resp = await self.bsc.set_service_properties( - logging=BlobAnalyticsLogging(), + analytics_logging=BlobAnalyticsLogging(), hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), @@ -365,7 +365,7 @@ async def _test_set_logging_async(self): logging = BlobAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act - await self.bsc.set_service_properties(logging=logging) + await self.bsc.set_service_properties(analytics_logging=logging) # Assert received_props = await self.bsc.get_service_properties() diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties.test_queue_service_properties.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties.test_queue_service_properties.yaml index 0f4acb2d05f4..8714f48f1bd6 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties.test_queue_service_properties.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties.test_queue_service_properties.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-queue/12.0.0b2 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-queue/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 06 Sep 2019 22:00:50 GMT + - Wed, 16 Oct 2019 16:45:37 GMT x-ms-version: - '2018-03-28' method: PUT @@ -30,7 +30,7 @@ interactions: content-length: - '0' date: - - Fri, 06 Sep 2019 22:00:49 GMT + - Wed, 16 Oct 2019 16:45:38 GMT server: - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: @@ -48,11 +48,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-queue/12.0.0b2 Python/3.7.3 (Windows-10-10.0.17763-SP0) - content-type: - - application/xml; charset=utf-8 + - azsdk-python-storage-queue/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 06 Sep 2019 22:00:52 GMT + - Wed, 16 Oct 2019 16:45:38 GMT x-ms-version: - '2018-03-28' method: GET @@ -67,7 +65,7 @@ interactions: content-type: - application/xml date: - - Fri, 06 Sep 2019 22:00:50 GMT + - Wed, 16 Oct 2019 16:45:38 GMT server: - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties.test_set_logging.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties.test_set_logging.yaml index 19b36fab7f6c..36da6f47eb92 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties.test_set_logging.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties.test_set_logging.yaml @@ -15,9 +15,9 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-queue/12.0.0b2 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-queue/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 06 Sep 2019 22:01:00 GMT + - Wed, 16 Oct 2019 16:38:05 GMT x-ms-version: - '2018-03-28' method: PUT @@ -29,7 +29,7 @@ interactions: content-length: - '0' date: - - Fri, 06 Sep 2019 22:01:05 GMT + - Wed, 16 Oct 2019 16:38:05 GMT server: - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: @@ -47,11 +47,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-queue/12.0.0b2 Python/3.7.3 (Windows-10-10.0.17763-SP0) - content-type: - - application/xml; charset=utf-8 + - azsdk-python-storage-queue/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 06 Sep 2019 22:01:07 GMT + - Wed, 16 Oct 2019 16:38:05 GMT x-ms-version: - '2018-03-28' method: GET @@ -66,7 +64,7 @@ interactions: content-type: - application/xml date: - - Fri, 06 Sep 2019 22:01:05 GMT + - Wed, 16 Oct 2019 16:38:05 GMT server: - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties_async.test_queue_service_properties.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties_async.test_queue_service_properties.yaml index 560bb38e19a5..8c237eef9399 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties_async.test_queue_service_properties.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties_async.test_queue_service_properties.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-queue/12.0.0b2 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-queue/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 06 Sep 2019 22:01:07 GMT + - Wed, 16 Oct 2019 16:47:37 GMT x-ms-version: - '2018-03-28' method: PUT @@ -22,7 +22,7 @@ interactions: string: '' headers: content-length: '0' - date: Fri, 06 Sep 2019 22:01:05 GMT + date: Wed, 16 Oct 2019 16:47:37 GMT server: Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: '2018-03-28' status: @@ -42,11 +42,9 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-queue/12.0.0b2 Python/3.7.3 (Windows-10-10.0.17763-SP0) - content-type: - - application/xml; charset=utf-8 + - azsdk-python-storage-queue/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 06 Sep 2019 22:01:07 GMT + - Wed, 16 Oct 2019 16:47:37 GMT x-ms-version: - '2018-03-28' method: GET @@ -58,7 +56,7 @@ interactions: headers: cache-control: no-cache content-type: application/xml - date: Fri, 06 Sep 2019 22:01:05 GMT + date: Wed, 16 Oct 2019 16:47:37 GMT server: Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-ms-version: '2018-03-28' diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties_async.test_set_logging.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties_async.test_set_logging.yaml index 2f244d896b33..50a88c430296 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties_async.test_set_logging.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_properties_async.test_set_logging.yaml @@ -9,9 +9,9 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-queue/12.0.0b2 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-queue/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 06 Sep 2019 22:01:30 GMT + - Wed, 16 Oct 2019 16:48:30 GMT x-ms-version: - '2018-03-28' method: PUT @@ -21,7 +21,7 @@ interactions: string: '' headers: content-length: '0' - date: Fri, 06 Sep 2019 22:01:28 GMT + date: Wed, 16 Oct 2019 16:48:30 GMT server: Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: '2018-03-28' status: @@ -41,11 +41,9 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-queue/12.0.0b2 Python/3.7.3 (Windows-10-10.0.17763-SP0) - content-type: - - application/xml; charset=utf-8 + - azsdk-python-storage-queue/12.0.0b4 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 06 Sep 2019 22:01:30 GMT + - Wed, 16 Oct 2019 16:48:30 GMT x-ms-version: - '2018-03-28' method: GET @@ -57,7 +55,7 @@ interactions: headers: cache-control: no-cache content-type: application/xml - date: Fri, 06 Sep 2019 22:01:28 GMT + date: Wed, 16 Oct 2019 16:48:30 GMT server: Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-ms-version: '2018-03-28' diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py index 654691034c59..a0b06baceb3a 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py @@ -113,7 +113,7 @@ def test_queue_service_properties(self, resource_group, location, storage_accoun qsc = QueueServiceClient(self._account_url(storage_account.name), storage_account_key) # Act resp = qsc.set_service_properties( - logging=QueueAnalyticsLogging(), + analytics_logging=QueueAnalyticsLogging(), hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list()) @@ -133,7 +133,7 @@ def test_set_logging(self, resource_group, location, storage_account, storage_ac logging = QueueAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act - qsc.set_service_properties(logging=logging) + qsc.set_service_properties(analytics_logging=logging) # Assert received_props = qsc.get_service_properties() diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties_async.py b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties_async.py index 8e2a65ecc077..9581ac77089e 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties_async.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties_async.py @@ -125,7 +125,7 @@ async def test_queue_service_properties(self, resource_group, location, storage_ # Act resp = await qsc.set_service_properties( - logging=QueueAnalyticsLogging(), + analytics_logging=QueueAnalyticsLogging(), hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list()) @@ -145,7 +145,7 @@ async def test_set_logging(self, resource_group, location, storage_account, stor logging = QueueAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act - await qsc.set_service_properties(logging=logging) + await qsc.set_service_properties(analytics_logging=logging) # Assert received_props = await qsc.get_service_properties()