Skip to content

Commit f67c84a

Browse files
authored
update automation (Azure#23427)
1 parent b3d0a25 commit f67c84a

File tree

2 files changed

+54
-55
lines changed

2 files changed

+54
-55
lines changed

sdk/automation/azure-mgmt-automation/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/automation/azure-mgmt-automation/tests/recordings/test_cli_mgmt_automation.pyTestMgmtAutomationClienttest_automation.json

Lines changed: 49 additions & 54 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.7.3 (Windows-10-10.0.22000-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": "Wed, 05 Jan 2022 05:24:07 GMT",
20+
"Date": "Wed, 09 Mar 2022 07:04:44 GMT",
2121
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
22-
"Set-Cookie": [
23-
"fpc=AiUnwLlnmbFIt51_gKFQZy8; expires=Fri, 04-Feb-2022 05:24:07 GMT; path=/; secure; HttpOnly; SameSite=None",
24-
"esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrKZXK86d5UMCrxRCdW85lnr7JrjmFBK-aL9feyHiPnQI_t8CUno_mXD0n0zok7tsb1UkYycUIsKUB56XxJoSG1i5EK_wmyXPKW4HBdG8teqe33UsGmWykKoPp8FweONoYUvgAwSwPmHxnc3YnS2pMhTwhPOhwJmbyHK5bOpKygaYgAA; 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.12261.17 - WUS2 ProdSlices",
31-
"x-ms-request-id": "b62518bf-f3ca-40f0-b8e9-bee90cfbd502"
25+
"x-ms-ests-server": "2.1.12529.17 - NCUS ProdSlices",
26+
"x-ms-request-id": "cff7af64-51d1-4452-b885-71bac9bda900"
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=AiUnwLlnmbFIt51_gKFQZy8; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
109-
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.7.3 (Windows-10-10.0.22000-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": "Wed, 05 Jan 2022 05:24:07 GMT",
114+
"Date": "Wed, 09 Mar 2022 07:04:44 GMT",
120115
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
121-
"Set-Cookie": [
122-
"fpc=AiUnwLlnmbFIt51_gKFQZy8; expires=Fri, 04-Feb-2022 05:24:07 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.17 - KRSLR1 ProdSlices",
129-
"x-ms-request-id": "7777f699-653d-4eb0-b230-12e584d17900"
119+
"x-ms-ests-server": "2.1.12529.18 - KRSLR1 ProdSlices",
120+
"x-ms-request-id": "6d475565-362f-4807-8a0f-5a00f52a0400"
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": "d50a046d-85e4-4b92-8537-ff8c537b0533",
175+
"client-request-id": "96d44434-5f9e-4e6e-91f3-613aa8d53d1c",
185176
"Connection": "keep-alive",
186-
"Content-Length": "289",
177+
"Content-Length": "291",
187178
"Content-Type": "application/x-www-form-urlencoded",
188-
"Cookie": "fpc=AiUnwLlnmbFIt51_gKFQZy8; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
189-
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.7.3 (Windows-10-10.0.22000-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": "d50a046d-85e4-4b92-8537-ff8c537b0533",
203-
"Content-Length": "1391",
193+
"client-request-id": "96d44434-5f9e-4e6e-91f3-613aa8d53d1c",
194+
"Content-Length": "93",
204195
"Content-Type": "application/json; charset=utf-8",
205-
"Date": "Wed, 05 Jan 2022 05:24:07 GMT",
196+
"Date": "Wed, 09 Mar 2022 07:04:44 GMT",
206197
"Expires": "-1",
207198
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
208199
"Pragma": "no-cache",
209-
"Set-Cookie": [
210-
"fpc=AiUnwLlnmbFIt51_gKFQZy-ZHqKEAQAAAHciZ9kOAAAA; expires=Fri, 04-Feb-2022 05:24:07 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.12261.17 - SCUS ProdSlices",
218-
"x-ms-request-id": "21fc8441-5a8a-4e05-b0b6-96a663b1e902"
204+
"x-ms-ests-server": "2.1.12529.17 - SCUS ProdSlices",
205+
"x-ms-request-id": "a5308a91-1121-4062-b012-b38d8570ef00"
219206
},
220207
"ResponseBody": {
221208
"token_type": "Bearer",
222209
"expires_in": 3599,
223210
"ext_expires_in": 3599,
224-
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1yNS1BVWliZkJpaTdOZDFqQmViYXhib1hXMCIsImtpZCI6Ik1yNS1BVWliZkJpaTdOZDFqQmViYXhib1hXMCJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuYXp1cmUuY29tIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvNTQ4MjZiMjItMzhkNi00ZmIyLWJhZDktYjdiOTNhM2U5YzVhLyIsImlhdCI6MTY0MTM1OTk0NywibmJmIjoxNjQxMzU5OTQ3LCJleHAiOjE2NDEzNjM4NDcsImFpbyI6IkUyWmdZTkJvMDNMOGU5ZnV0K0JLVmViVFRGdTRBQT09IiwiYXBwaWQiOiJhMmRmNTRkNS1hYjAzLTQ3MjUtOWI4MC05YTAwYjNiMTk2N2YiLCJhcHBpZGFjciI6IjEiLCJpZHAiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC81NDgyNmIyMi0zOGQ2LTRmYjItYmFkOS1iN2I5M2EzZTljNWEvIiwiaWR0eXAiOiJhcHAiLCJvaWQiOiI4ODdjNDJiMS03OTQ2LTRjMjItYmFhNi0xNTA0M2U0YjEzMjMiLCJyaCI6IjAuQVRjQUltdUNWTlk0c2stNjJiZTVPajZjV3RWVTM2SURxeVZIbTRDYUFMT3hsbjgzQUFBLiIsInN1YiI6Ijg4N2M0MmIxLTc5NDYtNGMyMi1iYWE2LTE1MDQzZTRiMTMyMyIsInRpZCI6IjU0ODI2YjIyLTM4ZDYtNGZiMi1iYWQ5LWI3YjkzYTNlOWM1YSIsInV0aSI6IlFZVDhJWXBhQlU2d3RwYW1ZN0hwQWciLCJ2ZXIiOiIxLjAiLCJ4bXNfY2MiOlsiQ1AxIl0sInhtc190Y2R0IjoxNDEyMjA2ODQwfQ.dI7lrCmCPSEXGGO2qcRCxH89eHt6Ip_H5nDRRoaSHDoUlWkjLJ8BzezCjRY6C3r-sPkuM1kCxqHZFjFguYiGDT9PltkYhS3AhUSrRI3ZcTGbAM7gjlRHih7tSZElgOaerXOcAyYUxrt0_DgBiMktKByVcI8oJbOx_p5T241nWQ4cqeGqD3JC34E3oeeQaJBPsRVRTdhjfIV7nNAaxaoQeXBqBrA5Mcuxk_9mIS6VgkKdferHo0ugERuZVh5bk3xMaKnbYtiM17DVHu3Zs5xy7RT2bP8mJTK1Rsd1AHXpgqGk1raJW4_h3ob1Snbc8moBieu6737b9bfqXzVkd_QPoA"
211+
"access_token": "access_token"
225212
}
226213
},
227214
{
@@ -234,16 +221,24 @@
234221
"Connection": "keep-alive",
235222
"Content-Length": "98",
236223
"Content-Type": "application/json",
237-
"User-Agent": "azsdk-python-mgmt-automation/1.1.0b1 Python/3.7.3 (Windows-10-10.0.22000-SP0)",
238-
"x-ms-client-request-id": "b411ee8a-6de7-11ec-b7a5-2cf05d45d152"
224+
"User-Agent": "azsdk-python-mgmt-automation/1.1.0b1 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
225+
"x-ms-client-request-id": "3271b40a-9f77-11ec-95dd-c0b6f9946f2d"
226+
},
227+
"RequestBody": {
228+
"name": "myAutomationAccount9",
229+
"location": "East US 2",
230+
"properties": {
231+
"sku": {
232+
"name": "Free"
233+
}
234+
}
239235
},
240-
"RequestBody": "{\u0022name\u0022: \u0022myAutomationAccount9\u0022, \u0022location\u0022: \u0022East US 2\u0022, \u0022properties\u0022: {\u0022sku\u0022: {\u0022name\u0022: \u0022Free\u0022}}}",
241236
"StatusCode": 201,
242237
"ResponseHeaders": {
243238
"Cache-Control": "no-cache",
244-
"Content-Length": "744",
239+
"Content-Length": "746",
245240
"Content-Type": "application/json; charset=utf-8",
246-
"Date": "Wed, 05 Jan 2022 05:24:15 GMT",
241+
"Date": "Wed, 09 Mar 2022 07:04:53 GMT",
247242
"Expires": "-1",
248243
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/3fe52f16/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9?api-version=2019-06-01",
249244
"ocp-location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/3fe52f16/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9?api-version=2019-06-01",
@@ -252,11 +247,11 @@
252247
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
253248
"X-AspNet-Version": "4.0.30319",
254249
"X-Content-Type-Options": "nosniff",
255-
"x-ms-correlation-request-id": "6f010bda-ad8a-434d-8ce1-319c242a2c70",
250+
"x-ms-correlation-request-id": "5d1e98a1-6942-490d-bc20-758abdf98bec",
256251
"x-ms-location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/3fe52f16/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9?api-version=2019-06-01",
257252
"x-ms-ratelimit-remaining-subscription-writes": "1199",
258-
"x-ms-request-id": "b411ee8a-6de7-11ec-b7a5-2cf05d45d152",
259-
"x-ms-routing-request-id": "SOUTHEASTASIA:20220105T052416Z:6f010bda-ad8a-434d-8ce1-319c242a2c70",
253+
"x-ms-request-id": "3271b40a-9f77-11ec-95dd-c0b6f9946f2d",
254+
"x-ms-routing-request-id": "SOUTHEASTASIA:20220309T070454Z:5d1e98a1-6942-490d-bc20-758abdf98bec",
260255
"X-Powered-By": "ASP.NET"
261256
},
262257
"ResponseBody": {
@@ -273,7 +268,7 @@
273268
"capacity": null
274269
},
275270
"state": "Ok",
276-
"RegistrationUrl": "https://d1e82d5e-dec2-4fdf-88ee-4737384ee6b2.agentsvc.eus2.azure-automation.net/accounts/d1e82d5e-dec2-4fdf-88ee-4737384ee6b2",
271+
"RegistrationUrl": "https://15ac279b-76c5-4f1f-bd52-f9386421f565.agentsvc.eus2.azure-automation.net/accounts/15ac279b-76c5-4f1f-bd52-f9386421f565",
277272
"RuntimeConfiguration": {
278273
"powershell": {
279274
"builtinModules": {
@@ -286,9 +281,9 @@
286281
}
287282
}
288283
},
289-
"creationTime": "2022-01-05T05:24:13.84\u002B00:00",
284+
"creationTime": "2022-03-09T07:04:50.813\u002B00:00",
290285
"lastModifiedBy": null,
291-
"lastModifiedTime": "2022-01-05T05:24:13.84\u002B00:00"
286+
"lastModifiedTime": "2022-03-09T07:04:50.813\u002B00:00"
292287
}
293288
}
294289
},
@@ -300,16 +295,16 @@
300295
"Accept-Encoding": "gzip, deflate",
301296
"Authorization": "Sanitized",
302297
"Connection": "keep-alive",
303-
"User-Agent": "azsdk-python-mgmt-automation/1.1.0b1 Python/3.7.3 (Windows-10-10.0.22000-SP0)",
304-
"x-ms-client-request-id": "ba18d88c-6de7-11ec-b252-2cf05d45d152"
298+
"User-Agent": "azsdk-python-mgmt-automation/1.1.0b1 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
299+
"x-ms-client-request-id": "389b9340-9f77-11ec-8967-c0b6f9946f2d"
305300
},
306301
"RequestBody": null,
307302
"StatusCode": 200,
308303
"ResponseHeaders": {
309304
"Cache-Control": "no-cache",
310305
"Content-Encoding": "gzip",
311306
"Content-Type": "application/json; charset=utf-8",
312-
"Date": "Wed, 05 Jan 2022 05:24:16 GMT",
307+
"Date": "Wed, 09 Mar 2022 07:04:54 GMT",
313308
"Expires": "-1",
314309
"Pragma": "no-cache",
315310
"Server": "Microsoft-IIS/10.0",
@@ -318,10 +313,10 @@
318313
"Vary": "Accept-Encoding",
319314
"X-AspNet-Version": "4.0.30319",
320315
"X-Content-Type-Options": "nosniff",
321-
"x-ms-correlation-request-id": "759ef6af-49df-4a3b-b41a-271ae31d1e67",
316+
"x-ms-correlation-request-id": "d53e97a1-85d1-42e2-a354-cd3a42e458c5",
322317
"x-ms-ratelimit-remaining-subscription-reads": "11999",
323-
"x-ms-request-id": "ba18d88c-6de7-11ec-b252-2cf05d45d152",
324-
"x-ms-routing-request-id": "SOUTHEASTASIA:20220105T052417Z:759ef6af-49df-4a3b-b41a-271ae31d1e67",
318+
"x-ms-request-id": "389b9340-9f77-11ec-8967-c0b6f9946f2d",
319+
"x-ms-routing-request-id": "SOUTHEASTASIA:20220309T070454Z:d53e97a1-85d1-42e2-a354-cd3a42e458c5",
325320
"X-Powered-By": "ASP.NET"
326321
},
327322
"ResponseBody": {

0 commit comments

Comments
 (0)