fog-azure-rm-temp 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.codeclimate.yml +17 -0
- data/.gitignore +6 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +38 -0
- data/.travis.yml +33 -0
- data/CHANGELOG.md +271 -0
- data/CONTRIBUTING.md +40 -0
- data/CONTRIBUTORS.md +8 -0
- data/Gemfile +3 -0
- data/LICENSE.md +20 -0
- data/README.md +96 -0
- data/fog-azure-rm.gemspec +37 -0
- data/lib/fog/azurerm.rb +89 -0
- data/lib/fog/azurerm/application_gateway.rb +75 -0
- data/lib/fog/azurerm/async_response.rb +36 -0
- data/lib/fog/azurerm/compute.rb +98 -0
- data/lib/fog/azurerm/config.rb +1 -0
- data/lib/fog/azurerm/constants.rb +61 -0
- data/lib/fog/azurerm/credentials.rb +40 -0
- data/lib/fog/azurerm/dns.rb +68 -0
- data/lib/fog/azurerm/docs/application_gateway.md +243 -0
- data/lib/fog/azurerm/docs/compute.md +400 -0
- data/lib/fog/azurerm/docs/dns.md +148 -0
- data/lib/fog/azurerm/docs/key_vault.md +88 -0
- data/lib/fog/azurerm/docs/network.md +1129 -0
- data/lib/fog/azurerm/docs/resources.md +175 -0
- data/lib/fog/azurerm/docs/sql.md +168 -0
- data/lib/fog/azurerm/docs/storage.md +463 -0
- data/lib/fog/azurerm/docs/structure.md +53 -0
- data/lib/fog/azurerm/docs/traffic_manager.md +159 -0
- data/lib/fog/azurerm/key_vault.rb +51 -0
- data/lib/fog/azurerm/models/application_gateway/backend_address_pool.rb +24 -0
- data/lib/fog/azurerm/models/application_gateway/backend_http_setting.rb +28 -0
- data/lib/fog/azurerm/models/application_gateway/frontend_ip_configuration.rb +26 -0
- data/lib/fog/azurerm/models/application_gateway/frontend_port.rb +20 -0
- data/lib/fog/azurerm/models/application_gateway/gateway.rb +613 -0
- data/lib/fog/azurerm/models/application_gateway/gateways.rb +30 -0
- data/lib/fog/azurerm/models/application_gateway/http_listener.rb +30 -0
- data/lib/fog/azurerm/models/application_gateway/ip_configuration.rb +26 -0
- data/lib/fog/azurerm/models/application_gateway/probe.rb +30 -0
- data/lib/fog/azurerm/models/application_gateway/request_routing_rule.rb +27 -0
- data/lib/fog/azurerm/models/application_gateway/ssl_certificate.rb +24 -0
- data/lib/fog/azurerm/models/application_gateway/url_path_map.rb +30 -0
- data/lib/fog/azurerm/models/compute/availability_set.rb +43 -0
- data/lib/fog/azurerm/models/compute/availability_sets.rb +35 -0
- data/lib/fog/azurerm/models/compute/caching_types.rb +13 -0
- data/lib/fog/azurerm/models/compute/creation_data.rb +21 -0
- data/lib/fog/azurerm/models/compute/disk_create_option.rb +16 -0
- data/lib/fog/azurerm/models/compute/disk_create_option_types.rb +13 -0
- data/lib/fog/azurerm/models/compute/encryption_settings.rb +29 -0
- data/lib/fog/azurerm/models/compute/image_disk_reference.rb +15 -0
- data/lib/fog/azurerm/models/compute/managed_disk.rb +77 -0
- data/lib/fog/azurerm/models/compute/managed_disks.rb +43 -0
- data/lib/fog/azurerm/models/compute/operation_status_response.rb +18 -0
- data/lib/fog/azurerm/models/compute/server.rb +199 -0
- data/lib/fog/azurerm/models/compute/servers.rb +47 -0
- data/lib/fog/azurerm/models/compute/virtual_machine_extension.rb +76 -0
- data/lib/fog/azurerm/models/compute/virtual_machine_extensions.rb +31 -0
- data/lib/fog/azurerm/models/dns/record_set.rb +91 -0
- data/lib/fog/azurerm/models/dns/record_sets.rb +34 -0
- data/lib/fog/azurerm/models/dns/zone.rb +58 -0
- data/lib/fog/azurerm/models/dns/zones.rb +29 -0
- data/lib/fog/azurerm/models/key_vault/access_policy_entry.rb +31 -0
- data/lib/fog/azurerm/models/key_vault/vault.rb +76 -0
- data/lib/fog/azurerm/models/key_vault/vaults.rb +27 -0
- data/lib/fog/azurerm/models/network/express_route_circuit.rb +86 -0
- data/lib/fog/azurerm/models/network/express_route_circuit_authorization.rb +50 -0
- data/lib/fog/azurerm/models/network/express_route_circuit_authorizations.rb +28 -0
- data/lib/fog/azurerm/models/network/express_route_circuit_peering.rb +91 -0
- data/lib/fog/azurerm/models/network/express_route_circuit_peerings.rb +27 -0
- data/lib/fog/azurerm/models/network/express_route_circuits.rb +30 -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 +18 -0
- data/lib/fog/azurerm/models/network/frontend_ip_configuration.rb +27 -0
- data/lib/fog/azurerm/models/network/inbound_nat_pool.rb +26 -0
- data/lib/fog/azurerm/models/network/inbound_nat_rule.rb +26 -0
- data/lib/fog/azurerm/models/network/ipallocation_method.rb +12 -0
- data/lib/fog/azurerm/models/network/load_balancer.rb +247 -0
- data/lib/fog/azurerm/models/network/load_balancers.rb +36 -0
- data/lib/fog/azurerm/models/network/load_balancing_rule.rb +37 -0
- data/lib/fog/azurerm/models/network/local_network_gateway.rb +60 -0
- data/lib/fog/azurerm/models/network/local_network_gateways.rb +27 -0
- data/lib/fog/azurerm/models/network/network_interface.rb +121 -0
- data/lib/fog/azurerm/models/network/network_interfaces.rb +30 -0
- data/lib/fog/azurerm/models/network/network_security_group.rb +112 -0
- data/lib/fog/azurerm/models/network/network_security_groups.rb +30 -0
- data/lib/fog/azurerm/models/network/network_security_rule.rb +66 -0
- data/lib/fog/azurerm/models/network/network_security_rules.rb +31 -0
- data/lib/fog/azurerm/models/network/path_rule.rb +30 -0
- data/lib/fog/azurerm/models/network/probe.rb +28 -0
- data/lib/fog/azurerm/models/network/public_ip.rb +68 -0
- data/lib/fog/azurerm/models/network/public_ips.rb +30 -0
- data/lib/fog/azurerm/models/network/security_rule_access.rb +12 -0
- data/lib/fog/azurerm/models/network/security_rule_direction.rb +12 -0
- data/lib/fog/azurerm/models/network/security_rule_protocol.rb +13 -0
- data/lib/fog/azurerm/models/network/subnet.rb +66 -0
- data/lib/fog/azurerm/models/network/subnets.rb +31 -0
- data/lib/fog/azurerm/models/network/virtual_network.rb +107 -0
- data/lib/fog/azurerm/models/network/virtual_network_gateway.rb +137 -0
- data/lib/fog/azurerm/models/network/virtual_network_gateway_connection.rb +76 -0
- data/lib/fog/azurerm/models/network/virtual_network_gateway_connections.rb +27 -0
- data/lib/fog/azurerm/models/network/virtual_network_gateways.rb +30 -0
- data/lib/fog/azurerm/models/network/virtual_networks.rb +36 -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 +25 -0
- data/lib/fog/azurerm/models/resources/azure_resources.rb +32 -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 +30 -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/resources/resource_group.rb +32 -0
- data/lib/fog/azurerm/models/resources/resource_groups.rb +29 -0
- data/lib/fog/azurerm/models/sql/firewall_rule.rb +48 -0
- data/lib/fog/azurerm/models/sql/firewall_rules.rb +32 -0
- data/lib/fog/azurerm/models/sql/sql_database.rb +67 -0
- data/lib/fog/azurerm/models/sql/sql_databases.rb +32 -0
- data/lib/fog/azurerm/models/sql/sql_server.rb +49 -0
- data/lib/fog/azurerm/models/sql/sql_servers.rb +31 -0
- data/lib/fog/azurerm/models/storage/data_disk.rb +27 -0
- data/lib/fog/azurerm/models/storage/directories.rb +70 -0
- data/lib/fog/azurerm/models/storage/directory.rb +151 -0
- data/lib/fog/azurerm/models/storage/file.rb +263 -0
- data/lib/fog/azurerm/models/storage/files.rb +183 -0
- data/lib/fog/azurerm/models/storage/kind.rb +12 -0
- data/lib/fog/azurerm/models/storage/recovery_vault.rb +50 -0
- data/lib/fog/azurerm/models/storage/recovery_vaults.rb +27 -0
- data/lib/fog/azurerm/models/storage/sku_name.rb +15 -0
- data/lib/fog/azurerm/models/storage/sku_tier.rb +12 -0
- data/lib/fog/azurerm/models/storage/storage_account.rb +89 -0
- data/lib/fog/azurerm/models/storage/storage_accounts.rb +40 -0
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_end_point.rb +82 -0
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb +30 -0
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb +88 -0
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb +27 -0
- data/lib/fog/azurerm/network.rb +178 -0
- data/lib/fog/azurerm/requests/application_gateway/check_ag_exists.rb +31 -0
- data/lib/fog/azurerm/requests/application_gateway/create_or_update_application_gateway.rb +301 -0
- data/lib/fog/azurerm/requests/application_gateway/delete_application_gateway.rb +26 -0
- data/lib/fog/azurerm/requests/application_gateway/get_application_gateway.rb +159 -0
- data/lib/fog/azurerm/requests/application_gateway/list_application_gateways.rb +29 -0
- data/lib/fog/azurerm/requests/application_gateway/start_application_gateway.rb +27 -0
- data/lib/fog/azurerm/requests/application_gateway/stop_application_gateway.rb +27 -0
- data/lib/fog/azurerm/requests/application_gateway/update_sku_attributes.rb +28 -0
- data/lib/fog/azurerm/requests/application_gateway/update_subnet_id_in_gateway_ip_configuration.rb +29 -0
- data/lib/fog/azurerm/requests/compute/attach_data_disk_to_vm.rb +172 -0
- data/lib/fog/azurerm/requests/compute/check_availability_set_exists.rb +31 -0
- data/lib/fog/azurerm/requests/compute/check_managed_disk_exists.rb +33 -0
- data/lib/fog/azurerm/requests/compute/check_vm_exists.rb +39 -0
- data/lib/fog/azurerm/requests/compute/check_vm_extension_exists.rb +31 -0
- data/lib/fog/azurerm/requests/compute/check_vm_status.rb +38 -0
- data/lib/fog/azurerm/requests/compute/create_availability_set.rb +48 -0
- data/lib/fog/azurerm/requests/compute/create_or_update_managed_disk.rb +121 -0
- data/lib/fog/azurerm/requests/compute/create_or_update_vm_extension.rb +63 -0
- data/lib/fog/azurerm/requests/compute/create_virtual_machine.rb +264 -0
- data/lib/fog/azurerm/requests/compute/deallocate_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/compute/delete_availability_set.rb +27 -0
- data/lib/fog/azurerm/requests/compute/delete_managed_disk.rb +29 -0
- data/lib/fog/azurerm/requests/compute/delete_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/compute/delete_vm_extension.rb +28 -0
- data/lib/fog/azurerm/requests/compute/detach_data_disk_from_vm.rb +103 -0
- data/lib/fog/azurerm/requests/compute/generalize_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/compute/get_availability_set.rb +32 -0
- data/lib/fog/azurerm/requests/compute/get_managed_disk.rb +64 -0
- data/lib/fog/azurerm/requests/compute/get_virtual_machine.rb +86 -0
- data/lib/fog/azurerm/requests/compute/get_vm_extension.rb +46 -0
- data/lib/fog/azurerm/requests/compute/grant_access_to_managed_disk.rb +30 -0
- data/lib/fog/azurerm/requests/compute/list_availability_sets.rb +40 -0
- data/lib/fog/azurerm/requests/compute/list_available_sizes_for_virtual_machine.rb +64 -0
- data/lib/fog/azurerm/requests/compute/list_managed_disks_by_rg.rb +66 -0
- data/lib/fog/azurerm/requests/compute/list_managed_disks_in_subscription.rb +66 -0
- data/lib/fog/azurerm/requests/compute/list_virtual_machines.rb +69 -0
- data/lib/fog/azurerm/requests/compute/power_off_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/compute/redeploy_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/compute/restart_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/compute/revoke_access_to_managed_disk.rb +33 -0
- data/lib/fog/azurerm/requests/compute/start_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/dns/check_record_set_exists.rb +31 -0
- data/lib/fog/azurerm/requests/dns/check_zone_exists.rb +33 -0
- data/lib/fog/azurerm/requests/dns/create_or_update_record_set.rb +71 -0
- data/lib/fog/azurerm/requests/dns/create_or_update_zone.rb +57 -0
- data/lib/fog/azurerm/requests/dns/delete_record_set.rb +28 -0
- data/lib/fog/azurerm/requests/dns/delete_zone.rb +28 -0
- data/lib/fog/azurerm/requests/dns/get_record_set.rb +47 -0
- data/lib/fog/azurerm/requests/dns/get_records_from_record_set.rb +32 -0
- data/lib/fog/azurerm/requests/dns/get_zone.rb +41 -0
- data/lib/fog/azurerm/requests/dns/list_record_sets.rb +63 -0
- data/lib/fog/azurerm/requests/dns/list_zones.rb +72 -0
- data/lib/fog/azurerm/requests/key_vault/check_vault_exists.rb +31 -0
- data/lib/fog/azurerm/requests/key_vault/create_or_update_vault.rb +105 -0
- data/lib/fog/azurerm/requests/key_vault/delete_vault.rb +28 -0
- data/lib/fog/azurerm/requests/key_vault/get_vault.rb +54 -0
- data/lib/fog/azurerm/requests/key_vault/list_vaults.rb +56 -0
- 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 +76 -0
- data/lib/fog/azurerm/requests/network/add_security_rules.rb +154 -0
- data/lib/fog/azurerm/requests/network/add_subnets_in_virtual_network.rb +71 -0
- data/lib/fog/azurerm/requests/network/attach_network_security_group_to_subnet.rb +57 -0
- data/lib/fog/azurerm/requests/network/attach_resource_to_nic.rb +89 -0
- data/lib/fog/azurerm/requests/network/attach_route_table_to_subnet.rb +57 -0
- data/lib/fog/azurerm/requests/network/check_express_route_cir_auth_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_express_route_circuit_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_load_balancer_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_local_net_gateway_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_net_sec_group_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_net_sec_rule_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_network_interface_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_public_ip_exists.rb +33 -0
- data/lib/fog/azurerm/requests/network/check_subnet_exists.rb +32 -0
- data/lib/fog/azurerm/requests/network/check_virtual_network_exists.rb +33 -0
- data/lib/fog/azurerm/requests/network/check_vnet_gateway_connection_exists.rb +32 -0
- data/lib/fog/azurerm/requests/network/check_vnet_gateway_exists.rb +32 -0
- data/lib/fog/azurerm/requests/network/create_load_balancer.rb +189 -0
- data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit.rb +111 -0
- data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit_authorization.rb +51 -0
- data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit_peering.rb +79 -0
- data/lib/fog/azurerm/requests/network/create_or_update_local_network_gateway.rb +80 -0
- data/lib/fog/azurerm/requests/network/create_or_update_network_interface.rb +120 -0
- data/lib/fog/azurerm/requests/network/create_or_update_network_security_group.rb +177 -0
- data/lib/fog/azurerm/requests/network/create_or_update_network_security_rule.rb +59 -0
- data/lib/fog/azurerm/requests/network/create_or_update_public_ip.rb +59 -0
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network.rb +110 -0
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network_gateway.rb +159 -0
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network_gateway_connection.rb +83 -0
- data/lib/fog/azurerm/requests/network/create_subnet.rb +54 -0
- data/lib/fog/azurerm/requests/network/delete_express_route_circuit.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_express_route_circuit_authorization.rb +29 -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 +28 -0
- data/lib/fog/azurerm/requests/network/delete_local_network_gateway.rb +29 -0
- data/lib/fog/azurerm/requests/network/delete_network_interface.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_network_security_group.rb +30 -0
- data/lib/fog/azurerm/requests/network/delete_network_security_rule.rb +30 -0
- data/lib/fog/azurerm/requests/network/delete_public_ip.rb +27 -0
- data/lib/fog/azurerm/requests/network/delete_subnet.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_virtual_network.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_virtual_network_gateway.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_virtual_network_gateway_connection.rb +29 -0
- data/lib/fog/azurerm/requests/network/detach_network_security_group_from_subnet.rb +51 -0
- data/lib/fog/azurerm/requests/network/detach_resource_from_nic.rb +81 -0
- data/lib/fog/azurerm/requests/network/detach_route_table_from_subnet.rb +51 -0
- data/lib/fog/azurerm/requests/network/get_available_ipaddresses_count.rb +23 -0
- data/lib/fog/azurerm/requests/network/get_connection_shared_key.rb +25 -0
- data/lib/fog/azurerm/requests/network/get_express_route_circuit.rb +51 -0
- data/lib/fog/azurerm/requests/network/get_express_route_circuit_authorization.rb +35 -0
- data/lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb +48 -0
- data/lib/fog/azurerm/requests/network/get_load_balancer.rb +170 -0
- data/lib/fog/azurerm/requests/network/get_local_network_gateway.rb +47 -0
- data/lib/fog/azurerm/requests/network/get_network_interface.rb +60 -0
- data/lib/fog/azurerm/requests/network/get_network_security_group.rb +165 -0
- data/lib/fog/azurerm/requests/network/get_network_security_rule.rb +47 -0
- data/lib/fog/azurerm/requests/network/get_public_ip.rb +41 -0
- data/lib/fog/azurerm/requests/network/get_subnet.rb +37 -0
- data/lib/fog/azurerm/requests/network/get_virtual_network.rb +62 -0
- data/lib/fog/azurerm/requests/network/get_virtual_network_gateway.rb +45 -0
- data/lib/fog/azurerm/requests/network/get_virtual_network_gateway_connection.rb +47 -0
- data/lib/fog/azurerm/requests/network/list_express_route_circuit_authorizations.rb +37 -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 +31 -0
- data/lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb +31 -0
- data/lib/fog/azurerm/requests/network/list_local_network_gateways.rb +50 -0
- data/lib/fog/azurerm/requests/network/list_network_interfaces.rb +67 -0
- data/lib/fog/azurerm/requests/network/list_network_security_groups.rb +169 -0
- data/lib/fog/azurerm/requests/network/list_network_security_rules.rb +51 -0
- data/lib/fog/azurerm/requests/network/list_public_ips.rb +46 -0
- data/lib/fog/azurerm/requests/network/list_subnets.rb +55 -0
- data/lib/fog/azurerm/requests/network/list_virtual_network_gateway_connections.rb +50 -0
- data/lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb +43 -0
- data/lib/fog/azurerm/requests/network/list_virtual_networks.rb +74 -0
- data/lib/fog/azurerm/requests/network/list_virtual_networks_in_subscription.rb +74 -0
- data/lib/fog/azurerm/requests/network/remove_address_prefixes_from_virtual_network.rb +69 -0
- data/lib/fog/azurerm/requests/network/remove_dns_servers_from_virtual_network.rb +69 -0
- data/lib/fog/azurerm/requests/network/remove_security_rule.rb +157 -0
- data/lib/fog/azurerm/requests/network/remove_subnets_from_virtual_network.rb +59 -0
- data/lib/fog/azurerm/requests/network/reset_connection_shared_key.rb +36 -0
- data/lib/fog/azurerm/requests/network/set_connection_shared_key.rb +36 -0
- data/lib/fog/azurerm/requests/resources/check_azure_resource_exists.rb +40 -0
- data/lib/fog/azurerm/requests/resources/check_deployment_exists.rb +30 -0
- data/lib/fog/azurerm/requests/resources/check_resource_group_exists.rb +30 -0
- data/lib/fog/azurerm/requests/resources/create_deployment.rb +97 -0
- data/lib/fog/azurerm/requests/resources/create_resource_group.rb +39 -0
- data/lib/fog/azurerm/requests/resources/delete_deployment.rb +28 -0
- data/lib/fog/azurerm/requests/resources/delete_resource_group.rb +28 -0
- data/lib/fog/azurerm/requests/resources/delete_resource_tag.rb +44 -0
- data/lib/fog/azurerm/requests/resources/get_deployment.rb +81 -0
- data/lib/fog/azurerm/requests/resources/get_resource_group.rb +47 -0
- data/lib/fog/azurerm/requests/resources/list_deployments.rb +77 -0
- data/lib/fog/azurerm/requests/resources/list_resource_groups.rb +51 -0
- data/lib/fog/azurerm/requests/resources/list_tagged_resources.rb +50 -0
- data/lib/fog/azurerm/requests/resources/tag_resource.rb +43 -0
- data/lib/fog/azurerm/requests/sql/check_database_exists.rb +21 -0
- data/lib/fog/azurerm/requests/sql/check_firewall_rule_exists.rb +21 -0
- data/lib/fog/azurerm/requests/sql/check_sql_server_exists.rb +21 -0
- data/lib/fog/azurerm/requests/sql/create_or_update_database.rb +68 -0
- data/lib/fog/azurerm/requests/sql/create_or_update_firewall_rule.rb +42 -0
- data/lib/fog/azurerm/requests/sql/create_or_update_sql_server.rb +50 -0
- data/lib/fog/azurerm/requests/sql/delete_database.rb +28 -0
- data/lib/fog/azurerm/requests/sql/delete_firewall_rule.rb +29 -0
- data/lib/fog/azurerm/requests/sql/delete_sql_server.rb +29 -0
- data/lib/fog/azurerm/requests/sql/get_database.rb +42 -0
- data/lib/fog/azurerm/requests/sql/get_firewall_rule.rb +37 -0
- data/lib/fog/azurerm/requests/sql/get_sql_server.rb +34 -0
- data/lib/fog/azurerm/requests/sql/list_databases.rb +58 -0
- data/lib/fog/azurerm/requests/sql/list_firewall_rules.rb +49 -0
- data/lib/fog/azurerm/requests/sql/list_sql_servers.rb +44 -0
- data/lib/fog/azurerm/requests/storage/acquire_blob_lease.rb +32 -0
- data/lib/fog/azurerm/requests/storage/acquire_container_lease.rb +32 -0
- data/lib/fog/azurerm/requests/storage/check_container_exists.rb +30 -0
- data/lib/fog/azurerm/requests/storage/check_storage_account_exists.rb +37 -0
- data/lib/fog/azurerm/requests/storage/check_storage_account_name_availability.rb +44 -0
- data/lib/fog/azurerm/requests/storage/commit_blob_blocks.rb +30 -0
- data/lib/fog/azurerm/requests/storage/compare_container_blobs.rb +148 -0
- data/lib/fog/azurerm/requests/storage/copy_blob.rb +30 -0
- data/lib/fog/azurerm/requests/storage/copy_blob_from_uri.rb +30 -0
- data/lib/fog/azurerm/requests/storage/create_block_blob.rb +108 -0
- data/lib/fog/azurerm/requests/storage/create_container.rb +40 -0
- data/lib/fog/azurerm/requests/storage/create_disk.rb +62 -0
- data/lib/fog/azurerm/requests/storage/create_or_update_recovery_vault.rb +54 -0
- data/lib/fog/azurerm/requests/storage/create_page_blob.rb +31 -0
- data/lib/fog/azurerm/requests/storage/create_storage_account.rb +64 -0
- data/lib/fog/azurerm/requests/storage/delete_blob.rb +32 -0
- data/lib/fog/azurerm/requests/storage/delete_container.rb +31 -0
- data/lib/fog/azurerm/requests/storage/delete_disk.rb +36 -0
- data/lib/fog/azurerm/requests/storage/delete_recovery_vault.rb +35 -0
- data/lib/fog/azurerm/requests/storage/delete_storage_account.rb +27 -0
- data/lib/fog/azurerm/requests/storage/disable_backup_protection.rb +60 -0
- data/lib/fog/azurerm/requests/storage/enable_backup_protection.rb +61 -0
- data/lib/fog/azurerm/requests/storage/get_all_backup_jobs.rb +56 -0
- data/lib/fog/azurerm/requests/storage/get_backup_container.rb +53 -0
- data/lib/fog/azurerm/requests/storage/get_backup_item.rb +58 -0
- data/lib/fog/azurerm/requests/storage/get_backup_job_for_vm.rb +53 -0
- data/lib/fog/azurerm/requests/storage/get_backup_protection_policy.rb +64 -0
- data/lib/fog/azurerm/requests/storage/get_blob.rb +163 -0
- data/lib/fog/azurerm/requests/storage/get_blob_http_url.rb +39 -0
- data/lib/fog/azurerm/requests/storage/get_blob_https_url.rb +39 -0
- data/lib/fog/azurerm/requests/storage/get_blob_properties.rb +55 -0
- data/lib/fog/azurerm/requests/storage/get_blob_url.rb +28 -0
- data/lib/fog/azurerm/requests/storage/get_container_acl.rb +30 -0
- data/lib/fog/azurerm/requests/storage/get_container_properties.rb +41 -0
- data/lib/fog/azurerm/requests/storage/get_container_url.rb +34 -0
- data/lib/fog/azurerm/requests/storage/get_recovery_vault.rb +49 -0
- data/lib/fog/azurerm/requests/storage/get_storage_access_keys.rb +32 -0
- data/lib/fog/azurerm/requests/storage/get_storage_account.rb +36 -0
- data/lib/fog/azurerm/requests/storage/list_blobs.rb +168 -0
- data/lib/fog/azurerm/requests/storage/list_containers.rb +73 -0
- data/lib/fog/azurerm/requests/storage/list_recovery_vaults.rb +48 -0
- data/lib/fog/azurerm/requests/storage/list_storage_account_for_rg.rb +49 -0
- data/lib/fog/azurerm/requests/storage/list_storage_accounts.rb +49 -0
- data/lib/fog/azurerm/requests/storage/multipart_save_block_blob.rb +110 -0
- data/lib/fog/azurerm/requests/storage/put_blob_block.rb +30 -0
- data/lib/fog/azurerm/requests/storage/put_blob_metadata.rb +31 -0
- data/lib/fog/azurerm/requests/storage/put_blob_pages.rb +30 -0
- data/lib/fog/azurerm/requests/storage/put_blob_properties.rb +31 -0
- data/lib/fog/azurerm/requests/storage/put_container_acl.rb +31 -0
- data/lib/fog/azurerm/requests/storage/put_container_metadata.rb +31 -0
- data/lib/fog/azurerm/requests/storage/release_blob_lease.rb +30 -0
- data/lib/fog/azurerm/requests/storage/release_container_lease.rb +30 -0
- data/lib/fog/azurerm/requests/storage/save_page_blob.rb +111 -0
- data/lib/fog/azurerm/requests/storage/set_recovery_vault_context.rb +36 -0
- data/lib/fog/azurerm/requests/storage/start_backup.rb +54 -0
- data/lib/fog/azurerm/requests/storage/update_storage_account.rb +59 -0
- data/lib/fog/azurerm/requests/storage/wait_blob_copy_operation_to_finish.rb +56 -0
- data/lib/fog/azurerm/requests/traffic_manager/check_traffic_manager_endpoint_exists.rb +31 -0
- data/lib/fog/azurerm/requests/traffic_manager/check_traffic_manager_profile_exists.rb +31 -0
- data/lib/fog/azurerm/requests/traffic_manager/create_or_update_traffic_manager_endpoint.rb +54 -0
- data/lib/fog/azurerm/requests/traffic_manager/create_or_update_traffic_manager_profile.rb +120 -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/resources.rb +71 -0
- data/lib/fog/azurerm/sql.rb +66 -0
- data/lib/fog/azurerm/storage.rb +155 -0
- data/lib/fog/azurerm/traffic_manager.rb +62 -0
- data/lib/fog/azurerm/utilities/general.rb +168 -0
- data/lib/fog/azurerm/utilities/logger_messages.yml +19 -0
- data/lib/fog/azurerm/version.rb +5 -0
- data/rake-script.sh +4 -0
- data/rakefile +29 -0
- data/test/api_stub.rb +128 -0
- data/test/api_stub/models/application_gateway/gateway.rb +165 -0
- data/test/api_stub/models/compute/availability_set.rb +50 -0
- data/test/api_stub/models/compute/managed_disk.rb +59 -0
- data/test/api_stub/models/compute/server.rb +190 -0
- data/test/api_stub/models/compute/virtual_machine_extension.rb +31 -0
- data/test/api_stub/models/dns/record_set.rb +57 -0
- data/test/api_stub/models/dns/zone.rb +29 -0
- data/test/api_stub/models/key_vault/vault.rb +39 -0
- data/test/api_stub/models/network/express_route_circuit.rb +47 -0
- data/test/api_stub/models/network/express_route_circuit_authorization.rb +22 -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 +154 -0
- data/test/api_stub/models/network/local_network_gateway.rb +31 -0
- data/test/api_stub/models/network/network_interface.rb +72 -0
- data/test/api_stub/models/network/network_security_group.rb +95 -0
- data/test/api_stub/models/network/network_security_rule.rb +30 -0
- data/test/api_stub/models/network/public_ip.rb +36 -0
- data/test/api_stub/models/network/subnet.rb +36 -0
- data/test/api_stub/models/network/virtual_network.rb +62 -0
- data/test/api_stub/models/network/virtual_network_gateway.rb +26 -0
- data/test/api_stub/models/network/virtual_network_gateway_connection.rb +31 -0
- data/test/api_stub/models/resources/deployment.rb +116 -0
- data/test/api_stub/models/resources/resource.rb +43 -0
- data/test/api_stub/models/resources/resource_group.rb +24 -0
- data/test/api_stub/models/sql/sql_database.rb +30 -0
- data/test/api_stub/models/sql/sql_firewall_rule.rb +24 -0
- data/test/api_stub/models/sql/sql_server.rb +24 -0
- data/test/api_stub/models/storage/directory.rb +178 -0
- data/test/api_stub/models/storage/file.rb +181 -0
- data/test/api_stub/models/storage/recovery_vault.rb +23 -0
- data/test/api_stub/models/storage/storageaccount.rb +22 -0
- data/test/api_stub/models/traffic_manager/traffic_manager_end_point.rb +27 -0
- data/test/api_stub/models/traffic_manager/traffic_manager_profile.rb +75 -0
- data/test/api_stub/requests/application_gateway/gateway.rb +461 -0
- data/test/api_stub/requests/compute/availability_set.rb +57 -0
- data/test/api_stub/requests/compute/managed_disk.rb +102 -0
- data/test/api_stub/requests/compute/virtual_machine.rb +943 -0
- data/test/api_stub/requests/compute/virtual_machine_extension.rb +46 -0
- data/test/api_stub/requests/dns/record_set.rb +75 -0
- data/test/api_stub/requests/dns/zone.rb +52 -0
- data/test/api_stub/requests/key_vault/vault.rb +95 -0
- data/test/api_stub/requests/network/express_route_circuit.rb +100 -0
- data/test/api_stub/requests/network/express_route_circuit_authorization.rb +31 -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 +388 -0
- data/test/api_stub/requests/network/local_network_gateway.rb +62 -0
- data/test/api_stub/requests/network/network_interface.rb +264 -0
- data/test/api_stub/requests/network/network_security_group.rb +225 -0
- data/test/api_stub/requests/network/network_security_rule.rb +72 -0
- data/test/api_stub/requests/network/public_ip.rb +71 -0
- data/test/api_stub/requests/network/subnet.rb +71 -0
- data/test/api_stub/requests/network/virtual_network.rb +125 -0
- data/test/api_stub/requests/network/virtual_network_gateway.rb +49 -0
- data/test/api_stub/requests/network/virtual_network_gateway_connection.rb +68 -0
- data/test/api_stub/requests/resources/deployment.rb +68 -0
- data/test/api_stub/requests/resources/resource.rb +45 -0
- data/test/api_stub/requests/resources/resource_group.rb +51 -0
- data/test/api_stub/requests/sql/database.rb +71 -0
- data/test/api_stub/requests/sql/firewall_rule.rb +50 -0
- data/test/api_stub/requests/sql/sql_server.rb +49 -0
- data/test/api_stub/requests/storage/directory.rb +89 -0
- data/test/api_stub/requests/storage/file.rb +243 -0
- data/test/api_stub/requests/storage/recovery_vault.rb +189 -0
- data/test/api_stub/requests/storage/storageaccount.rb +126 -0
- data/test/api_stub/requests/traffic_manager/traffic_manager_endpoint.rb +41 -0
- data/test/api_stub/requests/traffic_manager/traffic_manager_profile.rb +166 -0
- data/test/integration/README.md +14 -0
- data/test/integration/Virtual_network_gateway_connection.rb +220 -0
- data/test/integration/application_gateway.rb +253 -0
- data/test/integration/availability_set.rb +90 -0
- data/test/integration/blob.rb +297 -0
- data/test/integration/container.rb +160 -0
- data/test/integration/credentials/azure.yml +5 -0
- data/test/integration/data_disk.rb +90 -0
- data/test/integration/deployment.rb +78 -0
- data/test/integration/express_route_circuit.rb +139 -0
- data/test/integration/external_load_balancer.rb +155 -0
- data/test/integration/internal_load_balancer.rb +144 -0
- data/test/integration/key_vault.rb +98 -0
- data/test/integration/local_network_gateway.rb +91 -0
- data/test/integration/managed_disk.rb +113 -0
- data/test/integration/network_interface.rb +156 -0
- data/test/integration/network_security_group.rb +133 -0
- data/test/integration/network_security_rule.rb +102 -0
- data/test/integration/public_ip.rb +83 -0
- data/test/integration/record_set.rb +126 -0
- data/test/integration/resource_group.rb +59 -0
- data/test/integration/resource_tag.rb +91 -0
- data/test/integration/server.rb +266 -0
- data/test/integration/server_custom_image.rb +127 -0
- data/test/integration/sql_server.rb +175 -0
- data/test/integration/storage_account.rb +123 -0
- data/test/integration/subnet.rb +122 -0
- data/test/integration/traffic_manager.rb +137 -0
- data/test/integration/virtual_machine_extension.rb +165 -0
- data/test/integration/virtual_network.rb +162 -0
- data/test/integration/virtual_network_gateway.rb +125 -0
- data/test/integration/virtual_network_gateway_connection_to_express_route.rb +123 -0
- data/test/integration/zone.rb +81 -0
- data/test/models/application_gateway/test_gateway.rb +135 -0
- data/test/models/application_gateway/test_gateways.rb +55 -0
- data/test/models/compute/test_availability_set.rb +54 -0
- data/test/models/compute/test_availability_sets.rb +55 -0
- data/test/models/compute/test_managed_disk.rb +61 -0
- data/test/models/compute/test_managed_disks.rb +68 -0
- data/test/models/compute/test_server.rb +201 -0
- data/test/models/compute/test_servers.rb +56 -0
- data/test/models/compute/test_virtual_machine_extension.rb +61 -0
- data/test/models/compute/test_virtual_machine_extensions.rb +49 -0
- data/test/models/dns/test_record_set.rb +86 -0
- data/test/models/dns/test_record_sets.rb +66 -0
- data/test/models/dns/test_zone.rb +50 -0
- data/test/models/dns/test_zones.rb +51 -0
- data/test/models/key_vault/test_vault.rb +39 -0
- data/test/models/key_vault/test_vaults.rb +55 -0
- data/test/models/network/test_express_route_circuit.rb +52 -0
- data/test/models/network/test_express_route_circuit_authorization.rb +50 -0
- data/test/models/network/test_express_route_circuit_authorizations.rb +56 -0
- data/test/models/network/test_express_route_circuit_peering.rb +53 -0
- data/test/models/network/test_express_route_circuit_peerings.rb +43 -0
- data/test/models/network/test_express_route_circuits.rb +55 -0
- data/test/models/network/test_express_route_service_providers.rb +30 -0
- data/test/models/network/test_load_balancer.rb +51 -0
- data/test/models/network/test_load_balancers.rb +55 -0
- data/test/models/network/test_local_network_gateway.rb +53 -0
- data/test/models/network/test_local_network_gateways.rb +55 -0
- data/test/models/network/test_network_interface.rb +96 -0
- data/test/models/network/test_network_interfaces.rb +55 -0
- data/test/models/network/test_network_security_group.rb +86 -0
- data/test/models/network/test_network_security_groups.rb +54 -0
- data/test/models/network/test_network_security_rule.rb +44 -0
- data/test/models/network/test_network_security_rules.rb +55 -0
- data/test/models/network/test_public_ip.rb +61 -0
- data/test/models/network/test_public_ips.rb +55 -0
- data/test/models/network/test_subnet.rb +83 -0
- data/test/models/network/test_subnets.rb +56 -0
- data/test/models/network/test_virtual_network.rb +106 -0
- data/test/models/network/test_virtual_network_gateway.rb +62 -0
- data/test/models/network/test_virtual_network_gateway_connection.rb +59 -0
- data/test/models/network/test_virtual_network_gateway_connections.rb +55 -0
- data/test/models/network/test_virtual_network_gateways.rb +55 -0
- data/test/models/network/test_virtual_networks.rb +67 -0
- data/test/models/resources/test_deployment.rb +55 -0
- data/test/models/resources/test_deployments.rb +51 -0
- data/test/models/resources/test_resource.rb +22 -0
- data/test/models/resources/test_resource_group.rb +44 -0
- data/test/models/resources/test_resource_groups.rb +51 -0
- data/test/models/resources/test_resources.rb +52 -0
- data/test/models/sql/test_database.rb +67 -0
- data/test/models/sql/test_databases.rb +42 -0
- data/test/models/sql/test_firewall_rule.rb +55 -0
- data/test/models/sql/test_firewall_rules.rb +42 -0
- data/test/models/sql/test_sql_server.rb +57 -0
- data/test/models/sql/test_sql_servers.rb +41 -0
- data/test/models/storage/test_data_disk.rb +23 -0
- data/test/models/storage/test_directories.rb +74 -0
- data/test/models/storage/test_directory.rb +178 -0
- data/test/models/storage/test_file.rb +294 -0
- data/test/models/storage/test_files.rb +234 -0
- data/test/models/storage/test_recovery_vault.rb +61 -0
- data/test/models/storage/test_recovery_vaults.rb +47 -0
- data/test/models/storage/test_storage_account.rb +88 -0
- data/test/models/storage/test_storage_accounts.rb +78 -0
- data/test/models/traffic_manager/test_traffic_manager_end_point.rb +54 -0
- data/test/models/traffic_manager/test_traffic_manager_end_points.rb +56 -0
- data/test/models/traffic_manager/test_traffic_manager_profile.rb +62 -0
- data/test/models/traffic_manager/test_traffic_manager_profiles.rb +55 -0
- data/test/requests/application_gateway/test_check_ag_exists.rb +31 -0
- data/test/requests/application_gateway/test_create_or_update_application_gateway.rb +35 -0
- data/test/requests/application_gateway/test_delete_application_gateway.rb +23 -0
- data/test/requests/application_gateway/test_get_application_gateway.rb +24 -0
- data/test/requests/application_gateway/test_list_application_gateways.rb +24 -0
- data/test/requests/application_gateway/test_start_application_gateway.rb +25 -0
- data/test/requests/application_gateway/test_stop_application_gateway.rb +25 -0
- data/test/requests/compute/test_attach_data_disk_to_vm.rb +90 -0
- data/test/requests/compute/test_check_availability_set_exists.rb +31 -0
- data/test/requests/compute/test_check_managed_disk_exists.rb +31 -0
- data/test/requests/compute/test_check_vm_exists.rb +31 -0
- data/test/requests/compute/test_check_vm_extension_exists.rb +31 -0
- data/test/requests/compute/test_create_availability_set.rb +28 -0
- data/test/requests/compute/test_create_or_update_managed_disk.rb +38 -0
- data/test/requests/compute/test_create_virtual_machine.rb +90 -0
- data/test/requests/compute/test_create_vm_extension.rb +35 -0
- data/test/requests/compute/test_deallocate_virtual_machine.rb +32 -0
- data/test/requests/compute/test_delete_availability_set.rb +23 -0
- data/test/requests/compute/test_delete_managed_disk.rb +23 -0
- data/test/requests/compute/test_delete_virtual_machine.rb +32 -0
- data/test/requests/compute/test_detach_data_disk_from_vm.rb +32 -0
- data/test/requests/compute/test_generalize_virtual_machine.rb +32 -0
- data/test/requests/compute/test_get_availability_set.rb +24 -0
- data/test/requests/compute/test_get_managed_disk.rb +24 -0
- data/test/requests/compute/test_get_virtual_machine.rb +24 -0
- data/test/requests/compute/test_get_vm_extension.rb +26 -0
- data/test/requests/compute/test_get_vm_status.rb +25 -0
- data/test/requests/compute/test_grant_access_to_managed_disk.rb +26 -0
- data/test/requests/compute/test_list_availability_sets.rb +24 -0
- data/test/requests/compute/test_list_available_sizes_for_virtual_machine.rb +33 -0
- data/test/requests/compute/test_list_managed_disks_by_rg.rb +24 -0
- data/test/requests/compute/test_list_managed_disks_in_subscription.rb +24 -0
- data/test/requests/compute/test_list_virtual_machines.rb +24 -0
- data/test/requests/compute/test_power_off_virtual_machine.rb +32 -0
- data/test/requests/compute/test_redeploy_virtual_machine.rb +33 -0
- data/test/requests/compute/test_restart_virtual_machine.rb +32 -0
- data/test/requests/compute/test_revoke_access_to_managed_disk.rb +24 -0
- data/test/requests/compute/test_start_virtual_machine.rb +32 -0
- data/test/requests/compute/test_update_vm_extension.rb +35 -0
- data/test/requests/dns/test_check_record_set_exists.rb +31 -0
- data/test/requests/dns/test_check_zone_exists.rb +35 -0
- data/test/requests/dns/test_create_record_set.rb +46 -0
- data/test/requests/dns/test_create_zone.rb +37 -0
- data/test/requests/dns/test_delete_record_set.rb +24 -0
- data/test/requests/dns/test_delete_zone.rb +24 -0
- data/test/requests/dns/test_get_record_set.rb +24 -0
- data/test/requests/dns/test_get_records_from_record_set.rb +42 -0
- data/test/requests/dns/test_get_zone.rb +35 -0
- data/test/requests/dns/test_list_record_sets.rb +35 -0
- data/test/requests/dns/test_list_zones.rb +26 -0
- data/test/requests/key_vault/test_check_vault_exists.rb +31 -0
- data/test/requests/key_vault/test_create_or_update_vault.rb +25 -0
- data/test/requests/key_vault/test_delete_vault.rb +23 -0
- data/test/requests/key_vault/test_get_vault.rb +24 -0
- data/test/requests/key_vault/test_list_vaults.rb +24 -0
- data/test/requests/network/test_add_address_prefixes_in_virtual_network.rb +29 -0
- data/test/requests/network/test_add_dns_servers_in_virtual_network.rb +29 -0
- data/test/requests/network/test_add_security_rules.rb +43 -0
- data/test/requests/network/test_add_subnets_in_virtual_network.rb +29 -0
- data/test/requests/network/test_attach_network_security_group_to_subnet.rb +26 -0
- data/test/requests/network/test_attach_resource_to_nic.rb +43 -0
- data/test/requests/network/test_attach_route_table_to_subnet.rb +26 -0
- data/test/requests/network/test_check_express_route_cir_auth_exists.rb +31 -0
- data/test/requests/network/test_check_express_route_circuit_exists.rb +31 -0
- data/test/requests/network/test_check_load_balancer_exists.rb +31 -0
- data/test/requests/network/test_check_local_net_gateway_exists.rb +31 -0
- data/test/requests/network/test_check_net_sec_group_exists.rb +31 -0
- data/test/requests/network/test_check_net_sec_rule_exists.rb +31 -0
- data/test/requests/network/test_check_network_interface_exists.rb +31 -0
- data/test/requests/network/test_check_public_ip_exists.rb +30 -0
- data/test/requests/network/test_check_subnet_exists.rb +31 -0
- data/test/requests/network/test_check_virtual_network_exists.rb +34 -0
- data/test/requests/network/test_check_vnet_gateway_connection_exists.rb +31 -0
- data/test/requests/network/test_check_vnet_gateway_exists.rb +31 -0
- data/test/requests/network/test_create_express_route_circuit.rb +39 -0
- data/test/requests/network/test_create_express_route_circuit_authorization.rb +35 -0
- data/test/requests/network/test_create_express_route_circuit_peering.rb +37 -0
- data/test/requests/network/test_create_load_balancer.rb +49 -0
- data/test/requests/network/test_create_local_network_gateway.rb +36 -0
- data/test/requests/network/test_create_network_interface.rb +42 -0
- data/test/requests/network/test_create_or_update_network_security_group.rb +38 -0
- data/test/requests/network/test_create_or_update_network_security_rule.rb +28 -0
- data/test/requests/network/test_create_or_update_virtual_network.rb +55 -0
- data/test/requests/network/test_create_public_ip.rb +35 -0
- data/test/requests/network/test_create_subnet.rb +35 -0
- data/test/requests/network/test_create_virtual_network_gateway.rb +37 -0
- data/test/requests/network/test_create_virtual_network_gateway_connection.rb +36 -0
- data/test/requests/network/test_delete_express_route_circuit.rb +24 -0
- data/test/requests/network/test_delete_express_route_circuit_authorization.rb +23 -0
- data/test/requests/network/test_delete_express_route_circuit_peering.rb +24 -0
- data/test/requests/network/test_delete_load_balancer.rb +24 -0
- data/test/requests/network/test_delete_local_network_gateway.rb +23 -0
- data/test/requests/network/test_delete_network_interface.rb +24 -0
- data/test/requests/network/test_delete_network_security_group.rb +25 -0
- data/test/requests/network/test_delete_network_security_rule.rb +25 -0
- data/test/requests/network/test_delete_public_ip.rb +24 -0
- data/test/requests/network/test_delete_subnet.rb +24 -0
- data/test/requests/network/test_delete_virtual_network.rb +24 -0
- data/test/requests/network/test_delete_virtual_network_gateway.rb +24 -0
- data/test/requests/network/test_delete_virtual_network_gateway_connection.rb +23 -0
- data/test/requests/network/test_detach_network_security_group_from_subnet.rb +26 -0
- data/test/requests/network/test_detach_resource_from_nic.rb +41 -0
- data/test/requests/network/test_detach_route_table_from_subnet.rb +26 -0
- data/test/requests/network/test_get_available_ipaddresses_count.rb +18 -0
- data/test/requests/network/test_get_connection_shared_key.rb +24 -0
- data/test/requests/network/test_get_express_route_circuit.rb +24 -0
- data/test/requests/network/test_get_express_route_circuit_authorization.rb +24 -0
- data/test/requests/network/test_get_express_route_circuit_peering.rb +24 -0
- data/test/requests/network/test_get_load_balancer.rb +24 -0
- data/test/requests/network/test_get_local_network_gateway.rb +24 -0
- data/test/requests/network/test_get_network_interface.rb +24 -0
- data/test/requests/network/test_get_network_security_group.rb +26 -0
- data/test/requests/network/test_get_network_security_rule.rb +26 -0
- data/test/requests/network/test_get_public_ip.rb +26 -0
- data/test/requests/network/test_get_subnet.rb +26 -0
- 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_get_virtual_network_gateway_connection.rb +24 -0
- data/test/requests/network/test_list_express_route_circuit_authorizations.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 +24 -0
- data/test/requests/network/test_list_local_network_gateways.rb +24 -0
- data/test/requests/network/test_list_network_interfaces.rb +24 -0
- data/test/requests/network/test_list_network_security_groups.rb +26 -0
- data/test/requests/network/test_list_network_security_rules.rb +26 -0
- data/test/requests/network/test_list_public_ips.rb +24 -0
- data/test/requests/network/test_list_subnets.rb +24 -0
- data/test/requests/network/test_list_virtual_network_gateway_connections.rb +24 -0
- data/test/requests/network/test_list_virtual_network_gateways.rb +24 -0
- data/test/requests/network/test_list_virtual_networks.rb +24 -0
- data/test/requests/network/test_list_virtual_networks_in_subscription.rb +24 -0
- data/test/requests/network/test_remove_address_prefixes_from_virtual_network.rb +29 -0
- data/test/requests/network/test_remove_dns_servers_from_virtual_network.rb +29 -0
- data/test/requests/network/test_remove_security_rule.rb +29 -0
- data/test/requests/network/test_remove_subnets_from_virtual_network.rb +29 -0
- data/test/requests/network/test_reset_connection_shared_key.rb +23 -0
- data/test/requests/network/test_set_connection_shared_key.rb +23 -0
- data/test/requests/network/test_update_public_ip.rb +34 -0
- data/test/requests/resources/test_check_azure_resource_exists.rb +22 -0
- data/test/requests/resources/test_check_deployment_exists.rb +29 -0
- data/test/requests/resources/test_check_resource_group_exists.rb +29 -0
- data/test/requests/resources/test_create_deployment.rb +32 -0
- data/test/requests/resources/test_create_resource_group.rb +24 -0
- data/test/requests/resources/test_delete_deployment.rb +25 -0
- data/test/requests/resources/test_delete_resource_group.rb +24 -0
- data/test/requests/resources/test_delete_resource_tag.rb +35 -0
- data/test/requests/resources/test_get_deployment.rb +24 -0
- data/test/requests/resources/test_get_resource_group.rb +24 -0
- data/test/requests/resources/test_list_deployments.rb +25 -0
- data/test/requests/resources/test_list_resource_groups.rb +24 -0
- data/test/requests/resources/test_list_tagged_resources.rb +24 -0
- data/test/requests/resources/test_tag_resource.rb +35 -0
- data/test/requests/sql/test_create_or_update_database.rb +25 -0
- data/test/requests/sql/test_create_or_update_firewall_rule.rb +25 -0
- data/test/requests/sql/test_create_or_update_sql_server.rb +25 -0
- data/test/requests/sql/test_delete_database.rb +23 -0
- data/test/requests/sql/test_delete_firewall_rule.rb +23 -0
- data/test/requests/sql/test_delete_sql_server.rb +23 -0
- data/test/requests/sql/test_get_database.rb +24 -0
- data/test/requests/sql/test_get_firewall_rule.rb +24 -0
- data/test/requests/sql/test_get_sql_server.rb +24 -0
- data/test/requests/sql/test_list_databases.rb +24 -0
- data/test/requests/sql/test_list_firewall_rules.rb +24 -0
- data/test/requests/sql/test_list_sql_servers.rb +24 -0
- data/test/requests/storage/test_acquire_blob_lease.rb +36 -0
- data/test/requests/storage/test_acquire_container_lease.rb +36 -0
- data/test/requests/storage/test_check_container_exists.rb +18 -0
- data/test/requests/storage/test_check_storage_account_exists.rb +34 -0
- data/test/requests/storage/test_check_storage_account_name_availability.rb +35 -0
- data/test/requests/storage/test_commit_blob_blocks.rb +34 -0
- data/test/requests/storage/test_compare_container_blobs.rb +36 -0
- data/test/requests/storage/test_copy_blob.rb +36 -0
- data/test/requests/storage/test_copy_blob_from_uri.rb +36 -0
- data/test/requests/storage/test_create_block_blob.rb +80 -0
- data/test/requests/storage/test_create_container.rb +36 -0
- data/test/requests/storage/test_create_disk.rb +70 -0
- data/test/requests/storage/test_create_page_blob.rb +34 -0
- data/test/requests/storage/test_create_recovery_vault.rb +35 -0
- data/test/requests/storage/test_create_storage_account.rb +34 -0
- data/test/requests/storage/test_delete_blob.rb +42 -0
- data/test/requests/storage/test_delete_container.rb +42 -0
- data/test/requests/storage/test_delete_disk.rb +30 -0
- data/test/requests/storage/test_delete_recovery_vault.rb +34 -0
- data/test/requests/storage/test_delete_storage_account.rb +28 -0
- data/test/requests/storage/test_disable_backup_protection.rb +52 -0
- data/test/requests/storage/test_enable_backup_protection.rb +66 -0
- data/test/requests/storage/test_get_all_backup_jobs.rb +35 -0
- data/test/requests/storage/test_get_backup_container.rb +35 -0
- data/test/requests/storage/test_get_backup_item.rb +35 -0
- data/test/requests/storage/test_get_backup_job_for_vm.rb +26 -0
- data/test/requests/storage/test_get_backup_protection_policy.rb +35 -0
- data/test/requests/storage/test_get_blob.rb +141 -0
- data/test/requests/storage/test_get_blob_http_url.rb +30 -0
- data/test/requests/storage/test_get_blob_https_url.rb +30 -0
- data/test/requests/storage/test_get_blob_properties.rb +45 -0
- data/test/requests/storage/test_get_blob_url.rb +75 -0
- data/test/requests/storage/test_get_container_acl.rb +37 -0
- data/test/requests/storage/test_get_container_properties.rb +45 -0
- data/test/requests/storage/test_get_container_url.rb +33 -0
- data/test/requests/storage/test_get_recovery_vault.rb +35 -0
- data/test/requests/storage/test_get_storage_access_keys.rb +24 -0
- data/test/requests/storage/test_get_storage_account.rb +25 -0
- data/test/requests/storage/test_list_blobs.rb +77 -0
- data/test/requests/storage/test_list_containers.rb +54 -0
- data/test/requests/storage/test_list_recovery_vault.rb +35 -0
- data/test/requests/storage/test_list_storage_accounts.rb +37 -0
- data/test/requests/storage/test_list_storage_accounts_for_rg.rb +37 -0
- data/test/requests/storage/test_multipart_save_block_blob.rb +105 -0
- data/test/requests/storage/test_put_blob_block.rb +34 -0
- data/test/requests/storage/test_put_blob_metadata.rb +36 -0
- data/test/requests/storage/test_put_blob_pages.rb +34 -0
- data/test/requests/storage/test_put_blob_properties.rb +39 -0
- data/test/requests/storage/test_put_container_acl.rb +34 -0
- data/test/requests/storage/test_put_container_metadata.rb +36 -0
- data/test/requests/storage/test_release_blob_lease.rb +34 -0
- data/test/requests/storage/test_release_container_lease.rb +34 -0
- data/test/requests/storage/test_save_page_blob.rb +115 -0
- data/test/requests/storage/test_set_recovery_vault_context.rb +34 -0
- data/test/requests/storage/test_start_backup.rb +55 -0
- data/test/requests/storage/test_update_storage_account.rb +34 -0
- data/test/requests/storage/test_wait_blob_copy_operation_to_finish.rb +148 -0
- data/test/requests/traffic_manager/test_check_traffic_manager_endpoint_exists.rb +31 -0
- data/test/requests/traffic_manager/test_check_traffic_manager_profile_exists.rb +31 -0
- 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/requests/traffic_manager/test_update_traffic_manager_endpoint.rb +27 -0
- data/test/requests/traffic_manager/test_update_traffic_manager_profile.rb +27 -0
- data/test/smoke_tests/compute/test_resource_group_smoke.rb +37 -0
- data/test/test_credentials.rb +63 -0
- data/test/test_helper.rb +817 -0
- metadata +1074 -0
@@ -0,0 +1,181 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Models
|
3
|
+
module Storage
|
4
|
+
# Mock class for Data Disk Model
|
5
|
+
class File
|
6
|
+
def self.blob
|
7
|
+
{
|
8
|
+
'name' => 'test_blob',
|
9
|
+
'metadata' => {},
|
10
|
+
'properties' => {
|
11
|
+
'last_modified' => 'Mon, 04 Jul 2016 09:30:31 GMT',
|
12
|
+
'etag' => '0x8D3A3EDD7C2B777',
|
13
|
+
'lease_status' => 'unlocked',
|
14
|
+
'lease_state' => 'available',
|
15
|
+
'lease_duration' => nil,
|
16
|
+
'content_length' => 4_194_304,
|
17
|
+
'content_type' => 'application/octet-stream',
|
18
|
+
'content_encoding' => nil,
|
19
|
+
'content_language' => nil,
|
20
|
+
'content_disposition' => nil,
|
21
|
+
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
22
|
+
'cache_control' => nil,
|
23
|
+
'sequence_number' => 0,
|
24
|
+
'blob_type' => 'PageBlob',
|
25
|
+
'copy_id' => '095adc3b-e277-4c3d-97e0-0abca881f60c',
|
26
|
+
'copy_status' => 'success',
|
27
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/testblob/4m?snapshot=2016-02-04T08%3A35%3A50.3157696Z',
|
28
|
+
'copy_progress' => '4194304/4194304',
|
29
|
+
'copy_completion_time' => 'Thu, 04 Feb 2016 08:35:52 GMT',
|
30
|
+
'copy_status_description' => nil,
|
31
|
+
'accept_ranges' => 0
|
32
|
+
}
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.blob_https_url
|
37
|
+
'https://sa.blob.core.windows.net/test_container/test_blob'
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.blob_metadata
|
41
|
+
{
|
42
|
+
'created-by' => 'User',
|
43
|
+
'source-machine' => 'Test-machine',
|
44
|
+
'category' => 'guidance',
|
45
|
+
'doctype' => 'textDocuments'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.blob_list
|
50
|
+
{
|
51
|
+
next_marker: 'marker',
|
52
|
+
blobs:
|
53
|
+
[
|
54
|
+
{
|
55
|
+
'name' => 'test_blob1',
|
56
|
+
'metadata' => {},
|
57
|
+
'properties' => {
|
58
|
+
'last_modified' => 'Mon, 04 Jul 2016 02:50:20 GMT',
|
59
|
+
'etag' => '"0x8D3A3B5F017F52D"',
|
60
|
+
'lease_status' => 'unlocked',
|
61
|
+
'lease_state' => 'available',
|
62
|
+
'content_length' => 4_194_304,
|
63
|
+
'content_type' => 'application/octet-stream',
|
64
|
+
'content_encoding' => nil,
|
65
|
+
'content_language' => nil,
|
66
|
+
'content_disposition' => nil,
|
67
|
+
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
68
|
+
'cache_control' => nil,
|
69
|
+
'sequence_number' => 0,
|
70
|
+
'blob_type' => 'PageBlob',
|
71
|
+
'copy_id' => '095adc3b-e277-4c3d-97e0-0abca881f60c',
|
72
|
+
'copy_status' => 'success',
|
73
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A50.3256874Z',
|
74
|
+
'copy_progress' => '4194304/4194304',
|
75
|
+
'copy_completion_time' => 'Thu, 04 Feb 2016 08:35:52 GMT',
|
76
|
+
'copy_status_description' => nil,
|
77
|
+
'accept_ranges' => 0
|
78
|
+
}
|
79
|
+
},
|
80
|
+
{
|
81
|
+
'name' => 'test_blob2',
|
82
|
+
'metadata' => {},
|
83
|
+
'properties' => {
|
84
|
+
'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT',
|
85
|
+
'etag' => '"0x8D29C92173526C8"',
|
86
|
+
'lease_status' => 'unlocked',
|
87
|
+
'lease_state' => 'available',
|
88
|
+
'content_length' => 4_194_304,
|
89
|
+
'content_type' => 'application/octet-stream',
|
90
|
+
'content_encoding' => nil,
|
91
|
+
'content_language' => nil,
|
92
|
+
'content_disposition' => nil,
|
93
|
+
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
94
|
+
'cache_control' => nil,
|
95
|
+
'sequence_number' => 0,
|
96
|
+
'blob_type' => 'PageBlob',
|
97
|
+
'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c',
|
98
|
+
'copy_status' => 'success',
|
99
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z',
|
100
|
+
'copy_progress' => '4194304/4194304',
|
101
|
+
'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT',
|
102
|
+
'copy_status_description' => nil,
|
103
|
+
'accept_ranges' => 0
|
104
|
+
}
|
105
|
+
},
|
106
|
+
{
|
107
|
+
'name' => 'test_blob3',
|
108
|
+
'metadata' => {},
|
109
|
+
'properties' => {
|
110
|
+
'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT',
|
111
|
+
'etag' => '"0x8D29C92173526C8"',
|
112
|
+
'lease_status' => 'unlocked',
|
113
|
+
'lease_state' => 'available',
|
114
|
+
'content_length' => 4_194_304,
|
115
|
+
'content_type' => 'application/octet-stream',
|
116
|
+
'content_encoding' => nil,
|
117
|
+
'content_language' => nil,
|
118
|
+
'content_disposition' => nil,
|
119
|
+
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
120
|
+
'cache_control' => nil,
|
121
|
+
'sequence_number' => 0,
|
122
|
+
'blob_type' => 'PageBlob',
|
123
|
+
'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c',
|
124
|
+
'copy_status' => 'success',
|
125
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z',
|
126
|
+
'copy_progress' => '4194304/4194304',
|
127
|
+
'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT',
|
128
|
+
'copy_status_description' => nil,
|
129
|
+
'accept_ranges' => 0
|
130
|
+
}
|
131
|
+
},
|
132
|
+
{
|
133
|
+
'name' => 'test_blob4',
|
134
|
+
'metadata' => {},
|
135
|
+
'properties' => {
|
136
|
+
'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT',
|
137
|
+
'etag' => '"0x8D29C92173526C8"',
|
138
|
+
'lease_status' => 'unlocked',
|
139
|
+
'lease_state' => 'available',
|
140
|
+
'content_length' => 4_194_304,
|
141
|
+
'content_type' => 'application/octet-stream',
|
142
|
+
'content_encoding' => nil,
|
143
|
+
'content_language' => nil,
|
144
|
+
'content_disposition' => nil,
|
145
|
+
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
146
|
+
'cache_control' => nil,
|
147
|
+
'sequence_number' => 0,
|
148
|
+
'blob_type' => 'PageBlob',
|
149
|
+
'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c',
|
150
|
+
'copy_status' => 'success',
|
151
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z',
|
152
|
+
'copy_progress' => '4194304/4194304',
|
153
|
+
'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT',
|
154
|
+
'copy_status_description' => nil,
|
155
|
+
'accept_ranges' => 0
|
156
|
+
}
|
157
|
+
}
|
158
|
+
]
|
159
|
+
}
|
160
|
+
end
|
161
|
+
|
162
|
+
def self.container
|
163
|
+
{
|
164
|
+
'name' => 'test_container',
|
165
|
+
'public_access_level' => 'container',
|
166
|
+
'metadata' => {
|
167
|
+
'key1' => 'value1',
|
168
|
+
'key2' => 'value2'
|
169
|
+
},
|
170
|
+
'properties' => {
|
171
|
+
'last_modified' => 'Tue, 04 Aug 2015 06:01:08 GMT',
|
172
|
+
'etag' => '"0x8D29C92176C8352"',
|
173
|
+
'lease_status' => 'unlocked',
|
174
|
+
'lease_state' => 'available'
|
175
|
+
}
|
176
|
+
}
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Models
|
3
|
+
module Storage
|
4
|
+
# Mock class for Recovery Vault model
|
5
|
+
class RecoveryVault
|
6
|
+
def self.create_method_response
|
7
|
+
{
|
8
|
+
'id' => '/subscriptions/#{67f2116d}#######-####-####-####-############/resourceGroups/fog-test-rg/providers/Microsoft.RecoveryServices/vaults/fog-test-vault',
|
9
|
+
'location' => 'westus',
|
10
|
+
'name' => 'fog-test-vault',
|
11
|
+
'properties' => {
|
12
|
+
'provisioningState' => 'Succeeded'
|
13
|
+
},
|
14
|
+
'type' => 'Microsoft.RecoveryServices/vaults',
|
15
|
+
'sku' => {
|
16
|
+
'name' => 'standard'
|
17
|
+
}
|
18
|
+
}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Models
|
3
|
+
module Storage
|
4
|
+
# Mock class for Storage Account
|
5
|
+
class StorageAccount
|
6
|
+
def self.create_storage_account(storage_mgmt_client)
|
7
|
+
storage_account_hash = {
|
8
|
+
'id' => '/subscriptions/67f2116d-4ea2-4c6c-b20a-f92183dbe3cb/resourceGroups/fog_test_rg/providers/Microsoft.Storage/storageAccounts/fogtestsasecond',
|
9
|
+
'name' => 'fog-test-storage-account',
|
10
|
+
'location' => 'west us',
|
11
|
+
'sku' =>
|
12
|
+
{
|
13
|
+
'name' => 'Standard_LRS'
|
14
|
+
}
|
15
|
+
}
|
16
|
+
storage_account_mapper = Azure::ARM::Storage::Models::StorageAccount.mapper
|
17
|
+
storage_mgmt_client.deserialize(storage_account_mapper, storage_account_hash, 'hash')
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Models
|
3
|
+
module TrafficManager
|
4
|
+
# Mock class for Traffic Manager End Point Model
|
5
|
+
class TrafficManagerEndPoint
|
6
|
+
def self.create_traffic_manager_end_point_response(traffic_manager_client)
|
7
|
+
endpoint = '{
|
8
|
+
"id": "/subscriptions/######/resourceGroups/fog-test-rg/providers/Microsoft.Network/trafficManagerProfiles/fog-test-profile/azureEndpoints/fog-test-end-point?api-version=2015-11-01",
|
9
|
+
"name": "fog-test-end-point",
|
10
|
+
"type": "Microsoft.Network/trafficManagerProfiles/azureEndpoints",
|
11
|
+
"properties": {
|
12
|
+
"endpointStatus": "Enabled",
|
13
|
+
"endpointMonitorStatus": "Online",
|
14
|
+
"targetResourceId": "/subscriptions/######/resourceGroups/fog-test-rg/providers/Microsoft.Network/",
|
15
|
+
"target": "myapp.azurewebsites.net",
|
16
|
+
"weight": 10,
|
17
|
+
"priority": 3,
|
18
|
+
"endpointLocation": "centralus"
|
19
|
+
}
|
20
|
+
}'
|
21
|
+
endpoint_mapper = Azure::ARM::TrafficManager::Models::Endpoint.mapper
|
22
|
+
traffic_manager_client.deserialize(endpoint_mapper, Fog::JSON.decode(endpoint), 'result.body')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Models
|
3
|
+
module TrafficManager
|
4
|
+
# Mock class for Traffic Manager Profile Model
|
5
|
+
class TrafficManagerProfile
|
6
|
+
def self.traffic_manager_profile_response(traffic_manager_client)
|
7
|
+
profile = '{
|
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": "myapp",
|
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
|
+
|
28
|
+
"endpoints": [{
|
29
|
+
"id": "/subscriptions/####/resourceGroups/fog-test-rg/Microsoft.Network/trafficManagerProfiles/fog-test-profile/azureEndpoints/endpoint-name1",
|
30
|
+
"name": "endpoint-name1",
|
31
|
+
"type": "Microsoft.Network/trafficManagerProfiles/azureEndpoints",
|
32
|
+
"properties": {
|
33
|
+
"endpointStatus": "Enabled",
|
34
|
+
"endpointMonitorStatus": "Online",
|
35
|
+
"targetResourceId": "{resource ID of target resource in Azure}",
|
36
|
+
"target": "myapp.azurewebsites.net",
|
37
|
+
"weight": 10,
|
38
|
+
"priority": 3,
|
39
|
+
"endpointLocation": "centralus"
|
40
|
+
}
|
41
|
+
}, {
|
42
|
+
"id": "/subscriptions/####/resourceGroups/fog-test-rg/Microsoft.Network/trafficManagerProfiles/fog-test-profile/externalEndpoints/endpoint-name2",
|
43
|
+
"name": "endpoint-name2",
|
44
|
+
"type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
|
45
|
+
"properties": {
|
46
|
+
"endpointStatus": "Enabled",
|
47
|
+
"endpointMonitorStatus": "Online",
|
48
|
+
"target": "myendpoint.contoso.com",
|
49
|
+
"weight": 10,
|
50
|
+
"priority": 5,
|
51
|
+
"endpointLocation": "northeurope"
|
52
|
+
}
|
53
|
+
}, {
|
54
|
+
"id": "/subscriptions/####/resourceGroups/fog-test-rg/Microsoft.Network/trafficManagerProfiles/fog-test-profile/nestedEndpoints/endpoint-name3",
|
55
|
+
"name": "endpoint-name3",
|
56
|
+
"type": "Microsoft.Network/trafficManagerProfiles/nestedEndpoints",
|
57
|
+
"properties": {
|
58
|
+
"endpointStatus": "Enabled",
|
59
|
+
"endpointMonitorStatus": "Online",
|
60
|
+
"targetResourceId": "####",
|
61
|
+
"weight": 10,
|
62
|
+
"priority": 1,
|
63
|
+
"endpointLocation": "westeurope",
|
64
|
+
"minChildEndpoints": 1
|
65
|
+
}
|
66
|
+
}]
|
67
|
+
}
|
68
|
+
}'
|
69
|
+
profile_mapper = Azure::ARM::TrafficManager::Models::Profile.mapper
|
70
|
+
traffic_manager_client.deserialize(profile_mapper, Fog::JSON.decode(profile), 'result.body')
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,461 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Requests
|
3
|
+
module ApplicationGateway
|
4
|
+
# Mock class for Application Gateway Requests
|
5
|
+
class Gateway
|
6
|
+
def self.create_application_gateway_response(gateway_client)
|
7
|
+
response = '{
|
8
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway",
|
9
|
+
"name": "gateway",
|
10
|
+
"type": "Microsoft.Network/applicationGateways",
|
11
|
+
"location": "eastus",
|
12
|
+
"properties": {
|
13
|
+
"sku": {
|
14
|
+
"name": "Standard_Medium",
|
15
|
+
"tier": "Standard",
|
16
|
+
"capacity": 2
|
17
|
+
},
|
18
|
+
"gatewayIPConfigurations": [
|
19
|
+
{
|
20
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/gatewayIPConfigurations/ag-GatewayIP",
|
21
|
+
"properties": {
|
22
|
+
"subnet": {
|
23
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/vnet/subnets/GatewaySubnet"
|
24
|
+
},
|
25
|
+
"provisioningState": "Succeeded"
|
26
|
+
},
|
27
|
+
"name": "ag-GatewayIP"
|
28
|
+
}
|
29
|
+
],
|
30
|
+
"sslCertificates": [
|
31
|
+
{
|
32
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/sslCertificates/ssl_certificate",
|
33
|
+
"properties": {
|
34
|
+
"publicCertData": "MIIDiDCCAnACCQCwYkR0Mxy+QTANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCUEsxDzANBgNVBAgTBlB1bmphYjEPMA0GA1UEBxMGTGFob3JlMQ8wDQYDVQQKEwZDb25maXoxDDAKBgNVBAsTA0RldjEPMA0GA1UEAxMGaGFpZGVyMSQwIgYJKoZIhvcNAQkBFhVoYWlkZXIuYWxpQGNvbmZpei5jb20wHhcNMTYwMzAyMTE0NTM2WhcNMTcwMzAyMTE0NTM2WjCBhTELMAkGA1UEBhMCUEsxDzANBgNVBAgTBlB1bmphYjEPMA0GA1UEBxMGTGFob3JlMQ8wDQYDVQQKEwZDb25maXoxDDAKBgNVBAsTA0RldjEPMA0GA1UEAxMGaGFpZGVyMSQwIgYJKoZIhvcNAQkBFhVoYWlkZXIuYWxpQGNvbmZpei5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCuJrPbvOG+4oXQRamkOALlpdK98m+atJue9zOcCCagY8IJI4quYL13d8VItmrZf7erA+siqpYlWEuk1+lmmUY7T4AWAL8mXeR2vc7hWF601WDUjeVPK19+IcC8emMLOlBpvjXC9nbvADLQuR0PGitfjCqFoG66EOqJmLDNBsyHWmy+qhb8J4WXitruNAJDPe/20h6L23vD6z4tvwBjh4zkrfskGlKCNcAuvG1NI0FAS8261Jvs3lf+8oFyI+oSXGtknrkeQv3PbXyeEe3KO5a/M61Uebo04Uwd4yCvdu6H0sF+YYA4bfFdanuFmrZvf9cZSwknQid+vOdzyGkTHTPFAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAKtPhYpfvn5OxP+BcChsWaQA4KZQj0THGdiAjHsvfjsgteFvhkzqZBkhKYtsAWV5tB5/GDl+o4c6PQJ2/TXhOJn3pSNaUzrCJIGtKS5DknbqTQxCwVlxyBtPHLAYWqKcPMlH282rw3VY0OYTL96XOgZ/WZjcN6A7ku+uWsNCql443FoWL+N3Gpaab45OyIluFUOH+yc0ToHNlP3iOpI3rVpi2xwmGrSyUKsGUma3nrBq7TWjkDE1E+oJoybaMNZzgXGIPSJC1HYIF1U8GSoFkZpAFxXecD0FinXWDRwUP6K54iti3i6a/Ox73WhwfI4mVCqsOy1WYWtKYhMVe6Kj4Nw=",
|
35
|
+
"provisioningState": "Succeeded"
|
36
|
+
},
|
37
|
+
"name": "ssl_certificate"
|
38
|
+
}
|
39
|
+
],
|
40
|
+
"frontendIPConfigurations": [
|
41
|
+
{
|
42
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/frontendIPConfigurations/frontend_ip_config",
|
43
|
+
"properties": {
|
44
|
+
"privateIPAllocationMethod": "Dynamic",
|
45
|
+
"publicIPAddress": {
|
46
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/ag_publicip-672835"
|
47
|
+
},
|
48
|
+
"provisioningState": "Succeeded"
|
49
|
+
},
|
50
|
+
"name": "frontend_ip_config"
|
51
|
+
}
|
52
|
+
],
|
53
|
+
"frontendPorts": [
|
54
|
+
{
|
55
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/frontendPorts/gateway_front_port",
|
56
|
+
"properties": {
|
57
|
+
"port": 443,
|
58
|
+
"provisioningState": "Succeeded"
|
59
|
+
},
|
60
|
+
"name": "gateway_front_port"
|
61
|
+
}
|
62
|
+
],
|
63
|
+
"probes": [],
|
64
|
+
"backendAddressPools": [
|
65
|
+
{
|
66
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/backendAddressPools/AG-BackEndAddressPool",
|
67
|
+
"properties": {
|
68
|
+
"backendAddresses": [
|
69
|
+
{
|
70
|
+
"ipAddress": "10.0.0.4"
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"ipAddress": "10.0.0.5"
|
74
|
+
}
|
75
|
+
],
|
76
|
+
"provisioningState": "Succeeded"
|
77
|
+
},
|
78
|
+
"name": "AG-BackEndAddressPool"
|
79
|
+
}
|
80
|
+
],
|
81
|
+
"backendHttpSettingsCollection": [
|
82
|
+
{
|
83
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/backendHttpSettingsCollection/gateway_settings",
|
84
|
+
"properties": {
|
85
|
+
"port": 80,
|
86
|
+
"protocol": "Http",
|
87
|
+
"cookieBasedAffinity": "Enabled",
|
88
|
+
"requestTimeout": 30,
|
89
|
+
"provisioningState": "Succeeded"
|
90
|
+
},
|
91
|
+
"name": "gateway_settings"
|
92
|
+
}
|
93
|
+
],
|
94
|
+
"httpListeners": [
|
95
|
+
{
|
96
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/httpListeners/gateway_listener",
|
97
|
+
"properties": {
|
98
|
+
"frontendIPConfiguration": {
|
99
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/frontendIPConfigurations/frontend_ip_config"
|
100
|
+
},
|
101
|
+
"frontendPort": {
|
102
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/frontendPorts/gateway_front_port"
|
103
|
+
},
|
104
|
+
"protocol": "Https",
|
105
|
+
"sslCertificate": {
|
106
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/sslCertificates/ssl_certificate"
|
107
|
+
},
|
108
|
+
"requireServerNameIndication": false,
|
109
|
+
"provisioningState": "Succeeded"
|
110
|
+
},
|
111
|
+
"name": "gateway_listener"
|
112
|
+
}
|
113
|
+
],
|
114
|
+
"urlPathMaps": [],
|
115
|
+
"requestRoutingRules": [
|
116
|
+
{
|
117
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/requestRoutingRules/gateway_request_route_rule",
|
118
|
+
"properties": {
|
119
|
+
"ruleType": "Basic",
|
120
|
+
"backendAddressPool": {
|
121
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/backendAddressPools/AG-BackEndAddressPool"
|
122
|
+
},
|
123
|
+
"backendHttpSettings": {
|
124
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/backendHttpSettingsCollection/gateway_settings"
|
125
|
+
},
|
126
|
+
"httpListener": {
|
127
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/httpListeners/gateway_listener"
|
128
|
+
},
|
129
|
+
"provisioningState": "Succeeded"
|
130
|
+
},
|
131
|
+
"name": "gateway_request_route_rule"
|
132
|
+
}
|
133
|
+
],
|
134
|
+
"resourceGuid": "b3db5ebf-10f8-4666-9596-d1459530f64b",
|
135
|
+
"provisioningState": "Succeeded"
|
136
|
+
}
|
137
|
+
}'
|
138
|
+
gateway_mapper = Azure::ARM::Network::Models::ApplicationGateway.mapper
|
139
|
+
gateway_client.deserialize(gateway_mapper, Fog::JSON.decode(response), 'result.body')
|
140
|
+
end
|
141
|
+
|
142
|
+
def self.gateway_params
|
143
|
+
gateway_ip_configurations = ApiStub::Requests::ApplicationGateway::Gateway.gateway_ip_configurations
|
144
|
+
frontend_ip_configurations = ApiStub::Requests::ApplicationGateway::Gateway.frontend_ip_configurations
|
145
|
+
frontend_ports = ApiStub::Requests::ApplicationGateway::Gateway.frontend_ports
|
146
|
+
backend_address_pools = ApiStub::Requests::ApplicationGateway::Gateway.backend_address_pools
|
147
|
+
backend_http_settings_list = ApiStub::Requests::ApplicationGateway::Gateway.backend_http_settings_list
|
148
|
+
http_listeners = ApiStub::Requests::ApplicationGateway::Gateway.http_listeners
|
149
|
+
request_routing_rules = ApiStub::Requests::ApplicationGateway::Gateway.request_routing_rules
|
150
|
+
params = {
|
151
|
+
name: 'gateway',
|
152
|
+
location: 'East US',
|
153
|
+
resource_group: 'fogRM-rg',
|
154
|
+
sku_name: 'Standard_Medium',
|
155
|
+
sku_tier: 'Standard',
|
156
|
+
sku_capacity: 2,
|
157
|
+
gateway_ip_configurations: gateway_ip_configurations,
|
158
|
+
ssl_certificates: ssl_certificates,
|
159
|
+
frontend_ip_configurations: frontend_ip_configurations,
|
160
|
+
frontend_ports: frontend_ports,
|
161
|
+
probes: probes,
|
162
|
+
backend_address_pools: backend_address_pools,
|
163
|
+
backend_http_settings_list: backend_http_settings_list,
|
164
|
+
http_listeners: http_listeners,
|
165
|
+
url_path_maps: url_path_maps,
|
166
|
+
request_routing_rules: request_routing_rules
|
167
|
+
}
|
168
|
+
params
|
169
|
+
end
|
170
|
+
|
171
|
+
def self.list_application_gateway_response(gateway_client)
|
172
|
+
response = '{
|
173
|
+
"value": [{
|
174
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway",
|
175
|
+
"name": "gateway",
|
176
|
+
"type": "Microsoft.Network/applicationGateways",
|
177
|
+
"location": "eastus",
|
178
|
+
"properties": {
|
179
|
+
"sku": {
|
180
|
+
"name": "Standard_Medium",
|
181
|
+
"tier": "Standard",
|
182
|
+
"capacity": 2
|
183
|
+
},
|
184
|
+
"gatewayIPConfigurations": [
|
185
|
+
{
|
186
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/gatewayIPConfigurations/ag-GatewayIP",
|
187
|
+
"properties": {
|
188
|
+
"subnet": {
|
189
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/vnet/subnets/GatewaySubnet"
|
190
|
+
},
|
191
|
+
"provisioningState": "Succeeded"
|
192
|
+
},
|
193
|
+
"name": "ag-GatewayIP"
|
194
|
+
}
|
195
|
+
],
|
196
|
+
"sslCertificates": [
|
197
|
+
{
|
198
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/sslCertificates/ssl_certificate",
|
199
|
+
"properties": {
|
200
|
+
"publicCertData": "MIIDiDCCAnACCQCwYkR0Mxy+QTANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCUEsxDzANBgNVBAgTBlB1bmphYjEPMA0GA1UEBxMGTGFob3JlMQ8wDQYDVQQKEwZDb25maXoxDDAKBgNVBAsTA0RldjEPMA0GA1UEAxMGaGFpZGVyMSQwIgYJKoZIhvcNAQkBFhVoYWlkZXIuYWxpQGNvbmZpei5jb20wHhcNMTYwMzAyMTE0NTM2WhcNMTcwMzAyMTE0NTM2WjCBhTELMAkGA1UEBhMCUEsxDzANBgNVBAgTBlB1bmphYjEPMA0GA1UEBxMGTGFob3JlMQ8wDQYDVQQKEwZDb25maXoxDDAKBgNVBAsTA0RldjEPMA0GA1UEAxMGaGFpZGVyMSQwIgYJKoZIhvcNAQkBFhVoYWlkZXIuYWxpQGNvbmZpei5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCuJrPbvOG+4oXQRamkOALlpdK98m+atJue9zOcCCagY8IJI4quYL13d8VItmrZf7erA+siqpYlWEuk1+lmmUY7T4AWAL8mXeR2vc7hWF601WDUjeVPK19+IcC8emMLOlBpvjXC9nbvADLQuR0PGitfjCqFoG66EOqJmLDNBsyHWmy+qhb8J4WXitruNAJDPe/20h6L23vD6z4tvwBjh4zkrfskGlKCNcAuvG1NI0FAS8261Jvs3lf+8oFyI+oSXGtknrkeQv3PbXyeEe3KO5a/M61Uebo04Uwd4yCvdu6H0sF+YYA4bfFdanuFmrZvf9cZSwknQid+vOdzyGkTHTPFAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAKtPhYpfvn5OxP+BcChsWaQA4KZQj0THGdiAjHsvfjsgteFvhkzqZBkhKYtsAWV5tB5/GDl+o4c6PQJ2/TXhOJn3pSNaUzrCJIGtKS5DknbqTQxCwVlxyBtPHLAYWqKcPMlH282rw3VY0OYTL96XOgZ/WZjcN6A7ku+uWsNCql443FoWL+N3Gpaab45OyIluFUOH+yc0ToHNlP3iOpI3rVpi2xwmGrSyUKsGUma3nrBq7TWjkDE1E+oJoybaMNZzgXGIPSJC1HYIF1U8GSoFkZpAFxXecD0FinXWDRwUP6K54iti3i6a/Ox73WhwfI4mVCqsOy1WYWtKYhMVe6Kj4Nw=",
|
201
|
+
"provisioningState": "Succeeded"
|
202
|
+
},
|
203
|
+
"name": "ssl_certificate"
|
204
|
+
}
|
205
|
+
],
|
206
|
+
"frontendIPConfigurations": [
|
207
|
+
{
|
208
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/frontendIPConfigurations/frontend_ip_config",
|
209
|
+
"properties": {
|
210
|
+
"privateIPAllocationMethod": "Dynamic",
|
211
|
+
"publicIPAddress": {
|
212
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/ag_publicip-672835"
|
213
|
+
},
|
214
|
+
"provisioningState": "Succeeded"
|
215
|
+
},
|
216
|
+
"name": "frontend_ip_config"
|
217
|
+
}
|
218
|
+
],
|
219
|
+
"frontendPorts": [
|
220
|
+
{
|
221
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/frontendPorts/gateway_front_port",
|
222
|
+
"properties": {
|
223
|
+
"port": 443,
|
224
|
+
"provisioningState": "Succeeded"
|
225
|
+
},
|
226
|
+
"name": "gateway_front_port"
|
227
|
+
}
|
228
|
+
],
|
229
|
+
"probes": [],
|
230
|
+
"backendAddressPools": [
|
231
|
+
{
|
232
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/backendAddressPools/AG-BackEndAddressPool",
|
233
|
+
"properties": {
|
234
|
+
"backendAddresses": [
|
235
|
+
{
|
236
|
+
"ipAddress": "10.0.0.4"
|
237
|
+
},
|
238
|
+
{
|
239
|
+
"ipAddress": "10.0.0.5"
|
240
|
+
}
|
241
|
+
],
|
242
|
+
"provisioningState": "Succeeded"
|
243
|
+
},
|
244
|
+
"name": "AG-BackEndAddressPool"
|
245
|
+
}
|
246
|
+
],
|
247
|
+
"backendHttpSettingsCollection": [
|
248
|
+
{
|
249
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/backendHttpSettingsCollection/gateway_settings",
|
250
|
+
"properties": {
|
251
|
+
"port": 80,
|
252
|
+
"protocol": "Http",
|
253
|
+
"cookieBasedAffinity": "Enabled",
|
254
|
+
"requestTimeout": 30,
|
255
|
+
"provisioningState": "Succeeded"
|
256
|
+
},
|
257
|
+
"name": "gateway_settings"
|
258
|
+
}
|
259
|
+
],
|
260
|
+
"httpListeners": [
|
261
|
+
{
|
262
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/httpListeners/gateway_listener",
|
263
|
+
"properties": {
|
264
|
+
"frontendIPConfiguration": {
|
265
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/frontendIPConfigurations/frontend_ip_config"
|
266
|
+
},
|
267
|
+
"frontendPort": {
|
268
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/frontendPorts/gateway_front_port"
|
269
|
+
},
|
270
|
+
"protocol": "Https",
|
271
|
+
"sslCertificate": {
|
272
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/sslCertificates/ssl_certificate"
|
273
|
+
},
|
274
|
+
"requireServerNameIndication": false,
|
275
|
+
"provisioningState": "Succeeded"
|
276
|
+
},
|
277
|
+
"name": "gateway_listener"
|
278
|
+
}
|
279
|
+
],
|
280
|
+
"urlPathMaps": [],
|
281
|
+
"requestRoutingRules": [
|
282
|
+
{
|
283
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/requestRoutingRules/gateway_request_route_rule",
|
284
|
+
"properties": {
|
285
|
+
"ruleType": "Basic",
|
286
|
+
"backendAddressPool": {
|
287
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/backendAddressPools/AG-BackEndAddressPool"
|
288
|
+
},
|
289
|
+
"backendHttpSettings": {
|
290
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/backendHttpSettingsCollection/gateway_settings"
|
291
|
+
},
|
292
|
+
"httpListener": {
|
293
|
+
"id": "/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/httpListeners/gateway_listener"
|
294
|
+
},
|
295
|
+
"provisioningState": "Succeeded"
|
296
|
+
},
|
297
|
+
"name": "gateway_request_route_rule"
|
298
|
+
}
|
299
|
+
],
|
300
|
+
"resourceGuid": "b3db5ebf-10f8-4666-9596-d1459530f64b",
|
301
|
+
"provisioningState": "Succeeded"
|
302
|
+
}
|
303
|
+
}]
|
304
|
+
}'
|
305
|
+
gateway_list_mapper = Azure::ARM::Network::Models::ApplicationGatewayListResult.mapper
|
306
|
+
gateway_client.deserialize(gateway_list_mapper, Fog::JSON.decode(response), 'result.body')
|
307
|
+
end
|
308
|
+
|
309
|
+
def self.delete_application_gateway_response
|
310
|
+
MsRestAzure::AzureOperationResponse.new(MsRest::HttpOperationRequest.new('', '', ''), Faraday::Response.new)
|
311
|
+
end
|
312
|
+
|
313
|
+
def self.gateway_ip_configurations
|
314
|
+
gateway_ip_config =
|
315
|
+
[
|
316
|
+
{
|
317
|
+
name: 'gatewayIpConfigName',
|
318
|
+
subnet_id: '/subscriptions/{guid}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnetName'
|
319
|
+
}
|
320
|
+
]
|
321
|
+
gateway_ip_config
|
322
|
+
end
|
323
|
+
|
324
|
+
def self.ssl_certificates
|
325
|
+
certificates =
|
326
|
+
[
|
327
|
+
{
|
328
|
+
name: 'certificate',
|
329
|
+
data: 'data',
|
330
|
+
password: '123',
|
331
|
+
public_cert_data: 'MIIDiDCCAnACCQCwYkR0Mxy+QTANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCUEsxDzANBgNVBAgTBlB1bmphYjEPMA0GA1UEBxMGTGFob3JlMQ8wDQYDVQQKEwZDb25maXoxDDAKBgNVBAsTA0RldjEPMA0GA1UEAxMGaGFpZGVyMSQwIgYJKoZIhvcNAQkBFhVoYWlkZXIuYWxpQGNvbmZpei5jb20wHhcNMTYwMzAyMTE0NTM2WhcNMTcwMzAyMTE0NTM2WjCBhTELMAkGA1UEBhMCUEsxDzANBgNVBAgTBlB1bmphYjEPMA0GA1UEBxMGTGFob3JlMQ8wDQYDVQQKEwZDb25maXoxDDAKBgNVBAsTA0RldjEPMA0GA1UEAxMGaGFpZGVyMSQwIgYJKoZIhvcNAQkBFhVoYWlkZXIuYWxpQGNvbmZpei5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCuJrPbvOG+4oXQRamkOALlpdK98m+atJue9zOcCCagY8IJI4quYL13d8VItmrZf7erA+siqpYlWEuk1+lmmUY7T4AWAL8mXeR2vc7hWF601WDUjeVPK19+IcC8emMLOlBpvjXC9nbvADLQuR0PGitfjCqFoG66EOqJmLDNBsyHWmy+qhb8J4WXitruNAJDPe/20h6L23vD6z4tvwBjh4zkrfskGlKCNcAuvG1NI0FAS8261Jvs3lf+8oFyI+oSXGtknrkeQv3PbXyeEe3KO5a/M61Uebo04Uwd4yCvdu6H0sF+YYA4bfFdanuFmrZvf9cZSwknQid+vOdzyGkTHTPFAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAKtPhYpfvn5OxP+BcChsWaQA4KZQj0THGdiAjHsvfjsgteFvhkzqZBkhKYtsAWV5tB5/GDl+o4c6PQJ2/TXhOJn3pSNaUzrCJIGtKS5DknbqTQxCwVlxyBtPHLAYWqKcPMlH282rw3VY0OYTL96XOgZ/WZjcN6A7ku+uWsNCql443FoWL+N3Gpaab45OyIluFUOH+yc0ToHNlP3iOpI3rVpi2xwmGrSyUKsGUma3nrBq7TWjkDE1E+oJoybaMNZzgXGIPSJC1HYIF1U8GSoFkZpAFxXecD0FinXWDRwUP6K54iti3i6a/Ox73WhwfI4mVCqsOy1WYWtKYhMVe6Kj4Nw='
|
332
|
+
}
|
333
|
+
]
|
334
|
+
certificates
|
335
|
+
end
|
336
|
+
|
337
|
+
def self.frontend_ip_configurations
|
338
|
+
frontend_ip_config =
|
339
|
+
[
|
340
|
+
{
|
341
|
+
name: 'frontendIpConfig',
|
342
|
+
private_ip_allocation_method: 'Dynamic',
|
343
|
+
public_ip_address_id: '/subscriptions/{guid}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/publicIp',
|
344
|
+
private_ip_address: '10.0.1.5'
|
345
|
+
}
|
346
|
+
]
|
347
|
+
frontend_ip_config
|
348
|
+
end
|
349
|
+
|
350
|
+
def self.frontend_ports
|
351
|
+
ports =
|
352
|
+
[
|
353
|
+
{
|
354
|
+
name: 'frontendPort',
|
355
|
+
port: 443
|
356
|
+
}
|
357
|
+
]
|
358
|
+
ports
|
359
|
+
end
|
360
|
+
|
361
|
+
def self.probes
|
362
|
+
probes =
|
363
|
+
[
|
364
|
+
{
|
365
|
+
name: 'probe1',
|
366
|
+
protocol: 'tcp',
|
367
|
+
host: 'localhost',
|
368
|
+
path: '/usr/',
|
369
|
+
interval: 30,
|
370
|
+
timeout: 20,
|
371
|
+
unhealthy_threshold: 20
|
372
|
+
}
|
373
|
+
]
|
374
|
+
probes
|
375
|
+
end
|
376
|
+
|
377
|
+
def self.backend_address_pools
|
378
|
+
address_pool =
|
379
|
+
[
|
380
|
+
{
|
381
|
+
name: 'backendAddressPool',
|
382
|
+
ip_addresses: [
|
383
|
+
{
|
384
|
+
ipAddress: '10.0.1.6'
|
385
|
+
}
|
386
|
+
]
|
387
|
+
}
|
388
|
+
]
|
389
|
+
address_pool
|
390
|
+
end
|
391
|
+
|
392
|
+
def self.backend_http_settings_list
|
393
|
+
http_setting =
|
394
|
+
[
|
395
|
+
{
|
396
|
+
name: 'gateway_settings',
|
397
|
+
port: 80,
|
398
|
+
protocol: 'Http',
|
399
|
+
cookie_based_affinity: 'Enabled',
|
400
|
+
request_timeout: '30',
|
401
|
+
probe: ''
|
402
|
+
}
|
403
|
+
]
|
404
|
+
http_setting
|
405
|
+
end
|
406
|
+
|
407
|
+
def self.http_listeners
|
408
|
+
listener =
|
409
|
+
[
|
410
|
+
{
|
411
|
+
name: 'gateway_listener',
|
412
|
+
frontend_ip_config_id: '/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/frontendIPConfigurations/frontend_ip_config',
|
413
|
+
frontend_port_id: '/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/frontendPorts/gateway_front_port',
|
414
|
+
protocol: 'Https',
|
415
|
+
host_name: '',
|
416
|
+
ssl_certificate_id: '/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/sslCertificates/ssl_certificate',
|
417
|
+
require_server_name_indication: 'false'
|
418
|
+
}
|
419
|
+
]
|
420
|
+
listener
|
421
|
+
end
|
422
|
+
|
423
|
+
def self.url_path_maps
|
424
|
+
path_map =
|
425
|
+
[
|
426
|
+
{
|
427
|
+
name: 'map1',
|
428
|
+
default_backend_address_pool_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/backendAddressPools/AG-BackEndAddressPool',
|
429
|
+
default_backend_http_settings_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/backendHttpSettingsCollection/gateway_settings',
|
430
|
+
path_rules: [
|
431
|
+
{
|
432
|
+
backend_address_pool_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/backendAddressPools/AG-BackEndAddressPool',
|
433
|
+
backend_http_settings_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/backendHttpSettingsCollection/gateway_settings',
|
434
|
+
paths: [
|
435
|
+
%w(/usr /etc)
|
436
|
+
]
|
437
|
+
}
|
438
|
+
]
|
439
|
+
}
|
440
|
+
]
|
441
|
+
path_map
|
442
|
+
end
|
443
|
+
|
444
|
+
def self.request_routing_rules
|
445
|
+
routing_rule =
|
446
|
+
[
|
447
|
+
{
|
448
|
+
name: 'gateway_request_route_rule',
|
449
|
+
type: 'Basic',
|
450
|
+
http_listener_id: '/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/httpListeners/gateway_listener',
|
451
|
+
backend_address_pool_id: '/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/backendAddressPools/AG-BackEndAddressPool',
|
452
|
+
backend_http_settings_id: '/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/gateway/backendHttpSettingsCollection/gateway_settings',
|
453
|
+
url_path_map: ''
|
454
|
+
}
|
455
|
+
]
|
456
|
+
routing_rule
|
457
|
+
end
|
458
|
+
end
|
459
|
+
end
|
460
|
+
end
|
461
|
+
end
|