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,30 @@
|
|
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, :traffic_manager_profile_name
|
12
|
+
|
13
|
+
end_points = service.get_traffic_manager_profile(resource_group, traffic_manager_profile_name).endpoints
|
14
|
+
traffic_manager_endpoints = end_points.map { |endpoint| Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.parse(endpoint) }
|
15
|
+
load(traffic_manager_endpoints)
|
16
|
+
end
|
17
|
+
|
18
|
+
def get(resource_group, traffic_manager_profile_name, end_point_name, type)
|
19
|
+
endpoint = service.get_traffic_manager_end_point(resource_group, traffic_manager_profile_name, end_point_name, type)
|
20
|
+
endpoint_fog = Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.new(service: service)
|
21
|
+
endpoint_fog.merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.parse(endpoint))
|
22
|
+
end
|
23
|
+
|
24
|
+
def check_traffic_manager_endpoint_exists(resource_group, traffic_manager_profile_name, end_point_name, type)
|
25
|
+
service.check_traffic_manager_endpoint_exists(resource_group, traffic_manager_profile_name, end_point_name, type)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,88 @@
|
|
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
|
+
traffic_manager_profile = get_hash_from_object(profile)
|
23
|
+
|
24
|
+
if profile.dns_config
|
25
|
+
traffic_manager_profile['relative_name'] = profile.dns_config.relative_name
|
26
|
+
traffic_manager_profile['fqdn'] = profile.dns_config.fqdn
|
27
|
+
traffic_manager_profile['ttl'] = profile.dns_config.ttl
|
28
|
+
end
|
29
|
+
|
30
|
+
if profile.monitor_config
|
31
|
+
traffic_manager_profile['profile_monitor_status'] = profile.monitor_config.profile_monitor_status
|
32
|
+
traffic_manager_profile['protocol'] = profile.monitor_config.protocol
|
33
|
+
traffic_manager_profile['port'] = profile.monitor_config.port
|
34
|
+
traffic_manager_profile['path'] = profile.monitor_config.path
|
35
|
+
end
|
36
|
+
traffic_manager_profile['resource_group'] = get_resource_group_from_id(profile.id)
|
37
|
+
traffic_manager_profile['endpoints'] = []
|
38
|
+
profile.endpoints.each do |endpoint|
|
39
|
+
end_point = Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.new
|
40
|
+
traffic_manager_profile['endpoints'] << end_point.merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.parse(endpoint))
|
41
|
+
end
|
42
|
+
traffic_manager_profile
|
43
|
+
end
|
44
|
+
|
45
|
+
def save
|
46
|
+
requires :name, :resource_group, :traffic_routing_method, :relative_name, :ttl,
|
47
|
+
:protocol, :port, :path
|
48
|
+
traffic_manager_profile = service.create_or_update_traffic_manager_profile(traffic_manager_profile_hash)
|
49
|
+
merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerProfile.parse(traffic_manager_profile))
|
50
|
+
end
|
51
|
+
|
52
|
+
def destroy
|
53
|
+
service.delete_traffic_manager_profile(resource_group, name)
|
54
|
+
end
|
55
|
+
|
56
|
+
def update(profile_params)
|
57
|
+
validate_input(profile_params)
|
58
|
+
profile_params[:endpoints] = endpoints.map { |endpoint| get_hash_from_object(endpoint)['attributes'] }
|
59
|
+
merge_attributes(profile_params)
|
60
|
+
profile = service.create_or_update_traffic_manager_profile(traffic_manager_profile_hash)
|
61
|
+
merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerProfile.parse(profile))
|
62
|
+
end
|
63
|
+
|
64
|
+
private
|
65
|
+
|
66
|
+
def validate_input(attr_hash)
|
67
|
+
invalid_attr = [:resource_group, :name, :relative_name, :id]
|
68
|
+
result = invalid_attr & attr_hash.keys
|
69
|
+
raise 'Cannot modify the given attribute' unless result.empty?
|
70
|
+
end
|
71
|
+
|
72
|
+
def traffic_manager_profile_hash
|
73
|
+
{
|
74
|
+
resource_group: resource_group,
|
75
|
+
name: name,
|
76
|
+
traffic_routing_method: traffic_routing_method,
|
77
|
+
relative_name: relative_name,
|
78
|
+
ttl: ttl,
|
79
|
+
protocol: protocol,
|
80
|
+
port: port,
|
81
|
+
path: path,
|
82
|
+
endpoints: endpoints
|
83
|
+
}
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,27 @@
|
|
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 = service.list_traffic_manager_profiles(resource_group).map { |profile| Fog::TrafficManager::AzureRM::TrafficManagerProfile.parse(profile) }
|
12
|
+
load(traffic_manager_profiles)
|
13
|
+
end
|
14
|
+
|
15
|
+
def get(resource_group, traffic_manager_profile_name)
|
16
|
+
profile = service.get_traffic_manager_profile(resource_group, traffic_manager_profile_name)
|
17
|
+
profile_fog = Fog::TrafficManager::AzureRM::TrafficManagerProfile.new(service: service)
|
18
|
+
profile_fog.merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerProfile.parse(profile))
|
19
|
+
end
|
20
|
+
|
21
|
+
def check_traffic_manager_profile_exists(resource_group, traffic_manager_profile_name)
|
22
|
+
service.check_traffic_manager_profile_exists(resource_group, traffic_manager_profile_name)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,178 @@
|
|
1
|
+
module Fog
|
2
|
+
module Network
|
3
|
+
# Fog Service Class for AzureRM
|
4
|
+
class AzureRM < Fog::Service
|
5
|
+
requires :tenant_id
|
6
|
+
requires :client_id
|
7
|
+
requires :client_secret
|
8
|
+
requires :subscription_id
|
9
|
+
recognizes :environment
|
10
|
+
|
11
|
+
request_path 'fog/azurerm/requests/network'
|
12
|
+
request :create_or_update_virtual_network
|
13
|
+
request :get_virtual_network
|
14
|
+
request :add_dns_servers_in_virtual_network
|
15
|
+
request :remove_dns_servers_from_virtual_network
|
16
|
+
request :add_address_prefixes_in_virtual_network
|
17
|
+
request :remove_subnets_from_virtual_network
|
18
|
+
request :remove_address_prefixes_from_virtual_network
|
19
|
+
request :add_subnets_in_virtual_network
|
20
|
+
request :delete_virtual_network
|
21
|
+
request :list_virtual_networks
|
22
|
+
request :list_virtual_networks_in_subscription
|
23
|
+
request :check_virtual_network_exists
|
24
|
+
request :create_or_update_public_ip
|
25
|
+
request :delete_public_ip
|
26
|
+
request :get_public_ip
|
27
|
+
request :list_public_ips
|
28
|
+
request :check_public_ip_exists
|
29
|
+
request :create_subnet
|
30
|
+
request :attach_network_security_group_to_subnet
|
31
|
+
request :detach_network_security_group_from_subnet
|
32
|
+
request :attach_route_table_to_subnet
|
33
|
+
request :detach_route_table_from_subnet
|
34
|
+
request :list_subnets
|
35
|
+
request :get_subnet
|
36
|
+
request :get_available_ipaddresses_count
|
37
|
+
request :delete_subnet
|
38
|
+
request :check_subnet_exists
|
39
|
+
request :create_or_update_network_interface
|
40
|
+
request :delete_network_interface
|
41
|
+
request :list_network_interfaces
|
42
|
+
request :get_network_interface
|
43
|
+
request :check_network_interface_exists
|
44
|
+
request :attach_resource_to_nic
|
45
|
+
request :detach_resource_from_nic
|
46
|
+
request :create_load_balancer
|
47
|
+
request :delete_load_balancer
|
48
|
+
request :list_load_balancers
|
49
|
+
request :get_load_balancer
|
50
|
+
request :check_load_balancer_exists
|
51
|
+
request :list_load_balancers_in_subscription
|
52
|
+
request :create_or_update_network_security_group
|
53
|
+
request :delete_network_security_group
|
54
|
+
request :list_network_security_groups
|
55
|
+
request :get_network_security_group
|
56
|
+
request :check_net_sec_group_exists
|
57
|
+
request :add_security_rules
|
58
|
+
request :remove_security_rule
|
59
|
+
request :delete_virtual_network_gateway
|
60
|
+
request :create_or_update_virtual_network_gateway
|
61
|
+
request :list_virtual_network_gateways
|
62
|
+
request :get_virtual_network_gateway
|
63
|
+
request :check_vnet_gateway_exists
|
64
|
+
request :create_or_update_express_route_circuit
|
65
|
+
request :delete_express_route_circuit
|
66
|
+
request :get_express_route_circuit
|
67
|
+
request :list_express_route_circuits
|
68
|
+
request :check_express_route_circuit_exists
|
69
|
+
request :create_or_update_express_route_circuit_peering
|
70
|
+
request :delete_express_route_circuit_peering
|
71
|
+
request :get_express_route_circuit_peering
|
72
|
+
request :list_express_route_circuit_peerings
|
73
|
+
request :create_or_update_express_route_circuit_authorization
|
74
|
+
request :delete_express_route_circuit_authorization
|
75
|
+
request :get_express_route_circuit_authorization
|
76
|
+
request :list_express_route_circuit_authorizations
|
77
|
+
request :check_express_route_cir_auth_exists
|
78
|
+
request :list_express_route_service_providers
|
79
|
+
request :create_or_update_local_network_gateway
|
80
|
+
request :delete_local_network_gateway
|
81
|
+
request :get_local_network_gateway
|
82
|
+
request :list_local_network_gateways
|
83
|
+
request :check_local_net_gateway_exists
|
84
|
+
request :create_or_update_virtual_network_gateway_connection
|
85
|
+
request :delete_virtual_network_gateway_connection
|
86
|
+
request :get_virtual_network_gateway_connection
|
87
|
+
request :list_virtual_network_gateway_connections
|
88
|
+
request :check_vnet_gateway_connection_exists
|
89
|
+
request :get_connection_shared_key
|
90
|
+
request :reset_connection_shared_key
|
91
|
+
request :set_connection_shared_key
|
92
|
+
request :create_or_update_network_security_rule
|
93
|
+
request :delete_network_security_rule
|
94
|
+
request :get_network_security_rule
|
95
|
+
request :list_network_security_rules
|
96
|
+
request :check_net_sec_rule_exists
|
97
|
+
|
98
|
+
model_path 'fog/azurerm/models/network'
|
99
|
+
model :virtual_network
|
100
|
+
collection :virtual_networks
|
101
|
+
model :public_ip
|
102
|
+
collection :public_ips
|
103
|
+
model :subnet
|
104
|
+
collection :subnets
|
105
|
+
model :network_interface
|
106
|
+
collection :network_interfaces
|
107
|
+
model :load_balancer
|
108
|
+
collection :load_balancers
|
109
|
+
model :frontend_ip_configuration
|
110
|
+
model :inbound_nat_pool
|
111
|
+
model :inbound_nat_rule
|
112
|
+
model :load_balancing_rule
|
113
|
+
model :probe
|
114
|
+
model :network_security_group
|
115
|
+
collection :network_security_groups
|
116
|
+
model :network_security_rule
|
117
|
+
collection :network_security_rules
|
118
|
+
model :path_rule
|
119
|
+
model :vpn_client_configuration
|
120
|
+
model :vpn_client_revoked_certificates
|
121
|
+
model :vpn_client_root_certificates
|
122
|
+
model :virtual_network_gateway
|
123
|
+
collection :virtual_network_gateways
|
124
|
+
model :express_route_circuit
|
125
|
+
collection :express_route_circuits
|
126
|
+
model :express_route_circuit_peering
|
127
|
+
collection :express_route_circuit_peerings
|
128
|
+
model :express_route_circuit_authorization
|
129
|
+
collection :express_route_circuit_authorizations
|
130
|
+
model :express_route_service_provider
|
131
|
+
collection :express_route_service_providers
|
132
|
+
model :local_network_gateway
|
133
|
+
collection :local_network_gateways
|
134
|
+
model :virtual_network_gateway_connection
|
135
|
+
collection :virtual_network_gateway_connections
|
136
|
+
|
137
|
+
# Mock class for Network Service
|
138
|
+
class Mock
|
139
|
+
def initialize(_options = {})
|
140
|
+
begin
|
141
|
+
require 'azure_mgmt_network'
|
142
|
+
rescue LoadError => e
|
143
|
+
retry if require('rubygems')
|
144
|
+
raise e.message
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# Real class for Network Service
|
150
|
+
class Real
|
151
|
+
def initialize(options)
|
152
|
+
begin
|
153
|
+
require 'azure_mgmt_network'
|
154
|
+
require 'yaml'
|
155
|
+
rescue LoadError => e
|
156
|
+
retry if require('rubygems')
|
157
|
+
raise e.message
|
158
|
+
end
|
159
|
+
|
160
|
+
options[:environment] = 'AzureCloud' if options[:environment].nil?
|
161
|
+
|
162
|
+
credentials = Fog::Credentials::AzureRM.get_credentials(options[:tenant_id], options[:client_id], options[:client_secret], options[:environment])
|
163
|
+
telemetry = "fog-azure-rm/#{Fog::AzureRM::VERSION}"
|
164
|
+
@network_client = ::Azure::ARM::Network::NetworkManagementClient.new(credentials, resource_manager_endpoint_url(options[:environment]))
|
165
|
+
@network_client.subscription_id = options[:subscription_id]
|
166
|
+
@network_client.add_user_agent_information(telemetry)
|
167
|
+
@tenant_id = options[:tenant_id]
|
168
|
+
@client_id = options[:client_id]
|
169
|
+
@client_secret = options[:client_secret]
|
170
|
+
@subscription_id = options[:subscription_id]
|
171
|
+
@environment = options[:environment]
|
172
|
+
current_directory = File.dirname(__FILE__)
|
173
|
+
@logger_messages = YAML.load_file("#{current_directory}/utilities/logger_messages.yml")
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Fog
|
2
|
+
module ApplicationGateway
|
3
|
+
class AzureRM
|
4
|
+
# This class provides the actual implementation for service calls.
|
5
|
+
class Real
|
6
|
+
def check_ag_exists(resource_group_name, application_gateway_name)
|
7
|
+
msg = "Checking Application Gateway: #{application_gateway_name}"
|
8
|
+
Fog::Logger.debug msg
|
9
|
+
begin
|
10
|
+
@network_client.application_gateways.get(resource_group_name, application_gateway_name)
|
11
|
+
Fog::Logger.debug "Application Gateway #{application_gateway_name} exists."
|
12
|
+
true
|
13
|
+
rescue MsRestAzure::AzureOperationError => e
|
14
|
+
if e.body['error']['code'] == 'ResourceNotFound'
|
15
|
+
Fog::Logger.debug "Application Gateway #{application_gateway_name} doesn't exist."
|
16
|
+
false
|
17
|
+
else
|
18
|
+
raise_azure_exception(e, msg)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
# This class provides the mock implementation for unit tests.
|
24
|
+
class Mock
|
25
|
+
def check_ag_exists(*)
|
26
|
+
true
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,301 @@
|
|
1
|
+
module Fog
|
2
|
+
module ApplicationGateway
|
3
|
+
class AzureRM
|
4
|
+
# Real class for Application Gateway Request
|
5
|
+
class Real
|
6
|
+
def create_or_update_application_gateway(gateway_params)
|
7
|
+
msg = "Creating/Updated Application Gateway: #{gateway_params[:name]} in Resource Group: #{gateway_params[:resource_group]}."
|
8
|
+
Fog::Logger.debug msg
|
9
|
+
gateway = define_application_gateway(gateway_params)
|
10
|
+
begin
|
11
|
+
gateway_obj = @network_client.application_gateways.create_or_update(gateway_params[:resource_group], gateway_params[:name], gateway)
|
12
|
+
rescue MsRestAzure::AzureOperationError => e
|
13
|
+
raise_azure_exception(e, msg)
|
14
|
+
end
|
15
|
+
Fog::Logger.debug "Application Gateway #{gateway_params[:name]} created/updated successfully."
|
16
|
+
gateway_obj
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def define_application_gateway(gateway_params)
|
22
|
+
application_gateway = Azure::ARM::Network::Models::ApplicationGateway.new
|
23
|
+
application_gateway.name = gateway_params[:name]
|
24
|
+
application_gateway.location = gateway_params[:location]
|
25
|
+
|
26
|
+
application_gateway.gateway_ipconfigurations = define_gateway_ip_configuration(gateway_params[:gateway_ip_configurations]) if gateway_params[:gateway_ip_configurations]
|
27
|
+
application_gateway.ssl_certificates = define_ssl_certificate(gateway_params[:ssl_certificates]) if gateway_params[:ssl_certificates]
|
28
|
+
application_gateway.frontend_ipconfigurations = define_frontend_ip_configurations(gateway_params[:frontend_ip_configurations]) if gateway_params[:frontend_ip_configurations]
|
29
|
+
application_gateway.frontend_ports = define_frontend_ports(gateway_params[:frontend_ports]) if gateway_params[:frontend_ports]
|
30
|
+
application_gateway.probes = define_probes(gateway_params[:probes]) if gateway_params[:probes]
|
31
|
+
application_gateway.backend_address_pools = define_backend_address_pools(gateway_params[:backend_address_pools]) if gateway_params[:backend_address_pools]
|
32
|
+
application_gateway.backend_http_settings_collection = define_backend_http_settings(gateway_params[:backend_http_settings_list]) if gateway_params[:backend_http_settings_list]
|
33
|
+
application_gateway.http_listeners = define_http_listeners(gateway_params[:http_listeners]) if gateway_params[:http_listeners]
|
34
|
+
application_gateway.url_path_maps = define_url_path_maps(gateway_params[:url_path_maps]) if gateway_params[:url_path_maps]
|
35
|
+
application_gateway.request_routing_rules = define_request_routing_rules(gateway_params[:request_routing_rules]) if gateway_params[:request_routing_rules]
|
36
|
+
|
37
|
+
gateway_sku = Azure::ARM::Network::Models::ApplicationGatewaySku.new
|
38
|
+
gateway_sku.name = gateway_params[:sku_name]
|
39
|
+
gateway_sku.tier = gateway_params[:sku_tier]
|
40
|
+
gateway_sku.capacity = gateway_params[:sku_capacity]
|
41
|
+
application_gateway.sku = gateway_sku
|
42
|
+
|
43
|
+
application_gateway
|
44
|
+
end
|
45
|
+
|
46
|
+
def define_gateway_ip_configuration(gateway_ip_configurations)
|
47
|
+
gateway_ip_configuration_arr = []
|
48
|
+
gateway_ip_configurations.each do |ip_configuration|
|
49
|
+
configuration = Azure::ARM::Network::Models::ApplicationGatewayIPConfiguration.new
|
50
|
+
configuration.provisioning_state = ip_configuration[:provisioning_state]
|
51
|
+
if ip_configuration[:subnet_id]
|
52
|
+
subnet = Azure::ARM::Network::Models::Subnet.new
|
53
|
+
subnet.id = ip_configuration[:subnet_id]
|
54
|
+
configuration.subnet = subnet
|
55
|
+
end
|
56
|
+
|
57
|
+
configuration.name = ip_configuration[:name]
|
58
|
+
gateway_ip_configuration_arr.push(configuration)
|
59
|
+
end
|
60
|
+
gateway_ip_configuration_arr
|
61
|
+
end
|
62
|
+
|
63
|
+
def define_ssl_certificate(ssl_certificates)
|
64
|
+
ssl_certificate_arr = []
|
65
|
+
ssl_certificates.each do |ssl_certificate|
|
66
|
+
certificate = Azure::ARM::Network::Models::ApplicationGatewaySslCertificate.new
|
67
|
+
certificate.data = ssl_certificate[:data]
|
68
|
+
certificate.password = ssl_certificate[:password]
|
69
|
+
certificate.public_cert_data = ssl_certificate[:public_cert_data]
|
70
|
+
|
71
|
+
certificate.name = ssl_certificate[:name]
|
72
|
+
ssl_certificate_arr.push(ssl_certificate)
|
73
|
+
end
|
74
|
+
ssl_certificate_arr
|
75
|
+
end
|
76
|
+
|
77
|
+
def define_frontend_ip_configurations(frontend_ip_configurations)
|
78
|
+
frontend_ip_configuration_arr = []
|
79
|
+
frontend_ip_configurations.each do |fic|
|
80
|
+
frontend_ip_configuration = Azure::ARM::Network::Models::ApplicationGatewayFrontendIPConfiguration.new
|
81
|
+
|
82
|
+
frontend_ip_configuration.private_ipaddress = fic[:private_ip_address]
|
83
|
+
frontend_ip_configuration.private_ipallocation_method = fic[:private_ip_allocation_method]
|
84
|
+
|
85
|
+
if fic[:subnet_id]
|
86
|
+
subnet = Azure::ARM::Network::Models::Subnet.new
|
87
|
+
subnet.id = fic[:subnet_id]
|
88
|
+
frontend_ip_configuration.subnet = subnet
|
89
|
+
end
|
90
|
+
|
91
|
+
unless fic[:public_ip_address_id].nil?
|
92
|
+
pip = Azure::ARM::Network::Models::PublicIPAddress.new
|
93
|
+
pip.id = fic[:public_ip_address_id]
|
94
|
+
frontend_ip_configuration.public_ipaddress = pip
|
95
|
+
end
|
96
|
+
|
97
|
+
frontend_ip_configuration.name = fic[:name]
|
98
|
+
|
99
|
+
frontend_ip_configuration_arr.push(frontend_ip_configuration)
|
100
|
+
end
|
101
|
+
frontend_ip_configuration_arr
|
102
|
+
end
|
103
|
+
|
104
|
+
def define_frontend_ports(frontend_ports)
|
105
|
+
frontend_port_arr = []
|
106
|
+
frontend_ports.each do |port|
|
107
|
+
frontend_port = Azure::ARM::Network::Models::ApplicationGatewayFrontendPort.new
|
108
|
+
|
109
|
+
frontend_port.port = port[:port]
|
110
|
+
frontend_port.name = port[:name]
|
111
|
+
|
112
|
+
frontend_port_arr.push(frontend_port)
|
113
|
+
end
|
114
|
+
frontend_port_arr
|
115
|
+
end
|
116
|
+
|
117
|
+
def define_probes(probes)
|
118
|
+
probe_arr = []
|
119
|
+
probes.each do |probe|
|
120
|
+
ag_probe = Azure::ARM::Network::Models::ApplicationGatewayProbe.new
|
121
|
+
ag_probe.protocol = probe[:protocol]
|
122
|
+
ag_probe.host = probe[:host]
|
123
|
+
ag_probe.path = probe[:path]
|
124
|
+
ag_probe.interval = probe[:interval]
|
125
|
+
ag_probe.timeout = probe[:timeout]
|
126
|
+
ag_probe.unhealthy_threshold = probe[:unhealthy_threshold]
|
127
|
+
|
128
|
+
ag_probe.name = probe[:name]
|
129
|
+
probe_arr.push(ag_probe)
|
130
|
+
end
|
131
|
+
probe_arr
|
132
|
+
end
|
133
|
+
|
134
|
+
def define_backend_address_pools(backend_address_pools)
|
135
|
+
backend_address_pool_arr = []
|
136
|
+
|
137
|
+
backend_address_pools.each do |bap|
|
138
|
+
backend_pool = Azure::ARM::Network::Models::ApplicationGatewayBackendAddressPool.new
|
139
|
+
|
140
|
+
backend_addresses1 = bap[:ip_addresses]
|
141
|
+
addresses = []
|
142
|
+
backend_addresses1.each do |address|
|
143
|
+
backend_add = Azure::ARM::Network::Models::ApplicationGatewayBackendAddress.new
|
144
|
+
backend_add.ip_address = address[:ipAddress]
|
145
|
+
addresses.push(backend_add)
|
146
|
+
end
|
147
|
+
backend_pool.backend_addresses = addresses
|
148
|
+
|
149
|
+
backend_pool.name = bap[:name]
|
150
|
+
backend_address_pool_arr.push(backend_pool)
|
151
|
+
end
|
152
|
+
backend_address_pool_arr
|
153
|
+
end
|
154
|
+
|
155
|
+
def define_backend_http_settings(backend_http_settings_list)
|
156
|
+
backend_http_setting_arr = []
|
157
|
+
|
158
|
+
backend_http_settings_list.each do |http_setting|
|
159
|
+
backend_http_setting = Azure::ARM::Network::Models::ApplicationGatewayBackendHttpSettings.new
|
160
|
+
backend_http_setting.port = http_setting[:port]
|
161
|
+
backend_http_setting.protocol = http_setting[:protocol]
|
162
|
+
backend_http_setting.cookie_based_affinity = http_setting[:cookie_based_affinity]
|
163
|
+
backend_http_setting.request_timeout = http_setting[:request_timeout]
|
164
|
+
if http_setting[:probe]
|
165
|
+
probe = Azure::ARM::Network::Models::Probe.new
|
166
|
+
probe.id = http_setting[:probe]
|
167
|
+
backend_http_setting.probe = probe
|
168
|
+
end
|
169
|
+
|
170
|
+
backend_http_setting.name = http_setting[:name]
|
171
|
+
backend_http_setting_arr.push(backend_http_setting)
|
172
|
+
end
|
173
|
+
backend_http_setting_arr
|
174
|
+
end
|
175
|
+
|
176
|
+
def define_http_listeners(http_listeners)
|
177
|
+
http_listener_arr = []
|
178
|
+
|
179
|
+
http_listeners.each do |listener|
|
180
|
+
http_listener = Azure::ARM::Network::Models::ApplicationGatewayHttpListener.new
|
181
|
+
|
182
|
+
http_listener.protocol = listener[:protocol]
|
183
|
+
http_listener.host_name = listener[:host_name]
|
184
|
+
http_listener.require_server_name_indication = listener[:require_server_name_indication]
|
185
|
+
if listener[:frontend_ip_config_id]
|
186
|
+
frontend_ip = Azure::ARM::Network::Models::FrontendIPConfiguration.new
|
187
|
+
frontend_ip.id = listener[:frontend_ip_config_id]
|
188
|
+
http_listener.frontend_ipconfiguration = frontend_ip
|
189
|
+
end
|
190
|
+
if listener[:frontend_port_id]
|
191
|
+
frontend_port = Azure::ARM::Network::Models::ApplicationGatewayFrontendPort.new
|
192
|
+
frontend_port.id = listener[:frontend_port_id]
|
193
|
+
http_listener.frontend_port = frontend_port
|
194
|
+
end
|
195
|
+
if listener[:ssl_certificate_id]
|
196
|
+
ssl_cert = Azure::ARM::Network::Models::ApplicationGatewaySslCertificate.new
|
197
|
+
ssl_cert.id = listener[:ssl_certificate_id]
|
198
|
+
http_listener.ssl_certificate = ssl_cert
|
199
|
+
end
|
200
|
+
|
201
|
+
http_listener.name = listener[:name]
|
202
|
+
http_listener_arr.push(http_listener)
|
203
|
+
end
|
204
|
+
http_listener_arr
|
205
|
+
end
|
206
|
+
|
207
|
+
def define_url_path_maps(url_path_maps)
|
208
|
+
url_path_map_arr = []
|
209
|
+
|
210
|
+
url_path_maps.each do |map|
|
211
|
+
url_path_map = Azure::ARM::Network::Models::ApplicationGatewayUrlPathMap.new
|
212
|
+
|
213
|
+
if map[:default_backend_address_pool_id]
|
214
|
+
default_backend_address_pool = Azure::ARM::Network::Models::BackendAddressPool.new
|
215
|
+
default_backend_address_pool.id = map[:default_backend_address_pool_id]
|
216
|
+
url_path_map.default_backend_address_pool = default_backend_address_pool
|
217
|
+
end
|
218
|
+
if map[:default_backend_http_settings_id]
|
219
|
+
default_backend_http_setting = Azure::ARM::Network::Models::ApplicationGatewayBackendHttpSettings.new
|
220
|
+
default_backend_http_setting.id = map[:default_backend_http_settings_id]
|
221
|
+
url_path_map.default_backend_http_settings = default_backend_http_setting
|
222
|
+
end
|
223
|
+
|
224
|
+
if map[:path_rules]
|
225
|
+
path_rules = map[:path_rules]
|
226
|
+
path_rule_arr = define_path_rules(path_rules)
|
227
|
+
url_path_map.path_rules = path_rule_arr
|
228
|
+
end
|
229
|
+
|
230
|
+
url_path_map.name = map[:name]
|
231
|
+
url_path_map_arr.push(url_path_map)
|
232
|
+
end
|
233
|
+
url_path_map_arr
|
234
|
+
end
|
235
|
+
|
236
|
+
def define_path_rules(path_rules)
|
237
|
+
path_rule_arr = []
|
238
|
+
path_rules.each do |rule|
|
239
|
+
path_rule = Azure::ARM::Network::Models::ApplicationGatewayPathRule.new
|
240
|
+
if rule[:backend_address_pool_id]
|
241
|
+
backend_address_pool = Azure::ARM::Network::Models::BackendAddressPool.new
|
242
|
+
backend_address_pool.id = rule[:backend_address_pool_id]
|
243
|
+
path_rule.backend_address_pool = backend_address_pool
|
244
|
+
end
|
245
|
+
if rule[:backend_http_settings_id]
|
246
|
+
backend_http_setting = Azure::ARM::Network::Models::ApplicationGatewayBackendHttpSettings.new
|
247
|
+
backend_http_setting.id = rule[:backend_http_settings_id]
|
248
|
+
path_rule.backend_http_settings = backend_http_setting
|
249
|
+
end
|
250
|
+
path_urls = rule[:paths]
|
251
|
+
|
252
|
+
paths = []
|
253
|
+
path_urls.each do |url|
|
254
|
+
paths.push(url)
|
255
|
+
end
|
256
|
+
path_rule.paths = paths
|
257
|
+
|
258
|
+
path_rule.name = rule[:name]
|
259
|
+
path_rule_arr.push(path_rule)
|
260
|
+
end
|
261
|
+
path_rule_arr
|
262
|
+
end
|
263
|
+
|
264
|
+
def define_request_routing_rules(request_routing_rules)
|
265
|
+
request_routing_rule_arr = []
|
266
|
+
|
267
|
+
request_routing_rules.each do |rule|
|
268
|
+
request_routing_rule = Azure::ARM::Network::Models::ApplicationGatewayRequestRoutingRule.new
|
269
|
+
|
270
|
+
request_routing_rule.rule_type = rule[:type]
|
271
|
+
if rule[:http_listener_id]
|
272
|
+
http_listener = Azure::ARM::Network::Models::ApplicationGatewayHttpListener.new
|
273
|
+
http_listener.id = rule[:http_listener_id]
|
274
|
+
request_routing_rule.http_listener = http_listener
|
275
|
+
end
|
276
|
+
if rule[:backend_address_pool_id]
|
277
|
+
backend_address_pool = Azure::ARM::Network::Models::BackendAddressPool.new
|
278
|
+
backend_address_pool.id = rule[:backend_address_pool_id]
|
279
|
+
request_routing_rule.backend_address_pool = backend_address_pool
|
280
|
+
end
|
281
|
+
if rule[:backend_http_settings_id]
|
282
|
+
backend_http_setting = Azure::ARM::Network::Models::ApplicationGatewayBackendHttpSettings.new
|
283
|
+
backend_http_setting.id = rule[:backend_http_settings_id]
|
284
|
+
request_routing_rule.backend_http_settings = backend_http_setting
|
285
|
+
end
|
286
|
+
|
287
|
+
request_routing_rule.name = rule[:name]
|
288
|
+
request_routing_rule_arr.push(request_routing_rule)
|
289
|
+
end
|
290
|
+
request_routing_rule_arr
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
# Mock class for Network Request
|
295
|
+
class Mock
|
296
|
+
def create_or_update_application_gateway(*)
|
297
|
+
end
|
298
|
+
end
|
299
|
+
end
|
300
|
+
end
|
301
|
+
end
|