fog-azure-rm 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +17 -0
- data/.gitignore +6 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +36 -0
- data/.travis.yml +14 -0
- data/CHANGELOG.md +28 -0
- data/CONTRIBUTING.md +2 -0
- data/CONTRIBUTORS.md +2 -0
- data/Gemfile +3 -0
- data/fog-azure-rm.gemspec +34 -0
- data/lib/fog/azurerm.rb +1 -0
- data/lib/fog/azurerm/compute.rb +0 -1
- data/lib/fog/azurerm/config.rb +4 -0
- data/lib/fog/azurerm/credentials.rb +10 -3
- data/lib/fog/azurerm/docs/compute.md +172 -0
- data/lib/fog/azurerm/docs/dns.md +112 -0
- data/lib/fog/azurerm/docs/network.md +794 -0
- data/lib/fog/azurerm/docs/resources.md +155 -0
- data/lib/fog/azurerm/docs/storage.md +222 -0
- data/lib/fog/azurerm/docs/structure.md +53 -0
- data/lib/fog/azurerm/models/compute/server.rb +3 -2
- data/lib/fog/azurerm/models/network/frontend_ip_configuration.rb +5 -1
- data/lib/fog/azurerm/models/network/network_interface.rb +49 -4
- data/lib/fog/azurerm/models/network/network_interfaces.rb +4 -2
- data/lib/fog/azurerm/models/network/network_security_group.rb +27 -4
- data/lib/fog/azurerm/models/network/network_security_groups.rb +4 -2
- data/lib/fog/azurerm/models/network/network_security_rule.rb +1 -1
- data/lib/fog/azurerm/models/network/subnet.rb +26 -6
- data/lib/fog/azurerm/models/network/subnets.rb +4 -2
- data/lib/fog/azurerm/models/network/virtual_network.rb +72 -10
- data/lib/fog/azurerm/models/network/virtual_networks.rb +4 -2
- data/lib/fog/azurerm/models/resources/azure_resource.rb +25 -0
- data/lib/fog/azurerm/models/resources/azure_resources.rb +31 -0
- data/lib/fog/azurerm/models/resources/dependency.rb +27 -0
- data/lib/fog/azurerm/models/resources/deployment.rb +65 -0
- data/lib/fog/azurerm/models/resources/deployments.rb +27 -0
- data/lib/fog/azurerm/models/resources/provider.rb +27 -0
- data/lib/fog/azurerm/models/resources/provider_resource_type.rb +22 -0
- data/lib/fog/azurerm/models/storage/blob.rb +13 -0
- data/lib/fog/azurerm/models/storage/blobs.rb +22 -0
- data/lib/fog/azurerm/models/storage/container.rb +65 -0
- data/lib/fog/azurerm/models/storage/containers.rb +44 -0
- data/lib/fog/azurerm/models/storage/data_disk.rb +26 -0
- data/lib/fog/azurerm/models/storage/storage_account.rb +4 -0
- data/lib/fog/azurerm/network.rb +21 -3
- data/lib/fog/azurerm/requests/network/add_address_prefixes_in_virtual_network.rb +68 -0
- data/lib/fog/azurerm/requests/network/add_dns_servers_in_virtual_network.rb +74 -0
- data/lib/fog/azurerm/requests/network/add_security_rules.rb +152 -0
- data/lib/fog/azurerm/requests/network/add_subnets_in_virtual_network.rb +69 -0
- data/lib/fog/azurerm/requests/network/attach_network_security_group_to_subnet.rb +59 -0
- data/lib/fog/azurerm/requests/network/attach_resource_to_nic.rb +88 -0
- data/lib/fog/azurerm/requests/network/attach_route_table_to_subnet.rb +59 -0
- data/lib/fog/azurerm/requests/network/create_load_balancer.rb +4 -4
- data/lib/fog/azurerm/requests/network/{create_network_interface.rb → create_or_update_network_interface.rb} +14 -13
- data/lib/fog/azurerm/requests/network/{create_network_security_group.rb → create_or_update_network_security_group.rb} +17 -35
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network.rb +116 -0
- data/lib/fog/azurerm/requests/network/create_subnet.rb +28 -14
- data/lib/fog/azurerm/requests/network/detach_network_security_group_from_subnet.rb +53 -0
- data/lib/fog/azurerm/requests/network/detach_resource_from_nic.rb +80 -0
- data/lib/fog/azurerm/requests/network/detach_route_table_from_subnet.rb +53 -0
- data/lib/fog/azurerm/requests/network/get_network_interface.rb +60 -0
- data/lib/fog/azurerm/requests/network/get_network_security_group.rb +161 -0
- data/lib/fog/azurerm/requests/network/get_subnet.rb +36 -0
- data/lib/fog/azurerm/requests/network/get_virtual_network.rb +64 -0
- data/lib/fog/azurerm/requests/network/remove_address_prefixes_from_virtual_network.rb +67 -0
- data/lib/fog/azurerm/requests/network/remove_dns_servers_from_virtual_network.rb +67 -0
- data/lib/fog/azurerm/requests/network/remove_security_rule.rb +155 -0
- data/lib/fog/azurerm/requests/network/remove_subnets_from_virtual_network.rb +57 -0
- data/lib/fog/azurerm/requests/resources/create_deployment.rb +90 -0
- data/lib/fog/azurerm/requests/resources/delete_deployment.rb +28 -0
- data/lib/fog/azurerm/requests/resources/delete_resource_tag.rb +48 -0
- data/lib/fog/azurerm/requests/resources/list_deployments.rb +75 -0
- data/lib/fog/azurerm/requests/resources/list_tagged_resources.rb +46 -0
- data/lib/fog/azurerm/requests/resources/tag_resource.rb +46 -0
- data/lib/fog/azurerm/requests/storage/create_container.rb +37 -0
- data/lib/fog/azurerm/requests/storage/delete_container.rb +26 -0
- data/lib/fog/azurerm/requests/storage/delete_disk.rb +36 -0
- data/lib/fog/azurerm/requests/storage/get_blob_metadata.rb +30 -0
- data/lib/fog/azurerm/requests/storage/get_container_access_control_list.rb +29 -0
- data/lib/fog/azurerm/requests/storage/get_container_metadata.rb +31 -0
- data/lib/fog/azurerm/requests/storage/get_container_properties.rb +36 -0
- data/lib/fog/azurerm/requests/storage/get_storage_access_keys.rb +31 -0
- data/lib/fog/azurerm/requests/storage/list_containers.rb +49 -0
- data/lib/fog/azurerm/requests/storage/list_storage_account_for_rg.rb +0 -1
- data/lib/fog/azurerm/requests/storage/set_blob_metadata.rb +26 -0
- data/lib/fog/azurerm/requests/storage/set_container_metadata.rb +26 -0
- data/lib/fog/azurerm/resources.rb +13 -0
- data/lib/fog/azurerm/storage.rb +46 -6
- data/lib/fog/azurerm/utilities/general.rb +18 -0
- data/lib/fog/azurerm/version.rb +1 -1
- data/rakefile +21 -0
- data/test/api_stub.rb +44 -0
- data/test/api_stub/models/compute/availability_set.rb +21 -0
- data/test/api_stub/models/compute/server.rb +191 -0
- data/test/api_stub/models/dns/record_set.rb +59 -0
- data/test/api_stub/models/dns/zone.rb +47 -0
- data/test/api_stub/models/network/application_gateway.rb +135 -0
- data/test/api_stub/models/network/load_balancer.rb +132 -0
- data/test/api_stub/models/network/network_interface.rb +71 -0
- data/test/api_stub/models/network/network_security_group.rb +94 -0
- data/test/api_stub/models/network/public_ip.rb +35 -0
- data/test/api_stub/models/network/subnet.rb +35 -0
- data/test/api_stub/models/network/traffic_manager_end_point.rb +26 -0
- data/test/api_stub/models/network/traffic_manager_profile.rb +74 -0
- data/test/api_stub/models/network/virtual_network.rb +61 -0
- data/test/api_stub/models/resources/deployment.rb +110 -0
- data/test/api_stub/models/resources/resource.rb +40 -0
- data/test/api_stub/models/resources/resource_group.rb +38 -0
- data/test/api_stub/models/storage/blob.rb +17 -0
- data/test/api_stub/models/storage/container.rb +92 -0
- data/test/api_stub/models/storage/data_disk.rb +30 -0
- data/test/api_stub/models/storage/storageaccount.rb +29 -0
- data/test/api_stub/requests/compute/availability_set.rb +46 -0
- data/test/api_stub/requests/compute/virtual_machine.rb +654 -0
- data/test/api_stub/requests/dns/record_set.rb +105 -0
- data/test/api_stub/requests/dns/zone.rb +67 -0
- data/test/api_stub/requests/network/application_gateway.rb +433 -0
- data/test/api_stub/requests/network/load_balancer.rb +366 -0
- data/test/api_stub/requests/network/network_interface.rb +268 -0
- data/test/api_stub/requests/network/network_security_group.rb +240 -0
- data/test/api_stub/requests/network/public_ip.rb +73 -0
- data/test/api_stub/requests/network/subnet.rb +73 -0
- data/test/api_stub/requests/network/traffic_manager_endpoint.rb +25 -0
- data/test/api_stub/requests/network/traffic_manager_profile.rb +140 -0
- data/test/api_stub/requests/network/virtual_network.rb +127 -0
- data/test/api_stub/requests/resources/deployment.rb +23 -0
- data/test/api_stub/requests/resources/resource.rb +47 -0
- data/test/api_stub/requests/resources/resource_group.rb +53 -0
- data/test/api_stub/requests/storage/blob.rb +24 -0
- data/test/api_stub/requests/storage/container.rb +95 -0
- data/test/api_stub/requests/storage/storageaccount.rb +112 -0
- data/test/integration/README.md +14 -0
- data/test/integration/application_gateway.rb +129 -0
- data/test/integration/availability_set.rb +56 -0
- data/test/integration/container.rb +81 -0
- data/test/integration/credentials/azure.yml +4 -0
- data/test/integration/external_load_balancer.rb +119 -0
- data/test/integration/internal_load_balancer.rb +126 -0
- data/test/integration/network_interface.rb +135 -0
- data/test/integration/network_security_group.rb +104 -0
- data/test/integration/public_ip.rb +63 -0
- data/test/integration/record_set.rb +88 -0
- data/test/integration/server.rb +139 -0
- data/test/integration/storage_account.rb +62 -0
- data/test/integration/subnet.rb +91 -0
- data/test/integration/traffic_manager.rb +81 -0
- data/test/integration/virtual_network.rb +124 -0
- data/test/integration/zone.rb +64 -0
- data/test/models/compute/test_availability_set.rb +53 -0
- data/test/models/compute/test_availability_sets.rb +41 -0
- data/test/models/compute/test_server.rb +143 -0
- data/test/models/compute/test_servers.rb +49 -0
- data/test/models/dns/test_record_set.rb +59 -0
- data/test/models/dns/test_record_sets.rb +51 -0
- data/test/models/dns/test_zone.rb +49 -0
- data/test/models/dns/test_zones.rb +49 -0
- data/test/models/network/test_application_gateway.rb +62 -0
- data/test/models/network/test_application_gateways.rb +42 -0
- data/test/models/network/test_load_balancer.rb +56 -0
- data/test/models/network/test_load_balancers.rb +42 -0
- data/test/models/network/test_network_interface.rb +106 -0
- data/test/models/network/test_network_interfaces.rb +41 -0
- data/test/models/network/test_network_security_group.rb +88 -0
- data/test/models/network/test_network_security_groups.rb +40 -0
- data/test/models/network/test_network_security_rule.rb +30 -0
- data/test/models/network/test_public_ip.rb +58 -0
- data/test/models/network/test_public_ips.rb +55 -0
- data/test/models/network/test_subnet.rb +84 -0
- data/test/models/network/test_subnets.rb +42 -0
- data/test/models/network/test_traffic_manager_end_point.rb +53 -0
- data/test/models/network/test_traffic_manager_end_points.rb +42 -0
- data/test/models/network/test_traffic_manager_profile.rb +54 -0
- data/test/models/network/test_traffic_manager_profiles.rb +41 -0
- data/test/models/network/test_virtual_network.rb +112 -0
- data/test/models/network/test_virtual_networks.rb +54 -0
- data/test/models/resources/test_deployment.rb +54 -0
- data/test/models/resources/test_deployments.rb +37 -0
- data/test/models/resources/test_resource.rb +22 -0
- data/test/models/resources/test_resource_group.rb +43 -0
- data/test/models/resources/test_resource_groups.rb +37 -0
- data/test/models/resources/test_resources.rb +38 -0
- data/test/models/storage/test_blobs.rb +32 -0
- data/test/models/storage/test_container.rb +67 -0
- data/test/models/storage/test_containers.rb +56 -0
- data/test/models/storage/test_data_disk.rb +29 -0
- data/test/models/storage/test_storage_account.rb +62 -0
- data/test/models/storage/test_storage_accounts.rb +65 -0
- data/test/requests/compute/test_attach_data_disk_to_vm.rb +175 -0
- data/test/requests/compute/test_create_availability_set.rb +30 -0
- data/test/requests/compute/test_create_virtual_machine.rb +50 -0
- data/test/requests/compute/test_deallocate_virtual_machine.rb +29 -0
- data/test/requests/compute/test_delete_availability_set.rb +29 -0
- data/test/requests/compute/test_delete_virtual_machine.rb +29 -0
- data/test/requests/compute/test_detach_data_disk_from_vm.rb +53 -0
- data/test/requests/compute/test_generalize_virtual_machine.rb +29 -0
- data/test/requests/compute/test_get_virtual_machine.rb +31 -0
- data/test/requests/compute/test_get_vm_status.rb +31 -0
- data/test/requests/compute/test_list_availability_sets.rb +30 -0
- data/test/requests/compute/test_list_available_sizes_for_virtual_machine.rb +31 -0
- data/test/requests/compute/test_list_virtual_machines.rb +30 -0
- data/test/requests/compute/test_power_off_virtual_machine.rb +29 -0
- data/test/requests/compute/test_redeploy_virtual_machine.rb +29 -0
- data/test/requests/compute/test_restart_virtual_machine.rb +29 -0
- data/test/requests/compute/test_start_virtual_machine.rb +29 -0
- data/test/requests/dns/test_check_for_zone.rb +52 -0
- data/test/requests/dns/test_create_record_set.rb +45 -0
- data/test/requests/dns/test_create_zone.rb +36 -0
- data/test/requests/dns/test_delete_record_set.rb +35 -0
- data/test/requests/dns/test_delete_zone.rb +35 -0
- data/test/requests/dns/test_get_records_from_record_set.rb +55 -0
- data/test/requests/dns/test_list_record_sets.rb +36 -0
- data/test/requests/dns/test_list_zones.rb +40 -0
- data/test/requests/network/test_add_address_prefixes_in_virtual_network.rb +45 -0
- data/test/requests/network/test_add_dns_servers_in_virtual_network.rb +45 -0
- data/test/requests/network/test_add_security_rules.rb +63 -0
- data/test/requests/network/test_add_subnets_in_virtual_network.rb +45 -0
- data/test/requests/network/test_attach_network_security_group_to_subnet.rb +33 -0
- data/test/requests/network/test_attach_resource_to_nic.rb +65 -0
- data/test/requests/network/test_attach_route_table_to_subnet.rb +33 -0
- data/test/requests/network/test_check_for_public_ip.rb +38 -0
- data/test/requests/network/test_check_for_virtual_network.rb +38 -0
- data/test/requests/network/test_create_application_gateway.rb +61 -0
- data/test/requests/network/test_create_load_balancer.rb +56 -0
- data/test/requests/network/test_create_network_interface.rb +54 -0
- data/test/requests/network/test_create_network_security_group.rb +45 -0
- data/test/requests/network/test_create_or_update_virtual_network.rb +63 -0
- data/test/requests/network/test_create_public_ip.rb +44 -0
- data/test/requests/network/test_create_subnet.rb +44 -0
- data/test/requests/network/test_create_traffic_manager_endpoint.rb +32 -0
- data/test/requests/network/test_create_traffic_manager_profile.rb +32 -0
- data/test/requests/network/test_delete_application_gateway.rb +30 -0
- data/test/requests/network/test_delete_load_balancer.rb +30 -0
- data/test/requests/network/test_delete_network_interface.rb +30 -0
- data/test/requests/network/test_delete_network_security_group.rb +32 -0
- data/test/requests/network/test_delete_public_ip.rb +30 -0
- data/test/requests/network/test_delete_subnet.rb +30 -0
- data/test/requests/network/test_delete_traffic_manager_endpoint.rb +28 -0
- data/test/requests/network/test_delete_traffic_manager_profile.rb +28 -0
- data/test/requests/network/test_delete_virtual_network.rb +30 -0
- data/test/requests/network/test_detach_network_security_group_from_subnet.rb +33 -0
- data/test/requests/network/test_detach_resource_from_nic.rb +60 -0
- data/test/requests/network/test_detach_route_table_from_subnet.rb +33 -0
- data/test/requests/network/test_get_network_interface.rb +31 -0
- data/test/requests/network/test_get_network_security_group.rb +33 -0
- data/test/requests/network/test_get_subnet.rb +33 -0
- data/test/requests/network/test_get_traffic_manager_profile.rb +29 -0
- data/test/requests/network/test_list_application_gateways.rb +31 -0
- data/test/requests/network/test_list_load_balancers.rb +31 -0
- data/test/requests/network/test_list_network_interfaces.rb +31 -0
- data/test/requests/network/test_list_network_security_groups.rb +33 -0
- data/test/requests/network/test_list_public_ips.rb +31 -0
- data/test/requests/network/test_list_subnets.rb +31 -0
- data/test/requests/network/test_list_traffic_manager_profiles.rb +29 -0
- data/test/requests/network/test_list_virtual_networks.rb +31 -0
- data/test/requests/network/test_remove_address_prefixes_from_virtual_network.rb +45 -0
- data/test/requests/network/test_remove_dns_servers_from_virtual_network.rb +45 -0
- data/test/requests/network/test_remove_security_rule.rb +49 -0
- data/test/requests/network/test_remove_subnets_from_virtual_network.rb +45 -0
- data/test/requests/resources/test_create_deployment.rb +49 -0
- data/test/requests/resources/test_create_resource_group.rb +31 -0
- data/test/requests/resources/test_delete_deployment.rb +31 -0
- data/test/requests/resources/test_delete_resource_group.rb +30 -0
- data/test/requests/resources/test_delete_resource_tag.rb +51 -0
- data/test/requests/resources/test_list_deployments.rb +32 -0
- data/test/requests/resources/test_list_resource_groups.rb +31 -0
- data/test/requests/resources/test_list_tagged_resources.rb +31 -0
- data/test/requests/resources/test_tag_resource.rb +51 -0
- data/test/requests/storage/test_check_storage_account_name_availability.rb +59 -0
- data/test/requests/storage/test_create_container.rb +31 -0
- data/test/requests/storage/test_create_storage_account.rb +56 -0
- data/test/requests/storage/test_delete_container.rb +30 -0
- data/test/requests/storage/test_delete_storage_account.rb +34 -0
- data/test/requests/storage/test_get_blob_metadata.rb +18 -0
- data/test/requests/storage/test_get_container_access_control_list.rb +31 -0
- data/test/requests/storage/test_get_container_metadata.rb +18 -0
- data/test/requests/storage/test_get_container_properties.rb +31 -0
- data/test/requests/storage/test_get_storage_access_keys.rb +31 -0
- data/test/requests/storage/test_list_containers.rb +23 -0
- data/test/requests/storage/test_list_storage_accounts.rb +47 -0
- data/test/requests/storage/test_list_storage_accounts_for_rg.rb +51 -0
- data/test/requests/storage/test_set_blob_metadata.rb +17 -0
- data/test/requests/storage/test_set_container_metadata.rb +17 -0
- data/test/test_credentials.rb +39 -0
- data/test/test_helper.rb +428 -0
- metadata +273 -14
- data/lib/fog/azurerm/models/compute/data_disk.rb +0 -26
- data/lib/fog/azurerm/requests/network/create_virtual_network.rb +0 -115
@@ -0,0 +1,240 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Requests
|
3
|
+
module Network
|
4
|
+
# Mock class for Network Security Group Requests
|
5
|
+
class NetworkSecurityGroup
|
6
|
+
def self.create_network_security_group_response
|
7
|
+
body = '{
|
8
|
+
"name":"fog-test-nsg",
|
9
|
+
"id":"/subscriptions/#####/resourceGroups/fog-test-rg/providers/Microsoft.Network/networkSecurityGroups/fog-test-nsg",
|
10
|
+
"location":"West US",
|
11
|
+
"tags":{
|
12
|
+
"key":"value"
|
13
|
+
},
|
14
|
+
"etag":"W/\"00000000-0000-0000-0000-000000000000\"",
|
15
|
+
"properties":{
|
16
|
+
"resourceGuid":"AF6A2C41-9F74-46B3-9F65-F5286FFEE3DE",
|
17
|
+
"provisioningState":"Succeeded",
|
18
|
+
"securityRules":[
|
19
|
+
{
|
20
|
+
"name":"myNsRule",
|
21
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNsg/securityRules/myNsRule",
|
22
|
+
"etag":"W/\"00000000-0000-0000-0000-000000000000\"",
|
23
|
+
"properties":{
|
24
|
+
"provisioningState":"Succeeded",
|
25
|
+
"description":"description-of-this-rule",
|
26
|
+
"protocol": "*",
|
27
|
+
"sourcePortRange":"source-port-range",
|
28
|
+
"destinationPortRange":"destination-port-range",
|
29
|
+
"sourceAddressPrefix":"*",
|
30
|
+
"destinationAddressPrefix":"*",
|
31
|
+
"access":"Allow",
|
32
|
+
"priority":100,
|
33
|
+
"direction":"Inbound"
|
34
|
+
}
|
35
|
+
}
|
36
|
+
],
|
37
|
+
"defaultSecurityRules":[
|
38
|
+
{
|
39
|
+
"name":"AllowVnetInBound",
|
40
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNsg/defaultSecurityRules/AllowVnetInBound",
|
41
|
+
"etag":"W/\"00000000-0000-0000-0000-000000000000\"",
|
42
|
+
"properties":{
|
43
|
+
"provisioningState":"Succeeded",
|
44
|
+
"description":"description-of-this-rule",
|
45
|
+
"protocol": "*",
|
46
|
+
"sourcePortRange":"*",
|
47
|
+
"destinationPortRange":"*",
|
48
|
+
"sourceAddressPrefix":"VirtualNetwork",
|
49
|
+
"destinationAddressPrefix":"VirtualNetwork",
|
50
|
+
"access":"Allow ",
|
51
|
+
"priority":65000,
|
52
|
+
"direction":"Inbound"
|
53
|
+
}
|
54
|
+
}
|
55
|
+
],
|
56
|
+
"networkInterfaces":[
|
57
|
+
{
|
58
|
+
"id":"/subscriptions/{guid}/resourceGroups/myrg1/providers/Microsoft.Network/networkInterfaces/vm1nic1 "
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"id":"/subscriptions/{guid}/resourceGroups/myrg1/providers/Microsoft.Network/networkInterfaces/vm1nic2"
|
62
|
+
}
|
63
|
+
],
|
64
|
+
"subnets":[
|
65
|
+
{
|
66
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysubnet1"
|
67
|
+
}
|
68
|
+
]
|
69
|
+
}
|
70
|
+
}'
|
71
|
+
result = MsRestAzure::AzureOperationResponse.new(MsRest::HttpOperationRequest.new('', '', ''), Faraday::Response.new)
|
72
|
+
result.body = Azure::ARM::Network::Models::NetworkSecurityGroup.deserialize_object(JSON.load(body))
|
73
|
+
result
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.add_security_rules_response
|
77
|
+
body = '{
|
78
|
+
"name":"fog-test-nsg",
|
79
|
+
"id":"/subscriptions/#####/resourceGroups/fog-test-rg/providers/Microsoft.Network/networkSecurityGroups/fog-test-nsg",
|
80
|
+
"location":"West US",
|
81
|
+
"tags":{
|
82
|
+
"key":"value"
|
83
|
+
},
|
84
|
+
"etag":"W/\"00000000-0000-0000-0000-000000000000\"",
|
85
|
+
"properties":{
|
86
|
+
"resourceGuid":"AF6A2C41-9F74-46B3-9F65-F5286FFEE3DE",
|
87
|
+
"provisioningState":"Succeeded",
|
88
|
+
"securityRules":[
|
89
|
+
{
|
90
|
+
"name":"myNsRule",
|
91
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNsg/securityRules/myNsRule",
|
92
|
+
"etag":"W/\"00000000-0000-0000-0000-000000000000\"",
|
93
|
+
"properties":{
|
94
|
+
"provisioningState":"Succeeded",
|
95
|
+
"description":"description-of-this-rule",
|
96
|
+
"protocol": "*",
|
97
|
+
"sourcePortRange":"source-port-range",
|
98
|
+
"destinationPortRange":"destination-port-range",
|
99
|
+
"sourceAddressPrefix":"*",
|
100
|
+
"destinationAddressPrefix":"*",
|
101
|
+
"access":"Allow",
|
102
|
+
"priority":100,
|
103
|
+
"direction":"Inbound"
|
104
|
+
}
|
105
|
+
},
|
106
|
+
{
|
107
|
+
"name": "testRule",
|
108
|
+
"properties":{
|
109
|
+
"description":"This is a test rule",
|
110
|
+
"protocol": "tcp",
|
111
|
+
"sourcePortRange":"22",
|
112
|
+
"destinationPortRange":"22",
|
113
|
+
"sourceAddressPrefix":"0.0.0.0/0",
|
114
|
+
"destinationAddressPrefix":"0.0.0.0/0",
|
115
|
+
"access":"Allow",
|
116
|
+
"priority":101,
|
117
|
+
"direction":"Inbound"
|
118
|
+
}
|
119
|
+
}
|
120
|
+
],
|
121
|
+
"defaultSecurityRules":[
|
122
|
+
{
|
123
|
+
"name":"AllowVnetInBound",
|
124
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNsg/defaultSecurityRules/AllowVnetInBound",
|
125
|
+
"etag":"W/\"00000000-0000-0000-0000-000000000000\"",
|
126
|
+
"properties":{
|
127
|
+
"provisioningState":"Succeeded",
|
128
|
+
"description":"description-of-this-rule",
|
129
|
+
"protocol": "*",
|
130
|
+
"sourcePortRange":"*",
|
131
|
+
"destinationPortRange":"*",
|
132
|
+
"sourceAddressPrefix":"VirtualNetwork",
|
133
|
+
"destinationAddressPrefix":"VirtualNetwork",
|
134
|
+
"access":"Allow ",
|
135
|
+
"priority":65000,
|
136
|
+
"direction":"Inbound"
|
137
|
+
}
|
138
|
+
}
|
139
|
+
],
|
140
|
+
"networkInterfaces":[
|
141
|
+
{
|
142
|
+
"id":"/subscriptions/{guid}/resourceGroups/myrg1/providers/Microsoft.Network/networkInterfaces/vm1nic1 "
|
143
|
+
},
|
144
|
+
{
|
145
|
+
"id":"/subscriptions/{guid}/resourceGroups/myrg1/providers/Microsoft.Network/networkInterfaces/vm1nic2"
|
146
|
+
}
|
147
|
+
],
|
148
|
+
"subnets":[
|
149
|
+
{
|
150
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysubnet1"
|
151
|
+
}
|
152
|
+
]
|
153
|
+
}
|
154
|
+
}'
|
155
|
+
result = MsRestAzure::AzureOperationResponse.new(MsRest::HttpOperationRequest.new('', '', ''), Faraday::Response.new)
|
156
|
+
result.body = Azure::ARM::Network::Models::NetworkSecurityGroup.deserialize_object(JSON.load(body))
|
157
|
+
result
|
158
|
+
end
|
159
|
+
|
160
|
+
def self.list_network_security_group_response
|
161
|
+
body = '{
|
162
|
+
"value":[
|
163
|
+
{
|
164
|
+
"name":"fog-test-nsg",
|
165
|
+
"id":"/subscriptions/####/resourceGroups/fog-test-rg/providers/Microsoft.Network/networkSecurityGroups/fog-test-nsg",
|
166
|
+
"location":"West US",
|
167
|
+
"tags":{
|
168
|
+
"key":"value"
|
169
|
+
},
|
170
|
+
"etag":"W/\"00000000-0000-0000-0000-000000000000\"",
|
171
|
+
"properties":{
|
172
|
+
"resourceGuid":"AF6A2C41-9F74-46B3-9F65-F5286FFEE3DE",
|
173
|
+
"provisioningState":"Succeeded",
|
174
|
+
"securityRules":[
|
175
|
+
{
|
176
|
+
"name":"myNsRule",
|
177
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNsg/securityRules/myNsRule",
|
178
|
+
"etag":"W/\"00000000-0000-0000-0000-000000000000\"",
|
179
|
+
"properties":{
|
180
|
+
"provisioningState":"Succeeded",
|
181
|
+
"description":"description-of-this-rule",
|
182
|
+
"protocol": "*",
|
183
|
+
"sourcePortRange":"source-port-range",
|
184
|
+
"destinationPortRange":"destination-port-range",
|
185
|
+
"sourceAddressPrefix":"*",
|
186
|
+
"destinationAddressPrefix":"*",
|
187
|
+
"access":"Allow",
|
188
|
+
"priority":100,
|
189
|
+
"direction":"Inbound"
|
190
|
+
}
|
191
|
+
}
|
192
|
+
],
|
193
|
+
"defaultSecurityRules":[
|
194
|
+
{
|
195
|
+
"name":"AllowVnetInBound",
|
196
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNsg/defaultSecurityRules/AllowVnetInBound",
|
197
|
+
"etag":"W/\"00000000-0000-0000-0000-000000000000\"",
|
198
|
+
"properties":{
|
199
|
+
"provisioningState":"Succeeded",
|
200
|
+
"description":"description-of-this-rule",
|
201
|
+
"protocol": "*",
|
202
|
+
"sourcePortRange":"*",
|
203
|
+
"destinationPortRange":"*",
|
204
|
+
"sourceAddressPrefix":"VirtualNetwork",
|
205
|
+
"destinationAddressPrefix":"VirtualNetwork",
|
206
|
+
"access":"Allow ",
|
207
|
+
"priority":65000,
|
208
|
+
"direction":"Inbound"
|
209
|
+
}
|
210
|
+
}
|
211
|
+
],
|
212
|
+
"networkInterfaces":[
|
213
|
+
{
|
214
|
+
"id":"/subscriptions/{guid}/resourceGroups/myrg1/providers/Microsoft.Network/networkInterfaces/vm1nic1 "
|
215
|
+
},
|
216
|
+
{
|
217
|
+
"id":"/subscriptions/{guid}/resourceGroups/myrg1/providers/Microsoft.Network/networkInterfaces/vm1nic2"
|
218
|
+
}
|
219
|
+
],
|
220
|
+
"subnets":[
|
221
|
+
{
|
222
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysubnet1"
|
223
|
+
}
|
224
|
+
]
|
225
|
+
}
|
226
|
+
}
|
227
|
+
]
|
228
|
+
}'
|
229
|
+
result = MsRestAzure::AzureOperationResponse.new(MsRest::HttpOperationRequest.new('', '', ''), Faraday::Response.new)
|
230
|
+
result.body = Azure::ARM::Network::Models::NetworkSecurityGroupListResult.deserialize_object(JSON.load(body))
|
231
|
+
result
|
232
|
+
end
|
233
|
+
|
234
|
+
def self.delete_network_security_group_response
|
235
|
+
MsRestAzure::AzureOperationResponse.new(MsRest::HttpOperationRequest.new('', '', ''), Faraday::Response.new)
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Requests
|
3
|
+
module Network
|
4
|
+
class PublicIp
|
5
|
+
def self.create_public_ip_response
|
6
|
+
body = '{
|
7
|
+
"name": "fog-test-public-ip",
|
8
|
+
"id": "/subscriptions/{guid}/resourceGroups/fog-test-rg/Microsoft.Network/publicIpAddresses/fog-test-public-ip",
|
9
|
+
"location": "West US",
|
10
|
+
"tags": {
|
11
|
+
"key": "value"
|
12
|
+
},
|
13
|
+
"etag": "W/\"00000000-0000-0000-0000-000000000000\"",
|
14
|
+
"properties": {
|
15
|
+
"resourceGuid":"0CB6BF8A-FFBD-486A-A6A2-DA6633481B50",
|
16
|
+
"provisioningState": "Succeeded",
|
17
|
+
"ipAddress": "1.1.1.1",
|
18
|
+
"publicIPAllocationMethod": "Dynamic",
|
19
|
+
"idleTimeoutInMinutes": 4,
|
20
|
+
"ipConfiguration": {
|
21
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/vm1nic1/ipConfigurations/ip1"
|
22
|
+
},
|
23
|
+
"dnsSettings": {
|
24
|
+
"domainNameLabel": "mylabel",
|
25
|
+
"fqdn": "mylabel.northus.cloudapp.azure.com.",
|
26
|
+
"reverseFqdn": "contoso.com."
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}'
|
30
|
+
result = MsRestAzure::AzureOperationResponse.new(MsRest::HttpOperationRequest.new('', '', ''), Faraday::Response.new)
|
31
|
+
result.body = Azure::ARM::Network::Models::PublicIPAddress.deserialize_object(JSON.load(body))
|
32
|
+
result
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.list_public_ips_response
|
36
|
+
body = '{
|
37
|
+
"value": [ {
|
38
|
+
"name": "myPublicIP1",
|
39
|
+
"id": "/subscriptions/{guid}/resourceGroups/rg1/Microsoft.Network/publicIpAddresses/ip1",
|
40
|
+
"location": "North US",
|
41
|
+
"tags": {
|
42
|
+
"key": "value"
|
43
|
+
},
|
44
|
+
"etag": "W/\"00000000-0000-0000-0000-000000000000\"",
|
45
|
+
"properties": {
|
46
|
+
"resourceGuid":"0CB6BF8A-FFBD-486A-A6A2-DA6633481B50",
|
47
|
+
"provisioningState": "Succeeded",
|
48
|
+
"ipAddress": "1.1.1.1",
|
49
|
+
"publicIPAllocationMethod": "Static",
|
50
|
+
"idleTimeoutInMinutes": 4,
|
51
|
+
"ipConfiguration": {
|
52
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/vm1nic1/ipConfigurations/ip1"
|
53
|
+
},
|
54
|
+
"dnsSettings": {
|
55
|
+
"domainNameLabel": "mylabel",
|
56
|
+
"fqdn": "mylabel.northus.cloudapp.azure.com.",
|
57
|
+
"reverseFqdn": "contoso.com."
|
58
|
+
}
|
59
|
+
}
|
60
|
+
} ]
|
61
|
+
}'
|
62
|
+
result = MsRestAzure::AzureOperationResponse.new(MsRest::HttpOperationRequest.new('', '', ''), Faraday::Response.new)
|
63
|
+
result.body = Azure::ARM::Network::Models::PublicIPAddressListResult.deserialize_object(JSON.load(body))
|
64
|
+
result
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.delete_public_ip_response
|
68
|
+
MsRestAzure::AzureOperationResponse.new(MsRest::HttpOperationRequest.new('', '', ''), Faraday::Response.new)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Requests
|
3
|
+
module Network
|
4
|
+
class Subnet
|
5
|
+
def self.create_subnet_response
|
6
|
+
body = '{
|
7
|
+
"name":"fog-test-subnet",
|
8
|
+
"id":"/subscriptions/{guid}/resourceGroups/fog-test-rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/fog-test-subnet",
|
9
|
+
"etag":"W/\"00000000-0000-0000-0000-000000000000\"",
|
10
|
+
"properties":{
|
11
|
+
"provisioningState":"Succeeded",
|
12
|
+
"addressPrefix":"10.1.0.0/24",
|
13
|
+
"networkSecurityGroup":{
|
14
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNSG1"
|
15
|
+
},
|
16
|
+
"routeTable": { "id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/myRT1" },
|
17
|
+
"ipConfigurations":[
|
18
|
+
{
|
19
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/vm1nic1/ipConfigurations/ip1"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/lb1/frontendIpConfigurations/ip1"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/gw1/ipConfigurations/ip1"
|
26
|
+
}
|
27
|
+
]
|
28
|
+
}
|
29
|
+
}'
|
30
|
+
result = MsRestAzure::AzureOperationResponse.new(MsRest::HttpOperationRequest.new('', '', ''), Faraday::Response.new)
|
31
|
+
result.body = Azure::ARM::Network::Models::Subnet.deserialize_object(JSON.load(body))
|
32
|
+
result
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.list_subnets_response
|
36
|
+
body = '{
|
37
|
+
"value": [{
|
38
|
+
"name":"mysubnet1",
|
39
|
+
"id":"/subscriptions/{guid}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/mysubnet1",
|
40
|
+
"etag":"W/\"00000000-0000-0000-0000-000000000000\"",
|
41
|
+
"properties":{
|
42
|
+
"provisioningState":"Succeeded",
|
43
|
+
"addressPrefix":"10.1.0.0/24",
|
44
|
+
"networkSecurityGroup":{
|
45
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNSG1"
|
46
|
+
},
|
47
|
+
"routeTable": {"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/myRT1" },
|
48
|
+
"ipConfigurations":[
|
49
|
+
{
|
50
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/vm1nic1/ipConfigurations/ip1"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/lb1/frontendIpConfigurations/ip1"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"id":"/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/gw1/ipConfigurations/ip1"
|
57
|
+
}
|
58
|
+
]
|
59
|
+
}
|
60
|
+
} ]
|
61
|
+
}'
|
62
|
+
result = MsRestAzure::AzureOperationResponse.new(MsRest::HttpOperationRequest.new('', '', ''), Faraday::Response.new)
|
63
|
+
result.body = Azure::ARM::Network::Models::SubnetListResult.deserialize_object(JSON.load(body))
|
64
|
+
result
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.delete_subnet_response
|
68
|
+
MsRestAzure::AzureOperationResponse.new(MsRest::HttpOperationRequest.new('', '', ''), Faraday::Response.new)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Requests
|
3
|
+
module Network
|
4
|
+
# Mock class for raffic Manager End Point Requests
|
5
|
+
class TrafficManagerEndPoint
|
6
|
+
def self.create_traffic_manager_endpoint_response
|
7
|
+
body = '{
|
8
|
+
"id": "/subscriptions/######/resourceGroups/fog-test-rg/providers/Microsoft.Network/trafficManagerProfiles/fog-test-profile/externalEndpoints/fog-test-end-point?api-version=2015-11-01",
|
9
|
+
"name": "fog-test-end-point",
|
10
|
+
"type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
|
11
|
+
"properties": {
|
12
|
+
"endpointStatus": "Enabled",
|
13
|
+
"endpointMonitorStatus": "Online",
|
14
|
+
"target": "test.com",
|
15
|
+
"weight": 10,
|
16
|
+
"priority": 5,
|
17
|
+
"endpointLocation": "northeurope"
|
18
|
+
}
|
19
|
+
}'
|
20
|
+
body
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Requests
|
3
|
+
module Network
|
4
|
+
# Mock class for Traffic Manager Profile Requests
|
5
|
+
class TrafficManagerProfile
|
6
|
+
def self.create_traffic_manager_profile_response
|
7
|
+
body = '{
|
8
|
+
"location": "global",
|
9
|
+
"tags": {},
|
10
|
+
"id": "/subscriptions/###/resourceGroups/fog-test-rg/Microsoft.Network/trafficManagerProfiles/fog-test-profile",
|
11
|
+
"name": "fog-test-profile",
|
12
|
+
"type": "Microsoft.Network/trafficManagerProfiles",
|
13
|
+
"properties": {
|
14
|
+
"profileStatus": "Enabled",
|
15
|
+
"trafficRoutingMethod": "Performance",
|
16
|
+
"dnsConfig": {
|
17
|
+
"relativeName": "fog-test-app",
|
18
|
+
"fqdn": "myapp.trafficmanager.net",
|
19
|
+
"ttl": 30
|
20
|
+
},
|
21
|
+
"monitorConfig": {
|
22
|
+
"profileMonitorStatus": "Online",
|
23
|
+
"protocol": "http",
|
24
|
+
"port": 80,
|
25
|
+
"path": "/monitorpage.aspx"
|
26
|
+
},
|
27
|
+
"endpoints": [{
|
28
|
+
"id": "{ARM resource ID of this endpoint}",
|
29
|
+
"name": "{endpoint-name}",
|
30
|
+
"type": "Microsoft.Network/trafficManagerProfiles/azureEndpoints",
|
31
|
+
"properties": {
|
32
|
+
"endpointStatus": "Enabled",
|
33
|
+
"endpointMonitorStatus": "Online",
|
34
|
+
"targetResourceId": "{resource ID of target resource in Azure}",
|
35
|
+
"target": "myapp.azurewebsites.net",
|
36
|
+
"weight": 10,
|
37
|
+
"priority": 3,
|
38
|
+
"endpointLocation": "centralus"
|
39
|
+
}
|
40
|
+
}, {
|
41
|
+
"id": "{ARM resource ID of this endpoint}",
|
42
|
+
"name": "{endpoint-name}",
|
43
|
+
"type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
|
44
|
+
"properties": {
|
45
|
+
"endpointStatus": "Enabled",
|
46
|
+
"endpointMonitorStatus": "Online",
|
47
|
+
"target": "myendpoint.contoso.com",
|
48
|
+
"weight": 10,
|
49
|
+
"priority": 5,
|
50
|
+
"endpointLocation": "northeurope"
|
51
|
+
}
|
52
|
+
}, {
|
53
|
+
"id": "{ARM resource ID of this endpoint}",
|
54
|
+
"name": "{endpoint-name}",
|
55
|
+
"type": "Microsoft.Network/trafficManagerProfiles/nestedEndpoints",
|
56
|
+
"properties": {
|
57
|
+
"endpointStatus": "Enabled",
|
58
|
+
"endpointMonitorStatus": "Online",
|
59
|
+
"targetResourceId": "{resource ID of child Traffic Manager profile}",
|
60
|
+
"weight": 10,
|
61
|
+
"priority": 1,
|
62
|
+
"endpointLocation": "westeurope",
|
63
|
+
"minChildEndpoints": 1
|
64
|
+
}
|
65
|
+
}]
|
66
|
+
}
|
67
|
+
}'
|
68
|
+
body
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.list_traffic_manager_profiles_response
|
72
|
+
body = '{
|
73
|
+
"values": [{
|
74
|
+
"location": "global",
|
75
|
+
"tags": {},
|
76
|
+
"id": "/subscriptions/###/resourceGroups/fog-test-rg/Microsoft.Network/trafficManagerProfiles/fog-test-profile",
|
77
|
+
"name": "fog-test-profile",
|
78
|
+
"type": "Microsoft.Network/trafficManagerProfiles",
|
79
|
+
"properties": {
|
80
|
+
"profileStatus": "Enabled",
|
81
|
+
"trafficRoutingMethod": "Performance",
|
82
|
+
"dnsConfig": {
|
83
|
+
"relativeName": "fog-test-app",
|
84
|
+
"fqdn": "myapp.trafficmanager.net",
|
85
|
+
"ttl": 30
|
86
|
+
},
|
87
|
+
"monitorConfig": {
|
88
|
+
"profileMonitorStatus": "Online",
|
89
|
+
"protocol": "http",
|
90
|
+
"port": 80,
|
91
|
+
"path": "/monitorpage.aspx"
|
92
|
+
},
|
93
|
+
"endpoints": [{
|
94
|
+
"id": "{ARM resource ID of this endpoint}",
|
95
|
+
"name": "{endpoint-name}",
|
96
|
+
"type": "Microsoft.Network/trafficManagerProfiles/azureEndpoints",
|
97
|
+
"properties": {
|
98
|
+
"endpointStatus": "Enabled",
|
99
|
+
"endpointMonitorStatus": "Online",
|
100
|
+
"targetResourceId": "{resource ID of target resource in Azure}",
|
101
|
+
"target": "myapp.azurewebsites.net",
|
102
|
+
"weight": 10,
|
103
|
+
"priority": 3,
|
104
|
+
"endpointLocation": "centralus"
|
105
|
+
}
|
106
|
+
}, {
|
107
|
+
"id": "{ARM resource ID of this endpoint}",
|
108
|
+
"name": "{endpoint-name}",
|
109
|
+
"type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
|
110
|
+
"properties": {
|
111
|
+
"endpointStatus": "Enabled",
|
112
|
+
"endpointMonitorStatus": "Online",
|
113
|
+
"target": "myendpoint.contoso.com",
|
114
|
+
"weight": 10,
|
115
|
+
"priority": 5,
|
116
|
+
"endpointLocation": "northeurope"
|
117
|
+
}
|
118
|
+
}, {
|
119
|
+
"id": "{ARM resource ID of this endpoint}",
|
120
|
+
"name": "{endpoint-name}",
|
121
|
+
"type": "Microsoft.Network/trafficManagerProfiles/nestedEndpoints",
|
122
|
+
"properties": {
|
123
|
+
"endpointStatus": "Enabled",
|
124
|
+
"endpointMonitorStatus": "Online",
|
125
|
+
"targetResourceId": "{resource ID of child Traffic Manager profile}",
|
126
|
+
"weight": 10,
|
127
|
+
"priority": 1,
|
128
|
+
"endpointLocation": "westeurope",
|
129
|
+
"minChildEndpoints": 1
|
130
|
+
}
|
131
|
+
}]
|
132
|
+
}
|
133
|
+
}]
|
134
|
+
}'
|
135
|
+
body
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|