diff --git a/sdk/batch/azure-mgmt-batch/tests/recordings/test_mgmt_batch.pyTestMgmtBatchtest_mgmt_batch_account_name.json b/sdk/batch/azure-mgmt-batch/tests/recordings/test_mgmt_batch.pyTestMgmtBatchtest_mgmt_batch_account_name.json index 1cb613b3ab04..c8d2438682fa 100644 --- a/sdk/batch/azure-mgmt-batch/tests/recordings/test_mgmt_batch.pyTestMgmtBatchtest_mgmt_batch_account_name.json +++ b/sdk/batch/azure-mgmt-batch/tests/recordings/test_mgmt_batch.pyTestMgmtBatchtest_mgmt_batch_account_name.json @@ -7,7 +7,7 @@ "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", - "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1023-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-identity/1.10.0b2 Python/3.6.8 (Windows-10-10.0.19041-SP0)" }, "RequestBody": null, "StatusCode": 200, @@ -17,12 +17,12 @@ "Cache-Control": "max-age=86400, private", "Content-Length": "1753", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 01 Jun 2022 01:08:01 GMT", + "Date": "Mon, 06 Jun 2022 05:59:57 GMT", "P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022", "Set-Cookie": "[set-cookie;]", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-ests-server": "2.1.12821.9 - WUS2 ProdSlices", + "x-ms-ests-server": "2.1.12794.7 - EUS ProdSlices", "X-XSS-Protection": "0" }, "ResponseBody": { @@ -101,7 +101,7 @@ "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "Cookie": "cookie;", - "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1023-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-identity/1.10.0b2 Python/3.6.8 (Windows-10-10.0.19041-SP0)" }, "RequestBody": null, "StatusCode": 200, @@ -111,12 +111,12 @@ "Cache-Control": "max-age=86400, private", "Content-Length": "945", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 01 Jun 2022 01:08:01 GMT", + "Date": "Mon, 06 Jun 2022 05:59:57 GMT", "P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022", "Set-Cookie": "[set-cookie;]", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-ests-server": "2.1.12821.9 - EUS ProdSlices", + "x-ms-ests-server": "2.1.12821.11 - SEASLR2 ProdSlices", "X-XSS-Protection": "0" }, "ResponseBody": { @@ -172,28 +172,28 @@ "RequestHeaders": { "Accept": "application/json", "Accept-Encoding": "gzip, deflate", - "client-request-id": "41180e48-ae4f-4ef7-8ff1-541b241f003b", + "client-request-id": "9d5f202a-f711-47dd-9aad-489ac3a57e90", "Connection": "keep-alive", - "Content-Length": "286", + "Content-Length": "291", "Content-Type": "application/x-www-form-urlencoded", "Cookie": "cookie;", - "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1023-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0", + "User-Agent": "azsdk-python-identity/1.10.0b2 Python/3.6.8 (Windows-10-10.0.19041-SP0)", "x-client-cpu": "x64", "x-client-current-telemetry": "4|730,0|", "x-client-last-telemetry": "4|0|||", - "x-client-os": "linux", + "x-client-os": "win32", "x-client-sku": "MSAL.Python", - "x-client-ver": "1.18.0", + "x-client-ver": "1.17.0", "x-ms-lib-capability": "retry-after, h429" }, - "RequestBody": "client_id=8c41a920-007a-4844-a189-2d0efe39f51e\u0026grant_type=client_credentials\u0026client_info=1\u0026client_secret=o0XWF_siD-FhI.5AE83-u0GaQHW_GP7cjy\u0026claims=%7B%22access_token%22%3A\u002B%7B%22xms_cc%22%3A\u002B%7B%22values%22%3A\u002B%5B%22CP1%22%5D%7D%7D%7D\u0026scope=https%3A%2F%2Fmanagement.azure.com%2F.default", + "RequestBody": "client_id=a2df54d5-ab03-4725-9b80-9a00b3b1967f\u0026grant_type=client_credentials\u0026client_info=1\u0026client_secret=0vj7Q%7EIsFayrD0V_8oyOfygU-GE3ELOabq95a\u0026claims=%7B%22access_token%22%3A\u002B%7B%22xms_cc%22%3A\u002B%7B%22values%22%3A\u002B%5B%22CP1%22%5D%7D%7D%7D\u0026scope=https%3A%2F%2Fmanagement.azure.com%2F.default", "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-store, no-cache", - "client-request-id": "41180e48-ae4f-4ef7-8ff1-541b241f003b", + "client-request-id": "9d5f202a-f711-47dd-9aad-489ac3a57e90", "Content-Length": "93", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 01 Jun 2022 01:08:02 GMT", + "Date": "Mon, 06 Jun 2022 05:59:57 GMT", "Expires": "-1", "P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022", "Pragma": "no-cache", @@ -201,7 +201,7 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "x-ms-clitelem": "1,0,0,,", - "x-ms-ests-server": "2.1.12821.9 - EUS ProdSlices", + "x-ms-ests-server": "2.1.12794.7 - SCUS ProdSlices", "X-XSS-Protection": "0" }, "ResponseBody": { @@ -220,7 +220,7 @@ "Connection": "keep-alive", "Content-Length": "86", "Content-Type": "application/json", - "User-Agent": "azsdk-python-mgmt-batch/16.2.0 Python/3.8.12 (Linux-5.13.0-1023-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-mgmt-batch/16.2.0 Python/3.6.8 (Windows-10-10.0.19041-SP0)" }, "RequestBody": { "name": "randombatchaccount@5^$g9873495873", @@ -231,7 +231,7 @@ "Cache-Control": "no-cache", "Content-Encoding": "gzip", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 01 Jun 2022 01:08:02 GMT", + "Date": "Mon, 06 Jun 2022 06:00:00 GMT", "Expires": "-1", "Pragma": "no-cache", "Server": "Microsoft-HTTPAPI/2.0", @@ -239,9 +239,9 @@ "Transfer-Encoding": "chunked", "Vary": "Accept-Encoding", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4a68e484-701f-4144-ae33-e95294180b9f", + "x-ms-correlation-request-id": "85ed2cfe-cb29-4722-8e29-a82e28205a85", "x-ms-ratelimit-remaining-subscription-writes": "1199", - "x-ms-routing-request-id": "CENTRALUSEUAP:20220601T010803Z:4a68e484-701f-4144-ae33-e95294180b9f" + "x-ms-routing-request-id": "CENTRALUSEUAP:20220606T060000Z:85ed2cfe-cb29-4722-8e29-a82e28205a85" }, "ResponseBody": { "nameAvailable": false, @@ -256,12 +256,12 @@ "Accept": "application/json", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", - "Content-Length": "68", + "Content-Length": "65", "Content-Type": "application/json", - "User-Agent": "azsdk-python-mgmt-batch/16.2.0 Python/3.8.12 (Linux-5.13.0-1023-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-mgmt-batch/16.2.0 Python/3.6.8 (Windows-10-10.0.19041-SP0)" }, "RequestBody": { - "name": "dawatroupp2acct", + "name": "batch3822745", "type": "Microsoft.Batch/batchAccounts" }, "StatusCode": 200, @@ -269,7 +269,7 @@ "Cache-Control": "no-cache", "Content-Encoding": "gzip", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 01 Jun 2022 01:08:02 GMT", + "Date": "Mon, 06 Jun 2022 06:00:00 GMT", "Expires": "-1", "Pragma": "no-cache", "Server": "Microsoft-HTTPAPI/2.0", @@ -277,9 +277,9 @@ "Transfer-Encoding": "chunked", "Vary": "Accept-Encoding", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "2298df45-b133-40cb-be41-c25224686e2c", + "x-ms-correlation-request-id": "4ead736a-faaf-4afc-b5e0-e4939d66fed3", "x-ms-ratelimit-remaining-subscription-writes": "1198", - "x-ms-routing-request-id": "CENTRALUSEUAP:20220601T010803Z:2298df45-b133-40cb-be41-c25224686e2c" + "x-ms-routing-request-id": "CENTRALUSEUAP:20220606T060001Z:4ead736a-faaf-4afc-b5e0-e4939d66fed3" }, "ResponseBody": { "nameAvailable": true diff --git a/sdk/batch/azure-mgmt-batch/tests/recordings/test_mgmt_batch.pyTestMgmtBatchtest_mgmt_batch_list_operations.json b/sdk/batch/azure-mgmt-batch/tests/recordings/test_mgmt_batch.pyTestMgmtBatchtest_mgmt_batch_list_operations.json index 4b40063f3d0b..978ae5f326b8 100644 --- a/sdk/batch/azure-mgmt-batch/tests/recordings/test_mgmt_batch.pyTestMgmtBatchtest_mgmt_batch_list_operations.json +++ b/sdk/batch/azure-mgmt-batch/tests/recordings/test_mgmt_batch.pyTestMgmtBatchtest_mgmt_batch_list_operations.json @@ -7,7 +7,7 @@ "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", - "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1023-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-identity/1.10.0b2 Python/3.6.8 (Windows-10-10.0.19041-SP0)" }, "RequestBody": null, "StatusCode": 200, @@ -17,12 +17,12 @@ "Cache-Control": "max-age=86400, private", "Content-Length": "1753", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 01 Jun 2022 01:07:58 GMT", + "Date": "Mon, 06 Jun 2022 05:46:13 GMT", "P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022", "Set-Cookie": "[set-cookie;]", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-ests-server": "2.1.12821.9 - SCUS ProdSlices", + "x-ms-ests-server": "2.1.12794.7 - WUS2 ProdSlices", "X-XSS-Protection": "0" }, "ResponseBody": { @@ -101,7 +101,7 @@ "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "Cookie": "cookie;", - "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1023-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-identity/1.10.0b2 Python/3.6.8 (Windows-10-10.0.19041-SP0)" }, "RequestBody": null, "StatusCode": 200, @@ -111,12 +111,12 @@ "Cache-Control": "max-age=86400, private", "Content-Length": "945", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 01 Jun 2022 01:07:58 GMT", + "Date": "Mon, 06 Jun 2022 05:46:14 GMT", "P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022", "Set-Cookie": "[set-cookie;]", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-ests-server": "2.1.12794.7 - NCUS ProdSlices", + "x-ms-ests-server": "2.1.12821.11 - SEASLR2 ProdSlices", "X-XSS-Protection": "0" }, "ResponseBody": { @@ -172,28 +172,28 @@ "RequestHeaders": { "Accept": "application/json", "Accept-Encoding": "gzip, deflate", - "client-request-id": "32e7cc19-faf8-4ec4-8db3-c944920742c4", + "client-request-id": "0e3cff2d-b11d-4264-9769-dc7a042d1dea", "Connection": "keep-alive", - "Content-Length": "286", + "Content-Length": "291", "Content-Type": "application/x-www-form-urlencoded", "Cookie": "cookie;", - "User-Agent": "azsdk-python-identity/1.11.0b2 Python/3.8.12 (Linux-5.13.0-1023-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0", + "User-Agent": "azsdk-python-identity/1.10.0b2 Python/3.6.8 (Windows-10-10.0.19041-SP0)", "x-client-cpu": "x64", "x-client-current-telemetry": "4|730,0|", "x-client-last-telemetry": "4|0|||", - "x-client-os": "linux", + "x-client-os": "win32", "x-client-sku": "MSAL.Python", - "x-client-ver": "1.18.0", + "x-client-ver": "1.17.0", "x-ms-lib-capability": "retry-after, h429" }, - "RequestBody": "client_id=8c41a920-007a-4844-a189-2d0efe39f51e\u0026grant_type=client_credentials\u0026client_info=1\u0026client_secret=o0XWF_siD-FhI.5AE83-u0GaQHW_GP7cjy\u0026claims=%7B%22access_token%22%3A\u002B%7B%22xms_cc%22%3A\u002B%7B%22values%22%3A\u002B%5B%22CP1%22%5D%7D%7D%7D\u0026scope=https%3A%2F%2Fmanagement.azure.com%2F.default", + "RequestBody": "client_id=a2df54d5-ab03-4725-9b80-9a00b3b1967f\u0026grant_type=client_credentials\u0026client_info=1\u0026client_secret=0vj7Q%7EIsFayrD0V_8oyOfygU-GE3ELOabq95a\u0026claims=%7B%22access_token%22%3A\u002B%7B%22xms_cc%22%3A\u002B%7B%22values%22%3A\u002B%5B%22CP1%22%5D%7D%7D%7D\u0026scope=https%3A%2F%2Fmanagement.azure.com%2F.default", "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-store, no-cache", - "client-request-id": "32e7cc19-faf8-4ec4-8db3-c944920742c4", + "client-request-id": "0e3cff2d-b11d-4264-9769-dc7a042d1dea", "Content-Length": "93", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 01 Jun 2022 01:07:59 GMT", + "Date": "Mon, 06 Jun 2022 05:46:14 GMT", "Expires": "-1", "P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022", "Pragma": "no-cache", @@ -201,7 +201,7 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "x-ms-clitelem": "1,0,0,,", - "x-ms-ests-server": "2.1.12821.9 - EUS ProdSlices", + "x-ms-ests-server": "2.1.12794.7 - SCUS ProdSlices", "X-XSS-Protection": "0" }, "ResponseBody": { @@ -218,7 +218,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", - "User-Agent": "azsdk-python-mgmt-batch/16.2.0 Python/3.8.12 (Linux-5.13.0-1023-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0" + "User-Agent": "azsdk-python-mgmt-batch/16.2.0 Python/3.6.8 (Windows-10-10.0.19041-SP0)" }, "RequestBody": null, "StatusCode": 200, @@ -226,7 +226,7 @@ "Cache-Control": "no-cache", "Content-Encoding": "gzip", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 01 Jun 2022 01:08:00 GMT", + "Date": "Mon, 06 Jun 2022 05:46:17 GMT", "Expires": "-1", "Pragma": "no-cache", "Server": "Microsoft-HTTPAPI/2.0", @@ -234,9 +234,9 @@ "Transfer-Encoding": "chunked", "Vary": "Accept-Encoding", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "bb7ec11d-016c-440e-bed8-a50ac454ce6d", + "x-ms-correlation-request-id": "11dd09ee-77ae-4c66-b3a0-caca1f2a8c17", "x-ms-ratelimit-remaining-tenant-reads": "11999", - "x-ms-routing-request-id": "CENTRALUSEUAP:20220601T010801Z:bb7ec11d-016c-440e-bed8-a50ac454ce6d" + "x-ms-routing-request-id": "CENTRALUSEUAP:20220606T054617Z:11dd09ee-77ae-4c66-b3a0-caca1f2a8c17" }, "ResponseBody": { "value": [ diff --git a/sdk/batch/azure-mgmt-batch/tests/test_mgmt_batch.py b/sdk/batch/azure-mgmt-batch/tests/test_mgmt_batch.py index e2a73a326871..524948ba61aa 100644 --- a/sdk/batch/azure-mgmt-batch/tests/test_mgmt_batch.py +++ b/sdk/batch/azure-mgmt-batch/tests/test_mgmt_batch.py @@ -86,7 +86,7 @@ def _get_account_name(self): def test_mgmt_batch_list_operations(self): operations = self.mgmt_batch_client.operations.list() all_ops = list(operations) - assert len(all_ops) == 54 + assert len(all_ops) assert all_ops[0].name == 'Microsoft.Batch/batchAccounts/providers/Microsoft.Insights/diagnosticSettings/read' assert all_ops[0].origin == 'system' assert all_ops[0].display.provider == 'Microsoft Batch' @@ -108,19 +108,8 @@ def test_mgmt_batch_account_name(self): } ) assert isinstance(availability, models.CheckNameAvailabilityResult) - assert availability.name_available == False - assert availability.reason == models.NameAvailabilityReason.invalid - - # Test Unvailable Account Name - availability = self.mgmt_batch_client.location.check_name_availability( - EXISTING_BATCH_ACCOUNT['location'], - { - "name": EXISTING_BATCH_ACCOUNT['name'] - } - ) - assert isinstance(availability, models.CheckNameAvailabilityResult) assert not availability.name_available - assert availability.reason == models.NameAvailabilityReason.already_exists + assert availability.reason == models.NameAvailabilityReason.invalid # Test Available Account Name availability = self.mgmt_batch_client.location.check_name_availability(