brightbox-cli 0.17.1 → 0.17.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -1
- data/brightbox-cli.gemspec +10 -9
- data/lib/brightbox-cli/commands/servers-activate-console.rb +1 -1
- data/lib/brightbox-cli/commands/types-show.rb +5 -4
- data/lib/brightbox-cli/config.rb +1 -1
- data/lib/brightbox-cli/detailed_server.rb +2 -1
- data/lib/brightbox-cli/gli_global_hooks.rb +1 -8
- data/lib/brightbox-cli/server_groups.rb +4 -0
- data/lib/brightbox-cli/servers.rb +5 -13
- data/lib/brightbox-cli/types.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/.gitignore +1 -0
- data/lib/brightbox-cli/vendor/fog/README.rdoc +1 -1
- data/lib/brightbox-cli/vendor/fog/Rakefile +4 -3
- data/lib/brightbox-cli/vendor/fog/changelog.txt +213 -0
- data/lib/brightbox-cli/vendor/fog/docs/compute/index.markdown +15 -1
- data/lib/brightbox-cli/vendor/fog/docs/index.markdown +1 -1
- data/lib/brightbox-cli/vendor/fog/docs/storage/index.markdown +4 -4
- data/lib/brightbox-cli/vendor/fog/examples/compute_tests.rb +18 -6
- data/lib/brightbox-cli/vendor/fog/examples/dns_tests.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/examples/storage_tests.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/fog.gemspec +4 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws.rb +16 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/auto_scaling.rb +2 -17
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_formation.rb +1 -16
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_watch.rb +2 -17
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/compute.rb +10 -21
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/elasticache.rb +1 -7
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/elb.rb +34 -24
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/emr.rb +5 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/iam.rb +16 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/auto_scaling/group.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/metric_statistic.rb +1 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/security_group.rb +3 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/security_groups.rb +25 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/server.rb +4 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/dns/records.rb +3 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elb/listener.rb +9 -7
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elb/load_balancer.rb +6 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/storage/directory.rb +21 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/storage/file.rb +19 -5
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/storage/files.rb +4 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_instances.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_security_groups.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/sqs/receive_message.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/rds.rb +41 -18
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_security_group.rb +6 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_tags.rb +3 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_availability_zones.rb +3 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_security_groups.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_app_cookie_stickiness_policy.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_lb_cookie_stickiness_policy.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_load_balancer.rb +7 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb +10 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/delete_load_balancer_policy.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/describe_load_balancers.rb +5 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/set_load_balancer_listener_ssl_certificate.rb +27 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/set_load_balancer_policies_of_listener.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/run_job_flow.rb +9 -7
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/add_user_to_group.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/create_access_key.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/create_group.rb +21 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/create_user.rb +21 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/delete_access_key.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/delete_group.rb +19 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/delete_user.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/delete_user_policy.rb +16 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_access_keys.rb +21 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_groups.rb +18 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_groups_for_user.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_user_policies.rb +18 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_users.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/put_user_policy.rb +18 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/remove_user_from_group.rb +19 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/upload_server_certificate.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb +30 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/create_db_instance.rb +67 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/create_db_security_group.rb +19 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/delete_db_instance.rb +19 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/delete_db_security_group.rb +11 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/describe_db_instances.rb +56 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/describe_db_reserved_instances.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/describe_db_security_groups.rb +44 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/modify_db_instance.rb +26 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/reboot_db_instance.rb +17 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb +27 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/change_message_visibility.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/delete_message.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/receive_message.rb +13 -14
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/copy_object.rb +14 -6
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/delete_object.rb +73 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket.rb +3 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +95 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_versioning.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object.rb +27 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_http_url.rb +4 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_https_url.rb +4 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_bucket_versioning.rb +41 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_bucket_website.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_object.rb +25 -9
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/ses.rb +2 -7
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/simpledb.rb +4 -17
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sns.rb +1 -14
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sqs.rb +5 -11
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/storage.rb +6 -22
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/aws.rb +9 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/voxel.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/compute.rb +6 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/compute/models/server.rb +11 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/core.rb +0 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/connection.rb +0 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/errors.rb +5 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/scp.rb +18 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/wait_for.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/dnsmadeeasy/dns.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/dynect/models/dns/records.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/dynect/requests/dns/get_node_list.rb +2 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/compute.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/add_backup_internet_service.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/add_internet_service.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/add_node.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/clone_vapp.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/configure_internet_service.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/configure_network.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/configure_network_ip.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/configure_vapp.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/instantiate_vapp_template.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/compute.rb +7 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/nodes.rb +1 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/server.rb +93 -99
- data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/servers.rb +2 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/util.rb +1 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/providers.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/dns.rb +10 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/load_balancers.rb +3 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/compute/flavor.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/compute/server.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/callback.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/record.rb +4 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/load_balancers/load_balancer.rb +18 -8
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/storage/directory.rb +5 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/compute/create_image.rb +1 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/load_balancers/delete_nodes.rb +1 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/load_balancers/list_load_balancers.rb +8 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/compute.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/compute.rb +91 -30
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/catalog.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/catalog_item.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/catalogs.rb +5 -8
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/ip.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/network.rb +9 -51
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/networks.rb +21 -7
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/server.rb +38 -58
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/servers.rb +12 -18
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/task.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/tasks.rb +1 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/vdc.rb +14 -29
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/vdcs.rb +6 -11
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/clone_vapp.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/configure_network.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/configure_network_ip.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/configure_vapp.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/configure_vm.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/login.rb +8 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/virtual_box/compute.rb +4 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/compute.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/models/compute/server.rb +7 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +86 -86
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/vm_clone.rb +43 -8
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/models/dns/record.rb +7 -5
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/update_host.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/spec/ecloud/spec_helper.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/elb/model_tests.rb +15 -6
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/instance_tests.rb +37 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/security_group_tests.rb +6 -4
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elb/helper.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elb/listener_tests.rb +22 -4
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elb/policy_tests.rb +13 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/access_key_tests.rb +2 -7
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/group_tests.rb +1 -4
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/user_policy_tests.rb +4 -11
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/user_tests.rb +19 -12
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/rds/helper.rb +38 -3
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/rds/instance_tests.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/bucket_tests.rb +66 -1
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/account_tests.rb +3 -3
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/api_client_tests.rb +6 -6
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/cloud_ip_tests.rb +15 -9
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/helper.rb +6 -2
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/image_tests.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/interface_tests.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/load_balancer_tests.rb +9 -9
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_group_tests.rb +8 -8
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_tests.rb +17 -13
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_type_tests.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/user_tests.rb +3 -3
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/zone_tests.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/helper.rb +87 -64
- data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/ip_tests.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/server_tests.rb +4 -4
- data/lib/brightbox-cli/vendor/fog/tests/helpers/formats_helper.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/helpers/mock_helper.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/dns_tests.rb +4 -2
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/load_balancers/helper.rb +27 -11
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/load_balancers/load_balancer_tests.rb +4 -1
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/load_balancers/node_tests.rb +24 -25
- data/lib/brightbox-cli/vendor/fog/tests/slicehost/requests/compute/slice_tests.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/tests/storm_on_demand/requests/compute/server_tests.rb +3 -3
- data/lib/brightbox-cli/vendor/fog/tests/vcloud/models/compute/servers_tests.rb +18 -90
- data/lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_clone_tests.rb +16 -4
- data/lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_power_on_tests.rb +1 -1
- data/lib/brightbox-cli/version.rb +1 -1
- data/spec/cloud_ips_spec.rb +1 -1
- data/spec/fixtures/vcr_cassettes/list_cloud_ip.yml +58 -26
- data/spec/fixtures/vcr_cassettes/server_show.yml +143 -102
- data/spec/servers_spec.rb +3 -2
- data/spec/spec_helper.rb +4 -0
- metadata +128 -213
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/access_list_tests.rb +0 -12
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/access_lists_tests.rb +0 -12
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/load_balancer_tests.rb +0 -116
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/load_balancers_tests.rb +0 -19
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/node_tests.rb +0 -19
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/nodes_tests.rb +0 -12
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/virtual_ip_tests.rb +0 -16
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/virtual_ips_tests.rb +0 -12
@@ -45,7 +45,7 @@ geemus says: "That should give you everything you need to get started, but let m
|
|
45
45
|
* Find something you would like to work on. For suggestions look for the `easy`, `medium` and `hard` tags in the [issues](http://github.com/fog/fog/issues)
|
46
46
|
* Fork the project and do your work in a topic branch.
|
47
47
|
* Add shindo tests to prove your code works and run all the tests using `bundle exec rake`.
|
48
|
-
* Rebase your branch against
|
48
|
+
* Rebase your branch against fog/fog to make sure everything is up to date.
|
49
49
|
* Commit your changes and send a pull request.
|
50
50
|
|
51
51
|
## Resources
|
@@ -35,8 +35,8 @@ First, create a connection with your new account:
|
|
35
35
|
# create a connection
|
36
36
|
connection = Fog::Storage.new({
|
37
37
|
:provider => 'AWS',
|
38
|
-
:
|
39
|
-
:
|
38
|
+
:aws_access_key_id => YOUR_SECRET_ACCESS_KEY_ID,
|
39
|
+
:aws_secret_access_key => YOUR_SECRET_ACCESS_KEY
|
40
40
|
})
|
41
41
|
|
42
42
|
# First, a place to contain the glorious details
|
@@ -131,8 +131,8 @@ Sign up <a href="http://gs-signup-redirect.appspot.com/">here</a> and get your c
|
|
131
131
|
|
132
132
|
connection = Fog::Storage.new({
|
133
133
|
:provider => 'Google',
|
134
|
-
:
|
135
|
-
:
|
134
|
+
:google_storage_access_key_id => YOUR_SECRET_ACCESS_KEY_ID,
|
135
|
+
:google_storage_secret_access_key => YOUR_SECRET_ACCESS_KEY
|
136
136
|
})
|
137
137
|
|
138
138
|
## Rackspace CloudFiles
|
@@ -7,7 +7,7 @@ require File.join(File.dirname(__FILE__), '..', 'tests', 'helper')
|
|
7
7
|
Shindo.tests('compute examples', 'compute') do
|
8
8
|
|
9
9
|
# iterate over all the providers
|
10
|
-
Fog.providers.each do |provider|
|
10
|
+
Fog.providers.values.each do |provider|
|
11
11
|
|
12
12
|
# FIXME: implement expected shared compute stuff for these providers as well
|
13
13
|
next if ['Bluebox', 'Brightbox', 'Ecloud', 'GoGrid', 'Linode', 'NewServers', 'Ninefold', 'Slicehost', 'StormOnDemand', 'VirtualBox', 'Voxel'].include?(provider)
|
@@ -44,17 +44,29 @@ Shindo.tests('compute examples', 'compute') do
|
|
44
44
|
|
45
45
|
# scp a file to a server
|
46
46
|
lorem_path = File.join([File.dirname(__FILE__), '..', 'tests', 'lorem.txt'])
|
47
|
-
tests("@server.
|
48
|
-
@server.
|
47
|
+
tests("@server.scp_upload('#{lorem_path}', 'lorem.txt')").succeeds do
|
48
|
+
@server.scp_upload(lorem_path, 'lorem.txt')
|
49
49
|
end
|
50
50
|
|
51
|
+
# scp a file from a server
|
52
|
+
tests("@server.scp_download('lorem.txt', '/tmp/lorem.txt)").succeeds do
|
53
|
+
@server.scp_download('lorem.txt', '/tmp/lorem.txt')
|
54
|
+
end
|
55
|
+
File.delete('/tmp/lorem.txt')
|
56
|
+
|
51
57
|
# scp a directory to a server
|
52
58
|
Dir.mkdir('/tmp/lorem')
|
53
59
|
file = ::File.new('/tmp/lorem/lorem.txt', 'w')
|
54
60
|
file.write(File.read(lorem_path))
|
55
|
-
|
56
|
-
|
57
|
-
|
61
|
+
tests("@server.scp_upload('/tmp/lorem', '/tmp', :recursive => true)").succeeds do
|
62
|
+
@server.scp_upload('/tmp/lorem', '/tmp', :recursive => true)
|
63
|
+
end
|
64
|
+
File.delete('/tmp/lorem/lorem.txt')
|
65
|
+
Dir.rmdir('/tmp/lorem')
|
66
|
+
|
67
|
+
# scp a directory from a server
|
68
|
+
tests("@server.scp_download('/tmp/lorem', '/tmp', :recursive => true)").succeeds do
|
69
|
+
@server.scp_download('/tmp/lorem', '/tmp', :recursive => true)
|
58
70
|
end
|
59
71
|
File.delete('/tmp/lorem/lorem.txt')
|
60
72
|
Dir.rmdir('/tmp/lorem')
|
@@ -7,7 +7,7 @@ require File.join(File.dirname(__FILE__), '..', 'tests', 'helper')
|
|
7
7
|
Shindo.tests('dns examples', 'dns') do
|
8
8
|
|
9
9
|
# iterate over all the providers
|
10
|
-
Fog.providers.each do |provider|
|
10
|
+
Fog.providers.values.each do |provider|
|
11
11
|
|
12
12
|
provider = eval(provider) # convert from string to object
|
13
13
|
|
@@ -7,7 +7,7 @@ require File.join(File.dirname(__FILE__), '..', 'tests', 'helper')
|
|
7
7
|
Shindo.tests('storage examples', 'storage') do
|
8
8
|
|
9
9
|
# iterate over all the providers
|
10
|
-
Fog.providers.each do |provider|
|
10
|
+
Fog.providers.values.each do |provider|
|
11
11
|
|
12
12
|
provider = eval(provider) # convert from string to object
|
13
13
|
|
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
|
|
6
6
|
## If your rubyforge_project name is different, then edit it and comment out
|
7
7
|
## the sub! line in the Rakefile
|
8
8
|
s.name = 'fog'
|
9
|
-
s.version = '1.1.
|
10
|
-
s.date = '2011-
|
9
|
+
s.version = '1.1.2'
|
10
|
+
s.date = '2011-12-18'
|
11
11
|
s.rubyforge_project = 'fog'
|
12
12
|
|
13
13
|
## Make sure your summary is short. The description may be as long
|
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
|
|
37
37
|
## List your runtime dependencies here. Runtime dependencies are those
|
38
38
|
## that are needed for an end user to actually USE your code.
|
39
39
|
s.add_dependency('builder')
|
40
|
-
s.add_dependency('excon', '~>0.
|
40
|
+
s.add_dependency('excon', '~>0.9.0')
|
41
41
|
s.add_dependency('formatador', '~>0.2.0')
|
42
42
|
s.add_dependency('multi_json', '~>1.0.3')
|
43
43
|
s.add_dependency('mime-types')
|
@@ -52,6 +52,7 @@ Gem::Specification.new do |s|
|
|
52
52
|
s.add_development_dependency('rake')
|
53
53
|
s.add_development_dependency('rbvmomi')
|
54
54
|
s.add_development_dependency('rdoc')
|
55
|
+
s.add_development_dependency('thor')
|
55
56
|
s.add_development_dependency('rspec', '~>1.3.1')
|
56
57
|
s.add_development_dependency('shindo', '~>0.3.4')
|
57
58
|
s.add_development_dependency('virtualbox', '~>0.9.1')
|
@@ -10,6 +10,7 @@ module Fog
|
|
10
10
|
service(:compute, 'aws/compute', 'Compute')
|
11
11
|
service(:cloud_formation, 'aws/cloud_formation', 'CloudFormation')
|
12
12
|
service(:cloud_watch, 'aws/cloud_watch', 'CloudWatch')
|
13
|
+
service(:dynamodb, 'aws/dynamodb', 'DynamoDB')
|
13
14
|
service(:dns, 'aws/dns', 'DNS')
|
14
15
|
service(:elasticache, 'aws/elasticache', 'Elasticache')
|
15
16
|
service(:elb, 'aws/elb', 'ELB')
|
@@ -20,6 +21,7 @@ module Fog
|
|
20
21
|
service(:simpledb, 'aws/simpledb', 'SimpleDB')
|
21
22
|
service(:sns, 'aws/sns', 'SNS')
|
22
23
|
service(:sqs, 'aws/sqs', 'SQS')
|
24
|
+
service(:sts, 'aws/sts', 'STS')
|
23
25
|
service(:storage, 'aws/storage', 'Storage')
|
24
26
|
|
25
27
|
def self.indexed_param(key, values)
|
@@ -39,7 +41,7 @@ module Fog
|
|
39
41
|
end
|
40
42
|
params
|
41
43
|
end
|
42
|
-
|
44
|
+
|
43
45
|
def self.serialize_keys(key, value, options = {})
|
44
46
|
case value
|
45
47
|
when Hash
|
@@ -85,6 +87,10 @@ module Fog
|
|
85
87
|
'Version' => options[:version]
|
86
88
|
})
|
87
89
|
|
90
|
+
params.merge!({
|
91
|
+
'SecurityToken' => options[:aws_session_token]
|
92
|
+
}) if options[:aws_session_token]
|
93
|
+
|
88
94
|
body = ''
|
89
95
|
for key in params.keys.sort
|
90
96
|
unless (value = params[key]).nil?
|
@@ -218,6 +224,15 @@ module Fog
|
|
218
224
|
def self.volume_id
|
219
225
|
"vol-#{Fog::Mock.random_hex(8)}"
|
220
226
|
end
|
227
|
+
|
228
|
+
def self.key_id(length=21)
|
229
|
+
#Probably close enough
|
230
|
+
Fog::Mock.random_selection('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',length)
|
231
|
+
end
|
232
|
+
|
233
|
+
def self.rds_address(db_name,region)
|
234
|
+
"#{db_name}.#{Fog::Mock.random_letters(rand(12) + 4)}.#{region}.rds.amazonaws.com"
|
235
|
+
end
|
221
236
|
end
|
222
237
|
end
|
223
238
|
end
|
@@ -77,22 +77,7 @@ module Fog
|
|
77
77
|
|
78
78
|
@connection_options = options[:connection_options] || {}
|
79
79
|
options[:region] ||= 'us-east-1'
|
80
|
-
@host = options[:host] ||
|
81
|
-
when 'ap-northeast-1'
|
82
|
-
'autoscaling.ap-northeast-1.amazonaws.com'
|
83
|
-
when 'ap-southeast-1'
|
84
|
-
'autoscaling.ap-southeast-1.amazonaws.com'
|
85
|
-
when 'eu-west-1'
|
86
|
-
'autoscaling.eu-west-1.amazonaws.com'
|
87
|
-
when 'us-east-1'
|
88
|
-
'autoscaling.us-east-1.amazonaws.com'
|
89
|
-
when 'us-west-1'
|
90
|
-
'autoscaling.us-west-1.amazonaws.com'
|
91
|
-
when 'us-west-2'
|
92
|
-
'autoscaling.us-west-2.amazonaws.com'
|
93
|
-
else
|
94
|
-
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
95
|
-
end
|
80
|
+
@host = options[:host] || "autoscaling.#{options[:region]}.amazonaws.com"
|
96
81
|
@path = options[:path] || '/'
|
97
82
|
@port = options[:port] || 443
|
98
83
|
@persistent = options[:persistent] || false
|
@@ -206,7 +191,7 @@ module Fog
|
|
206
191
|
|
207
192
|
@region = options[:region] || 'us-east-1'
|
208
193
|
|
209
|
-
unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2'].include?(@region)
|
194
|
+
unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'sa-east-1', 'us-east-1', 'us-west-1', 'us-west-2'].include?(@region)
|
210
195
|
raise ArgumentError, "Unknown region: #{@region.inspect}"
|
211
196
|
end
|
212
197
|
|
@@ -54,22 +54,7 @@ module Fog
|
|
54
54
|
|
55
55
|
@connection_options = options[:connection_options] || {}
|
56
56
|
options[:region] ||= 'us-east-1'
|
57
|
-
@host = options[:host] ||
|
58
|
-
when 'ap-northeast-1'
|
59
|
-
'cloudformation.ap-northeast-1.amazonaws.com'
|
60
|
-
when 'ap-southeast-1'
|
61
|
-
'cloudformation.ap-southeast-1.amazonaws.com'
|
62
|
-
when 'eu-west-1'
|
63
|
-
'cloudformation.eu-west-1.amazonaws.com'
|
64
|
-
when 'us-east-1'
|
65
|
-
'cloudformation.us-east-1.amazonaws.com'
|
66
|
-
when 'us-west-1'
|
67
|
-
'cloudformation.us-west-1.amazonaws.com'
|
68
|
-
when 'us-west-2'
|
69
|
-
'cloudformation.us-west-2.amazonaws.com'
|
70
|
-
else
|
71
|
-
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
72
|
-
end
|
57
|
+
@host = options[:host] || "cloudformation.#{options[:region]}.amazonaws.com"
|
73
58
|
@path = options[:path] || '/'
|
74
59
|
@persistent = options[:persistent] || false
|
75
60
|
@port = options[:port] || 443
|
@@ -57,7 +57,7 @@ module Fog
|
|
57
57
|
#
|
58
58
|
# ==== Parameters
|
59
59
|
# * options<~Hash> - config arguments for connection. Defaults to {}.
|
60
|
-
# * region<~String> - optional region to use,
|
60
|
+
# * region<~String> - optional region to use. For instance, 'eu-west-1', 'us-east-1', etc.
|
61
61
|
#
|
62
62
|
# ==== Returns
|
63
63
|
# * CloudWatch object with connection to AWS.
|
@@ -68,22 +68,7 @@ module Fog
|
|
68
68
|
|
69
69
|
@connection_options = options[:connection_options] || {}
|
70
70
|
options[:region] ||= 'us-east-1'
|
71
|
-
@host = options[:host] ||
|
72
|
-
when 'ap-northeast-1'
|
73
|
-
'monitoring.ap-northeast-1.amazonaws.com'
|
74
|
-
when 'ap-southeast-1'
|
75
|
-
'monitoring.ap-southeast-1.amazonaws.com'
|
76
|
-
when 'eu-west-1'
|
77
|
-
'monitoring.eu-west-1.amazonaws.com'
|
78
|
-
when 'us-east-1'
|
79
|
-
'monitoring.us-east-1.amazonaws.com'
|
80
|
-
when 'us-west-1'
|
81
|
-
'monitoring.us-west-1.amazonaws.com'
|
82
|
-
when 'us-west-2'
|
83
|
-
'monitoring.us-west-2.amazonaws.com'
|
84
|
-
else
|
85
|
-
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
86
|
-
end
|
71
|
+
@host = options[:host] || "monitoring.#{options[:region]}.amazonaws.com"
|
87
72
|
@path = options[:path] || '/'
|
88
73
|
@persistent = options[:persistent] || false
|
89
74
|
@port = options[:port] || 443
|
@@ -6,7 +6,7 @@ module Fog
|
|
6
6
|
class AWS < Fog::Service
|
7
7
|
|
8
8
|
requires :aws_access_key_id, :aws_secret_access_key
|
9
|
-
recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent
|
9
|
+
recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent, :aws_session_token
|
10
10
|
|
11
11
|
model_path 'fog/aws/models/compute'
|
12
12
|
model :address
|
@@ -57,6 +57,7 @@ module Fog
|
|
57
57
|
request :describe_images
|
58
58
|
request :describe_instances
|
59
59
|
request :describe_reserved_instances
|
60
|
+
request :describe_instance_status
|
60
61
|
request :describe_key_pairs
|
61
62
|
request :describe_placement_groups
|
62
63
|
request :describe_regions
|
@@ -170,7 +171,7 @@ module Fog
|
|
170
171
|
|
171
172
|
@region = options[:region] || 'us-east-1'
|
172
173
|
|
173
|
-
unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2'].include?(@region)
|
174
|
+
unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1'].include?(@region)
|
174
175
|
raise ArgumentError, "Unknown region: #{@region.inspect}"
|
175
176
|
end
|
176
177
|
end
|
@@ -247,8 +248,9 @@ module Fog
|
|
247
248
|
#
|
248
249
|
# ==== Parameters
|
249
250
|
# * options<~Hash> - config arguments for connection. Defaults to {}.
|
250
|
-
# * region<~String> - optional region to use,
|
251
|
-
#
|
251
|
+
# * region<~String> - optional region to use. For instance,
|
252
|
+
# 'eu-west-1', 'us-east-1', and etc.
|
253
|
+
# * aws_session_token<~String> - when using Session Tokens or Federated Users, a session_token must be presented
|
252
254
|
#
|
253
255
|
# ==== Returns
|
254
256
|
# * EC2 object with connection to aws.
|
@@ -257,6 +259,7 @@ module Fog
|
|
257
259
|
|
258
260
|
@aws_access_key_id = options[:aws_access_key_id]
|
259
261
|
@aws_secret_access_key = options[:aws_secret_access_key]
|
262
|
+
@aws_session_token = options[:aws_session_token]
|
260
263
|
@connection_options = options[:connection_options] || {}
|
261
264
|
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
262
265
|
@region = options[:region] ||= 'us-east-1'
|
@@ -268,22 +271,7 @@ module Fog
|
|
268
271
|
@port = endpoint.port
|
269
272
|
@scheme = endpoint.scheme
|
270
273
|
else
|
271
|
-
@host = options[:host] ||
|
272
|
-
when 'ap-northeast-1'
|
273
|
-
'ec2.ap-northeast-1.amazonaws.com'
|
274
|
-
when 'ap-southeast-1'
|
275
|
-
'ec2.ap-southeast-1.amazonaws.com'
|
276
|
-
when 'eu-west-1'
|
277
|
-
'ec2.eu-west-1.amazonaws.com'
|
278
|
-
when 'us-east-1'
|
279
|
-
'ec2.us-east-1.amazonaws.com'
|
280
|
-
when 'us-west-1'
|
281
|
-
'ec2.us-west-1.amazonaws.com'
|
282
|
-
when 'us-west-2'
|
283
|
-
'ec2.us-west-2.amazonaws.com'
|
284
|
-
else
|
285
|
-
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
286
|
-
end
|
274
|
+
@host = options[:host] || "ec2.#{options[:region]}.amazonaws.com"
|
287
275
|
@path = options[:path] || '/'
|
288
276
|
@persistent = options[:persistent] || false
|
289
277
|
@port = options[:port] || 443
|
@@ -306,11 +294,12 @@ module Fog
|
|
306
294
|
params,
|
307
295
|
{
|
308
296
|
:aws_access_key_id => @aws_access_key_id,
|
297
|
+
:aws_session_token => @aws_session_token,
|
309
298
|
:hmac => @hmac,
|
310
299
|
:host => @host,
|
311
300
|
:path => @path,
|
312
301
|
:port => @port,
|
313
|
-
:version => '2011-
|
302
|
+
:version => '2011-12-15'
|
314
303
|
}
|
315
304
|
)
|
316
305
|
|
@@ -54,13 +54,7 @@ module Fog
|
|
54
54
|
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
55
55
|
|
56
56
|
options[:region] ||= 'us-east-1'
|
57
|
-
@host = options[:host] ||
|
58
|
-
when 'us-east-1'
|
59
|
-
'elasticache.us-east-1.amazonaws.com'
|
60
|
-
#TODO: Support other regions
|
61
|
-
else
|
62
|
-
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
63
|
-
end
|
57
|
+
@host = options[:host] || "elasticache.#{options[:region]}.amazonaws.com"
|
64
58
|
@path = options[:path] || '/'
|
65
59
|
@port = options[:port] || 443
|
66
60
|
@scheme = options[:scheme] || 'https'
|
@@ -4,9 +4,15 @@ module Fog
|
|
4
4
|
module AWS
|
5
5
|
class ELB < Fog::Service
|
6
6
|
|
7
|
-
class
|
8
|
-
class
|
9
|
-
class
|
7
|
+
class DuplicatePolicyName < Fog::Errors::Error; end
|
8
|
+
class IdentifierTaken < Fog::Errors::Error; end
|
9
|
+
class InvalidInstance < Fog::Errors::Error; end
|
10
|
+
class InvalidConfigurationRequest < Fog::Errors::Error; end
|
11
|
+
class PolicyNotFound < Fog::Errors::Error; end
|
12
|
+
class PolicyTypeNotFound < Fog::Errors::Error; end
|
13
|
+
class Throttled < Fog::Errors::Error; end
|
14
|
+
class TooManyPolicies < Fog::Errors::Error; end
|
15
|
+
class ValidationError < Fog::Errors::Error; end
|
10
16
|
|
11
17
|
requires :aws_access_key_id, :aws_secret_access_key
|
12
18
|
recognizes :region, :host, :path, :port, :scheme, :persistent
|
@@ -17,12 +23,15 @@ module Fog
|
|
17
23
|
request :create_lb_cookie_stickiness_policy
|
18
24
|
request :create_load_balancer
|
19
25
|
request :create_load_balancer_listeners
|
26
|
+
request :create_load_balancer_policy
|
20
27
|
request :delete_load_balancer
|
21
28
|
request :delete_load_balancer_listeners
|
22
29
|
request :delete_load_balancer_policy
|
23
30
|
request :deregister_instances_from_load_balancer
|
24
31
|
request :describe_instance_health
|
25
32
|
request :describe_load_balancers
|
33
|
+
request :describe_load_balancer_policies
|
34
|
+
request :describe_load_balancer_policy_types
|
26
35
|
request :disable_availability_zones_for_load_balancer
|
27
36
|
request :enable_availability_zones_for_load_balancer
|
28
37
|
request :register_instances_with_load_balancer
|
@@ -39,13 +48,16 @@ module Fog
|
|
39
48
|
|
40
49
|
class Mock
|
41
50
|
|
51
|
+
require 'fog/aws/elb/policy_types'
|
52
|
+
|
42
53
|
def self.data
|
43
54
|
@data ||= Hash.new do |hash, region|
|
44
55
|
owner_id = Fog::AWS::Mock.owner_id
|
45
56
|
hash[region] = Hash.new do |region_hash, key|
|
46
57
|
region_hash[key] = {
|
47
58
|
:owner_id => owner_id,
|
48
|
-
:load_balancers => {}
|
59
|
+
:load_balancers => {},
|
60
|
+
:policy_types => Fog::AWS::ELB::Mock::POLICY_TYPES
|
49
61
|
}
|
50
62
|
end
|
51
63
|
end
|
@@ -94,7 +106,7 @@ module Fog
|
|
94
106
|
#
|
95
107
|
# ==== Parameters
|
96
108
|
# * options<~Hash> - config arguments for connection. Defaults to {}.
|
97
|
-
# * region<~String> - optional region to use,
|
109
|
+
# * region<~String> - optional region to use. For instance, 'eu-west-1', 'us-east-1', etc.
|
98
110
|
#
|
99
111
|
# ==== Returns
|
100
112
|
# * ELB object with connection to AWS.
|
@@ -107,22 +119,7 @@ module Fog
|
|
107
119
|
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
108
120
|
|
109
121
|
options[:region] ||= 'us-east-1'
|
110
|
-
@host = options[:host] ||
|
111
|
-
when 'ap-northeast-1'
|
112
|
-
'elasticloadbalancing.ap-northeast-1.amazonaws.com'
|
113
|
-
when 'ap-southeast-1'
|
114
|
-
'elasticloadbalancing.ap-southeast-1.amazonaws.com'
|
115
|
-
when 'eu-west-1'
|
116
|
-
'elasticloadbalancing.eu-west-1.amazonaws.com'
|
117
|
-
when 'us-east-1'
|
118
|
-
'elasticloadbalancing.us-east-1.amazonaws.com'
|
119
|
-
when 'us-west-1'
|
120
|
-
'elasticloadbalancing.us-west-1.amazonaws.com'
|
121
|
-
when 'us-west-2'
|
122
|
-
'elasticloadbalancing.us-west-2.amazonaws.com'
|
123
|
-
else
|
124
|
-
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
125
|
-
end
|
122
|
+
@host = options[:host] || "elasticloadbalancing.#{options[:region]}.amazonaws.com"
|
126
123
|
@path = options[:path] || '/'
|
127
124
|
@persistent = options[:persistent] || false
|
128
125
|
@port = options[:port] || 443
|
@@ -148,7 +145,7 @@ module Fog
|
|
148
145
|
:host => @host,
|
149
146
|
:path => @path,
|
150
147
|
:port => @port,
|
151
|
-
:version => '2011-
|
148
|
+
:version => '2011-11-15'
|
152
149
|
}
|
153
150
|
)
|
154
151
|
|
@@ -166,14 +163,27 @@ module Fog
|
|
166
163
|
case match[1]
|
167
164
|
when 'CertificateNotFound'
|
168
165
|
raise Fog::AWS::IAM::NotFound.slurp(error, match[2])
|
169
|
-
when 'LoadBalancerNotFound'
|
170
|
-
raise Fog::AWS::ELB::NotFound.slurp(error, match[2])
|
171
166
|
when 'DuplicateLoadBalancerName'
|
172
167
|
raise Fog::AWS::ELB::IdentifierTaken.slurp(error, match[2])
|
168
|
+
when 'DuplicatePolicyName'
|
169
|
+
raise Fog::AWS::ELB::DuplicatePolicyName.slurp(error, match[2])
|
173
170
|
when 'InvalidInstance'
|
174
171
|
raise Fog::AWS::ELB::InvalidInstance.slurp(error, match[2])
|
172
|
+
when 'InvalidConfigurationRequest'
|
173
|
+
# when do they fucking use this shit?
|
174
|
+
raise Fog::AWS::ELB::InvalidConfigurationRequest.slurp(error, match[2])
|
175
|
+
when 'LoadBalancerNotFound'
|
176
|
+
raise Fog::AWS::ELB::NotFound.slurp(error, match[2])
|
177
|
+
when 'PolicyNotFound'
|
178
|
+
raise Fog::AWS::ELB::PolicyNotFound.slurp(error, match[2])
|
179
|
+
when 'PolicyTypeNotFound'
|
180
|
+
raise Fog::AWS::ELB::PolicyTypeNotFound.slurp(error, match[2])
|
175
181
|
when 'Throttling'
|
176
182
|
raise Fog::AWS::ELB::Throttled.slurp(error, match[2])
|
183
|
+
when 'TooManyPolicies'
|
184
|
+
raise Fog::AWS::ELB::TooManyPolicies.slurp(error, match[2])
|
185
|
+
when 'ValidationError'
|
186
|
+
raise Fog::AWS::ELB::ValidationError.slurp(error, match[2])
|
177
187
|
else
|
178
188
|
raise
|
179
189
|
end
|