diff --git a/src/workloads/azext_workloads/tests/latest/recordings/test_workloads_svi_update_tags.yaml b/src/workloads/azext_workloads/tests/latest/recordings/test_workloads_svi_update_tags.yaml index 1223ff06038..f124677fcb3 100644 --- a/src/workloads/azext_workloads/tests/latest/recordings/test_workloads_svi_update_tags.yaml +++ b/src/workloads/azext_workloads/tests/latest/recordings/test_workloads_svi_update_tags.yaml @@ -1,59 +1,6 @@ interactions: - request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - workloads sap-virtual-instance update - Connection: - - keep-alive - ParameterSetName: - - -g -n --tags - User-Agent: - - AZURECLI/2.47.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.10 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36?api-version=2023-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36","name":"C36","type":"microsoft.workloads/sapvirtualinstances","location":"eastus","tags":{"tag":"test","tag2":"test2"},"systemData":{"createdBy":"mohitaneja@microsoft.com","createdByType":"User","createdAt":"2023-04-10T05:02:26.4905671Z","lastModifiedBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","lastModifiedByType":"Application","lastModifiedAt":"2023-04-10T08:20:33.5239413Z"},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/SAP-E2ETest-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/E2E-RBAC-MSI":{"principalId":"b7202d53-6b98-4194-8748-4f13a9000072","clientId":"914aa6fe-5e5f-4b55-9b68-39da0ad86ee7"}}},"properties":{"environment":"NonProd","sapProduct":"S4HANA","configuration":{"configurationType":"Discovery","appLocation":"eastus","centralServerVmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TestRG/providers/Microsoft.Compute/virtualMachines/c36ascsvm"},"managedResourceGroupConfiguration":{"name":"mrg-C36-541bd0"},"status":"Offline","health":"Unknown","state":"RegistrationComplete","provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '1293' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 10 Apr 2023 08:23:43 GMT - etag: - - '"6a00362f-0000-0100-0000-6433c6d10000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - status: - code: 200 - message: OK -- request: - body: '{"identity": {"type": "UserAssigned", "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/SAP-E2ETest-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/E2E-RBAC-MSI": - {}}}, "location": "eastus", "properties": {"configuration": {"configurationType": - "Discovery", "centralServerVmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TestRG/providers/Microsoft.Compute/virtualMachines/c36ascsvm"}, - "environment": "NonProd", "health": "Unknown", "managedResourceGroupConfiguration": - {"name": "mrg-C36-541bd0"}, "sapProduct": "S4HANA", "state": "RegistrationComplete", - "status": "Offline"}, "tags": {"tag": "test", "tag2": "test2"}}' + body: '{"tags": {"tag": "test", "tag2": "test2"}}' headers: Accept: - application/json @@ -64,37 +11,53 @@ interactions: Connection: - keep-alive Content-Length: - - '706' + - '42' Content-Type: - application/json ParameterSetName: - -g -n --tags User-Agent: - AZURECLI/2.47.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.10 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36?api-version=2023-04-01 + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/U77-rg/providers/Microsoft.Workloads/sapVirtualInstances/U77?api-version=2023-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36","name":"C36","type":"microsoft.workloads/sapvirtualinstances","location":"eastus","tags":{"tag":"test","tag2":"test2"},"systemData":{"createdBy":"mohitaneja@microsoft.com","createdByType":"User","createdAt":"2023-04-10T05:02:26.4905671Z","lastModifiedBy":"mohitaneja@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-04-10T08:23:44.2351338Z"},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/SAP-E2ETest-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/E2E-RBAC-MSI":{"principalId":"b7202d53-6b98-4194-8748-4f13a9000072","clientId":"914aa6fe-5e5f-4b55-9b68-39da0ad86ee7"}}},"properties":{"environment":"NonProd","sapProduct":"S4HANA","configuration":{"configurationType":"Discovery","appLocation":"eastus","centralServerVmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TestRG/providers/Microsoft.Compute/virtualMachines/c36ascsvm"},"managedResourceGroupConfiguration":{"name":"mrg-C36-541bd0"},"status":"Offline","health":"Unknown","state":"RegistrationComplete","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/U77-rg/providers/Microsoft.Workloads/sapVirtualInstances/U77","name":"U77","type":"microsoft.workloads/sapvirtualinstances","location":"centraluseuap","tags":{"tag":"test","tag2":"test2"},"systemData":{"createdBy":"mohitaneja@microsoft.com","createdByType":"User","createdAt":"2022-09-08T12:55:39.5330848Z","lastModifiedBy":"mohitaneja@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-04-21T08:59:32.5774674Z"},"properties":{"environment":"Prod","sapProduct":"S/4HANA","configuration":{"configurationType":"Discovery","appLocation":"eastus","centralServerVmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/E2E-SVI-08SEP-B760-AVZONE-SLES-SAP-15-SP3-GEN2/providers/Microsoft.Compute/virtualMachines/u77ascszavm"},"managedResourceGroupConfiguration":{"name":"mrg-U77-220271"},"status":"Unavailable","health":"Unknown","state":"RegistrationComplete","errors":{"properties":{"code":"HealthAndStatusFailure","message":"\n Unable + to fetch health and status data from primary central server.\n Possible + causes:\n - The storage account may have been deleted.\n - The + role assignment from central server VM(s) to managed RG might be unassigned.\n - + The central server VM(s) system assigned managed identity might be disabled.\n - + The VM might be not running.\n - The VM might have networking issues.\n - + The monitoring extension might not be running on the central server VM.\n Recommended + Action: Status monitoring service will retry the operation, if issue persists + for more than 30 mins then please contact support.\n ","details":[{"code":"ChangeDetectionVisCentralVmNotFound","message":"\n SAP + central instance virtual machine with id - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/E2E-SVI-08SEP-B760-AVZONE-SLES-SAP-15-SP3-GEN2/providers/Microsoft.Compute/virtualMachines/u77ascszavm + was not found.\n Possible Causes: The SAP central instance virtual machine + was deleted or moved to a different Resource group/subscription.\n Recommended + Action: In order to view new updates to the Virtual Instance for SAP metadata, + please ensure the central server virtual machine is existing in Resource group + U77-rg.\n If the virtual machine /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/E2E-SVI-08SEP-B760-AVZONE-SLES-SAP-15-SP3-GEN2/providers/Microsoft.Compute/virtualMachines/u77ascszavm + exists, please wait for an hour for the change to be detected. If the issue + still persists, please contact support.\n ","details":[]}]}},"provisioningState":"Succeeded"}}' headers: api-supported-versions: - 2021-12-01-preview, 2022-10-15-preview, 2022-11-01-preview, 2023-04-01 azure-asyncoperation: - - subscriptions/49d64d54-e966-4c46-a868-1999802b762c/providers/Microsoft.Workloads/locations/EASTUS/operationStatuses/4e3f7e0f-8632-47d4-941e-e9cbc690e365*6F14B96698AE42F247D93F38E78B89C85F55FD5C3DACCE2FB375E09237D3E630?api-version=2023-04-01 + - subscriptions/49d64d54-e966-4c46-a868-1999802b762c/providers/Microsoft.Workloads/locations/CENTRALUSEUAP/operationStatuses/6e1ce09a-45b0-414c-a19d-eef8338d5065*282FF9D36625B70B7671EBBECC70D0807CBAE5F901A24D0143C35D907481B455?api-version=2023-04-01 cache-control: - no-cache content-length: - - '1274' + - '2683' content-type: - application/json; charset=utf-8 date: - - Mon, 10 Apr 2023 08:23:48 GMT + - Fri, 21 Apr 2023 08:59:37 GMT etag: - - '"6a000c48-0000-0100-0000-6433c7920000"' + - '"04005f99-0000-3400-0000-644250760000"' expires: - '-1' mise-correlation-id: - - 4a41046a-e8d2-4ee4-b343-f6b2c6d28a6b + - 47be1437-d03f-454e-9509-2261ead7d054 pragma: - no-cache strict-transport-security: @@ -108,158 +71,12 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - workloads sap-virtual-instance update - Connection: - - keep-alive - ParameterSetName: - - -g -n --tags - User-Agent: - - AZURECLI/2.47.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.10 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Workloads/locations/EASTUS/operationStatuses/4e3f7e0f-8632-47d4-941e-e9cbc690e365*6F14B96698AE42F247D93F38E78B89C85F55FD5C3DACCE2FB375E09237D3E630?api-version=2023-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Workloads/locations/EASTUS/operationStatuses/4e3f7e0f-8632-47d4-941e-e9cbc690e365*6F14B96698AE42F247D93F38E78B89C85F55FD5C3DACCE2FB375E09237D3E630","name":"4e3f7e0f-8632-47d4-941e-e9cbc690e365*6F14B96698AE42F247D93F38E78B89C85F55FD5C3DACCE2FB375E09237D3E630","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36","status":"Succeeded","startTime":"2023-04-10T08:23:45.6902492Z","properties":null}' - headers: - cache-control: - - no-cache - content-length: - - '568' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 10 Apr 2023 08:24:18 GMT - etag: - - '"60006008-0000-0100-0000-6433c7920000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - workloads sap-virtual-instance update - Connection: - - keep-alive - ParameterSetName: - - -g -n --tags - User-Agent: - - AZURECLI/2.47.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.10 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36?api-version=2023-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36","name":"C36","type":"microsoft.workloads/sapvirtualinstances","location":"eastus","tags":{"tag":"test","tag2":"test2"},"systemData":{"createdBy":"mohitaneja@microsoft.com","createdByType":"User","createdAt":"2023-04-10T05:02:26.4905671Z","lastModifiedBy":"mohitaneja@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-04-10T08:23:44.2351338Z"},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/SAP-E2ETest-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/E2E-RBAC-MSI":{"principalId":"b7202d53-6b98-4194-8748-4f13a9000072","clientId":"914aa6fe-5e5f-4b55-9b68-39da0ad86ee7"}}},"properties":{"environment":"NonProd","sapProduct":"S4HANA","configuration":{"configurationType":"Discovery","appLocation":"eastus","centralServerVmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TestRG/providers/Microsoft.Compute/virtualMachines/c36ascsvm"},"managedResourceGroupConfiguration":{"name":"mrg-C36-541bd0"},"status":"Offline","health":"Unknown","state":"RegistrationComplete","provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '1274' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 10 Apr 2023 08:24:18 GMT - etag: - - '"6a000c48-0000-0100-0000-6433c7920000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - workloads sap-central-instance update - Connection: - - keep-alive - ParameterSetName: - - --sap-virtual-instance-name -g -n --tags - User-Agent: - - AZURECLI/2.47.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.10 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36/centralInstances/c36ascsvm-0?api-version=2023-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36/centralInstances/c36ascsvm-0","name":"c36ascsvm-0","type":"microsoft.workloads/sapvirtualinstances/centralinstances","location":"eastus","tags":{"tag":"test","tag2":"test2"},"systemData":{"createdBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","createdByType":"Application","createdAt":"2023-04-10T05:08:43.3174672Z","lastModifiedBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","lastModifiedByType":"Application","lastModifiedAt":"2023-04-10T08:09:56.2697161Z"},"properties":{"instanceNo":"00","subnet":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet","messageServerProperties":{"msPort":3600,"internalMsPort":3900,"httpPort":8100,"ipAddress":"10.0.0.200","hostname":"c36ascsvm","health":"Unknown"},"enqueueServerProperties":{"port":3200,"ipAddress":"10.0.0.200","hostname":"c36ascsvm","health":"Unknown"},"gatewayServerProperties":{"port":3300,"health":"Unknown"},"kernelVersion":"777","kernelPatch":"patch - 300","vmDetails":[{"virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TestRG/providers/Microsoft.Compute/virtualMachines/c36ascsvm","type":"Primary"}],"provisioningState":"Succeeded","health":"Unknown","status":"Unavailable"}}' - headers: - cache-control: - - no-cache - content-length: - - '1417' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 10 Apr 2023 08:24:20 GMT - etag: - - '"04004d14-0000-0100-0000-6433c4540000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' + - '1198' status: code: 200 message: OK - request: - body: '{"location": "eastus", "properties": {"enqueueServerProperties": {"health": - "Unknown"}, "gatewayServerProperties": {"health": "Unknown"}, "health": "Unknown", - "messageServerProperties": {"health": "Unknown"}, "status": "Unavailable"}, - "tags": {"tag": "test", "tag2": "test2"}}' + body: '{"tags": {"tag": "test3", "tag2": "test4"}}' headers: Accept: - application/json @@ -270,36 +87,32 @@ interactions: Connection: - keep-alive Content-Length: - - '276' + - '43' Content-Type: - application/json ParameterSetName: - --sap-virtual-instance-name -g -n --tags User-Agent: - AZURECLI/2.47.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.10 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36/centralInstances/c36ascsvm-0?api-version=2023-04-01 + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/U77-rg/providers/Microsoft.Workloads/sapVirtualInstances/U77/centralInstances/u77scs00cl1-0?api-version=2023-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36/centralInstances/c36ascsvm-0","name":"c36ascsvm-0","type":"microsoft.workloads/sapvirtualinstances/centralinstances","location":"eastus","tags":{"tag":"test","tag2":"test2"},"systemData":{"createdBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","createdByType":"Application","createdAt":"2023-04-10T05:08:43.3174672Z","lastModifiedBy":"mohitaneja@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-04-10T08:24:22.9449985Z"},"properties":{"instanceNo":"00","subnet":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet","messageServerProperties":{"msPort":3600,"internalMsPort":3900,"httpPort":8100,"ipAddress":"10.0.0.200","hostname":"c36ascsvm","health":"Unknown"},"enqueueServerProperties":{"port":3200,"ipAddress":"10.0.0.200","hostname":"c36ascsvm","health":"Unknown"},"gatewayServerProperties":{"port":3300,"health":"Unknown"},"kernelVersion":"777","kernelPatch":"patch - 300","vmDetails":[{"virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TestRG/providers/Microsoft.Compute/virtualMachines/c36ascsvm","type":"Primary"}],"provisioningState":"Succeeded","health":"Unknown","status":"Unavailable"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/U77-rg/providers/Microsoft.Workloads/sapVirtualInstances/U77/centralInstances/u77scs00cl1-0","name":"u77scs00cl1-0","type":"microsoft.workloads/sapvirtualinstances/centralinstances","location":"centraluseuap","tags":{"tag":"test3","tag2":"test4"},"systemData":{"createdBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","createdByType":"Application","createdAt":"2022-09-08T13:01:38.4750662Z","lastModifiedBy":"mohitaneja@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-04-21T08:59:40.8036216Z"},"properties":{"instanceNo":"00","subnet":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet","messageServerProperties":{"msPort":3600,"internalMsPort":3900,"httpPort":8100,"ipAddress":"10.0.5.36","hostname":"u77scs00cl1"},"enqueueServerProperties":{"port":3200,"ipAddress":"10.0.5.36","hostname":"u77scs00cl1"},"gatewayServerProperties":{"port":3300},"kernelVersion":"777","kernelPatch":"patch + 300","vmDetails":[{"virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/E2E-SVI-08SEP-B760-AVZONE-SLES-SAP-15-SP3-GEN2/providers/Microsoft.Compute/virtualMachines/u77ascszavm","type":"Primary"},{"virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/E2E-SVI-08SEP-B760-AVZONE-SLES-SAP-15-SP3-GEN2/providers/Microsoft.Compute/virtualMachines/u77ascszbvm","type":"Secondary"}],"provisioningState":"Succeeded","health":"Unknown","status":"Unavailable"}}' headers: - api-supported-versions: - - 2021-12-01-preview, 2022-10-15-preview, 2022-11-01-preview, 2023-04-01 cache-control: - no-cache content-length: - - '1398' + - '1600' content-type: - application/json; charset=utf-8 date: - - Mon, 10 Apr 2023 08:24:22 GMT + - Fri, 21 Apr 2023 08:59:44 GMT etag: - - '"04002f15-0000-0100-0000-6433c7b70000"' + - '"30009f0c-0000-3400-0000-6442507d0000"' expires: - '-1' - mise-correlation-id: - - 57cdc3af-21b4-45a1-aad8-12601022564d pragma: - no-cache strict-transport-security: @@ -318,57 +131,7 @@ interactions: code: 200 message: OK - request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - workloads sap-application-server-instance update - Connection: - - keep-alive - ParameterSetName: - - --sap-virtual-instance-name -g -n --tags - User-Agent: - - AZURECLI/2.47.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.10 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36/applicationInstances/c36appvm0-0?api-version=2023-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36/applicationInstances/c36appvm0-0","name":"c36appvm0-0","type":"microsoft.workloads/sapvirtualinstances/applicationinstances","location":"eastus","tags":{"tag":"test","tag2":"test2"},"systemData":{"createdBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","createdByType":"Application","createdAt":"2023-04-10T05:08:43.7239521Z","lastModifiedBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","lastModifiedByType":"Application","lastModifiedAt":"2023-04-10T08:14:29.4135434Z"},"properties":{"instanceNo":"00","subnet":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet","hostname":"c36appvm0","kernelVersion":"777","kernelPatch":"patch - 300","ipAddress":"10.0.0.190","gatewayPort":3300,"icmHttpPort":0,"icmHttpsPort":0,"vmDetails":[{"virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TestRG/providers/Microsoft.Compute/virtualMachines/c36appvm0","type":"Active"}],"provisioningState":"Succeeded","health":"Unknown","status":"Unavailable"}}' - headers: - cache-control: - - no-cache - content-length: - - '1211' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 10 Apr 2023 08:24:25 GMT - etag: - - '"cc00e577-0000-0100-0000-6433c5650000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "properties": {"health": "Unknown", "status": "Unavailable"}, - "tags": {"tag": "test", "tag2": "test2"}}' + body: '{"tags": {"tag": "test5", "tag2": "test6"}}' headers: Accept: - application/json @@ -379,36 +142,32 @@ interactions: Connection: - keep-alive Content-Length: - - '126' + - '43' Content-Type: - application/json ParameterSetName: - --sap-virtual-instance-name -g -n --tags User-Agent: - AZURECLI/2.47.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.10 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36/applicationInstances/c36appvm0-0?api-version=2023-04-01 + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/U77-rg/providers/Microsoft.Workloads/sapVirtualInstances/U77/applicationInstances/u77appzavm0-0?api-version=2023-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36/applicationInstances/c36appvm0-0","name":"c36appvm0-0","type":"microsoft.workloads/sapvirtualinstances/applicationinstances","location":"eastus","tags":{"tag":"test","tag2":"test2"},"systemData":{"createdBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","createdByType":"Application","createdAt":"2023-04-10T05:08:43.7239521Z","lastModifiedBy":"mohitaneja@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-04-10T08:24:26.6549308Z"},"properties":{"instanceNo":"00","subnet":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet","hostname":"c36appvm0","kernelVersion":"777","kernelPatch":"patch - 300","ipAddress":"10.0.0.190","gatewayPort":3300,"icmHttpPort":0,"icmHttpsPort":0,"vmDetails":[{"virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TestRG/providers/Microsoft.Compute/virtualMachines/c36appvm0","type":"Active"}],"provisioningState":"Succeeded","health":"Unknown","status":"Unavailable"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/U77-rg/providers/Microsoft.Workloads/sapVirtualInstances/U77/applicationInstances/u77appzavm0-0","name":"u77appzavm0-0","type":"microsoft.workloads/sapvirtualinstances/applicationinstances","location":"centraluseuap","tags":{"tag":"test5","tag2":"test6"},"systemData":{"createdBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","createdByType":"Application","createdAt":"2022-09-08T13:01:40.38218Z","lastModifiedBy":"mohitaneja@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-04-21T08:59:46.8880977Z"},"properties":{"instanceNo":"00","subnet":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet","hostname":"u77appzavm0","kernelVersion":"777","kernelPatch":"patch + 300","ipAddress":"10.0.5.34","gatewayPort":3300,"icmHttpPort":0,"icmHttpsPort":0,"provisioningState":"Succeeded","vmDetails":[{"virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/E2E-SVI-08SEP-B760-AVZONE-SLES-SAP-15-SP3-GEN2/providers/Microsoft.Compute/virtualMachines/u77appzavm0","type":"Active"}],"health":"Unknown","status":"Unavailable"}}' headers: - api-supported-versions: - - 2021-12-01-preview, 2022-10-15-preview, 2022-11-01-preview, 2023-04-01 cache-control: - no-cache content-length: - - '1192' + - '1236' content-type: - application/json; charset=utf-8 date: - - Mon, 10 Apr 2023 08:24:26 GMT + - Fri, 21 Apr 2023 08:59:49 GMT etag: - - '"cc007eb0-0000-0100-0000-6433c7ba0000"' + - '"14000ed1-0000-3400-0000-644250830000"' expires: - '-1' - mise-correlation-id: - - 991a53bc-6795-4db9-9d94-c5e1ffdbeebb pragma: - no-cache strict-transport-security: @@ -427,56 +186,7 @@ interactions: code: 200 message: OK - request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - workloads sap-database-instance update - Connection: - - keep-alive - ParameterSetName: - - --sap-virtual-instance-name -g -n --tags - User-Agent: - - AZURECLI/2.47.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.10 (Windows-10-10.0.19044-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36/databaseInstances/C36?api-version=2023-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36/databaseInstances/C36","name":"C36","type":"microsoft.workloads/sapvirtualinstances/databaseinstances","location":"eastus","tags":{"tag":"test","tag2":"test2"},"systemData":{"createdBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","createdByType":"Application","createdAt":"2023-04-10T05:08:44.0675091Z","lastModifiedBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","lastModifiedByType":"Application","lastModifiedAt":"2023-04-10T08:18:31.8567465Z"},"properties":{"subnet":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet-db","databaseSid":"C36","ipAddress":"10.0.128.54","databaseType":"hdb","vmDetails":[{"virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TestRG/providers/Microsoft.Compute/virtualMachines/c36dbvm","status":"Unavailable"}],"provisioningState":"Succeeded","status":"Unavailable"}}' - headers: - cache-control: - - no-cache - content-length: - - '1079' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 10 Apr 2023 08:24:29 GMT - etag: - - '"1b0046f0-0000-0100-0000-6433c6570000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "properties": {"status": "Unavailable"}, "tags": - {"tag": "test", "tag2": "test2"}}' + body: '{"tags": {"tag": "test7", "tag2": "test8"}}' headers: Accept: - application/json @@ -487,35 +197,31 @@ interactions: Connection: - keep-alive Content-Length: - - '105' + - '43' Content-Type: - application/json ParameterSetName: - --sap-virtual-instance-name -g -n --tags User-Agent: - AZURECLI/2.47.0 (AAZ) azsdk-python-core/1.24.0 Python/3.10.10 (Windows-10-10.0.19044-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36/databaseInstances/C36?api-version=2023-04-01 + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/U77-rg/providers/Microsoft.Workloads/sapVirtualInstances/U77/databaseInstances/U77?api-version=2023-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TESTING/providers/Microsoft.Workloads/sapVirtualInstances/C36/databaseInstances/C36","name":"C36","type":"microsoft.workloads/sapvirtualinstances/databaseinstances","location":"eastus","tags":{"tag":"test","tag2":"test2"},"systemData":{"createdBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","createdByType":"Application","createdAt":"2023-04-10T05:08:44.0675091Z","lastModifiedBy":"mohitaneja@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-04-10T08:24:30.2375948Z"},"properties":{"subnet":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet-db","databaseSid":"C36","ipAddress":"10.0.128.54","databaseType":"hdb","vmDetails":[{"virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI-TestRG/providers/Microsoft.Compute/virtualMachines/c36dbvm","status":"Unavailable"}],"provisioningState":"Succeeded","status":"Unavailable"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/U77-rg/providers/Microsoft.Workloads/sapVirtualInstances/U77/databaseInstances/U77","name":"U77","type":"microsoft.workloads/sapvirtualinstances/databaseinstances","location":"centraluseuap","tags":{"tag":"test7","tag2":"test8"},"systemData":{"createdBy":"ea21b132-560f-4b0b-9876-903b6bca7b9d","createdByType":"Application","createdAt":"2022-09-08T13:01:40.9924961Z","lastModifiedBy":"mohitaneja@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-04-21T08:59:52.8977872Z"},"properties":{"subnet":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet-db","databaseSid":"U77","ipAddress":"10.0.129.166","databaseType":"hdb","vmDetails":[{"virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/E2E-SVI-08SEP-B760-AVZONE-SLES-SAP-15-SP3-GEN2/providers/Microsoft.Compute/virtualMachines/u77dbzavm"},{"virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/E2E-SVI-08SEP-B760-AVZONE-SLES-SAP-15-SP3-GEN2/providers/Microsoft.Compute/virtualMachines/u77dbzbvm"}],"provisioningState":"Succeeded","status":"Unavailable"}}' headers: - api-supported-versions: - - 2021-12-01-preview, 2022-10-15-preview, 2022-11-01-preview, 2023-04-01 cache-control: - no-cache content-length: - - '1060' + - '1270' content-type: - application/json; charset=utf-8 date: - - Mon, 10 Apr 2023 08:24:30 GMT + - Fri, 21 Apr 2023 08:59:57 GMT etag: - - '"1b003cf6-0000-0100-0000-6433c7be0000"' + - '"25000a62-0000-3400-0000-644250890000"' expires: - '-1' - mise-correlation-id: - - ac00d9d0-98a7-42ba-85a7-5718e23787c9 pragma: - no-cache strict-transport-security: @@ -529,7 +235,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK diff --git a/src/workloads/azext_workloads/tests/latest/test_workloads.py b/src/workloads/azext_workloads/tests/latest/test_workloads.py index 1a6136f04a5..ad519d802df 100644 --- a/src/workloads/azext_workloads/tests/latest/test_workloads.py +++ b/src/workloads/azext_workloads/tests/latest/test_workloads.py @@ -146,44 +146,43 @@ def test_workloads_svi_stop_start(self): self.check('status', 'Succeeded') ]) - @unittest.skip('recording file not getting generted properly') def test_workloads_svi_update_tags(self): self.kwargs.update({ - 'name': 'C36', - 'appservername': 'c36appvm0-0', - 'csservername': 'c36ascsvm-0', - 'dbservername': 'C36' + 'name': 'U77', + 'appservername': 'u77appzavm0-0', + 'csservername': 'u77scs00cl1-0', + 'dbservername': 'U77' }) - self.cmd('workloads sap-virtual-instance update -g CLI-TESTING -n {name} --tags tag=test tag2=test2', checks=[ + self.cmd('workloads sap-virtual-instance update -g U77-rg -n {name} --tags tag=test tag2=test2', checks=[ self.check('name', '{name}'), - self.check('resourceGroup', 'CLI-TESTING'), + self.check('resourceGroup', 'U77-rg'), self.check('provisioningState', 'Succeeded'), self.check('tags.tag', 'test'), self.check('tags.tag2', 'test2') ]) - self.cmd('workloads sap-central-instance update --sap-virtual-instance-name {name} -g CLI-TESTING -n {csservername} --tags tag=test tag2=test2', checks=[ + self.cmd('workloads sap-central-instance update --sap-virtual-instance-name {name} -g U77-rg -n {csservername} --tags tag=test3 tag2=test4', checks=[ self.check('name', '{csservername}'), - self.check('resourceGroup', 'CLI-TESTING'), + self.check('resourceGroup', 'U77-rg'), self.check('provisioningState', 'Succeeded'), - self.check('tags.tag', 'test'), - self.check('tags.tag2', 'test2') + self.check('tags.tag', 'test3'), + self.check('tags.tag2', 'test4') ]) - self.cmd('workloads sap-application-server-instance update --sap-virtual-instance-name {name} -g CLI-TESTING -n {appservername} --tags tag=test tag2=test2', checks=[ + self.cmd('workloads sap-application-server-instance update --sap-virtual-instance-name {name} -g U77-rg -n {appservername} --tags tag=test5 tag2=test6', checks=[ self.check('name', '{appservername}'), - self.check('resourceGroup', 'CLI-TESTING'), + self.check('resourceGroup', 'U77-rg'), self.check('provisioningState', 'Succeeded'), - self.check('tags.tag', 'test'), - self.check('tags.tag2', 'test2') + self.check('tags.tag', 'test5'), + self.check('tags.tag2', 'test6') ]) - self.cmd('workloads sap-database-instance update --sap-virtual-instance-name {name} -g CLI-TESTING -n {dbservername} --tags tag=test tag2=test2', checks=[ + self.cmd('workloads sap-database-instance update --sap-virtual-instance-name {name} -g U77-rg -n {dbservername} --tags tag=test7 tag2=test8', checks=[ self.check('name', '{dbservername}'), - self.check('resourceGroup', 'CLI-TESTING'), + self.check('resourceGroup', 'U77-rg'), self.check('provisioningState', 'Succeeded'), - self.check('tags.tag', 'test'), - self.check('tags.tag2', 'test2') + self.check('tags.tag', 'test7'), + self.check('tags.tag2', 'test8') ]) @unittest.skip('recording file not getting generted properly throwing Subscription not found')