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
@@ -33,8 +33,63 @@ module Fog
|
|
33
33
|
class Mock
|
34
34
|
|
35
35
|
def describe_db_instances(identifier=nil, opts={})
|
36
|
-
|
36
|
+
response = Excon::Response.new
|
37
|
+
server_set = []
|
38
|
+
if identifier
|
39
|
+
if server = self.data[:servers][identifier]
|
40
|
+
server_set << server
|
41
|
+
else
|
42
|
+
raise Fog::AWS::RDS::NotFound.new("DBInstance #{identifier} not found")
|
43
|
+
end
|
44
|
+
else
|
45
|
+
server_set = self.data[:servers].values
|
46
|
+
end
|
47
|
+
|
48
|
+
server_set.each do |server|
|
49
|
+
case server["DBInstanceStatus"]
|
50
|
+
when "creating"
|
51
|
+
if Time.now - server['InstanceCreateTime'] >= Fog::Mock.delay * 2
|
52
|
+
region = "us-east-1"
|
53
|
+
server["DBInstanceStatus"] = "available"
|
54
|
+
server["AvailabilityZone"] = region + 'a'
|
55
|
+
server["Endpoint"] = {"Port"=>3306,
|
56
|
+
"Address"=> Fog::AWS::Mock.rds_address(server["DBInstanceIdentifier"],region) }
|
57
|
+
server["PendingModifiedValues"] = {}
|
58
|
+
end
|
59
|
+
when "rebooting" # I don't know how to show rebooting just once before it changes to available
|
60
|
+
# it applies pending modified values
|
61
|
+
if server["PendingModifiedValues"]
|
62
|
+
server.merge!(server["PendingModifiedValues"])
|
63
|
+
server["PendingModifiedValues"] = {}
|
64
|
+
self.data[:tmp] ||= Time.now + Fog::Mock.delay * 2
|
65
|
+
if self.data[:tmp] <= Time.now
|
66
|
+
server["DBInstanceStatus"] = 'available'
|
67
|
+
self.data.delete(:tmp)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
when "modifying"
|
71
|
+
# TODO there are some fields that only applied after rebooting
|
72
|
+
if server["PendingModifiedValues"]
|
73
|
+
server.merge!(server["PendingModifiedValues"])
|
74
|
+
server["PendingModifiedValues"] = {}
|
75
|
+
server["DBInstanceStatus"] = 'available'
|
76
|
+
end
|
77
|
+
when "available" # I'm not sure if amazon does this
|
78
|
+
if server["PendingModifiedValues"]
|
79
|
+
server["DBInstanceStatus"] = 'modifying'
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
response.status = 200
|
86
|
+
response.body = {
|
87
|
+
"ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id },
|
88
|
+
"DescribeDBInstancesResult" => { "DBInstances" => server_set }
|
89
|
+
}
|
90
|
+
response
|
37
91
|
end
|
92
|
+
|
38
93
|
|
39
94
|
end
|
40
95
|
end
|
@@ -28,8 +28,50 @@ module Fog
|
|
28
28
|
|
29
29
|
class Mock
|
30
30
|
|
31
|
-
def
|
32
|
-
|
31
|
+
def describe_db_security_groups(opts={})
|
32
|
+
response = Excon::Response.new
|
33
|
+
sec_group_set = []
|
34
|
+
if opts.is_a?(String)
|
35
|
+
sec_group_name = opts
|
36
|
+
if sec_group = self.data[:security_groups][sec_group_name]
|
37
|
+
sec_group_set << sec_group
|
38
|
+
else
|
39
|
+
raise Fog::AWS::RDS::NotFound.new("Security Group #{sec_group_name} not found")
|
40
|
+
end
|
41
|
+
else
|
42
|
+
sec_group_set = self.data[:security_groups].values
|
43
|
+
end
|
44
|
+
|
45
|
+
sec_group_set.each do |sec_group|
|
46
|
+
sec_group["IPRanges"].each do |iprange|
|
47
|
+
if iprange["Status"] == "authorizing" || iprange["Status"] == "revoking"
|
48
|
+
iprange[:tmp] ||= Time.now + Fog::Mock.delay * 2
|
49
|
+
if iprange[:tmp] <= Time.now
|
50
|
+
iprange["Status"] = "authorized" if iprange["Status"] == "authorizing"
|
51
|
+
iprange.delete(:tmp)
|
52
|
+
sec_group["IPRanges"].delete(iprange) if iprange["Status"] == "revoking"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
sec_group["EC2SecurityGroups"].each do |ec2_secg|
|
58
|
+
if ec2_secg["Status"] == "authorizing" || iprange["Status"] == "revoking"
|
59
|
+
ec2_secg[:tmp] ||= Time.now + Fog::Mock.delay * 2
|
60
|
+
if ec2_secg[:tmp] <= Time.now
|
61
|
+
ec2_secg["Status"] = "authorized" if ec2_secg["Status"] == "authorizing"
|
62
|
+
ec2_secg.delete(:tmp)
|
63
|
+
sec_group["EC2SecurityGroups"].delete(ec2_secg) if ec2_secg["Status"] == "revoking"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
response.status = 200
|
70
|
+
response.body = {
|
71
|
+
"ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id },
|
72
|
+
"DescribeDBSecurityGroupsResult" => { "DBSecurityGroups" => sec_group_set }
|
73
|
+
}
|
74
|
+
response
|
33
75
|
end
|
34
76
|
|
35
77
|
end
|
@@ -45,7 +45,32 @@ module Fog
|
|
45
45
|
class Mock
|
46
46
|
|
47
47
|
def modify_db_instance(db_name, apply_immediately, options={})
|
48
|
-
|
48
|
+
response = Excon::Response.new
|
49
|
+
if self.data[:servers][db_name]
|
50
|
+
if self.data[:servers][db_name]["DBInstanceStatus"] != "available"
|
51
|
+
raise Fog::AWS::RDS::NotFound.new("DBInstance #{db_name} not available for modification")
|
52
|
+
else
|
53
|
+
# TODO verify the params options
|
54
|
+
# if apply_immediately is false, all the options go to pending_modified_values and then apply and clear after either
|
55
|
+
# a reboot or the maintainance window
|
56
|
+
#if apply_immediately
|
57
|
+
# modified_server = server.merge(options)
|
58
|
+
#else
|
59
|
+
# modified_server = server["PendingModifiedValues"].merge!(options) # it appends
|
60
|
+
#end
|
61
|
+
self.data[:servers][db_name]["PendingModifiedValues"].merge!(options) # it appends
|
62
|
+
#self.data[:servers][db_name]["DBInstanceStatus"] = "modifying"
|
63
|
+
response.status = 200
|
64
|
+
response.body = {
|
65
|
+
"ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id },
|
66
|
+
"ModifyDBInstanceResult" => { "DBInstance" => self.data[:servers][db_name] }
|
67
|
+
}
|
68
|
+
response
|
69
|
+
|
70
|
+
end
|
71
|
+
else
|
72
|
+
raise Fog::AWS::RDS::NotFound.new("DBInstance #{db_name} not found")
|
73
|
+
end
|
49
74
|
end
|
50
75
|
|
51
76
|
end
|
@@ -25,7 +25,23 @@ module Fog
|
|
25
25
|
class Mock
|
26
26
|
|
27
27
|
def reboot_db_instance(instance_identifier)
|
28
|
-
|
28
|
+
response = Excon::Response.new
|
29
|
+
if self.data[:servers][instance_identifier]
|
30
|
+
if self.data[:servers][instance_identifier]["DBInstanceStatus"] != "available"
|
31
|
+
raise Fog::AWS::RDS::NotFound.new("DBInstance #{instance_identifier} not available for rebooting")
|
32
|
+
else
|
33
|
+
self.data[:servers][instance_identifier]["DBInstanceStatus"] = 'rebooting'
|
34
|
+
response.status = 200
|
35
|
+
response.body = {
|
36
|
+
"ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id },
|
37
|
+
"RebootDBInstanceResult" => { "DBInstance" => self.data[:servers][instance_identifier] }
|
38
|
+
}
|
39
|
+
response
|
40
|
+
|
41
|
+
end
|
42
|
+
else
|
43
|
+
raise Fog::AWS::RDS::NotFound.new("DBInstance #{instance_identifier} not found")
|
44
|
+
end
|
29
45
|
end
|
30
46
|
|
31
47
|
end
|
data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb
CHANGED
@@ -33,7 +33,33 @@ module Fog
|
|
33
33
|
class Mock
|
34
34
|
|
35
35
|
def revoke_db_security_group_ingress(name, opts = {})
|
36
|
-
|
36
|
+
unless opts.key?('CIDRIP') || (opts.key?('EC2SecurityGroupName') && opts.key?('EC2SecurityGroupOwnerId'))
|
37
|
+
raise ArgumentError, 'Must specify CIDRIP, or both EC2SecurityGroupName and EC2SecurityGroupOwnerId'
|
38
|
+
end
|
39
|
+
|
40
|
+
response = Excon::Response.new
|
41
|
+
|
42
|
+
if sec_group = self.data[:security_groups][name]
|
43
|
+
if opts.key?('CIDRIP')
|
44
|
+
sec_group['IPRanges'].each do |iprange|
|
45
|
+
iprange['Status']= 'revoking' if iprange['CIDRIP'] == opts['CIDRIP']
|
46
|
+
end
|
47
|
+
else
|
48
|
+
sec_group['EC2SecurityGroups'].each do |ec2_secg|
|
49
|
+
ec2_secg['Status']= 'revoking' if ec2_secg['EC2SecurityGroupName'] == opts['EC2SecurityGroupName']
|
50
|
+
end
|
51
|
+
end
|
52
|
+
response.status = 200
|
53
|
+
response.body = {
|
54
|
+
"ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id },
|
55
|
+
'RevokeDBSecurityGroupIngressResult' => {
|
56
|
+
'DBSecurityGroup' => sec_group
|
57
|
+
}
|
58
|
+
}
|
59
|
+
response
|
60
|
+
else
|
61
|
+
raise Fog::AWS::RDS::NotFound.new("DBSecurityGroupNotFound => #{name} not found")
|
62
|
+
end
|
37
63
|
end
|
38
64
|
|
39
65
|
end
|
@@ -34,7 +34,7 @@ module Fog
|
|
34
34
|
Excon::Response.new.tap do |response|
|
35
35
|
if (queue = data[:queues][queue_url])
|
36
36
|
message_id, _ = queue[:receipt_handles].find { |message_id, receipts|
|
37
|
-
receipts.
|
37
|
+
receipts.has_key?(receipt_handle)
|
38
38
|
}
|
39
39
|
|
40
40
|
if message_id
|
@@ -32,7 +32,7 @@ module Fog
|
|
32
32
|
Excon::Response.new.tap do |response|
|
33
33
|
if (queue = data[:queues][queue_url])
|
34
34
|
message_id, _ = queue[:receipt_handles].find { |msg_id, receipts|
|
35
|
-
receipts.
|
35
|
+
receipts.has_key?(receipt_handle)
|
36
36
|
}
|
37
37
|
|
38
38
|
if message_id
|
@@ -37,37 +37,36 @@ module Fog
|
|
37
37
|
max_number_of_messages = options['MaxNumberOfMessages'] || 1
|
38
38
|
now = Time.now
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
messages = []
|
41
|
+
|
42
|
+
queue[:messages].values.each do |m|
|
43
43
|
message_id = m['MessageId']
|
44
|
-
|
44
|
+
|
45
45
|
invisible = if (received_handles = queue[:receipt_handles][message_id])
|
46
46
|
visibility_timeout = m['Attributes']['VisibilityTimeout'] || queue['Attributes']['VisibilityTimeout']
|
47
47
|
received_handles.any? { |handle, time| now < time + visibility_timeout }
|
48
48
|
else
|
49
49
|
false
|
50
50
|
end
|
51
|
-
|
52
|
-
|
53
|
-
nil
|
54
|
-
else
|
51
|
+
|
52
|
+
unless invisible
|
55
53
|
receipt_handle = Fog::Mock.random_base64(300)
|
56
|
-
|
54
|
+
|
57
55
|
queue[:receipt_handles][message_id] ||= {}
|
58
56
|
queue[:receipt_handles][message_id][receipt_handle] = now
|
59
|
-
|
57
|
+
|
60
58
|
m['Attributes'].tap do |attrs|
|
61
59
|
attrs['ApproximateFirstReceiveTimestamp'] ||= now
|
62
60
|
attrs['ApproximateReceiveCount'] = (attrs['ApproximateReceiveCount'] || 0) + 1
|
63
61
|
end
|
64
|
-
|
65
|
-
m.merge({
|
62
|
+
|
63
|
+
messages << m.merge({
|
66
64
|
'ReceiptHandle' => receipt_handle
|
67
65
|
})
|
66
|
+
break if messages.size >= max_number_of_messages
|
68
67
|
end
|
69
|
-
end
|
70
|
-
|
68
|
+
end
|
69
|
+
|
71
70
|
response.body = {
|
72
71
|
'ResponseMetadata' => {
|
73
72
|
'RequestId' => Fog::AWS::Mock.request_id
|
@@ -48,19 +48,27 @@ module Fog
|
|
48
48
|
def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {})
|
49
49
|
response = Excon::Response.new
|
50
50
|
source_bucket = self.data[:buckets][source_bucket_name]
|
51
|
-
source_object = source_bucket && source_bucket[:objects][source_object_name]
|
51
|
+
source_object = source_bucket && source_bucket[:objects][source_object_name] && source_bucket[:objects][source_object_name].first
|
52
52
|
target_bucket = self.data[:buckets][target_bucket_name]
|
53
53
|
|
54
|
+
acl = options['x-amz-acl'] || 'private'
|
55
|
+
if !['private', 'public-read', 'public-read-write', 'authenticated-read'].include?(acl)
|
56
|
+
raise Excon::Errors::BadRequest.new('invalid x-amz-acl')
|
57
|
+
else
|
58
|
+
self.data[:acls][:object][target_bucket_name] ||= {}
|
59
|
+
self.data[:acls][:object][target_bucket_name][target_object_name] = self.class.acls(acl)
|
60
|
+
end
|
61
|
+
|
54
62
|
if source_object && target_bucket
|
55
63
|
response.status = 200
|
56
64
|
target_object = source_object.dup
|
57
|
-
target_object.
|
58
|
-
'Key' => target_object_name
|
59
|
-
|
65
|
+
target_object.each do |version|
|
66
|
+
version.merge!({'Key' => target_object_name})
|
67
|
+
end
|
60
68
|
target_bucket[:objects][target_object_name] = target_object
|
61
69
|
response.body = {
|
62
|
-
'ETag' => target_object['ETag'],
|
63
|
-
'LastModified' => Time.parse(target_object['Last-Modified'])
|
70
|
+
'ETag' => target_object.last['ETag'],
|
71
|
+
'LastModified' => Time.parse(target_object.last['Last-Modified'])
|
64
72
|
}
|
65
73
|
else
|
66
74
|
response.status = 404
|
@@ -17,6 +17,12 @@ module Fog
|
|
17
17
|
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectDELETE.html
|
18
18
|
|
19
19
|
def delete_object(bucket_name, object_name, options = {})
|
20
|
+
if version_id = options.delete('versionId')
|
21
|
+
path = "#{CGI.escape(object_name)}?versionId=#{CGI.escape(version_id)}"
|
22
|
+
else
|
23
|
+
path = CGI.escape(object_name)
|
24
|
+
end
|
25
|
+
|
20
26
|
headers = options
|
21
27
|
request({
|
22
28
|
:expects => 204,
|
@@ -24,7 +30,7 @@ module Fog
|
|
24
30
|
:host => "#{bucket_name}.#{@host}",
|
25
31
|
:idempotent => true,
|
26
32
|
:method => 'DELETE',
|
27
|
-
:path =>
|
33
|
+
:path => path
|
28
34
|
})
|
29
35
|
end
|
30
36
|
|
@@ -36,7 +42,57 @@ module Fog
|
|
36
42
|
response = Excon::Response.new
|
37
43
|
if bucket = self.data[:buckets][bucket_name]
|
38
44
|
response.status = 204
|
39
|
-
|
45
|
+
|
46
|
+
version_id = options.delete('versionId')
|
47
|
+
|
48
|
+
if bucket[:versioning]
|
49
|
+
bucket[:objects][object_name] ||= []
|
50
|
+
|
51
|
+
if version_id
|
52
|
+
version = bucket[:objects][object_name].find { |object| object['VersionId'] == version_id}
|
53
|
+
|
54
|
+
# S3 special cases the 'null' value to not error out if no such version exists.
|
55
|
+
if version || (version_id == 'null')
|
56
|
+
bucket[:objects][object_name].delete(version)
|
57
|
+
bucket[:objects].delete(object_name) if bucket[:objects][object_name].empty?
|
58
|
+
|
59
|
+
response.headers['x-amz-delete-marker'] = 'true' if version[:delete_marker]
|
60
|
+
response.headers['x-amz-version-id'] = version_id
|
61
|
+
else
|
62
|
+
response.status = 400
|
63
|
+
response.body = invalid_version_id_payload(version_id)
|
64
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
65
|
+
end
|
66
|
+
else
|
67
|
+
delete_marker = {
|
68
|
+
:delete_marker => true,
|
69
|
+
'Key' => object_name,
|
70
|
+
'VersionId' => bucket[:versioning] == 'Enabled' ? Fog::Mock.random_base64(32) : 'null',
|
71
|
+
'Last-Modified' => Fog::Time.now.to_date_header
|
72
|
+
}
|
73
|
+
|
74
|
+
# When versioning is suspended, a delete marker is placed if the last object ID is not the value 'null',
|
75
|
+
# otherwise the last object is replaced.
|
76
|
+
if bucket[:versioning] == 'Suspended' && bucket[:objects][object_name].first['VersionId'] == 'null'
|
77
|
+
bucket[:objects][object_name].shift
|
78
|
+
end
|
79
|
+
|
80
|
+
bucket[:objects][object_name].unshift(delete_marker)
|
81
|
+
|
82
|
+
response.headers['x-amz-delete-marker'] = 'true'
|
83
|
+
response.headers['x-amz-version-id'] = delete_marker['VersionId']
|
84
|
+
end
|
85
|
+
else
|
86
|
+
if version_id && version_id != 'null'
|
87
|
+
response.status = 400
|
88
|
+
response.body = invalid_version_id_payload(version_id)
|
89
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
90
|
+
else
|
91
|
+
bucket[:objects].delete(object_name)
|
92
|
+
|
93
|
+
response.headers['x-amz-version-id'] = 'null'
|
94
|
+
end
|
95
|
+
end
|
40
96
|
else
|
41
97
|
response.status = 404
|
42
98
|
raise(Excon::Errors.status_error({:expects => 204}, response))
|
@@ -44,6 +100,21 @@ module Fog
|
|
44
100
|
response
|
45
101
|
end
|
46
102
|
|
103
|
+
private
|
104
|
+
|
105
|
+
def invalid_version_id_payload(version_id)
|
106
|
+
{
|
107
|
+
'Error' => {
|
108
|
+
'Code' => 'InvalidArgument',
|
109
|
+
'Message' => 'Invalid version id specified',
|
110
|
+
'ArgumentValue' => version_id,
|
111
|
+
'ArgumentName' => 'versionId',
|
112
|
+
'RequestId' => Fog::Mock.random_hex(16),
|
113
|
+
'HostId' => Fog::Mock.random_base64(65)
|
114
|
+
}
|
115
|
+
}
|
116
|
+
end
|
117
|
+
|
47
118
|
end
|
48
119
|
end
|
49
120
|
end
|
@@ -69,11 +69,12 @@ module Fog
|
|
69
69
|
end
|
70
70
|
response = Excon::Response.new
|
71
71
|
if bucket = self.data[:buckets][bucket_name]
|
72
|
-
contents = bucket[:objects].values.sort {|x,y| x['Key'] <=> y['Key']}.reject do |object|
|
72
|
+
contents = bucket[:objects].values.collect(&:last).sort {|x,y| x['Key'] <=> y['Key']}.reject do |object|
|
73
73
|
(prefix && object['Key'][0...prefix.length] != prefix) ||
|
74
74
|
(marker && object['Key'] <= marker) ||
|
75
75
|
(delimiter && object['Key'][(prefix ? prefix.length : 0)..-1].include?(delimiter) \
|
76
|
-
&& common_prefixes << object['Key'].sub(/^(#{prefix}[^#{delimiter}]+.).*/, '\1'))
|
76
|
+
&& common_prefixes << object['Key'].sub(/^(#{prefix}[^#{delimiter}]+.).*/, '\1')) ||
|
77
|
+
object.has_key?(:delete_marker)
|
77
78
|
end.map do |object|
|
78
79
|
data = object.reject {|key, value| !['ETag', 'Key', 'StorageClass'].include?(key)}
|
79
80
|
data.merge!({
|