From ac2aa9065cc79ba597bd40e1619839aac6bebfbd Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Mon, 26 Apr 2021 14:39:51 +0800 Subject: [PATCH 1/2] Define new replacer to replace keys in recording --- ...t_cli_mgmt_automation.test_automation.yaml | 271 +++++++++--------- .../tests/test_cli_mgmt_automation.py | 8 +- .../devtools_testutils/mgmt_testcase.py | 45 +++ 3 files changed, 184 insertions(+), 140 deletions(-) diff --git a/sdk/automation/azure-mgmt-automation/tests/recordings/test_cli_mgmt_automation.test_automation.yaml b/sdk/automation/azure-mgmt-automation/tests/recordings/test_cli_mgmt_automation.test_automation.yaml index 0072da2cf4ed..149bfa2baa5c 100644 --- a/sdk/automation/azure-mgmt-automation/tests/recordings/test_cli_mgmt_automation.test_automation.yaml +++ b/sdk/automation/azure-mgmt-automation/tests/recordings/test_cli_mgmt_automation.test_automation.yaml @@ -20,22 +20,22 @@ interactions: response: body: string: '{"name":"myAutomationAccount9","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9","type":"Microsoft.Automation/AutomationAccounts","location":"East - US 2","tags":{},"etag":null,"properties":{"sku":{"name":"Basic","family":null,"capacity":null},"state":"Ok","RegistrationUrl":"https://4ce1a53f-b815-4200-af5f-96601848a9d9.agentsvc.eus2.azure-automation.net/accounts/4ce1a53f-b815-4200-af5f-96601848a9d9","creationTime":"2021-03-16T09:08:29.5+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-03-16T09:08:29.5+00:00"}}' + US 2","tags":{},"etag":null,"properties":{"sku":{"name":"Basic","family":null,"capacity":null},"state":"Ok","RegistrationUrl":"https://b2be1457-9afa-4398-8c77-0e9aa7479152.agentsvc.eus2.azure-automation.net/accounts/b2be1457-9afa-4398-8c77-0e9aa7479152","creationTime":"2021-04-26T06:16:28.93+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-26T06:16:28.93+00:00"}}' headers: cache-control: - no-cache content-length: - - '662' + - '669' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:31 GMT + - Mon, 26 Apr 2021 06:16:31 GMT expires: - '-1' location: - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9?api-version=2019-06-01 ocp-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9?api-version=2019-06-01 pragma: - no-cache server: @@ -47,7 +47,7 @@ interactions: x-content-type-options: - nosniff x-ms-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9?api-version=2019-06-01 x-ms-ratelimit-remaining-subscription-writes: - '1199' x-powered-by: @@ -78,25 +78,25 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft","name":"runbook_draft","type":"Microsoft.Automation/AutomationAccounts/Runbooks","location":"East - US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637514825153870000\"","properties":{"description":"Description - of the Runbook","logVerbose":false,"logProgress":false,"logActivityTrace":0,"runbookType":"PowerShellWorkflow","parameters":{},"state":"New","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-03-16T09:08:35.387+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-03-16T09:08:35.387+00:00"}}' + US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637550145955600000\"","properties":{"description":"Description + of the Runbook","logVerbose":false,"logProgress":false,"logActivityTrace":0,"runbookType":"PowerShellWorkflow","parameters":{},"state":"New","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-04-26T06:16:35.56+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-26T06:16:35.56+00:00"}}' headers: cache-control: - no-cache content-length: - - '793' + - '796' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:37 GMT + - Mon, 26 Apr 2021 06:16:36 GMT etag: - - '"637514825153870000"' + - '"637550145955600000"' expires: - '-1' location: - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft?api-version=2019-06-01 ocp-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft?api-version=2019-06-01 pragma: - no-cache server: @@ -108,7 +108,7 @@ interactions: x-content-type-options: - nosniff x-ms-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft?api-version=2019-06-01 x-ms-ratelimit-remaining-subscription-writes: - '1198' x-powered-by: @@ -118,8 +118,7 @@ interactions: message: Created - request: body: '{"properties": {"contentLink": {"uri": "https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip", - "contentHash": {"algorithm": "sha265", "value": "07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"}, - "version": "1.0.0.0"}}}' + "contentHash": {"algorithm": "sha265", "value": "FakeValue"}, "version": "1.0.0.0"}}}' headers: Accept: - application/json @@ -138,22 +137,22 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1","name":"module1","type":"Microsoft.Automation/AutomationAccounts/Modules","location":"East - US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-03-16T09:08:38.16+00:00","lastModifiedTime":"2021-03-16T09:08:38.217+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}' + US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-04-26T06:16:38.167+00:00","lastModifiedTime":"2021-04-26T06:16:38.317+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}' headers: cache-control: - no-cache content-length: - - '596' + - '602' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:37 GMT + - Mon, 26 Apr 2021 06:16:37 GMT expires: - '-1' location: - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1?api-version=2019-06-01 ocp-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1?api-version=2019-06-01 pragma: - no-cache server: @@ -165,7 +164,7 @@ interactions: x-content-type-options: - nosniff x-ms-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1?api-version=2019-06-01 x-ms-ratelimit-remaining-subscription-writes: - '1197' x-powered-by: @@ -177,8 +176,8 @@ interactions: body: '{"name": "Get-AzureVMTutorial", "location": "East US 2", "tags": {"tag01": "value01", "tag02": "value02"}, "properties": {"logVerbose": false, "logProgress": true, "runbookType": "PowerShellWorkflow", "publishContentLink": {"uri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/0.0.0.3/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1", - "contentHash": {"algorithm": "SHA256", "value": "4fab357cab33adbe9af72ae4b1203e601e30e44de271616e376c08218fd10d1c"}}, - "description": "Description of the Runbook", "logActivityTrace": 1}}' + "contentHash": {"algorithm": "SHA256", "value": "FakeValue"}}, "description": + "Description of the Runbook", "logActivityTrace": 1}}' headers: Accept: - application/json @@ -197,25 +196,25 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/Get-AzureVMTutorial","name":"Get-AzureVMTutorial","type":"Microsoft.Automation/AutomationAccounts/Runbooks","location":"East - US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637514825206100000\"","properties":{"description":"Description - of the Runbook","logVerbose":false,"logProgress":true,"logActivityTrace":1,"runbookType":"PowerShellWorkflow","parameters":{},"state":"Published","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-03-16T09:08:40.607+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-03-16T09:08:40.61+00:00"}}' + US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637550146008800000\"","properties":{"description":"Description + of the Runbook","logVerbose":false,"logProgress":true,"logActivityTrace":1,"runbookType":"PowerShellWorkflow","parameters":{},"state":"Published","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-04-26T06:16:40.877+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-26T06:16:40.88+00:00"}}' headers: cache-control: - no-cache content-length: - - '809' + - '814' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:41 GMT + - Mon, 26 Apr 2021 06:16:42 GMT etag: - - '"637514825206100000"' + - '"637550146008800000"' expires: - '-1' location: - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/Get-AzureVMTutorial?api-version=2019-06-01 ocp-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/Get-AzureVMTutorial?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/Get-AzureVMTutorial?api-version=2019-06-01 pragma: - no-cache server: @@ -227,7 +226,7 @@ interactions: x-content-type-options: - nosniff x-ms-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/Get-AzureVMTutorial?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/Get-AzureVMTutorial?api-version=2019-06-01 x-ms-ratelimit-remaining-subscription-writes: - '1196' x-powered-by: @@ -255,22 +254,22 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1?api-version=2019-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1","name":"job1","type":"Microsoft.Automation/AutomationAccounts/Jobs","properties":{"jobId":"7fa8a368-a1fa-4d8b-b6e6-567d93091ece","creationTime":"2021-03-16T09:08:42.627+00:00","provisioningState":"Processing","status":"New","statusDetails":"None","startedBy":null,"startTime":null,"endTime":null,"lastModifiedTime":"2021-03-16T09:08:42.627+00:00","lastStatusModifiedTime":"2021-03-16T09:08:42.627+00:00","exception":null,"parameters":{"key01":"value01","key02":"value02"},"runOn":"","runbook":{"name":"Get-AzureVMTutorial"}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1","name":"job1","type":"Microsoft.Automation/AutomationAccounts/Jobs","properties":{"jobId":"c2e58ce8-404f-44ea-9198-34a2e9540d00","creationTime":"2021-04-26T06:16:43.227+00:00","provisioningState":"Processing","status":"New","statusDetails":"None","startedBy":null,"startTime":null,"endTime":null,"lastModifiedTime":"2021-04-26T06:16:43.227+00:00","lastStatusModifiedTime":"2021-04-26T06:16:43.227+00:00","exception":null,"parameters":{"key01":"value01","key02":"value02"},"runOn":"","runbook":{"name":"Get-AzureVMTutorial"}}}' headers: cache-control: - no-cache content-length: - - '730' + - '735' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:42 GMT + - Mon, 26 Apr 2021 06:16:42 GMT expires: - '-1' location: - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1?api-version=2019-06-01 ocp-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1?api-version=2019-06-01 pragma: - no-cache server: @@ -282,7 +281,7 @@ interactions: x-content-type-options: - nosniff x-ms-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1?api-version=2019-06-01 x-ms-ratelimit-remaining-subscription-resource-requests: - '1999' x-powered-by: @@ -292,7 +291,7 @@ interactions: message: Created - request: body: '{"name": "TestWebhook", "properties": {"isEnabled": true, "uri": "https://s1events.azure-automation.net/webhooks?token=7u3KfQvM1vUPWaDMFRv2%2fAA4Jqx8QwS8aBuyO6Xsdcw%3d", - "expiryTime": "2021-03-29T22:18:13.700287Z", "runbook": {"name": "Get-AzureVMTutorial"}}}' + "expiryTime": "2021-12-29T22:18:13.700287Z", "runbook": {"name": "Get-AzureVMTutorial"}}}' headers: Accept: - application/json @@ -310,16 +309,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1?api-version=2015-10-31 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1","name":"webhook1","type":"Microsoft.Automation/AutomationAccounts/Webhooks","properties":{"isEnabled":true,"expiryTime":"2021-03-29T22:18:13.700287+00:00","runbook":{"name":"Get-AzureVMTutorial"},"lastInvokedTime":null,"runOn":null,"parameters":null,"uri":"https://s1events.azure-automation.net/webhooks?token=7u3KfQvM1vUPWaDMFRv2%2fAA4Jqx8QwS8aBuyO6Xsdcw%3d","creationTime":"2021-03-16T09:08:44.548398+00:00","lastModifiedBy":"","lastModifiedTime":"2021-03-16T09:08:44.548398+00:00"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1","name":"webhook1","type":"Microsoft.Automation/AutomationAccounts/Webhooks","properties":{"isEnabled":true,"expiryTime":"2021-12-29T22:18:13.700287+00:00","runbook":{"name":"Get-AzureVMTutorial"},"lastInvokedTime":null,"runOn":null,"parameters":null,"uri":"https://s1events.azure-automation.net/webhooks?token=7u3KfQvM1vUPWaDMFRv2%2fAA4Jqx8QwS8aBuyO6Xsdcw%3d","creationTime":"2021-04-26T06:16:45.1536344+00:00","lastModifiedBy":"","lastModifiedTime":"2021-04-26T06:16:45.1536344+00:00"}}' headers: cache-control: - no-cache content-length: - - '698' + - '705' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:44 GMT + - Mon, 26 Apr 2021 06:16:44 GMT expires: - '-1' location: @@ -361,22 +360,22 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/schedules/mySchedule","name":"mySchedule","type":"Microsoft.Automation/AutomationAccounts/Schedules","properties":{"description":"my - description of schedule goes here","startTime":"2021-06-27T17:28:00+00:00","startTimeOffsetMinutes":0.0,"expiryTime":"2022-01-01T17:28:00+00:00","expiryTimeOffsetMinutes":0.0,"isEnabled":true,"nextRun":"2021-06-27T17:28:00+00:00","nextRunOffsetMinutes":0.0,"interval":1,"frequency":"Hour","creationTime":"2021-03-16T09:08:45.147+00:00","lastModifiedTime":"2021-03-16T09:08:45.147+00:00","timeZone":"UTC","advancedSchedule":null}}' + description of schedule goes here","startTime":"2021-06-27T17:28:00+00:00","startTimeOffsetMinutes":0.0,"expiryTime":"2022-01-01T17:28:00+00:00","expiryTimeOffsetMinutes":0.0,"isEnabled":true,"nextRun":"2021-06-27T17:28:00+00:00","nextRunOffsetMinutes":0.0,"interval":1,"frequency":"Hour","creationTime":"2021-04-26T06:16:45.79+00:00","lastModifiedTime":"2021-04-26T06:16:45.79+00:00","timeZone":"UTC","advancedSchedule":null}}' headers: cache-control: - no-cache content-length: - - '756' + - '759' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:44 GMT + - Mon, 26 Apr 2021 06:16:45 GMT expires: - '-1' location: - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/schedules/mySchedule?api-version=2019-06-01 ocp-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/schedules/mySchedule?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/schedules/mySchedule?api-version=2019-06-01 pragma: - no-cache server: @@ -388,7 +387,7 @@ interactions: x-content-type-options: - nosniff x-ms-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/schedules/mySchedule?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/schedules/mySchedule?api-version=2019-06-01 x-ms-ratelimit-remaining-subscription-writes: - '1194' x-powered-by: @@ -416,23 +415,23 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable?api-version=2019-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable","name":"sampleVariable","type":"Microsoft.Automation/AutomationAccounts/Variables","properties":{"creationTime":"2021-03-16T09:08:45.737+00:00","lastModifiedTime":"2021-03-16T09:08:45.737+00:00","isEncrypted":false,"value":"\"ComputerName.domain.com\"","description":"my + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable","name":"sampleVariable","type":"Microsoft.Automation/AutomationAccounts/Variables","properties":{"creationTime":"2021-04-26T06:16:46.42+00:00","lastModifiedTime":"2021-04-26T06:16:46.42+00:00","isEncrypted":false,"value":"\"ComputerName.domain.com\"","description":"my description"}}' headers: cache-control: - no-cache content-length: - - '505' + - '508' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:45 GMT + - Mon, 26 Apr 2021 06:16:45 GMT expires: - '-1' location: - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable?api-version=2019-06-01 ocp-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable?api-version=2019-06-01 pragma: - no-cache server: @@ -444,7 +443,7 @@ interactions: x-content-type-options: - nosniff x-ms-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable?api-version=2019-06-01 x-ms-ratelimit-remaining-subscription-writes: - '1193' x-powered-by: @@ -473,22 +472,22 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/credentials/myCredential","name":"myCredential","type":"Microsoft.Automation/AutomationAccounts/Credentials","properties":{"userName":"mylingaiah","description":"my - description goes here","creationTime":"2021-03-16T09:08:46.28+00:00","lastModifiedTime":"2021-03-16T09:08:46.28+00:00"}}' + description goes here","creationTime":"2021-04-26T06:16:47.057+00:00","lastModifiedTime":"2021-04-26T06:16:47.057+00:00"}}' headers: cache-control: - no-cache content-length: - - '479' + - '486' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:45 GMT + - Mon, 26 Apr 2021 06:16:46 GMT expires: - '-1' location: - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/credentials/myCredential?api-version=2019-06-01 ocp-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/credentials/myCredential?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/credentials/myCredential?api-version=2019-06-01 pragma: - no-cache server: @@ -500,7 +499,7 @@ interactions: x-content-type-options: - nosniff x-ms-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/credentials/myCredential?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/credentials/myCredential?api-version=2019-06-01 x-ms-ratelimit-remaining-subscription-writes: - '1192' x-powered-by: @@ -532,7 +531,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:46 GMT + - Mon, 26 Apr 2021 06:16:46 GMT expires: - '-1' pragma: @@ -578,7 +577,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:46 GMT + - Mon, 26 Apr 2021 06:16:47 GMT expires: - '-1' pragma: @@ -615,16 +614,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/draft?api-version=2019-06-01 response: body: - string: '{"creationTime":"2021-03-16T09:08:35.39+00:00","lastModifiedTime":"2021-03-16T09:08:35.39+00:00","inEdit":true,"parameters":{},"outputTypes":[]}' + string: '{"creationTime":"2021-04-26T06:16:35.563+00:00","lastModifiedTime":"2021-04-26T06:16:35.563+00:00","inEdit":true,"parameters":{},"outputTypes":[]}' headers: cache-control: - no-cache content-length: - - '144' + - '146' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:46 GMT + - Mon, 26 Apr 2021 06:16:47 GMT expires: - '-1' pragma: @@ -662,16 +661,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/credentials/myCredential","name":"myCredential","type":"Microsoft.Automation/AutomationAccounts/Credentials","properties":{"userName":"mylingaiah","description":"my - description goes here","creationTime":"2021-03-16T09:08:46.28+00:00","lastModifiedTime":"2021-03-16T09:08:46.28+00:00"}}' + description goes here","creationTime":"2021-04-26T06:16:47.057+00:00","lastModifiedTime":"2021-04-26T06:16:47.057+00:00"}}' headers: cache-control: - no-cache content-length: - - '479' + - '486' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:47 GMT + - Mon, 26 Apr 2021 06:16:47 GMT expires: - '-1' pragma: @@ -717,7 +716,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:47 GMT + - Mon, 26 Apr 2021 06:16:48 GMT expires: - '-1' pragma: @@ -763,7 +762,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:47 GMT + - Mon, 26 Apr 2021 06:16:48 GMT expires: - '-1' pragma: @@ -800,17 +799,17 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable?api-version=2019-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable","name":"sampleVariable","type":"Microsoft.Automation/AutomationAccounts/Variables","properties":{"creationTime":"2021-03-16T09:08:45.737+00:00","lastModifiedTime":"2021-03-16T09:08:45.737+00:00","isEncrypted":false,"value":"\"ComputerName.domain.com\"","description":"my + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable","name":"sampleVariable","type":"Microsoft.Automation/AutomationAccounts/Variables","properties":{"creationTime":"2021-04-26T06:16:46.42+00:00","lastModifiedTime":"2021-04-26T06:16:46.42+00:00","isEncrypted":false,"value":"\"ComputerName.domain.com\"","description":"my description"}}' headers: cache-control: - no-cache content-length: - - '505' + - '508' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:48 GMT + - Mon, 26 Apr 2021 06:16:48 GMT expires: - '-1' pragma: @@ -848,16 +847,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/schedules/mySchedule","name":"mySchedule","type":"Microsoft.Automation/AutomationAccounts/Schedules","properties":{"description":"my - description of schedule goes here","startTime":"2021-06-27T17:28:00+00:00","startTimeOffsetMinutes":0.0,"expiryTime":"2022-01-01T17:28:00+00:00","expiryTimeOffsetMinutes":0.0,"isEnabled":true,"nextRun":"2021-06-27T17:28:00+00:00","nextRunOffsetMinutes":0.0,"interval":1,"frequency":"Hour","creationTime":"2021-03-16T09:08:45.147+00:00","lastModifiedTime":"2021-03-16T09:08:45.147+00:00","timeZone":"UTC","advancedSchedule":null}}' + description of schedule goes here","startTime":"2021-06-27T17:28:00+00:00","startTimeOffsetMinutes":0.0,"expiryTime":"2022-01-01T17:28:00+00:00","expiryTimeOffsetMinutes":0.0,"isEnabled":true,"nextRun":"2021-06-27T17:28:00+00:00","nextRunOffsetMinutes":0.0,"interval":1,"frequency":"Hour","creationTime":"2021-04-26T06:16:45.79+00:00","lastModifiedTime":"2021-04-26T06:16:45.79+00:00","timeZone":"UTC","advancedSchedule":null}}' headers: cache-control: - no-cache content-length: - - '756' + - '759' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:48 GMT + - Mon, 26 Apr 2021 06:16:49 GMT expires: - '-1' pragma: @@ -895,19 +894,19 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/Get-AzureVMTutorial","name":"Get-AzureVMTutorial","type":"Microsoft.Automation/AutomationAccounts/Runbooks","location":"East - US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637514825206100000\"","properties":{"description":"Description - of the Runbook","logVerbose":false,"logProgress":true,"logActivityTrace":1,"runbookType":"PowerShellWorkflow","parameters":{},"state":"Published","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-03-16T09:08:40.607+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-03-16T09:08:40.61+00:00"}}' + US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637550146008800000\"","properties":{"description":"Description + of the Runbook","logVerbose":false,"logProgress":true,"logActivityTrace":1,"runbookType":"PowerShellWorkflow","parameters":{},"state":"Published","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-04-26T06:16:40.877+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-26T06:16:40.88+00:00"}}' headers: cache-control: - no-cache content-length: - - '809' + - '814' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:48 GMT + - Mon, 26 Apr 2021 06:16:49 GMT etag: - - '"637514825206100000"' + - '"637550146008800000"' expires: - '-1' pragma: @@ -944,16 +943,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1?api-version=2015-10-31 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1","name":"webhook1","type":"Microsoft.Automation/AutomationAccounts/Webhooks","properties":{"isEnabled":true,"expiryTime":"2021-03-29T22:18:13.700287+00:00","runbook":{"name":"Get-AzureVMTutorial"},"lastInvokedTime":null,"runOn":null,"parameters":null,"uri":"","creationTime":"2021-03-16T09:08:44.548398+00:00","lastModifiedBy":"","lastModifiedTime":"2021-03-16T09:08:44.548398+00:00"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1","name":"webhook1","type":"Microsoft.Automation/AutomationAccounts/Webhooks","properties":{"isEnabled":true,"expiryTime":"2021-12-29T22:18:13.700287+00:00","runbook":{"name":"Get-AzureVMTutorial"},"lastInvokedTime":null,"runOn":null,"parameters":null,"uri":"","creationTime":"2021-04-26T06:16:45.1536344+00:00","lastModifiedBy":"","lastModifiedTime":"2021-04-26T06:16:45.1536344+00:00"}}' headers: cache-control: - no-cache content-length: - - '597' + - '604' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:49 GMT + - Mon, 26 Apr 2021 06:16:49 GMT expires: - '-1' pragma: @@ -997,7 +996,7 @@ interactions: content-type: - text/plain date: - - Tue, 16 Mar 2021 09:08:49 GMT + - Mon, 26 Apr 2021 06:16:50 GMT expires: - '-1' pragma: @@ -1031,16 +1030,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1","name":"module1","type":"Microsoft.Automation/AutomationAccounts/Modules","location":"East - US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-03-16T09:08:38.16+00:00","lastModifiedTime":"2021-03-16T09:08:38.217+00:00","error":{"code":null,"message":""},"provisioningState":"Creating","isComposite":false}}' + US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-04-26T06:16:38.167+00:00","lastModifiedTime":"2021-04-26T06:16:38.317+00:00","error":{"code":null,"message":""},"provisioningState":"Creating","isComposite":false}}' headers: cache-control: - no-cache content-length: - - '594' + - '600' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:50 GMT + - Mon, 26 Apr 2021 06:16:50 GMT expires: - '-1' pragma: @@ -1077,16 +1076,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1?api-version=2019-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1","name":"job1","type":"Microsoft.Automation/AutomationAccounts/Jobs","properties":{"jobId":"7fa8a368-a1fa-4d8b-b6e6-567d93091ece","creationTime":"2021-03-16T09:08:42.6436526+00:00","provisioningState":"Processing","status":"Activating","statusDetails":"None","startedBy":"{scrubbed}","startTime":null,"endTime":null,"lastModifiedTime":"2021-03-16T09:08:48.0729556+00:00","lastStatusModifiedTime":"2021-03-16T09:08:48.0729556+00:00","exception":null,"parameters":{"key01":"value01","key02":"value02"},"runOn":"","runbook":{"name":"Get-AzureVMTutorial"}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1","name":"job1","type":"Microsoft.Automation/AutomationAccounts/Jobs","properties":{"jobId":"c2e58ce8-404f-44ea-9198-34a2e9540d00","creationTime":"2021-04-26T06:16:43.2302084+00:00","provisioningState":"Processing","status":"Activating","statusDetails":"None","startedBy":"{scrubbed}","startTime":null,"endTime":null,"lastModifiedTime":"2021-04-26T06:16:48.6510374+00:00","lastStatusModifiedTime":"2021-04-26T06:16:48.6510374+00:00","exception":null,"parameters":{"key01":"value01","key02":"value02"},"runOn":"","runbook":{"name":"Get-AzureVMTutorial"}}}' headers: cache-control: - no-cache content-length: - - '757' + - '762' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:50 GMT + - Mon, 26 Apr 2021 06:16:51 GMT expires: - '-1' pragma: @@ -1134,7 +1133,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:50 GMT + - Mon, 26 Apr 2021 06:16:51 GMT expires: - '-1' pragma: @@ -1172,20 +1171,20 @@ interactions: response: body: string: '{"name":"myAutomationAccount9","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9","type":"Microsoft.Automation/AutomationAccounts","location":"East - US 2","tags":{},"etag":null,"properties":{"sku":{"name":"Basic","family":null,"capacity":null},"state":"Ok","RegistrationUrl":"https://4ce1a53f-b815-4200-af5f-96601848a9d9.agentsvc.eus2.azure-automation.net/accounts/4ce1a53f-b815-4200-af5f-96601848a9d9","creationTime":"2021-03-16T09:08:29.5+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-03-16T09:08:29.5+00:00"}}' + US 2","tags":{},"etag":null,"properties":{"sku":{"name":"Basic","family":null,"capacity":null},"state":"Ok","RegistrationUrl":"https://b2be1457-9afa-4398-8c77-0e9aa7479152.agentsvc.eus2.azure-automation.net/accounts/b2be1457-9afa-4398-8c77-0e9aa7479152","creationTime":"2021-04-26T06:16:28.93+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-26T06:16:28.93+00:00"}}' headers: cache-control: - no-cache content-length: - - '662' + - '669' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:51 GMT + - Mon, 26 Apr 2021 06:16:51 GMT expires: - '-1' ocp-automation-accountid: - - 4ce1a53f-b815-4200-af5f-96601848a9d9 + - b2be1457-9afa-4398-8c77-0e9aa7479152 pragma: - no-cache server: @@ -1207,8 +1206,7 @@ interactions: message: OK - request: body: '{"properties": {"contentLink": {"uri": "https://teststorage.blob.core.windows.net/mycontainer/MyModule.zip", - "contentHash": {"algorithm": "sha265", "value": "07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"}, - "version": "1.0.0.0"}}}' + "contentHash": {"algorithm": "sha265", "value": "FakeValue"}, "version": "1.0.0.0"}}}' headers: Accept: - application/json @@ -1227,16 +1225,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1","name":"module1","type":"Microsoft.Automation/AutomationAccounts/Modules","location":"East - US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-03-16T09:08:38.16+00:00","lastModifiedTime":"2021-03-16T09:08:38.217+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}' + US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-04-26T06:16:38.167+00:00","lastModifiedTime":"2021-04-26T06:16:38.317+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}' headers: cache-control: - no-cache content-length: - - '596' + - '602' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:08:51 GMT + - Mon, 26 Apr 2021 06:16:52 GMT expires: - '-1' pragma: @@ -1284,16 +1282,16 @@ interactions: content-length: - '0' date: - - Tue, 16 Mar 2021 09:08:52 GMT + - Mon, 26 Apr 2021 06:16:53 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/4797e8ca-2e49-4d2e-a117-b777fd147465?api-version=2019-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/2fbf3aa3-4869-453f-89c5-e5c2447c4e66?api-version=2019-06-01 ocp-automation-operationresultid: - - 4797e8ca-2e49-4d2e-a117-b777fd147465 - - 4797e8ca-2e49-4d2e-a117-b777fd147465 + - 2fbf3aa3-4869-453f-89c5-e5c2447c4e66 + - 2fbf3aa3-4869-453f-89c5-e5c2447c4e66 ocp-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/4797e8ca-2e49-4d2e-a117-b777fd147465?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/2fbf3aa3-4869-453f-89c5-e5c2447c4e66?api-version=2019-06-01 pragma: - no-cache server: @@ -1305,7 +1303,7 @@ interactions: x-content-type-options: - nosniff x-ms-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/4797e8ca-2e49-4d2e-a117-b777fd147465?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/2fbf3aa3-4869-453f-89c5-e5c2447c4e66?api-version=2019-06-01 x-ms-ratelimit-remaining-subscription-writes: - '1199' x-powered-by: @@ -1325,7 +1323,7 @@ interactions: User-Agent: - azsdk-python-mgmt-automation/1.1.0b1 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/4797e8ca-2e49-4d2e-a117-b777fd147465?api-version=2019-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/2fbf3aa3-4869-453f-89c5-e5c2447c4e66?api-version=2019-06-01 response: body: string: '' @@ -1337,7 +1335,7 @@ interactions: content-type: - text/plain; charset=utf-8 date: - - Tue, 16 Mar 2021 09:09:23 GMT + - Mon, 26 Apr 2021 06:17:24 GMT expires: - '-1' pragma: @@ -1376,16 +1374,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/credentials/myCredential","name":"myCredential","type":"Microsoft.Automation/AutomationAccounts/Credentials","properties":{"userName":"mylingaiah","description":"my - description goes here","creationTime":"2021-03-16T09:08:46.28+00:00","lastModifiedTime":"2021-03-16T09:08:46.28+00:00"}}' + description goes here","creationTime":"2021-04-26T06:16:47.057+00:00","lastModifiedTime":"2021-04-26T06:16:47.057+00:00"}}' headers: cache-control: - no-cache content-length: - - '479' + - '486' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:09:24 GMT + - Mon, 26 Apr 2021 06:17:24 GMT expires: - '-1' pragma: @@ -1428,17 +1426,17 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable?api-version=2019-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable","name":"sampleVariable","type":"Microsoft.Automation/AutomationAccounts/Variables","properties":{"creationTime":"2021-03-16T09:08:45.737+00:00","lastModifiedTime":"2021-03-16T09:09:24.69+00:00","isEncrypted":false,"value":"\"ComputerName3.domain.com\"","description":"my + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable","name":"sampleVariable","type":"Microsoft.Automation/AutomationAccounts/Variables","properties":{"creationTime":"2021-04-26T06:16:46.42+00:00","lastModifiedTime":"2021-04-26T06:17:25.667+00:00","isEncrypted":false,"value":"\"ComputerName3.domain.com\"","description":"my description"}}' headers: cache-control: - no-cache content-length: - - '505' + - '510' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:09:24 GMT + - Mon, 26 Apr 2021 06:17:25 GMT expires: - '-1' pragma: @@ -1483,16 +1481,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/schedules/mySchedule","name":"mySchedule","type":"Microsoft.Automation/AutomationAccounts/Schedules","properties":{"description":"my - updated description of schedule goes here","startTime":"2021-06-27T17:28:00+00:00","startTimeOffsetMinutes":0.0,"expiryTime":"2022-01-01T17:28:00+00:00","expiryTimeOffsetMinutes":0.0,"isEnabled":false,"nextRun":"2021-06-27T17:28:00+00:00","nextRunOffsetMinutes":0.0,"interval":1,"frequency":"Hour","creationTime":"2021-03-16T09:08:45.147+00:00","lastModifiedTime":"2021-03-16T09:08:45.147+00:00","timeZone":"UTC","advancedSchedule":null}}' + updated description of schedule goes here","startTime":"2021-06-27T17:28:00+00:00","startTimeOffsetMinutes":0.0,"expiryTime":"2022-01-01T17:28:00+00:00","expiryTimeOffsetMinutes":0.0,"isEnabled":false,"nextRun":"2021-06-27T17:28:00+00:00","nextRunOffsetMinutes":0.0,"interval":1,"frequency":"Hour","creationTime":"2021-04-26T06:16:45.79+00:00","lastModifiedTime":"2021-04-26T06:16:45.79+00:00","timeZone":"UTC","advancedSchedule":null}}' headers: cache-control: - no-cache content-length: - - '765' + - '768' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:09:25 GMT + - Mon, 26 Apr 2021 06:17:26 GMT expires: - '-1' pragma: @@ -1537,19 +1535,19 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/Get-AzureVMTutorial","name":"Get-AzureVMTutorial","type":"Microsoft.Automation/AutomationAccounts/Runbooks","location":"East - US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637514825657730000\"","properties":{"description":"Updated - Description of the Runbook","logVerbose":false,"logProgress":true,"logActivityTrace":1,"runbookType":"PowerShellWorkflow","parameters":{},"state":"Published","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-03-16T09:08:40.607+00:00","lastModifiedBy":"{scrubbed}","lastModifiedTime":"2021-03-16T09:09:25.773+00:00"}}' + US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637550146469030000\"","properties":{"description":"Updated + Description of the Runbook","logVerbose":false,"logProgress":true,"logActivityTrace":1,"runbookType":"PowerShellWorkflow","parameters":{},"state":"Published","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-04-26T06:16:40.877+00:00","lastModifiedBy":"{scrubbed}","lastModifiedTime":"2021-04-26T06:17:26.903+00:00"}}' headers: cache-control: - no-cache content-length: - - '826' + - '831' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:09:25 GMT + - Mon, 26 Apr 2021 06:17:26 GMT etag: - - '"637514825657730000"' + - '"637550146469030000"' expires: - '-1' pragma: @@ -1597,7 +1595,7 @@ interactions: content-length: - '0' date: - - Tue, 16 Mar 2021 09:09:26 GMT + - Mon, 26 Apr 2021 06:17:27 GMT expires: - '-1' pragma: @@ -1637,16 +1635,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1?api-version=2015-10-31 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1","name":"webhook1","type":"Microsoft.Automation/AutomationAccounts/Webhooks","properties":{"isEnabled":false,"expiryTime":"2021-03-29T22:18:13.700287+00:00","runbook":{"name":"Get-AzureVMTutorial"},"lastInvokedTime":null,"runOn":null,"parameters":null,"uri":"","creationTime":"2021-03-16T09:08:44.548398+00:00","lastModifiedBy":"","lastModifiedTime":"2021-03-16T09:09:26.9895738+00:00"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1","name":"webhook1","type":"Microsoft.Automation/AutomationAccounts/Webhooks","properties":{"isEnabled":false,"expiryTime":"2021-12-29T22:18:13.700287+00:00","runbook":{"name":"Get-AzureVMTutorial"},"lastInvokedTime":null,"runOn":null,"parameters":null,"uri":"","creationTime":"2021-04-26T06:16:45.1536344+00:00","lastModifiedBy":"","lastModifiedTime":"2021-04-26T06:17:28.1445247+00:00"}}' headers: cache-control: - no-cache content-length: - - '599' + - '605' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:09:27 GMT + - Mon, 26 Apr 2021 06:17:28 GMT expires: - '-1' pragma: @@ -1670,8 +1668,7 @@ interactions: message: OK - request: body: '{"properties": {"contentLink": {"uri": "https://teststorage.blob.core.windows.net/mycontainer/MyModule.zip", - "contentHash": {"algorithm": "sha265", "value": "07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"}, - "version": "1.0.0.0"}}}' + "contentHash": {"algorithm": "sha265", "value": "FakeValue"}, "version": "1.0.0.0"}}}' headers: Accept: - application/json @@ -1690,16 +1687,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1","name":"module1","type":"Microsoft.Automation/AutomationAccounts/Modules","location":"East - US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-03-16T09:08:38.16+00:00","lastModifiedTime":"2021-03-16T09:08:38.217+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}' + US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-04-26T06:16:38.167+00:00","lastModifiedTime":"2021-04-26T06:16:38.317+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}' headers: cache-control: - no-cache content-length: - - '596' + - '602' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:09:27 GMT + - Mon, 26 Apr 2021 06:17:28 GMT expires: - '-1' pragma: @@ -1747,7 +1744,7 @@ interactions: content-length: - '0' date: - - Tue, 16 Mar 2021 09:10:27 GMT + - Mon, 26 Apr 2021 06:18:30 GMT expires: - '-1' pragma: @@ -1784,7 +1781,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/listKeys?api-version=2019-06-01 response: body: - string: '{"keys":[{"KeyName":"Primary","Permissions":"Full","Value":"B2vQmpUhg+EcPTOmmB+cCMEB8BPSQyqbDgTrO0lBYQ6ZUIN0R3tjA466+cbKFqMpsbPhF5ofoPcheLdjfWjY6A=="},{"KeyName":"Secondary","Permissions":"Full","Value":"/4BG/XRYIQxkZjg/i/s1dEEl2e0O2p9VpCj0QOND6w5Iv3imuuX6/IDD14ViP13FEtsaN0bTR9424r6knhTKAQ=="}]}' + string: '{"keys":[{"KeyName":"Primary","Permissions":"Full","Value":"FakeValue"},{"KeyName":"Secondary","Permissions":"Full","Value":"FakeValue"}]}' headers: cache-control: - no-cache @@ -1793,7 +1790,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:10:27 GMT + - Mon, 26 Apr 2021 06:18:31 GMT expires: - '-1' pragma: @@ -1838,16 +1835,16 @@ interactions: response: body: string: '{"name":"myAutomationAccount9","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9","type":"Microsoft.Automation/AutomationAccounts","location":"East - US 2","tags":{},"etag":null,"properties":{"sku":{"name":"Basic","family":null,"capacity":null},"state":"Ok","RegistrationUrl":"https://4ce1a53f-b815-4200-af5f-96601848a9d9.agentsvc.eus2.azure-automation.net/accounts/4ce1a53f-b815-4200-af5f-96601848a9d9","creationTime":"2021-03-16T09:08:29.5+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-03-16T09:10:28.92+00:00"}}' + US 2","tags":{},"etag":null,"properties":{"sku":{"name":"Basic","family":null,"capacity":null},"state":"Ok","RegistrationUrl":"https://b2be1457-9afa-4398-8c77-0e9aa7479152.agentsvc.eus2.azure-automation.net/accounts/b2be1457-9afa-4398-8c77-0e9aa7479152","creationTime":"2021-04-26T06:16:28.93+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-26T06:18:31.48+00:00"}}' headers: cache-control: - no-cache content-length: - - '663' + - '669' content-type: - application/json; charset=utf-8 date: - - Tue, 16 Mar 2021 09:10:28 GMT + - Mon, 26 Apr 2021 06:18:31 GMT expires: - '-1' pragma: @@ -1895,7 +1892,7 @@ interactions: content-length: - '0' date: - - Tue, 16 Mar 2021 09:10:28 GMT + - Mon, 26 Apr 2021 06:18:32 GMT expires: - '-1' pragma: @@ -1939,7 +1936,7 @@ interactions: content-length: - '0' date: - - Tue, 16 Mar 2021 09:10:32 GMT + - Mon, 26 Apr 2021 06:18:35 GMT expires: - '-1' pragma: @@ -1983,7 +1980,7 @@ interactions: content-length: - '0' date: - - Tue, 16 Mar 2021 09:10:32 GMT + - Mon, 26 Apr 2021 06:18:35 GMT expires: - '-1' pragma: @@ -2027,7 +2024,7 @@ interactions: content-length: - '0' date: - - Tue, 16 Mar 2021 09:10:34 GMT + - Mon, 26 Apr 2021 06:18:37 GMT expires: - '-1' pragma: @@ -2069,7 +2066,7 @@ interactions: content-length: - '0' date: - - Tue, 16 Mar 2021 09:10:39 GMT + - Mon, 26 Apr 2021 06:18:42 GMT expires: - '-1' pragma: @@ -2113,7 +2110,7 @@ interactions: content-length: - '0' date: - - Tue, 16 Mar 2021 09:10:40 GMT + - Mon, 26 Apr 2021 06:18:43 GMT expires: - '-1' pragma: @@ -2157,7 +2154,7 @@ interactions: content-length: - '0' date: - - Tue, 16 Mar 2021 09:10:45 GMT + - Mon, 26 Apr 2021 06:18:48 GMT expires: - '-1' pragma: diff --git a/sdk/automation/azure-mgmt-automation/tests/test_cli_mgmt_automation.py b/sdk/automation/azure-mgmt-automation/tests/test_cli_mgmt_automation.py index bbf24ce2732e..0a1da7020224 100644 --- a/sdk/automation/azure-mgmt-automation/tests/test_cli_mgmt_automation.py +++ b/sdk/automation/azure-mgmt-automation/tests/test_cli_mgmt_automation.py @@ -30,10 +30,12 @@ class MgmtAutomationClientTest(AzureMgmtTestCase): def setUp(self): super(MgmtAutomationClientTest, self).setUp() + self.re_replacer.register_pattern_pair('"value": ".{64}"', '"value": "FakeValue"') + self.re_replacer.register_pattern_pair('"Value":".{88}"', '"Value":"FakeValue"') self.mgmt_client = self.create_mgmt_client( azure.mgmt.automation.AutomationClient ) - + @ResourceGroupPreparer(location=AZURE_LOCATION) def test_automation(self, resource_group): @@ -50,7 +52,7 @@ def test_automation(self, resource_group): "sku": { "name": "Free" }, - "name": "myAutomationAccount9", + "name": AUTOMATION_ACCOUNT_NAME, "location": "East US 2" } result = self.mgmt_client.automation_account.create_or_update(resource_group.name, AUTOMATION_ACCOUNT_NAME, BODY) @@ -127,7 +129,7 @@ def test_automation(self, resource_group): "name": "TestWebhook", "is_enabled": True, "uri": "https://s1events.azure-automation.net/webhooks?token=7u3KfQvM1vUPWaDMFRv2%2fAA4Jqx8QwS8aBuyO6Xsdcw%3d", - "expiry_time": "2021-03-29T22:18:13.7002872Z", + "expiry_time": "2021-12-29T22:18:13.7002872Z", "runbook": { "name": RUNBOOK_NAME } diff --git a/tools/azure-sdk-tools/devtools_testutils/mgmt_testcase.py b/tools/azure-sdk-tools/devtools_testutils/mgmt_testcase.py index b38efc7472db..f8b95831efa8 100644 --- a/tools/azure-sdk-tools/devtools_testutils/mgmt_testcase.py +++ b/tools/azure-sdk-tools/devtools_testutils/mgmt_testcase.py @@ -5,6 +5,8 @@ # -------------------------------------------------------------------------- from collections import namedtuple import inspect +import re +import six import os.path import zlib @@ -17,6 +19,7 @@ DeploymentNameReplacer, RequestUrlNormalizer, ) +from azure_devtools.scenario_tests.utilities import is_text_payload from .azure_testcase import AzureTestCase from .config import TEST_SETTING_FILENAME from . import mgmt_settings_fake as fake_settings @@ -65,6 +68,7 @@ def __init__( **kwargs ): self.region = "westus" + self.re_replacer = RENameReplacer() super(AzureMgmtTestCase, self).__init__( method_name, config_file=config_file, @@ -76,6 +80,7 @@ def __init__( replay_patches=replay_patches, **kwargs ) + self.recording_processors.append(self.re_replacer) def _setup_scrubber(self): constants_to_scrub = ["SUBSCRIPTION_ID", "TENANT_ID"] @@ -177,3 +182,43 @@ def create_mgmt_client(self, client_class, **kwargs): return self.test_class_instance.create_basic_client( client_class, subscription_id=subscription_id, **kwargs ) + +class RENameReplacer(GeneralNameReplacer): + + def __init__(self): + super(RENameReplacer, self).__init__() + self.patterns = list() + + def register_pattern_pair(self, expr, new): + self.patterns.append((expr, new)) + + def process_request(self, request): + request = super(RENameReplacer, self).process_request(request) + for expr, new in self.patterns: + if is_text_payload(request) and request.body: + if isinstance(request.body, dict): + continue + + body = six.ensure_str(request.body) + for old in re.findall(expr, body): + request.body = body.replace(old, new) + return request + + def process_response(self, response): + response = super(RENameReplacer, self).process_response(response) + for expr, new in self.patterns: + if is_text_payload(response) and response['body']['string']: + if isinstance(response['body']['string'], bytes): + body = response['body']['string'].decode('utf8', 'backslashreplace') + else: + body = response['body']['string'] + + + for old in re.findall(expr, body): + body = body.replace(old, new) + + if isinstance(response['body']['string'], bytes): + response['body']['string'] = body.encode('utf8', 'backslashreplace') + else: + response['body']['string'] = body + return response From 1adf97da96b135f19affaed853112a6f5249cb9e Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Tue, 27 Apr 2021 12:19:06 +0800 Subject: [PATCH 2/2] Hide RegistrationUrl --- ...t_cli_mgmt_automation.test_automation.yaml | 198 +++++++++--------- .../tests/test_cli_mgmt_automation.py | 4 + .../devtools_testutils/mgmt_testcase.py | 2 +- 3 files changed, 104 insertions(+), 100 deletions(-) diff --git a/sdk/automation/azure-mgmt-automation/tests/recordings/test_cli_mgmt_automation.test_automation.yaml b/sdk/automation/azure-mgmt-automation/tests/recordings/test_cli_mgmt_automation.test_automation.yaml index 149bfa2baa5c..57fcb274b85d 100644 --- a/sdk/automation/azure-mgmt-automation/tests/recordings/test_cli_mgmt_automation.test_automation.yaml +++ b/sdk/automation/azure-mgmt-automation/tests/recordings/test_cli_mgmt_automation.test_automation.yaml @@ -20,7 +20,7 @@ interactions: response: body: string: '{"name":"myAutomationAccount9","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9","type":"Microsoft.Automation/AutomationAccounts","location":"East - US 2","tags":{},"etag":null,"properties":{"sku":{"name":"Basic","family":null,"capacity":null},"state":"Ok","RegistrationUrl":"https://b2be1457-9afa-4398-8c77-0e9aa7479152.agentsvc.eus2.azure-automation.net/accounts/b2be1457-9afa-4398-8c77-0e9aa7479152","creationTime":"2021-04-26T06:16:28.93+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-26T06:16:28.93+00:00"}}' + US 2","tags":{},"etag":null,"properties":{"sku":{"name":"Basic","family":null,"capacity":null},"state":"Ok","RegistrationUrl":"FakeUrl","creationTime":"2021-04-27T03:37:55.95+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-27T03:37:55.95+00:00"}}' headers: cache-control: - no-cache @@ -29,7 +29,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:31 GMT + - Tue, 27 Apr 2021 03:37:58 GMT expires: - '-1' location: @@ -78,19 +78,19 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft","name":"runbook_draft","type":"Microsoft.Automation/AutomationAccounts/Runbooks","location":"East - US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637550145955600000\"","properties":{"description":"Description - of the Runbook","logVerbose":false,"logProgress":false,"logActivityTrace":0,"runbookType":"PowerShellWorkflow","parameters":{},"state":"New","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-04-26T06:16:35.56+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-26T06:16:35.56+00:00"}}' + US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637550914814530000\"","properties":{"description":"Description + of the Runbook","logVerbose":false,"logProgress":false,"logActivityTrace":0,"runbookType":"PowerShellWorkflow","parameters":{},"state":"New","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-04-27T03:38:01.453+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-27T03:38:01.453+00:00"}}' headers: cache-control: - no-cache content-length: - - '796' + - '798' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:36 GMT + - Tue, 27 Apr 2021 03:38:02 GMT etag: - - '"637550145955600000"' + - '"637550914814530000"' expires: - '-1' location: @@ -137,16 +137,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1","name":"module1","type":"Microsoft.Automation/AutomationAccounts/Modules","location":"East - US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-04-26T06:16:38.167+00:00","lastModifiedTime":"2021-04-26T06:16:38.317+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}' + US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-04-27T03:38:03.92+00:00","lastModifiedTime":"2021-04-27T03:38:04.013+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}' headers: cache-control: - no-cache content-length: - - '602' + - '601' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:37 GMT + - Tue, 27 Apr 2021 03:38:03 GMT expires: - '-1' location: @@ -196,19 +196,19 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/Get-AzureVMTutorial","name":"Get-AzureVMTutorial","type":"Microsoft.Automation/AutomationAccounts/Runbooks","location":"East - US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637550146008800000\"","properties":{"description":"Description - of the Runbook","logVerbose":false,"logProgress":true,"logActivityTrace":1,"runbookType":"PowerShellWorkflow","parameters":{},"state":"Published","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-04-26T06:16:40.877+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-26T06:16:40.88+00:00"}}' + US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637550914867070000\"","properties":{"description":"Description + of the Runbook","logVerbose":false,"logProgress":true,"logActivityTrace":1,"runbookType":"PowerShellWorkflow","parameters":{},"state":"Published","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-04-27T03:38:06.7+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-27T03:38:06.707+00:00"}}' headers: cache-control: - no-cache content-length: - - '814' + - '813' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:42 GMT + - Tue, 27 Apr 2021 03:38:08 GMT etag: - - '"637550146008800000"' + - '"637550914867070000"' expires: - '-1' location: @@ -254,7 +254,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1?api-version=2019-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1","name":"job1","type":"Microsoft.Automation/AutomationAccounts/Jobs","properties":{"jobId":"c2e58ce8-404f-44ea-9198-34a2e9540d00","creationTime":"2021-04-26T06:16:43.227+00:00","provisioningState":"Processing","status":"New","statusDetails":"None","startedBy":null,"startTime":null,"endTime":null,"lastModifiedTime":"2021-04-26T06:16:43.227+00:00","lastStatusModifiedTime":"2021-04-26T06:16:43.227+00:00","exception":null,"parameters":{"key01":"value01","key02":"value02"},"runOn":"","runbook":{"name":"Get-AzureVMTutorial"}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1","name":"job1","type":"Microsoft.Automation/AutomationAccounts/Jobs","properties":{"jobId":"72051f57-a11f-4558-a795-70f741e6c298","creationTime":"2021-04-27T03:38:09.127+00:00","provisioningState":"Processing","status":"New","statusDetails":"None","startedBy":null,"startTime":null,"endTime":null,"lastModifiedTime":"2021-04-27T03:38:09.127+00:00","lastStatusModifiedTime":"2021-04-27T03:38:09.127+00:00","exception":null,"parameters":{"key01":"value01","key02":"value02"},"runOn":"","runbook":{"name":"Get-AzureVMTutorial"}}}' headers: cache-control: - no-cache @@ -263,7 +263,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:42 GMT + - Tue, 27 Apr 2021 03:38:08 GMT expires: - '-1' location: @@ -309,7 +309,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1?api-version=2015-10-31 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1","name":"webhook1","type":"Microsoft.Automation/AutomationAccounts/Webhooks","properties":{"isEnabled":true,"expiryTime":"2021-12-29T22:18:13.700287+00:00","runbook":{"name":"Get-AzureVMTutorial"},"lastInvokedTime":null,"runOn":null,"parameters":null,"uri":"https://s1events.azure-automation.net/webhooks?token=7u3KfQvM1vUPWaDMFRv2%2fAA4Jqx8QwS8aBuyO6Xsdcw%3d","creationTime":"2021-04-26T06:16:45.1536344+00:00","lastModifiedBy":"","lastModifiedTime":"2021-04-26T06:16:45.1536344+00:00"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1","name":"webhook1","type":"Microsoft.Automation/AutomationAccounts/Webhooks","properties":{"isEnabled":true,"expiryTime":"2021-12-29T22:18:13.700287+00:00","runbook":{"name":"Get-AzureVMTutorial"},"lastInvokedTime":null,"runOn":null,"parameters":null,"uri":"https://s1events.azure-automation.net/webhooks?token=7u3KfQvM1vUPWaDMFRv2%2fAA4Jqx8QwS8aBuyO6Xsdcw%3d","creationTime":"2021-04-27T03:38:11.0968621+00:00","lastModifiedBy":"","lastModifiedTime":"2021-04-27T03:38:11.0968621+00:00"}}' headers: cache-control: - no-cache @@ -318,7 +318,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:44 GMT + - Tue, 27 Apr 2021 03:38:10 GMT expires: - '-1' location: @@ -360,16 +360,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/schedules/mySchedule","name":"mySchedule","type":"Microsoft.Automation/AutomationAccounts/Schedules","properties":{"description":"my - description of schedule goes here","startTime":"2021-06-27T17:28:00+00:00","startTimeOffsetMinutes":0.0,"expiryTime":"2022-01-01T17:28:00+00:00","expiryTimeOffsetMinutes":0.0,"isEnabled":true,"nextRun":"2021-06-27T17:28:00+00:00","nextRunOffsetMinutes":0.0,"interval":1,"frequency":"Hour","creationTime":"2021-04-26T06:16:45.79+00:00","lastModifiedTime":"2021-04-26T06:16:45.79+00:00","timeZone":"UTC","advancedSchedule":null}}' + description of schedule goes here","startTime":"2021-06-27T17:28:00+00:00","startTimeOffsetMinutes":0.0,"expiryTime":"2022-01-01T17:28:00+00:00","expiryTimeOffsetMinutes":0.0,"isEnabled":true,"nextRun":"2021-06-27T17:28:00+00:00","nextRunOffsetMinutes":0.0,"interval":1,"frequency":"Hour","creationTime":"2021-04-27T03:38:11.703+00:00","lastModifiedTime":"2021-04-27T03:38:11.703+00:00","timeZone":"UTC","advancedSchedule":null}}' headers: cache-control: - no-cache content-length: - - '759' + - '761' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:45 GMT + - Tue, 27 Apr 2021 03:38:11 GMT expires: - '-1' location: @@ -415,17 +415,17 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable?api-version=2019-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable","name":"sampleVariable","type":"Microsoft.Automation/AutomationAccounts/Variables","properties":{"creationTime":"2021-04-26T06:16:46.42+00:00","lastModifiedTime":"2021-04-26T06:16:46.42+00:00","isEncrypted":false,"value":"\"ComputerName.domain.com\"","description":"my + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable","name":"sampleVariable","type":"Microsoft.Automation/AutomationAccounts/Variables","properties":{"creationTime":"2021-04-27T03:38:12.347+00:00","lastModifiedTime":"2021-04-27T03:38:12.347+00:00","isEncrypted":false,"value":"\"ComputerName.domain.com\"","description":"my description"}}' headers: cache-control: - no-cache content-length: - - '508' + - '510' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:45 GMT + - Tue, 27 Apr 2021 03:38:12 GMT expires: - '-1' location: @@ -472,7 +472,7 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/credentials/myCredential","name":"myCredential","type":"Microsoft.Automation/AutomationAccounts/Credentials","properties":{"userName":"mylingaiah","description":"my - description goes here","creationTime":"2021-04-26T06:16:47.057+00:00","lastModifiedTime":"2021-04-26T06:16:47.057+00:00"}}' + description goes here","creationTime":"2021-04-27T03:38:13.037+00:00","lastModifiedTime":"2021-04-27T03:38:13.037+00:00"}}' headers: cache-control: - no-cache @@ -481,7 +481,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:46 GMT + - Tue, 27 Apr 2021 03:38:12 GMT expires: - '-1' location: @@ -531,7 +531,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:46 GMT + - Tue, 27 Apr 2021 03:38:13 GMT expires: - '-1' pragma: @@ -577,7 +577,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:47 GMT + - Tue, 27 Apr 2021 03:38:13 GMT expires: - '-1' pragma: @@ -614,7 +614,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/draft?api-version=2019-06-01 response: body: - string: '{"creationTime":"2021-04-26T06:16:35.563+00:00","lastModifiedTime":"2021-04-26T06:16:35.563+00:00","inEdit":true,"parameters":{},"outputTypes":[]}' + string: '{"creationTime":"2021-04-27T03:38:01.453+00:00","lastModifiedTime":"2021-04-27T03:38:01.453+00:00","inEdit":true,"parameters":{},"outputTypes":[]}' headers: cache-control: - no-cache @@ -623,7 +623,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:47 GMT + - Tue, 27 Apr 2021 03:38:13 GMT expires: - '-1' pragma: @@ -661,7 +661,7 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/credentials/myCredential","name":"myCredential","type":"Microsoft.Automation/AutomationAccounts/Credentials","properties":{"userName":"mylingaiah","description":"my - description goes here","creationTime":"2021-04-26T06:16:47.057+00:00","lastModifiedTime":"2021-04-26T06:16:47.057+00:00"}}' + description goes here","creationTime":"2021-04-27T03:38:13.037+00:00","lastModifiedTime":"2021-04-27T03:38:13.037+00:00"}}' headers: cache-control: - no-cache @@ -670,7 +670,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:47 GMT + - Tue, 27 Apr 2021 03:38:14 GMT expires: - '-1' pragma: @@ -716,7 +716,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:48 GMT + - Tue, 27 Apr 2021 03:38:14 GMT expires: - '-1' pragma: @@ -762,7 +762,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:48 GMT + - Tue, 27 Apr 2021 03:38:14 GMT expires: - '-1' pragma: @@ -799,17 +799,17 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable?api-version=2019-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable","name":"sampleVariable","type":"Microsoft.Automation/AutomationAccounts/Variables","properties":{"creationTime":"2021-04-26T06:16:46.42+00:00","lastModifiedTime":"2021-04-26T06:16:46.42+00:00","isEncrypted":false,"value":"\"ComputerName.domain.com\"","description":"my + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable","name":"sampleVariable","type":"Microsoft.Automation/AutomationAccounts/Variables","properties":{"creationTime":"2021-04-27T03:38:12.347+00:00","lastModifiedTime":"2021-04-27T03:38:12.347+00:00","isEncrypted":false,"value":"\"ComputerName.domain.com\"","description":"my description"}}' headers: cache-control: - no-cache content-length: - - '508' + - '510' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:48 GMT + - Tue, 27 Apr 2021 03:38:15 GMT expires: - '-1' pragma: @@ -847,16 +847,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/schedules/mySchedule","name":"mySchedule","type":"Microsoft.Automation/AutomationAccounts/Schedules","properties":{"description":"my - description of schedule goes here","startTime":"2021-06-27T17:28:00+00:00","startTimeOffsetMinutes":0.0,"expiryTime":"2022-01-01T17:28:00+00:00","expiryTimeOffsetMinutes":0.0,"isEnabled":true,"nextRun":"2021-06-27T17:28:00+00:00","nextRunOffsetMinutes":0.0,"interval":1,"frequency":"Hour","creationTime":"2021-04-26T06:16:45.79+00:00","lastModifiedTime":"2021-04-26T06:16:45.79+00:00","timeZone":"UTC","advancedSchedule":null}}' + description of schedule goes here","startTime":"2021-06-27T17:28:00+00:00","startTimeOffsetMinutes":0.0,"expiryTime":"2022-01-01T17:28:00+00:00","expiryTimeOffsetMinutes":0.0,"isEnabled":true,"nextRun":"2021-06-27T17:28:00+00:00","nextRunOffsetMinutes":0.0,"interval":1,"frequency":"Hour","creationTime":"2021-04-27T03:38:11.703+00:00","lastModifiedTime":"2021-04-27T03:38:11.703+00:00","timeZone":"UTC","advancedSchedule":null}}' headers: cache-control: - no-cache content-length: - - '759' + - '761' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:49 GMT + - Tue, 27 Apr 2021 03:38:15 GMT expires: - '-1' pragma: @@ -894,19 +894,19 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/Get-AzureVMTutorial","name":"Get-AzureVMTutorial","type":"Microsoft.Automation/AutomationAccounts/Runbooks","location":"East - US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637550146008800000\"","properties":{"description":"Description - of the Runbook","logVerbose":false,"logProgress":true,"logActivityTrace":1,"runbookType":"PowerShellWorkflow","parameters":{},"state":"Published","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-04-26T06:16:40.877+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-26T06:16:40.88+00:00"}}' + US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637550914867070000\"","properties":{"description":"Description + of the Runbook","logVerbose":false,"logProgress":true,"logActivityTrace":1,"runbookType":"PowerShellWorkflow","parameters":{},"state":"Published","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-04-27T03:38:06.7+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-27T03:38:06.707+00:00"}}' headers: cache-control: - no-cache content-length: - - '814' + - '813' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:49 GMT + - Tue, 27 Apr 2021 03:38:15 GMT etag: - - '"637550146008800000"' + - '"637550914867070000"' expires: - '-1' pragma: @@ -943,7 +943,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1?api-version=2015-10-31 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1","name":"webhook1","type":"Microsoft.Automation/AutomationAccounts/Webhooks","properties":{"isEnabled":true,"expiryTime":"2021-12-29T22:18:13.700287+00:00","runbook":{"name":"Get-AzureVMTutorial"},"lastInvokedTime":null,"runOn":null,"parameters":null,"uri":"","creationTime":"2021-04-26T06:16:45.1536344+00:00","lastModifiedBy":"","lastModifiedTime":"2021-04-26T06:16:45.1536344+00:00"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1","name":"webhook1","type":"Microsoft.Automation/AutomationAccounts/Webhooks","properties":{"isEnabled":true,"expiryTime":"2021-12-29T22:18:13.700287+00:00","runbook":{"name":"Get-AzureVMTutorial"},"lastInvokedTime":null,"runOn":null,"parameters":null,"uri":"","creationTime":"2021-04-27T03:38:11.0968621+00:00","lastModifiedBy":"","lastModifiedTime":"2021-04-27T03:38:11.0968621+00:00"}}' headers: cache-control: - no-cache @@ -952,7 +952,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:49 GMT + - Tue, 27 Apr 2021 03:38:16 GMT expires: - '-1' pragma: @@ -996,7 +996,7 @@ interactions: content-type: - text/plain date: - - Mon, 26 Apr 2021 06:16:50 GMT + - Tue, 27 Apr 2021 03:38:16 GMT expires: - '-1' pragma: @@ -1030,16 +1030,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1","name":"module1","type":"Microsoft.Automation/AutomationAccounts/Modules","location":"East - US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-04-26T06:16:38.167+00:00","lastModifiedTime":"2021-04-26T06:16:38.317+00:00","error":{"code":null,"message":""},"provisioningState":"Creating","isComposite":false}}' + US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-04-27T03:38:03.92+00:00","lastModifiedTime":"2021-04-27T03:38:04.013+00:00","error":{"code":null,"message":""},"provisioningState":"Creating","isComposite":false}}' headers: cache-control: - no-cache content-length: - - '600' + - '599' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:50 GMT + - Tue, 27 Apr 2021 03:38:17 GMT expires: - '-1' pragma: @@ -1076,16 +1076,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1?api-version=2019-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1","name":"job1","type":"Microsoft.Automation/AutomationAccounts/Jobs","properties":{"jobId":"c2e58ce8-404f-44ea-9198-34a2e9540d00","creationTime":"2021-04-26T06:16:43.2302084+00:00","provisioningState":"Processing","status":"Activating","statusDetails":"None","startedBy":"{scrubbed}","startTime":null,"endTime":null,"lastModifiedTime":"2021-04-26T06:16:48.6510374+00:00","lastStatusModifiedTime":"2021-04-26T06:16:48.6510374+00:00","exception":null,"parameters":{"key01":"value01","key02":"value02"},"runOn":"","runbook":{"name":"Get-AzureVMTutorial"}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/jobs/job1","name":"job1","type":"Microsoft.Automation/AutomationAccounts/Jobs","properties":{"jobId":"72051f57-a11f-4558-a795-70f741e6c298","creationTime":"2021-04-27T03:38:09.1442931+00:00","provisioningState":"Processing","status":"Activating","statusDetails":"None","startedBy":"{scrubbed}","startTime":null,"endTime":null,"lastModifiedTime":"2021-04-27T03:38:14.547144+00:00","lastStatusModifiedTime":"2021-04-27T03:38:14.547144+00:00","exception":null,"parameters":{"key01":"value01","key02":"value02"},"runOn":"","runbook":{"name":"Get-AzureVMTutorial"}}}' headers: cache-control: - no-cache content-length: - - '762' + - '760' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:51 GMT + - Tue, 27 Apr 2021 03:38:17 GMT expires: - '-1' pragma: @@ -1133,7 +1133,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:51 GMT + - Tue, 27 Apr 2021 03:38:17 GMT expires: - '-1' pragma: @@ -1171,7 +1171,7 @@ interactions: response: body: string: '{"name":"myAutomationAccount9","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9","type":"Microsoft.Automation/AutomationAccounts","location":"East - US 2","tags":{},"etag":null,"properties":{"sku":{"name":"Basic","family":null,"capacity":null},"state":"Ok","RegistrationUrl":"https://b2be1457-9afa-4398-8c77-0e9aa7479152.agentsvc.eus2.azure-automation.net/accounts/b2be1457-9afa-4398-8c77-0e9aa7479152","creationTime":"2021-04-26T06:16:28.93+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-26T06:16:28.93+00:00"}}' + US 2","tags":{},"etag":null,"properties":{"sku":{"name":"Basic","family":null,"capacity":null},"state":"Ok","RegistrationUrl":"FakeUrl","creationTime":"2021-04-27T03:37:55.95+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-27T03:37:55.95+00:00"}}' headers: cache-control: - no-cache @@ -1180,11 +1180,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:51 GMT + - Tue, 27 Apr 2021 03:38:18 GMT expires: - '-1' ocp-automation-accountid: - - b2be1457-9afa-4398-8c77-0e9aa7479152 + - f11fb34f-9f0d-4cb8-bd61-851806901599 pragma: - no-cache server: @@ -1225,16 +1225,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1","name":"module1","type":"Microsoft.Automation/AutomationAccounts/Modules","location":"East - US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-04-26T06:16:38.167+00:00","lastModifiedTime":"2021-04-26T06:16:38.317+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}' + US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-04-27T03:38:03.92+00:00","lastModifiedTime":"2021-04-27T03:38:04.013+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}' headers: cache-control: - no-cache content-length: - - '602' + - '601' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:16:52 GMT + - Tue, 27 Apr 2021 03:38:18 GMT expires: - '-1' pragma: @@ -1282,16 +1282,16 @@ interactions: content-length: - '0' date: - - Mon, 26 Apr 2021 06:16:53 GMT + - Tue, 27 Apr 2021 03:38:19 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/2fbf3aa3-4869-453f-89c5-e5c2447c4e66?api-version=2019-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/0e6796fb-3b8c-4c76-9e82-4003fcb0f752?api-version=2019-06-01 ocp-automation-operationresultid: - - 2fbf3aa3-4869-453f-89c5-e5c2447c4e66 - - 2fbf3aa3-4869-453f-89c5-e5c2447c4e66 + - 0e6796fb-3b8c-4c76-9e82-4003fcb0f752 + - 0e6796fb-3b8c-4c76-9e82-4003fcb0f752 ocp-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/2fbf3aa3-4869-453f-89c5-e5c2447c4e66?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/0e6796fb-3b8c-4c76-9e82-4003fcb0f752?api-version=2019-06-01 pragma: - no-cache server: @@ -1303,7 +1303,7 @@ interactions: x-content-type-options: - nosniff x-ms-location: - - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/2fbf3aa3-4869-453f-89c5-e5c2447c4e66?api-version=2019-06-01 + - https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/rgpy-test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/0e6796fb-3b8c-4c76-9e82-4003fcb0f752?api-version=2019-06-01 x-ms-ratelimit-remaining-subscription-writes: - '1199' x-powered-by: @@ -1323,7 +1323,7 @@ interactions: User-Agent: - azsdk-python-mgmt-automation/1.1.0b1 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/2fbf3aa3-4869-453f-89c5-e5c2447c4e66?api-version=2019-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/runbook_draft/publish/operationResults/0e6796fb-3b8c-4c76-9e82-4003fcb0f752?api-version=2019-06-01 response: body: string: '' @@ -1335,7 +1335,7 @@ interactions: content-type: - text/plain; charset=utf-8 date: - - Mon, 26 Apr 2021 06:17:24 GMT + - Tue, 27 Apr 2021 03:38:49 GMT expires: - '-1' pragma: @@ -1374,7 +1374,7 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/credentials/myCredential","name":"myCredential","type":"Microsoft.Automation/AutomationAccounts/Credentials","properties":{"userName":"mylingaiah","description":"my - description goes here","creationTime":"2021-04-26T06:16:47.057+00:00","lastModifiedTime":"2021-04-26T06:16:47.057+00:00"}}' + description goes here","creationTime":"2021-04-27T03:38:13.037+00:00","lastModifiedTime":"2021-04-27T03:38:13.037+00:00"}}' headers: cache-control: - no-cache @@ -1383,7 +1383,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:17:24 GMT + - Tue, 27 Apr 2021 03:38:50 GMT expires: - '-1' pragma: @@ -1426,7 +1426,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable?api-version=2019-06-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable","name":"sampleVariable","type":"Microsoft.Automation/AutomationAccounts/Variables","properties":{"creationTime":"2021-04-26T06:16:46.42+00:00","lastModifiedTime":"2021-04-26T06:17:25.667+00:00","isEncrypted":false,"value":"\"ComputerName3.domain.com\"","description":"my + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/variables/sampleVariable","name":"sampleVariable","type":"Microsoft.Automation/AutomationAccounts/Variables","properties":{"creationTime":"2021-04-27T03:38:12.347+00:00","lastModifiedTime":"2021-04-27T03:38:51.76+00:00","isEncrypted":false,"value":"\"ComputerName3.domain.com\"","description":"my description"}}' headers: cache-control: @@ -1436,7 +1436,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:17:25 GMT + - Tue, 27 Apr 2021 03:38:51 GMT expires: - '-1' pragma: @@ -1481,16 +1481,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/schedules/mySchedule","name":"mySchedule","type":"Microsoft.Automation/AutomationAccounts/Schedules","properties":{"description":"my - updated description of schedule goes here","startTime":"2021-06-27T17:28:00+00:00","startTimeOffsetMinutes":0.0,"expiryTime":"2022-01-01T17:28:00+00:00","expiryTimeOffsetMinutes":0.0,"isEnabled":false,"nextRun":"2021-06-27T17:28:00+00:00","nextRunOffsetMinutes":0.0,"interval":1,"frequency":"Hour","creationTime":"2021-04-26T06:16:45.79+00:00","lastModifiedTime":"2021-04-26T06:16:45.79+00:00","timeZone":"UTC","advancedSchedule":null}}' + updated description of schedule goes here","startTime":"2021-06-27T17:28:00+00:00","startTimeOffsetMinutes":0.0,"expiryTime":"2022-01-01T17:28:00+00:00","expiryTimeOffsetMinutes":0.0,"isEnabled":false,"nextRun":"2021-06-27T17:28:00+00:00","nextRunOffsetMinutes":0.0,"interval":1,"frequency":"Hour","creationTime":"2021-04-27T03:38:11.703+00:00","lastModifiedTime":"2021-04-27T03:38:11.703+00:00","timeZone":"UTC","advancedSchedule":null}}' headers: cache-control: - no-cache content-length: - - '768' + - '770' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:17:26 GMT + - Tue, 27 Apr 2021 03:38:51 GMT expires: - '-1' pragma: @@ -1535,19 +1535,19 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runbooks/Get-AzureVMTutorial","name":"Get-AzureVMTutorial","type":"Microsoft.Automation/AutomationAccounts/Runbooks","location":"East - US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637550146469030000\"","properties":{"description":"Updated - Description of the Runbook","logVerbose":false,"logProgress":true,"logActivityTrace":1,"runbookType":"PowerShellWorkflow","parameters":{},"state":"Published","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-04-26T06:16:40.877+00:00","lastModifiedBy":"{scrubbed}","lastModifiedTime":"2021-04-26T06:17:26.903+00:00"}}' + US 2","tags":{"tag01":"value01","tag02":"value02"},"etag":"\"637550915330670000\"","properties":{"description":"Updated + Description of the Runbook","logVerbose":false,"logProgress":true,"logActivityTrace":1,"runbookType":"PowerShellWorkflow","parameters":{},"state":"Published","jobCount":0,"provisioningState":"Succeeded","serviceManagementTags":null,"outputTypes":[],"creationTime":"2021-04-27T03:38:06.7+00:00","lastModifiedBy":"{scrubbed}","lastModifiedTime":"2021-04-27T03:38:53.067+00:00"}}' headers: cache-control: - no-cache content-length: - - '831' + - '829' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:17:26 GMT + - Tue, 27 Apr 2021 03:38:52 GMT etag: - - '"637550146469030000"' + - '"637550915330670000"' expires: - '-1' pragma: @@ -1595,7 +1595,7 @@ interactions: content-length: - '0' date: - - Mon, 26 Apr 2021 06:17:27 GMT + - Tue, 27 Apr 2021 03:38:52 GMT expires: - '-1' pragma: @@ -1635,7 +1635,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1?api-version=2015-10-31 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1","name":"webhook1","type":"Microsoft.Automation/AutomationAccounts/Webhooks","properties":{"isEnabled":false,"expiryTime":"2021-12-29T22:18:13.700287+00:00","runbook":{"name":"Get-AzureVMTutorial"},"lastInvokedTime":null,"runOn":null,"parameters":null,"uri":"","creationTime":"2021-04-26T06:16:45.1536344+00:00","lastModifiedBy":"","lastModifiedTime":"2021-04-26T06:17:28.1445247+00:00"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/webhooks/webhook1","name":"webhook1","type":"Microsoft.Automation/AutomationAccounts/Webhooks","properties":{"isEnabled":false,"expiryTime":"2021-12-29T22:18:13.700287+00:00","runbook":{"name":"Get-AzureVMTutorial"},"lastInvokedTime":null,"runOn":null,"parameters":null,"uri":"","creationTime":"2021-04-27T03:38:11.0968621+00:00","lastModifiedBy":"","lastModifiedTime":"2021-04-27T03:38:54.2752991+00:00"}}' headers: cache-control: - no-cache @@ -1644,7 +1644,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:17:28 GMT + - Tue, 27 Apr 2021 03:38:53 GMT expires: - '-1' pragma: @@ -1687,16 +1687,16 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/modules/module1","name":"module1","type":"Microsoft.Automation/AutomationAccounts/Modules","location":"East - US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-04-26T06:16:38.167+00:00","lastModifiedTime":"2021-04-26T06:16:38.317+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}' + US 2","tags":{},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2021-04-27T03:38:03.92+00:00","lastModifiedTime":"2021-04-27T03:38:04.013+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}' headers: cache-control: - no-cache content-length: - - '602' + - '601' content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:17:28 GMT + - Tue, 27 Apr 2021 03:38:54 GMT expires: - '-1' pragma: @@ -1744,7 +1744,7 @@ interactions: content-length: - '0' date: - - Mon, 26 Apr 2021 06:18:30 GMT + - Tue, 27 Apr 2021 03:39:55 GMT expires: - '-1' pragma: @@ -1790,7 +1790,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:18:31 GMT + - Tue, 27 Apr 2021 03:39:55 GMT expires: - '-1' pragma: @@ -1835,7 +1835,7 @@ interactions: response: body: string: '{"name":"myAutomationAccount9","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_automation_test_automation53db109a/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9","type":"Microsoft.Automation/AutomationAccounts","location":"East - US 2","tags":{},"etag":null,"properties":{"sku":{"name":"Basic","family":null,"capacity":null},"state":"Ok","RegistrationUrl":"https://b2be1457-9afa-4398-8c77-0e9aa7479152.agentsvc.eus2.azure-automation.net/accounts/b2be1457-9afa-4398-8c77-0e9aa7479152","creationTime":"2021-04-26T06:16:28.93+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-26T06:18:31.48+00:00"}}' + US 2","tags":{},"etag":null,"properties":{"sku":{"name":"Basic","family":null,"capacity":null},"state":"Ok","RegistrationUrl":"FakeUrl","creationTime":"2021-04-27T03:37:55.95+00:00","lastModifiedBy":null,"lastModifiedTime":"2021-04-27T03:39:56.42+00:00"}}' headers: cache-control: - no-cache @@ -1844,7 +1844,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 26 Apr 2021 06:18:31 GMT + - Tue, 27 Apr 2021 03:39:56 GMT expires: - '-1' pragma: @@ -1892,7 +1892,7 @@ interactions: content-length: - '0' date: - - Mon, 26 Apr 2021 06:18:32 GMT + - Tue, 27 Apr 2021 03:39:56 GMT expires: - '-1' pragma: @@ -1936,7 +1936,7 @@ interactions: content-length: - '0' date: - - Mon, 26 Apr 2021 06:18:35 GMT + - Tue, 27 Apr 2021 03:40:00 GMT expires: - '-1' pragma: @@ -1980,7 +1980,7 @@ interactions: content-length: - '0' date: - - Mon, 26 Apr 2021 06:18:35 GMT + - Tue, 27 Apr 2021 03:40:00 GMT expires: - '-1' pragma: @@ -2024,7 +2024,7 @@ interactions: content-length: - '0' date: - - Mon, 26 Apr 2021 06:18:37 GMT + - Tue, 27 Apr 2021 03:40:02 GMT expires: - '-1' pragma: @@ -2066,7 +2066,7 @@ interactions: content-length: - '0' date: - - Mon, 26 Apr 2021 06:18:42 GMT + - Tue, 27 Apr 2021 03:40:08 GMT expires: - '-1' pragma: @@ -2110,7 +2110,7 @@ interactions: content-length: - '0' date: - - Mon, 26 Apr 2021 06:18:43 GMT + - Tue, 27 Apr 2021 03:40:08 GMT expires: - '-1' pragma: @@ -2154,7 +2154,7 @@ interactions: content-length: - '0' date: - - Mon, 26 Apr 2021 06:18:48 GMT + - Tue, 27 Apr 2021 03:40:13 GMT expires: - '-1' pragma: diff --git a/sdk/automation/azure-mgmt-automation/tests/test_cli_mgmt_automation.py b/sdk/automation/azure-mgmt-automation/tests/test_cli_mgmt_automation.py index 0a1da7020224..7c7a646eb002 100644 --- a/sdk/automation/azure-mgmt-automation/tests/test_cli_mgmt_automation.py +++ b/sdk/automation/azure-mgmt-automation/tests/test_cli_mgmt_automation.py @@ -32,6 +32,10 @@ def setUp(self): super(MgmtAutomationClientTest, self).setUp() self.re_replacer.register_pattern_pair('"value": ".{64}"', '"value": "FakeValue"') self.re_replacer.register_pattern_pair('"Value":".{88}"', '"Value":"FakeValue"') + self.re_replacer.register_pattern_pair( + '"RegistrationUrl":"https://.*/accounts/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"', + '"RegistrationUrl":"FakeUrl"' + ) self.mgmt_client = self.create_mgmt_client( azure.mgmt.automation.AutomationClient ) diff --git a/tools/azure-sdk-tools/devtools_testutils/mgmt_testcase.py b/tools/azure-sdk-tools/devtools_testutils/mgmt_testcase.py index f8b95831efa8..b12b518eed9b 100644 --- a/tools/azure-sdk-tools/devtools_testutils/mgmt_testcase.py +++ b/tools/azure-sdk-tools/devtools_testutils/mgmt_testcase.py @@ -187,7 +187,7 @@ class RENameReplacer(GeneralNameReplacer): def __init__(self): super(RENameReplacer, self).__init__() - self.patterns = list() + self.patterns = [] def register_pattern_pair(self, expr, new): self.patterns.append((expr, new))