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
data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_object_versions.rb
CHANGED
@@ -65,11 +65,104 @@ module Fog
|
|
65
65
|
:idempotent => true,
|
66
66
|
:method => 'GET',
|
67
67
|
:parser => Fog::Parsers::Storage::AWS::GetBucketObjectVersions.new,
|
68
|
-
:query => {'versions' => nil}.merge!(options)
|
69
|
-
})
|
68
|
+
:query => {'versions' => nil}.merge!(options) })
|
70
69
|
end
|
71
70
|
|
72
71
|
end
|
72
|
+
|
73
|
+
class Mock
|
74
|
+
def get_bucket_object_versions(bucket_name, options = {})
|
75
|
+
delimiter, key_marker, max_keys, prefix, version_id_marker = \
|
76
|
+
options['delimiter'], options['key_marker'], options['max_keys'],options['prefix'],options['version_id_marker']
|
77
|
+
|
78
|
+
unless bucket_name
|
79
|
+
raise ArgumentError.new('bucket_name is required')
|
80
|
+
end
|
81
|
+
|
82
|
+
response = Excon::Response.new
|
83
|
+
|
84
|
+
# Invalid arguments.
|
85
|
+
if version_id_marker && !key_marker
|
86
|
+
response.status = 400
|
87
|
+
response.body = {
|
88
|
+
'Error' => {
|
89
|
+
'Code' => 'InvalidArgument',
|
90
|
+
'Message' => 'A version-id marker cannot be specified without a key marker.',
|
91
|
+
'ArgumentValue' => version_id_marker,
|
92
|
+
'RequestId' => Fog::Mock.random_hex(16),
|
93
|
+
'HostId' => Fog::Mock.random_base64(65)
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
# Valid case.
|
98
|
+
# TODO: (nirvdrum 12/15/11) It's not clear to me how to actually use version-id-marker, so I didn't implement it below.
|
99
|
+
elsif bucket = self.data[:buckets][bucket_name]
|
100
|
+
# We need to order results by S3 key, but since our data store is key => [versions], we want to ensure the integrity
|
101
|
+
# of the versions as well. So, sort the keys, then fetch the versions, and then combine them all as a sorted list by
|
102
|
+
# flattening the results.
|
103
|
+
contents = bucket[:objects].keys.sort.collect { |key| bucket[:objects][key] }.flatten.reject do |object|
|
104
|
+
(prefix && object['Key'][0...prefix.length] != prefix) ||
|
105
|
+
(key_marker && object['Key'] <= key_marker) ||
|
106
|
+
(delimiter && object['Key'][(prefix ? prefix.length : 0)..-1].include?(delimiter) \
|
107
|
+
&& common_prefixes << object['Key'].sub(/^(#{prefix}[^#{delimiter}]+.).*/, '\1'))
|
108
|
+
end.map do |object|
|
109
|
+
if object.has_key?(:delete_marker)
|
110
|
+
tag_name = 'DeleteMarker'
|
111
|
+
extracted_attrs = ['Key', 'VersionId']
|
112
|
+
else
|
113
|
+
tag_name = 'Version'
|
114
|
+
extracted_attrs = ['ETag', 'Key', 'StorageClass', 'VersionId']
|
115
|
+
end
|
116
|
+
|
117
|
+
data = {}
|
118
|
+
data[tag_name] = object.reject { |key, value| !extracted_attrs.include?(key) }
|
119
|
+
data[tag_name].merge!({
|
120
|
+
'LastModified' => Time.parse(object['Last-Modified']),
|
121
|
+
'Owner' => bucket['Owner'],
|
122
|
+
'IsLatest' => object == bucket[:objects][object['Key']].first
|
123
|
+
})
|
124
|
+
|
125
|
+
data[tag_name]['Size'] = object['Content-Length'].to_i if tag_name == 'Version'
|
126
|
+
data
|
127
|
+
end
|
128
|
+
|
129
|
+
max_keys = max_keys || 1000
|
130
|
+
size = [max_keys, 1000].min
|
131
|
+
truncated_contents = contents[0...size]
|
132
|
+
|
133
|
+
response.status = 200
|
134
|
+
response.body = {
|
135
|
+
'Versions' => truncated_contents,
|
136
|
+
'IsTruncated' => truncated_contents.size != contents.size,
|
137
|
+
'KeyMarker' => key_marker,
|
138
|
+
'VersionIdMarker' => version_id_marker,
|
139
|
+
'MaxKeys' => max_keys,
|
140
|
+
'Name' => bucket['Name'],
|
141
|
+
'Prefix' => prefix
|
142
|
+
}
|
143
|
+
if max_keys && max_keys < response.body['Versions'].length
|
144
|
+
response.body['IsTruncated'] = true
|
145
|
+
response.body['Versions'] = response.body['Versions'][0...max_keys]
|
146
|
+
end
|
147
|
+
|
148
|
+
# Missing bucket case.
|
149
|
+
else
|
150
|
+
response.status = 404
|
151
|
+
response.body = {
|
152
|
+
'Error' => {
|
153
|
+
'Code' => 'NoSuchBucket',
|
154
|
+
'Message' => 'The specified bucket does not exist',
|
155
|
+
'BucketName' => bucket_name,
|
156
|
+
'RequestId' => Fog::Mock.random_hex(16),
|
157
|
+
'HostId' => Fog::Mock.random_base64(65)
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
161
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
162
|
+
end
|
163
|
+
response
|
164
|
+
end
|
165
|
+
end
|
73
166
|
end
|
74
167
|
end
|
75
168
|
end
|
@@ -33,7 +33,39 @@ module Fog
|
|
33
33
|
:query => {'versioning' => nil}
|
34
34
|
})
|
35
35
|
end
|
36
|
+
end
|
37
|
+
|
38
|
+
class Mock
|
39
|
+
def get_bucket_versioning(bucket_name)
|
40
|
+
response = Excon::Response.new
|
41
|
+
bucket = self.data[:buckets][bucket_name]
|
42
|
+
|
43
|
+
if bucket
|
44
|
+
response.status = 200
|
45
|
+
|
46
|
+
if bucket[:versioning]
|
47
|
+
response.body = { 'VersioningConfiguration' => { 'Status' => bucket[:versioning] } }
|
48
|
+
else
|
49
|
+
response.body = { 'VersioningConfiguration' => {} }
|
50
|
+
end
|
36
51
|
|
52
|
+
else
|
53
|
+
response.status = 404
|
54
|
+
response.body = {
|
55
|
+
'Error' => {
|
56
|
+
'Code' => 'NoSuchBucket',
|
57
|
+
'Message' => 'The specified bucket does not exist',
|
58
|
+
'BucketName' => bucket_name,
|
59
|
+
'RequestId' => Fog::Mock.random_hex(16),
|
60
|
+
'HostId' => Fog::Mock.random_base64(65)
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
65
|
+
end
|
66
|
+
|
67
|
+
response
|
68
|
+
end
|
37
69
|
end
|
38
70
|
end
|
39
71
|
end
|
@@ -62,15 +62,24 @@ module Fog
|
|
62
62
|
class Mock # :nodoc:all
|
63
63
|
|
64
64
|
def get_object(bucket_name, object_name, options = {}, &block)
|
65
|
+
version_id = options.delete('versionId')
|
66
|
+
|
65
67
|
unless bucket_name
|
66
68
|
raise ArgumentError.new('bucket_name is required')
|
67
69
|
end
|
70
|
+
|
68
71
|
unless object_name
|
69
72
|
raise ArgumentError.new('object_name is required')
|
70
73
|
end
|
74
|
+
|
71
75
|
response = Excon::Response.new
|
72
76
|
if (bucket = self.data[:buckets][bucket_name])
|
73
|
-
|
77
|
+
object = nil
|
78
|
+
if bucket[:objects].has_key?(object_name)
|
79
|
+
object = version_id ? bucket[:objects][object_name].find { |object| object['VersionId'] == version_id} : bucket[:objects][object_name].first
|
80
|
+
end
|
81
|
+
|
82
|
+
if (object && !object[:delete_marker])
|
74
83
|
if options['If-Match'] && options['If-Match'] != object['ETag']
|
75
84
|
response.status = 412
|
76
85
|
elsif options['If-Modified-Since'] && options['If-Modified-Since'] > Time.parse(object['Last-Modified'])
|
@@ -87,6 +96,9 @@ module Fog
|
|
87
96
|
response.headers[key] = value
|
88
97
|
end
|
89
98
|
end
|
99
|
+
|
100
|
+
response.headers['x-amz-version-id'] = object['VersionId'] if bucket[:versioning]
|
101
|
+
|
90
102
|
unless block_given?
|
91
103
|
response.body = object[:body]
|
92
104
|
else
|
@@ -99,6 +111,20 @@ module Fog
|
|
99
111
|
end
|
100
112
|
end
|
101
113
|
end
|
114
|
+
elsif version_id && !object
|
115
|
+
response.status = 400
|
116
|
+
response.body = {
|
117
|
+
'Error' => {
|
118
|
+
'Code' => 'InvalidArgument',
|
119
|
+
'Message' => 'Invalid version id specified',
|
120
|
+
'ArgumentValue' => version_id,
|
121
|
+
'ArgumentName' => 'versionId',
|
122
|
+
'RequestId' => Fog::Mock.random_hex(16),
|
123
|
+
'HostId' => Fog::Mock.random_base64(65)
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
102
128
|
else
|
103
129
|
response.status = 404
|
104
130
|
response.body = "...<Code>NoSuchKey<\/Code>..."
|
@@ -4,7 +4,7 @@ module Fog
|
|
4
4
|
|
5
5
|
module GetObjectHttpUrl
|
6
6
|
|
7
|
-
def get_object_http_url(bucket_name, object_name, expires)
|
7
|
+
def get_object_http_url(bucket_name, object_name, expires, options = {})
|
8
8
|
unless bucket_name
|
9
9
|
raise ArgumentError.new('bucket_name is required')
|
10
10
|
end
|
@@ -15,7 +15,8 @@ module Fog
|
|
15
15
|
:headers => {},
|
16
16
|
:host => @host,
|
17
17
|
:method => 'GET',
|
18
|
-
:path => "#{bucket_name}/#{object_name}"
|
18
|
+
:path => "#{bucket_name}/#{object_name}",
|
19
|
+
:query => options[:query]
|
19
20
|
}, expires)
|
20
21
|
end
|
21
22
|
|
@@ -48,4 +49,4 @@ module Fog
|
|
48
49
|
end
|
49
50
|
end
|
50
51
|
end
|
51
|
-
end
|
52
|
+
end
|
@@ -4,7 +4,7 @@ module Fog
|
|
4
4
|
|
5
5
|
module GetObjectHttpsUrl
|
6
6
|
|
7
|
-
def get_object_https_url(bucket_name, object_name, expires)
|
7
|
+
def get_object_https_url(bucket_name, object_name, expires, options = {})
|
8
8
|
unless bucket_name
|
9
9
|
raise ArgumentError.new('bucket_name is required')
|
10
10
|
end
|
@@ -15,7 +15,8 @@ module Fog
|
|
15
15
|
:headers => {},
|
16
16
|
:host => @host,
|
17
17
|
:method => 'GET',
|
18
|
-
:path => "#{bucket_name}/#{object_name}"
|
18
|
+
:path => "#{bucket_name}/#{object_name}",
|
19
|
+
:query => options[:query]
|
19
20
|
}, expires)
|
20
21
|
end
|
21
22
|
|
@@ -48,4 +49,4 @@ module Fog
|
|
48
49
|
end
|
49
50
|
end
|
50
51
|
end
|
51
|
-
end
|
52
|
+
end
|
@@ -29,7 +29,48 @@ DATA
|
|
29
29
|
:query => {'versioning' => nil}
|
30
30
|
})
|
31
31
|
end
|
32
|
+
end
|
33
|
+
|
34
|
+
class Mock
|
35
|
+
def put_bucket_versioning(bucket_name, status)
|
36
|
+
response = Excon::Response.new
|
37
|
+
bucket = self.data[:buckets][bucket_name]
|
38
|
+
|
39
|
+
if bucket
|
40
|
+
if ['Enabled', 'Suspended'].include?(status)
|
41
|
+
bucket[:versioning] = status
|
32
42
|
|
43
|
+
response.status = 200
|
44
|
+
else
|
45
|
+
response.status = 400
|
46
|
+
response.body = {
|
47
|
+
'Error' => {
|
48
|
+
'Code' => 'MalformedXML',
|
49
|
+
'Message' => 'The XML you provided was not well-formed or did not validate against our published schema',
|
50
|
+
'RequestId' => Fog::Mock.random_hex(16),
|
51
|
+
'HostId' => Fog::Mock.random_base64(65)
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
56
|
+
end
|
57
|
+
else
|
58
|
+
response.status = 404
|
59
|
+
response.body = {
|
60
|
+
'Error' => {
|
61
|
+
'Code' => 'NoSuchBucket',
|
62
|
+
'Message' => 'The specified bucket does not exist',
|
63
|
+
'BucketName' => bucket_name,
|
64
|
+
'RequestId' => Fog::Mock.random_hex(16),
|
65
|
+
'HostId' => Fog::Mock.random_base64(65)
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
70
|
+
end
|
71
|
+
|
72
|
+
response
|
73
|
+
end
|
33
74
|
end
|
34
75
|
end
|
35
76
|
end
|
@@ -44,6 +44,23 @@ DATA
|
|
44
44
|
end
|
45
45
|
|
46
46
|
end
|
47
|
+
|
48
|
+
class Mock # :nodoc:all
|
49
|
+
|
50
|
+
def put_bucket_website(bucket_name, suffix, options = {})
|
51
|
+
response = Excon::Response.new
|
52
|
+
if self.data[:buckets][bucket_name]
|
53
|
+
response.status = 200
|
54
|
+
else
|
55
|
+
response.status = 404
|
56
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
57
|
+
end
|
58
|
+
|
59
|
+
response
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
|
47
64
|
end
|
48
65
|
end
|
49
66
|
end
|
@@ -32,9 +32,9 @@ module Fog
|
|
32
32
|
def put_object(bucket_name, object_name, data, options = {})
|
33
33
|
data = Fog::Storage.parse_data(data)
|
34
34
|
headers = data[:headers].merge!(options)
|
35
|
-
request({
|
36
|
-
|
37
|
-
|
35
|
+
request({ :body => data[:body],
|
36
|
+
:expects => 200,
|
37
|
+
|
38
38
|
:headers => headers,
|
39
39
|
:host => "#{bucket_name}.#{@host}",
|
40
40
|
:idempotent => true,
|
@@ -70,7 +70,8 @@ module Fog
|
|
70
70
|
'Key' => object_name,
|
71
71
|
'Last-Modified' => Fog::Time.now.to_date_header,
|
72
72
|
'Content-Length' => options['Content-Length'] || data[:headers]['Content-Length'],
|
73
|
-
'StorageClass' => options['x-amz-storage-class'] || 'STANDARD'
|
73
|
+
'StorageClass' => options['x-amz-storage-class'] || 'STANDARD',
|
74
|
+
'VersionId' => bucket[:versioning] == 'Enabled' ? Fog::Mock.random_base64(32) : 'null'
|
74
75
|
}
|
75
76
|
|
76
77
|
for key, value in options
|
@@ -80,13 +81,28 @@ module Fog
|
|
80
81
|
end
|
81
82
|
end
|
82
83
|
|
83
|
-
bucket[:
|
84
|
+
if bucket[:versioning]
|
85
|
+
bucket[:objects][object_name] ||= []
|
86
|
+
|
87
|
+
# When versioning is suspended, putting an object will create a new 'null' version if the latest version
|
88
|
+
# is a value other than 'null', otherwise it will replace the latest version.
|
89
|
+
if bucket[:versioning] == 'Suspended' && bucket[:objects][object_name].first['VersionId'] == 'null'
|
90
|
+
bucket[:objects][object_name].shift
|
91
|
+
end
|
92
|
+
|
93
|
+
bucket[:objects][object_name].unshift(object)
|
94
|
+
else
|
95
|
+
bucket[:objects][object_name] = [object]
|
96
|
+
end
|
97
|
+
|
84
98
|
response.headers = {
|
85
|
-
'Content-Length'
|
86
|
-
'Content-Type'
|
87
|
-
'ETag'
|
88
|
-
'Last-Modified'
|
99
|
+
'Content-Length' => object['Content-Length'],
|
100
|
+
'Content-Type' => object['Content-Type'],
|
101
|
+
'ETag' => object['ETag'],
|
102
|
+
'Last-Modified' => object['Last-Modified'],
|
89
103
|
}
|
104
|
+
|
105
|
+
response.headers['x-amz-version-id'] = object['VersionId'] if object['VersionId'] != 'null'
|
90
106
|
else
|
91
107
|
response.status = 404
|
92
108
|
raise(Excon::Errors.status_error({:expects => 200}, response))
|
@@ -40,7 +40,7 @@ module Fog
|
|
40
40
|
#
|
41
41
|
# ==== Parameters
|
42
42
|
# * options<~Hash> - config arguments for connection. Defaults to {}.
|
43
|
-
# * region<~String> - optional region to use
|
43
|
+
# * region<~String> - optional region to use. For instance, 'us-east-1' and etc.
|
44
44
|
#
|
45
45
|
# ==== Returns
|
46
46
|
# * SES object with connection to AWS.
|
@@ -52,12 +52,7 @@ module Fog
|
|
52
52
|
@connection_options = options[:connection_options] || {}
|
53
53
|
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
54
54
|
options[:region] ||= 'us-east-1'
|
55
|
-
@host = options[:host] ||
|
56
|
-
when 'us-east-1'
|
57
|
-
'email.us-east-1.amazonaws.com'
|
58
|
-
else
|
59
|
-
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
60
|
-
end
|
55
|
+
@host = options[:host] || "email.#{options[:region]}.amazonaws.com"
|
61
56
|
@path = options[:path] || '/'
|
62
57
|
@persistent = options[:persistent] || false
|
63
58
|
@port = options[:port] || 443
|
@@ -5,7 +5,7 @@ module Fog
|
|
5
5
|
class SimpleDB < Fog::Service
|
6
6
|
|
7
7
|
requires :aws_access_key_id, :aws_secret_access_key
|
8
|
-
recognizes :host, :nil_string, :path, :port, :scheme, :persistent, :region
|
8
|
+
recognizes :host, :nil_string, :path, :port, :scheme, :persistent, :region, :aws_session_token
|
9
9
|
|
10
10
|
request_path 'fog/aws/requests/simpledb'
|
11
11
|
request :batch_put_attributes
|
@@ -70,27 +70,13 @@ module Fog
|
|
70
70
|
|
71
71
|
@aws_access_key_id = options[:aws_access_key_id]
|
72
72
|
@aws_secret_access_key = options[:aws_secret_access_key]
|
73
|
+
@aws_session_token = options[:aws_session_token]
|
73
74
|
@connection_options = options[:connection_options] || {}
|
74
75
|
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
75
76
|
@nil_string = options[:nil_string]|| 'nil'
|
76
77
|
|
77
78
|
options[:region] ||= 'us-east-1'
|
78
|
-
@host = options[:host] ||
|
79
|
-
when 'ap-northeast-1'
|
80
|
-
'sdb.ap-northeast-1.amazonaws.com'
|
81
|
-
when 'ap-southeast-1'
|
82
|
-
'sdb.ap-southeast-1.amazonaws.com'
|
83
|
-
when 'eu-west-1'
|
84
|
-
'sdb.eu-west-1.amazonaws.com'
|
85
|
-
when 'us-east-1'
|
86
|
-
'sdb.amazonaws.com'
|
87
|
-
when 'us-west-1'
|
88
|
-
'sdb.us-west-1.amazonaws.com'
|
89
|
-
when 'us-west-2'
|
90
|
-
'sdb.us-west-2.amazonaws.com'
|
91
|
-
else
|
92
|
-
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
93
|
-
end
|
79
|
+
@host = options[:host] || "sdb.#{options[:region]}.amazonaws.com"
|
94
80
|
@path = options[:path] || '/'
|
95
81
|
@persistent = options[:persistent] || false
|
96
82
|
@port = options[:port] || 443
|
@@ -165,6 +151,7 @@ module Fog
|
|
165
151
|
params,
|
166
152
|
{
|
167
153
|
:aws_access_key_id => @aws_access_key_id,
|
154
|
+
:aws_session_token => @aws_session_token,
|
168
155
|
:hmac => @hmac,
|
169
156
|
:host => @host,
|
170
157
|
:path => @path,
|