fog-azure-rm 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/.travis.yml +11 -1
- data/CHANGELOG.md +35 -14
- data/fog-azure-rm.gemspec +8 -9
- data/lib/fog/azurerm.rb +3 -0
- data/lib/fog/azurerm/application_gateway.rb +64 -0
- data/lib/fog/azurerm/compute.rb +1 -0
- data/lib/fog/azurerm/config.rb +17 -0
- data/lib/fog/azurerm/core.rb +1 -0
- data/lib/fog/azurerm/dns.rb +4 -2
- data/lib/fog/azurerm/docs/application_gateway.md +139 -0
- data/lib/fog/azurerm/docs/dns.md +28 -6
- data/lib/fog/azurerm/docs/network.md +151 -143
- data/lib/fog/azurerm/docs/resources.md +3 -3
- data/lib/fog/azurerm/docs/storage.md +15 -3
- data/lib/fog/azurerm/docs/traffic_manager.md +118 -0
- data/lib/fog/azurerm/fog_azure_rm_exception.rb +13 -0
- data/lib/fog/azurerm/models/application_gateway/backend_address_pool.rb +22 -0
- data/lib/fog/azurerm/models/application_gateway/backend_http_setting.rb +26 -0
- data/lib/fog/azurerm/models/application_gateway/frontend_ip_configuration.rb +22 -0
- data/lib/fog/azurerm/models/application_gateway/frontend_port.rb +18 -0
- data/lib/fog/azurerm/models/{network/application_gateway.rb → application_gateway/gateway.rb} +74 -78
- data/lib/fog/azurerm/models/{network/application_gateways.rb → application_gateway/gateways.rb} +6 -6
- data/lib/fog/azurerm/models/application_gateway/http_listener.rb +28 -0
- data/lib/fog/azurerm/models/application_gateway/ip_configuration.rb +18 -0
- data/lib/fog/azurerm/models/application_gateway/probe.rb +28 -0
- data/lib/fog/azurerm/models/application_gateway/request_routing_rule.rb +25 -0
- data/lib/fog/azurerm/models/application_gateway/ssl_certificate.rb +22 -0
- data/lib/fog/azurerm/models/application_gateway/url_path_map.rb +28 -0
- data/lib/fog/azurerm/models/compute/availability_set.rb +8 -8
- data/lib/fog/azurerm/models/compute/availability_sets.rb +3 -1
- data/lib/fog/azurerm/models/compute/server.rb +50 -34
- data/lib/fog/azurerm/models/dns/record_set.rb +30 -2
- data/lib/fog/azurerm/models/dns/record_sets.rb +4 -2
- data/lib/fog/azurerm/models/dns/zone.rb +1 -1
- data/lib/fog/azurerm/models/dns/zones.rb +4 -2
- data/lib/fog/azurerm/models/network/express_route_circuit.rb +89 -0
- data/lib/fog/azurerm/models/network/express_route_circuit_peering.rb +93 -0
- data/lib/fog/azurerm/models/network/express_route_circuit_peerings.rb +31 -0
- data/lib/fog/azurerm/models/network/express_route_circuits.rb +29 -0
- data/lib/fog/azurerm/models/network/express_route_service_provider.rb +29 -0
- data/lib/fog/azurerm/models/network/express_route_service_providers.rb +21 -0
- data/lib/fog/azurerm/models/network/frontend_ip_configuration.rb +5 -15
- data/lib/fog/azurerm/models/network/inbound_nat_pool.rb +6 -7
- data/lib/fog/azurerm/models/network/inbound_nat_rule.rb +6 -9
- data/lib/fog/azurerm/models/network/load_balancer.rb +17 -19
- data/lib/fog/azurerm/models/network/load_balancing_rule.rb +11 -16
- data/lib/fog/azurerm/models/network/network_interface.rb +24 -24
- data/lib/fog/azurerm/models/network/network_security_group.rb +9 -9
- data/lib/fog/azurerm/models/network/network_security_rule.rb +13 -13
- data/lib/fog/azurerm/models/network/probe.rb +7 -8
- data/lib/fog/azurerm/models/network/public_ip.rb +15 -16
- data/lib/fog/azurerm/models/network/public_ips.rb +4 -2
- data/lib/fog/azurerm/models/network/subnet.rb +8 -8
- data/lib/fog/azurerm/models/network/virtual_network.rb +9 -9
- data/lib/fog/azurerm/models/network/virtual_network_gateway.rb +138 -0
- data/lib/fog/azurerm/models/network/virtual_network_gateways.rb +29 -0
- data/lib/fog/azurerm/models/network/vpn_client_configuration.rb +34 -0
- data/lib/fog/azurerm/models/network/vpn_client_revoked_certificates.rb +22 -0
- data/lib/fog/azurerm/models/network/vpn_client_root_certificates.rb +22 -0
- data/lib/fog/azurerm/models/resources/azure_resource.rb +5 -5
- data/lib/fog/azurerm/models/resources/dependency.rb +5 -5
- data/lib/fog/azurerm/models/resources/deployment.rb +14 -14
- data/lib/fog/azurerm/models/resources/provider.rb +4 -4
- data/lib/fog/azurerm/models/resources/provider_resource_type.rb +4 -4
- data/lib/fog/azurerm/models/resources/resource_group.rb +9 -1
- data/lib/fog/azurerm/models/resources/resource_groups.rb +5 -1
- data/lib/fog/azurerm/models/storage/data_disk.rb +6 -6
- data/lib/fog/azurerm/models/storage/storage_account.rb +41 -10
- data/lib/fog/azurerm/models/storage/storage_accounts.rb +1 -6
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_end_point.rb +75 -0
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb +31 -0
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb +59 -0
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb +26 -0
- data/lib/fog/azurerm/network.rb +25 -25
- data/lib/fog/azurerm/requests/{network → application_gateway}/create_application_gateway.rb +59 -95
- data/lib/fog/azurerm/requests/application_gateway/delete_application_gateway.rb +26 -0
- data/lib/fog/azurerm/requests/application_gateway/list_application_gateways.rb +29 -0
- data/lib/fog/azurerm/requests/compute/attach_data_disk_to_vm.rb +38 -38
- data/lib/fog/azurerm/requests/compute/check_vm_status.rb +8 -10
- data/lib/fog/azurerm/requests/compute/create_availability_set.rb +15 -20
- data/lib/fog/azurerm/requests/compute/create_virtual_machine.rb +50 -45
- data/lib/fog/azurerm/requests/compute/deallocate_virtual_machine.rb +9 -10
- data/lib/fog/azurerm/requests/compute/delete_availability_set.rb +7 -8
- data/lib/fog/azurerm/requests/compute/delete_virtual_machine.rb +9 -10
- data/lib/fog/azurerm/requests/compute/detach_data_disk_from_vm.rb +20 -19
- data/lib/fog/azurerm/requests/compute/generalize_virtual_machine.rb +9 -10
- data/lib/fog/azurerm/requests/compute/get_availability_set.rb +32 -0
- data/lib/fog/azurerm/requests/compute/get_virtual_machine.rb +17 -14
- data/lib/fog/azurerm/requests/compute/list_availability_sets.rb +7 -6
- data/lib/fog/azurerm/requests/compute/list_available_sizes_for_virtual_machine.rb +37 -31
- data/lib/fog/azurerm/requests/compute/list_virtual_machines.rb +47 -42
- data/lib/fog/azurerm/requests/compute/power_off_virtual_machine.rb +9 -10
- data/lib/fog/azurerm/requests/compute/redeploy_virtual_machine.rb +9 -10
- data/lib/fog/azurerm/requests/compute/restart_virtual_machine.rb +9 -10
- data/lib/fog/azurerm/requests/compute/start_virtual_machine.rb +9 -10
- data/lib/fog/azurerm/requests/dns/{create_record_set.rb → create_or_update_record_set.rb} +2 -2
- data/lib/fog/azurerm/requests/dns/{create_zone.rb → create_or_update_zone.rb} +3 -3
- data/lib/fog/azurerm/requests/dns/get_record_set.rb +56 -0
- data/lib/fog/azurerm/requests/dns/get_zone.rb +50 -0
- data/lib/fog/azurerm/requests/dns/list_record_sets.rb +2 -2
- data/lib/fog/azurerm/requests/network/add_address_prefixes_in_virtual_network.rb +3 -3
- data/lib/fog/azurerm/requests/network/add_dns_servers_in_virtual_network.rb +8 -6
- data/lib/fog/azurerm/requests/network/add_security_rules.rb +15 -13
- data/lib/fog/azurerm/requests/network/add_subnets_in_virtual_network.rb +6 -4
- data/lib/fog/azurerm/requests/network/attach_network_security_group_to_subnet.rb +13 -15
- data/lib/fog/azurerm/requests/network/attach_resource_to_nic.rb +17 -16
- data/lib/fog/azurerm/requests/network/attach_route_table_to_subnet.rb +13 -15
- data/lib/fog/azurerm/requests/network/check_for_public_ip.rb +2 -4
- data/lib/fog/azurerm/requests/network/check_for_virtual_network.rb +5 -5
- data/lib/fog/azurerm/requests/network/create_load_balancer.rb +43 -62
- data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit.rb +98 -0
- data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit_peering.rb +69 -0
- data/lib/fog/azurerm/requests/network/create_or_update_network_interface.rb +14 -19
- data/lib/fog/azurerm/requests/network/create_or_update_network_security_group.rb +29 -26
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network.rb +19 -25
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network_gateway.rb +151 -0
- data/lib/fog/azurerm/requests/network/create_public_ip.rb +8 -10
- data/lib/fog/azurerm/requests/network/create_subnet.rb +13 -15
- data/lib/fog/azurerm/requests/network/delete_express_route_circuit.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_express_route_circuit_peering.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_load_balancer.rb +8 -7
- data/lib/fog/azurerm/requests/network/delete_network_interface.rb +7 -8
- data/lib/fog/azurerm/requests/network/delete_network_security_group.rb +8 -7
- data/lib/fog/azurerm/requests/network/delete_public_ip.rb +4 -6
- data/lib/fog/azurerm/requests/network/delete_subnet.rb +6 -7
- data/lib/fog/azurerm/requests/network/delete_virtual_network.rb +6 -7
- data/lib/fog/azurerm/requests/network/delete_virtual_network_gateway.rb +28 -0
- data/lib/fog/azurerm/requests/network/detach_network_security_group_from_subnet.rb +15 -17
- data/lib/fog/azurerm/requests/network/detach_resource_from_nic.rb +15 -14
- data/lib/fog/azurerm/requests/network/detach_route_table_from_subnet.rb +15 -17
- data/lib/fog/azurerm/requests/network/get_express_route_circuit.rb +51 -0
- data/lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb +48 -0
- data/lib/fog/azurerm/requests/network/get_network_interface.rb +7 -7
- data/lib/fog/azurerm/requests/network/get_network_security_group.rb +11 -7
- data/lib/fog/azurerm/requests/network/get_public_ip.rb +41 -0
- data/lib/fog/azurerm/requests/network/get_subnet.rb +10 -9
- data/lib/fog/azurerm/requests/network/get_virtual_network.rb +12 -14
- data/lib/fog/azurerm/requests/network/get_virtual_network_gateway.rb +45 -0
- data/lib/fog/azurerm/requests/network/list_express_route_circuit_peerings.rb +44 -0
- data/lib/fog/azurerm/requests/network/list_express_route_circuits.rb +53 -0
- data/lib/fog/azurerm/requests/network/list_express_route_service_providers.rb +37 -0
- data/lib/fog/azurerm/requests/network/list_load_balancers.rb +6 -6
- data/lib/fog/azurerm/requests/network/list_network_interfaces.rb +42 -37
- data/lib/fog/azurerm/requests/network/list_network_security_groups.rb +149 -143
- data/lib/fog/azurerm/requests/network/list_public_ips.rb +26 -22
- data/lib/fog/azurerm/requests/network/list_subnets.rb +35 -31
- data/lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb +43 -0
- data/lib/fog/azurerm/requests/network/list_virtual_networks.rb +52 -51
- data/lib/fog/azurerm/requests/network/remove_address_prefixes_from_virtual_network.rb +6 -4
- data/lib/fog/azurerm/requests/network/remove_dns_servers_from_virtual_network.rb +6 -4
- data/lib/fog/azurerm/requests/network/remove_security_rule.rb +15 -13
- data/lib/fog/azurerm/requests/network/remove_subnets_from_virtual_network.rb +6 -4
- data/lib/fog/azurerm/requests/resources/create_deployment.rb +27 -21
- data/lib/fog/azurerm/requests/resources/create_resource_group.rb +9 -9
- data/lib/fog/azurerm/requests/resources/delete_deployment.rb +3 -4
- data/lib/fog/azurerm/requests/resources/delete_resource_group.rb +3 -5
- data/lib/fog/azurerm/requests/resources/delete_resource_tag.rb +14 -20
- data/lib/fog/azurerm/requests/resources/list_deployments.rb +8 -7
- data/lib/fog/azurerm/requests/resources/list_resource_groups.rb +27 -23
- data/lib/fog/azurerm/requests/resources/list_tagged_resources.rb +30 -27
- data/lib/fog/azurerm/requests/resources/tag_resource.rb +15 -20
- data/lib/fog/azurerm/requests/storage/check_storage_account_name_availability.rb +13 -15
- data/lib/fog/azurerm/requests/storage/create_container.rb +6 -5
- data/lib/fog/azurerm/requests/storage/create_storage_account.rb +36 -22
- data/lib/fog/azurerm/requests/storage/delete_container.rb +6 -5
- data/lib/fog/azurerm/requests/storage/delete_disk.rb +13 -12
- data/lib/fog/azurerm/requests/storage/delete_storage_account.rb +8 -9
- data/lib/fog/azurerm/requests/storage/get_blob_metadata.rb +10 -9
- data/lib/fog/azurerm/requests/storage/get_container_access_control_list.rb +6 -5
- data/lib/fog/azurerm/requests/storage/get_container_metadata.rb +8 -7
- data/lib/fog/azurerm/requests/storage/get_container_properties.rb +6 -5
- data/lib/fog/azurerm/requests/storage/get_storage_access_keys.rb +7 -7
- data/lib/fog/azurerm/requests/storage/list_containers.rb +6 -5
- data/lib/fog/azurerm/requests/storage/list_storage_account_for_rg.rb +7 -12
- data/lib/fog/azurerm/requests/storage/list_storage_accounts.rb +7 -13
- data/lib/fog/azurerm/requests/storage/set_blob_metadata.rb +8 -7
- data/lib/fog/azurerm/requests/storage/set_container_metadata.rb +8 -7
- data/lib/fog/azurerm/requests/traffic_manager/create_traffic_manager_endpoint.rb +54 -0
- data/lib/fog/azurerm/requests/traffic_manager/create_traffic_manager_profile.rb +107 -0
- data/lib/fog/azurerm/requests/traffic_manager/delete_traffic_manager_endpoint.rb +28 -0
- data/lib/fog/azurerm/requests/traffic_manager/delete_traffic_manager_profile.rb +26 -0
- data/lib/fog/azurerm/requests/traffic_manager/get_traffic_manager_endpoint.rb +39 -0
- data/lib/fog/azurerm/requests/traffic_manager/get_traffic_manager_profile.rb +80 -0
- data/lib/fog/azurerm/requests/traffic_manager/list_traffic_manager_profiles.rb +82 -0
- data/lib/fog/azurerm/storage.rb +1 -1
- data/lib/fog/azurerm/traffic_manager.rb +56 -0
- data/lib/fog/azurerm/utilities/general.rb +28 -0
- data/lib/fog/azurerm/version.rb +1 -1
- data/test/api_stub.rb +14 -7
- data/test/api_stub/models/{network/application_gateway.rb → application_gateway/gateway.rb} +8 -7
- data/test/api_stub/models/compute/availability_set.rb +35 -6
- data/test/api_stub/models/compute/server.rb +15 -16
- data/test/api_stub/models/dns/record_set.rb +20 -0
- data/test/api_stub/models/network/express_route_circuit.rb +47 -0
- data/test/api_stub/models/network/express_route_circuit_peering.rb +33 -0
- data/test/api_stub/models/network/express_route_service_provider.rb +29 -0
- data/test/api_stub/models/network/load_balancer.rb +137 -115
- data/test/api_stub/models/network/network_interface.rb +3 -2
- data/test/api_stub/models/network/network_security_group.rb +4 -3
- data/test/api_stub/models/network/public_ip.rb +5 -4
- data/test/api_stub/models/network/subnet.rb +3 -2
- data/test/api_stub/models/network/virtual_network.rb +3 -2
- data/test/api_stub/models/network/virtual_network_gateway.rb +26 -0
- data/test/api_stub/models/resources/deployment.rb +56 -50
- data/test/api_stub/models/resources/resource.rb +17 -14
- data/test/api_stub/models/resources/resource_group.rb +4 -18
- data/test/api_stub/models/storage/storageaccount.rb +8 -15
- data/test/api_stub/models/{network → traffic_manager}/traffic_manager_end_point.rb +4 -3
- data/test/api_stub/models/{network → traffic_manager}/traffic_manager_profile.rb +4 -3
- data/test/api_stub/requests/application_gateway/gateway.rb +431 -0
- data/test/api_stub/requests/compute/availability_set.rb +34 -23
- data/test/api_stub/requests/compute/virtual_machine.rb +73 -30
- data/test/api_stub/requests/dns/record_set.rb +6 -6
- data/test/api_stub/requests/dns/zone.rb +2 -2
- data/test/api_stub/requests/network/express_route_circuit.rb +100 -0
- data/test/api_stub/requests/network/express_route_circuit_peering.rb +62 -0
- data/test/api_stub/requests/network/express_route_service_provider.rb +30 -0
- data/test/api_stub/requests/network/load_balancer.rb +273 -251
- data/test/api_stub/requests/network/network_interface.rb +12 -16
- data/test/api_stub/requests/network/network_security_group.rb +12 -27
- data/test/api_stub/requests/network/public_ip.rb +7 -9
- data/test/api_stub/requests/network/subnet.rb +6 -8
- data/test/api_stub/requests/network/virtual_network.rb +6 -8
- data/test/api_stub/requests/network/virtual_network_gateway.rb +49 -0
- data/test/api_stub/requests/resources/deployment.rb +56 -11
- data/test/api_stub/requests/resources/resource.rb +6 -8
- data/test/api_stub/requests/resources/resource_group.rb +6 -8
- data/test/api_stub/requests/storage/storageaccount.rb +44 -31
- data/test/api_stub/requests/traffic_manager/traffic_manager_endpoint.rb +41 -0
- data/test/api_stub/requests/{network → traffic_manager}/traffic_manager_profile.rb +7 -5
- data/test/integration/application_gateway.rb +16 -8
- data/test/integration/availability_set.rb +1 -1
- data/test/integration/container.rb +2 -1
- data/test/integration/deployment.rb +54 -0
- data/test/integration/express_route_circuit.rb +80 -0
- data/test/integration/external_load_balancer.rb +7 -6
- data/test/integration/internal_load_balancer.rb +6 -5
- data/test/integration/network_interface.rb +2 -2
- data/test/integration/public_ip.rb +2 -2
- data/test/integration/record_set.rb +26 -8
- data/test/integration/resource_group.rb +39 -0
- data/test/integration/resource_tag.rb +62 -0
- data/test/integration/server.rb +6 -4
- data/test/integration/storage_account.rb +33 -5
- data/test/integration/subnet.rb +2 -2
- data/test/integration/traffic_manager.rb +12 -12
- data/test/integration/virtual_network.rb +6 -6
- data/test/integration/virtual_network_gateway.rb +101 -0
- data/test/integration/zone.rb +1 -1
- data/test/models/application_gateway/test_gateway.rb +57 -0
- data/test/models/{network/test_application_gateways.rb → application_gateway/test_gateways.rb} +10 -10
- data/test/models/compute/test_availability_set.rb +2 -1
- data/test/models/compute/test_availability_sets.rb +5 -4
- data/test/models/compute/test_server.rb +6 -5
- data/test/models/compute/test_servers.rb +3 -2
- data/test/models/dns/test_record_set.rb +27 -1
- data/test/models/dns/test_record_sets.rb +3 -2
- data/test/models/dns/test_zone.rb +1 -1
- data/test/models/dns/test_zones.rb +2 -1
- data/test/models/network/test_express_route_circuit.rb +58 -0
- data/test/models/network/test_express_route_circuit_peering.rb +59 -0
- data/test/models/network/test_express_route_circuit_peerings.rb +43 -0
- data/test/models/network/test_express_route_circuits.rb +42 -0
- data/test/models/network/test_express_route_service_providers.rb +30 -0
- data/test/models/network/test_load_balancer.rb +7 -12
- data/test/models/network/test_load_balancers.rb +4 -4
- data/test/models/network/test_network_interface.rb +10 -16
- data/test/models/network/test_network_interfaces.rb +3 -2
- data/test/models/network/test_network_security_group.rb +6 -8
- data/test/models/network/test_network_security_groups.rb +2 -1
- data/test/models/network/test_public_ip.rb +5 -6
- data/test/models/network/test_public_ips.rb +6 -6
- data/test/models/network/test_subnet.rb +9 -15
- data/test/models/network/test_subnets.rb +3 -2
- data/test/models/network/test_virtual_network.rb +10 -16
- data/test/models/network/test_virtual_network_gateway.rb +62 -0
- data/test/models/network/test_virtual_network_gateways.rb +42 -0
- data/test/models/network/test_virtual_networks.rb +3 -2
- data/test/models/resources/test_deployment.rb +2 -1
- data/test/models/resources/test_deployments.rb +2 -1
- data/test/models/resources/test_resource_group.rb +2 -1
- data/test/models/resources/test_resource_groups.rb +2 -1
- data/test/models/resources/test_resources.rb +2 -1
- data/test/models/storage/test_data_disk.rb +0 -6
- data/test/models/storage/test_storage_account.rb +29 -8
- data/test/models/storage/test_storage_accounts.rb +5 -5
- data/test/models/{network → traffic_manager}/test_traffic_manager_end_point.rb +4 -3
- data/test/models/traffic_manager/test_traffic_manager_end_points.rb +43 -0
- data/test/models/{network → traffic_manager}/test_traffic_manager_profile.rb +5 -4
- data/test/models/traffic_manager/test_traffic_manager_profiles.rb +42 -0
- data/test/requests/application_gateway/test_create_application_gateway.rb +51 -0
- data/test/requests/application_gateway/test_delete_application_gateway.rb +23 -0
- data/test/requests/application_gateway/test_list_application_gateways.rb +24 -0
- data/test/requests/compute/test_attach_data_disk_to_vm.rb +40 -123
- data/test/requests/compute/test_create_availability_set.rb +9 -11
- data/test/requests/compute/test_create_virtual_machine.rb +13 -29
- data/test/requests/compute/test_deallocate_virtual_machine.rb +7 -13
- data/test/requests/compute/test_delete_availability_set.rb +5 -11
- data/test/requests/compute/test_delete_virtual_machine.rb +7 -13
- data/test/requests/compute/test_detach_data_disk_from_vm.rb +13 -34
- data/test/requests/compute/test_generalize_virtual_machine.rb +7 -13
- data/test/requests/compute/test_get_availability_set.rb +24 -0
- data/test/requests/compute/test_get_virtual_machine.rb +8 -15
- data/test/requests/compute/test_get_vm_status.rb +8 -14
- data/test/requests/compute/test_list_availability_sets.rb +8 -14
- data/test/requests/compute/test_list_available_sizes_for_virtual_machine.rb +8 -15
- data/test/requests/compute/test_list_virtual_machines.rb +8 -14
- data/test/requests/compute/test_power_off_virtual_machine.rb +7 -13
- data/test/requests/compute/test_redeploy_virtual_machine.rb +7 -13
- data/test/requests/compute/test_restart_virtual_machine.rb +7 -13
- data/test/requests/compute/test_start_virtual_machine.rb +7 -13
- data/test/requests/dns/test_create_record_set.rb +8 -8
- data/test/requests/dns/test_create_zone.rb +6 -6
- data/test/requests/dns/test_delete_record_set.rb +2 -2
- data/test/requests/dns/test_delete_zone.rb +2 -2
- data/test/requests/dns/test_get_record_set.rb +46 -0
- data/test/requests/dns/test_get_zone.rb +46 -0
- data/test/requests/network/test_add_address_prefixes_in_virtual_network.rb +11 -27
- data/test/requests/network/test_add_dns_servers_in_virtual_network.rb +11 -27
- data/test/requests/network/test_add_security_rules.rb +11 -31
- data/test/requests/network/test_add_subnets_in_virtual_network.rb +11 -27
- data/test/requests/network/test_attach_network_security_group_to_subnet.rb +9 -16
- data/test/requests/network/test_attach_resource_to_nic.rb +15 -37
- data/test/requests/network/test_attach_route_table_to_subnet.rb +9 -16
- data/test/requests/network/test_check_for_public_ip.rb +10 -18
- data/test/requests/network/test_check_for_virtual_network.rb +10 -18
- data/test/requests/network/test_create_express_route_circuit.rb +39 -0
- data/test/requests/network/test_create_express_route_circuit_peering.rb +37 -0
- data/test/requests/network/test_create_load_balancer.rb +27 -34
- data/test/requests/network/test_create_network_interface.rb +16 -28
- data/test/requests/network/test_create_or_update_network_security_group.rb +38 -0
- data/test/requests/network/test_create_or_update_virtual_network.rb +20 -28
- data/test/requests/network/test_create_public_ip.rb +13 -22
- data/test/requests/network/test_create_subnet.rb +13 -22
- data/test/requests/network/test_create_virtual_network_gateway.rb +37 -0
- data/test/requests/network/test_delete_express_route_circuit.rb +24 -0
- data/test/requests/network/test_delete_express_route_circuit_peering.rb +24 -0
- data/test/requests/network/test_delete_load_balancer.rb +7 -13
- data/test/requests/network/test_delete_network_interface.rb +7 -13
- data/test/requests/network/test_delete_network_security_group.rb +6 -13
- data/test/requests/network/test_delete_public_ip.rb +7 -13
- data/test/requests/network/test_delete_subnet.rb +7 -13
- data/test/requests/network/test_delete_virtual_network.rb +7 -13
- data/test/requests/network/test_delete_virtual_network_gateway.rb +24 -0
- data/test/requests/network/test_detach_network_security_group_from_subnet.rb +9 -16
- data/test/requests/network/test_detach_resource_from_nic.rb +15 -34
- data/test/requests/network/test_detach_route_table_from_subnet.rb +9 -16
- data/test/requests/network/test_get_express_route_circuit.rb +24 -0
- data/test/requests/network/test_get_express_route_circuit_peering.rb +24 -0
- data/test/requests/network/test_get_network_interface.rb +8 -15
- data/test/requests/network/test_get_network_security_group.rb +9 -16
- data/test/requests/network/test_get_public_ip.rb +26 -0
- data/test/requests/network/test_get_subnet.rb +9 -16
- data/test/requests/network/test_get_virtual_network.rb +26 -0
- data/test/requests/network/test_get_virtual_network_gateway.rb +24 -0
- data/test/requests/network/test_list_express_route_circuit_peerings.rb +24 -0
- data/test/requests/network/test_list_express_route_circuits.rb +26 -0
- data/test/requests/network/test_list_express_route_service_providers.rb +24 -0
- data/test/requests/network/test_list_load_balancers.rb +8 -15
- data/test/requests/network/test_list_network_interfaces.rb +8 -15
- data/test/requests/network/test_list_network_security_groups.rb +9 -16
- data/test/requests/network/test_list_public_ips.rb +8 -15
- data/test/requests/network/test_list_subnets.rb +8 -15
- data/test/requests/network/test_list_virtual_network_gateways.rb +24 -0
- data/test/requests/network/test_list_virtual_networks.rb +8 -15
- data/test/requests/network/test_remove_address_prefixes_from_virtual_network.rb +11 -27
- data/test/requests/network/test_remove_dns_servers_from_virtual_network.rb +11 -27
- data/test/requests/network/test_remove_security_rule.rb +11 -31
- data/test/requests/network/test_remove_subnets_from_virtual_network.rb +11 -27
- data/test/requests/resources/test_create_deployment.rb +10 -27
- data/test/requests/resources/test_create_resource_group.rb +8 -15
- data/test/requests/resources/test_delete_deployment.rb +5 -11
- data/test/requests/resources/test_delete_resource_group.rb +8 -14
- data/test/requests/resources/test_delete_resource_tag.rb +12 -28
- data/test/requests/resources/test_list_deployments.rb +8 -15
- data/test/requests/resources/test_list_resource_groups.rb +8 -15
- data/test/requests/resources/test_list_tagged_resources.rb +8 -15
- data/test/requests/resources/test_tag_resource.rb +12 -28
- data/test/requests/storage/test_check_storage_account_name_availability.rb +14 -29
- data/test/requests/storage/test_create_storage_account.rb +13 -35
- data/test/requests/storage/test_delete_storage_account.rb +8 -14
- data/test/requests/storage/test_get_storage_access_keys.rb +7 -14
- data/test/requests/storage/test_list_storage_accounts.rb +12 -22
- data/test/requests/storage/test_list_storage_accounts_for_rg.rb +15 -29
- data/test/requests/traffic_manager/test_create_traffic_manager_endpoint.rb +25 -0
- data/test/requests/traffic_manager/test_create_traffic_manager_profile.rb +25 -0
- data/test/requests/traffic_manager/test_delete_traffic_manager_endpoint.rb +23 -0
- data/test/requests/traffic_manager/test_delete_traffic_manager_profile.rb +23 -0
- data/test/requests/traffic_manager/test_get_traffic_manager_endpoint.rb +24 -0
- data/test/requests/traffic_manager/test_get_traffic_manager_profile.rb +24 -0
- data/test/requests/traffic_manager/test_list_traffic_manager_profiles.rb +24 -0
- data/test/test_helper.rb +113 -4
- metadata +147 -86
- data/lib/fog/azurerm/models/network/application_gateway_backend_address_pool.rb +0 -24
- data/lib/fog/azurerm/models/network/application_gateway_backend_http_setting.rb +0 -30
- data/lib/fog/azurerm/models/network/application_gateway_frontend_ip_configuration.rb +0 -30
- data/lib/fog/azurerm/models/network/application_gateway_frontend_port.rb +0 -22
- data/lib/fog/azurerm/models/network/application_gateway_http_listener.rb +0 -37
- data/lib/fog/azurerm/models/network/application_gateway_ip_configuration.rb +0 -21
- data/lib/fog/azurerm/models/network/application_gateway_probe.rb +0 -32
- data/lib/fog/azurerm/models/network/application_gateway_request_routing_rule.rb +0 -35
- data/lib/fog/azurerm/models/network/application_gateway_ssl_certificate.rb +0 -26
- data/lib/fog/azurerm/models/network/application_gateway_url_path_map.rb +0 -32
- data/lib/fog/azurerm/models/network/traffic_manager_end_point.rb +0 -63
- data/lib/fog/azurerm/models/network/traffic_manager_end_points.rb +0 -29
- data/lib/fog/azurerm/models/network/traffic_manager_profile.rb +0 -59
- data/lib/fog/azurerm/models/network/traffic_manager_profiles.rb +0 -24
- data/lib/fog/azurerm/requests/network/create_traffic_manager_endpoint.rb +0 -78
- data/lib/fog/azurerm/requests/network/create_traffic_manager_profile.rb +0 -127
- data/lib/fog/azurerm/requests/network/delete_application_gateway.rb +0 -27
- data/lib/fog/azurerm/requests/network/delete_traffic_manager_endpoint.rb +0 -37
- data/lib/fog/azurerm/requests/network/delete_traffic_manager_profile.rb +0 -37
- data/lib/fog/azurerm/requests/network/get_traffic_manager_profile.rb +0 -96
- data/lib/fog/azurerm/requests/network/list_application_gateways.rb +0 -31
- data/lib/fog/azurerm/requests/network/list_traffic_manager_profiles.rb +0 -98
- data/test/api_stub/models/storage/data_disk.rb +0 -30
- data/test/api_stub/requests/network/application_gateway.rb +0 -433
- data/test/api_stub/requests/network/traffic_manager_endpoint.rb +0 -25
- data/test/models/network/test_application_gateway.rb +0 -62
- data/test/models/network/test_traffic_manager_end_points.rb +0 -42
- data/test/models/network/test_traffic_manager_profiles.rb +0 -41
- data/test/requests/network/test_create_application_gateway.rb +0 -61
- data/test/requests/network/test_create_network_security_group.rb +0 -45
- data/test/requests/network/test_create_traffic_manager_endpoint.rb +0 -32
- data/test/requests/network/test_create_traffic_manager_profile.rb +0 -32
- data/test/requests/network/test_delete_application_gateway.rb +0 -30
- data/test/requests/network/test_delete_traffic_manager_endpoint.rb +0 -28
- data/test/requests/network/test_delete_traffic_manager_profile.rb +0 -28
- data/test/requests/network/test_get_traffic_manager_profile.rb +0 -29
- data/test/requests/network/test_list_application_gateways.rb +0 -31
- data/test/requests/network/test_list_traffic_manager_profiles.rb +0 -29
@@ -8,11 +8,19 @@ module Fog
|
|
8
8
|
attribute :id
|
9
9
|
attribute :location
|
10
10
|
|
11
|
+
def self.parse(resource_group)
|
12
|
+
hash = {}
|
13
|
+
hash['id'] = resource_group.id
|
14
|
+
hash['name'] = resource_group.name
|
15
|
+
hash['location'] = resource_group.location
|
16
|
+
hash
|
17
|
+
end
|
18
|
+
|
11
19
|
def save
|
12
20
|
requires :name
|
13
21
|
requires :location
|
14
22
|
resource_group = service.create_resource_group(name, location)
|
15
|
-
merge_attributes(resource_group)
|
23
|
+
merge_attributes(Fog::Resources::AzureRM::ResourceGroup.parse(resource_group))
|
16
24
|
end
|
17
25
|
|
18
26
|
def destroy
|
@@ -10,7 +10,11 @@ module Fog
|
|
10
10
|
model Fog::Resources::AzureRM::ResourceGroup
|
11
11
|
|
12
12
|
def all
|
13
|
-
|
13
|
+
resource_groups = []
|
14
|
+
service.list_resource_groups.each do |resource_group|
|
15
|
+
resource_groups.push(Fog::Resources::AzureRM::ResourceGroup.parse(resource_group))
|
16
|
+
end
|
17
|
+
load(resource_groups)
|
14
18
|
end
|
15
19
|
|
16
20
|
def get(identity)
|
@@ -12,12 +12,12 @@ module Fog
|
|
12
12
|
|
13
13
|
def self.parse(disk)
|
14
14
|
hash = {}
|
15
|
-
hash['name'] = disk
|
16
|
-
hash['disk_size_gb'] = disk
|
17
|
-
hash['lun'] = disk
|
18
|
-
hash['vhd_uri'] = disk
|
19
|
-
hash['caching'] = disk
|
20
|
-
hash['create_option'] = disk
|
15
|
+
hash['name'] = disk.name
|
16
|
+
hash['disk_size_gb'] = disk.disk_size_gb
|
17
|
+
hash['lun'] = disk.lun
|
18
|
+
hash['vhd_uri'] = disk.vhd.uri
|
19
|
+
hash['caching'] = disk.caching unless disk.caching.nil?
|
20
|
+
hash['create_option'] = disk.create_option
|
21
21
|
hash
|
22
22
|
end
|
23
23
|
end
|
@@ -7,23 +7,52 @@ module Fog
|
|
7
7
|
identity :name
|
8
8
|
attribute :location
|
9
9
|
attribute :resource_group
|
10
|
-
attribute :
|
10
|
+
attribute :sku_name
|
11
|
+
attribute :replication
|
12
|
+
|
13
|
+
def self.parse(storage_account)
|
14
|
+
hash = {}
|
15
|
+
hash['id'] = storage_account.id
|
16
|
+
hash['name'] = storage_account.name
|
17
|
+
hash['location'] = storage_account.location
|
18
|
+
hash['resource_group'] = get_resource_group_from_id(storage_account.id)
|
19
|
+
hash['sku_name'] = storage_account.sku.name.split('_').first
|
20
|
+
hash['replication'] = storage_account.sku.name.split('_').last
|
21
|
+
hash
|
22
|
+
end
|
11
23
|
|
12
24
|
def save
|
13
25
|
requires :name
|
14
26
|
requires :location
|
15
27
|
requires :resource_group
|
16
|
-
hash = {}
|
17
28
|
# Create a model for new storage account.
|
18
|
-
|
19
|
-
|
29
|
+
self.sku_name = STANDARD_STORAGE if sku_name.nil?
|
30
|
+
self.replication = ALLOWED_STANDARD_REPLICATION.first if replication.nil?
|
31
|
+
validate_sku_name!
|
32
|
+
storage_account_arguments = get_storage_account_arguments
|
33
|
+
storage_account = service.create_storage_account(storage_account_arguments)
|
34
|
+
merge_attributes(Fog::Storage::AzureRM::StorageAccount.parse(storage_account))
|
35
|
+
end
|
36
|
+
|
37
|
+
def get_storage_account_arguments
|
38
|
+
{
|
39
|
+
resource_group: resource_group,
|
40
|
+
name: name,
|
41
|
+
sku_name: sku_name,
|
42
|
+
location: location,
|
43
|
+
replication: replication
|
44
|
+
}
|
45
|
+
end
|
20
46
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
47
|
+
def validate_sku_name!
|
48
|
+
case sku_name
|
49
|
+
when STANDARD_STORAGE
|
50
|
+
raise 'Standard Replications can only be LRS, ZRS, GRS or RAGRS.' unless ALLOWED_STANDARD_REPLICATION.include?(replication)
|
51
|
+
when PREMIUM_STORAGE
|
52
|
+
raise 'Premium Replication can only be LRS.' if replication != 'LRS'
|
53
|
+
else
|
54
|
+
raise 'Account Type can only be Standard or Premium'
|
55
|
+
end
|
27
56
|
end
|
28
57
|
|
29
58
|
def get_access_keys(options = {})
|
@@ -33,6 +62,8 @@ module Fog
|
|
33
62
|
def destroy
|
34
63
|
service.delete_storage_account(resource_group, name)
|
35
64
|
end
|
65
|
+
|
66
|
+
private :get_storage_account_arguments, :validate_sku_name!
|
36
67
|
end
|
37
68
|
end
|
38
69
|
end
|
@@ -18,12 +18,7 @@ module Fog
|
|
18
18
|
hash_of_storage_accounts = service.list_storage_accounts
|
19
19
|
end
|
20
20
|
hash_of_storage_accounts.each do |account|
|
21
|
-
|
22
|
-
hash['name'] = account['name']
|
23
|
-
hash['location'] = account['location']
|
24
|
-
hash['resource_group'] = account['id'].split('/')[4]
|
25
|
-
hash['account_type'] = account['properties']['accountType']
|
26
|
-
accounts << hash
|
21
|
+
accounts << Fog::Storage::AzureRM::StorageAccount.parse(account)
|
27
22
|
end
|
28
23
|
load(accounts)
|
29
24
|
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
module Fog
|
2
|
+
module TrafficManager
|
3
|
+
class AzureRM
|
4
|
+
# Traffic Manager End Point model for Traffic Manager Service
|
5
|
+
class TrafficManagerEndPoint < Fog::Model
|
6
|
+
identity :name
|
7
|
+
attribute :traffic_manager_profile_name
|
8
|
+
attribute :id
|
9
|
+
attribute :resource_group
|
10
|
+
attribute :type
|
11
|
+
attribute :target_resource_id
|
12
|
+
attribute :target
|
13
|
+
attribute :endpoint_status
|
14
|
+
attribute :endpoint_monitor_status
|
15
|
+
attribute :weight
|
16
|
+
attribute :priority
|
17
|
+
attribute :endpoint_location
|
18
|
+
attribute :min_child_endpoints
|
19
|
+
|
20
|
+
def self.parse(endpoint)
|
21
|
+
hash = {}
|
22
|
+
hash['id'] = endpoint.id
|
23
|
+
hash['name'] = endpoint.name
|
24
|
+
hash['resource_group'] = get_resource_group_from_id(endpoint.id)
|
25
|
+
hash['type'] = get_end_point_type(endpoint.type)
|
26
|
+
hash['target_resource_id'] = endpoint.target_resource_id
|
27
|
+
hash['target'] = endpoint.target
|
28
|
+
hash['endpoint_status'] = endpoint.endpoint_status
|
29
|
+
hash['endpoint_monitor_status'] = endpoint.endpoint_monitor_status
|
30
|
+
hash['weight'] = endpoint.weight
|
31
|
+
hash['priority'] = endpoint.priority
|
32
|
+
hash['endpoint_location'] = endpoint.endpoint_location
|
33
|
+
hash['min_child_endpoints'] = endpoint.min_child_endpoints
|
34
|
+
hash['traffic_manager_profile_name'] = get_traffic_manager_profile_name_from_endpoint_id(endpoint.id)
|
35
|
+
hash
|
36
|
+
end
|
37
|
+
|
38
|
+
def save
|
39
|
+
requires :name, :traffic_manager_profile_name, :resource_group, :type
|
40
|
+
requires :target_resource_id if type.eql?(AZURE_ENDPOINTS)
|
41
|
+
requires :target, :endpoint_location if type.eql?(EXTERNAL_ENDPOINTS)
|
42
|
+
requires :target_resource_id, :endpoint_location, :min_child_endpoints if type.eql?(NESTED_ENDPOINTS)
|
43
|
+
|
44
|
+
if %w(azureEndpoints externalEndpoints nestedEndpoints).select { |type| type if type.eql?(type) }.any?
|
45
|
+
traffic_manager_endpoint = service.create_traffic_manager_endpoint(traffic_manager_endpoint_hash)
|
46
|
+
merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.parse(traffic_manager_endpoint))
|
47
|
+
else
|
48
|
+
raise(ArgumentError, ":type should be '#{AZURE_ENDPOINTS}', '#{EXTERNAL_ENDPOINTS}' or '#{NESTED_ENDPOINTS}'")
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def destroy
|
53
|
+
service.delete_traffic_manager_endpoint(resource_group, name, traffic_manager_profile_name, type)
|
54
|
+
end
|
55
|
+
|
56
|
+
private
|
57
|
+
|
58
|
+
def traffic_manager_endpoint_hash
|
59
|
+
{
|
60
|
+
resource_group: resource_group,
|
61
|
+
name: name,
|
62
|
+
traffic_manager_profile_name: traffic_manager_profile_name,
|
63
|
+
type: type,
|
64
|
+
target_resource_id: target_resource_id,
|
65
|
+
target: target,
|
66
|
+
weight: weight,
|
67
|
+
priority: priority,
|
68
|
+
endpoint_location: endpoint_location,
|
69
|
+
min_child_endpoints: min_child_endpoints
|
70
|
+
}
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Fog
|
2
|
+
module TrafficManager
|
3
|
+
class AzureRM
|
4
|
+
# Traffic Manager End Point Collection for TrafficManager Service
|
5
|
+
class TrafficManagerEndPoints < Fog::Collection
|
6
|
+
attribute :resource_group
|
7
|
+
attribute :traffic_manager_profile_name
|
8
|
+
model Fog::TrafficManager::AzureRM::TrafficManagerEndPoint
|
9
|
+
|
10
|
+
def all
|
11
|
+
requires :resource_group
|
12
|
+
requires :traffic_manager_profile_name
|
13
|
+
|
14
|
+
traffic_manager_endpoints = []
|
15
|
+
profile = service.get_traffic_manager_profile(resource_group, traffic_manager_profile_name)
|
16
|
+
end_points = profile.endpoints
|
17
|
+
end_points.each do |endpoint|
|
18
|
+
traffic_manager_endpoints << Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.parse(endpoint)
|
19
|
+
end
|
20
|
+
load(traffic_manager_endpoints)
|
21
|
+
end
|
22
|
+
|
23
|
+
def get(resource_group, traffic_manager_profile_name, end_point_name, type)
|
24
|
+
endpoint = service.get_traffic_manager_end_point(resource_group, traffic_manager_profile_name, end_point_name, type)
|
25
|
+
endpoint_obj = Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.new(service: service)
|
26
|
+
endpoint_obj.merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.parse(endpoint))
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module Fog
|
2
|
+
module TrafficManager
|
3
|
+
class AzureRM
|
4
|
+
# Traffic Manager Profile model for TrafficManager Service
|
5
|
+
class TrafficManagerProfile < Fog::Model
|
6
|
+
identity :name
|
7
|
+
attribute :id
|
8
|
+
attribute :resource_group
|
9
|
+
attribute :location
|
10
|
+
attribute :profile_status
|
11
|
+
attribute :traffic_routing_method
|
12
|
+
attribute :relative_name
|
13
|
+
attribute :fqdn
|
14
|
+
attribute :ttl
|
15
|
+
attribute :profile_monitor_status
|
16
|
+
attribute :protocol
|
17
|
+
attribute :port
|
18
|
+
attribute :path
|
19
|
+
attribute :endpoints
|
20
|
+
|
21
|
+
def self.parse(profile)
|
22
|
+
hash = {}
|
23
|
+
hash['id'] = profile.id
|
24
|
+
hash['name'] = profile.name
|
25
|
+
hash['resource_group'] = get_resource_group_from_id(profile.id)
|
26
|
+
hash['location'] = profile.location
|
27
|
+
hash['profile_status'] = profile.profile_status
|
28
|
+
hash['traffic_routing_method'] = profile.traffic_routing_method
|
29
|
+
hash['relative_name'] = profile.dns_config.relative_name
|
30
|
+
hash['fqdn'] = profile.dns_config.fqdn
|
31
|
+
hash['ttl'] = profile.dns_config.ttl
|
32
|
+
hash['profile_monitor_status'] = profile.monitor_config.profile_monitor_status
|
33
|
+
hash['protocol'] = profile.monitor_config.protocol
|
34
|
+
hash['port'] = profile.monitor_config.port
|
35
|
+
hash['path'] = profile.monitor_config.path
|
36
|
+
hash['endpoints'] = []
|
37
|
+
profile.endpoints.each do |endpoint|
|
38
|
+
end_point = Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.new
|
39
|
+
hash['endpoints'] << end_point.merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.parse(endpoint))
|
40
|
+
end
|
41
|
+
hash
|
42
|
+
end
|
43
|
+
|
44
|
+
def save
|
45
|
+
requires :name, :resource_group, :traffic_routing_method, :relative_name, :ttl,
|
46
|
+
:protocol, :port, :path
|
47
|
+
traffic_manager_profile = service.create_traffic_manager_profile(resource_group, name,
|
48
|
+
traffic_routing_method, relative_name, ttl,
|
49
|
+
protocol, port, path)
|
50
|
+
merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerProfile.parse(traffic_manager_profile))
|
51
|
+
end
|
52
|
+
|
53
|
+
def destroy
|
54
|
+
service.delete_traffic_manager_profile(resource_group, name)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Fog
|
2
|
+
module TrafficManager
|
3
|
+
class AzureRM
|
4
|
+
# Traffic Manager Profile Collection for TrafficManager Service
|
5
|
+
class TrafficManagerProfiles < Fog::Collection
|
6
|
+
attribute :resource_group
|
7
|
+
model Fog::TrafficManager::AzureRM::TrafficManagerProfile
|
8
|
+
|
9
|
+
def all
|
10
|
+
requires :resource_group
|
11
|
+
traffic_manager_profiles = []
|
12
|
+
service.list_traffic_manager_profiles(resource_group).each do |profile|
|
13
|
+
traffic_manager_profiles << Fog::TrafficManager::AzureRM::TrafficManagerProfile.parse(profile)
|
14
|
+
end
|
15
|
+
load(traffic_manager_profiles)
|
16
|
+
end
|
17
|
+
|
18
|
+
def get(resource_group, traffic_manager_profile_name)
|
19
|
+
profile = service.get_traffic_manager_profile(resource_group, traffic_manager_profile_name)
|
20
|
+
profile_obj = Fog::TrafficManager::AzureRM::TrafficManagerProfile.new(service: service)
|
21
|
+
profile_obj.merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerProfile.parse(profile))
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/fog/azurerm/network.rb
CHANGED
@@ -23,6 +23,7 @@ module Fog
|
|
23
23
|
request :check_for_virtual_network
|
24
24
|
request :create_public_ip
|
25
25
|
request :delete_public_ip
|
26
|
+
request :get_public_ip
|
26
27
|
request :list_public_ips
|
27
28
|
request :check_for_public_ip
|
28
29
|
request :create_subnet
|
@@ -48,15 +49,19 @@ module Fog
|
|
48
49
|
request :get_network_security_group
|
49
50
|
request :add_security_rules
|
50
51
|
request :remove_security_rule
|
51
|
-
request :
|
52
|
-
request :
|
53
|
-
request :
|
54
|
-
request :
|
55
|
-
request :
|
56
|
-
request :
|
57
|
-
request :
|
58
|
-
request :
|
59
|
-
request :
|
52
|
+
request :delete_virtual_network_gateway
|
53
|
+
request :create_or_update_virtual_network_gateway
|
54
|
+
request :list_virtual_network_gateways
|
55
|
+
request :get_virtual_network_gateway
|
56
|
+
request :create_or_update_express_route_circuit
|
57
|
+
request :delete_express_route_circuit
|
58
|
+
request :get_express_route_circuit
|
59
|
+
request :list_express_route_circuits
|
60
|
+
request :create_or_update_express_route_circuit_peering
|
61
|
+
request :delete_express_route_circuit_peering
|
62
|
+
request :get_express_route_circuit_peering
|
63
|
+
request :list_express_route_circuit_peerings
|
64
|
+
request :list_express_route_service_providers
|
60
65
|
|
61
66
|
model_path 'fog/azurerm/models/network'
|
62
67
|
model :virtual_network
|
@@ -77,23 +82,18 @@ module Fog
|
|
77
82
|
model :network_security_group
|
78
83
|
collection :network_security_groups
|
79
84
|
model :network_security_rule
|
80
|
-
model :application_gateway
|
81
|
-
collection :application_gateways
|
82
|
-
model :application_gateway_backend_address_pool
|
83
|
-
model :application_gateway_backend_http_setting
|
84
|
-
model :application_gateway_frontend_ip_configuration
|
85
|
-
model :application_gateway_frontend_port
|
86
|
-
model :application_gateway_ip_configuration
|
87
|
-
model :application_gateway_http_listener
|
88
85
|
model :path_rule
|
89
|
-
model :
|
90
|
-
model :
|
91
|
-
model :
|
92
|
-
model :
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
86
|
+
model :vpn_client_configuration
|
87
|
+
model :vpn_client_revoked_certificates
|
88
|
+
model :vpn_client_root_certificates
|
89
|
+
model :virtual_network_gateway
|
90
|
+
collection :virtual_network_gateways
|
91
|
+
model :express_route_circuit
|
92
|
+
collection :express_route_circuits
|
93
|
+
model :express_route_circuit_peering
|
94
|
+
collection :express_route_circuit_peerings
|
95
|
+
model :express_route_service_provider
|
96
|
+
collection :express_route_service_providers
|
97
97
|
|
98
98
|
# Mock class for Network Service
|
99
99
|
class Mock
|
@@ -1,97 +1,83 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
2
|
+
module ApplicationGateway
|
3
3
|
class AzureRM
|
4
|
-
# Real class for
|
4
|
+
# Real class for Application Gateway Request
|
5
5
|
class Real
|
6
6
|
def create_application_gateway(name, location, resource_group, sku_name, sku_tier, sku_capacity, gateway_ip_configurations, ssl_certificates, frontend_ip_configurations, frontend_ports, probes, backend_address_pools, backend_http_settings_list, http_listeners, url_path_maps, request_routing_rules)
|
7
|
-
|
7
|
+
msg = "Creating Application Gateway: #{name} in Resource Group: #{resource_group}."
|
8
|
+
Fog::Logger.debug msg
|
8
9
|
gateway = define_application_gateway(name, location, sku_name, sku_tier, sku_capacity, gateway_ip_configurations, ssl_certificates, frontend_ip_configurations, frontend_ports, probes, backend_address_pools, backend_http_settings_list, http_listeners, url_path_maps, request_routing_rules)
|
9
10
|
begin
|
10
|
-
|
11
|
-
result = promise.value!
|
12
|
-
Fog::Logger.debug "Application Gateway #{name} created successfully."
|
13
|
-
Azure::ARM::Network::Models::ApplicationGateway.serialize_object(result.body)
|
11
|
+
gateway_obj = @network_client.application_gateways.create_or_update(resource_group, name, gateway)
|
14
12
|
rescue MsRestAzure::AzureOperationError => e
|
15
|
-
msg
|
16
|
-
raise msg
|
13
|
+
raise_azure_exception(e, msg)
|
17
14
|
end
|
15
|
+
Fog::Logger.debug "Application Gateway #{name} created successfully."
|
16
|
+
gateway_obj
|
18
17
|
end
|
19
18
|
|
20
19
|
private
|
21
20
|
|
22
21
|
def define_application_gateway(name, location, sku_name, sku_tier, sku_capacity, gateway_ip_configurations, ssl_certificates, frontend_ip_configurations, frontend_ports, probes, backend_address_pools, backend_http_settings_list, http_listeners, url_path_maps, request_routing_rules)
|
23
|
-
|
22
|
+
application_gateway = Azure::ARM::Network::Models::ApplicationGateway.new
|
23
|
+
application_gateway.name = name
|
24
|
+
application_gateway.location = location
|
24
25
|
|
25
26
|
if gateway_ip_configurations
|
26
27
|
gateway_ip_configuration_arr = define_gateway_ip_configuration(gateway_ip_configurations)
|
27
|
-
|
28
|
-
ag_props.gateway_ipconfigurations = gateway_ip_configuration_arr
|
28
|
+
application_gateway.gateway_ipconfigurations = gateway_ip_configuration_arr
|
29
29
|
end
|
30
30
|
|
31
31
|
if ssl_certificates
|
32
32
|
ssl_certificate_arr = define_ssl_certificate(ssl_certificates)
|
33
|
-
|
34
|
-
ag_props.ssl_certificates = ssl_certificate_arr
|
33
|
+
application_gateway.ssl_certificates = ssl_certificate_arr
|
35
34
|
end
|
36
35
|
|
37
36
|
if frontend_ip_configurations
|
38
37
|
frontend_ip_configuration_arr = define_frontend_ip_configurations(frontend_ip_configurations)
|
39
|
-
|
40
|
-
ag_props.frontend_ipconfigurations = frontend_ip_configuration_arr
|
38
|
+
application_gateway.frontend_ipconfigurations = frontend_ip_configuration_arr
|
41
39
|
end
|
42
40
|
|
43
41
|
if frontend_ports
|
44
42
|
frontend_port_arr = define_frontend_ports(frontend_ports)
|
45
|
-
|
46
|
-
ag_props.frontend_ports = frontend_port_arr
|
43
|
+
application_gateway.frontend_ports = frontend_port_arr
|
47
44
|
end
|
48
45
|
|
49
46
|
if probes
|
50
47
|
probe_arr = define_probes(probes)
|
51
|
-
|
52
|
-
ag_props.probes = probe_arr
|
48
|
+
application_gateway.probes = probe_arr
|
53
49
|
end
|
54
50
|
|
55
51
|
if backend_address_pools
|
56
52
|
backend_address_pool_arr = define_backend_address_pools(backend_address_pools)
|
57
|
-
|
58
|
-
ag_props.backend_address_pools = backend_address_pool_arr
|
53
|
+
application_gateway.backend_address_pools = backend_address_pool_arr
|
59
54
|
end
|
60
55
|
|
61
56
|
if backend_http_settings_list
|
62
57
|
backend_http_setting_arr = define_backend_http_settings(backend_http_settings_list)
|
63
|
-
|
64
|
-
ag_props.backend_http_settings_collection = backend_http_setting_arr
|
58
|
+
application_gateway.backend_http_settings_collection = backend_http_setting_arr
|
65
59
|
end
|
66
60
|
|
67
61
|
if http_listeners
|
68
62
|
http_listener_arr = define_http_listeners(http_listeners)
|
69
|
-
|
70
|
-
ag_props.http_listeners = http_listener_arr
|
63
|
+
application_gateway.http_listeners = http_listener_arr
|
71
64
|
end
|
72
65
|
|
73
66
|
if url_path_maps
|
74
67
|
url_path_maps_arr = define_url_path_maps(url_path_maps)
|
75
|
-
|
76
|
-
ag_props.url_path_maps = url_path_maps_arr
|
68
|
+
application_gateway.url_path_maps = url_path_maps_arr
|
77
69
|
end
|
78
70
|
|
79
71
|
if request_routing_rules
|
80
72
|
request_routing_rule_arr = define_request_routing_rules(request_routing_rules)
|
81
|
-
|
82
|
-
ag_props.request_routing_rules = request_routing_rule_arr
|
73
|
+
application_gateway.request_routing_rules = request_routing_rule_arr
|
83
74
|
end
|
84
75
|
|
85
76
|
gateway_sku = Azure::ARM::Network::Models::ApplicationGatewaySku.new
|
86
77
|
gateway_sku.name = sku_name
|
87
78
|
gateway_sku.tier = sku_tier
|
88
79
|
gateway_sku.capacity = sku_capacity
|
89
|
-
|
90
|
-
|
91
|
-
application_gateway = Azure::ARM::Network::Models::ApplicationGateway.new
|
92
|
-
application_gateway.name = name
|
93
|
-
application_gateway.location = location
|
94
|
-
application_gateway.properties = ag_props
|
80
|
+
application_gateway.sku = gateway_sku
|
95
81
|
|
96
82
|
application_gateway
|
97
83
|
end
|
@@ -100,16 +86,14 @@ module Fog
|
|
100
86
|
gateway_ip_configuration_arr = []
|
101
87
|
gateway_ip_configurations.each do |ip_configuration|
|
102
88
|
configuration = Azure::ARM::Network::Models::ApplicationGatewayIPConfiguration.new
|
103
|
-
|
104
|
-
configuration_prop.provisioning_state = ip_configuration[:provisioning_state]
|
89
|
+
configuration.provisioning_state = ip_configuration[:provisioning_state]
|
105
90
|
if ip_configuration[:subnet_id]
|
106
91
|
subnet = Azure::ARM::Network::Models::Subnet.new
|
107
92
|
subnet.id = ip_configuration[:subnet_id]
|
108
|
-
|
93
|
+
configuration.subnet = subnet
|
109
94
|
end
|
110
95
|
|
111
96
|
configuration.name = ip_configuration[:name]
|
112
|
-
configuration.properties = configuration_prop
|
113
97
|
gateway_ip_configuration_arr.push(configuration)
|
114
98
|
end
|
115
99
|
gateway_ip_configuration_arr
|
@@ -119,13 +103,11 @@ module Fog
|
|
119
103
|
ssl_certificate_arr = []
|
120
104
|
ssl_certificates.each do |ssl_certificate|
|
121
105
|
certificate = Azure::ARM::Network::Models::ApplicationGatewaySslCertificate.new
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
certificate_prop.public_cert_data = ssl_certificate[:public_cert_data]
|
106
|
+
certificate.data = ssl_certificate[:data]
|
107
|
+
certificate.password = ssl_certificate[:password]
|
108
|
+
certificate.public_cert_data = ssl_certificate[:public_cert_data]
|
126
109
|
|
127
110
|
certificate.name = ssl_certificate[:name]
|
128
|
-
certificate.properties = certificate_prop
|
129
111
|
ssl_certificate_arr.push(ssl_certificate)
|
130
112
|
end
|
131
113
|
ssl_certificate_arr
|
@@ -135,19 +117,17 @@ module Fog
|
|
135
117
|
frontend_ip_configuration_arr = []
|
136
118
|
frontend_ip_configurations.each do |fic|
|
137
119
|
frontend_ip_configuration = Azure::ARM::Network::Models::ApplicationGatewayFrontendIPConfiguration.new
|
138
|
-
frontend_ip_configuration_prop = Azure::ARM::Network::Models::ApplicationGatewayFrontendIPConfigurationPropertiesFormat.new
|
139
120
|
|
140
|
-
|
141
|
-
|
121
|
+
frontend_ip_configuration.private_ipaddress = fic[:private_ip_address]
|
122
|
+
frontend_ip_configuration.private_ipallocation_method = fic[:private_ip_allocation_method]
|
142
123
|
|
143
124
|
unless fic[:public_ip_address_id].nil?
|
144
125
|
pip = Azure::ARM::Network::Models::PublicIPAddress.new
|
145
126
|
pip.id = fic[:public_ip_address_id]
|
146
|
-
|
127
|
+
frontend_ip_configuration.public_ipaddress = pip
|
147
128
|
end
|
148
129
|
|
149
130
|
frontend_ip_configuration.name = fic[:name]
|
150
|
-
frontend_ip_configuration.properties = frontend_ip_configuration_prop
|
151
131
|
|
152
132
|
frontend_ip_configuration_arr.push(frontend_ip_configuration)
|
153
133
|
end
|
@@ -158,11 +138,9 @@ module Fog
|
|
158
138
|
frontend_port_arr = []
|
159
139
|
frontend_ports.each do |port|
|
160
140
|
frontend_port = Azure::ARM::Network::Models::ApplicationGatewayFrontendPort.new
|
161
|
-
frontend_port_prop = Azure::ARM::Network::Models::ApplicationGatewayFrontendPortPropertiesFormat.new
|
162
141
|
|
163
|
-
|
142
|
+
frontend_port.port = port[:port]
|
164
143
|
frontend_port.name = port[:name]
|
165
|
-
frontend_port.properties = frontend_port_prop
|
166
144
|
|
167
145
|
frontend_port_arr.push(frontend_port)
|
168
146
|
end
|
@@ -173,16 +151,14 @@ module Fog
|
|
173
151
|
probe_arr = []
|
174
152
|
probes.each do |probe|
|
175
153
|
ag_probe = Azure::ARM::Network::Models::ApplicationGatewayProbe.new
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
ag_probe_prop.unhealthy_threshold = probe[:unhealthy_threshold]
|
154
|
+
ag_probe.protocol = probe[:protocol]
|
155
|
+
ag_probe.host = probe[:host]
|
156
|
+
ag_probe.path = probe[:path]
|
157
|
+
ag_probe.interval = probe[:interval]
|
158
|
+
ag_probe.timeout = probe[:timeout]
|
159
|
+
ag_probe.unhealthy_threshold = probe[:unhealthy_threshold]
|
183
160
|
|
184
161
|
ag_probe.name = probe[:name]
|
185
|
-
ag_probe.properties = ag_probe_prop
|
186
162
|
probe_arr.push(ag_probe)
|
187
163
|
end
|
188
164
|
probe_arr
|
@@ -193,7 +169,6 @@ module Fog
|
|
193
169
|
|
194
170
|
backend_address_pools.each do |bap|
|
195
171
|
backend_pool = Azure::ARM::Network::Models::ApplicationGatewayBackendAddressPool.new
|
196
|
-
backend_pool_prop = Azure::ARM::Network::Models::ApplicationGatewayBackendAddressPoolPropertiesFormat.new
|
197
172
|
|
198
173
|
backend_addresses1 = bap[:ip_addresses]
|
199
174
|
|
@@ -203,10 +178,9 @@ module Fog
|
|
203
178
|
backend_add.ip_address = address[:ipAddress]
|
204
179
|
addresses.push(backend_add)
|
205
180
|
end
|
206
|
-
|
181
|
+
backend_pool.backend_addresses = addresses
|
207
182
|
|
208
183
|
backend_pool.name = bap[:name]
|
209
|
-
backend_pool.properties = backend_pool_prop
|
210
184
|
backend_address_pool_arr.push(backend_pool)
|
211
185
|
end
|
212
186
|
backend_address_pool_arr
|
@@ -217,19 +191,17 @@ module Fog
|
|
217
191
|
|
218
192
|
backend_http_settings_list.each do |http_setting|
|
219
193
|
backend_http_setting = Azure::ARM::Network::Models::ApplicationGatewayBackendHttpSettings.new
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
backend_http_setting_prop.request_timeout = http_setting[:request_timeout]
|
194
|
+
backend_http_setting.port = http_setting[:port]
|
195
|
+
backend_http_setting.protocol = http_setting[:protocol]
|
196
|
+
backend_http_setting.cookie_based_affinity = http_setting[:cookie_based_affinity]
|
197
|
+
backend_http_setting.request_timeout = http_setting[:request_timeout]
|
225
198
|
if http_setting[:probe]
|
226
199
|
probe = Azure::ARM::Network::Models::Probe.new
|
227
200
|
probe.id = http_setting[:probe]
|
228
|
-
|
201
|
+
backend_http_setting.probe = probe
|
229
202
|
end
|
230
203
|
|
231
204
|
backend_http_setting.name = http_setting[:name]
|
232
|
-
backend_http_setting.properties = backend_http_setting_prop
|
233
205
|
backend_http_setting_arr.push(backend_http_setting)
|
234
206
|
end
|
235
207
|
backend_http_setting_arr
|
@@ -240,29 +212,27 @@ module Fog
|
|
240
212
|
|
241
213
|
http_listeners.each do |listener|
|
242
214
|
http_listener = Azure::ARM::Network::Models::ApplicationGatewayHttpListener.new
|
243
|
-
http_listener_prop = Azure::ARM::Network::Models::ApplicationGatewayHttpListenerPropertiesFormat.new
|
244
215
|
|
245
|
-
|
246
|
-
|
247
|
-
|
216
|
+
http_listener.protocol = listener[:protocol]
|
217
|
+
http_listener.host_name = listener[:host_name]
|
218
|
+
http_listener.require_server_name_indication = listener[:require_server_name_indication]
|
248
219
|
if listener[:frontend_ip_config_id]
|
249
220
|
frontend_ip = Azure::ARM::Network::Models::FrontendIPConfiguration.new
|
250
221
|
frontend_ip.id = listener[:frontend_ip_config_id]
|
251
|
-
|
222
|
+
http_listener.frontend_ipconfiguration = frontend_ip
|
252
223
|
end
|
253
224
|
if listener[:frontend_port_id]
|
254
225
|
frontend_port = Azure::ARM::Network::Models::ApplicationGatewayFrontendPort.new
|
255
226
|
frontend_port.id = listener[:frontend_port_id]
|
256
|
-
|
227
|
+
http_listener.frontend_port = frontend_port
|
257
228
|
end
|
258
229
|
if listener[:ssl_certificate_id]
|
259
230
|
ssl_cert = Azure::ARM::Network::Models::ApplicationGatewaySslCertificate.new
|
260
231
|
ssl_cert.id = listener[:ssl_certificate_id]
|
261
|
-
|
232
|
+
http_listener.ssl_certificate = ssl_cert
|
262
233
|
end
|
263
234
|
|
264
235
|
http_listener.name = listener[:name]
|
265
|
-
http_listener.properties = http_listener_prop
|
266
236
|
http_listener_arr.push(http_listener)
|
267
237
|
end
|
268
238
|
http_listener_arr
|
@@ -273,27 +243,25 @@ module Fog
|
|
273
243
|
|
274
244
|
url_path_maps.each do |map|
|
275
245
|
url_path_map = Azure::ARM::Network::Models::ApplicationGatewayUrlPathMap.new
|
276
|
-
url_path_map_prop = Azure::ARM::Network::Models::ApplicationGatewayUrlPathMapPropertiesFormat.new
|
277
246
|
|
278
247
|
if map[:default_backend_address_pool_id]
|
279
248
|
default_backend_address_pool = Azure::ARM::Network::Models::BackendAddressPool.new
|
280
249
|
default_backend_address_pool.id = map[:default_backend_address_pool_id]
|
281
|
-
|
250
|
+
url_path_map.default_backend_address_pool = default_backend_address_pool
|
282
251
|
end
|
283
252
|
if map[:default_backend_http_settings_id]
|
284
253
|
default_backend_http_setting = Azure::ARM::Network::Models::ApplicationGatewayBackendHttpSettings.new
|
285
254
|
default_backend_http_setting.id = map[:default_backend_http_settings_id]
|
286
|
-
|
255
|
+
url_path_map.default_backend_http_settings = default_backend_http_setting
|
287
256
|
end
|
288
257
|
|
289
258
|
if map[:path_rules]
|
290
259
|
path_rules = map[:path_rules]
|
291
260
|
path_rule_arr = define_path_rules(path_rules)
|
292
|
-
|
261
|
+
url_path_map.path_rules = path_rule_arr
|
293
262
|
end
|
294
263
|
|
295
264
|
url_path_map.name = map[:name]
|
296
|
-
url_path_map.properties = url_path_map_prop
|
297
265
|
url_path_map_arr.push(url_path_map)
|
298
266
|
end
|
299
267
|
url_path_map_arr
|
@@ -303,16 +271,15 @@ module Fog
|
|
303
271
|
path_rule_arr = []
|
304
272
|
path_rules.each do |rule|
|
305
273
|
path_rule = Azure::ARM::Network::Models::ApplicationGatewayPathRule.new
|
306
|
-
path_rule_prop = Azure::ARM::Network::Models::ApplicationGatewayPathRulePropertiesFormat.new
|
307
274
|
if rule[:backend_address_pool_id]
|
308
275
|
backend_address_pool = Azure::ARM::Network::Models::BackendAddressPool.new
|
309
276
|
backend_address_pool.id = rule[:backend_address_pool_id]
|
310
|
-
|
277
|
+
path_rule.backend_address_pool = backend_address_pool
|
311
278
|
end
|
312
279
|
if rule[:backend_http_settings_id]
|
313
280
|
backend_http_setting = Azure::ARM::Network::Models::ApplicationGatewayBackendHttpSettings.new
|
314
281
|
backend_http_setting.id = rule[:backend_http_settings_id]
|
315
|
-
|
282
|
+
path_rule.backend_http_settings = backend_http_setting
|
316
283
|
end
|
317
284
|
path_urls = rule[:paths]
|
318
285
|
|
@@ -320,10 +287,9 @@ module Fog
|
|
320
287
|
path_urls.each do |url|
|
321
288
|
paths.push(url)
|
322
289
|
end
|
323
|
-
|
290
|
+
path_rule.paths = paths
|
324
291
|
|
325
292
|
path_rule.name = rule[:name]
|
326
|
-
path_rule.properties = path_rule_prop
|
327
293
|
path_rule_arr.push(path_rule)
|
328
294
|
end
|
329
295
|
path_rule_arr
|
@@ -334,27 +300,25 @@ module Fog
|
|
334
300
|
|
335
301
|
request_routing_rules.each do |rule|
|
336
302
|
request_routing_rule = Azure::ARM::Network::Models::ApplicationGatewayRequestRoutingRule.new
|
337
|
-
request_routing_rule_prop = Azure::ARM::Network::Models::ApplicationGatewayRequestRoutingRulePropertiesFormat.new
|
338
303
|
|
339
|
-
|
304
|
+
request_routing_rule.rule_type = rule[:type]
|
340
305
|
if rule[:http_listener_id]
|
341
306
|
http_listener = Azure::ARM::Network::Models::ApplicationGatewayHttpListener.new
|
342
307
|
http_listener.id = rule[:http_listener_id]
|
343
|
-
|
308
|
+
request_routing_rule.http_listener = http_listener
|
344
309
|
end
|
345
310
|
if rule[:backend_address_pool_id]
|
346
311
|
backend_address_pool = Azure::ARM::Network::Models::BackendAddressPool.new
|
347
312
|
backend_address_pool.id = rule[:backend_address_pool_id]
|
348
|
-
|
313
|
+
request_routing_rule.backend_address_pool = backend_address_pool
|
349
314
|
end
|
350
315
|
if rule[:backend_http_settings_id]
|
351
316
|
backend_http_setting = Azure::ARM::Network::Models::ApplicationGatewayBackendHttpSettings.new
|
352
317
|
backend_http_setting.id = rule[:backend_http_settings_id]
|
353
|
-
|
318
|
+
request_routing_rule.backend_http_settings = backend_http_setting
|
354
319
|
end
|
355
320
|
|
356
321
|
request_routing_rule.name = rule[:name]
|
357
|
-
request_routing_rule.properties = request_routing_rule_prop
|
358
322
|
request_routing_rule_arr.push(request_routing_rule)
|
359
323
|
end
|
360
324
|
request_routing_rule_arr
|