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 +0,0 @@
|
|
1
|
-
Gemfile.lock
|
data/providers/brightbox/Gemfile
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2014 Brightbox Systems Ltd.
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# Brightbox Cloud module for fog (The Ruby cloud services library)
|
2
|
-
|
3
|
-
This gem is a modular for the `fog` gem that allows you to manage resources in
|
4
|
-
the Brightbox Cloud.
|
5
|
-
|
6
|
-
It is included by the main `fog` metagem but can used as an independent library
|
7
|
-
in other applications.
|
8
|
-
|
9
|
-
This includes support for the following services:
|
10
|
-
|
11
|
-
* Compute
|
12
|
-
* Images
|
13
|
-
* Load Balancers
|
14
|
-
* SQL Cloud instances
|
15
|
-
|
16
|
-
Currently all services are grouped within `compute` but will be moved to their
|
17
|
-
own sections when standardisation of fog progresses.
|
18
|
-
|
19
|
-
## Installation
|
20
|
-
|
21
|
-
Add this line to your application's Gemfile:
|
22
|
-
|
23
|
-
gem "fog-brightbox"
|
24
|
-
|
25
|
-
And then execute:
|
26
|
-
|
27
|
-
$ bundle
|
28
|
-
|
29
|
-
Or install it yourself as:
|
30
|
-
|
31
|
-
$ gem install fog-brightbox
|
32
|
-
|
33
|
-
## Usage
|
34
|
-
|
35
|
-
Please see the following references for instructions using the main `fog` gem
|
36
|
-
and its modules:
|
37
|
-
|
38
|
-
* https://github.com/fog/fog
|
39
|
-
* http://fog.io/
|
40
|
-
* http://rubydoc.info/gems/fog/
|
41
|
-
|
42
|
-
## Contributing
|
43
|
-
|
44
|
-
`fog` modules are kept within the main repo.
|
45
|
-
|
46
|
-
1. Fork it ( http://github.com/fog/fog/fork )
|
47
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
48
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
49
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
50
|
-
5. Create new Pull Request
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'fog/brightbox/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "fog-brightbox"
|
8
|
-
spec.version = Fog::Brightbox::VERSION
|
9
|
-
spec.authors = ["Paul Thornthwaite"]
|
10
|
-
spec.email = ["tokengeek@gmail.com"]
|
11
|
-
spec.description = %q{Module for the 'fog' gem to support Brightbox Cloud}
|
12
|
-
spec.summary = %q{This library can be used as a module for `fog` or as standalone provider
|
13
|
-
to use the Brightbox Cloud in applications}
|
14
|
-
spec.homepage = ""
|
15
|
-
spec.license = "MIT"
|
16
|
-
|
17
|
-
spec.files = `git ls-files`.split($/)
|
18
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
-
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
spec.add_dependency "fog-core"
|
23
|
-
spec.add_dependency "fog-json"
|
24
|
-
|
25
|
-
spec.add_development_dependency "bundler", "~> 1.3"
|
26
|
-
spec.add_development_dependency "rake"
|
27
|
-
spec.add_development_dependency "minitest"
|
28
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'fog/brightbox/compute'
|
@@ -1,305 +0,0 @@
|
|
1
|
-
require 'fog/brightbox/core'
|
2
|
-
require 'fog/brightbox/compute/shared'
|
3
|
-
require 'fog/brightbox/compute/image_selector'
|
4
|
-
|
5
|
-
module Fog
|
6
|
-
module Compute
|
7
|
-
class Brightbox < Fog::Service
|
8
|
-
|
9
|
-
# Client credentials
|
10
|
-
requires :brightbox_client_id, :brightbox_secret
|
11
|
-
|
12
|
-
# API endpoint settings
|
13
|
-
recognizes :brightbox_auth_url, :brightbox_api_url
|
14
|
-
|
15
|
-
# User credentials (still requires client details)
|
16
|
-
recognizes :brightbox_username, :brightbox_password, :brightbox_account
|
17
|
-
|
18
|
-
# Cached tokens
|
19
|
-
recognizes :brightbox_access_token, :brightbox_refresh_token
|
20
|
-
|
21
|
-
# Automatic token management
|
22
|
-
recognizes :brightbox_token_management
|
23
|
-
|
24
|
-
# Excon connection settings
|
25
|
-
recognizes :persistent
|
26
|
-
|
27
|
-
model_path 'fog/brightbox/models/compute'
|
28
|
-
collection :accounts
|
29
|
-
model :account
|
30
|
-
collection :applications
|
31
|
-
model :application
|
32
|
-
collection :api_clients
|
33
|
-
model :api_client
|
34
|
-
collection :collaborations
|
35
|
-
model :collaboration
|
36
|
-
collection :servers
|
37
|
-
model :server
|
38
|
-
collection :server_groups
|
39
|
-
model :server_group
|
40
|
-
collection :firewall_policies
|
41
|
-
model :firewall_policy
|
42
|
-
collection :firewall_rules
|
43
|
-
model :firewall_rule
|
44
|
-
collection :flavors
|
45
|
-
model :flavor
|
46
|
-
collection :images
|
47
|
-
model :image
|
48
|
-
collection :load_balancers
|
49
|
-
model :load_balancer
|
50
|
-
collection :database_servers
|
51
|
-
model :database_server
|
52
|
-
collection :database_snapshots
|
53
|
-
model :database_snapshot
|
54
|
-
collection :database_types
|
55
|
-
model :database_type
|
56
|
-
collection :zones
|
57
|
-
model :zone
|
58
|
-
collection :cloud_ips
|
59
|
-
model :cloud_ip
|
60
|
-
collection :users
|
61
|
-
model :user
|
62
|
-
collection :user_collaborations
|
63
|
-
model :user_collaboration
|
64
|
-
|
65
|
-
request_path 'fog/brightbox/requests/compute'
|
66
|
-
request :accept_user_collaboration
|
67
|
-
request :activate_console_server
|
68
|
-
request :add_listeners_load_balancer
|
69
|
-
request :add_nodes_load_balancer
|
70
|
-
request :add_servers_server_group
|
71
|
-
request :apply_to_firewall_policy
|
72
|
-
request :accept_user_collaboration
|
73
|
-
request :remove_firewall_policy
|
74
|
-
request :create_api_client
|
75
|
-
request :create_application
|
76
|
-
request :create_cloud_ip
|
77
|
-
request :create_collaboration
|
78
|
-
request :create_firewall_policy
|
79
|
-
request :create_firewall_rule
|
80
|
-
request :create_image
|
81
|
-
request :create_load_balancer
|
82
|
-
request :create_database_server
|
83
|
-
request :create_server
|
84
|
-
request :create_server_group
|
85
|
-
request :delete_api_client
|
86
|
-
request :delete_application
|
87
|
-
request :delete_cloud_ip
|
88
|
-
request :delete_collaboration
|
89
|
-
request :delete_firewall_policy
|
90
|
-
request :delete_firewall_rule
|
91
|
-
request :delete_image
|
92
|
-
request :delete_load_balancer
|
93
|
-
request :delete_database_server
|
94
|
-
request :delete_database_snapshot
|
95
|
-
request :delete_server
|
96
|
-
request :delete_server_group
|
97
|
-
request :delete_user_collaboration
|
98
|
-
request :get_account
|
99
|
-
request :get_api_client
|
100
|
-
request :get_application
|
101
|
-
request :get_authenticated_user
|
102
|
-
request :get_cloud_ip
|
103
|
-
request :get_collaboration
|
104
|
-
request :get_firewall_policy
|
105
|
-
request :get_firewall_rule
|
106
|
-
request :get_image
|
107
|
-
request :get_interface
|
108
|
-
request :get_load_balancer
|
109
|
-
request :get_database_server
|
110
|
-
request :get_database_snapshot
|
111
|
-
request :get_database_type
|
112
|
-
request :get_scoped_account
|
113
|
-
request :get_server
|
114
|
-
request :get_server_group
|
115
|
-
request :get_server_type
|
116
|
-
request :get_user
|
117
|
-
request :get_user_collaboration
|
118
|
-
request :get_zone
|
119
|
-
request :list_accounts
|
120
|
-
request :list_api_clients
|
121
|
-
request :list_applications
|
122
|
-
request :list_cloud_ips
|
123
|
-
request :list_collaborations
|
124
|
-
request :list_firewall_policies
|
125
|
-
request :list_images
|
126
|
-
request :list_load_balancers
|
127
|
-
request :list_database_servers
|
128
|
-
request :list_database_snapshots
|
129
|
-
request :list_database_types
|
130
|
-
request :list_server_groups
|
131
|
-
request :list_server_types
|
132
|
-
request :list_servers
|
133
|
-
request :list_users
|
134
|
-
request :list_user_collaborations
|
135
|
-
request :list_zones
|
136
|
-
request :map_cloud_ip
|
137
|
-
request :move_servers_server_group
|
138
|
-
request :reject_user_collaboration
|
139
|
-
request :remove_listeners_load_balancer
|
140
|
-
request :remove_nodes_load_balancer
|
141
|
-
request :remove_servers_server_group
|
142
|
-
request :resend_collaboration
|
143
|
-
request :reset_ftp_password_account
|
144
|
-
request :reset_ftp_password_scoped_account
|
145
|
-
request :reset_password_database_server
|
146
|
-
request :reset_secret_api_client
|
147
|
-
request :reset_secret_application
|
148
|
-
request :resend_collaboration
|
149
|
-
request :reject_user_collaboration
|
150
|
-
request :shutdown_server
|
151
|
-
request :snapshot_database_server
|
152
|
-
request :snapshot_server
|
153
|
-
request :start_server
|
154
|
-
request :stop_server
|
155
|
-
request :unmap_cloud_ip
|
156
|
-
request :update_account
|
157
|
-
request :update_api_client
|
158
|
-
request :update_application
|
159
|
-
request :update_cloud_ip
|
160
|
-
request :update_firewall_policy
|
161
|
-
request :update_firewall_rule
|
162
|
-
request :update_image
|
163
|
-
request :update_load_balancer
|
164
|
-
request :update_database_server
|
165
|
-
request :update_database_snapshot
|
166
|
-
request :update_scoped_account
|
167
|
-
request :update_server
|
168
|
-
request :update_server_group
|
169
|
-
request :update_user
|
170
|
-
|
171
|
-
# The Mock Service allows you to run a fake instance of the Service
|
172
|
-
# which makes no real connections.
|
173
|
-
#
|
174
|
-
# @todo Implement
|
175
|
-
#
|
176
|
-
class Mock
|
177
|
-
include Fog::Brightbox::Compute::Shared
|
178
|
-
|
179
|
-
def request(method, path, expected_responses, parameters = {})
|
180
|
-
_request
|
181
|
-
end
|
182
|
-
|
183
|
-
def request_access_token(connection, credentials)
|
184
|
-
_request
|
185
|
-
end
|
186
|
-
|
187
|
-
private
|
188
|
-
|
189
|
-
def _request
|
190
|
-
raise Fog::Errors::MockNotImplemented
|
191
|
-
end
|
192
|
-
|
193
|
-
def select_default_image
|
194
|
-
"img-mockd"
|
195
|
-
end
|
196
|
-
end
|
197
|
-
|
198
|
-
# The Real Service actually makes real connections to the Brightbox
|
199
|
-
# service.
|
200
|
-
#
|
201
|
-
class Real
|
202
|
-
include Fog::Brightbox::Compute::Shared
|
203
|
-
|
204
|
-
# Makes an API request to the given path using passed options or those
|
205
|
-
# set with the service setup
|
206
|
-
#
|
207
|
-
# @todo Standard Fog behaviour is to return the Excon::Response but
|
208
|
-
# this was unintentionally changed to be the Hash version of the
|
209
|
-
# data in the body. This loses access to some details and should
|
210
|
-
# be corrected in a backwards compatible manner
|
211
|
-
#
|
212
|
-
# @overload request(params)
|
213
|
-
# @param [Hash] params Excon compatible options
|
214
|
-
# @option params [String] :body text to be sent over a socket
|
215
|
-
# @option params [Hash<Symbol, String>] :headers The default headers to supply in a request
|
216
|
-
# @option params [String] :host The destination host's reachable DNS name or IP, in the form of a String
|
217
|
-
# @option params [String] :path appears after 'scheme://host:port/'
|
218
|
-
# @option params [Fixnum] :port The port on which to connect, to the destination host
|
219
|
-
# @option params [Hash] :query appended to the 'scheme://host:port/path/' in the form of '?key=value'
|
220
|
-
# @option params [String] :scheme The protocol; 'https' causes OpenSSL to be used
|
221
|
-
# @return [Excon::Response]
|
222
|
-
# @see https://github.com/geemus/excon/blob/master/lib/excon/connection.rb
|
223
|
-
#
|
224
|
-
# @overload request(method, path, expected_responses, params = {})
|
225
|
-
# @param [String] method HTTP method to use for the request
|
226
|
-
# @param [String] path The absolute path for the request
|
227
|
-
# @param [Array<Fixnum>] expected_responses HTTP response codes that have been successful
|
228
|
-
# @param [Hash] params Keys and values for JSON
|
229
|
-
# @option params [String] :account_id The scoping account if required
|
230
|
-
# @deprecated #request with multiple arguments is deprecated
|
231
|
-
# since it is inconsistent with original fog version.
|
232
|
-
# @return [Hash]
|
233
|
-
def request(*args)
|
234
|
-
if args.size == 1
|
235
|
-
authenticated_request(*args)
|
236
|
-
else
|
237
|
-
Fog::Logger.deprecation("#request with multiple parameters is deprecated, use #wrapped_request instead [light_black](#{caller.first})[/]")
|
238
|
-
wrapped_request(*args)
|
239
|
-
end
|
240
|
-
end
|
241
|
-
|
242
|
-
# Makes a request but with seperated arguments and parses the response to a hash
|
243
|
-
#
|
244
|
-
# @note #wrapped_request is the non-standard form of request introduced by mistake
|
245
|
-
#
|
246
|
-
# @param [String] method HTTP method to use for the request
|
247
|
-
# @param [String] path The absolute path for the request
|
248
|
-
# @param [Array<Fixnum>] expected_responses HTTP response codes that have been successful
|
249
|
-
# @param [Hash] parameters Keys and values for JSON
|
250
|
-
# @option parameters [String] :account_id The scoping account if required
|
251
|
-
#
|
252
|
-
# @return [Hash]
|
253
|
-
def wrapped_request(method, path, expected_responses, parameters = {})
|
254
|
-
_wrapped_request(method, path, expected_responses, parameters)
|
255
|
-
end
|
256
|
-
|
257
|
-
private
|
258
|
-
|
259
|
-
# Wrapped request is the non-standard form of request introduced by mistake
|
260
|
-
#
|
261
|
-
# @param [String] method HTTP method to use for the request
|
262
|
-
# @param [String] path The absolute path for the request
|
263
|
-
# @param [Array<Fixnum>] expected_responses HTTP response codes that have been successful
|
264
|
-
# @param [Hash] parameters Keys and values for JSON
|
265
|
-
# @option parameters [String] :account_id The scoping account if required
|
266
|
-
#
|
267
|
-
# @return [Hash]
|
268
|
-
def _wrapped_request(method, path, expected_responses, parameters = {})
|
269
|
-
request_options = {
|
270
|
-
:method => method.to_s.upcase,
|
271
|
-
:path => path,
|
272
|
-
:expects => expected_responses
|
273
|
-
}
|
274
|
-
|
275
|
-
# Select the account to scope for this request
|
276
|
-
account = scoped_account(parameters.fetch(:account_id, nil))
|
277
|
-
request_options[:query] = { :account_id => account } if account
|
278
|
-
|
279
|
-
request_options[:body] = Fog::JSON.encode(parameters) unless parameters.empty?
|
280
|
-
|
281
|
-
response = make_request(request_options)
|
282
|
-
|
283
|
-
# FIXME: We should revert to returning the Excon::Request after a suitable
|
284
|
-
# configuration option is in place to switch back to this incorrect behaviour
|
285
|
-
if response.body.empty?
|
286
|
-
response
|
287
|
-
else
|
288
|
-
Fog::JSON.decode(response.body)
|
289
|
-
end
|
290
|
-
end
|
291
|
-
|
292
|
-
# Queries the API and tries to select the most suitable official Image
|
293
|
-
# to use if the user chooses not to select their own.
|
294
|
-
#
|
295
|
-
# @return [String] if image is found, the image's identifier
|
296
|
-
# @return [NilClass] if no image found or an error occured
|
297
|
-
#
|
298
|
-
def select_default_image
|
299
|
-
Fog::Brightbox::Compute::ImageSelector.new(list_images).latest_ubuntu
|
300
|
-
end
|
301
|
-
end
|
302
|
-
|
303
|
-
end
|
304
|
-
end
|
305
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Brightbox
|
3
|
-
module Compute
|
4
|
-
#
|
5
|
-
# This selects the preferred image to use based on a number of
|
6
|
-
# conditions
|
7
|
-
#
|
8
|
-
class ImageSelector
|
9
|
-
# Prepares a selector with the API output
|
10
|
-
#
|
11
|
-
# @param [Array<Hash>] images hash matching API output for {Fog::Compute::Brightbox#list_images}
|
12
|
-
#
|
13
|
-
def initialize(images)
|
14
|
-
@images = images
|
15
|
-
end
|
16
|
-
|
17
|
-
# Returns current identifier of the latest version of Ubuntu
|
18
|
-
#
|
19
|
-
# The order of preference is:
|
20
|
-
# * Only Official Brightbox images
|
21
|
-
# * Only Ubuntu images
|
22
|
-
# * Latest by name (alphanumeric sort)
|
23
|
-
# * Latest by creation date
|
24
|
-
#
|
25
|
-
# @note This performs a live query against the API
|
26
|
-
#
|
27
|
-
# @return [String] if image matches containing the identifier
|
28
|
-
# @return [NilClass] if no image matches
|
29
|
-
#
|
30
|
-
def latest_ubuntu
|
31
|
-
@images.select do |img|
|
32
|
-
img["official"] == true &&
|
33
|
-
img["arch"] == "i686" &&
|
34
|
-
img["name"] =~ /ubuntu/i
|
35
|
-
end.sort do |a, b|
|
36
|
-
# Reverse sort so "raring" > "precise" and "13.10" > "13.04"
|
37
|
-
b["name"].downcase <=> a["name"].downcase
|
38
|
-
end.first["id"]
|
39
|
-
rescue
|
40
|
-
nil
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|