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
@@ -1,217 +0,0 @@
|
|
1
|
-
require 'fog/compute/models/server'
|
2
|
-
|
3
|
-
module Fog
|
4
|
-
module Compute
|
5
|
-
class Brightbox
|
6
|
-
|
7
|
-
class Server < Fog::Compute::Server
|
8
|
-
|
9
|
-
identity :id
|
10
|
-
attribute :resource_type
|
11
|
-
attribute :url
|
12
|
-
|
13
|
-
attribute :name
|
14
|
-
attribute :state, :aliases => 'status'
|
15
|
-
|
16
|
-
attribute :hostname
|
17
|
-
attribute :fqdn
|
18
|
-
attribute :user_data
|
19
|
-
attribute :console_url
|
20
|
-
attribute :fqdn
|
21
|
-
attribute :console_token
|
22
|
-
|
23
|
-
# Times
|
24
|
-
attribute :created_at, :type => :time
|
25
|
-
attribute :started_at, :type => :time
|
26
|
-
attribute :console_token_expires, :type => :time
|
27
|
-
attribute :deleted_at, :type => :time
|
28
|
-
|
29
|
-
# Links - to be replaced
|
30
|
-
attribute :account_id, :aliases => "account", :squash => "id"
|
31
|
-
attribute :image_id, :aliases => "image", :squash => "id"
|
32
|
-
|
33
|
-
attribute :snapshots
|
34
|
-
attribute :cloud_ips
|
35
|
-
attribute :interfaces
|
36
|
-
attribute :server_groups
|
37
|
-
attribute :zone
|
38
|
-
attribute :server_type
|
39
|
-
|
40
|
-
def initialize(attributes = {})
|
41
|
-
# Call super first to initialize the service object for our default image
|
42
|
-
super
|
43
|
-
self.image_id ||= service.default_image
|
44
|
-
end
|
45
|
-
|
46
|
-
def zone_id
|
47
|
-
if t_zone_id = attributes[:zone_id]
|
48
|
-
t_zone_id
|
49
|
-
elsif zone
|
50
|
-
zone[:id] || zone['id']
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def flavor_id
|
55
|
-
if t_flavour_id = attributes[:flavor_id]
|
56
|
-
t_flavour_id
|
57
|
-
elsif server_type
|
58
|
-
server_type[:id] || server_type['id']
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
def zone_id=(incoming_zone_id)
|
63
|
-
attributes[:zone_id] = incoming_zone_id
|
64
|
-
end
|
65
|
-
|
66
|
-
def flavor_id=(incoming_flavour_id)
|
67
|
-
attributes[:flavor_id] = incoming_flavour_id
|
68
|
-
end
|
69
|
-
|
70
|
-
def snapshot
|
71
|
-
requires :identity
|
72
|
-
service.snapshot_server(identity)
|
73
|
-
end
|
74
|
-
|
75
|
-
# Directly requesting a server reboot is not supported in the API
|
76
|
-
# so needs to attempt a shutdown/stop, wait and start again.
|
77
|
-
#
|
78
|
-
# Default behaviour is a hard reboot because it is more reliable
|
79
|
-
# because the state of the server's OS is irrelevant.
|
80
|
-
#
|
81
|
-
# @param [Boolean] use_hard_reboot
|
82
|
-
# @return [Boolean]
|
83
|
-
def reboot(use_hard_reboot = true)
|
84
|
-
requires :identity
|
85
|
-
if ready?
|
86
|
-
if use_hard_reboot
|
87
|
-
hard_reboot
|
88
|
-
else
|
89
|
-
soft_reboot
|
90
|
-
end
|
91
|
-
else
|
92
|
-
# Not able to reboot if not ready in the first place
|
93
|
-
false
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
def start
|
98
|
-
requires :identity
|
99
|
-
service.start_server(identity)
|
100
|
-
true
|
101
|
-
end
|
102
|
-
|
103
|
-
def stop
|
104
|
-
requires :identity
|
105
|
-
service.stop_server(identity)
|
106
|
-
true
|
107
|
-
end
|
108
|
-
|
109
|
-
def shutdown
|
110
|
-
requires :identity
|
111
|
-
service.shutdown_server(identity)
|
112
|
-
true
|
113
|
-
end
|
114
|
-
|
115
|
-
def destroy
|
116
|
-
requires :identity
|
117
|
-
service.destroy_server(identity)
|
118
|
-
true
|
119
|
-
end
|
120
|
-
|
121
|
-
def flavor
|
122
|
-
requires :flavor_id
|
123
|
-
service.flavors.get(flavor_id)
|
124
|
-
end
|
125
|
-
|
126
|
-
def image
|
127
|
-
requires :image_id
|
128
|
-
service.images.get(image_id)
|
129
|
-
end
|
130
|
-
|
131
|
-
# Returns the public DNS name of the server
|
132
|
-
#
|
133
|
-
# @return [String]
|
134
|
-
#
|
135
|
-
def dns_name
|
136
|
-
["public", fqdn].join(".")
|
137
|
-
end
|
138
|
-
|
139
|
-
def private_ip_address
|
140
|
-
if interfaces.empty?
|
141
|
-
nil
|
142
|
-
else
|
143
|
-
interfaces.first["ipv4_address"]
|
144
|
-
end
|
145
|
-
end
|
146
|
-
|
147
|
-
def public_ip_address
|
148
|
-
if cloud_ips.empty?
|
149
|
-
nil
|
150
|
-
else
|
151
|
-
cloud_ips.first["public_ip"]
|
152
|
-
end
|
153
|
-
end
|
154
|
-
|
155
|
-
def ready?
|
156
|
-
state == "active"
|
157
|
-
end
|
158
|
-
|
159
|
-
def activate_console
|
160
|
-
requires :identity
|
161
|
-
response = service.activate_console_server(identity)
|
162
|
-
[response["console_url"], response["console_token"], response["console_token_expires"]]
|
163
|
-
end
|
164
|
-
|
165
|
-
def save
|
166
|
-
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted?
|
167
|
-
requires :image_id
|
168
|
-
options = {
|
169
|
-
:image => image_id,
|
170
|
-
:name => name,
|
171
|
-
:zone => zone_id,
|
172
|
-
:user_data => user_data,
|
173
|
-
:server_groups => server_groups
|
174
|
-
}.delete_if { |k, v| v.nil? || v == "" }
|
175
|
-
|
176
|
-
options.merge!(:server_type => flavor_id) unless flavor_id.nil? || flavor_id == ""
|
177
|
-
|
178
|
-
data = service.create_server(options)
|
179
|
-
merge_attributes(data)
|
180
|
-
true
|
181
|
-
end
|
182
|
-
|
183
|
-
# Replaces the server's identifier with it's interface's identifier for Cloud IP mapping
|
184
|
-
#
|
185
|
-
# @return [String] the identifier to pass to a Cloud IP mapping request
|
186
|
-
def mapping_identity
|
187
|
-
interfaces.first["id"]
|
188
|
-
end
|
189
|
-
|
190
|
-
private
|
191
|
-
|
192
|
-
# Hard reboots are fast, avoiding the OS by doing a "power off"
|
193
|
-
def hard_reboot
|
194
|
-
stop
|
195
|
-
wait_for { !ready? }
|
196
|
-
start
|
197
|
-
end
|
198
|
-
|
199
|
-
# Soft reboots often timeout if the OS missed the request so we do more
|
200
|
-
# error checking trying to detect the timeout
|
201
|
-
#
|
202
|
-
# @todo Needs cleaner error handling when the OS times out
|
203
|
-
def soft_reboot
|
204
|
-
shutdown
|
205
|
-
# FIXME: Using side effect of wait_for's (evaluated block) to detect timeouts
|
206
|
-
begin
|
207
|
-
wait_for(20) { !ready? }
|
208
|
-
start
|
209
|
-
rescue Fog::Errors::Timeout
|
210
|
-
false
|
211
|
-
end
|
212
|
-
end
|
213
|
-
end
|
214
|
-
|
215
|
-
end
|
216
|
-
end
|
217
|
-
end
|
@@ -1,94 +0,0 @@
|
|
1
|
-
require 'fog/core/model'
|
2
|
-
|
3
|
-
module Fog
|
4
|
-
module Compute
|
5
|
-
class Brightbox
|
6
|
-
# A server group is a collection of servers
|
7
|
-
#
|
8
|
-
# Certain actions can accept a server group and affect all members
|
9
|
-
class ServerGroup < Fog::Model
|
10
|
-
|
11
|
-
identity :id
|
12
|
-
|
13
|
-
attribute :url
|
14
|
-
attribute :resource_type
|
15
|
-
attribute :name
|
16
|
-
attribute :description
|
17
|
-
attribute :default
|
18
|
-
attribute :created_at, :type => :time
|
19
|
-
|
20
|
-
attribute :server_ids, :aliases => "servers"
|
21
|
-
|
22
|
-
def save
|
23
|
-
options = {
|
24
|
-
:name => name,
|
25
|
-
:description => description
|
26
|
-
}.delete_if { |k, v| v.nil? || v == "" }
|
27
|
-
data = service.create_server_group(options)
|
28
|
-
merge_attributes(data)
|
29
|
-
true
|
30
|
-
end
|
31
|
-
|
32
|
-
def servers
|
33
|
-
srv_ids = server_ids.map { |srv| srv["id"] }
|
34
|
-
srv_ids.map do |srv_id|
|
35
|
-
service.servers.get(srv_id)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
# Adds specified servers to this server group
|
40
|
-
#
|
41
|
-
# @param [Array] identifiers array of server identifier strings to add
|
42
|
-
# @return [Fog::Compute::ServerGroup]
|
43
|
-
def add_servers(identifiers)
|
44
|
-
requires :identity
|
45
|
-
options = {
|
46
|
-
:servers => server_references(identifiers)
|
47
|
-
}
|
48
|
-
data = service.add_servers_server_group identity, options
|
49
|
-
merge_attributes data
|
50
|
-
end
|
51
|
-
|
52
|
-
# Removes specified servers from this server group
|
53
|
-
#
|
54
|
-
# @param [Array] identifiers array of server identifier strings to remove
|
55
|
-
# @return [Fog::Compute::ServerGroup]
|
56
|
-
def remove_servers(identifiers)
|
57
|
-
requires :identity
|
58
|
-
options = {
|
59
|
-
:servers => server_references(identifiers)
|
60
|
-
}
|
61
|
-
data = service.remove_servers_server_group identity, options
|
62
|
-
merge_attributes data
|
63
|
-
end
|
64
|
-
|
65
|
-
# Moves specified servers from this server group to the specified destination server group
|
66
|
-
#
|
67
|
-
# @param [Array] identifiers array of server identifier strings to move
|
68
|
-
# @param [String] destination_group_id destination server group identifier
|
69
|
-
# @return [Fog::Compute::ServerGroup]
|
70
|
-
def move_servers(identifiers, destination_group_id)
|
71
|
-
requires :identity
|
72
|
-
options = {
|
73
|
-
:servers => server_references(identifiers),
|
74
|
-
:destination => destination_group_id
|
75
|
-
}
|
76
|
-
data = service.move_servers_server_group identity, options
|
77
|
-
merge_attributes data
|
78
|
-
end
|
79
|
-
|
80
|
-
def destroy
|
81
|
-
requires :identity
|
82
|
-
service.destroy_server_group(identity)
|
83
|
-
true
|
84
|
-
end
|
85
|
-
|
86
|
-
protected
|
87
|
-
|
88
|
-
def server_references(identifiers)
|
89
|
-
identifiers.map { |id| { "server" => id } }
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'fog/core/collection'
|
2
|
-
require 'fog/brightbox/models/compute/server_group'
|
3
|
-
|
4
|
-
module Fog
|
5
|
-
module Compute
|
6
|
-
class Brightbox
|
7
|
-
|
8
|
-
class ServerGroups < Fog::Collection
|
9
|
-
|
10
|
-
model Fog::Compute::Brightbox::ServerGroup
|
11
|
-
|
12
|
-
def all
|
13
|
-
data = service.list_server_groups
|
14
|
-
load(data)
|
15
|
-
end
|
16
|
-
|
17
|
-
def get(identifier)
|
18
|
-
return nil if identifier.nil? || identifier == ""
|
19
|
-
data = service.get_server_group(identifier)
|
20
|
-
new(data)
|
21
|
-
rescue Excon::Errors::NotFound
|
22
|
-
nil
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,61 +0,0 @@
|
|
1
|
-
require 'fog/core/collection'
|
2
|
-
require 'fog/brightbox/models/compute/server'
|
3
|
-
|
4
|
-
module Fog
|
5
|
-
module Compute
|
6
|
-
class Brightbox
|
7
|
-
|
8
|
-
class Servers < Fog::Collection
|
9
|
-
|
10
|
-
model Fog::Compute::Brightbox::Server
|
11
|
-
|
12
|
-
def all
|
13
|
-
data = service.list_servers
|
14
|
-
load(data)
|
15
|
-
end
|
16
|
-
|
17
|
-
# Creates a server and maps an Cloud IP
|
18
|
-
#
|
19
|
-
# By default the public SSH key you have registered with
|
20
|
-
# Brightbox is already made available in an AWS compatible
|
21
|
-
# metdata service.
|
22
|
-
#
|
23
|
-
# @todo Support uploading of arbitary SSH keys
|
24
|
-
#
|
25
|
-
# @param [Hash] options
|
26
|
-
# @option options [String] name Name for the server
|
27
|
-
# @option options [String] flavor_id Identifier for virtual hardware type to request
|
28
|
-
# @option options [String] image_id Identifier for image to use when creating
|
29
|
-
# @option options [String] zone_id Identifer for preferred zone to locate server in
|
30
|
-
# @option options [Array<String>] server_groups List of group identifiers for the server to join
|
31
|
-
#
|
32
|
-
# @return Fog::Compute::Brightbox::Server
|
33
|
-
#
|
34
|
-
def bootstrap(options = {})
|
35
|
-
server = create(options)
|
36
|
-
|
37
|
-
# Ensure server is now available
|
38
|
-
server.wait_for { ready? }
|
39
|
-
|
40
|
-
# To get a public IP address we need to map a cloud IP address
|
41
|
-
cip = service.cloud_ips.allocate
|
42
|
-
cip.map(server)
|
43
|
-
cip.wait_for { mapped? }
|
44
|
-
|
45
|
-
# Reload so the public IP is now available
|
46
|
-
server.reload
|
47
|
-
end
|
48
|
-
|
49
|
-
def get(identifier)
|
50
|
-
return nil if identifier.nil? || identifier == ""
|
51
|
-
data = service.get_server(identifier)
|
52
|
-
new(data)
|
53
|
-
rescue Excon::Errors::NotFound
|
54
|
-
nil
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
58
|
-
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
require 'fog/core/model'
|
2
|
-
|
3
|
-
module Fog
|
4
|
-
module Compute
|
5
|
-
class Brightbox
|
6
|
-
|
7
|
-
class User < Fog::Model
|
8
|
-
|
9
|
-
identity :id
|
10
|
-
attribute :resource_type
|
11
|
-
attribute :url
|
12
|
-
|
13
|
-
attribute :name
|
14
|
-
attribute :email_address
|
15
|
-
attribute :ssh_key
|
16
|
-
|
17
|
-
# Boolean flags
|
18
|
-
attribute :email_verified
|
19
|
-
attribute :messaging_pref
|
20
|
-
|
21
|
-
# Links - to be replaced
|
22
|
-
attribute :account_id, :aliases => "default_account", :squash => "id"
|
23
|
-
attribute :accounts
|
24
|
-
|
25
|
-
def save
|
26
|
-
requires :identity
|
27
|
-
|
28
|
-
options = {
|
29
|
-
:email_address => email_address,
|
30
|
-
:ssh_key => ssh_key,
|
31
|
-
:name => name
|
32
|
-
}
|
33
|
-
|
34
|
-
data = service.update_user(identity, options)
|
35
|
-
merge_attributes(data)
|
36
|
-
true
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
require 'fog/core/model'
|
2
|
-
|
3
|
-
module Fog
|
4
|
-
module Compute
|
5
|
-
class Brightbox
|
6
|
-
class UserCollaboration < Fog::Model
|
7
|
-
identity :id
|
8
|
-
attribute :status
|
9
|
-
attribute :email
|
10
|
-
attribute :role
|
11
|
-
attribute :role_label
|
12
|
-
attribute :account
|
13
|
-
attribute :user
|
14
|
-
attribute :inviter
|
15
|
-
|
16
|
-
def account_id
|
17
|
-
account['id'] || account[:id]
|
18
|
-
end
|
19
|
-
|
20
|
-
def accept
|
21
|
-
requires :identity
|
22
|
-
data = service.accept_user_collaboration(identity)
|
23
|
-
merge_attributes(data)
|
24
|
-
true
|
25
|
-
end
|
26
|
-
|
27
|
-
def reject
|
28
|
-
requires :identity
|
29
|
-
data = service.reject_user_collaboration(identity)
|
30
|
-
merge_attributes(data)
|
31
|
-
true
|
32
|
-
end
|
33
|
-
|
34
|
-
def destroy
|
35
|
-
requires :identity
|
36
|
-
data = service.destroy_user_collaboration(identity)
|
37
|
-
merge_attributes(data)
|
38
|
-
true
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|