Skip to content

Commit

Permalink
update advisor (Azure#23425)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wzb123456789 authored Mar 10, 2022
1 parent 1757880 commit 4001cb5
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 119 deletions.
6 changes: 5 additions & 1 deletion sdk/advisor/azure-mgmt-advisor/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from dotenv import load_dotenv

from devtools_testutils import test_proxy, add_general_regex_sanitizer
from devtools_testutils import add_header_regex_sanitizer, add_body_key_sanitizer

# Ignore async tests for Python < 3.5
collect_ignore_glob = []
Expand All @@ -44,4 +45,7 @@ def add_sanitizers(test_proxy):
subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000")
tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=subscription_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000")
add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]")
add_header_regex_sanitizer(key="Cookie", value="cookie;")
add_body_key_sanitizer(json_path="$..access_token", value="access_token")
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.8.8 (Windows-10-10.0.19041-SP0)"
"User-Agent": "azsdk-python-identity/1.9.0b2 Python/3.6.2 (Windows-10-10.0.19041-SP0)"
},
"RequestBody": null,
"StatusCode": 200,
Expand All @@ -17,18 +17,13 @@
"Cache-Control": "max-age=86400, private",
"Content-Length": "1753",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:34 GMT",
"Date": "Wed, 09 Mar 2022 03:52:46 GMT",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Set-Cookie": [
"fpc=AsDCUFcFnsBBiiNJjhB8iQc; expires=Sat, 08-Jan-2022 05:38:34 GMT; path=/; secure; HttpOnly; SameSite=None",
"esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr86o01hgs-negCJu-h9gg0IERYW4rC_GHw0aWVNcGET9VmE5lu0-7E6zvqHt3nBODTxzsxD2X8WodEKzpRMcE__bByohLvCviGOZLDWCDzTQAhECofNfKbfEqSKwnQy90rYqhl8v2SaGmDt5vi9zqNk67S-gNV_ro5KEzzxaf5CAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None",
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
],
"Set-Cookie": "[set-cookie;]",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-ests-server": "2.1.12249.17 - NCUS ProdSlices",
"x-ms-request-id": "80ac9510-4e7f-497c-bc23-15c471070700"
"x-ms-ests-server": "2.1.12529.17 - EUS ProdSlices",
"x-ms-request-id": "a2f48ac4-d5e2-4a09-878c-d47d73ddf600"
},
"ResponseBody": {
"token_endpoint": "https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token",
Expand Down Expand Up @@ -105,8 +100,8 @@
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"Cookie": "fpc=AsDCUFcFnsBBiiNJjhB8iQc; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.8.8 (Windows-10-10.0.19041-SP0)"
"Cookie": "cookie;",
"User-Agent": "azsdk-python-identity/1.9.0b2 Python/3.6.2 (Windows-10-10.0.19041-SP0)"
},
"RequestBody": null,
"StatusCode": 200,
Expand All @@ -116,17 +111,13 @@
"Cache-Control": "max-age=86400, private",
"Content-Length": "945",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:34 GMT",
"Date": "Wed, 09 Mar 2022 03:52:46 GMT",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Set-Cookie": [
"fpc=AsDCUFcFnsBBiiNJjhB8iQc; expires=Sat, 08-Jan-2022 05:38:35 GMT; path=/; secure; HttpOnly; SameSite=None",
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
],
"Set-Cookie": "[set-cookie;]",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-ests-server": "2.1.12261.14 - KRSLR2 ProdSlices",
"x-ms-request-id": "9e4deb1d-59f9-4f91-a0fa-cb1e5e300200"
"x-ms-ests-server": "2.1.12529.17 - KRSLR2 ProdSlices",
"x-ms-request-id": "32b1d289-f88d-41d9-aae8-cf858c0a6f00"
},
"ResponseBody": {
"tenant_discovery_endpoint": "https://login.microsoftonline.com/common/.well-known/openid-configuration",
Expand Down Expand Up @@ -181,47 +172,43 @@
"RequestHeaders": {
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"client-request-id": "7fa3431e-4aef-405b-afac-0864733df3fa",
"client-request-id": "3a6baf3e-7b36-400e-a669-d95b4dce5e0b",
"Connection": "keep-alive",
"Content-Length": "289",
"Content-Length": "291",
"Content-Type": "application/x-www-form-urlencoded",
"Cookie": "fpc=AsDCUFcFnsBBiiNJjhB8iQc; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"Cookie": "cookie;",
"User-Agent": "azsdk-python-identity/1.9.0b2 Python/3.6.2 (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": "win32",
"x-client-sku": "MSAL.Python",
"x-client-ver": "1.16.0",
"x-client-ver": "1.17.0",
"x-ms-lib-capability": "retry-after, h429"
},
"RequestBody": "client_id=a2df54d5-ab03-4725-9b80-9a00b3b1967f\u0026grant_type=client_credentials\u0026client_info=1\u0026client_secret=0vj7Q~IsFayrD0V_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",
"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": "7fa3431e-4aef-405b-afac-0864733df3fa",
"Content-Length": "1391",
"client-request-id": "3a6baf3e-7b36-400e-a669-d95b4dce5e0b",
"Content-Length": "93",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:35 GMT",
"Date": "Wed, 09 Mar 2022 03:52:46 GMT",
"Expires": "-1",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Pragma": "no-cache",
"Set-Cookie": [
"fpc=AsDCUFcFnsBBiiNJjhB8iQeZHqKEAQAAAFuNQ9kOAAAA; expires=Sat, 08-Jan-2022 05:38:35 GMT; path=/; secure; HttpOnly; SameSite=None",
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
],
"Set-Cookie": "[set-cookie;]",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-clitelem": "1,0,0,,",
"x-ms-ests-server": "2.1.12249.17 - EUS ProdSlices",
"x-ms-request-id": "c115232d-270f-41e6-bf50-82b0ae060700"
"x-ms-ests-server": "2.1.12529.17 - EUS ProdSlices",
"x-ms-request-id": "a2f48ac4-d5e2-4a09-878c-d47d82ddf600"
},
"ResponseBody": {
"token_type": "Bearer",
"expires_in": 3599,
"ext_expires_in": 3599,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Imwzc1EtNTBjQ0g0eEJWWkxIVEd3blNSNzY4MCIsImtpZCI6Imwzc1EtNTBjQ0g0eEJWWkxIVEd3blNSNzY4MCJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuYXp1cmUuY29tIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvNTQ4MjZiMjItMzhkNi00ZmIyLWJhZDktYjdiOTNhM2U5YzVhLyIsImlhdCI6MTYzOTAyODAxNSwibmJmIjoxNjM5MDI4MDE1LCJleHAiOjE2MzkwMzE5MTUsImFpbyI6IkUyWmdZR0FMV2xIem1sbTY5OXdOQTBYclBadjhBQT09IiwiYXBwaWQiOiJhMmRmNTRkNS1hYjAzLTQ3MjUtOWI4MC05YTAwYjNiMTk2N2YiLCJhcHBpZGFjciI6IjEiLCJpZHAiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC81NDgyNmIyMi0zOGQ2LTRmYjItYmFkOS1iN2I5M2EzZTljNWEvIiwiaWR0eXAiOiJhcHAiLCJvaWQiOiI4ODdjNDJiMS03OTQ2LTRjMjItYmFhNi0xNTA0M2U0YjEzMjMiLCJyaCI6IjAuQVRjQUltdUNWTlk0c2stNjJiZTVPajZjV3RWVTM2SURxeVZIbTRDYUFMT3hsbjgzQUFBLiIsInN1YiI6Ijg4N2M0MmIxLTc5NDYtNGMyMi1iYWE2LTE1MDQzZTRiMTMyMyIsInRpZCI6IjU0ODI2YjIyLTM4ZDYtNGZiMi1iYWQ5LWI3YjkzYTNlOWM1YSIsInV0aSI6IkxTTVZ3UThuNWtHX1VJS3dyZ1lIQUEiLCJ2ZXIiOiIxLjAiLCJ4bXNfY2MiOlsiQ1AxIl0sInhtc190Y2R0IjoxNDEyMjA2ODQwfQ.OhFiptlKIo3vKEos1xz90MZKchpmokZKxUBtGpBnZ7NdxG9UQbu84F3IC6ftb6M_neAhK-a3lQWu2ibZY1RaHe-953ts4ePfq49fWVARJ7Hc3O4FJQJrLI94sWVq4JyxfN5uPfvAcEyLvGsu-qQWZR3Pd1eaQZoySmzqPNUyq0kQ17z-gVf0PmidcvtFZXvG9ppfL8P5Pu80D_oZCTHD07XTT_dWCvlZXRoMtm3uumMaYF7kPzpkcavMzRwnqkkBzyZMOPSYLMzI93jspqCJZ0HeRpjDeYyJo2ayAOZ09bqaM9LaY3WBw_Om8wibddulKFzLqEogdaQjErdVGVyzGA"
"access_token": "access_token"
}
},
{
Expand All @@ -234,27 +221,31 @@
"Connection": "keep-alive",
"Content-Length": "33",
"Content-Type": "application/json",
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "3f8ca5ad-58b2-11ec-837d-70b5e82527ff"
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "61806742-9f5c-11ec-87c3-c0b6f9946f2d"
},
"RequestBody": {
"properties": {
"exclude": true
}
},
"RequestBody": "{\u0022properties\u0022: {\u0022exclude\u0022: true}}",
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-cache",
"Content-Encoding": "gzip",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:37 GMT",
"Date": "Wed, 09 Mar 2022 03:52:47 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Server": "Microsoft-HTTPAPI/2.0",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "2cd100b6-2607-4893-9897-91f20beb0cef",
"x-ms-ratelimit-remaining-subscription-resource-requests": "199",
"x-ms-request-id": "3f8ca5ad-58b2-11ec-837d-70b5e82527ff",
"x-ms-routing-request-id": "JAPANEAST:20211209T053837Z:2cd100b6-2607-4893-9897-91f20beb0cef"
"x-ms-correlation-request-id": "a2c47c28-d3b4-430a-ada0-0898ea18afba",
"x-ms-ratelimit-remaining-subscription-resource-requests": "197",
"x-ms-request-id": "61806742-9f5c-11ec-87c3-c0b6f9946f2d",
"x-ms-routing-request-id": "KOREASOUTH:20220309T035247Z:a2c47c28-d3b4-430a-ada0-0898ea18afba"
},
"ResponseBody": {
"properties": {
Expand All @@ -273,27 +264,27 @@
"Accept-Encoding": "gzip, deflate",
"Authorization": "Sanitized",
"Connection": "keep-alive",
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "41d3a224-58b2-11ec-bdf8-70b5e82527ff"
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "6231fbe4-9f5c-11ec-b076-c0b6f9946f2d"
},
"RequestBody": null,
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-cache",
"Content-Encoding": "gzip",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:37 GMT",
"Date": "Wed, 09 Mar 2022 03:52:47 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Server": "Microsoft-HTTPAPI/2.0",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "99c0ddc2-6519-4c87-aba3-47d19b806c49",
"x-ms-ratelimit-remaining-subscription-resource-requests": "599",
"x-ms-request-id": "41d3a224-58b2-11ec-bdf8-70b5e82527ff",
"x-ms-routing-request-id": "JAPANEAST:20211209T053837Z:99c0ddc2-6519-4c87-aba3-47d19b806c49"
"x-ms-correlation-request-id": "8f93a534-52c2-4f43-8dae-d6185a6492d4",
"x-ms-ratelimit-remaining-subscription-resource-requests": "597",
"x-ms-request-id": "6231fbe4-9f5c-11ec-b076-c0b6f9946f2d",
"x-ms-routing-request-id": "KOREASOUTH:20220309T035247Z:8f93a534-52c2-4f43-8dae-d6185a6492d4"
},
"ResponseBody": {
"value": [
Expand All @@ -318,27 +309,31 @@
"Connection": "keep-alive",
"Content-Length": "34",
"Content-Type": "application/json",
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "41f7e188-58b2-11ec-871b-70b5e82527ff"
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "6247659a-9f5c-11ec-a3b6-c0b6f9946f2d"
},
"RequestBody": {
"properties": {
"exclude": false
}
},
"RequestBody": "{\u0022properties\u0022: {\u0022exclude\u0022: false}}",
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-cache",
"Content-Encoding": "gzip",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:37 GMT",
"Date": "Wed, 09 Mar 2022 03:52:47 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Server": "Microsoft-HTTPAPI/2.0",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "f1e2348a-9509-4d01-b2e3-68d3ad2bfee8",
"x-ms-ratelimit-remaining-subscription-resource-requests": "198",
"x-ms-request-id": "41f7e188-58b2-11ec-871b-70b5e82527ff",
"x-ms-routing-request-id": "JAPANEAST:20211209T053837Z:f1e2348a-9509-4d01-b2e3-68d3ad2bfee8"
"x-ms-correlation-request-id": "de2b4544-7e60-4d61-be96-6eba67fbd91e",
"x-ms-ratelimit-remaining-subscription-resource-requests": "196",
"x-ms-request-id": "6247659a-9f5c-11ec-a3b6-c0b6f9946f2d",
"x-ms-routing-request-id": "KOREASOUTH:20220309T035247Z:de2b4544-7e60-4d61-be96-6eba67fbd91e"
},
"ResponseBody": {
"properties": {
Expand All @@ -357,27 +352,27 @@
"Accept-Encoding": "gzip, deflate",
"Authorization": "Sanitized",
"Connection": "keep-alive",
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "4236590c-58b2-11ec-8f59-70b5e82527ff"
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "627b6ab6-9f5c-11ec-a4ad-c0b6f9946f2d"
},
"RequestBody": null,
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-cache",
"Content-Encoding": "gzip",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:38 GMT",
"Date": "Wed, 09 Mar 2022 03:52:47 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Server": "Microsoft-HTTPAPI/2.0",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "a6e1c244-4ab2-4f69-ae1b-386d1ce5e4db",
"x-ms-ratelimit-remaining-subscription-resource-requests": "598",
"x-ms-request-id": "4236590c-58b2-11ec-8f59-70b5e82527ff",
"x-ms-routing-request-id": "JAPANEAST:20211209T053838Z:a6e1c244-4ab2-4f69-ae1b-386d1ce5e4db"
"x-ms-correlation-request-id": "53afcd86-e5a8-41cd-8639-938035323cd8",
"x-ms-ratelimit-remaining-subscription-resource-requests": "596",
"x-ms-request-id": "627b6ab6-9f5c-11ec-a4ad-c0b6f9946f2d",
"x-ms-routing-request-id": "KOREASOUTH:20220309T035248Z:53afcd86-e5a8-41cd-8639-938035323cd8"
},
"ResponseBody": {
"value": [
Expand Down
Loading

0 comments on commit 4001cb5

Please sign in to comment.