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,31 @@
|
|
1
|
+
require File.expand_path '../../test_helper', __dir__
|
2
|
+
|
3
|
+
# Test class for Check Traffic Manager Endpoint Exists
|
4
|
+
class TestCheckTrafficManagerEndpointExists < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@service = Fog::TrafficManager::AzureRM.new(credentials)
|
7
|
+
@traffic_manager_client = @service.instance_variable_get(:@traffic_mgmt_client)
|
8
|
+
@end_points = @traffic_manager_client.endpoints
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_check_traffic_manager_endpoint_exists_success
|
12
|
+
mocked_response = ApiStub::Requests::TrafficManager::TrafficManagerEndPoint.create_traffic_manager_endpoint_response(@traffic_manager_client)
|
13
|
+
@end_points.stub :get, mocked_response do
|
14
|
+
assert @service.check_traffic_manager_endpoint_exists('fog-test-rg', 'fog-test-profile', 'fog-test-endpoint-name', 'fog-test-endpoint-type')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_check_traffic_manager_endpoint_exists_failure
|
19
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'code' => 'NotFound' ) }
|
20
|
+
@end_points.stub :get, response do
|
21
|
+
assert !@service.check_traffic_manager_endpoint_exists('fog-test-rg', 'fog-test-profile', 'fog-test-endpoint-name', 'fog-test-endpoint-type')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_check_traffic_manager_endpoint_exists_exception
|
26
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception', 'code' => 'ResourceGroupNotFound' }) }
|
27
|
+
@end_points.stub :get, response do
|
28
|
+
assert_raises(RuntimeError) { @service.check_traffic_manager_endpoint_exists('fog-test-rg', 'fog-test-profile', 'fog-test-endpoint-name', 'fog-test-endpoint-type') }
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require File.expand_path '../../test_helper', __dir__
|
2
|
+
|
3
|
+
# Test class for Check Traffic Manager Profile Exists
|
4
|
+
class TestCheckTrafficManagerProfileExists < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@service = Fog::TrafficManager::AzureRM.new(credentials)
|
7
|
+
@traffic_manager_client = @service.instance_variable_get(:@traffic_mgmt_client)
|
8
|
+
@profiles = @traffic_manager_client.profiles
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_check_traffic_manager_profile_exists_success
|
12
|
+
mocked_response = ApiStub::Requests::TrafficManager::TrafficManagerProfile.create_traffic_manager_profile_response(@traffic_manager_client)
|
13
|
+
@profiles.stub :get, mocked_response do
|
14
|
+
assert @service.check_traffic_manager_profile_exists('fog-test-rg', 'fog-test-profile')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_check_traffic_manager_profile_exists_failure
|
19
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception', 'code' => 'ResourceNotFound' }) }
|
20
|
+
@profiles.stub :get, response do
|
21
|
+
assert !@service.check_traffic_manager_profile_exists('fog-test-rg', 'fog-test-profile')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_check_traffic_manager_profile_exists_exception
|
26
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception', 'code' => 'ResourceGroupNotFound' }) }
|
27
|
+
@profiles.stub :get, response do
|
28
|
+
assert_raises(RuntimeError) { @service.check_traffic_manager_profile_exists('fog-test-rg', 'fog-test-profile') }
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require File.expand_path '../../test_helper', __dir__
|
2
|
+
|
3
|
+
# Test class for Create Traffic Manager End Point
|
4
|
+
class TestCreateTrafficManagerEndPoint < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@service = Fog::TrafficManager::AzureRM.new(credentials)
|
7
|
+
@traffic_manager_client = @service.instance_variable_get(:@traffic_mgmt_client)
|
8
|
+
@end_points = @traffic_manager_client.endpoints
|
9
|
+
@endpoint_hash = ApiStub::Requests::TrafficManager::TrafficManagerEndPoint.endpoint_hash
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_create_traffic_manager_endpoint_success
|
13
|
+
mocked_response = ApiStub::Requests::TrafficManager::TrafficManagerEndPoint.create_traffic_manager_endpoint_response(@traffic_manager_client)
|
14
|
+
@end_points.stub :create_or_update, mocked_response do
|
15
|
+
assert_equal @service.create_or_update_traffic_manager_endpoint(@endpoint_hash), mocked_response
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_create_traffic_manager_endpoint_failure
|
20
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
|
21
|
+
@end_points.stub :create_or_update, response do
|
22
|
+
assert_raises(RuntimeError) { @service.create_or_update_traffic_manager_endpoint(@endpoint_hash) }
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require File.expand_path '../../test_helper', __dir__
|
2
|
+
|
3
|
+
# Test class for Create Traffic Manager Profile
|
4
|
+
class TestCreateTrafficManagerProfile < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@service = Fog::TrafficManager::AzureRM.new(credentials)
|
7
|
+
@traffic_manager_client = @service.instance_variable_get(:@traffic_mgmt_client)
|
8
|
+
@profiles = @traffic_manager_client.profiles
|
9
|
+
@profile_hash = ApiStub::Requests::TrafficManager::TrafficManagerProfile.profile_hash
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_create_traffic_manager_profile_success
|
13
|
+
mocked_response = ApiStub::Requests::TrafficManager::TrafficManagerProfile.create_traffic_manager_profile_response(@traffic_manager_client)
|
14
|
+
@profiles.stub :create_or_update, mocked_response do
|
15
|
+
assert_equal @service.create_or_update_traffic_manager_profile(@profile_hash), mocked_response
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_create_traffic_manager_profile_failure
|
20
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
|
21
|
+
@profiles.stub :create_or_update, response do
|
22
|
+
assert_raises(RuntimeError) { @service.create_or_update_traffic_manager_profile(@profile_hash) }
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.expand_path '../../test_helper', __dir__
|
2
|
+
|
3
|
+
# Test class for Delete Traffic Manager End Point
|
4
|
+
class TestDeleteTrafficManagerEndPoint < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@service = Fog::TrafficManager::AzureRM.new(credentials)
|
7
|
+
@traffic_manager_client = @service.instance_variable_get(:@traffic_mgmt_client)
|
8
|
+
@end_points = @traffic_manager_client.endpoints
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_delete_traffic_manager_endpoint_success
|
12
|
+
@end_points.stub :delete, true do
|
13
|
+
assert @service.delete_traffic_manager_endpoint('fog-test-rg', 'fog-test-end-point', 'fog-test-profile', 'external')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_delete_traffic_manager_endpoint_failure
|
18
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
|
19
|
+
@end_points.stub :delete, response do
|
20
|
+
assert_raises(RuntimeError) { @service.delete_traffic_manager_endpoint('fog-test-rg', 'fog-test-end-point', 'fog-test-profile', 'external') }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.expand_path '../../test_helper', __dir__
|
2
|
+
|
3
|
+
# Test class for Delete Traffic Manager Profile
|
4
|
+
class TestDeleteTrafficManagerProfile < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@service = Fog::TrafficManager::AzureRM.new(credentials)
|
7
|
+
@traffic_manager_client = @service.instance_variable_get(:@traffic_mgmt_client)
|
8
|
+
@profiles = @traffic_manager_client.profiles
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_delete_traffic_manager_profile_success
|
12
|
+
@profiles.stub :delete, true do
|
13
|
+
assert @service.delete_traffic_manager_profile('fog-test-rg', 'fog-test-profile')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_delete_traffic_manager_profile_failure
|
18
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
|
19
|
+
@profiles.stub :delete, response do
|
20
|
+
assert_raises(RuntimeError) { @service.delete_traffic_manager_profile('fog-test-rg', 'fog-test-profile') }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require File.expand_path '../../test_helper', __dir__
|
2
|
+
|
3
|
+
# Test class for Get Traffic Manager Endpoint
|
4
|
+
class TestGetTrafficManagerEndpoint < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@service = Fog::TrafficManager::AzureRM.new(credentials)
|
7
|
+
@traffic_manager_client = @service.instance_variable_get(:@traffic_mgmt_client)
|
8
|
+
@end_points = @traffic_manager_client.endpoints
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_get_traffic_manager_endpoint_success
|
12
|
+
mocked_response = ApiStub::Requests::TrafficManager::TrafficManagerEndPoint.create_traffic_manager_endpoint_response(@traffic_manager_client)
|
13
|
+
@end_points.stub :get, mocked_response do
|
14
|
+
assert_equal @service.get_traffic_manager_end_point('fog-test-rg', 'fog-test-profile', 'fog-test-endpoint-name', 'fog-test-endpoint-type'), mocked_response
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_get_traffic_manager_endpoint_failure
|
19
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
|
20
|
+
@end_points.stub :get, response do
|
21
|
+
assert_raises(RuntimeError) { @service.get_traffic_manager_end_point('fog-test-rg', 'fog-test-profile', 'wrong-param', 'wrong-param') }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require File.expand_path '../../test_helper', __dir__
|
2
|
+
|
3
|
+
# Test class for Get Traffic Manager Profile
|
4
|
+
class TestGetTrafficManagerProfile < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@service = Fog::TrafficManager::AzureRM.new(credentials)
|
7
|
+
@traffic_manager_client = @service.instance_variable_get(:@traffic_mgmt_client)
|
8
|
+
@profiles = @traffic_manager_client.profiles
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_get_traffic_manager_profile_success
|
12
|
+
mocked_response = ApiStub::Requests::TrafficManager::TrafficManagerProfile.create_traffic_manager_profile_response(@traffic_manager_client)
|
13
|
+
@profiles.stub :get, mocked_response do
|
14
|
+
assert_equal @service.get_traffic_manager_profile('fog-test-rg', 'fog-test-profile'), mocked_response
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_get_traffic_manager_profile_failure
|
19
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
|
20
|
+
@profiles.stub :get, response do
|
21
|
+
assert_raises(RuntimeError) { @service.get_traffic_manager_profile('fog-test-rg', 'fog-test-profile') }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require File.expand_path '../../test_helper', __dir__
|
2
|
+
|
3
|
+
# Test class for List Traffic Manager Profiles
|
4
|
+
class TestListTrafficManagerProfiles < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@service = Fog::TrafficManager::AzureRM.new(credentials)
|
7
|
+
@traffic_manager_client = @service.instance_variable_get(:@traffic_mgmt_client)
|
8
|
+
@profiles = @traffic_manager_client.profiles
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_list_traffic_manager_profiles_success
|
12
|
+
mocked_response = ApiStub::Requests::TrafficManager::TrafficManagerProfile.list_traffic_manager_profiles_response(@traffic_manager_client)
|
13
|
+
@profiles.stub :list_all_in_resource_group, mocked_response do
|
14
|
+
assert_equal @service.list_traffic_manager_profiles('fog-test-rg'), mocked_response.value
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_list_traffic_manager_profiles_failure
|
19
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
|
20
|
+
@profiles.stub :list_all_in_resource_group, response do
|
21
|
+
assert_raises(RuntimeError) { @service.list_traffic_manager_profiles('fog-test-rg') }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require File.expand_path '../../test_helper', __dir__
|
2
|
+
|
3
|
+
# Test class for Update Traffic Manager End Point
|
4
|
+
class TestUpdateTrafficManagerEndPoint < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@service = Fog::TrafficManager::AzureRM.new(credentials)
|
7
|
+
@traffic_manager_client = @service.instance_variable_get(:@traffic_mgmt_client)
|
8
|
+
@end_points = @traffic_manager_client.endpoints
|
9
|
+
@mocked_response = ApiStub::Requests::TrafficManager::TrafficManagerEndPoint.create_traffic_manager_endpoint_response(@traffic_manager_client)
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_update_traffic_manager_profile_success
|
13
|
+
@endpoint_hash = ApiStub::Requests::TrafficManager::TrafficManagerEndPoint.endpoint_hash
|
14
|
+
@end_points.stub :create_or_update, @mocked_response do
|
15
|
+
assert_equal @service.create_or_update_traffic_manager_endpoint(@endpoint_hash), @mocked_response
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_update_traffic_manager_profile_exception_failure
|
20
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
|
21
|
+
@end_points.stub :create_or_update, response do
|
22
|
+
assert_raises RuntimeError do
|
23
|
+
@service.create_or_update_traffic_manager_endpoint(resource_group: 'resource-group', name: 'name', traffic_manager_profile_name: 'traffic_manager_profile_name', type: 'type')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require File.expand_path '../../test_helper', __dir__
|
2
|
+
|
3
|
+
# Test class for Update Traffic Manager Profile
|
4
|
+
class TestUpdateTrafficManagerProfile < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@service = Fog::TrafficManager::AzureRM.new(credentials)
|
7
|
+
@traffic_manager_client = @service.instance_variable_get(:@traffic_mgmt_client)
|
8
|
+
@profiles = @traffic_manager_client.profiles
|
9
|
+
@mocked_response = ApiStub::Requests::TrafficManager::TrafficManagerProfile.create_traffic_manager_profile_response(@traffic_manager_client)
|
10
|
+
@profile_hash = ApiStub::Requests::TrafficManager::TrafficManagerProfile.profile_hash
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_update_traffic_manager_profile_success
|
14
|
+
@profiles.stub :create_or_update, @mocked_response do
|
15
|
+
assert_equal @service.create_or_update_traffic_manager_profile(@profile_hash), @mocked_response
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_update_traffic_manager_profile_exception_failure
|
20
|
+
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
|
21
|
+
@profiles.stub :create_or_update, response do
|
22
|
+
assert_raises RuntimeError do
|
23
|
+
@service.create_or_update_traffic_manager_profile(resource_group: 'fog-test-rg')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'fog/azurerm'
|
2
|
+
require 'minitest/autorun'
|
3
|
+
# Integration smoke test class to test resource group
|
4
|
+
class TestResourceGroupSmoke < MiniTest::Test
|
5
|
+
def setup
|
6
|
+
if !ENV['TENANT_ID'].nil? && !ENV['CLIENT_ID'].nil? && !ENV['CLIENT_SECRET'].nil? && !ENV['SUBSCRIPTION_ID'].nil?
|
7
|
+
@resource = Fog::Resources::AzureRM.new(
|
8
|
+
tenant_id: ENV['TENANT_ID'],
|
9
|
+
client_id: ENV['CLIENT_ID'],
|
10
|
+
client_secret: ENV['CLIENT_SECRET'],
|
11
|
+
subscription_id: ENV['SUBSCRIPTION_ID']
|
12
|
+
)
|
13
|
+
else
|
14
|
+
azure_credentials = YAML.load_file('../../integration/credentials/azure.yml')
|
15
|
+
@resource = Fog::Resources::AzureRM.new(
|
16
|
+
tenant_id: azure_credentials['tenant_id'],
|
17
|
+
client_id: azure_credentials['client_id'],
|
18
|
+
client_secret: azure_credentials['client_secret'],
|
19
|
+
subscription_id: azure_credentials['subscription_id']
|
20
|
+
)
|
21
|
+
end
|
22
|
+
time = Time.now.to_f.to_s
|
23
|
+
new_time = time.split(/\W+/).join
|
24
|
+
@resource_group_name = "fog-smoke-test-rg-#{new_time}"
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_resource_group
|
28
|
+
puts 'In Smoke tests'
|
29
|
+
resource_group = @resource.resource_groups.create(name: @resource_group_name, location: 'eastus')
|
30
|
+
assert_instance_of Fog::Resources::AzureRM::ResourceGroup, resource_group
|
31
|
+
|
32
|
+
resource_group = @resource.resource_groups.get(@resource_group_name)
|
33
|
+
assert_instance_of Fog::Resources::AzureRM::ResourceGroup, resource_group
|
34
|
+
|
35
|
+
resource_group.destroy
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require File.expand_path 'test_helper', __dir__
|
2
|
+
|
3
|
+
# Test class for Credentials Helper Class
|
4
|
+
class TestCredentials < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@creds = credentials
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_methods
|
10
|
+
methods = [
|
11
|
+
:get_credentials,
|
12
|
+
:get_token
|
13
|
+
]
|
14
|
+
methods.each do |method|
|
15
|
+
assert Fog::Credentials::AzureRM.respond_to? method
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_get_credentials_method_with_same_client
|
20
|
+
cred_obj_one = Fog::Credentials::AzureRM.get_credentials(@creds[:tenant_id], @creds[:client_id], @creds[:client_secret])
|
21
|
+
cred_obj_two = Fog::Credentials::AzureRM.get_credentials(@creds[:tenant_id], @creds[:client_id], @creds[:client_secret])
|
22
|
+
assert_equal cred_obj_one.object_id, cred_obj_two.object_id
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_get_credentials_method_with_different_client
|
26
|
+
cred_obj_one = Fog::Credentials::AzureRM.get_credentials(@creds[:tenant_id], @creds[:client_id], @creds[:client_secret])
|
27
|
+
@creds[:client_id] = '<NEW-CLIENT-ID>'
|
28
|
+
cred_obj_two = Fog::Credentials::AzureRM.get_credentials(@creds[:tenant_id], @creds[:client_id], @creds[:client_secret])
|
29
|
+
refute_equal cred_obj_one.object_id, cred_obj_two.object_id
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_get_token_method_with_default_environment
|
33
|
+
Fog::Credentials::AzureRM.get_credentials(@creds[:tenant_id], @creds[:client_id], @creds[:client_secret])
|
34
|
+
token_provider = Fog::Credentials::AzureRM.instance_variable_get(:@token_provider)
|
35
|
+
token_provider.stub :get_authentication_header, 'Bearer <some-token>' do
|
36
|
+
assert_equal Fog::Credentials::AzureRM.get_token(@creds[:tenant_id], @creds[:client_id], @creds[:client_secret]), 'Bearer <some-token>'
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_get_token_method_with_china_environment
|
41
|
+
Fog::Credentials::AzureRM.get_credentials(@creds[:tenant_id], @creds[:client_id], @creds[:client_secret], ENVIRONMENT_AZURE_CHINA_CLOUD)
|
42
|
+
token_provider = Fog::Credentials::AzureRM.instance_variable_get(:@token_provider)
|
43
|
+
token_provider.stub :get_authentication_header, 'Bearer <some-token>' do
|
44
|
+
assert_equal Fog::Credentials::AzureRM.get_token(@creds[:tenant_id], @creds[:client_id], @creds[:client_secret]), 'Bearer <some-token>'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_get_token_method_with_us_government_environment
|
49
|
+
Fog::Credentials::AzureRM.get_credentials(@creds[:tenant_id], @creds[:client_id], @creds[:client_secret], ENVIRONMENT_AZURE_US_GOVERNMENT)
|
50
|
+
token_provider = Fog::Credentials::AzureRM.instance_variable_get(:@token_provider)
|
51
|
+
token_provider.stub :get_authentication_header, 'Bearer <some-token>' do
|
52
|
+
assert_equal Fog::Credentials::AzureRM.get_token(@creds[:tenant_id], @creds[:client_id], @creds[:client_secret]), 'Bearer <some-token>'
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def test_get_token_method_with_german_environment
|
57
|
+
Fog::Credentials::AzureRM.get_credentials(@creds[:tenant_id], @creds[:client_id], @creds[:client_secret], ENVIRONMENT_AZURE_GERMAN_CLOUD)
|
58
|
+
token_provider = Fog::Credentials::AzureRM.instance_variable_get(:@token_provider)
|
59
|
+
token_provider.stub :get_authentication_header, 'Bearer <some-token>' do
|
60
|
+
assert_equal Fog::Credentials::AzureRM.get_token(@creds[:tenant_id], @creds[:client_id], @creds[:client_secret]), 'Bearer <some-token>'
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,817 @@
|
|
1
|
+
if ENV['COVERAGE']
|
2
|
+
require 'simplecov'
|
3
|
+
SimpleCov.start do
|
4
|
+
add_filter 'test'
|
5
|
+
command_name 'Minitest'
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
if ENV['CODECLIMATE_REPO_TOKEN']
|
10
|
+
require 'simplecov'
|
11
|
+
SimpleCov.start do
|
12
|
+
add_filter 'test'
|
13
|
+
command_name 'Minitest'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
require 'minitest/autorun'
|
18
|
+
require 'azure/core/http/http_error'
|
19
|
+
require 'azure/core/http/http_response'
|
20
|
+
$LOAD_PATH.unshift(File.expand_path '../lib', __dir__)
|
21
|
+
require File.expand_path '../lib/fog/azurerm', __dir__
|
22
|
+
require File.expand_path './api_stub', __dir__
|
23
|
+
def credentials
|
24
|
+
{
|
25
|
+
tenant_id: '<TENANT-ID>',
|
26
|
+
client_id: '<CLIENT-ID>',
|
27
|
+
client_secret: '<CLIENT-SECRET>',
|
28
|
+
subscription_id: '<SUBSCRIPTION-ID>'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
def storage_account_credentials
|
33
|
+
{
|
34
|
+
azure_storage_account_name: 'mockaccount',
|
35
|
+
azure_storage_access_key: 'YWNjZXNzLWtleQ=='
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Mock Class for Blob
|
40
|
+
class MockBlob
|
41
|
+
def initialize
|
42
|
+
@properties = {}
|
43
|
+
@metadata = {}
|
44
|
+
yield self if block_given?
|
45
|
+
end
|
46
|
+
|
47
|
+
attr_accessor :name
|
48
|
+
attr_accessor :snapshot
|
49
|
+
attr_accessor :properties
|
50
|
+
attr_accessor :metadata
|
51
|
+
end
|
52
|
+
|
53
|
+
# Mock Class for Response
|
54
|
+
class MockResponse
|
55
|
+
def initialize(code, body, headers)
|
56
|
+
@status = code
|
57
|
+
@body = body
|
58
|
+
@headers = headers
|
59
|
+
@headers.each do |k, v|
|
60
|
+
@headers[k] = [v] unless v.respond_to? 'first'
|
61
|
+
end
|
62
|
+
end
|
63
|
+
attr_accessor :status
|
64
|
+
attr_accessor :body
|
65
|
+
attr_accessor :headers
|
66
|
+
end
|
67
|
+
|
68
|
+
def mocked_storage_http_error
|
69
|
+
mocked_net_response = MockResponse.new 'mocked_code', 'mocked_body', a: 'a', b: 'b'
|
70
|
+
Azure::Core::Http::HttpResponse.new mocked_net_response, 'mocked_uri'
|
71
|
+
end
|
72
|
+
|
73
|
+
def mocked_storage_http_not_found_error
|
74
|
+
mocked_net_response = MockResponse.new '404', 'mocked_body', a: 'a', b: 'b'
|
75
|
+
Azure::Core::Http::HttpResponse.new mocked_net_response, 'mocked_uri'
|
76
|
+
end
|
77
|
+
|
78
|
+
def server(service)
|
79
|
+
Fog::Compute::AzureRM::Server.new(
|
80
|
+
name: 'fog-test-server',
|
81
|
+
location: 'West US',
|
82
|
+
resource_group: 'fog-test-rg',
|
83
|
+
vm_size: 'Basic_A0',
|
84
|
+
storage_account_name: 'shaffanstrg',
|
85
|
+
username: 'shaffan',
|
86
|
+
password: 'Confiz=123',
|
87
|
+
disable_password_authentication: false,
|
88
|
+
network_interface_card_ids: ['/subscriptions/########-####-####-####-############/resourceGroups/shaffanRG/providers/Microsoft.Network/networkInterfaces/testNIC'],
|
89
|
+
publisher: 'Canonical',
|
90
|
+
offer: 'UbuntuServer',
|
91
|
+
sku: '14.04.2-LTS',
|
92
|
+
version: 'latest',
|
93
|
+
platform: 'Windows',
|
94
|
+
service: service
|
95
|
+
)
|
96
|
+
end
|
97
|
+
|
98
|
+
def virtual_machine_extension(service)
|
99
|
+
Fog::Compute::AzureRM::VirtualMachineExtension.new(
|
100
|
+
name: 'fog-test-extension',
|
101
|
+
location: 'West US',
|
102
|
+
resource_group: 'fog-test-rg',
|
103
|
+
vm_name: 'fog-test-vm',
|
104
|
+
type: 'fog-test-extension-type',
|
105
|
+
publisher: 'fog-test-extension-publisher',
|
106
|
+
type_handler_version: 'fog-test-extension-version',
|
107
|
+
auto_upgrade_minor_version: 'fog-test-extension-upgrade',
|
108
|
+
settings: '{"Key" => "Value"}',
|
109
|
+
protected_settings: '{"Key" => "Value"}',
|
110
|
+
service: service
|
111
|
+
)
|
112
|
+
end
|
113
|
+
|
114
|
+
def availability_set(service)
|
115
|
+
Fog::Compute::AzureRM::AvailabilitySet.new(
|
116
|
+
name: 'availability-set',
|
117
|
+
location: 'West US',
|
118
|
+
resource_group: 'fog-test-rg',
|
119
|
+
service: service
|
120
|
+
)
|
121
|
+
end
|
122
|
+
|
123
|
+
def resource_group(service)
|
124
|
+
Fog::Resources::AzureRM::ResourceGroup.new(
|
125
|
+
name: 'fog-test-rg',
|
126
|
+
location: 'West US',
|
127
|
+
service: service
|
128
|
+
)
|
129
|
+
end
|
130
|
+
|
131
|
+
def deployment(service)
|
132
|
+
Fog::Resources::AzureRM::Deployment.new(
|
133
|
+
name: 'fog-test-deployment',
|
134
|
+
resource_group: 'fog-test-rg',
|
135
|
+
template_link: 'https://test.com/template.json',
|
136
|
+
parameters_link: 'https://test.com/parameters.json',
|
137
|
+
service: service
|
138
|
+
)
|
139
|
+
end
|
140
|
+
|
141
|
+
def storage_account(service)
|
142
|
+
Fog::Storage::AzureRM::StorageAccount.new(
|
143
|
+
name: 'storage-account',
|
144
|
+
location: 'West US',
|
145
|
+
resource_group: 'fog-test-rg',
|
146
|
+
service: service
|
147
|
+
)
|
148
|
+
end
|
149
|
+
|
150
|
+
def standard_lrs(service)
|
151
|
+
Fog::Storage::AzureRM::StorageAccount.new(
|
152
|
+
name: 'storage-account',
|
153
|
+
location: 'West US',
|
154
|
+
resource_group: 'fog-test-rg',
|
155
|
+
sku_name: 'Other',
|
156
|
+
replication: 'LRS',
|
157
|
+
service: service
|
158
|
+
)
|
159
|
+
end
|
160
|
+
|
161
|
+
def standard_check_for_invalid_replications(service)
|
162
|
+
Fog::Storage::AzureRM::StorageAccount.new(
|
163
|
+
name: 'storage-account',
|
164
|
+
location: 'West US',
|
165
|
+
resource_group: 'fog-test-rg',
|
166
|
+
sku_name: 'Standard',
|
167
|
+
replication: 'HGDKS',
|
168
|
+
service: service
|
169
|
+
)
|
170
|
+
end
|
171
|
+
|
172
|
+
def premium_check_for_invalid_replications(service)
|
173
|
+
Fog::Storage::AzureRM::StorageAccount.new(
|
174
|
+
name: 'storage-account',
|
175
|
+
location: 'West US',
|
176
|
+
resource_group: 'fog-test-rg',
|
177
|
+
sku_name: 'Premium',
|
178
|
+
replication: 'HGDKS',
|
179
|
+
service: service
|
180
|
+
)
|
181
|
+
end
|
182
|
+
|
183
|
+
def directory(service)
|
184
|
+
Fog::Storage::AzureRM::Directory.new(
|
185
|
+
key: 'test_container',
|
186
|
+
acl: 'container',
|
187
|
+
etag: '0x8D29C92176C8352',
|
188
|
+
last_modified: Time.parse('Tue, 04 Aug 2015 06:01:08 GMT'),
|
189
|
+
lease_duration: nil,
|
190
|
+
lease_state: 'available',
|
191
|
+
lease_status: 'unlocked',
|
192
|
+
metadata: {
|
193
|
+
'key1' => 'value1',
|
194
|
+
'key2' => 'value2'
|
195
|
+
},
|
196
|
+
service: service,
|
197
|
+
collection: Fog::Storage::AzureRM::Directories.new(service: @service)
|
198
|
+
)
|
199
|
+
end
|
200
|
+
|
201
|
+
def file(service)
|
202
|
+
Fog::Storage::AzureRM::File.new(
|
203
|
+
key: 'test_blob',
|
204
|
+
directory: directory(service),
|
205
|
+
last_modified: Time.parse('Tue, 04 Aug 2015 06:01:08 GMT'),
|
206
|
+
etag: '0x8D29C92176C8352',
|
207
|
+
metadata: {
|
208
|
+
'key1' => 'value1',
|
209
|
+
'key2' => 'value2'
|
210
|
+
},
|
211
|
+
lease_status: 'unlocked',
|
212
|
+
lease_state: 'available',
|
213
|
+
lease_duration: nil,
|
214
|
+
content_length: 4_194_304,
|
215
|
+
content_type: 'application/octet-stream',
|
216
|
+
content_encoding: nil,
|
217
|
+
content_language: nil,
|
218
|
+
content_disposition: nil,
|
219
|
+
content_md5: 'tXAohIyxuu/t94Lp/ujeRw==',
|
220
|
+
cache_control: nil,
|
221
|
+
sequence_number: 0,
|
222
|
+
blob_type: 'BlockBlob',
|
223
|
+
copy_id: '095adc3b-e277-4c3d-97e0-0abca881f60c',
|
224
|
+
copy_status: 'success',
|
225
|
+
copy_source: 'https://testaccount.blob.core.windows.net/testblob/4m?snapshot=2016-02-04T08%3A35%3A50.3157696Z',
|
226
|
+
copy_progress: '4194304/4194304',
|
227
|
+
copy_completion_time: 'Thu, 04 Feb 2016 08:35:52 GMT',
|
228
|
+
copy_status_description: nil,
|
229
|
+
accept_ranges: 0,
|
230
|
+
service: service,
|
231
|
+
collection: Fog::Storage::AzureRM::Files.new(service: @service, directory: directory(service))
|
232
|
+
)
|
233
|
+
end
|
234
|
+
|
235
|
+
def storage_blob
|
236
|
+
mock_blob = MockBlob.new
|
237
|
+
mock_blob.name = 'test_blob'
|
238
|
+
mock_blob.properties = {
|
239
|
+
lease_status: 'unlocked',
|
240
|
+
lease_state: 'available',
|
241
|
+
lease_duration: nil,
|
242
|
+
content_length: 4_194_304,
|
243
|
+
content_type: 'application/octet-stream',
|
244
|
+
content_encoding: nil,
|
245
|
+
content_language: nil,
|
246
|
+
content_disposition: nil,
|
247
|
+
content_md5: 'tXAohIyxuu/t94Lp/ujeRw==',
|
248
|
+
cache_control: nil,
|
249
|
+
sequence_number: 0,
|
250
|
+
blob_type: 'PageBlob',
|
251
|
+
copy_id: '095adc3b-e277-4c3d-97e0-0abca881f60c',
|
252
|
+
copy_status: 'success',
|
253
|
+
copy_source: 'https://sa.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A50.3157696Z',
|
254
|
+
copy_progress: '4194304/4194304',
|
255
|
+
copy_completion_time: 'Thu, 04 Feb 2016 08:35:52 GMT',
|
256
|
+
copy_status_description: nil,
|
257
|
+
accept_ranges: 0,
|
258
|
+
last_modified: 'Tue, 04 Aug 2015 06:01:08 GMT',
|
259
|
+
etag: '"0x8D29C92176C8352"'
|
260
|
+
}
|
261
|
+
mock_blob.metadata = {
|
262
|
+
'key1' => 'value1',
|
263
|
+
'key2' => 'value2'
|
264
|
+
}
|
265
|
+
mock_blob
|
266
|
+
end
|
267
|
+
|
268
|
+
def public_ip(service)
|
269
|
+
Fog::Network::AzureRM::PublicIp.new(
|
270
|
+
name: 'fog-test-public-ip',
|
271
|
+
resource_group: 'fog-test-rg',
|
272
|
+
location: 'West US',
|
273
|
+
public_ip_allocation_method: 'Dynamic',
|
274
|
+
service: service
|
275
|
+
)
|
276
|
+
end
|
277
|
+
|
278
|
+
def subnet(service)
|
279
|
+
Fog::Network::AzureRM::Subnet.new(
|
280
|
+
name: 'fog-test-subnet',
|
281
|
+
resource_group: 'fog-test-rg',
|
282
|
+
virtual_network_name: 'vnet1',
|
283
|
+
address_prefix: '10.0.0.0/24',
|
284
|
+
network_security_group_id: '/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNSG1',
|
285
|
+
route_table_id: '/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/myRT1',
|
286
|
+
service: service
|
287
|
+
)
|
288
|
+
end
|
289
|
+
|
290
|
+
def virtual_network(service)
|
291
|
+
Fog::Network::AzureRM::VirtualNetwork.new(
|
292
|
+
name: 'fog-test-virtual-network',
|
293
|
+
location: 'westus',
|
294
|
+
resource_group: 'fog-test-rg',
|
295
|
+
subnets: [{
|
296
|
+
name: 'fog-test-subnet',
|
297
|
+
address_prefix: '10.1.0.0/24',
|
298
|
+
network_security_group_id: '/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNSG1',
|
299
|
+
route_table_id: '/subscriptions/{guid}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/myRT1'
|
300
|
+
}],
|
301
|
+
dns_servers: ['10.1.0.0', '10.2.0.0'],
|
302
|
+
address_prefixes: ['10.1.0.0/16', '10.2.0.0/16'],
|
303
|
+
service: service
|
304
|
+
)
|
305
|
+
end
|
306
|
+
|
307
|
+
def network_interface(service)
|
308
|
+
Fog::Network::AzureRM::NetworkInterface.new(
|
309
|
+
name: 'fog-test-network-interface',
|
310
|
+
location: 'West US',
|
311
|
+
resource_group: 'fog-test-rg',
|
312
|
+
subnet_id: '/subscriptions/########-####-####-####-############/resourceGroups/fog-test-rg/providers/Microsoft.Network/virtualNetworks/fog-test-virtual-network/subnets/fog-test-subnet',
|
313
|
+
public_ip_address_id: '/subscriptions/########-####-####-####-############/resourceGroups/fog-test-rg/providers/Microsoft.Network/publicIPAddresses/fog-test-public-ip',
|
314
|
+
network_security_group_id: '/subscriptions/########-####-####-####-############/resourceGroups/fog-test-rg/providers/Microsoft.Network/networkSecurityGroups/fog-test-nsg',
|
315
|
+
ip_configuration_name: 'fog-test-ip-configuration',
|
316
|
+
private_ip_allocation_method: 'fog-test-private-ip-allocation-method',
|
317
|
+
properties: nil,
|
318
|
+
service: service
|
319
|
+
)
|
320
|
+
end
|
321
|
+
|
322
|
+
def load_balancer(service)
|
323
|
+
Fog::Network::AzureRM::LoadBalancer.new(
|
324
|
+
name: 'lb',
|
325
|
+
resource_group: 'fogRM-rg',
|
326
|
+
location: 'westus',
|
327
|
+
frontend_ip_configurations:
|
328
|
+
[
|
329
|
+
{
|
330
|
+
name: 'fic',
|
331
|
+
private_ipallocation_method: 'Dynamic',
|
332
|
+
public_ipaddress_id: '/subscriptions/########-####-####-####-############/resourcegroups/fogRM-rg/providers/Microsoft.Network/publicIPAddresses/pip',
|
333
|
+
subnet_id: '/subscriptions/########-####-####-####-############/resourcegroups/fogRM-rg/providers/Microsoft.Network/virtualNetworks/vnet/subnets/sb1'
|
334
|
+
}
|
335
|
+
],
|
336
|
+
backend_address_pool_names:
|
337
|
+
[
|
338
|
+
'pool1'
|
339
|
+
],
|
340
|
+
load_balancing_rules:
|
341
|
+
[
|
342
|
+
{
|
343
|
+
name: 'lb_rule_1',
|
344
|
+
frontend_ip_configuration_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fic',
|
345
|
+
backend_address_pool_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/pool1',
|
346
|
+
protocol: 'Tcp',
|
347
|
+
frontend_port: '80',
|
348
|
+
backend_port: '8080',
|
349
|
+
enable_floating_ip: false,
|
350
|
+
idle_timeout_in_minutes: 4,
|
351
|
+
load_distribution: 'Default'
|
352
|
+
}
|
353
|
+
],
|
354
|
+
inbound_nat_rules:
|
355
|
+
[
|
356
|
+
{
|
357
|
+
name: 'RDP-Traffic',
|
358
|
+
frontend_ip_configuration_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fic',
|
359
|
+
protocol: 'Tcp',
|
360
|
+
frontend_port: 3389,
|
361
|
+
backend_port: 3389
|
362
|
+
}
|
363
|
+
],
|
364
|
+
probes:
|
365
|
+
[
|
366
|
+
{
|
367
|
+
name: 'probe1',
|
368
|
+
protocol: 'Tcp',
|
369
|
+
port: 8080,
|
370
|
+
request_path: 'myprobeapp1/myprobe1.svc',
|
371
|
+
interval_in_seconds: 5,
|
372
|
+
number_of_probes: 16
|
373
|
+
}
|
374
|
+
],
|
375
|
+
inbound_nat_pools:
|
376
|
+
[
|
377
|
+
{
|
378
|
+
name: 'RDPForVMSS1',
|
379
|
+
protocol: 'Tcp',
|
380
|
+
frontend_port_range_start: 500,
|
381
|
+
frontend_port_range_end: 505,
|
382
|
+
backend_port: 3389
|
383
|
+
}
|
384
|
+
],
|
385
|
+
service: service
|
386
|
+
)
|
387
|
+
end
|
388
|
+
|
389
|
+
def zone(service)
|
390
|
+
Fog::DNS::AzureRM::Zone.new(
|
391
|
+
name: 'fog-test-zone.com',
|
392
|
+
location: 'global',
|
393
|
+
id: '/subscriptions/########-####-####-####-############/resourceGroups/fog-test-rg/providers/Microsoft.Network/dnszones/fog-test-zone.com',
|
394
|
+
resource_group: 'fog-test-rg',
|
395
|
+
service: service
|
396
|
+
)
|
397
|
+
end
|
398
|
+
|
399
|
+
def record_set(service)
|
400
|
+
Fog::DNS::AzureRM::RecordSet.new(
|
401
|
+
name: 'fog-test-record_set',
|
402
|
+
resource_group: 'fog-test-rg',
|
403
|
+
zone_name: 'fog-test-zone.com',
|
404
|
+
records: %w(1.2.3.4 1.2.3.3),
|
405
|
+
type: 'A',
|
406
|
+
ttl: 60,
|
407
|
+
service: service
|
408
|
+
)
|
409
|
+
end
|
410
|
+
|
411
|
+
def record_set_cname(service)
|
412
|
+
Fog::DNS::AzureRM::RecordSet.new(
|
413
|
+
name: 'fog-test-record_set',
|
414
|
+
resource_group: 'fog-test-rg',
|
415
|
+
zone_name: 'fog-test-zone.com',
|
416
|
+
records: %w(1.2.3.4 1.2.3.3),
|
417
|
+
type: 'CNAME',
|
418
|
+
ttl: 60,
|
419
|
+
service: service
|
420
|
+
)
|
421
|
+
end
|
422
|
+
|
423
|
+
def network_security_group(service)
|
424
|
+
Fog::Network::AzureRM::NetworkSecurityGroup.new(
|
425
|
+
name: 'fog-test-nsg',
|
426
|
+
resource_group: 'fog-test-rg',
|
427
|
+
location: 'West US',
|
428
|
+
security_rules: [{
|
429
|
+
name: 'fog-test-rule',
|
430
|
+
protocol: 'tcp',
|
431
|
+
source_port_range: '22',
|
432
|
+
destination_port_range: '22',
|
433
|
+
source_address_prefix: '0.0.0.0/0',
|
434
|
+
destination_address_prefix: '0.0.0.0/0',
|
435
|
+
access: 'Allow',
|
436
|
+
priority: '100',
|
437
|
+
direction: 'Inbound'
|
438
|
+
}],
|
439
|
+
service: service
|
440
|
+
)
|
441
|
+
end
|
442
|
+
|
443
|
+
def network_security_rule(service)
|
444
|
+
Fog::Network::AzureRM::NetworkSecurityRule.new(
|
445
|
+
name: 'fog-test-nsr',
|
446
|
+
resource_group: 'fog-test-rg',
|
447
|
+
network_security_group_name: 'fog-test-nsr',
|
448
|
+
protocol: 'tcp',
|
449
|
+
source_port_range: '22',
|
450
|
+
destination_port_range: '22',
|
451
|
+
source_address_prefix: '0.0.0.0/0',
|
452
|
+
destination_address_prefix: '0.0.0.0/0',
|
453
|
+
access: 'Allow',
|
454
|
+
priority: '100',
|
455
|
+
direction: 'Inbound',
|
456
|
+
service: service
|
457
|
+
)
|
458
|
+
end
|
459
|
+
|
460
|
+
def gateway(service)
|
461
|
+
Fog::ApplicationGateway::AzureRM::Gateway.new(
|
462
|
+
name: 'gateway',
|
463
|
+
location: 'eastus',
|
464
|
+
resource_group: 'fogRM-rg',
|
465
|
+
sku_name: 'Standard_Medium',
|
466
|
+
sku_tier: 'Standard',
|
467
|
+
sku_capacity: '2',
|
468
|
+
gateway_ip_configurations:
|
469
|
+
[
|
470
|
+
{
|
471
|
+
name: 'gatewayIpConfigName',
|
472
|
+
subnet_id: '/subscriptions/########-####-####-####-############/resourcegroups/fogRM-rg/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnetName'
|
473
|
+
}
|
474
|
+
],
|
475
|
+
ssl_certificates:
|
476
|
+
[
|
477
|
+
{
|
478
|
+
name: 'certificate',
|
479
|
+
data: 'data',
|
480
|
+
password: '123',
|
481
|
+
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='
|
482
|
+
}
|
483
|
+
],
|
484
|
+
frontend_ip_configurations:
|
485
|
+
[
|
486
|
+
{
|
487
|
+
name: 'frontendIpConfig',
|
488
|
+
private_ip_allocation_method: 'Dynamic',
|
489
|
+
public_ip_address_id: '/subscriptions/########-####-####-####-############/resourcegroups/fogRM-rg/providers/Microsoft.Network/publicIPAddresses/publicIp',
|
490
|
+
private_ip_address: '10.0.1.5'
|
491
|
+
}
|
492
|
+
],
|
493
|
+
frontend_ports:
|
494
|
+
[
|
495
|
+
{
|
496
|
+
name: 'frontendPort',
|
497
|
+
port: 443
|
498
|
+
}
|
499
|
+
],
|
500
|
+
probes:
|
501
|
+
[
|
502
|
+
{
|
503
|
+
name: 'probe1',
|
504
|
+
protocol: 'tcp',
|
505
|
+
host: 'localhost',
|
506
|
+
path: '/usr/',
|
507
|
+
interval: 30,
|
508
|
+
timeout: 20,
|
509
|
+
unhealthy_threshold: 20
|
510
|
+
}
|
511
|
+
],
|
512
|
+
backend_address_pools:
|
513
|
+
[
|
514
|
+
{
|
515
|
+
name: 'backendAddressPool',
|
516
|
+
ip_addresses: [
|
517
|
+
{
|
518
|
+
ipAddress: '10.0.1.6'
|
519
|
+
}
|
520
|
+
]
|
521
|
+
}
|
522
|
+
],
|
523
|
+
backend_http_settings_list:
|
524
|
+
[
|
525
|
+
{
|
526
|
+
name: 'gateway_settings',
|
527
|
+
port: 80,
|
528
|
+
protocol: 'Http',
|
529
|
+
cookie_based_affinity: 'Enabled',
|
530
|
+
request_timeout: '30',
|
531
|
+
probe: ''
|
532
|
+
}
|
533
|
+
],
|
534
|
+
http_listeners:
|
535
|
+
[
|
536
|
+
{
|
537
|
+
name: 'gateway_listener',
|
538
|
+
frontend_ip_config_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/frontendIPConfigurations/frontend_ip_config',
|
539
|
+
frontend_port_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/frontendPorts/gateway_front_port',
|
540
|
+
protocol: 'Https',
|
541
|
+
host_name: '',
|
542
|
+
ssl_certificate_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/sslCertificates/ssl_certificate',
|
543
|
+
require_server_name_indication: 'false'
|
544
|
+
}
|
545
|
+
],
|
546
|
+
url_path_maps:
|
547
|
+
[
|
548
|
+
{
|
549
|
+
name: 'map1',
|
550
|
+
default_backend_address_pool_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/backendAddressPools/AG-BackEndAddressPool',
|
551
|
+
default_backend_http_settings_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/backendHttpSettingsCollection/gateway_settings',
|
552
|
+
path_rules: [
|
553
|
+
{
|
554
|
+
backend_address_pool_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/backendAddressPools/AG-BackEndAddressPool',
|
555
|
+
backend_http_settings_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/backendHttpSettingsCollection/gateway_settings',
|
556
|
+
paths: [
|
557
|
+
%w(/usr /etc)
|
558
|
+
]
|
559
|
+
}
|
560
|
+
]
|
561
|
+
}
|
562
|
+
],
|
563
|
+
request_routing_rules:
|
564
|
+
[
|
565
|
+
{
|
566
|
+
name: 'gateway_request_route_rule',
|
567
|
+
type: 'Basic',
|
568
|
+
http_listener_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/httpListeners/gateway_listener',
|
569
|
+
backend_address_pool_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/backendAddressPools/AG-BackEndAddressPool',
|
570
|
+
backend_http_settings_id: '/subscriptions/########-####-####-####-############/resourceGroups/fogRM-rg/providers/Microsoft.Network/applicationGateways/gateway/backendHttpSettingsCollection/gateway_settings',
|
571
|
+
url_path_map: ''
|
572
|
+
}
|
573
|
+
],
|
574
|
+
service: service
|
575
|
+
)
|
576
|
+
end
|
577
|
+
|
578
|
+
def traffic_manager_end_point(service)
|
579
|
+
Fog::TrafficManager::AzureRM::TrafficManagerEndPoint.new(
|
580
|
+
name: 'fog-test-end-point',
|
581
|
+
traffic_manager_profile_name: 'fog-test-profile',
|
582
|
+
resource_group: 'fog-test-rg',
|
583
|
+
type: 'external',
|
584
|
+
target: 'test.com',
|
585
|
+
endpoint_location: 'West US',
|
586
|
+
service: service
|
587
|
+
)
|
588
|
+
end
|
589
|
+
|
590
|
+
def traffic_manager_profile(service)
|
591
|
+
Fog::TrafficManager::AzureRM::TrafficManagerProfile.new(
|
592
|
+
name: 'fog-test-profile',
|
593
|
+
resource_group: 'fog-test-rg',
|
594
|
+
traffic_routing_method: 'Performance',
|
595
|
+
relative_name: 'fog-test-app',
|
596
|
+
ttl: '30',
|
597
|
+
protocol: 'http',
|
598
|
+
port: '80',
|
599
|
+
path: '/monitorpage.aspx',
|
600
|
+
service: service
|
601
|
+
)
|
602
|
+
end
|
603
|
+
|
604
|
+
def virtual_network_gateway(service)
|
605
|
+
Fog::Network::AzureRM::VirtualNetworkGateway.new(
|
606
|
+
name: 'testNetworkGateway',
|
607
|
+
location: 'eastus',
|
608
|
+
tags: {
|
609
|
+
key1: 'value1',
|
610
|
+
key2: 'value2'
|
611
|
+
},
|
612
|
+
resource_group: 'learn_fog',
|
613
|
+
sku_name: 'HighPerformance',
|
614
|
+
sku_tier: 'Standard',
|
615
|
+
sku_capacity: 100,
|
616
|
+
gateway_type: 'ExpressRoute',
|
617
|
+
enable_bgp: true,
|
618
|
+
gateway_size: 'Default',
|
619
|
+
vpn_client_address_pool: ['vpnClientAddressPoolPrefix'],
|
620
|
+
default_sites: ['mysite1'],
|
621
|
+
gateway_default_site: '/subscriptions/{subscription-id}/resourceGroups/fog-rg/providers/microsoft.network/localNetworkGateways/{local-network-gateway-name}',
|
622
|
+
service: service
|
623
|
+
)
|
624
|
+
end
|
625
|
+
|
626
|
+
def local_network_gateway(service)
|
627
|
+
Fog::Network::AzureRM::LocalNetworkGateway.new(
|
628
|
+
name: 'testLocalNetworkGateway',
|
629
|
+
location: 'eastus',
|
630
|
+
tags: {
|
631
|
+
key1: 'value1',
|
632
|
+
key2: 'value2'
|
633
|
+
},
|
634
|
+
resource_group: 'learn_fog',
|
635
|
+
gateway_ip_address: '192.168.1.1',
|
636
|
+
local_network_address_space_prefixes: [],
|
637
|
+
asn: 100,
|
638
|
+
bgp_peering_address: '192.168.1.2',
|
639
|
+
peer_weight: 3,
|
640
|
+
service: service
|
641
|
+
)
|
642
|
+
end
|
643
|
+
|
644
|
+
def express_route_circuit(service)
|
645
|
+
Fog::Network::AzureRM::ExpressRouteCircuit.new(
|
646
|
+
name: 'testCircuit',
|
647
|
+
location: 'eastus',
|
648
|
+
resource_group: 'HaiderRG',
|
649
|
+
tags: {
|
650
|
+
key1: 'value1'
|
651
|
+
},
|
652
|
+
sku_name: 'Standard_MeteredData',
|
653
|
+
sku_tier: 'Standard',
|
654
|
+
sku_family: 'MeteredData',
|
655
|
+
service_provider_name: 'Telenor',
|
656
|
+
peering_location: 'London',
|
657
|
+
bandwidth_in_mbps: 100,
|
658
|
+
peerings: [
|
659
|
+
{
|
660
|
+
name: 'AzurePublicPeering',
|
661
|
+
peering_type: 'AzurePublicPeering',
|
662
|
+
peer_asn: 100,
|
663
|
+
primary_peer_address_prefix: '192.168.1.0/30',
|
664
|
+
secondary_peer_address_prefix: '192.168.2.0/30',
|
665
|
+
vlan_id: 200
|
666
|
+
}
|
667
|
+
],
|
668
|
+
service: service
|
669
|
+
)
|
670
|
+
end
|
671
|
+
|
672
|
+
def express_route_circuit_peering(service)
|
673
|
+
Fog::Network::AzureRM::ExpressRouteCircuitPeering.new(
|
674
|
+
name: 'AzurePublicPeering',
|
675
|
+
circuit_name: 'testCircuit',
|
676
|
+
resource_group: 'HaiderRG',
|
677
|
+
peering_type: 'AzurePublicPeering',
|
678
|
+
peer_asn: 100,
|
679
|
+
primary_peer_address_prefix: '192.168.1.0/30',
|
680
|
+
secondary_peer_address_prefix: '192.168.2.0/30',
|
681
|
+
vlan_id: 200,
|
682
|
+
service: service
|
683
|
+
)
|
684
|
+
end
|
685
|
+
|
686
|
+
def express_route_circuit_authorization(service)
|
687
|
+
Fog::Network::AzureRM::ExpressRouteCircuitAuthorization.new(
|
688
|
+
name: 'UniqueAuthorizationName',
|
689
|
+
circuit_name: 'testCircuit',
|
690
|
+
resource_group: 'HaiderRG',
|
691
|
+
authorization_use_status: 'Available',
|
692
|
+
authorization_name: 'circuit-auth-name',
|
693
|
+
service: service
|
694
|
+
)
|
695
|
+
end
|
696
|
+
|
697
|
+
def virtual_network_gateway_connection(service)
|
698
|
+
Fog::Network::AzureRM::VirtualNetworkGatewayConnection.new(
|
699
|
+
name: 'testNetworkGateway',
|
700
|
+
location: 'eastus',
|
701
|
+
tags: {
|
702
|
+
key1: 'value1',
|
703
|
+
key2: 'value2'
|
704
|
+
},
|
705
|
+
resource_group: 'learn_fog',
|
706
|
+
virtual_network_gateway1: {
|
707
|
+
name: 'firstgateway'
|
708
|
+
},
|
709
|
+
virtual_network_gateway2: {
|
710
|
+
name: 'secondgateway'
|
711
|
+
},
|
712
|
+
enable_bgp: true,
|
713
|
+
connection_type: 'VNet-to-VNet',
|
714
|
+
routing_weight: 2,
|
715
|
+
shared_key: 'shared_key',
|
716
|
+
service: service
|
717
|
+
)
|
718
|
+
end
|
719
|
+
|
720
|
+
def database(service)
|
721
|
+
Fog::Sql::AzureRM::SqlDatabase.new(
|
722
|
+
name: 'fog-test-zone.com',
|
723
|
+
id: '/subscriptions/########-####-####-####-############/resourceGroups/vm_custom_image/providers/Microsoft.Sql/servers/test-sql-server-confiz123/databases/confiztestdatab98',
|
724
|
+
resource_group: 'fog-test-rg',
|
725
|
+
server_name: 'fog-test-server-name',
|
726
|
+
location: 'eastus',
|
727
|
+
service: service
|
728
|
+
)
|
729
|
+
end
|
730
|
+
|
731
|
+
def databases(service)
|
732
|
+
Fog::Sql::AzureRM::SqlDatabases.new(
|
733
|
+
resource_group: 'fog-test-rg',
|
734
|
+
server_name: 'fog-test-server-name',
|
735
|
+
name: 'database-name',
|
736
|
+
location: 'eastus',
|
737
|
+
service: service
|
738
|
+
)
|
739
|
+
end
|
740
|
+
|
741
|
+
def sql_server(service)
|
742
|
+
Fog::Sql::AzureRM::SqlServer.new(
|
743
|
+
name: 'fog-test-zone.com',
|
744
|
+
id: '/subscriptions/########-####-####-####-############/resourceGroups/vm_custom_image/providers/Microsoft.Sql/servers/test-sql-server-confiz123',
|
745
|
+
resource_group: 'fog-test-rg',
|
746
|
+
location: 'eastus',
|
747
|
+
version: '2.0',
|
748
|
+
administrator_login: 'test-admin@3',
|
749
|
+
administrator_login_password: 'pass@swe',
|
750
|
+
service: service
|
751
|
+
)
|
752
|
+
end
|
753
|
+
|
754
|
+
def sql_servers(service)
|
755
|
+
Fog::Sql::AzureRM::SqlServers.new(
|
756
|
+
name: 'fog-test-zone.com',
|
757
|
+
id: '/subscriptions/########-####-####-####-############/resourceGroups/vm_custom_image/providers/Microsoft.Sql/servers/test-sql-server-confiz123',
|
758
|
+
resource_group: 'fog-test-rg',
|
759
|
+
location: 'eastus',
|
760
|
+
version: '2.0',
|
761
|
+
administrator_login: 'test-admin@3',
|
762
|
+
administrator_login_password: 'pass@swe',
|
763
|
+
service: service
|
764
|
+
)
|
765
|
+
end
|
766
|
+
|
767
|
+
def sql_server_firewall_rule(service)
|
768
|
+
Fog::Sql::AzureRM::FirewallRule.new(
|
769
|
+
name: 'fog-test-firewall-rule-name',
|
770
|
+
id: '/subscriptions/########-####-####-####-############/resourceGroups/vm_custom_image/providers/Microsoft.Sql/servers/test-sql-server-confiz123/firewallRules/rule-name',
|
771
|
+
resource_group: 'fog-test-rg',
|
772
|
+
server_name: 'server-name',
|
773
|
+
start_ip: '10.10.10.10',
|
774
|
+
end_ip: '10.10.10.10',
|
775
|
+
service: service
|
776
|
+
)
|
777
|
+
end
|
778
|
+
|
779
|
+
def sql_server_firewall_rules(service)
|
780
|
+
Fog::Sql::AzureRM::FirewallRules.new(
|
781
|
+
name: 'fog-test-firewall-rule-name',
|
782
|
+
id: '/subscriptions/########-####-####-####-############/resourceGroups/vm_custom_image/providers/Microsoft.Sql/servers/test-sql-server-confiz123/firewallRules/rule-name',
|
783
|
+
resource_group: 'fog-test-rg',
|
784
|
+
server_name: 'server-name',
|
785
|
+
start_ip: '10.10.10.10',
|
786
|
+
end_ip: '10.10.10.10',
|
787
|
+
service: service
|
788
|
+
)
|
789
|
+
end
|
790
|
+
|
791
|
+
def recovery_vault(service)
|
792
|
+
Fog::Storage::AzureRM::RecoveryVault.new(
|
793
|
+
name: 'fog-test-vault',
|
794
|
+
id: '/subscriptions/########-####-####-####-############/resourceGroups/fog-test-rg/providers/Microsoft.RecoveryServices/vaults/fog-test-vault',
|
795
|
+
resource_group: 'fog-test-rg',
|
796
|
+
location: 'westus',
|
797
|
+
type: 'Microsoft.RecoveryServices/vaults',
|
798
|
+
sku: {
|
799
|
+
name: 'standard'
|
800
|
+
},
|
801
|
+
service: service
|
802
|
+
)
|
803
|
+
end
|
804
|
+
|
805
|
+
def managed_disk(service)
|
806
|
+
Fog::Compute::AzureRM::ManagedDisk.new(
|
807
|
+
name: 'managed-disk',
|
808
|
+
location: 'East US',
|
809
|
+
resource_group_name: 'fog-test-rg',
|
810
|
+
account_type: 'Premium_LRS',
|
811
|
+
disk_size_gb: 1023,
|
812
|
+
creation_data: {
|
813
|
+
create_option: 'Empty'
|
814
|
+
},
|
815
|
+
service: service
|
816
|
+
)
|
817
|
+
end
|