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,57 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Requests
|
3
|
+
module Compute
|
4
|
+
# Mock class for Availability Set Requests
|
5
|
+
class AvailabilitySet
|
6
|
+
def self.create_availability_set_response(compute_client)
|
7
|
+
body = '{
|
8
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myrg1/providers/Microsoft.Compute/availabilitySets/avset1",
|
9
|
+
"name":"myavset1",
|
10
|
+
"type":"Microsoft.Compute/availabilitySets",
|
11
|
+
"location":"westus",
|
12
|
+
"tags": {},
|
13
|
+
"platformUpdateDomainCount": 5,
|
14
|
+
"platformFaultDomainCount":3,
|
15
|
+
"virtualMachines":[]
|
16
|
+
}'
|
17
|
+
availability_set_mapper = Azure::ARM::Compute::Models::AvailabilitySet.mapper
|
18
|
+
compute_client.deserialize(availability_set_mapper, Fog::JSON.decode(body), 'result.body')
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.list_availability_set_response(sdk_compute_client)
|
22
|
+
body = '{
|
23
|
+
"value": [ {
|
24
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myrg1/providers/Microsoft.Compute/availabilitySets/avset1",
|
25
|
+
"name":"myavset1",
|
26
|
+
"type":"Microsoft.Compute/availabilitySets",
|
27
|
+
"location":"westus",
|
28
|
+
"tags": {},
|
29
|
+
"platformUpdateDomainCount":5,
|
30
|
+
"platformFaultDomainCount":3,
|
31
|
+
"virtualMachines":[]
|
32
|
+
} ]
|
33
|
+
}'
|
34
|
+
availability_set_mapper = Azure::ARM::Compute::Models::AvailabilitySetListResult.mapper
|
35
|
+
sdk_compute_client.deserialize(availability_set_mapper, Fog::JSON.decode(body), 'result.body')
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.get_availability_set_response(sdk_compute_client)
|
39
|
+
body = '{
|
40
|
+
"value": [ {
|
41
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myrg1/providers/Microsoft.Compute/availabilitySets/avset1",
|
42
|
+
"name":"myavset1",
|
43
|
+
"type":"Microsoft.Compute/availabilitySets",
|
44
|
+
"location":"westus",
|
45
|
+
"tags": {},
|
46
|
+
"platformUpdateDomainCount":5,
|
47
|
+
"platformFaultDomainCount":3,
|
48
|
+
"virtualMachines":[]
|
49
|
+
} ]
|
50
|
+
}'
|
51
|
+
availability_set_mapper = Azure::ARM::Compute::Models::AvailabilitySet.mapper
|
52
|
+
sdk_compute_client.deserialize(availability_set_mapper, Fog::JSON.decode(body), 'result.body')
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Requests
|
3
|
+
module Compute
|
4
|
+
# Mock class for Managed Disk Requests
|
5
|
+
class ManagedDisk
|
6
|
+
def self.create_or_update_managed_disk_response(compute_client)
|
7
|
+
body = '{
|
8
|
+
"accountType": "Standard_LRS",
|
9
|
+
"properties": {
|
10
|
+
"osType": "Windows",
|
11
|
+
"creationData": {
|
12
|
+
"createOption": "Empty"
|
13
|
+
},
|
14
|
+
"diskSizeGB": 10,
|
15
|
+
"encryptionSettings": {
|
16
|
+
"enabled": true,
|
17
|
+
"diskEncryptionKey": {
|
18
|
+
"sourceVault": {
|
19
|
+
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault"
|
20
|
+
},
|
21
|
+
"secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}"
|
22
|
+
},
|
23
|
+
"keyEncryptionKey": {
|
24
|
+
"sourceVault": {
|
25
|
+
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault"
|
26
|
+
},
|
27
|
+
"keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}"
|
28
|
+
}
|
29
|
+
},
|
30
|
+
"timeCreated": "2016-12-28T02:46:21.3322041+00:00",
|
31
|
+
"provisioningState": "Succeeded",
|
32
|
+
"diskState": "Unattached"
|
33
|
+
},
|
34
|
+
"type": "Microsoft.Compute/disks",
|
35
|
+
"location": "westus",
|
36
|
+
"tags": {
|
37
|
+
"department": "Development",
|
38
|
+
"project": "ManagedDisks"
|
39
|
+
},
|
40
|
+
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1",
|
41
|
+
"name": "myManagedDisk1"
|
42
|
+
}'
|
43
|
+
disk_mapper = Azure::ARM::Compute::Models::Disk.mapper
|
44
|
+
compute_client.deserialize(disk_mapper, Fog::JSON.decode(body), 'result.body')
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.get_managed_disk_response(sdk_compute_client)
|
48
|
+
body = '{
|
49
|
+
"value": [ {
|
50
|
+
"accountType": "Standard_LRS",
|
51
|
+
"properties": {
|
52
|
+
"osType": "Windows",
|
53
|
+
"creationData": {
|
54
|
+
"createOption": "Empty"
|
55
|
+
},
|
56
|
+
"diskSizeGB": 10,
|
57
|
+
"encryptionSettings": {
|
58
|
+
"enabled": true,
|
59
|
+
"diskEncryptionKey": {
|
60
|
+
"sourceVault": {
|
61
|
+
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault"
|
62
|
+
},
|
63
|
+
"secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}"
|
64
|
+
},
|
65
|
+
"keyEncryptionKey": {
|
66
|
+
"sourceVault": {
|
67
|
+
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault"
|
68
|
+
},
|
69
|
+
"keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}"
|
70
|
+
}
|
71
|
+
},
|
72
|
+
"timeCreated": "2016-12-28T02:46:21.3322041+00:00",
|
73
|
+
"provisioningState": "Succeeded",
|
74
|
+
"diskState": "Unattached"
|
75
|
+
},
|
76
|
+
"type": "Microsoft.Compute/disks",
|
77
|
+
"location": "westus",
|
78
|
+
"tags": {
|
79
|
+
"department": "Development",
|
80
|
+
"project": "ManagedDisks"
|
81
|
+
},
|
82
|
+
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1",
|
83
|
+
"name": "myManagedDisk1"
|
84
|
+
} ]
|
85
|
+
}'
|
86
|
+
disk_mapper = Azure::ARM::Compute::Models::Disk.mapper
|
87
|
+
sdk_compute_client.deserialize(disk_mapper, Fog::JSON.decode(body), 'result.body')
|
88
|
+
end
|
89
|
+
|
90
|
+
def self.operation_status_response(sdk_compute_client)
|
91
|
+
response = {
|
92
|
+
'name' => 'xxxx-xxxxx-xxxx',
|
93
|
+
'status' => 'success',
|
94
|
+
'error' => 'ERROR'
|
95
|
+
}
|
96
|
+
response_mapper = Azure::ARM::Compute::Models::OperationStatusResponse.mapper
|
97
|
+
sdk_compute_client.deserialize(response_mapper, response, 'result.body')
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,943 @@
|
|
1
|
+
module ApiStub
|
2
|
+
module Requests
|
3
|
+
module Compute
|
4
|
+
# Mock class for Virtual Machine Requests
|
5
|
+
class VirtualMachine
|
6
|
+
def self.linux_virtual_machine_params
|
7
|
+
{
|
8
|
+
resource_group: 'fog-test-rg',
|
9
|
+
name: 'fog-test-server',
|
10
|
+
location: 'westus',
|
11
|
+
vm_size: 'Basic_A0',
|
12
|
+
storage_account_name: 'fogstrg',
|
13
|
+
username: 'fog',
|
14
|
+
password: 'fog',
|
15
|
+
disable_password_authentication: false,
|
16
|
+
ssh_key_path: '/home',
|
17
|
+
ssh_key_data: 'key',
|
18
|
+
network_interface_card_ids: ['nic-id'],
|
19
|
+
availability_set_id: 'as-id',
|
20
|
+
publisher: 'Canonical',
|
21
|
+
offer: 'UbuntuServer',
|
22
|
+
sku: '14.04.2-LTS',
|
23
|
+
version: 'latest',
|
24
|
+
platform: 'Linux',
|
25
|
+
provision_vm_agent: nil,
|
26
|
+
enable_automatic_updates: nil
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.windows_virtual_machine_params
|
31
|
+
{
|
32
|
+
resource_group: 'fog-test-rg',
|
33
|
+
name: 'fog-test-server',
|
34
|
+
location: 'westus',
|
35
|
+
vm_size: 'Basic_A0',
|
36
|
+
storage_account_name: 'fogstrg',
|
37
|
+
username: 'fog',
|
38
|
+
password: 'fog',
|
39
|
+
disable_password_authentication: nil,
|
40
|
+
ssh_key_path: '/home',
|
41
|
+
ssh_key_data: 'key',
|
42
|
+
network_interface_card_ids: ['nic-id'],
|
43
|
+
availability_set_id: 'as-id',
|
44
|
+
publisher: 'MicrosoftWindowsServerEssentials',
|
45
|
+
offer: 'WindowsServerEssentials',
|
46
|
+
sku: 'WindowsServerEssentials',
|
47
|
+
version: 'latest',
|
48
|
+
platform: 'Windows',
|
49
|
+
provision_vm_agent: true,
|
50
|
+
enable_automatic_updates: true
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.linux_virtual_machine_with_custom_data_params
|
55
|
+
{
|
56
|
+
resource_group: 'fog-test-rg',
|
57
|
+
name: 'fog-test-server',
|
58
|
+
location: 'westus',
|
59
|
+
vm_size: 'Basic_A0',
|
60
|
+
storage_account_name: 'fogstrg',
|
61
|
+
username: 'fog',
|
62
|
+
password: 'fog',
|
63
|
+
disable_password_authentication: false,
|
64
|
+
ssh_key_path: '/home',
|
65
|
+
ssh_key_data: 'key',
|
66
|
+
network_interface_card_ids: ['nic-id'],
|
67
|
+
availability_set_id: 'as-id',
|
68
|
+
publisher: 'Canonical',
|
69
|
+
offer: 'UbuntuServer',
|
70
|
+
sku: '14.04.2-LTS',
|
71
|
+
version: 'latest',
|
72
|
+
platform: 'Linux',
|
73
|
+
provision_vm_agent: nil,
|
74
|
+
enable_automatic_updates: nil,
|
75
|
+
custom_data: 'echo customData'
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
def self.windows_virtual_machine_with_custom_data_params
|
80
|
+
{
|
81
|
+
resource_group: 'fog-test-rg',
|
82
|
+
name: 'fog-test-server',
|
83
|
+
location: 'westus',
|
84
|
+
vm_size: 'Basic_A0',
|
85
|
+
storage_account_name: 'fogstrg',
|
86
|
+
username: 'fog',
|
87
|
+
password: 'fog',
|
88
|
+
disable_password_authentication: nil,
|
89
|
+
ssh_key_path: '/home',
|
90
|
+
ssh_key_data: 'key',
|
91
|
+
network_interface_card_ids: ['nic-id'],
|
92
|
+
availability_set_id: 'as-id',
|
93
|
+
publisher: 'MicrosoftWindowsServerEssentials',
|
94
|
+
offer: 'WindowsServerEssentials',
|
95
|
+
sku: 'WindowsServerEssentials',
|
96
|
+
version: 'latest',
|
97
|
+
platform: 'Windows',
|
98
|
+
provision_vm_agent: true,
|
99
|
+
enable_automatic_updates: true,
|
100
|
+
custom_data: 'echo customData'
|
101
|
+
}
|
102
|
+
end
|
103
|
+
|
104
|
+
def self.linux_virtual_machine_with_custom_image_params
|
105
|
+
{
|
106
|
+
resource_group: 'fog-test-rg',
|
107
|
+
name: 'fog-test-server',
|
108
|
+
location: 'westus',
|
109
|
+
vm_size: 'Basic_A0',
|
110
|
+
storage_account_name: 'fogstrg',
|
111
|
+
username: 'fog',
|
112
|
+
password: 'fog',
|
113
|
+
disable_password_authentication: false,
|
114
|
+
ssh_key_path: '/home',
|
115
|
+
ssh_key_data: 'key',
|
116
|
+
network_interface_card_ids: ['nic-id'],
|
117
|
+
availability_set_id: 'as-id',
|
118
|
+
platform: 'Linux',
|
119
|
+
provision_vm_agent: nil,
|
120
|
+
enable_automatic_updates: nil,
|
121
|
+
vhd_path: 'https://fogstrg.blob.core.windows.net/customvhd/ubuntu-image.vhd'
|
122
|
+
}
|
123
|
+
end
|
124
|
+
|
125
|
+
def self.windows_virtual_machine_with_custom_image_params
|
126
|
+
{
|
127
|
+
resource_group: 'fog-test-rg',
|
128
|
+
name: 'fog-test-server',
|
129
|
+
location: 'westus',
|
130
|
+
vm_size: 'Basic_A0',
|
131
|
+
storage_account_name: 'fogstrg',
|
132
|
+
username: 'fog',
|
133
|
+
password: 'fog',
|
134
|
+
disable_password_authentication: nil,
|
135
|
+
ssh_key_path: '/home',
|
136
|
+
ssh_key_data: 'key',
|
137
|
+
network_interface_card_ids: ['nic-id'],
|
138
|
+
availability_set_id: 'as-id',
|
139
|
+
platform: 'Windows',
|
140
|
+
provision_vm_agent: true,
|
141
|
+
enable_automatic_updates: true,
|
142
|
+
vhd_path: 'https://fogstrg.blob.core.windows.net/customvhd/windows-image.vhd'
|
143
|
+
}
|
144
|
+
end
|
145
|
+
|
146
|
+
def self.create_virtual_machine_response(compute_client)
|
147
|
+
body = '{
|
148
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/fog-test-rg/providers/Microsoft.Compute/virtualMachines/fog-test-server",
|
149
|
+
"name":"fog-test-server",
|
150
|
+
"type":"Microsoft.Compute/virtualMachines",
|
151
|
+
"location":"westus",
|
152
|
+
"tags": {
|
153
|
+
"department":"finance"
|
154
|
+
},
|
155
|
+
"properties": {
|
156
|
+
"availabilitySet": {
|
157
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.Compute/availabilitySets/myav1"
|
158
|
+
},
|
159
|
+
"hardwareProfile": {
|
160
|
+
"vmSize":"Standard_A0"
|
161
|
+
},
|
162
|
+
"storageProfile": {
|
163
|
+
"imageReference": {
|
164
|
+
"publisher":"MicrosoftWindowsServerEssentials",
|
165
|
+
"offer":"WindowsServerEssentials",
|
166
|
+
"sku":"WindowsServerEssentials",
|
167
|
+
"version":"latest"
|
168
|
+
},
|
169
|
+
"osDisk": {
|
170
|
+
"name":"myosdisk1",
|
171
|
+
"vhd": {
|
172
|
+
"uri":"http://mystorage1.blob.core.windows.net/vhds/myosdisk1.vhd"
|
173
|
+
},
|
174
|
+
"caching":"ReadWrite",
|
175
|
+
"createOption":"FromImage"
|
176
|
+
},
|
177
|
+
"dataDisks": [ {
|
178
|
+
"name":"mydatadisk1",
|
179
|
+
"diskSizeGB":"1",
|
180
|
+
"lun": 0,
|
181
|
+
"vhd": {
|
182
|
+
"uri" : "http://mystorage1.blob.core.windows.net/vhds/mydatadisk1.vhd"
|
183
|
+
},
|
184
|
+
"createOption":"Empty"
|
185
|
+
} ]
|
186
|
+
},
|
187
|
+
"osProfile": {
|
188
|
+
"computerName":"fog-test-server",
|
189
|
+
"adminUsername":"fog",
|
190
|
+
"adminPassword":"fog",
|
191
|
+
"customData":"",
|
192
|
+
"windowsConfiguration": {
|
193
|
+
"provisionVMAgent":true,
|
194
|
+
"winRM": {
|
195
|
+
"listeners": [ {
|
196
|
+
"protocol": "https",
|
197
|
+
"certificateUrl": "url-to-certificate"
|
198
|
+
} ]
|
199
|
+
},
|
200
|
+
"enableAutomaticUpdates":true
|
201
|
+
},
|
202
|
+
"secrets":[ {
|
203
|
+
"sourceVault": {
|
204
|
+
"id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"
|
205
|
+
},
|
206
|
+
"vaultCertificates": [ {
|
207
|
+
"certificateUrl": "https://myvault1.vault.azure.net/secrets/{secretName}/{secretVersion}",
|
208
|
+
"certificateStore": "{certificateStoreName}"
|
209
|
+
} ]
|
210
|
+
} ]
|
211
|
+
},
|
212
|
+
"networkProfile": {
|
213
|
+
"networkInterfaces": [ {
|
214
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourceGroup1/providers /Microsoft.Network/networkInterfaces/mynic1"
|
215
|
+
} ]
|
216
|
+
}
|
217
|
+
}
|
218
|
+
}'
|
219
|
+
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
220
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
221
|
+
end
|
222
|
+
|
223
|
+
def self.create_virtual_machine_with_custom_data_response(compute_client)
|
224
|
+
body = '{
|
225
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/fog-test-rg/providers/Microsoft.Compute/virtualMachines/fog-test-server",
|
226
|
+
"name":"fog-test-server",
|
227
|
+
"type":"Microsoft.Compute/virtualMachines",
|
228
|
+
"location":"westus",
|
229
|
+
"tags": {
|
230
|
+
"department":"finance"
|
231
|
+
},
|
232
|
+
"properties": {
|
233
|
+
"availabilitySet": {
|
234
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.Compute/availabilitySets/myav1"
|
235
|
+
},
|
236
|
+
"hardwareProfile": {
|
237
|
+
"vmSize":"Standard_A0"
|
238
|
+
},
|
239
|
+
"storageProfile": {
|
240
|
+
"imageReference": {
|
241
|
+
"publisher":"MicrosoftWindowsServerEssentials",
|
242
|
+
"offer":"WindowsServerEssentials",
|
243
|
+
"sku":"WindowsServerEssentials",
|
244
|
+
"version":"latest"
|
245
|
+
},
|
246
|
+
"osDisk": {
|
247
|
+
"name":"myosdisk1",
|
248
|
+
"vhd": {
|
249
|
+
"uri":"http://mystorage1.blob.core.windows.net/vhds/myosdisk1.vhd"
|
250
|
+
},
|
251
|
+
"caching":"ReadWrite",
|
252
|
+
"createOption":"FromImage"
|
253
|
+
},
|
254
|
+
"dataDisks": [ {
|
255
|
+
"name":"mydatadisk1",
|
256
|
+
"diskSizeGB":"1",
|
257
|
+
"lun": 0,
|
258
|
+
"vhd": {
|
259
|
+
"uri" : "http://mystorage1.blob.core.windows.net/vhds/mydatadisk1.vhd"
|
260
|
+
},
|
261
|
+
"createOption":"Empty"
|
262
|
+
} ]
|
263
|
+
},
|
264
|
+
"osProfile": {
|
265
|
+
"computerName":"fog-test-server",
|
266
|
+
"adminUsername":"fog",
|
267
|
+
"adminPassword":"fog",
|
268
|
+
"customData":"ZWNobyBjdXN0b21EYXRh",
|
269
|
+
"windowsConfiguration": {
|
270
|
+
"provisionVMAgent":true,
|
271
|
+
"winRM": {
|
272
|
+
"listeners": [ {
|
273
|
+
"protocol": "https",
|
274
|
+
"certificateUrl": "url-to-certificate"
|
275
|
+
} ]
|
276
|
+
},
|
277
|
+
"enableAutomaticUpdates":true
|
278
|
+
},
|
279
|
+
"secrets":[ {
|
280
|
+
"sourceVault": {
|
281
|
+
"id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"
|
282
|
+
},
|
283
|
+
"vaultCertificates": [ {
|
284
|
+
"certificateUrl": "https://myvault1.vault.azure.net/secrets/{secretName}/{secretVersion}",
|
285
|
+
"certificateStore": "{certificateStoreName}"
|
286
|
+
} ]
|
287
|
+
} ]
|
288
|
+
},
|
289
|
+
"networkProfile": {
|
290
|
+
"networkInterfaces": [ {
|
291
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourceGroup1/providers /Microsoft.Network/networkInterfaces/mynic1"
|
292
|
+
} ]
|
293
|
+
}
|
294
|
+
}
|
295
|
+
}'
|
296
|
+
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
297
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
298
|
+
end
|
299
|
+
|
300
|
+
def self.create_virtual_machine_from_custom_image_response(compute_client)
|
301
|
+
body = '{
|
302
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/fog-test-rg/providers/Microsoft.Compute/virtualMachines/fog-test-server",
|
303
|
+
"name":"fog-test-server",
|
304
|
+
"type":"Microsoft.Compute/virtualMachines",
|
305
|
+
"location":"westus",
|
306
|
+
"tags": {
|
307
|
+
"department":"finance"
|
308
|
+
},
|
309
|
+
"properties": {
|
310
|
+
"availabilitySet": {
|
311
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.Compute/availabilitySets/myav1"
|
312
|
+
},
|
313
|
+
"hardwareProfile": {
|
314
|
+
"vmSize":"Standard_A0"
|
315
|
+
},
|
316
|
+
"storageProfile": {
|
317
|
+
"imageReference": {
|
318
|
+
"publisher":"",
|
319
|
+
"offer":"",
|
320
|
+
"sku":"",
|
321
|
+
"version":""
|
322
|
+
},
|
323
|
+
"osDisk": {
|
324
|
+
"name":"myosdisk1",
|
325
|
+
"vhd": {
|
326
|
+
"uri":"https://custimagestorage.blob.core.windows.net/customimage/trusty-server-cloudimg-amd64-disk1.vhd"
|
327
|
+
},
|
328
|
+
"caching":"ReadWrite",
|
329
|
+
"createOption":"FromImage"
|
330
|
+
},
|
331
|
+
"dataDisks": [ {
|
332
|
+
"name":"mydatadisk1",
|
333
|
+
"diskSizeGB":"1",
|
334
|
+
"lun": 0,
|
335
|
+
"vhd": {
|
336
|
+
"uri" : "http://mystorage1.blob.core.windows.net/vhds/mydatadisk1.vhd"
|
337
|
+
},
|
338
|
+
"createOption":"Empty"
|
339
|
+
} ]
|
340
|
+
},
|
341
|
+
"osProfile": {
|
342
|
+
"computerName":"fog-test-server",
|
343
|
+
"adminUsername":"fog",
|
344
|
+
"adminPassword":"fog",
|
345
|
+
"customData":"",
|
346
|
+
"windowsConfiguration": {
|
347
|
+
"provisionVMAgent":true,
|
348
|
+
"winRM": {
|
349
|
+
"listeners": [ {
|
350
|
+
"protocol": "https",
|
351
|
+
"certificateUrl": "url-to-certificate"
|
352
|
+
} ]
|
353
|
+
},
|
354
|
+
"enableAutomaticUpdates":true
|
355
|
+
},
|
356
|
+
"secrets":[ {
|
357
|
+
"sourceVault": {
|
358
|
+
"id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"
|
359
|
+
},
|
360
|
+
"vaultCertificates": [ {
|
361
|
+
"certificateUrl": "https://myvault1.vault.azure.net/secrets/{secretName}/{secretVersion}",
|
362
|
+
"certificateStore": "{certificateStoreName}"
|
363
|
+
} ]
|
364
|
+
} ]
|
365
|
+
},
|
366
|
+
"networkProfile": {
|
367
|
+
"networkInterfaces": [ {
|
368
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourceGroup1/providers /Microsoft.Network/networkInterfaces/mynic1"
|
369
|
+
} ]
|
370
|
+
}
|
371
|
+
}
|
372
|
+
}'
|
373
|
+
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
374
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
375
|
+
end
|
376
|
+
|
377
|
+
def self.detach_data_disk_from_vm_response(compute_client)
|
378
|
+
body = '{
|
379
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/fog-test-rg/providers/Microsoft.Compute/virtualMachines/fog-test-server",
|
380
|
+
"name":"fog-test-server",
|
381
|
+
"type":"Microsoft.Compute/virtualMachines",
|
382
|
+
"location":"westus",
|
383
|
+
"tags": {
|
384
|
+
"department":"finance"
|
385
|
+
},
|
386
|
+
"properties": {
|
387
|
+
"availabilitySet": {
|
388
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.Compute/availabilitySets/myav1"
|
389
|
+
},
|
390
|
+
"hardwareProfile": {
|
391
|
+
"vmSize":"Standard_A0"
|
392
|
+
},
|
393
|
+
"storageProfile": {
|
394
|
+
"imageReference": {
|
395
|
+
"publisher":"MicrosoftWindowsServerEssentials",
|
396
|
+
"offer":"WindowsServerEssentials",
|
397
|
+
"sku":"WindowsServerEssentials",
|
398
|
+
"version":"latest"
|
399
|
+
},
|
400
|
+
"osDisk": {
|
401
|
+
"name":"myosdisk1",
|
402
|
+
"vhd": {
|
403
|
+
"uri":"http://mystorage1.blob.core.windows.net/vhds/myosdisk1.vhd"
|
404
|
+
},
|
405
|
+
"caching":"ReadWrite",
|
406
|
+
"createOption":"FromImage"
|
407
|
+
},
|
408
|
+
"dataDisks": []
|
409
|
+
},
|
410
|
+
"osProfile": {
|
411
|
+
"computerName":"fog-test-server",
|
412
|
+
"adminUsername":"fog",
|
413
|
+
"adminPassword":"fog",
|
414
|
+
"customData":"",
|
415
|
+
"windowsConfiguration": {
|
416
|
+
"provisionVMAgent":true,
|
417
|
+
"winRM": {
|
418
|
+
"listeners": [ {
|
419
|
+
"protocol": "https",
|
420
|
+
"certificateUrl": "url-to-certificate"
|
421
|
+
} ]
|
422
|
+
},
|
423
|
+
"enableAutomaticUpdates":true
|
424
|
+
},
|
425
|
+
"secrets":[ {
|
426
|
+
"sourceVault": {
|
427
|
+
"id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"
|
428
|
+
},
|
429
|
+
"vaultCertificates": [ {
|
430
|
+
"certificateUrl": "https://myvault1.vault.azure.net/secrets/{secretName}/{secretVersion}",
|
431
|
+
"certificateStore": "{certificateStoreName}"
|
432
|
+
} ]
|
433
|
+
} ]
|
434
|
+
},
|
435
|
+
"networkProfile": {
|
436
|
+
"networkInterfaces": [ {
|
437
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourceGroup1/providers /Microsoft.Network/networkInterfaces/mynic1"
|
438
|
+
} ]
|
439
|
+
}
|
440
|
+
}
|
441
|
+
}'
|
442
|
+
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
443
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
444
|
+
end
|
445
|
+
|
446
|
+
def self.virtual_machine_response(compute_client)
|
447
|
+
body = {
|
448
|
+
'location' => 'westus',
|
449
|
+
'id' => '/subscriptions/{subscription-id}/resourceGroups/fog-test-rg/providers/Microsoft.Compute/virtualMachines/fog-test-server',
|
450
|
+
'name' => 'fog-test-server',
|
451
|
+
'type' => 'Microsoft.Compute/virtualMachines',
|
452
|
+
'tags' =>
|
453
|
+
{
|
454
|
+
'department' => 'finance'
|
455
|
+
},
|
456
|
+
'properties' =>
|
457
|
+
{
|
458
|
+
'hardwareProfile' =>
|
459
|
+
{
|
460
|
+
'vmSize' => 'Standard_A0'
|
461
|
+
},
|
462
|
+
'storageProfile' =>
|
463
|
+
{
|
464
|
+
'imageReference' =>
|
465
|
+
{
|
466
|
+
'publisher' => 'MicrosoftWindowsServerEssentials',
|
467
|
+
'offer' => 'WindowsServerEssentials',
|
468
|
+
'sku' => 'WindowsServerEssentials',
|
469
|
+
'version' => 'latest'
|
470
|
+
},
|
471
|
+
'osDisk' =>
|
472
|
+
{
|
473
|
+
'name' => 'myosdisk1',
|
474
|
+
'vhd' =>
|
475
|
+
{
|
476
|
+
'uri' => 'http://mystorage1.blob.core.windows.net/vhds/myosdisk1.vhd'
|
477
|
+
},
|
478
|
+
'createOption' => 'FromImage',
|
479
|
+
'caching' => 'ReadWrite'
|
480
|
+
},
|
481
|
+
'dataDisks' =>
|
482
|
+
[
|
483
|
+
{
|
484
|
+
'lun' => 0,
|
485
|
+
'name' => 'mydatadisk1',
|
486
|
+
'vhd' =>
|
487
|
+
{
|
488
|
+
'uri' => 'http://mystorage1.blob.core.windows.net/vhds/mydatadisk1.vhd'
|
489
|
+
},
|
490
|
+
'createOption' => 'Empty',
|
491
|
+
'diskSizeGB' => 1
|
492
|
+
}
|
493
|
+
]
|
494
|
+
},
|
495
|
+
'osProfile' =>
|
496
|
+
{
|
497
|
+
'computerName' => 'fog-test-server',
|
498
|
+
'adminUsername' => 'fog',
|
499
|
+
'adminPassword' => 'fog',
|
500
|
+
'customData' => '',
|
501
|
+
'windowsConfiguration' =>
|
502
|
+
{
|
503
|
+
'provisionVMAgent' => true,
|
504
|
+
'enableAutomaticUpdates' => true,
|
505
|
+
'winRM' =>
|
506
|
+
{
|
507
|
+
'listeners' =>
|
508
|
+
[
|
509
|
+
{
|
510
|
+
'protocol' => 'https',
|
511
|
+
'certificateUrl' => 'url-to-certificate'
|
512
|
+
}
|
513
|
+
]
|
514
|
+
}
|
515
|
+
},
|
516
|
+
'secrets' =>
|
517
|
+
[
|
518
|
+
{
|
519
|
+
'sourceVault' =>
|
520
|
+
{
|
521
|
+
'id' => '/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1'
|
522
|
+
},
|
523
|
+
'vaultCertificates' =>
|
524
|
+
[
|
525
|
+
{
|
526
|
+
'certificateUrl' => 'https://myvault1.vault.azure.net/secrets/{secretName}/{secretVersion}',
|
527
|
+
'certificateStore' => '{certificateStoreName}'
|
528
|
+
}
|
529
|
+
]
|
530
|
+
}
|
531
|
+
]
|
532
|
+
},
|
533
|
+
'networkProfile' =>
|
534
|
+
{
|
535
|
+
'networkInterfaces' =>
|
536
|
+
[
|
537
|
+
{
|
538
|
+
'id' => '/subscriptions/{subscription-id}/resourceGroups/myresourceGroup1/providers /Microsoft.Network/networkInterfaces/mynic1'
|
539
|
+
}
|
540
|
+
]
|
541
|
+
},
|
542
|
+
'availabilitySet' =>
|
543
|
+
{
|
544
|
+
'id' => '/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.Compute/availabilitySets/myav1'
|
545
|
+
}
|
546
|
+
}
|
547
|
+
}
|
548
|
+
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
549
|
+
compute_client.deserialize(vm_mapper, body, 'result.body')
|
550
|
+
end
|
551
|
+
|
552
|
+
def self.list_virtual_machines_response(compute_client)
|
553
|
+
body = '{
|
554
|
+
"value": [
|
555
|
+
{
|
556
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/fog-test-rg/providers/Microsoft.Compute/virtualMachines/fog-test-server",
|
557
|
+
"name":"fog-test-server",
|
558
|
+
"type":"Microsoft.Compute/virtualMachines",
|
559
|
+
"location":"westus",
|
560
|
+
"tags": {
|
561
|
+
"department":"finance"
|
562
|
+
},
|
563
|
+
"properties": {
|
564
|
+
"availabilitySet": {
|
565
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.Compute/availabilitySets/myav1"
|
566
|
+
},
|
567
|
+
"hardwareProfile": {
|
568
|
+
"vmSize":"Standard_A0"
|
569
|
+
},
|
570
|
+
"storageProfile": {
|
571
|
+
"imageReference": {
|
572
|
+
"publisher":"MicrosoftWindowsServerEssentials",
|
573
|
+
"offer":"WindowsServerEssentials",
|
574
|
+
"sku":"WindowsServerEssentials",
|
575
|
+
"version":"latest"
|
576
|
+
},
|
577
|
+
"osDisk": {
|
578
|
+
"name":"myosdisk1",
|
579
|
+
"vhd": {
|
580
|
+
"uri":"http://mystorage1.blob.core.windows.net/vhds/myosdisk1.vhd"
|
581
|
+
},
|
582
|
+
"caching":"ReadWrite",
|
583
|
+
"createOption":"FromImage"
|
584
|
+
},
|
585
|
+
"dataDisks": [ {
|
586
|
+
"name":"mydatadisk1",
|
587
|
+
"diskSizeGB":"1",
|
588
|
+
"lun": 0,
|
589
|
+
"vhd": {
|
590
|
+
"uri" : "http://mystorage1.blob.core.windows.net/vhds/mydatadisk1.vhd"
|
591
|
+
},
|
592
|
+
"createOption":"Empty"
|
593
|
+
} ]
|
594
|
+
},
|
595
|
+
"osProfile": {
|
596
|
+
"computerName":"fog-test-server",
|
597
|
+
"adminUsername":"fog",
|
598
|
+
"adminPassword":"fog",
|
599
|
+
"customData":"",
|
600
|
+
"windowsConfiguration": {
|
601
|
+
"provisionVMAgent":true,
|
602
|
+
"winRM": {
|
603
|
+
"listeners": [ {
|
604
|
+
"protocol": "https",
|
605
|
+
"certificateUrl": "url-to-certificate"
|
606
|
+
} ]
|
607
|
+
},
|
608
|
+
"enableAutomaticUpdates":true
|
609
|
+
},
|
610
|
+
"secrets":[ {
|
611
|
+
"sourceVault": {
|
612
|
+
"id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"
|
613
|
+
},
|
614
|
+
"vaultCertificates": [ {
|
615
|
+
"certificateUrl": "https://myvault1.vault.azure.net/secrets/{secretName}/{secretVersion}",
|
616
|
+
"certificateStore": "{certificateStoreName}"
|
617
|
+
} ]
|
618
|
+
} ]
|
619
|
+
},
|
620
|
+
"networkProfile": {
|
621
|
+
"networkInterfaces": [ {
|
622
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourceGroup1/providers /Microsoft.Network/networkInterfaces/mynic1"
|
623
|
+
} ]
|
624
|
+
}
|
625
|
+
}
|
626
|
+
}
|
627
|
+
]
|
628
|
+
}'
|
629
|
+
vm_mapper = Azure::ARM::Compute::Models::VirtualMachineListResult.mapper
|
630
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
631
|
+
end
|
632
|
+
|
633
|
+
def self.list_available_sizes_for_virtual_machine_response(compute_client)
|
634
|
+
body = '{
|
635
|
+
"value": [
|
636
|
+
{
|
637
|
+
"name": "Standard_A0",
|
638
|
+
"numberOfCores": 1,
|
639
|
+
"osDiskSizeInMB": 130048,
|
640
|
+
"resourceDiskSizeInMB": 20480,
|
641
|
+
"memoryInMB": 768,
|
642
|
+
"maxDataDiskCount": 1
|
643
|
+
}
|
644
|
+
]
|
645
|
+
}'
|
646
|
+
vm_mapper = Azure::ARM::Compute::Models::VirtualMachineSizeListResult.mapper
|
647
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
648
|
+
end
|
649
|
+
|
650
|
+
def self.virtual_machine_instance_view_response(compute_client)
|
651
|
+
body = '{
|
652
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/fog-test-rg/providers/Microsoft.Compute/virtualMachines/fog-test-server",
|
653
|
+
"name":"fog-test-server",
|
654
|
+
"type":"Microsoft.Compute/virtualMachines",
|
655
|
+
"location":"westus",
|
656
|
+
"tags": {
|
657
|
+
"department":"finance"
|
658
|
+
},
|
659
|
+
"properties":
|
660
|
+
{
|
661
|
+
"instanceView":
|
662
|
+
{
|
663
|
+
"platformUpdateDomain": 0,
|
664
|
+
"platformFaultDomain": 0,
|
665
|
+
"vmAgent":
|
666
|
+
{
|
667
|
+
"vmAgentVersion": "2.5.1198.709",
|
668
|
+
"statuses": [
|
669
|
+
{
|
670
|
+
"code": "ProvisioningState/succeeded",
|
671
|
+
"level": "Info",
|
672
|
+
"displayStatus": "Ready",
|
673
|
+
"message": "GuestAgent is running and accepting new configurations.",
|
674
|
+
"time": "2015-04-21T11:42:44-07:00"
|
675
|
+
}]
|
676
|
+
},
|
677
|
+
"disks": [
|
678
|
+
{
|
679
|
+
"name": "msvm-os-20150410-074408-487548",
|
680
|
+
"statuses": [
|
681
|
+
{
|
682
|
+
"code": "ProvisioningState/succeeded",
|
683
|
+
"level": "Info",
|
684
|
+
"displayStatus": "Provisioning succeeded",
|
685
|
+
"time": "2015-04-10T12:44:10.4562812-07:00"
|
686
|
+
}]
|
687
|
+
}],
|
688
|
+
"statuses": [
|
689
|
+
{
|
690
|
+
"code": "ProvisioningState/succeeded",
|
691
|
+
"level": "Info",
|
692
|
+
"displayStatus": "Provisioning succeeded",
|
693
|
+
"time": "2015-04-10T12:50:09.0031588-07:00"
|
694
|
+
},
|
695
|
+
{
|
696
|
+
"code": "PowerState/running",
|
697
|
+
"level": "Info",
|
698
|
+
"displayStatus": "VM running"
|
699
|
+
}]
|
700
|
+
}
|
701
|
+
}
|
702
|
+
}'
|
703
|
+
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
704
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
705
|
+
end
|
706
|
+
|
707
|
+
def self.vm_status_response
|
708
|
+
'running'
|
709
|
+
end
|
710
|
+
|
711
|
+
def self.update_virtual_machine_response(compute_client)
|
712
|
+
body = '
|
713
|
+
{
|
714
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/fog-test-rg/providers/Microsoft.Compute/virtualMachines/fog-test-server",
|
715
|
+
"name":"fog-test-server",
|
716
|
+
"type":"Microsoft.Compute/virtualMachines",
|
717
|
+
"location":"westus",
|
718
|
+
"tags": {
|
719
|
+
"department":"finance"
|
720
|
+
},
|
721
|
+
"properties": {
|
722
|
+
"availabilitySet": {
|
723
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.Compute/availabilitySets/myav1"
|
724
|
+
},
|
725
|
+
"hardwareProfile": {
|
726
|
+
"vmSize":"Standard_A0"
|
727
|
+
},
|
728
|
+
"storageProfile": {
|
729
|
+
"imageReference": {
|
730
|
+
"publisher":"MicrosoftWindowsServerEssentials",
|
731
|
+
"offer":"WindowsServerEssentials",
|
732
|
+
"sku":"WindowsServerEssentials",
|
733
|
+
"version":"latest"
|
734
|
+
},
|
735
|
+
"osDisk": {
|
736
|
+
"name":"myosdisk1",
|
737
|
+
"vhd": {
|
738
|
+
"uri":"http://mystorage1.blob.core.windows.net/vhds/myosdisk1.vhd"
|
739
|
+
},
|
740
|
+
"caching":"ReadWrite",
|
741
|
+
"createOption":"FromImage"
|
742
|
+
},
|
743
|
+
"dataDisks": [ {
|
744
|
+
"name":"mydatadisk1",
|
745
|
+
"diskSizeGB":"1",
|
746
|
+
"lun": 0,
|
747
|
+
"vhd": {
|
748
|
+
"uri" : "http://mystorage1.blob.core.windows.net/vhds/mydatadisk1.vhd"
|
749
|
+
},
|
750
|
+
"createOption":"Empty"
|
751
|
+
},
|
752
|
+
{
|
753
|
+
"name":"disk1",
|
754
|
+
"diskSizeGB":"1",
|
755
|
+
"lun": 0,
|
756
|
+
"vhd": {
|
757
|
+
"uri" : "http://mystorage1.blob.core.windows.net/vhds/mydatadisk1.vhd"
|
758
|
+
},
|
759
|
+
"createOption":"Empty"
|
760
|
+
}]
|
761
|
+
},
|
762
|
+
"osProfile": {
|
763
|
+
"computerName":"fog-test-server",
|
764
|
+
"adminUsername":"fog",
|
765
|
+
"adminPassword":"fog",
|
766
|
+
"customData":"",
|
767
|
+
"windowsConfiguration": {
|
768
|
+
"provisionVMAgent":true,
|
769
|
+
"winRM": {
|
770
|
+
"listeners": [ {
|
771
|
+
"protocol": "https",
|
772
|
+
"certificateUrl": "url-to-certificate"
|
773
|
+
} ]
|
774
|
+
},
|
775
|
+
"enableAutomaticUpdates":true
|
776
|
+
},
|
777
|
+
"secrets":[ {
|
778
|
+
"sourceVault": {
|
779
|
+
"id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"
|
780
|
+
},
|
781
|
+
"vaultCertificates": [ {
|
782
|
+
"certificateUrl": "https://myvault1.vault.azure.net/secrets/{secretName}/{secretVersion}",
|
783
|
+
"certificateStore": "{certificateStoreName}"
|
784
|
+
} ]
|
785
|
+
} ]
|
786
|
+
},
|
787
|
+
"networkProfile": {
|
788
|
+
"networkInterfaces": [ {
|
789
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourceGroup1/providers /Microsoft.Network/networkInterfaces/mynic1"
|
790
|
+
} ]
|
791
|
+
}
|
792
|
+
}
|
793
|
+
}'
|
794
|
+
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
795
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
796
|
+
end
|
797
|
+
|
798
|
+
def self.virtual_machine_15_data_disks_response(compute_client)
|
799
|
+
body = '
|
800
|
+
{
|
801
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/fog-test-rg/providers/Microsoft.Compute/virtualMachines/fog-test-server",
|
802
|
+
"name":"fog-test-server",
|
803
|
+
"type":"Microsoft.Compute/virtualMachines",
|
804
|
+
"location":"westus",
|
805
|
+
"tags": {
|
806
|
+
"department":"finance"
|
807
|
+
},
|
808
|
+
"properties": {
|
809
|
+
"availabilitySet": {
|
810
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.Compute/availabilitySets/myav1"
|
811
|
+
},
|
812
|
+
"hardwareProfile": {
|
813
|
+
"vmSize":"Standard_A0"
|
814
|
+
},
|
815
|
+
"storageProfile": {
|
816
|
+
"imageReference": {
|
817
|
+
"publisher":"MicrosoftWindowsServerEssentials",
|
818
|
+
"offer":"WindowsServerEssentials",
|
819
|
+
"sku":"WindowsServerEssentials",
|
820
|
+
"version":"latest"
|
821
|
+
},
|
822
|
+
"osDisk": {
|
823
|
+
"name":"myosdisk1",
|
824
|
+
"vhd": {
|
825
|
+
"uri":"http://mystorage1.blob.core.windows.net/vhds/myosdisk1.vhd"
|
826
|
+
},
|
827
|
+
"caching":"ReadWrite",
|
828
|
+
"createOption":"FromImage"
|
829
|
+
},
|
830
|
+
"dataDisks": [ {
|
831
|
+
"name":"mydatadisk1",
|
832
|
+
"diskSizeGB":"1",
|
833
|
+
"lun": 0,
|
834
|
+
"vhd": {
|
835
|
+
"uri" : "http://mystorage1.blob.core.windows.net/vhds/mydatadisk1.vhd"
|
836
|
+
},
|
837
|
+
"createOption":"Empty"
|
838
|
+
},
|
839
|
+
{
|
840
|
+
"name":"disk1",
|
841
|
+
"diskSizeGB":"1",
|
842
|
+
"lun": 1,
|
843
|
+
"vhd": {
|
844
|
+
"uri" : "http://mystorage1.blob.core.windows.net/vhds/mydatadisk1.vhd"
|
845
|
+
},
|
846
|
+
"createOption":"Empty"
|
847
|
+
},
|
848
|
+
{
|
849
|
+
"name":"disk2",
|
850
|
+
"lun": 2
|
851
|
+
},
|
852
|
+
{
|
853
|
+
"name":"disk3",
|
854
|
+
"lun": 3
|
855
|
+
},
|
856
|
+
{
|
857
|
+
"name":"disk3",
|
858
|
+
"lun": 4
|
859
|
+
},
|
860
|
+
{
|
861
|
+
"name":"disk4",
|
862
|
+
"lun": 5
|
863
|
+
},
|
864
|
+
{
|
865
|
+
"name":"disk5",
|
866
|
+
"lun": 6
|
867
|
+
},
|
868
|
+
{
|
869
|
+
"name":"disk6",
|
870
|
+
"lun": 7
|
871
|
+
},
|
872
|
+
{
|
873
|
+
"name":"disk7",
|
874
|
+
"lun": 8
|
875
|
+
},
|
876
|
+
{
|
877
|
+
"name":"disk8",
|
878
|
+
"lun": 9
|
879
|
+
},
|
880
|
+
{
|
881
|
+
"name":"disk9",
|
882
|
+
"lun": 10
|
883
|
+
},
|
884
|
+
{
|
885
|
+
"name":"disk10",
|
886
|
+
"lun": 11
|
887
|
+
},
|
888
|
+
{
|
889
|
+
"name":"disk11",
|
890
|
+
"lun": 12
|
891
|
+
},
|
892
|
+
{
|
893
|
+
"name":"disk12",
|
894
|
+
"lun": 13
|
895
|
+
},
|
896
|
+
{
|
897
|
+
"name":"disk13",
|
898
|
+
"lun": 14
|
899
|
+
},
|
900
|
+
{
|
901
|
+
"name":"disk14",
|
902
|
+
"lun": 15
|
903
|
+
}]
|
904
|
+
},
|
905
|
+
"osProfile": {
|
906
|
+
"computerName":"fog-test-server",
|
907
|
+
"adminUsername":"fog",
|
908
|
+
"adminPassword":"fog",
|
909
|
+
"customData":"",
|
910
|
+
"windowsConfiguration": {
|
911
|
+
"provisionVMAgent":true,
|
912
|
+
"winRM": {
|
913
|
+
"listeners": [ {
|
914
|
+
"protocol": "https",
|
915
|
+
"certificateUrl": "url-to-certificate"
|
916
|
+
} ]
|
917
|
+
},
|
918
|
+
"enableAutomaticUpdates":true
|
919
|
+
},
|
920
|
+
"secrets":[ {
|
921
|
+
"sourceVault": {
|
922
|
+
"id": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1"
|
923
|
+
},
|
924
|
+
"vaultCertificates": [ {
|
925
|
+
"certificateUrl": "https://myvault1.vault.azure.net/secrets/{secretName}/{secretVersion}",
|
926
|
+
"certificateStore": "{certificateStoreName}"
|
927
|
+
} ]
|
928
|
+
} ]
|
929
|
+
},
|
930
|
+
"networkProfile": {
|
931
|
+
"networkInterfaces": [ {
|
932
|
+
"id":"/subscriptions/{subscription-id}/resourceGroups/myresourceGroup1/providers /Microsoft.Network/networkInterfaces/mynic1"
|
933
|
+
} ]
|
934
|
+
}
|
935
|
+
}
|
936
|
+
}'
|
937
|
+
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
938
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
939
|
+
end
|
940
|
+
end
|
941
|
+
end
|
942
|
+
end
|
943
|
+
end
|