Skip to content

Commit 4001cb5

Browse files
authored
update advisor (Azure#23425)
1 parent 1757880 commit 4001cb5

File tree

3 files changed

+106
-119
lines changed

3 files changed

+106
-119
lines changed

sdk/advisor/azure-mgmt-advisor/tests/conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from dotenv import load_dotenv
3232

3333
from devtools_testutils import test_proxy, add_general_regex_sanitizer
34+
from devtools_testutils import add_header_regex_sanitizer, add_body_key_sanitizer
3435

3536
# Ignore async tests for Python < 3.5
3637
collect_ignore_glob = []
@@ -44,4 +45,7 @@ def add_sanitizers(test_proxy):
4445
subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000")
4546
tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000")
4647
add_general_regex_sanitizer(regex=subscription_id, value="00000000-0000-0000-0000-000000000000")
47-
add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000")
48+
add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000")
49+
add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]")
50+
add_header_regex_sanitizer(key="Cookie", value="cookie;")
51+
add_body_key_sanitizer(json_path="$..access_token", value="access_token")

sdk/advisor/azure-mgmt-advisor/tests/recordings/test_mgmt_advisor.pyTestMgmtAdvisortest_configurations_resourcegroup.json

Lines changed: 62 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"Accept": "*/*",
88
"Accept-Encoding": "gzip, deflate",
99
"Connection": "keep-alive",
10-
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.8.8 (Windows-10-10.0.19041-SP0)"
10+
"User-Agent": "azsdk-python-identity/1.9.0b2 Python/3.6.2 (Windows-10-10.0.19041-SP0)"
1111
},
1212
"RequestBody": null,
1313
"StatusCode": 200,
@@ -17,18 +17,13 @@
1717
"Cache-Control": "max-age=86400, private",
1818
"Content-Length": "1753",
1919
"Content-Type": "application/json; charset=utf-8",
20-
"Date": "Thu, 09 Dec 2021 05:38:34 GMT",
20+
"Date": "Wed, 09 Mar 2022 03:52:46 GMT",
2121
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
22-
"Set-Cookie": [
23-
"fpc=AsDCUFcFnsBBiiNJjhB8iQc; expires=Sat, 08-Jan-2022 05:38:34 GMT; path=/; secure; HttpOnly; SameSite=None",
24-
"esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr86o01hgs-negCJu-h9gg0IERYW4rC_GHw0aWVNcGET9VmE5lu0-7E6zvqHt3nBODTxzsxD2X8WodEKzpRMcE__bByohLvCviGOZLDWCDzTQAhECofNfKbfEqSKwnQy90rYqhl8v2SaGmDt5vi9zqNk67S-gNV_ro5KEzzxaf5CAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None",
25-
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
26-
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
27-
],
22+
"Set-Cookie": "[set-cookie;]",
2823
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
2924
"X-Content-Type-Options": "nosniff",
30-
"x-ms-ests-server": "2.1.12249.17 - NCUS ProdSlices",
31-
"x-ms-request-id": "80ac9510-4e7f-497c-bc23-15c471070700"
25+
"x-ms-ests-server": "2.1.12529.17 - EUS ProdSlices",
26+
"x-ms-request-id": "a2f48ac4-d5e2-4a09-878c-d47d73ddf600"
3227
},
3328
"ResponseBody": {
3429
"token_endpoint": "https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token",
@@ -105,8 +100,8 @@
105100
"Accept": "application/json",
106101
"Accept-Encoding": "gzip, deflate",
107102
"Connection": "keep-alive",
108-
"Cookie": "fpc=AsDCUFcFnsBBiiNJjhB8iQc; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
109-
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.8.8 (Windows-10-10.0.19041-SP0)"
103+
"Cookie": "cookie;",
104+
"User-Agent": "azsdk-python-identity/1.9.0b2 Python/3.6.2 (Windows-10-10.0.19041-SP0)"
110105
},
111106
"RequestBody": null,
112107
"StatusCode": 200,
@@ -116,17 +111,13 @@
116111
"Cache-Control": "max-age=86400, private",
117112
"Content-Length": "945",
118113
"Content-Type": "application/json; charset=utf-8",
119-
"Date": "Thu, 09 Dec 2021 05:38:34 GMT",
114+
"Date": "Wed, 09 Mar 2022 03:52:46 GMT",
120115
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
121-
"Set-Cookie": [
122-
"fpc=AsDCUFcFnsBBiiNJjhB8iQc; expires=Sat, 08-Jan-2022 05:38:35 GMT; path=/; secure; HttpOnly; SameSite=None",
123-
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
124-
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
125-
],
116+
"Set-Cookie": "[set-cookie;]",
126117
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
127118
"X-Content-Type-Options": "nosniff",
128-
"x-ms-ests-server": "2.1.12261.14 - KRSLR2 ProdSlices",
129-
"x-ms-request-id": "9e4deb1d-59f9-4f91-a0fa-cb1e5e300200"
119+
"x-ms-ests-server": "2.1.12529.17 - KRSLR2 ProdSlices",
120+
"x-ms-request-id": "32b1d289-f88d-41d9-aae8-cf858c0a6f00"
130121
},
131122
"ResponseBody": {
132123
"tenant_discovery_endpoint": "https://login.microsoftonline.com/common/.well-known/openid-configuration",
@@ -181,47 +172,43 @@
181172
"RequestHeaders": {
182173
"Accept": "application/json",
183174
"Accept-Encoding": "gzip, deflate",
184-
"client-request-id": "7fa3431e-4aef-405b-afac-0864733df3fa",
175+
"client-request-id": "3a6baf3e-7b36-400e-a669-d95b4dce5e0b",
185176
"Connection": "keep-alive",
186-
"Content-Length": "289",
177+
"Content-Length": "291",
187178
"Content-Type": "application/x-www-form-urlencoded",
188-
"Cookie": "fpc=AsDCUFcFnsBBiiNJjhB8iQc; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
189-
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
179+
"Cookie": "cookie;",
180+
"User-Agent": "azsdk-python-identity/1.9.0b2 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
190181
"x-client-cpu": "x64",
191182
"x-client-current-telemetry": "4|730,0|",
192183
"x-client-last-telemetry": "4|0|||",
193184
"x-client-os": "win32",
194185
"x-client-sku": "MSAL.Python",
195-
"x-client-ver": "1.16.0",
186+
"x-client-ver": "1.17.0",
196187
"x-ms-lib-capability": "retry-after, h429"
197188
},
198-
"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",
189+
"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",
199190
"StatusCode": 200,
200191
"ResponseHeaders": {
201192
"Cache-Control": "no-store, no-cache",
202-
"client-request-id": "7fa3431e-4aef-405b-afac-0864733df3fa",
203-
"Content-Length": "1391",
193+
"client-request-id": "3a6baf3e-7b36-400e-a669-d95b4dce5e0b",
194+
"Content-Length": "93",
204195
"Content-Type": "application/json; charset=utf-8",
205-
"Date": "Thu, 09 Dec 2021 05:38:35 GMT",
196+
"Date": "Wed, 09 Mar 2022 03:52:46 GMT",
206197
"Expires": "-1",
207198
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
208199
"Pragma": "no-cache",
209-
"Set-Cookie": [
210-
"fpc=AsDCUFcFnsBBiiNJjhB8iQeZHqKEAQAAAFuNQ9kOAAAA; expires=Sat, 08-Jan-2022 05:38:35 GMT; path=/; secure; HttpOnly; SameSite=None",
211-
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
212-
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
213-
],
200+
"Set-Cookie": "[set-cookie;]",
214201
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
215202
"X-Content-Type-Options": "nosniff",
216203
"x-ms-clitelem": "1,0,0,,",
217-
"x-ms-ests-server": "2.1.12249.17 - EUS ProdSlices",
218-
"x-ms-request-id": "c115232d-270f-41e6-bf50-82b0ae060700"
204+
"x-ms-ests-server": "2.1.12529.17 - EUS ProdSlices",
205+
"x-ms-request-id": "a2f48ac4-d5e2-4a09-878c-d47d82ddf600"
219206
},
220207
"ResponseBody": {
221208
"token_type": "Bearer",
222209
"expires_in": 3599,
223210
"ext_expires_in": 3599,
224-
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Imwzc1EtNTBjQ0g0eEJWWkxIVEd3blNSNzY4MCIsImtpZCI6Imwzc1EtNTBjQ0g0eEJWWkxIVEd3blNSNzY4MCJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuYXp1cmUuY29tIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvNTQ4MjZiMjItMzhkNi00ZmIyLWJhZDktYjdiOTNhM2U5YzVhLyIsImlhdCI6MTYzOTAyODAxNSwibmJmIjoxNjM5MDI4MDE1LCJleHAiOjE2MzkwMzE5MTUsImFpbyI6IkUyWmdZR0FMV2xIem1sbTY5OXdOQTBYclBadjhBQT09IiwiYXBwaWQiOiJhMmRmNTRkNS1hYjAzLTQ3MjUtOWI4MC05YTAwYjNiMTk2N2YiLCJhcHBpZGFjciI6IjEiLCJpZHAiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC81NDgyNmIyMi0zOGQ2LTRmYjItYmFkOS1iN2I5M2EzZTljNWEvIiwiaWR0eXAiOiJhcHAiLCJvaWQiOiI4ODdjNDJiMS03OTQ2LTRjMjItYmFhNi0xNTA0M2U0YjEzMjMiLCJyaCI6IjAuQVRjQUltdUNWTlk0c2stNjJiZTVPajZjV3RWVTM2SURxeVZIbTRDYUFMT3hsbjgzQUFBLiIsInN1YiI6Ijg4N2M0MmIxLTc5NDYtNGMyMi1iYWE2LTE1MDQzZTRiMTMyMyIsInRpZCI6IjU0ODI2YjIyLTM4ZDYtNGZiMi1iYWQ5LWI3YjkzYTNlOWM1YSIsInV0aSI6IkxTTVZ3UThuNWtHX1VJS3dyZ1lIQUEiLCJ2ZXIiOiIxLjAiLCJ4bXNfY2MiOlsiQ1AxIl0sInhtc190Y2R0IjoxNDEyMjA2ODQwfQ.OhFiptlKIo3vKEos1xz90MZKchpmokZKxUBtGpBnZ7NdxG9UQbu84F3IC6ftb6M_neAhK-a3lQWu2ibZY1RaHe-953ts4ePfq49fWVARJ7Hc3O4FJQJrLI94sWVq4JyxfN5uPfvAcEyLvGsu-qQWZR3Pd1eaQZoySmzqPNUyq0kQ17z-gVf0PmidcvtFZXvG9ppfL8P5Pu80D_oZCTHD07XTT_dWCvlZXRoMtm3uumMaYF7kPzpkcavMzRwnqkkBzyZMOPSYLMzI93jspqCJZ0HeRpjDeYyJo2ayAOZ09bqaM9LaY3WBw_Om8wibddulKFzLqEogdaQjErdVGVyzGA"
211+
"access_token": "access_token"
225212
}
226213
},
227214
{
@@ -234,27 +221,31 @@
234221
"Connection": "keep-alive",
235222
"Content-Length": "33",
236223
"Content-Type": "application/json",
237-
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
238-
"x-ms-client-request-id": "3f8ca5ad-58b2-11ec-837d-70b5e82527ff"
224+
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
225+
"x-ms-client-request-id": "61806742-9f5c-11ec-87c3-c0b6f9946f2d"
226+
},
227+
"RequestBody": {
228+
"properties": {
229+
"exclude": true
230+
}
239231
},
240-
"RequestBody": "{\u0022properties\u0022: {\u0022exclude\u0022: true}}",
241232
"StatusCode": 200,
242233
"ResponseHeaders": {
243234
"Cache-Control": "no-cache",
244235
"Content-Encoding": "gzip",
245236
"Content-Type": "application/json; charset=utf-8",
246-
"Date": "Thu, 09 Dec 2021 05:38:37 GMT",
237+
"Date": "Wed, 09 Mar 2022 03:52:47 GMT",
247238
"Expires": "-1",
248239
"Pragma": "no-cache",
249240
"Server": "Microsoft-HTTPAPI/2.0",
250241
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
251242
"Transfer-Encoding": "chunked",
252243
"Vary": "Accept-Encoding",
253244
"X-Content-Type-Options": "nosniff",
254-
"x-ms-correlation-request-id": "2cd100b6-2607-4893-9897-91f20beb0cef",
255-
"x-ms-ratelimit-remaining-subscription-resource-requests": "199",
256-
"x-ms-request-id": "3f8ca5ad-58b2-11ec-837d-70b5e82527ff",
257-
"x-ms-routing-request-id": "JAPANEAST:20211209T053837Z:2cd100b6-2607-4893-9897-91f20beb0cef"
245+
"x-ms-correlation-request-id": "a2c47c28-d3b4-430a-ada0-0898ea18afba",
246+
"x-ms-ratelimit-remaining-subscription-resource-requests": "197",
247+
"x-ms-request-id": "61806742-9f5c-11ec-87c3-c0b6f9946f2d",
248+
"x-ms-routing-request-id": "KOREASOUTH:20220309T035247Z:a2c47c28-d3b4-430a-ada0-0898ea18afba"
258249
},
259250
"ResponseBody": {
260251
"properties": {
@@ -273,27 +264,27 @@
273264
"Accept-Encoding": "gzip, deflate",
274265
"Authorization": "Sanitized",
275266
"Connection": "keep-alive",
276-
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
277-
"x-ms-client-request-id": "41d3a224-58b2-11ec-bdf8-70b5e82527ff"
267+
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
268+
"x-ms-client-request-id": "6231fbe4-9f5c-11ec-b076-c0b6f9946f2d"
278269
},
279270
"RequestBody": null,
280271
"StatusCode": 200,
281272
"ResponseHeaders": {
282273
"Cache-Control": "no-cache",
283274
"Content-Encoding": "gzip",
284275
"Content-Type": "application/json; charset=utf-8",
285-
"Date": "Thu, 09 Dec 2021 05:38:37 GMT",
276+
"Date": "Wed, 09 Mar 2022 03:52:47 GMT",
286277
"Expires": "-1",
287278
"Pragma": "no-cache",
288279
"Server": "Microsoft-HTTPAPI/2.0",
289280
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
290281
"Transfer-Encoding": "chunked",
291282
"Vary": "Accept-Encoding",
292283
"X-Content-Type-Options": "nosniff",
293-
"x-ms-correlation-request-id": "99c0ddc2-6519-4c87-aba3-47d19b806c49",
294-
"x-ms-ratelimit-remaining-subscription-resource-requests": "599",
295-
"x-ms-request-id": "41d3a224-58b2-11ec-bdf8-70b5e82527ff",
296-
"x-ms-routing-request-id": "JAPANEAST:20211209T053837Z:99c0ddc2-6519-4c87-aba3-47d19b806c49"
284+
"x-ms-correlation-request-id": "8f93a534-52c2-4f43-8dae-d6185a6492d4",
285+
"x-ms-ratelimit-remaining-subscription-resource-requests": "597",
286+
"x-ms-request-id": "6231fbe4-9f5c-11ec-b076-c0b6f9946f2d",
287+
"x-ms-routing-request-id": "KOREASOUTH:20220309T035247Z:8f93a534-52c2-4f43-8dae-d6185a6492d4"
297288
},
298289
"ResponseBody": {
299290
"value": [
@@ -318,27 +309,31 @@
318309
"Connection": "keep-alive",
319310
"Content-Length": "34",
320311
"Content-Type": "application/json",
321-
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
322-
"x-ms-client-request-id": "41f7e188-58b2-11ec-871b-70b5e82527ff"
312+
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
313+
"x-ms-client-request-id": "6247659a-9f5c-11ec-a3b6-c0b6f9946f2d"
314+
},
315+
"RequestBody": {
316+
"properties": {
317+
"exclude": false
318+
}
323319
},
324-
"RequestBody": "{\u0022properties\u0022: {\u0022exclude\u0022: false}}",
325320
"StatusCode": 200,
326321
"ResponseHeaders": {
327322
"Cache-Control": "no-cache",
328323
"Content-Encoding": "gzip",
329324
"Content-Type": "application/json; charset=utf-8",
330-
"Date": "Thu, 09 Dec 2021 05:38:37 GMT",
325+
"Date": "Wed, 09 Mar 2022 03:52:47 GMT",
331326
"Expires": "-1",
332327
"Pragma": "no-cache",
333328
"Server": "Microsoft-HTTPAPI/2.0",
334329
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
335330
"Transfer-Encoding": "chunked",
336331
"Vary": "Accept-Encoding",
337332
"X-Content-Type-Options": "nosniff",
338-
"x-ms-correlation-request-id": "f1e2348a-9509-4d01-b2e3-68d3ad2bfee8",
339-
"x-ms-ratelimit-remaining-subscription-resource-requests": "198",
340-
"x-ms-request-id": "41f7e188-58b2-11ec-871b-70b5e82527ff",
341-
"x-ms-routing-request-id": "JAPANEAST:20211209T053837Z:f1e2348a-9509-4d01-b2e3-68d3ad2bfee8"
333+
"x-ms-correlation-request-id": "de2b4544-7e60-4d61-be96-6eba67fbd91e",
334+
"x-ms-ratelimit-remaining-subscription-resource-requests": "196",
335+
"x-ms-request-id": "6247659a-9f5c-11ec-a3b6-c0b6f9946f2d",
336+
"x-ms-routing-request-id": "KOREASOUTH:20220309T035247Z:de2b4544-7e60-4d61-be96-6eba67fbd91e"
342337
},
343338
"ResponseBody": {
344339
"properties": {
@@ -357,27 +352,27 @@
357352
"Accept-Encoding": "gzip, deflate",
358353
"Authorization": "Sanitized",
359354
"Connection": "keep-alive",
360-
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
361-
"x-ms-client-request-id": "4236590c-58b2-11ec-8f59-70b5e82527ff"
355+
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
356+
"x-ms-client-request-id": "627b6ab6-9f5c-11ec-a4ad-c0b6f9946f2d"
362357
},
363358
"RequestBody": null,
364359
"StatusCode": 200,
365360
"ResponseHeaders": {
366361
"Cache-Control": "no-cache",
367362
"Content-Encoding": "gzip",
368363
"Content-Type": "application/json; charset=utf-8",
369-
"Date": "Thu, 09 Dec 2021 05:38:38 GMT",
364+
"Date": "Wed, 09 Mar 2022 03:52:47 GMT",
370365
"Expires": "-1",
371366
"Pragma": "no-cache",
372367
"Server": "Microsoft-HTTPAPI/2.0",
373368
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
374369
"Transfer-Encoding": "chunked",
375370
"Vary": "Accept-Encoding",
376371
"X-Content-Type-Options": "nosniff",
377-
"x-ms-correlation-request-id": "a6e1c244-4ab2-4f69-ae1b-386d1ce5e4db",
378-
"x-ms-ratelimit-remaining-subscription-resource-requests": "598",
379-
"x-ms-request-id": "4236590c-58b2-11ec-8f59-70b5e82527ff",
380-
"x-ms-routing-request-id": "JAPANEAST:20211209T053838Z:a6e1c244-4ab2-4f69-ae1b-386d1ce5e4db"
372+
"x-ms-correlation-request-id": "53afcd86-e5a8-41cd-8639-938035323cd8",
373+
"x-ms-ratelimit-remaining-subscription-resource-requests": "596",
374+
"x-ms-request-id": "627b6ab6-9f5c-11ec-a4ad-c0b6f9946f2d",
375+
"x-ms-routing-request-id": "KOREASOUTH:20220309T035248Z:53afcd86-e5a8-41cd-8639-938035323cd8"
381376
},
382377
"ResponseBody": {
383378
"value": [

0 commit comments

Comments
 (0)