From 2033f104fb597d1eb5937419c491cb9a29937b45 Mon Sep 17 00:00:00 2001 From: Kerwin Sun Date: Tue, 19 May 2020 19:16:04 +0800 Subject: [PATCH] fix connection monitor tests (#11526) --- ..._watcher.test_network_watcher_monitor.yaml | 1990 +++++++++++++++++ .../tests/test_cli_mgmt_network_watcher.py | 12 +- 2 files changed, 1996 insertions(+), 6 deletions(-) create mode 100644 sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_watcher.test_network_watcher_monitor.yaml diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_watcher.test_network_watcher_monitor.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_watcher.test_network_watcher_monitor.yaml new file mode 100644 index 000000000000..d763ce6a7f4e --- /dev/null +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_watcher.test_network_watcher_monitor.yaml @@ -0,0 +1,1990 @@ +interactions: +- request: + body: '{"location": "eastus", "properties": {"addressSpace": {"addressPrefixes": + ["10.0.0.0/16"]}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '92' + Content-Type: + - application/json + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/virtualNetworks/virtualnetworkc749182d?api-version=2020-04-01 + response: + body: + string: "{\r\n \"name\": \"virtualnetworkc749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/virtualNetworks/virtualnetworkc749182d\"\ + ,\r\n \"etag\": \"W/\\\"72c4578a-a7d9-4739-afbf-170fe68a0835\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ + \ \"resourceGuid\": \"6aabcfc8-54b8-42c3-8a08-0706bf3df5f9\",\r\n \"\ + addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ + \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ + : [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ + : false\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/1509771f-b2b9-47d4-8b35-9858a4efb472?api-version=2020-04-01 + cache-control: + - no-cache + content-length: + - '722' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:40:57 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - a1efce1c-d83f-4a65-bbc3-fa7df4e8e203 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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/providers/Microsoft.Network/locations/eastus/operations/1509771f-b2b9-47d4-8b35-9858a4efb472?api-version=2020-04-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:41:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 4a2ee71c-137f-495a-b3a1-c144f83ed018 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/virtualNetworks/virtualnetworkc749182d?api-version=2020-04-01 + response: + body: + string: "{\r\n \"name\": \"virtualnetworkc749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/virtualNetworks/virtualnetworkc749182d\"\ + ,\r\n \"etag\": \"W/\\\"e7a42f9a-8583-4b9e-ab95-b455a140e8f6\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ + \ \"resourceGuid\": \"6aabcfc8-54b8-42c3-8a08-0706bf3df5f9\",\r\n \"\ + addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ + \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ + : [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ + : false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '723' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:41:02 GMT + etag: + - W/"e7a42f9a-8583-4b9e-ab95-b455a140e8f6" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 1ac7b22c-9db5-4167-86ee-07ff1b6c4076 + status: + code: 200 + message: OK +- request: + body: '{"properties": {"addressPrefix": "10.0.0.0/24"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '48' + Content-Type: + - application/json + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/virtualNetworks/virtualnetworkc749182d/subnets/subnetc749182d?api-version=2020-04-01 + response: + body: + string: "{\r\n \"name\": \"subnetc749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/virtualNetworks/virtualnetworkc749182d/subnets/subnetc749182d\"\ + ,\r\n \"etag\": \"W/\\\"21d4b7a8-2609-476f-997d-a07eff1e3210\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ + addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ + : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ + \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b154ae57-345b-49ff-9810-c5fc80905db3?api-version=2020-04-01 + cache-control: + - no-cache + content-length: + - '607' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:41:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 1da986aa-2ec9-45bc-ba67-ff37131b5056 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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/providers/Microsoft.Network/locations/eastus/operations/b154ae57-345b-49ff-9810-c5fc80905db3?api-version=2020-04-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:41:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 3feccb9b-f0db-4c13-8b71-f17052f10d9f + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/virtualNetworks/virtualnetworkc749182d/subnets/subnetc749182d?api-version=2020-04-01 + response: + body: + string: "{\r\n \"name\": \"subnetc749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/virtualNetworks/virtualnetworkc749182d/subnets/subnetc749182d\"\ + ,\r\n \"etag\": \"W/\\\"11913b34-00ab-4c0c-8d16-831ab634964b\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ + addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ + : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ + \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '608' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:41:06 GMT + etag: + - W/"11913b34-00ab-4c0c-8d16-831ab634964b" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - bc39089b-8e60-45c9-9988-d37bafcd4bcd + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "eastus", "properties": {"ipConfigurations": [{"name": + "MyIpConfig", "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/virtualNetworks/virtualnetworkc749182d/subnets/subnetc749182d"}}}]}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '345' + Content-Type: + - application/json + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkInterfaces/interfacec749182d?api-version=2020-04-01 + response: + body: + string: "{\r\n \"name\": \"interfacec749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkInterfaces/interfacec749182d\"\ + ,\r\n \"etag\": \"W/\\\"5fcd40fa-26b5-46a8-a011-391583496ea4\\\"\",\r\n \ + \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"23e6b530-794f-4d37-a346-a14901576440\"\ + ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"MyIpConfig\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkInterfaces/interfacec749182d/ipConfigurations/MyIpConfig\"\ + ,\r\n \"etag\": \"W/\\\"5fcd40fa-26b5-46a8-a011-391583496ea4\\\"\"\ + ,\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ + : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/virtualNetworks/virtualnetworkc749182d/subnets/subnetc749182d\"\ + \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ + : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ + \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ + internalDomainNameSuffix\": \"zdh0w0vyktbufcqia2dl4ppv5b.bx.internal.cloudapp.net\"\ + \r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\"\ + : false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\ + \n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\ + \r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/607cddcb-b4bb-4bfc-9a82-4270197e3ebb?api-version=2020-04-01 + cache-control: + - no-cache + content-length: + - '1834' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:41:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 63863fad-3135-485d-99e3-4f96ce9babf7 + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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/providers/Microsoft.Network/locations/eastus/operations/607cddcb-b4bb-4bfc-9a82-4270197e3ebb?api-version=2020-04-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:41:41 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - a152b801-f590-4698-935e-8a5687e04ce1 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkInterfaces/interfacec749182d?api-version=2020-04-01 + response: + body: + string: "{\r\n \"name\": \"interfacec749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkInterfaces/interfacec749182d\"\ + ,\r\n \"etag\": \"W/\\\"5fcd40fa-26b5-46a8-a011-391583496ea4\\\"\",\r\n \ + \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"23e6b530-794f-4d37-a346-a14901576440\"\ + ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"MyIpConfig\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkInterfaces/interfacec749182d/ipConfigurations/MyIpConfig\"\ + ,\r\n \"etag\": \"W/\\\"5fcd40fa-26b5-46a8-a011-391583496ea4\\\"\"\ + ,\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ + : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/virtualNetworks/virtualnetworkc749182d/subnets/subnetc749182d\"\ + \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ + : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ + \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ + internalDomainNameSuffix\": \"zdh0w0vyktbufcqia2dl4ppv5b.bx.internal.cloudapp.net\"\ + \r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\"\ + : false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\ + \n \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\ + \r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1834' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:41:41 GMT + etag: + - W/"5fcd40fa-26b5-46a8-a011-391583496ea4" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - ac9cafba-55d3-49e1-b661-cfa3d78b0e6c + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "eastus", "properties": {"hardwareProfile": {"vmSize": + "Standard_D2_v2"}, "storageProfile": {"imageReference": {"publisher": "MicrosoftWindowsServer", + "offer": "WindowsServer", "sku": "2016-Datacenter", "version": "latest"}, "osDisk": + {"name": "myVMosdisk", "caching": "ReadWrite", "createOption": "FromImage", + "managedDisk": {"storageAccountType": "Standard_LRS"}}, "dataDisks": [{"lun": + 0, "createOption": "Empty", "diskSizeGB": 1023}, {"lun": 1, "createOption": + "Empty", "diskSizeGB": 1023}]}, "osProfile": {"computerName": "myVM", "adminUsername": + "testuser", "adminPassword": "Aa1!zyx_", "windowsConfiguration": {"enableAutomaticUpdates": + true}}, "networkProfile": {"networkInterfaces": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkInterfaces/interfacec749182d", + "properties": {"primary": true}}]}}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '950' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"virtualmachinec749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d\"\ + ,\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\"\ + : \"eastus\",\r\n \"properties\": {\r\n \"vmId\": \"6bd3f4b3-c4f8-4b25-84f4-bde8a25af359\"\ + ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_D2_v2\"\r\n\ + \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ + \ \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"\ + WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\"\ + : \"latest\",\r\n \"exactVersion\": \"14393.3686.2005061700\"\r\n \ + \ },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \ + \ \"name\": \"myVMosdisk\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ + \ \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \ + \ \"diskSizeGB\": 127\r\n },\r\n \"dataDisks\": [\r\n \ + \ {\r\n \"lun\": 0,\r\n \"createOption\": \"Empty\",\r\n\ + \ \"caching\": \"None\",\r\n \"managedDisk\": {\r\n \ + \ \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \ + \ \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n \ + \ },\r\n {\r\n \"lun\": 1,\r\n \"createOption\"\ + : \"Empty\",\r\n \"caching\": \"None\",\r\n \"managedDisk\"\ + : {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\ + \n \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n\ + \ }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ + : \"myVM\",\r\n \"adminUsername\": \"testuser\",\r\n \"windowsConfiguration\"\ + : {\r\n \"provisionVMAgent\": true,\r\n \"enableAutomaticUpdates\"\ + : true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\"\ + : true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"\ + networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkInterfaces/interfacec749182d\"\ + ,\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Creating\"\ + \r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/d50d1bb5-0ad3-4448-8ff3-b9daae00c9b8?api-version=2019-07-01 + cache-control: + - no-cache + content-length: + - '2216' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:41:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/PutVM3Min;239,Microsoft.Compute/PutVM30Min;1198 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/d50d1bb5-0ad3-4448-8ff3-b9daae00c9b8?api-version=2019-07-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-05-19T05:41:49.3474605+00:00\",\r\n \"\ + status\": \"InProgress\",\r\n \"name\": \"d50d1bb5-0ad3-4448-8ff3-b9daae00c9b8\"\ + \r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:42:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29988 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/d50d1bb5-0ad3-4448-8ff3-b9daae00c9b8?api-version=2019-07-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-05-19T05:41:49.3474605+00:00\",\r\n \"\ + status\": \"InProgress\",\r\n \"name\": \"d50d1bb5-0ad3-4448-8ff3-b9daae00c9b8\"\ + \r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:42:52 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29987 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/d50d1bb5-0ad3-4448-8ff3-b9daae00c9b8?api-version=2019-07-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-05-19T05:41:49.3474605+00:00\",\r\n \"\ + endTime\": \"2020-05-19T05:42:52.9724645+00:00\",\r\n \"status\": \"Succeeded\"\ + ,\r\n \"name\": \"d50d1bb5-0ad3-4448-8ff3-b9daae00c9b8\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:43:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29985 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"virtualmachinec749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d\"\ + ,\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\"\ + : \"eastus\",\r\n \"properties\": {\r\n \"vmId\": \"6bd3f4b3-c4f8-4b25-84f4-bde8a25af359\"\ + ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_D2_v2\"\r\n\ + \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ + \ \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"\ + WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\"\ + : \"latest\",\r\n \"exactVersion\": \"14393.3686.2005061700\"\r\n \ + \ },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \ + \ \"name\": \"myVMosdisk\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ + \ \"storageAccountType\": \"Standard_LRS\",\r\n \"id\":\ + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TEST_CLI_MGMT_NETWORK_WATCHER_TEST_NETWORK_WATCHER_MONITORC749182D/providers/Microsoft.Compute/disks/myVMosdisk\"\ + \r\n },\r\n \"diskSizeGB\": 127\r\n },\r\n \"dataDisks\"\ + : [\r\n {\r\n \"lun\": 0,\r\n \"name\": \"virtualmachinec749182d_disk2_d58d8c1ff3434ac9a1a9a3df27c7721e\"\ + ,\r\n \"createOption\": \"Empty\",\r\n \"caching\": \"None\"\ + ,\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"\ + Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TEST_CLI_MGMT_NETWORK_WATCHER_TEST_NETWORK_WATCHER_MONITORC749182D/providers/Microsoft.Compute/disks/virtualmachinec749182d_disk2_d58d8c1ff3434ac9a1a9a3df27c7721e\"\ + \r\n },\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\"\ + : false\r\n },\r\n {\r\n \"lun\": 1,\r\n \"\ + name\": \"virtualmachinec749182d_disk3_b01c7747f9404da28012c70df478ac42\"\ + ,\r\n \"createOption\": \"Empty\",\r\n \"caching\": \"None\"\ + ,\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"\ + Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TEST_CLI_MGMT_NETWORK_WATCHER_TEST_NETWORK_WATCHER_MONITORC749182D/providers/Microsoft.Compute/disks/virtualmachinec749182d_disk3_b01c7747f9404da28012c70df478ac42\"\ + \r\n },\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\"\ + : false\r\n }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \ + \ \"computerName\": \"myVM\",\r\n \"adminUsername\": \"testuser\",\r\ + \n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\ + \n \"enableAutomaticUpdates\": true\r\n },\r\n \"secrets\"\ + : [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\"\ + : true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\"\ + :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkInterfaces/interfacec749182d\"\ + ,\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Succeeded\"\ + \r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3088' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:43:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;3994,Microsoft.Compute/LowCostGet30Min;31987 + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "properties": {"publisher": "Microsoft.Azure.NetworkWatcher", + "type": "NetworkWatcherAgentWindows", "typeHandlerVersion": "1.4", "autoUpgradeMinorVersion": + true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '185' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d/extensions/virtualmachineextensionc749182d?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"virtualmachineextensionc749182d\",\r\n \"id\":\ + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d/extensions/virtualmachineextensionc749182d\"\ + ,\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\",\r\n \"\ + location\": \"eastus\",\r\n \"properties\": {\r\n \"autoUpgradeMinorVersion\"\ + : true,\r\n \"provisioningState\": \"Creating\",\r\n \"publisher\":\ + \ \"Microsoft.Azure.NetworkWatcher\",\r\n \"type\": \"NetworkWatcherAgentWindows\"\ + ,\r\n \"typeHandlerVersion\": \"1.4\"\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/312d589b-af7c-4149-8aef-957a6875df3c?api-version=2019-07-01 + cache-control: + - no-cache + content-length: + - '618' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:43:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/UpdateVM3Min;239,Microsoft.Compute/UpdateVM30Min;1198 + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/312d589b-af7c-4149-8aef-957a6875df3c?api-version=2019-07-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-05-19T05:43:28.6912074+00:00\",\r\n \"\ + status\": \"InProgress\",\r\n \"name\": \"312d589b-af7c-4149-8aef-957a6875df3c\"\ + \r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:44:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14995,Microsoft.Compute/GetOperation30Min;29984 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/312d589b-af7c-4149-8aef-957a6875df3c?api-version=2019-07-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-05-19T05:43:28.6912074+00:00\",\r\n \"\ + status\": \"InProgress\",\r\n \"name\": \"312d589b-af7c-4149-8aef-957a6875df3c\"\ + \r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:44:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29983 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/312d589b-af7c-4149-8aef-957a6875df3c?api-version=2019-07-01 + response: + body: + string: "{\r\n \"startTime\": \"2020-05-19T05:43:28.6912074+00:00\",\r\n \"\ + endTime\": \"2020-05-19T05:44:42.9412095+00:00\",\r\n \"status\": \"Succeeded\"\ + ,\r\n \"name\": \"312d589b-af7c-4149-8aef-957a6875df3c\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:45:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29981 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d/extensions/virtualmachineextensionc749182d?api-version=2019-07-01 + response: + body: + string: "{\r\n \"name\": \"virtualmachineextensionc749182d\",\r\n \"id\":\ + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d/extensions/virtualmachineextensionc749182d\"\ + ,\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\",\r\n \"\ + location\": \"eastus\",\r\n \"properties\": {\r\n \"autoUpgradeMinorVersion\"\ + : true,\r\n \"provisioningState\": \"Succeeded\",\r\n \"publisher\"\ + : \"Microsoft.Azure.NetworkWatcher\",\r\n \"type\": \"NetworkWatcherAgentWindows\"\ + ,\r\n \"typeHandlerVersion\": \"1.4\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '619' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:45:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;3993,Microsoft.Compute/LowCostGet30Min;31984 + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '22' + Content-Type: + - application/json + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d?api-version=2020-04-01 + response: + body: + string: "{\r\n \"name\": \"networkwatcherc749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d\"\ + ,\r\n \"etag\": \"W/\\\"a1b981e2-850f-479f-81fa-d652418e2aa1\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\": \"eastus\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ + \ \"runningOperationIds\": []\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/dcc01614-25c3-457e-a75e-d211347058c4?api-version=2020-04-01 + cache-control: + - no-cache + content-length: + - '478' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:45:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - e71064be-9374-43de-9a3f-ab7e5cce782a + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: 'b''{"location": "eastus", "properties": {"source": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d"}, + "destination": {"address": "bing.com", "port": 80}, "monitoringIntervalInSeconds": + 60}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '355' + Content-Type: + - application/json + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d/connectionMonitors/connectionmonitorc749182d?api-version=2019-06-01 + response: + body: + string: "{\r\n \"name\": \"connectionmonitorc749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d/connectionMonitors/connectionmonitorc749182d\"\ + ,\r\n \"etag\": \"W/\\\"40561c34-9b75-4e5b-ae3b-60620430ccb3\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ + resourceGuid\": \"6c0b8d7b-6ffa-437f-a855-95a48a9f7eaf\",\r\n \"source\"\ + : {\r\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d\"\ + ,\r\n \"port\": 0\r\n },\r\n \"destination\": {\r\n \"address\"\ + : \"bing.com\",\r\n \"port\": 80\r\n },\r\n \"monitoringIntervalInSeconds\"\ + : 60,\r\n \"autoStart\": true,\r\n \"monitoringStatus\": \"NotStarted\"\ + \r\n },\r\n \"type\": \"Microsoft.Network/networkWatchers/connectionMonitors\"\ + ,\r\n \"location\": \"eastus\"\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/9861e503-e533-4241-8089-2d7a09b59334?api-version=2019-06-01 + cache-control: + - no-cache + content-length: + - '1021' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:45:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 22eb1938-a14a-4232-80f5-1cc8539c98a9 + x-ms-ratelimit-remaining-subscription-writes: + - '1196' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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/providers/Microsoft.Network/locations/eastus/operations/9861e503-e533-4241-8089-2d7a09b59334?api-version=2019-06-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:45:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 3398c348-92f8-4d43-975f-7b938e99f46e + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d/connectionMonitors/connectionmonitorc749182d?api-version=2019-06-01 + response: + body: + string: "{\r\n \"name\": \"connectionmonitorc749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d/connectionMonitors/connectionmonitorc749182d\"\ + ,\r\n \"etag\": \"W/\\\"8a819730-f8f8-4fa9-a9a6-091951b9e6eb\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ + resourceGuid\": \"6c0b8d7b-6ffa-437f-a855-95a48a9f7eaf\",\r\n \"source\"\ + : {\r\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d\"\ + ,\r\n \"port\": 0\r\n },\r\n \"destination\": {\r\n \"address\"\ + : \"bing.com\",\r\n \"port\": 80\r\n },\r\n \"monitoringIntervalInSeconds\"\ + : 60,\r\n \"autoStart\": true,\r\n \"startTime\": \"2020-05-19T05:45:23.3071803Z\"\ + ,\r\n \"monitoringStatus\": \"Running\"\r\n },\r\n \"type\": \"Microsoft.Network/networkWatchers/connectionMonitors\"\ + ,\r\n \"location\": \"eastus\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1069' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:45:34 GMT + etag: + - W/"8a819730-f8f8-4fa9-a9a6-091951b9e6eb" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - d8048178-e030-40c0-9893-e87da913d785 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d/connectionMonitors/connectionmonitorc749182d?api-version=2020-04-01 + response: + body: + string: "{\r\n \"name\": \"connectionmonitorc749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d/connectionMonitors/connectionmonitorc749182d\"\ + ,\r\n \"etag\": \"W/\\\"8a819730-f8f8-4fa9-a9a6-091951b9e6eb\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ + resourceGuid\": \"6c0b8d7b-6ffa-437f-a855-95a48a9f7eaf\",\r\n \"endpoints\"\ + : [\r\n {\r\n \"name\": \"defaultSourceEndpoint\",\r\n \ + \ \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d\"\ + \r\n },\r\n {\r\n \"name\": \"defaultDestinationEndpoint\"\ + ,\r\n \"address\": \"bing.com\"\r\n }\r\n ],\r\n \"testConfigurations\"\ + : [\r\n {\r\n \"name\": \"defaultTestConfiguration\",\r\n \ + \ \"testFrequencySec\": 60,\r\n \"protocol\": \"Tcp\",\r\n \ + \ \"tcpConfiguration\": {\r\n \"port\": 80,\r\n \"disableTraceRoute\"\ + : false\r\n }\r\n }\r\n ],\r\n \"testGroups\": [\r\n \ + \ {\r\n \"name\": \"defaultTestGroup\",\r\n \"disable\": false,\r\ + \n \"testConfigurations\": [\r\n \"defaultTestConfiguration\"\ + \r\n ],\r\n \"sources\": [\r\n \"defaultSourceEndpoint\"\ + \r\n ],\r\n \"destinations\": [\r\n \"defaultDestinationEndpoint\"\ + \r\n ]\r\n }\r\n ],\r\n \"outputs\": [],\r\n \"startTime\"\ + : \"2020-05-19T05:45:23.3071803Z\",\r\n \"monitoringStatus\": \"Running\"\ + ,\r\n \"connectionMonitorType\": \"SingleSourceDestination\"\r\n },\r\n\ + \ \"type\": \"Microsoft.Network/networkWatchers/connectionMonitors\",\r\n\ + \ \"location\": \"eastus\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1753' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:45:35 GMT + etag: + - W/"8a819730-f8f8-4fa9-a9a6-091951b9e6eb" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 7fb03833-2f5c-41c2-8f8d-bc70b7038232 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d/connectionMonitors/connectionmonitorc749182d/query?api-version=2020-04-01 + response: + body: + string: 'null' + headers: + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:45:36 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/2654a835-d875-4761-a15f-a46fb7c7112f?api-version=2020-04-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 88e663f6-6b74-449d-9c6b-8221625d79ac + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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/providers/Microsoft.Network/locations/eastus/operationResults/2654a835-d875-4761-a15f-a46fb7c7112f?api-version=2020-04-01 + response: + body: + string: "{\r\n \"sourceStatus\": \"Active\",\r\n \"states\": [\r\n {\r\n\ + \ \"connectionState\": \"Reachable\",\r\n \"startTime\": \"2020-05-19T05:45:24.9048536Z\"\ + ,\r\n \"evaluationState\": \"InProgress\",\r\n \"avgLatencyInMs\"\ + : 1,\r\n \"minLatencyInMs\": 1,\r\n \"maxLatencyInMs\": 1,\r\n \ + \ \"probesSent\": 3,\r\n \"probesFailed\": 0,\r\n \"hops\":\ + \ [\r\n {\r\n \"type\": \"Source\",\r\n \"id\": \"\ + 19e0abe4-a664-42ef-95b4-971cbf24b227\",\r\n \"address\": \"10.0.0.4\"\ + ,\r\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Compute/virtualMachines/virtualmachinec749182d\"\ + ,\r\n \"nextHopIds\": [\r\n \"f97b437f-f9f0-4b4a-9087-a6452278597a\"\ + \r\n ],\r\n \"links\": [\r\n {\r\n \ + \ \"nextHopId\": \"f97b437f-f9f0-4b4a-9087-a6452278597a\",\r\n \ + \ \"type\": \"\",\r\n \"properties\": {},\r\n \ + \ \"context\": {},\r\n \"issues\": [],\r\n \"\ + resourceId\": \"\"\r\n }\r\n ],\r\n \"previousHopIds\"\ + : [],\r\n \"previousLinks\": [],\r\n \"issues\": []\r\n\ + \ },\r\n {\r\n \"type\": \"Destination\",\r\n \ + \ \"id\": \"f97b437f-f9f0-4b4a-9087-a6452278597a\",\r\n \"address\"\ + : \"13.107.21.200\",\r\n \"nextHopIds\": [],\r\n \"links\"\ + : [],\r\n \"previousHopIds\": [],\r\n \"previousLinks\"\ + : [],\r\n \"issues\": []\r\n }\r\n ]\r\n }\r\n ]\r\ + \n}" + headers: + cache-control: + - no-cache + content-length: + - '1491' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:45:47 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/2654a835-d875-4761-a15f-a46fb7c7112f?api-version=2020-04-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 88e663f6-6b74-449d-9c6b-8221625d79ac + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d/connectionMonitors/connectionmonitorc749182d/start?api-version=2020-04-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/bce60bbc-aca6-404c-97f0-f5b75d07da2c?api-version=2020-04-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 19 May 2020 05:45:48 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/bce60bbc-aca6-404c-97f0-f5b75d07da2c?api-version=2020-04-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 933a4df6-f39c-4606-ba3f-14a722d911f5 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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/providers/Microsoft.Network/locations/eastus/operations/bce60bbc-aca6-404c-97f0-f5b75d07da2c?api-version=2020-04-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\",\r\n \"properties\": {}\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '50' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:46:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 9d822873-d032-4e7a-9fef-60bc9ce269a4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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/providers/Microsoft.Network/locations/eastus/operationResults/bce60bbc-aca6-404c-97f0-f5b75d07da2c?api-version=2020-04-01 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/bce60bbc-aca6-404c-97f0-f5b75d07da2c?api-version=2020-04-01 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:46:18 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/bce60bbc-aca6-404c-97f0-f5b75d07da2c?api-version=2020-04-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 933a4df6-f39c-4606-ba3f-14a722d911f5 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d/connectionMonitors/connectionmonitorc749182d/stop?api-version=2020-04-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/1160e064-6c46-4bae-b4e7-0e4da06ae7ad?api-version=2020-04-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 19 May 2020 05:46:18 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/1160e064-6c46-4bae-b4e7-0e4da06ae7ad?api-version=2020-04-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 935ea449-bf73-4754-859e-44d0b7eec000 + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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/providers/Microsoft.Network/locations/eastus/operations/1160e064-6c46-4bae-b4e7-0e4da06ae7ad?api-version=2020-04-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\",\r\n \"properties\": {}\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '50' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:46:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 37e891f9-d436-4b62-88c7-91095b1662b8 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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/providers/Microsoft.Network/locations/eastus/operationResults/1160e064-6c46-4bae-b4e7-0e4da06ae7ad?api-version=2020-04-01 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/1160e064-6c46-4bae-b4e7-0e4da06ae7ad?api-version=2020-04-01 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:46:29 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/1160e064-6c46-4bae-b4e7-0e4da06ae7ad?api-version=2020-04-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 935ea449-bf73-4754-859e-44d0b7eec000 + status: + code: 200 + message: OK +- request: + body: '{"tags": {"tag1": "value1", "tag2": "value2"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '46' + Content-Type: + - application/json + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d/connectionMonitors/connectionmonitorc749182d?api-version=2020-04-01 + response: + body: + string: "{\r\n \"name\": \"connectionmonitorc749182d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d/connectionMonitors/connectionmonitorc749182d\"\ + ,\r\n \"etag\": \"W/\\\"70ce2765-53dc-4758-bd2a-a068c80888a8\\\"\",\r\n \ + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ + resourceGuid\": \"6c0b8d7b-6ffa-437f-a855-95a48a9f7eaf\",\r\n \"endpoints\"\ + : [],\r\n \"testConfigurations\": [],\r\n \"testGroups\": [],\r\n \ + \ \"outputs\": [],\r\n \"startTime\": \"2020-05-19T05:45:23.3071803Z\"\ + ,\r\n \"monitoringStatus\": \"Stopped\",\r\n \"connectionMonitorType\"\ + : \"SingleSourceDestination\"\r\n },\r\n \"type\": \"Microsoft.Network/networkWatchers/connectionMonitors\"\ + ,\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"value1\"\ + ,\r\n \"tag2\": \"value2\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '877' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:46:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - fe5a97b1-90bc-490d-a387-20a3ec1c2774 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d/connectionMonitors/connectionmonitorc749182d?api-version=2020-04-01 + response: + body: + string: '' + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a91a551f-ea7b-4afa-8b22-d46f37762c70?api-version=2020-04-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 19 May 2020 05:46:36 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/a91a551f-ea7b-4afa-8b22-d46f37762c70?api-version=2020-04-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 30063798-0187-4f1a-8bcc-94bffae2190e + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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/providers/Microsoft.Network/locations/eastus/operations/a91a551f-ea7b-4afa-8b22-d46f37762c70?api-version=2020-04-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:46:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 4f167ec9-3691-4a75-808d-396728c3b5e4 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_watcher_test_network_watcher_monitorc749182d/providers/Microsoft.Network/networkWatchers/networkwatcherc749182d?api-version=2020-04-01 + response: + body: + string: '' + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a1af17e5-2e4f-4083-9275-bd9c0443c9ea?api-version=2020-04-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 19 May 2020 05:46:47 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/a1af17e5-2e4f-4083-9275-bd9c0443c9ea?api-version=2020-04-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 37e68355-bcf4-4f1b-ae61-1af4bece456e + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/11.0.0 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/providers/Microsoft.Network/locations/eastus/operations/a1af17e5-2e4f-4083-9275-bd9c0443c9ea?api-version=2020-04-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 19 May 2020 05:46:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - d50aab1d-0e41-459b-83f9-3d88a0d8cf42 + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher.py index 5dc823d3b6d4..358d2ee4d428 100644 --- a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher.py +++ b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher.py @@ -22,7 +22,7 @@ # network_virtual_appliances: 0/6 # TODO: (InvalidResourceType) The resource type could not be found in the namespace 'Microsoft.Network' for api version '2020-03-01' # flow_logs: 3/3 # packet_captures: 6/6 -# connection_monitors: 0/9 # TODO: need old api_version +# connection_monitors: 9/9 # security_rules: 4/4 # default_security_rules: 2/2 @@ -40,10 +40,10 @@ def setUp(self): self.mgmt_client = self.create_mgmt_client( azure.mgmt.network.NetworkManagementClient ) - # self.mgmt_client_v190601 = self.create_mgmt_client( - # azure.mgmt.network.NetworkManagementClient, - # api_version="2019-06-01" - # ) + self.mgmt_client_v190601 = self.create_mgmt_client( + azure.mgmt.network.NetworkManagementClient, + api_version="2019-06-01" + ) if self.is_live: from azure.mgmt.compute import ComputeManagementClient self.compute_client = self.create_mgmt_client( @@ -455,7 +455,7 @@ def test_network_watcher_flow_log(self, resource_group): result = self.mgmt_client.network_watchers.begin_delete(resource_group.name, NETWORK_WATCHER_NAME) result = result.result() - @unittest.skip("need use api_version 2019-06-01") + # @unittest.skip("need use api_version 2019-06-01") @ResourceGroupPreparer(location=AZURE_LOCATION) def test_network_watcher_monitor(self, resource_group):