fog 1.21.0 → 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +3 -0
- data/.travis.yml +4 -2
- data/.yardopts +1 -0
- data/CHANGELOG.md +8278 -0
- data/CONTRIBUTORS.md +37 -0
- data/Gemfile +2 -0
- data/RELEASE.md +2 -1
- data/Rakefile +4 -1
- data/fog.gemspec +4 -5
- data/gemfiles/Gemfile-edge +17 -0
- data/{Gemfile.1.8.7 → gemfiles/Gemfile-ruby-1.8.7} +4 -1
- data/lib/fog/aws/core.rb +0 -9
- data/lib/fog/aws/dynamodb.rb +0 -1
- data/lib/fog/aws/iam.rb +29 -5
- data/lib/fog/aws/parsers/compute/describe_dhcp_options.rb +1 -2
- data/lib/fog/aws/parsers/iam/list_mfa_devices.rb +34 -0
- data/lib/fog/aws/requests/compute/run_instances.rb +8 -2
- data/lib/fog/aws/requests/data_pipeline/describe_objects.rb +5 -4
- data/lib/fog/aws/requests/iam/list_mfa_devices.rb +55 -0
- data/lib/fog/aws/storage.rb +0 -9
- data/lib/fog/cloudsigma/docs/getting_started.md +2 -2
- data/lib/fog/cloudstack/models/compute/servers.rb +3 -0
- data/lib/fog/ecloud/compute.rb +1 -1
- data/lib/fog/fogdocker/requests/compute/container_action.rb +1 -1
- data/lib/fog/fogdocker/requests/compute/container_all.rb +1 -1
- data/lib/fog/fogdocker/requests/compute/container_commit.rb +1 -1
- data/lib/fog/fogdocker/requests/compute/container_create.rb +1 -1
- data/lib/fog/fogdocker/requests/compute/container_get.rb +1 -1
- data/lib/fog/fogdocker/requests/compute/image_all.rb +1 -1
- data/lib/fog/fogdocker/requests/compute/image_create.rb +1 -1
- data/lib/fog/fogdocker/requests/compute/image_get.rb +1 -1
- data/lib/fog/glesys/compute.rb +6 -6
- data/lib/fog/google/README.md +1 -1
- data/lib/fog/google/compute.rb +63 -3
- data/lib/fog/google/examples/create.rb +1 -1
- data/lib/fog/google/examples/eric-fail.rb +13 -7
- data/lib/fog/google/examples/load-balance.rb +100 -0
- data/lib/fog/google/models/compute/address.rb +62 -0
- data/lib/fog/google/models/compute/addresses.rb +34 -0
- data/lib/fog/google/models/compute/disk.rb +13 -5
- data/lib/fog/google/models/compute/firewall.rb +48 -0
- data/lib/fog/google/models/compute/firewalls.rb +27 -0
- data/lib/fog/google/models/compute/flavor.rb +16 -5
- data/lib/fog/google/models/compute/flavors.rb +10 -4
- data/lib/fog/google/models/compute/forwarding_rule.rb +88 -0
- data/lib/fog/google/models/compute/forwarding_rules.rb +45 -0
- data/lib/fog/google/models/compute/http_health_check.rb +85 -0
- data/lib/fog/google/models/compute/http_health_checks.rb +26 -0
- data/lib/fog/google/models/compute/network.rb +45 -0
- data/lib/fog/google/models/compute/networks.rb +27 -0
- data/lib/fog/google/models/compute/operation.rb +41 -5
- data/lib/fog/google/models/compute/operations.rb +18 -3
- data/lib/fog/google/models/compute/project.rb +32 -0
- data/lib/fog/google/models/compute/projects.rb +22 -0
- data/lib/fog/google/models/compute/region.rb +34 -0
- data/lib/fog/google/models/compute/regions.rb +27 -0
- data/lib/fog/google/models/compute/route.rb +52 -0
- data/lib/fog/google/models/compute/routes.rb +27 -0
- data/lib/fog/google/models/compute/server.rb +24 -7
- data/lib/fog/google/models/compute/servers.rb +2 -2
- data/lib/fog/google/models/compute/snapshot.rb +22 -7
- data/lib/fog/google/models/compute/snapshots.rb +4 -2
- data/lib/fog/google/models/compute/target_pool.rb +112 -0
- data/lib/fog/google/models/compute/target_pools.rb +45 -0
- data/lib/fog/google/requests/compute/add_target_pool_health_checks.rb +34 -0
- data/lib/fog/google/requests/compute/add_target_pool_instances.rb +34 -0
- data/lib/fog/google/requests/compute/delete_forwarding_rule.rb +36 -0
- data/lib/fog/google/requests/compute/delete_http_health_check.rb +30 -0
- data/lib/fog/google/requests/compute/delete_region_operation.rb +33 -0
- data/lib/fog/google/requests/compute/delete_route.rb +26 -0
- data/lib/fog/google/requests/compute/delete_snapshot.rb +2 -7
- data/lib/fog/google/requests/compute/delete_target_pool.rb +36 -0
- data/lib/fog/google/requests/compute/get_forwarding_rule.rb +33 -0
- data/lib/fog/google/requests/compute/get_http_health_check.rb +30 -0
- data/lib/fog/google/requests/compute/get_project.rb +25 -0
- data/lib/fog/google/requests/compute/get_region.rb +26 -0
- data/lib/fog/google/requests/compute/get_region_operation.rb +36 -0
- data/lib/fog/google/requests/compute/get_route.rb +26 -0
- data/lib/fog/google/requests/compute/get_target_pool.rb +33 -0
- data/lib/fog/google/requests/compute/get_target_pool_health.rb +35 -0
- data/lib/fog/google/requests/compute/insert_address.rb +4 -4
- data/lib/fog/google/requests/compute/insert_firewall.rb +20 -6
- data/lib/fog/google/requests/compute/insert_forwarding_rule.rb +31 -0
- data/lib/fog/google/requests/compute/insert_http_health_check.rb +32 -0
- data/lib/fog/google/requests/compute/insert_network.rb +6 -4
- data/lib/fog/google/requests/compute/insert_route.rb +38 -0
- data/lib/fog/google/requests/compute/insert_server.rb +15 -0
- data/lib/fog/google/requests/compute/insert_target_pool.rb +31 -0
- data/lib/fog/google/requests/compute/list_aggregated_addresses.rb +25 -0
- data/lib/fog/google/requests/compute/list_aggregated_machine_types.rb +25 -0
- data/lib/fog/google/requests/compute/list_forwarding_rules.rb +36 -0
- data/lib/fog/google/requests/compute/list_http_health_checks.rb +29 -0
- data/lib/fog/google/requests/compute/list_region_operations.rb +29 -0
- data/lib/fog/google/requests/compute/list_regions.rb +29 -0
- data/lib/fog/google/requests/compute/list_routes.rb +25 -0
- data/lib/fog/google/requests/compute/list_target_pools.rb +30 -0
- data/lib/fog/google/requests/compute/remove_target_pool_health_checks.rb +34 -0
- data/lib/fog/google/requests/compute/remove_target_pool_instance.rb +34 -0
- data/lib/fog/google/requests/compute/remove_target_pool_instances.rb +34 -0
- data/lib/fog/google/requests/compute/set_common_instance_metadata.rb +30 -0
- data/lib/fog/google/requests/compute/set_forwarding_rule_target.rb +32 -0
- data/lib/fog/google/requests/compute/set_tags.rb +4 -1
- data/lib/fog/hp/examples/compute.md +3 -3
- data/lib/fog/hp/examples/compute_v2.md +6 -3
- data/lib/fog/hp/examples/networking.md +1 -1
- data/lib/fog/hp/models/network/router.rb +1 -1
- data/lib/fog/joyent/analytics.rb +2 -2
- data/lib/fog/joyent/compute.rb +2 -2
- data/lib/fog/joyent/models/compute/server.rb +2 -0
- data/lib/fog/ninefold/compute.rb +6 -6
- data/lib/fog/openstack/compute.rb +3 -3
- data/lib/fog/openstack/core.rb +4 -4
- data/lib/fog/openstack/examples/network/network_subnets_routers.rb +2 -2
- data/lib/fog/openstack/identity.rb +1 -1
- data/lib/fog/openstack/image.rb +1 -1
- data/lib/fog/openstack/metering.rb +1 -1
- data/lib/fog/openstack/models/network/router.rb +21 -4
- data/lib/fog/openstack/network.rb +1 -1
- data/lib/fog/openstack/orchestration.rb +2 -2
- data/lib/fog/openstack/requests/network/create_router.rb +30 -9
- data/lib/fog/openstack/requests/network/delete_router.rb +1 -1
- data/lib/fog/openstack/requests/network/update_router.rb +28 -41
- data/lib/fog/openstack/requests/storage/get_object_https_url.rb +12 -2
- data/lib/fog/openstack/storage.rb +1 -1
- data/lib/fog/openstack/volume.rb +1 -1
- data/lib/fog/rackspace/auto_scale.rb +1 -1
- data/lib/fog/rackspace/block_storage.rb +2 -2
- data/lib/fog/rackspace/cdn.rb +1 -1
- data/lib/fog/rackspace/compute.rb +1 -1
- data/lib/fog/rackspace/compute_v2.rb +2 -2
- data/lib/fog/rackspace/core.rb +2 -1
- data/lib/fog/rackspace/databases.rb +2 -2
- data/lib/fog/rackspace/dns.rb +1 -1
- data/lib/fog/rackspace/identity.rb +1 -1
- data/lib/fog/rackspace/load_balancers.rb +2 -2
- data/lib/fog/rackspace/models/compute_v2/server.rb +18 -6
- data/lib/fog/rackspace/models/dns/records.rb +22 -0
- data/lib/fog/rackspace/models/monitoring/alarm.rb +3 -1
- data/lib/fog/rackspace/models/queues/message.rb +2 -2
- data/lib/fog/rackspace/models/storage/metadata.rb +0 -5
- data/lib/fog/rackspace/monitoring.rb +1 -1
- data/lib/fog/rackspace/queues.rb +1 -1
- data/lib/fog/rackspace/requests/compute_v2/create_server.rb +5 -2
- data/lib/fog/rackspace/service.rb +1 -1
- data/lib/fog/rackspace/storage.rb +1 -1
- data/lib/fog/rage4/models/dns/record.rb +2 -0
- data/lib/fog/rage4/requests/dns/create_record.rb +2 -0
- data/lib/fog/rage4/requests/dns/update_record.rb +2 -0
- data/lib/fog/serverlove/compute.rb +2 -2
- data/lib/fog/vcloud_director/models/compute/tasks.rb +1 -0
- data/lib/fog/version.rb +1 -1
- data/lib/fog/vsphere/core.rb +23 -0
- data/lib/fog/vsphere/models/compute/interface.rb +3 -3
- data/lib/fog/vsphere/requests/compute/create_vm.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_interface_types.rb +1 -2
- data/lib/tasks/changelog_task.rb +191 -89
- data/lib/tasks/github_release_task.rb +67 -0
- data/spec/fog/xml/connection_spec.rb +34 -0
- data/tests/aws/requests/iam/mfa_tests.rb +23 -0
- data/tests/aws/signed_params_tests.rb +9 -5
- data/tests/google/helpers/disk_helper.rb +1 -1
- data/tests/google/requests/compute/disk_tests.rb +3 -21
- data/tests/helper.rb +1 -1
- data/tests/openstack/models/network/router_tests.rb +3 -2
- data/tests/openstack/requests/network/router_tests.rb +10 -12
- data/tests/openstack/requests/storage/object_tests.rb +23 -7
- data/tests/rackspace/models/compute_v2/server_tests.rb +1 -1
- data/tests/rackspace/models/monitoring/alarm_tests.rb +3 -0
- data/tests/rage4/requests/dns/dns_tests.rb +32 -0
- metadata +66 -172
- data/changelog.txt +0 -8265
- data/providers/brightbox/.gitignore +0 -1
- data/providers/brightbox/Gemfile +0 -3
- data/providers/brightbox/LICENSE.txt +0 -22
- data/providers/brightbox/README.md +0 -50
- data/providers/brightbox/Rakefile +0 -8
- data/providers/brightbox/fog-brightbox.gemspec +0 -28
- data/providers/brightbox/lib/fog/brightbox.rb +0 -1
- data/providers/brightbox/lib/fog/brightbox/compute.rb +0 -305
- data/providers/brightbox/lib/fog/brightbox/compute/image_selector.rb +0 -45
- data/providers/brightbox/lib/fog/brightbox/compute/shared.rb +0 -230
- data/providers/brightbox/lib/fog/brightbox/core.rb +0 -11
- data/providers/brightbox/lib/fog/brightbox/models/compute/account.rb +0 -69
- data/providers/brightbox/lib/fog/brightbox/models/compute/accounts.rb +0 -29
- data/providers/brightbox/lib/fog/brightbox/models/compute/api_client.rb +0 -37
- data/providers/brightbox/lib/fog/brightbox/models/compute/api_clients.rb +0 -24
- data/providers/brightbox/lib/fog/brightbox/models/compute/application.rb +0 -24
- data/providers/brightbox/lib/fog/brightbox/models/compute/applications.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/models/compute/cloud_ip.rb +0 -68
- data/providers/brightbox/lib/fog/brightbox/models/compute/cloud_ips.rb +0 -34
- data/providers/brightbox/lib/fog/brightbox/models/compute/collaboration.rb +0 -49
- data/providers/brightbox/lib/fog/brightbox/models/compute/collaborations.rb +0 -47
- data/providers/brightbox/lib/fog/brightbox/models/compute/database_server.rb +0 -97
- data/providers/brightbox/lib/fog/brightbox/models/compute/database_servers.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/models/compute/database_snapshot.rb +0 -52
- data/providers/brightbox/lib/fog/brightbox/models/compute/database_snapshots.rb +0 -24
- data/providers/brightbox/lib/fog/brightbox/models/compute/database_type.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/models/compute/database_types.rb +0 -26
- data/providers/brightbox/lib/fog/brightbox/models/compute/firewall_policies.rb +0 -29
- data/providers/brightbox/lib/fog/brightbox/models/compute/firewall_policy.rb +0 -63
- data/providers/brightbox/lib/fog/brightbox/models/compute/firewall_rule.rb +0 -54
- data/providers/brightbox/lib/fog/brightbox/models/compute/firewall_rules.rb +0 -24
- data/providers/brightbox/lib/fog/brightbox/models/compute/flavor.rb +0 -32
- data/providers/brightbox/lib/fog/brightbox/models/compute/flavors.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/models/compute/image.rb +0 -64
- data/providers/brightbox/lib/fog/brightbox/models/compute/images.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/models/compute/load_balancer.rb +0 -107
- data/providers/brightbox/lib/fog/brightbox/models/compute/load_balancers.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/models/compute/server.rb +0 -217
- data/providers/brightbox/lib/fog/brightbox/models/compute/server_group.rb +0 -94
- data/providers/brightbox/lib/fog/brightbox/models/compute/server_groups.rb +0 -29
- data/providers/brightbox/lib/fog/brightbox/models/compute/servers.rb +0 -61
- data/providers/brightbox/lib/fog/brightbox/models/compute/user.rb +0 -43
- data/providers/brightbox/lib/fog/brightbox/models/compute/user_collaboration.rb +0 -44
- data/providers/brightbox/lib/fog/brightbox/models/compute/user_collaborations.rb +0 -31
- data/providers/brightbox/lib/fog/brightbox/models/compute/users.rb +0 -27
- data/providers/brightbox/lib/fog/brightbox/models/compute/zone.rb +0 -22
- data/providers/brightbox/lib/fog/brightbox/models/compute/zones.rb +0 -29
- data/providers/brightbox/lib/fog/brightbox/oauth2.rb +0 -166
- data/providers/brightbox/lib/fog/brightbox/requests/compute/accept_user_collaboration.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/activate_console_server.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +0 -24
- data/providers/brightbox/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +0 -24
- data/providers/brightbox/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +0 -34
- data/providers/brightbox/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +0 -24
- data/providers/brightbox/lib/fog/brightbox/requests/compute/create_api_client.rb +0 -23
- data/providers/brightbox/lib/fog/brightbox/requests/compute/create_application.rb +0 -23
- data/providers/brightbox/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +0 -24
- data/providers/brightbox/lib/fog/brightbox/requests/compute/create_collaboration.rb +0 -23
- data/providers/brightbox/lib/fog/brightbox/requests/compute/create_database_server.rb +0 -25
- data/providers/brightbox/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +0 -26
- data/providers/brightbox/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +0 -29
- data/providers/brightbox/lib/fog/brightbox/requests/compute/create_image.rb +0 -30
- data/providers/brightbox/lib/fog/brightbox/requests/compute/create_load_balancer.rb +0 -26
- data/providers/brightbox/lib/fog/brightbox/requests/compute/create_server.rb +0 -29
- data/providers/brightbox/lib/fog/brightbox/requests/compute/create_server_group.rb +0 -23
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_api_client.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_application.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_cloud_ip.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_collaboration.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_database_server.rb +0 -26
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_database_snapshot.rb +0 -26
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_firewall_policy.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_firewall_rule.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_image.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_load_balancer.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_server.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_server_group.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/requests/compute/delete_user_collaboration.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_account.rb +0 -29
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_api_client.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_application.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +0 -17
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_collaboration.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_database_server.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_database_snapshot.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_database_type.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_image.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_interface.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_load_balancer.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_scoped_account.rb +0 -15
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_server.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_server_group.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_server_type.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_user.rb +0 -29
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_user_collaboration.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/get_zone.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_accounts.rb +0 -17
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_api_clients.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_applications.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_collaborations.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_database_servers.rb +0 -17
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_database_snapshots.rb +0 -17
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_database_types.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_images.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_load_balancers.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_server_groups.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_server_types.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_servers.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_user_collaborations.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_users.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/list_zones.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +0 -24
- data/providers/brightbox/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +0 -36
- data/providers/brightbox/lib/fog/brightbox/requests/compute/reject_user_collaboration.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +0 -24
- data/providers/brightbox/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +0 -24
- data/providers/brightbox/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +0 -24
- data/providers/brightbox/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +0 -34
- data/providers/brightbox/lib/fog/brightbox/requests/compute/resend_collaboration.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +0 -32
- data/providers/brightbox/lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb +0 -18
- data/providers/brightbox/lib/fog/brightbox/requests/compute/reset_password_database_server.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +0 -25
- data/providers/brightbox/lib/fog/brightbox/requests/compute/reset_secret_application.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/shutdown_server.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/snapshot_database_server.rb +0 -19
- data/providers/brightbox/lib/fog/brightbox/requests/compute/snapshot_server.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/start_server.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/stop_server.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +0 -21
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_account.rb +0 -61
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_api_client.rb +0 -26
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_application.rb +0 -26
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +0 -27
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_database_server.rb +0 -25
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_database_snapshot.rb +0 -26
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_firewall_policy.rb +0 -26
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +0 -31
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_image.rb +0 -31
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_load_balancer.rb +0 -29
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_scoped_account.rb +0 -31
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_server.rb +0 -28
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_server_group.rb +0 -26
- data/providers/brightbox/lib/fog/brightbox/requests/compute/update_user.rb +0 -29
- data/providers/brightbox/lib/fog/brightbox/version.rb +0 -5
- data/providers/brightbox/test/fog/compute/brightbox_test.rb +0 -37
- data/test/fog/xml/connection_test.rb +0 -30
@@ -2,25 +2,31 @@ def test
|
|
2
2
|
connection = Fog::Compute.new({ :provider => "Google" })
|
3
3
|
|
4
4
|
name = "fog-smoke-test-#{Time.now.to_i}"
|
5
|
+
zone = "us-central1-a"
|
5
6
|
|
6
7
|
disk = connection.disks.create({
|
7
8
|
:name => name,
|
8
9
|
:size_gb => 10,
|
9
|
-
:zone_name =>
|
10
|
-
:source_image => 'debian-7-wheezy-
|
10
|
+
:zone_name => zone,
|
11
|
+
:source_image => 'debian-7-wheezy-v20140318',
|
11
12
|
})
|
12
13
|
|
13
14
|
disk.wait_for { disk.ready? }
|
14
15
|
|
16
|
+
scopes = [
|
17
|
+
"https://www.googleapis.com/auth/compute",
|
18
|
+
"devstorage.full_control",
|
19
|
+
"userinfo.email"
|
20
|
+
]
|
21
|
+
|
15
22
|
server = connection.servers.create({
|
16
23
|
:name => name,
|
17
24
|
:disks => [disk],
|
18
25
|
:machine_type => "n1-standard-1",
|
19
|
-
:zone_name =>
|
20
|
-
:
|
21
|
-
:
|
22
|
-
:
|
23
|
-
:metadata => {'foo' => 'bar'}
|
26
|
+
:zone_name => zone,
|
27
|
+
:metadata => {'foo' => 'bar'},
|
28
|
+
:tags => ["t1", "t2", "t3"],
|
29
|
+
:servce_accounts => scopes
|
24
30
|
})
|
25
31
|
sleep(90)
|
26
32
|
|
@@ -0,0 +1,100 @@
|
|
1
|
+
|
2
|
+
def test
|
3
|
+
# Config
|
4
|
+
name = "fog-lb-test-#{Time.now.to_i}"
|
5
|
+
zone = 'us-central1-b'
|
6
|
+
region = 'us-central1'
|
7
|
+
|
8
|
+
|
9
|
+
# Setup
|
10
|
+
gce = Fog::Compute.new provider: 'Google'
|
11
|
+
servers = []
|
12
|
+
|
13
|
+
(1..3).each do |i|
|
14
|
+
begin
|
15
|
+
disk = gce.disks.create(
|
16
|
+
name: "#{name}-#{i}",
|
17
|
+
size_gb: 10,
|
18
|
+
zone_name: zone,
|
19
|
+
source_image: 'debian-7-wheezy-v20131120'
|
20
|
+
)
|
21
|
+
disk.wait_for { disk.ready? }
|
22
|
+
rescue
|
23
|
+
puts "Failed to create disk #{name}-#{i}"
|
24
|
+
end
|
25
|
+
|
26
|
+
begin
|
27
|
+
server = gce.servers.create(
|
28
|
+
name: "#{name}-#{i}",
|
29
|
+
disks: [ disk.get_as_boot_disk(true, true) ],
|
30
|
+
machine_type: 'f1-micro',
|
31
|
+
zone_name: zone
|
32
|
+
)
|
33
|
+
servers << server
|
34
|
+
rescue
|
35
|
+
puts "Failed to create instance #{name}-#{i}"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
begin
|
40
|
+
health = gce.http_health_checks.new(name: name)
|
41
|
+
health.save
|
42
|
+
rescue
|
43
|
+
puts "Failed to create health check #{name}"
|
44
|
+
end
|
45
|
+
|
46
|
+
begin
|
47
|
+
pool = gce.target_pools.new(
|
48
|
+
name: name,
|
49
|
+
region: region,
|
50
|
+
health_checks: health.self_link,
|
51
|
+
instances: servers.map(&:self_link)
|
52
|
+
)
|
53
|
+
pool.save
|
54
|
+
rescue
|
55
|
+
puts "Failed to create target pool #{name}"
|
56
|
+
end
|
57
|
+
|
58
|
+
begin
|
59
|
+
rule = gce.forwarding_rules.new(
|
60
|
+
name: name,
|
61
|
+
region: region,
|
62
|
+
port_range: '1-65535',
|
63
|
+
ip_protocol: 'TCP',
|
64
|
+
target: pool.self_link
|
65
|
+
)
|
66
|
+
rule.save
|
67
|
+
rescue
|
68
|
+
puts "Failed to create forwarding rule #{name}"
|
69
|
+
end
|
70
|
+
|
71
|
+
|
72
|
+
# TODO(bensonk): Install apache, create individualized htdocs, and run some
|
73
|
+
# actual requests through the load balancer.
|
74
|
+
|
75
|
+
|
76
|
+
# Cleanup
|
77
|
+
begin
|
78
|
+
rule.destroy
|
79
|
+
rescue
|
80
|
+
puts "Failed to clean up forwarding rule."
|
81
|
+
end
|
82
|
+
|
83
|
+
begin
|
84
|
+
pool.destroy
|
85
|
+
rescue
|
86
|
+
puts "Failed to clean up target pool."
|
87
|
+
end
|
88
|
+
|
89
|
+
begin
|
90
|
+
health.destroy
|
91
|
+
rescue
|
92
|
+
puts "Failed to clean up health check."
|
93
|
+
end
|
94
|
+
|
95
|
+
begin
|
96
|
+
servers.each &:destroy
|
97
|
+
rescue
|
98
|
+
puts "Failed to clean up instances."
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Google
|
6
|
+
|
7
|
+
##
|
8
|
+
# Represents an Address resource
|
9
|
+
#
|
10
|
+
# @see https://developers.google.com/compute/docs/reference/latest/addresses
|
11
|
+
class Address < Fog::Model
|
12
|
+
identity :name
|
13
|
+
|
14
|
+
attribute :kind
|
15
|
+
attribute :id
|
16
|
+
attribute :address
|
17
|
+
attribute :creation_timestamp, :aliases => 'creationTimestamp'
|
18
|
+
attribute :description
|
19
|
+
attribute :region
|
20
|
+
attribute :self_link, :aliases => 'selfLink'
|
21
|
+
attribute :status
|
22
|
+
attribute :users
|
23
|
+
|
24
|
+
IN_USE_STATE = 'IN_USE'
|
25
|
+
RESERVED_STATE = 'RESERVED'
|
26
|
+
|
27
|
+
def save
|
28
|
+
requires :identity, :region
|
29
|
+
|
30
|
+
data = service.insert_address(identity, self.region, self.attributes)
|
31
|
+
operation = Fog::Compute::Google::Operations.new(:service => service).get(data.body['name'], nil, data.body['region'])
|
32
|
+
operation.wait_for { !pending? }
|
33
|
+
reload
|
34
|
+
end
|
35
|
+
|
36
|
+
def destroy(async=true)
|
37
|
+
requires :identity, :region
|
38
|
+
|
39
|
+
data = service.delete_address(identity, self.region.split('/')[-1])
|
40
|
+
operation = Fog::Compute::Google::Operations.new(:service => service).get(data.body['name'], nil, data.body['region'])
|
41
|
+
unless async
|
42
|
+
operation.wait_for { ready? }
|
43
|
+
end
|
44
|
+
operation
|
45
|
+
end
|
46
|
+
|
47
|
+
def reload
|
48
|
+
requires :identity, :region
|
49
|
+
|
50
|
+
data = collection.get(identity, self.region.split('/')[-1])
|
51
|
+
merge_attributes(data.attributes)
|
52
|
+
self
|
53
|
+
end
|
54
|
+
|
55
|
+
def in_use?
|
56
|
+
self.status == IN_USE_STATE
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/google/models/compute/address'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class Google
|
7
|
+
|
8
|
+
class Addresses < Fog::Collection
|
9
|
+
model Fog::Compute::Google::Address
|
10
|
+
|
11
|
+
def all(filters = {})
|
12
|
+
if filters[:region]
|
13
|
+
data = service.list_addresses(filters[:region]).body['items'] || []
|
14
|
+
else
|
15
|
+
data = []
|
16
|
+
service.list_aggregated_addresses.body['items'].each_value do |region|
|
17
|
+
data.concat(region['addresses']) if region['addresses']
|
18
|
+
end
|
19
|
+
end
|
20
|
+
load(data)
|
21
|
+
end
|
22
|
+
|
23
|
+
def get(identity, region)
|
24
|
+
if address = service.get_address(identity, region).body
|
25
|
+
new(address)
|
26
|
+
end
|
27
|
+
rescue Fog::Errors::NotFound
|
28
|
+
nil
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -25,24 +25,32 @@ module Fog
|
|
25
25
|
requires :zone_name
|
26
26
|
|
27
27
|
options = {}
|
28
|
+
my_description = "Created with fog"
|
29
|
+
if !source_image.nil?
|
30
|
+
my_description = "Created from image: #{source_image}"
|
31
|
+
end
|
28
32
|
if source_image.nil? && !source_snapshot.nil?
|
29
33
|
options['sourceSnapshot'] = source_snapshot
|
34
|
+
my_description = "Created from snapshot: #{source_snapshot}"
|
30
35
|
end
|
31
36
|
|
32
37
|
options['sizeGb'] = size_gb
|
38
|
+
options['description'] = description || my_description
|
33
39
|
|
34
40
|
data = service.insert_disk(name, zone_name, source_image, options).body
|
35
41
|
data = service.backoff_if_unfound {service.get_disk(name, zone_name).body}
|
36
42
|
service.disks.merge_attributes(data)
|
37
43
|
end
|
38
44
|
|
39
|
-
def destroy
|
45
|
+
def destroy(async=true)
|
40
46
|
requires :name, :zone_name
|
41
47
|
operation = service.delete_disk(name, zone_name)
|
42
|
-
# wait until "
|
43
|
-
|
44
|
-
|
45
|
-
|
48
|
+
# wait until "DONE" to ensure the operation doesn't fail, raises exception on error
|
49
|
+
if not async
|
50
|
+
Fog.wait_for do
|
51
|
+
operation = service.get_zone_operation(zone_name, operation.body["name"])
|
52
|
+
operation.body["status"] == "DONE"
|
53
|
+
end
|
46
54
|
end
|
47
55
|
operation
|
48
56
|
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Google
|
6
|
+
|
7
|
+
##
|
8
|
+
# Represents a Firewall resource
|
9
|
+
#
|
10
|
+
# @see https://developers.google.com/compute/docs/reference/latest/firewalls
|
11
|
+
class Firewall < Fog::Model
|
12
|
+
identity :name
|
13
|
+
|
14
|
+
attribute :kind
|
15
|
+
attribute :id
|
16
|
+
attribute :allowed
|
17
|
+
attribute :creation_timestamp, :aliases => 'creationTimestamp'
|
18
|
+
attribute :description
|
19
|
+
attribute :network
|
20
|
+
attribute :self_link, :aliases => 'selfLink'
|
21
|
+
attribute :source_ranges, :aliases => 'sourceRanges'
|
22
|
+
attribute :source_tags, :aliases => 'sourceTags'
|
23
|
+
attribute :target_tags, :aliases => 'targetTags'
|
24
|
+
|
25
|
+
def save
|
26
|
+
requires :identity, :allowed, :network
|
27
|
+
|
28
|
+
data = service.insert_firewall(identity, self.allowed, self.network, self.attributes)
|
29
|
+
operation = Fog::Compute::Google::Operations.new(:service => service).get(data.body['name'])
|
30
|
+
operation.wait_for { !pending? }
|
31
|
+
reload
|
32
|
+
end
|
33
|
+
|
34
|
+
def destroy(async=true)
|
35
|
+
requires :identity
|
36
|
+
|
37
|
+
data = service.delete_firewall(identity)
|
38
|
+
operation = Fog::Compute::Google::Operations.new(:service => service).get(data.body['name'])
|
39
|
+
unless async
|
40
|
+
operation.wait_for { ready? }
|
41
|
+
end
|
42
|
+
operation
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/google/models/compute/firewall'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class Google
|
7
|
+
|
8
|
+
class Firewalls < Fog::Collection
|
9
|
+
model Fog::Compute::Google::Firewall
|
10
|
+
|
11
|
+
def all
|
12
|
+
data = service.list_firewalls.body
|
13
|
+
load(data['items'] || [])
|
14
|
+
end
|
15
|
+
|
16
|
+
def get(identity)
|
17
|
+
if firewall = service.get_firewall(identity).body
|
18
|
+
new(firewall)
|
19
|
+
end
|
20
|
+
rescue Fog::Errors::NotFound
|
21
|
+
nil
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -8,16 +8,27 @@ module Fog
|
|
8
8
|
|
9
9
|
identity :name
|
10
10
|
|
11
|
+
attribute :kind
|
12
|
+
attribute :id
|
13
|
+
attribute :creation_timestamp, :aliases => 'creationTimestamp'
|
14
|
+
attribute :deprecated
|
11
15
|
attribute :description
|
12
16
|
attribute :guest_cpus, :aliases => 'guestCpus'
|
13
|
-
attribute :memory_mb, :aliases => 'memoryMb'
|
14
17
|
attribute :image_space_gb, :aliases => 'imageSpaceGb'
|
15
|
-
attribute :maximum_persistent_disks,
|
16
|
-
|
17
|
-
attribute :
|
18
|
-
|
18
|
+
attribute :maximum_persistent_disks, :aliases => 'maximumPersistentDisks'
|
19
|
+
attribute :maximum_persistent_disks_size, :aliases => 'maximumPersistentDisksSizeGb'
|
20
|
+
attribute :memory_mb, :aliases => 'memoryMb'
|
21
|
+
attribute :scratch_disks, aliases => 'scratchDisks'
|
19
22
|
attribute :self_link, :aliases => 'selfLink'
|
23
|
+
attribute :zone
|
24
|
+
|
25
|
+
def reload
|
26
|
+
requires :identity, :zone
|
20
27
|
|
28
|
+
data = collection.get(identity, self.zone)
|
29
|
+
merge_attributes(data.attributes)
|
30
|
+
self
|
31
|
+
end
|
21
32
|
end
|
22
33
|
|
23
34
|
end
|
@@ -9,14 +9,20 @@ module Fog
|
|
9
9
|
|
10
10
|
model Fog::Compute::Google::Flavor
|
11
11
|
|
12
|
-
def all
|
13
|
-
|
14
|
-
|
12
|
+
def all(filters = {})
|
13
|
+
if filters[:zone]
|
14
|
+
data = service.list_machine_types(filters[:zone]).body["items"]
|
15
|
+
else
|
16
|
+
data = []
|
17
|
+
service.list_aggregated_machine_types.body['items'].each_value do |zone|
|
18
|
+
data.concat(zone['machineTypes']) if zone['machineTypes']
|
19
|
+
end
|
20
|
+
end
|
15
21
|
load(data)
|
16
22
|
end
|
17
23
|
|
18
24
|
def get(identity, zone_name = nil)
|
19
|
-
data =
|
25
|
+
data = service.get_machine_type(identity, zone_name).body
|
20
26
|
new(data)
|
21
27
|
rescue Fog::Errors::NotFound
|
22
28
|
nil
|
@@ -0,0 +1,88 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Google
|
6
|
+
|
7
|
+
class ForwardingRule < Fog::Model
|
8
|
+
|
9
|
+
identity :name
|
10
|
+
|
11
|
+
attribute :kind, :aliases => 'kind'
|
12
|
+
attribute :self_link, :aliases => 'selfLink'
|
13
|
+
attribute :id, :aliases => 'id'
|
14
|
+
attribute :creation_timestamp, :aliases => 'creationTimestamp'
|
15
|
+
attribute :description, :aliases => 'description'
|
16
|
+
attribute :region, :aliases => 'region'
|
17
|
+
attribute :ip_address, :aliases => 'IPAddress'
|
18
|
+
attribute :ip_protocol, :aliases => 'IPProtocol'
|
19
|
+
attribute :port_range, :aliases => 'portRange'
|
20
|
+
attribute :target, :aliases => 'target'
|
21
|
+
|
22
|
+
def save
|
23
|
+
requires :name, :region, :target
|
24
|
+
|
25
|
+
options = {
|
26
|
+
'description' => description,
|
27
|
+
'region' => region,
|
28
|
+
'IPAddress' => ip_address,
|
29
|
+
'IPProtocol' => ip_protocol || "TCP",
|
30
|
+
'portRange' => port_range,
|
31
|
+
'target' => target
|
32
|
+
}
|
33
|
+
|
34
|
+
service.insert_forwarding_rule(name, region, options).body
|
35
|
+
data = service.backoff_if_unfound {service.get_forwarding_rule(name, region).body}
|
36
|
+
merge_attributes(data)
|
37
|
+
self
|
38
|
+
end
|
39
|
+
|
40
|
+
def set_target new_target
|
41
|
+
new_target = new_target.self_link unless new_target.class == String
|
42
|
+
self.target = new_target
|
43
|
+
service.set_forwarding_rule_target(self, new_target)
|
44
|
+
reload
|
45
|
+
end
|
46
|
+
|
47
|
+
def destroy(async=true)
|
48
|
+
requires :name, :region
|
49
|
+
operation = service.delete_forwarding_rule(name, region)
|
50
|
+
if not async
|
51
|
+
# wait until "RUNNING" or "DONE" to ensure the operation doesn't
|
52
|
+
# fail, raises exception on error
|
53
|
+
Fog.wait_for do
|
54
|
+
operation = service.get_region_operation(region, operation.body["name"])
|
55
|
+
operation.body["status"] == "DONE"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
operation
|
59
|
+
end
|
60
|
+
|
61
|
+
def ready?
|
62
|
+
begin
|
63
|
+
service.get_forwarding_rule(self.name, self.region)
|
64
|
+
true
|
65
|
+
rescue Fog::Errors::NotFound
|
66
|
+
false
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def reload
|
71
|
+
requires :name, :region
|
72
|
+
|
73
|
+
return unless data = begin
|
74
|
+
collection.get(name, region)
|
75
|
+
rescue Excon::Errors::SocketError
|
76
|
+
nil
|
77
|
+
end
|
78
|
+
|
79
|
+
new_attributes = data.attributes
|
80
|
+
merge_attributes(new_attributes)
|
81
|
+
self
|
82
|
+
end
|
83
|
+
|
84
|
+
RUNNING_STATE = "READY"
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|