brightbox-cli 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +13 -17
- data/README.rdoc +13 -17
- data/brightbox-cli.gemspec +1 -1
- data/lib/brightbox-cli/accounts.rb +7 -0
- data/lib/brightbox-cli/api.rb +3 -0
- data/lib/brightbox-cli/commands/config-client-list.rb +1 -1
- data/lib/brightbox-cli/commands/firewall-rules-create.rb +4 -0
- data/lib/brightbox-cli/commands/firewall-rules-update.rb +49 -0
- data/lib/brightbox-cli/commands/groups-show.rb +1 -1
- data/lib/brightbox-cli/commands/groups-update.rb +3 -1
- data/lib/brightbox-cli/commands/images-destroy.rb +1 -1
- data/lib/brightbox-cli/commands/images-list.rb +9 -3
- data/lib/brightbox-cli/commands/images-register.rb +1 -1
- data/lib/brightbox-cli/commands/images-update.rb +3 -1
- data/lib/brightbox-cli/commands/lbs-update.rb +4 -2
- data/lib/brightbox-cli/commands/{servers-activate-cloud.rb → servers-activate-console.rb} +2 -1
- data/lib/brightbox-cli/commands/servers-update.rb +2 -1
- data/lib/brightbox-cli/config.rb +17 -2
- data/lib/brightbox-cli/detailed_server.rb +1 -1
- data/lib/brightbox-cli/firewall_rule.rb +6 -0
- data/lib/brightbox-cli/gli_global_hooks.rb +8 -1
- data/lib/brightbox-cli/images.rb +22 -1
- data/lib/brightbox-cli/nilable_hash.rb +7 -0
- data/lib/brightbox-cli/server_groups.rb +0 -6
- data/lib/brightbox-cli/servers.rb +6 -2
- data/lib/brightbox-cli/tables.rb +13 -0
- data/lib/brightbox-cli/vendor/fog/README.rdoc +2 -9
- data/lib/brightbox-cli/vendor/fog/Rakefile +3 -2
- data/lib/brightbox-cli/vendor/fog/changelog.txt +213 -0
- data/lib/brightbox-cli/vendor/fog/docs/_layouts/default.html +1 -1
- data/lib/brightbox-cli/vendor/fog/docs/about/contributing.markdown +1 -1
- data/lib/brightbox-cli/vendor/fog/docs/about/getting_started.markdown +28 -3
- data/lib/brightbox-cli/vendor/fog/docs/dns/index.markdown +1 -1
- data/lib/brightbox-cli/vendor/fog/docs/index.markdown +2 -10
- data/lib/brightbox-cli/vendor/fog/docs/storage/index.markdown +2 -2
- data/lib/brightbox-cli/vendor/fog/fog.gemspec +6 -5
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/auto_scaling.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_formation.rb +3 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_watch.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/compute.rb +5 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/elb.rb +4 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/emr.rb +133 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/addresses.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/key_pairs.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/security_groups.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/server.rb +4 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/servers.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/snapshots.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/spot_request.rb +21 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/spot_requests.rb +45 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/volumes.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elb/load_balancer.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/storage/file.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cdn/get_invalidation_list.rb +0 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_formation/update_stack.rb +19 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/add_instance_groups.rb +28 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/add_job_flow_steps.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/describe_job_flows.rb +140 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/modify_instance_groups.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/run_job_flow.rb +19 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/set_termination_protection.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/terminate_job_flows.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/rds.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_formation/create_stack.rb +6 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_formation/update_stack.rb +62 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +141 -36
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/delete_security_group.rb +25 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/delete_tags.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_addresses.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_availability_zones.rb +5 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_images.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_instances.rb +15 -6
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_key_pairs.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_regions.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_reserved_instances.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_security_groups.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_snapshots.rb +4 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_volumes.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/modify_instance_attribute.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/revoke_security_group_ingress.rb +41 -29
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/describe_load_balancers.rb +3 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/add_instance_groups.rb +46 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/add_job_flow_steps.rb +49 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/describe_job_flows.rb +108 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/modify_instance_groups.rb +40 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/run_job_flow.rb +106 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/set_termination_protection.rb +39 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/terminate_job_flows.rb +37 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/simpledb/get_attributes.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/simpledb/select.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/acl_utils.rb +62 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_acl.rb +7 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_acl.rb +7 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_url.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_bucket_acl.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_object_acl.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/ses.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/simpledb.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sns.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sqs.rb +4 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/storage.rb +10 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws.rb +26 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/aws.rb +8 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/bluebox.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/brightbox.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/dnsimple.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/dnsmadeeasy.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/ecloud.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/glesys.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/go_grid.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/google.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/libvirt.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/linode.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/local.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/new_servers.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/ninefold.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/openstack.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/rackspace.rb +3 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/slicehost.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/stormondemand.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/virtual_box.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/vmfusion.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/voxel.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/zerigo.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/compute.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/cloud_ip.rb +10 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server.rb +11 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server_group.rb +9 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +13 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/connection.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/credentials.rb +3 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/deprecation.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/logger.rb +8 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/mock.rb +4 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/provider.rb +7 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/service.rb +8 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/dnsmadeeasy/models/dns/record.rb +3 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/dynect/dns.rb +25 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/compute.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/go_grid/requests/compute/grid_server_power.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/google/models/storage/file.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/google/requests/storage/get_object_url.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/google/storage.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/models/storage/file.rb +8 -6
- data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/models/storage/files.rb +3 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/requests/storage/head_namespace.rb +20 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/storage.rb +4 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/server.rb +7 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/create_server.rb +6 -11
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/load_balancers.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/callback.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/record.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/zone.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/dns.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/models/dns/record.rb +7 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/models/dns/zone.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/parsers/dns/create_record.rb +8 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/parsers/dns/get_record.rb +17 -5
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/parsers/dns/get_records.rb +10 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/get_record.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/get_records.rb +7 -8
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/update_record.rb +43 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/balancers.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/configs.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/images.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/servers.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/templates.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/terremark/vcloud.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/compute.rb +41 -23
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/models/compute/server.rb +19 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/models/compute/servers.rb +8 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/datacenters.rb +34 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +83 -10
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/vm_clone.rb +76 -37
- data/lib/brightbox-cli/vendor/fog/lib/fog.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/cloud_watch/alarm_data_tests.rb +8 -6
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/cloud_watch/alarm_history_tests.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb +15 -10
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/elb/model_tests.rb +4 -4
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/cloud_formation/stack_tests.rb +14 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/instance_tests.rb +16 -1
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/security_group_tests.rb +251 -32
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/tag_tests.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/emr/helper.rb +172 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/emr/instance_group_tests.rb +106 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/emr/job_flow_tests.rb +88 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/acl_utils_tests.rb +209 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/bucket_tests.rb +80 -55
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/object_tests.rb +42 -24
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/account_tests.rb +11 -6
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/api_client_tests.rb +23 -12
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/cloud_ip_tests.rb +29 -20
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/helper.rb +70 -14
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/image_tests.rb +17 -14
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/interface_tests.rb +3 -2
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/load_balancer_tests.rb +57 -11
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_group_tests.rb +29 -22
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_tests.rb +38 -21
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_type_tests.rb +7 -6
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/user_tests.rb +11 -16
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/zone_tests.rb +7 -6
- data/lib/brightbox-cli/vendor/fog/tests/compute/helper.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/core/credential_tests.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/tests/core/mocking_tests.rb +60 -0
- data/lib/brightbox-cli/vendor/fog/tests/dns/models/record_tests.rb +4 -2
- data/lib/brightbox-cli/vendor/fog/tests/dns/models/records_tests.rb +4 -2
- data/lib/brightbox-cli/vendor/fog/tests/dns/models/zone_tests.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/tests/dns/models/zones_tests.rb +4 -2
- data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/helper.rb +4 -2
- data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/server_tests.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/helper.rb +4 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/dns_tests.rb +16 -12
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/records_tests.rb +13 -11
- data/lib/brightbox-cli/vendor/fog/tests/slicehost/requests/dns/dns_tests.rb +58 -11
- data/lib/brightbox-cli/vendor/fog/tests/vsphere/compute_tests.rb +18 -10
- data/lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_clone_tests.rb +3 -7
- data/lib/brightbox-cli/version.rb +1 -1
- data/lib/brightbox_cli.rb +1 -0
- data/spec/fixtures/vcr_cassettes/list_server_groups.yml +37 -6
- data/spec/nilable_hash_spec.rb +30 -0
- metadata +48 -18
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/hash_to_acl.rb +0 -44
@@ -3,21 +3,28 @@ Shindo.tests('Fog::Compute[:vsphere]', ['vsphere']) do
|
|
3
3
|
compute = Fog::Compute[:vsphere]
|
4
4
|
|
5
5
|
tests("| convert_vm_mob_ref_to_attr_hash") do
|
6
|
-
|
6
|
+
# Mock the RbVmomi::VIM::ManagedObject class
|
7
|
+
class MockManagedObject
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
attr_reader :parent, :_ref
|
10
|
+
|
11
|
+
def initialize
|
12
|
+
@parent = @_ref = 'vm-123'
|
13
|
+
end
|
14
|
+
|
15
|
+
def collect! *pathSet
|
16
|
+
{ '_ref' => 'vm-123', 'name' => 'fakevm' }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
fake_vm_mob_ref = MockManagedObject.new
|
14
21
|
|
15
22
|
tests("When converting an incomplete vm object") do
|
16
23
|
test("it should return a Hash") do
|
17
|
-
compute.convert_vm_mob_ref_to_attr_hash(
|
24
|
+
compute.convert_vm_mob_ref_to_attr_hash(fake_vm_mob_ref).kind_of? Hash
|
18
25
|
end
|
19
26
|
tests("The converted Hash should") do
|
20
|
-
attr_hash = compute.convert_vm_mob_ref_to_attr_hash(
|
27
|
+
attr_hash = compute.convert_vm_mob_ref_to_attr_hash(fake_vm_mob_ref)
|
21
28
|
test("have a name") { attr_hash['name'] == 'fakevm' }
|
22
29
|
test("have a mo_ref") {attr_hash['mo_ref'] == 'vm-123' }
|
23
30
|
test("have an id") { attr_hash['id'] == 'vm-123' }
|
@@ -38,10 +45,11 @@ Shindo.tests('Fog::Compute[:vsphere]', ['vsphere']) do
|
|
38
45
|
test("it should respond to #{attr}") { compute.respond_to? attr }
|
39
46
|
end
|
40
47
|
end
|
48
|
+
|
41
49
|
tests("Compute collections") do
|
42
50
|
%w{ servers }.each do |collection|
|
43
51
|
test("it should respond to #{collection}") { compute.respond_to? collection }
|
44
52
|
end
|
45
53
|
end
|
46
|
-
|
47
54
|
end
|
55
|
+
|
@@ -1,10 +1,10 @@
|
|
1
|
-
Shindo.tests("Fog::Compute[:
|
1
|
+
Shindo.tests("Fog::Compute[:vsphere] | vm_clone request", 'vsphere') do
|
2
2
|
#require 'guid'
|
3
|
-
template = "
|
3
|
+
template = "/Datacenters/Solutions/vm/Jeff/Templates/centos56gm2"
|
4
4
|
compute = Fog::Compute[:vsphere]
|
5
5
|
|
6
6
|
tests("The return value should") do
|
7
|
-
response = compute.vm_clone('
|
7
|
+
response = compute.vm_clone('path' => template, 'name' => 'cloning_vm')
|
8
8
|
test("be a kind of Hash") { response.kind_of? Hash }
|
9
9
|
%w{ vm_ref task_ref }.each do |key|
|
10
10
|
test("have a #{key} key") { response.has_key? key }
|
@@ -12,10 +12,6 @@ Shindo.tests("Fog::Compute[:servers] | vm_clone request") do
|
|
12
12
|
end
|
13
13
|
tests("When invalid input is presented") do
|
14
14
|
raises(ArgumentError, 'it should raise ArgumentError') { compute.vm_clone(:foo => 1) }
|
15
|
-
raises(Fog::Vsphere::Errors::ServiceError,
|
16
|
-
'it should raise ServiceError if a VM already exists with the provided name') do
|
17
|
-
compute.vm_clone('instance_uuid' => '123', 'name' => 'jefftest')
|
18
|
-
end
|
19
15
|
raises(Fog::Compute::Vsphere::NotFound, 'it should raise Fog::Compute::Vsphere::NotFound when the UUID is not a string') do
|
20
16
|
pending # require 'guid'
|
21
17
|
compute.vm_clone('instance_uuid' => Guid.from_s(template), 'name' => 'jefftestfoo')
|
data/lib/brightbox_cli.rb
CHANGED
@@ -1,4 +1,35 @@
|
|
1
1
|
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: POST
|
5
|
+
uri: https://api.gb1s.brightbox.com:443/token
|
6
|
+
body: "{\"client_id\":\"cli-dmygq\",\"grant_type\":\"none\"}"
|
7
|
+
headers:
|
8
|
+
content-type:
|
9
|
+
- application/json
|
10
|
+
authorization:
|
11
|
+
- Basic Y2xpLWRteWdxOmhmMTR2a2V4c2VhOGt5bA==
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 200
|
15
|
+
message:
|
16
|
+
headers:
|
17
|
+
content-type:
|
18
|
+
- application/json
|
19
|
+
server:
|
20
|
+
- Apache
|
21
|
+
date:
|
22
|
+
- Thu, 05 Jan 2012 12:58:24 GMT
|
23
|
+
content-length:
|
24
|
+
- "77"
|
25
|
+
cache-control:
|
26
|
+
- no-store
|
27
|
+
status:
|
28
|
+
- "200"
|
29
|
+
vary:
|
30
|
+
- Accept-Encoding
|
31
|
+
body: "{\"expires_in\":7200,\"access_token\":\"0153589e275f01eb281f43bd7dd2fa5f587fcf13\"}"
|
32
|
+
http_version:
|
2
33
|
- !ruby/struct:VCR::HTTPInteraction
|
3
34
|
request: !ruby/struct:VCR::Request
|
4
35
|
method: GET
|
@@ -8,29 +39,29 @@
|
|
8
39
|
content-type:
|
9
40
|
- application/json
|
10
41
|
authorization:
|
11
|
-
- OAuth
|
42
|
+
- OAuth 0153589e275f01eb281f43bd7dd2fa5f587fcf13
|
12
43
|
response: !ruby/struct:VCR::Response
|
13
44
|
status: !ruby/struct:VCR::ResponseStatus
|
14
45
|
code: 200
|
15
46
|
message:
|
16
47
|
headers:
|
17
48
|
etag:
|
18
|
-
- "\"
|
49
|
+
- "\"758d8f225c0e5538dfde11fc2b66f572\""
|
19
50
|
content-type:
|
20
51
|
- application/json; charset=utf-8
|
21
52
|
server:
|
22
53
|
- Apache
|
23
54
|
date:
|
24
|
-
-
|
55
|
+
- Thu, 05 Jan 2012 12:58:25 GMT
|
25
56
|
x-runtime:
|
26
|
-
- "
|
57
|
+
- "115"
|
27
58
|
content-length:
|
28
|
-
- "
|
59
|
+
- "9838"
|
29
60
|
cache-control:
|
30
61
|
- private, max-age=0, must-revalidate
|
31
62
|
status:
|
32
63
|
- "200"
|
33
64
|
vary:
|
34
65
|
- Accept-Encoding
|
35
|
-
body: "[{\"id\":\"grp-b0uqb\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-b0uqb\",\"name\":\"default\",\"default\":true,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[{\"id\":\"srv-7gtg9\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-7gtg9\",\"name\":\"hello world\",\"created_at\":\"2011-10-14T10:29:17Z\",\"deleted_at\":null,\"hostname\":\"srv-7gtg9\",\"started_at\":null,\"status\":\"active\"},{\"id\":\"srv-sr2td\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-sr2td\",\"name\":\"try_this\",\"created_at\":\"2011-10-14T10:51:36Z\",\"deleted_at\":null,\"hostname\":\"srv-sr2td\",\"started_at\":null,\"status\":\"active\"},{\"id\":\"srv-f3ivy\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-f3ivy\",\"name\":\"\",\"created_at\":\"2011-10-17T09:46:48Z\",\"deleted_at\":null,\"hostname\":\"srv-f3ivy\",\"started_at\":null,\"status\":\"active\"},{\"id\":\"srv-c5e3t\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-c5e3t\",\"name\":\"wow\",\"created_at\":\"2011-10-17T09:50:52Z\",\"deleted_at\":null,\"hostname\":\"srv-c5e3t\",\"started_at\":null,\"status\":\"active\"},{\"id\":\"srv-8y1ll\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-8y1ll\",\"name\":\"rspec_server_shutdown\",\"created_at\":\"2011-10-17T10:24:56Z\",\"deleted_at\":null,\"hostname\":\"srv-8y1ll\",\"started_at\":null,\"status\":\"active\"},{\"id\":\"srv-9p4l2\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-9p4l2\",\"name\":\"rspec_server_shutdown\",\"created_at\":\"2011-10-17T10:25:36Z\",\"deleted_at\":null,\"hostname\":\"srv-9p4l2\",\"started_at\":null,\"status\":\"active\"},{\"id\":\"srv-cumml\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-cumml\",\"name\":\"load balanced1\",\"created_at\":\"2011-10-21T10:08:43Z\",\"deleted_at\":null,\"hostname\":\"srv-cumml\",\"started_at\":null,\"status\":\"active\"},{\"id\":\"srv-88qar\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-88qar\",\"name\":\"load balanced3\",\"created_at\":\"2011-10-21T10:18:34Z\",\"deleted_at\":null,\"hostname\":\"srv-88qar\",\"started_at\":null,\"status\":\"active\"}]},{\"id\":\"grp-qf4jo\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-qf4jo\",\"name\":\"hemant_group\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-leb2i\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-leb2i\",\"name\":\"default_permissive_group\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[{\"id\":\"srv-gbgb1\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-gbgb1\",\"name\":\"\",\"created_at\":\"2011-09-13T17:42:18Z\",\"deleted_at\":null,\"hostname\":\"srv-gbgb1\",\"started_at\":null,\"status\":\"active\"},{\"id\":\"srv-l3lxf\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-l3lxf\",\"name\":\"ipv61\",\"created_at\":\"2011-09-16T11:12:48Z\",\"deleted_at\":null,\"hostname\":\"srv-l3lxf\",\"started_at\":null,\"status\":\"active\"},{\"id\":\"srv-3pepp\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-3pepp\",\"name\":\"ipv62\",\"created_at\":\"2011-09-16T11:16:23Z\",\"deleted_at\":null,\"hostname\":\"srv-3pepp\",\"started_at\":null,\"status\":\"active\"},{\"id\":\"srv-2y9y5\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-2y9y5\",\"name\":\"\",\"created_at\":\"2011-09-20T11:07:56Z\",\"deleted_at\":null,\"hostname\":\"srv-2y9y5\",\"started_at\":null,\"status\":\"active\"}]},{\"id\":\"grp-mytrp\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-mytrp\",\"name\":\"closed on\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[{\"id\":\"srv-ddw5x\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-ddw5x\",\"name\":\"\",\"created_at\":\"2011-09-20T11:12:58Z\",\"deleted_at\":null,\"hostname\":\"srv-ddw5x\",\"started_at\":null,\"status\":\"active\"},{\"id\":\"srv-y8bny\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-y8bny\",\"name\":\"rspec_server_start\",\"created_at\":\"2011-10-17T10:01:19Z\",\"deleted_at\":null,\"hostname\":\"srv-y8bny\",\"started_at\":null,\"status\":\"active\"}]},{\"id\":\"grp-pb7oa\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-pb7oa\",\"name\":\"proxy\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[{\"id\":\"srv-7yilp\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-7yilp\",\"name\":\"\",\"created_at\":\"2011-08-18T03:43:30Z\",\"deleted_at\":null,\"hostname\":\"srv-7yilp\",\"started_at\":null,\"status\":\"active\"},{\"id\":\"srv-o23u7\",\"resource_type\":\"server\",\"url\":\"https://api.gb1s.brightbox.com/1.0/servers/srv-o23u7\",\"name\":\"wow\",\"created_at\":\"2011-10-11T09:35:06Z\",\"deleted_at\":null,\"hostname\":\"srv-o23u7\",\"started_at\":null,\"status\":\"active\"}]},{\"id\":\"grp-r38ju\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-r38ju\",\"name\":\"foo\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-4gl7v\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-4gl7v\",\"name\":\"spec\",\"default\":false,\"description\":\"wow\",\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-f7jwd\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-f7jwd\",\"name\":\"rspec_tests_apply\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-tlyay\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-tlyay\",\"name\":\"rspec_tests_apply\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-vm946\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-vm946\",\"name\":\"rspec_tests\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-knvxf\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-knvxf\",\"name\":\"rspec_tests_apply\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-8edu3\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-8edu3\",\"name\":\"rspec_tests_apply\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-4cmlm\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-4cmlm\",\"name\":\"rspec_tests_apply\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-10d61\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-10d61\",\"name\":\"rspec_tests_apply\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-8ar3h\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-8ar3h\",\"name\":\"test\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-660cz\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-660cz\",\"name\":\"test_policy_remove\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-jnaji\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-jnaji\",\"name\":\"-n\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]},{\"id\":\"grp-nllao\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1s.brightbox.com/1.0/server_groups/grp-nllao\",\"name\":\"my_home_network2\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1s.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"overdue\"},\"servers\":[]}]"
|
66
|
+
body: "[{\"id\":\"grp-b0uqb\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-b0uqb\",\"name\":\"default\",\"created_at\":\"2011-08-17T14:27:10Z\",\"default\":true,\"description\":\"All new servers are added to this group unless specified otherwise.\",\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"warning\"},\"firewall_policy\":{\"id\":\"fwp-bdwve\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-bdwve\",\"name\":\"default\",\"created_at\":\"2011-08-17T14:27:11Z\",\"default\":true,\"description\":\"Applied to the default server group.\"},\"servers\":[{\"id\":\"srv-cumml\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-cumml\",\"name\":\"load balanced1\",\"created_at\":\"2011-10-21T10:08:43Z\",\"deleted_at\":null,\"hostname\":\"srv-cumml\",\"started_at\":\"2011-12-23T18:53:21Z\",\"status\":\"active\"},{\"id\":\"srv-88qar\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-88qar\",\"name\":\"load balanced3\",\"created_at\":\"2011-10-21T10:18:34Z\",\"deleted_at\":null,\"hostname\":\"srv-88qar\",\"started_at\":\"2011-12-23T18:53:22Z\",\"status\":\"active\"},{\"id\":\"srv-51rrz\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-51rrz\",\"name\":\"new_wildcard\",\"created_at\":\"2011-11-01T09:48:21Z\",\"deleted_at\":null,\"hostname\":\"srv-51rrz\",\"started_at\":\"2011-12-16T15:47:47Z\",\"status\":\"active\"},{\"id\":\"srv-2y9y5\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-2y9y5\",\"name\":\"\",\"created_at\":\"2011-09-20T11:07:56Z\",\"deleted_at\":null,\"hostname\":\"srv-2y9y5\",\"started_at\":\"2011-12-16T15:47:41Z\",\"status\":\"active\"},{\"id\":\"srv-kf2d1\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-kf2d1\",\"name\":\"wow\",\"created_at\":\"2011-11-23T13:58:42Z\",\"deleted_at\":null,\"hostname\":\"srv-kf2d1\",\"started_at\":\"2011-12-23T18:53:26Z\",\"status\":\"active\"},{\"id\":\"srv-zf6xu\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-zf6xu\",\"name\":\"rspec_server_shutdown\",\"created_at\":\"2011-11-23T13:58:43Z\",\"deleted_at\":null,\"hostname\":\"srv-zf6xu\",\"started_at\":\"2011-12-23T18:53:27Z\",\"status\":\"active\"},{\"id\":\"srv-ffjze\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-ffjze\",\"name\":\"rspec_server_stop\",\"created_at\":\"2011-11-23T13:58:44Z\",\"deleted_at\":null,\"hostname\":\"srv-ffjze\",\"started_at\":\"2011-12-23T17:27:34Z\",\"status\":\"active\"},{\"id\":\"srv-vseg6\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-vseg6\",\"name\":\"rspec_server_start\",\"created_at\":\"2011-11-23T13:58:45Z\",\"deleted_at\":null,\"hostname\":\"srv-vseg6\",\"started_at\":\"2011-12-16T15:47:36Z\",\"status\":\"active\"},{\"id\":\"srv-5xu00\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-5xu00\",\"name\":\"for_running_tests\",\"created_at\":\"2011-12-28T15:38:47Z\",\"deleted_at\":null,\"hostname\":\"srv-5xu00\",\"started_at\":\"2011-12-28T15:39:55Z\",\"status\":\"active\"}]},{\"id\":\"grp-qf4jo\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-qf4jo\",\"name\":\"hemant_group\",\"created_at\":\"2011-08-17T14:56:54Z\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"warning\"},\"firewall_policy\":{\"id\":\"fwp-30kea\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-30kea\",\"name\":\"the_wall\",\"created_at\":\"2011-08-18T08:29:51Z\",\"default\":false,\"description\":null},\"servers\":[]},{\"id\":\"grp-mytrp\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-mytrp\",\"name\":\"closed on\",\"created_at\":\"2011-09-20T11:12:14Z\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"warning\"},\"firewall_policy\":{\"id\":\"fwp-h7elq\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-h7elq\",\"name\":\"another_wall\",\"created_at\":\"2011-09-20T11:23:32Z\",\"default\":false,\"description\":null},\"servers\":[]},{\"id\":\"grp-pb7oa\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-pb7oa\",\"name\":\"proxy\",\"created_at\":\"2011-10-06T10:00:41Z\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"warning\"},\"firewall_policy\":{\"id\":\"fwp-5u50s\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-5u50s\",\"name\":null,\"created_at\":\"2011-10-06T09:22:20Z\",\"default\":false,\"description\":null},\"servers\":[{\"id\":\"srv-7yilp\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-7yilp\",\"name\":\"\",\"created_at\":\"2011-08-18T03:43:30Z\",\"deleted_at\":null,\"hostname\":\"srv-7yilp\",\"started_at\":\"2011-12-23T18:53:24Z\",\"status\":\"active\"}]},{\"id\":\"grp-r38ju\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-r38ju\",\"name\":\"foo\",\"created_at\":\"2011-10-11T14:48:57Z\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"warning\"},\"firewall_policy\":{\"id\":\"fwp-nhbmp\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-nhbmp\",\"name\":\"baz\",\"created_at\":\"2011-10-11T16:17:05Z\",\"default\":false,\"description\":null},\"servers\":[]},{\"id\":\"grp-4gl7v\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-4gl7v\",\"name\":\"spec\",\"created_at\":\"2011-10-14T14:48:21Z\",\"default\":false,\"description\":\"wow\",\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"warning\"},\"firewall_policy\":null,\"servers\":[]},{\"id\":\"grp-tlyay\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-tlyay\",\"name\":\"rspec_tests_apply\",\"created_at\":\"2011-10-14T16:27:57Z\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"warning\"},\"firewall_policy\":{\"id\":\"fwp-vtmj4\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-vtmj4\",\"name\":\"rspec_firewall_policy_apply\",\"created_at\":\"2011-10-14T16:27:58Z\",\"default\":false,\"description\":null},\"servers\":[]},{\"id\":\"grp-knvxf\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-knvxf\",\"name\":\"rspec_tests_apply\",\"created_at\":\"2011-10-14T16:28:31Z\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"warning\"},\"firewall_policy\":{\"id\":\"fwp-7d52w\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-7d52w\",\"name\":\"rspec_firewall_policy_apply\",\"created_at\":\"2011-10-14T16:28:32Z\",\"default\":false,\"description\":null},\"servers\":[]},{\"id\":\"grp-5t992\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-5t992\",\"name\":\"prerelease\",\"created_at\":\"2011-10-28T12:55:47Z\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"warning\"},\"firewall_policy\":{\"id\":\"fwp-btf7e\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-btf7e\",\"name\":\"prerelease\",\"created_at\":\"2011-10-28T12:56:13Z\",\"default\":false,\"description\":null},\"servers\":[{\"id\":\"srv-o8ige\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-o8ige\",\"name\":\"prerelease\",\"created_at\":\"2011-10-28T13:01:45Z\",\"deleted_at\":null,\"hostname\":\"srv-o8ige\",\"started_at\":\"2011-12-16T15:47:37Z\",\"status\":\"active\"},{\"id\":\"srv-gbgb1\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-gbgb1\",\"name\":\"\",\"created_at\":\"2011-09-13T17:42:18Z\",\"deleted_at\":null,\"hostname\":\"srv-gbgb1\",\"started_at\":\"2011-12-16T15:47:44Z\",\"status\":\"active\"},{\"id\":\"srv-l3lxf\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-l3lxf\",\"name\":\"ipv61\",\"created_at\":\"2011-09-16T11:12:48Z\",\"deleted_at\":null,\"hostname\":\"srv-l3lxf\",\"started_at\":\"2011-12-23T17:27:23Z\",\"status\":\"active\"},{\"id\":\"srv-3pepp\",\"resource_type\":\"server\",\"url\":\"https://api.gb1.brightbox.com/1.0/servers/srv-3pepp\",\"name\":\"ipv62\",\"created_at\":\"2011-09-16T11:16:23Z\",\"deleted_at\":null,\"hostname\":\"srv-3pepp\",\"started_at\":\"2011-12-16T15:47:44Z\",\"status\":\"active\"}]},{\"id\":\"grp-sve8p\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-sve8p\",\"name\":\"wow\",\"created_at\":\"2011-11-01T10:28:09Z\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"warning\"},\"firewall_policy\":null,\"servers\":[]},{\"id\":\"grp-j69kx\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-j69kx\",\"name\":\"tbd2\",\"created_at\":\"2011-12-22T11:08:27Z\",\"default\":false,\"description\":null,\"account\":{\"id\":\"acc-8gq0k\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/account\",\"name\":\"Hemant Account\",\"status\":\"warning\"},\"firewall_policy\":{\"id\":\"fwp-s42p3\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-s42p3\",\"name\":\"testing\",\"created_at\":\"2011-12-22T11:08:53Z\",\"default\":false,\"description\":null},\"servers\":[]}]"
|
36
67
|
http_version:
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "NilableHash" do
|
4
|
+
before do
|
5
|
+
@blank_hash = NilableHash[
|
6
|
+
:present => 'value', :b1 => '', 'nilval' => nil, 'b2' => '', 'another' => 'another value'
|
7
|
+
]
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "#nilify_blanks" do
|
11
|
+
it "should nilify all blank values" do
|
12
|
+
@blank_hash.nilify_blanks
|
13
|
+
@blank_hash[:b1].should be_nil
|
14
|
+
@blank_hash['b2'].should be_nil
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should leave nils as nil" do
|
18
|
+
@blank_hash['nilval'].should be_nil
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should not nilify non blank values" do
|
22
|
+
@blank_hash[:present].should == 'value'
|
23
|
+
@blank_hash['another'].should == 'another value'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should respond true when sent #is_a?(Hash)" do
|
28
|
+
NilableHash.new.is_a?(Hash).should be_true
|
29
|
+
end
|
30
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brightbox-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 91
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 17
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.17.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Leach
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-02-02 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -111,35 +111,35 @@ dependencies:
|
|
111
111
|
type: :runtime
|
112
112
|
version_requirements: *id006
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
|
-
name: net-
|
114
|
+
name: net-ssh
|
115
115
|
prerelease: false
|
116
116
|
requirement: &id007 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
119
|
- - ~>
|
120
120
|
- !ruby/object:Gem::Version
|
121
|
-
hash:
|
121
|
+
hash: 5
|
122
122
|
segments:
|
123
|
+
- 2
|
124
|
+
- 2
|
123
125
|
- 1
|
124
|
-
|
125
|
-
- 4
|
126
|
-
version: 1.0.4
|
126
|
+
version: 2.2.1
|
127
127
|
type: :runtime
|
128
128
|
version_requirements: *id007
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
|
-
name: net-
|
130
|
+
name: net-scp
|
131
131
|
prerelease: false
|
132
132
|
requirement: &id008 !ruby/object:Gem::Requirement
|
133
133
|
none: false
|
134
134
|
requirements:
|
135
135
|
- - ~>
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
hash:
|
137
|
+
hash: 31
|
138
138
|
segments:
|
139
|
-
- 2
|
140
|
-
- 2
|
141
139
|
- 1
|
142
|
-
|
140
|
+
- 0
|
141
|
+
- 4
|
142
|
+
version: 1.0.4
|
143
143
|
type: :runtime
|
144
144
|
version_requirements: *id008
|
145
145
|
- !ruby/object:Gem::Dependency
|
@@ -298,6 +298,7 @@ files:
|
|
298
298
|
- lib/brightbox-cli/commands/firewall-rules-destroy.rb
|
299
299
|
- lib/brightbox-cli/commands/firewall-rules-list.rb
|
300
300
|
- lib/brightbox-cli/commands/firewall-rules-show.rb
|
301
|
+
- lib/brightbox-cli/commands/firewall-rules-update.rb
|
301
302
|
- lib/brightbox-cli/commands/groups-add-server.rb
|
302
303
|
- lib/brightbox-cli/commands/groups-create.rb
|
303
304
|
- lib/brightbox-cli/commands/groups-destroy.rb
|
@@ -318,7 +319,7 @@ files:
|
|
318
319
|
- lib/brightbox-cli/commands/lbs-remove-nodes.rb
|
319
320
|
- lib/brightbox-cli/commands/lbs-show.rb
|
320
321
|
- lib/brightbox-cli/commands/lbs-update.rb
|
321
|
-
- lib/brightbox-cli/commands/servers-activate-
|
322
|
+
- lib/brightbox-cli/commands/servers-activate-console.rb
|
322
323
|
- lib/brightbox-cli/commands/servers-create.rb
|
323
324
|
- lib/brightbox-cli/commands/servers-destroy.rb
|
324
325
|
- lib/brightbox-cli/commands/servers-list.rb
|
@@ -346,6 +347,7 @@ files:
|
|
346
347
|
- lib/brightbox-cli/images.rb
|
347
348
|
- lib/brightbox-cli/load_balancers.rb
|
348
349
|
- lib/brightbox-cli/logging.rb
|
350
|
+
- lib/brightbox-cli/nilable_hash.rb
|
349
351
|
- lib/brightbox-cli/ruby_core_ext.rb
|
350
352
|
- lib/brightbox-cli/server_groups.rb
|
351
353
|
- lib/brightbox-cli/servers.rb
|
@@ -416,6 +418,7 @@ files:
|
|
416
418
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/dns.rb
|
417
419
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/elasticache.rb
|
418
420
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/elb.rb
|
421
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/emr.rb
|
419
422
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/iam.rb
|
420
423
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/models/auto_scaling/activities.rb
|
421
424
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/models/auto_scaling/activity.rb
|
@@ -509,6 +512,7 @@ files:
|
|
509
512
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_formation/describe_stack_resources.rb
|
510
513
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_formation/describe_stacks.rb
|
511
514
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_formation/get_template.rb
|
515
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_formation/update_stack.rb
|
512
516
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_formation/validate_template.rb
|
513
517
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/delete_alarms.rb
|
514
518
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/describe_alarm_history.rb
|
@@ -590,6 +594,13 @@ files:
|
|
590
594
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elb/empty.rb
|
591
595
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elb/enable_availability_zones_for_load_balancer.rb
|
592
596
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elb/register_instances_with_load_balancer.rb
|
597
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/add_instance_groups.rb
|
598
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/add_job_flow_steps.rb
|
599
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/describe_job_flows.rb
|
600
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/modify_instance_groups.rb
|
601
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/run_job_flow.rb
|
602
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/set_termination_protection.rb
|
603
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/terminate_job_flows.rb
|
593
604
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/iam/basic.rb
|
594
605
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/iam/create_access_key.rb
|
595
606
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/iam/create_group.rb
|
@@ -727,6 +738,7 @@ files:
|
|
727
738
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_formation/describe_stack_resources.rb
|
728
739
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_formation/describe_stacks.rb
|
729
740
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_formation/get_template.rb
|
741
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_formation/update_stack.rb
|
730
742
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_formation/validate_template.rb
|
731
743
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/delete_alarms.rb
|
732
744
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/describe_alarm_history.rb
|
@@ -837,6 +849,13 @@ files:
|
|
837
849
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
|
838
850
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/set_load_balancer_listener_ssl_certificate.rb
|
839
851
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/set_load_balancer_policies_of_listener.rb
|
852
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/add_instance_groups.rb
|
853
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/add_job_flow_steps.rb
|
854
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/describe_job_flows.rb
|
855
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/modify_instance_groups.rb
|
856
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/run_job_flow.rb
|
857
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/set_termination_protection.rb
|
858
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/terminate_job_flows.rb
|
840
859
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/add_user_to_group.rb
|
841
860
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/create_access_key.rb
|
842
861
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/create_account_alias.rb
|
@@ -940,6 +959,7 @@ files:
|
|
940
959
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/send_message.rb
|
941
960
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/set_queue_attributes.rb
|
942
961
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/abort_multipart_upload.rb
|
962
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/acl_utils.rb
|
943
963
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/complete_multipart_upload.rb
|
944
964
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/copy_object.rb
|
945
965
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/delete_bucket.rb
|
@@ -962,7 +982,6 @@ files:
|
|
962
982
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_url.rb
|
963
983
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_request_payment.rb
|
964
984
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_service.rb
|
965
|
-
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/hash_to_acl.rb
|
966
985
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/head_object.rb
|
967
986
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/initiate_multipart_upload.rb
|
968
987
|
- lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/list_multipart_uploads.rb
|
@@ -1136,6 +1155,7 @@ files:
|
|
1136
1155
|
- lib/brightbox-cli/vendor/fog/lib/fog/brightbox/requests/compute/update_account.rb
|
1137
1156
|
- lib/brightbox-cli/vendor/fog/lib/fog/brightbox/requests/compute/update_api_client.rb
|
1138
1157
|
- lib/brightbox-cli/vendor/fog/lib/fog/brightbox/requests/compute/update_cloud_ip.rb
|
1158
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/brightbox/requests/compute/update_firewall_rule.rb
|
1139
1159
|
- lib/brightbox-cli/vendor/fog/lib/fog/brightbox/requests/compute/update_image.rb
|
1140
1160
|
- lib/brightbox-cli/vendor/fog/lib/fog/brightbox/requests/compute/update_load_balancer.rb
|
1141
1161
|
- lib/brightbox-cli/vendor/fog/lib/fog/brightbox/requests/compute/update_server.rb
|
@@ -1492,6 +1512,7 @@ files:
|
|
1492
1512
|
- lib/brightbox-cli/vendor/fog/lib/fog/ninefold/requests/compute/update_virtual_machine.rb
|
1493
1513
|
- lib/brightbox-cli/vendor/fog/lib/fog/ninefold/requests/storage/delete_namespace.rb
|
1494
1514
|
- lib/brightbox-cli/vendor/fog/lib/fog/ninefold/requests/storage/get_namespace.rb
|
1515
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/ninefold/requests/storage/head_namespace.rb
|
1495
1516
|
- lib/brightbox-cli/vendor/fog/lib/fog/ninefold/requests/storage/post_namespace.rb
|
1496
1517
|
- lib/brightbox-cli/vendor/fog/lib/fog/ninefold/requests/storage/put_namespace.rb
|
1497
1518
|
- lib/brightbox-cli/vendor/fog/lib/fog/ninefold/storage.rb
|
@@ -1695,6 +1716,7 @@ files:
|
|
1695
1716
|
- lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/get_records.rb
|
1696
1717
|
- lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/get_zone.rb
|
1697
1718
|
- lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/get_zones.rb
|
1719
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/update_record.rb
|
1698
1720
|
- lib/brightbox-cli/vendor/fog/lib/fog/storage.rb
|
1699
1721
|
- lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand.rb
|
1700
1722
|
- lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/compute.rb
|
@@ -1877,6 +1899,7 @@ files:
|
|
1877
1899
|
- lib/brightbox-cli/vendor/fog/lib/fog/vsphere/models/compute/server.rb
|
1878
1900
|
- lib/brightbox-cli/vendor/fog/lib/fog/vsphere/models/compute/servers.rb
|
1879
1901
|
- lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/current_time.rb
|
1902
|
+
- lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/datacenters.rb
|
1880
1903
|
- lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/find_vm_by_ref.rb
|
1881
1904
|
- lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/list_virtual_machines.rb
|
1882
1905
|
- lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/vm_clone.rb
|
@@ -2028,6 +2051,9 @@ files:
|
|
2028
2051
|
- lib/brightbox-cli/vendor/fog/tests/aws/requests/elb/listener_tests.rb
|
2029
2052
|
- lib/brightbox-cli/vendor/fog/tests/aws/requests/elb/load_balancer_tests.rb
|
2030
2053
|
- lib/brightbox-cli/vendor/fog/tests/aws/requests/elb/policy_tests.rb
|
2054
|
+
- lib/brightbox-cli/vendor/fog/tests/aws/requests/emr/helper.rb
|
2055
|
+
- lib/brightbox-cli/vendor/fog/tests/aws/requests/emr/instance_group_tests.rb
|
2056
|
+
- lib/brightbox-cli/vendor/fog/tests/aws/requests/emr/job_flow_tests.rb
|
2031
2057
|
- lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/access_key_tests.rb
|
2032
2058
|
- lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/group_policy_tests.rb
|
2033
2059
|
- lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/group_tests.rb
|
@@ -2051,6 +2077,7 @@ files:
|
|
2051
2077
|
- lib/brightbox-cli/vendor/fog/tests/aws/requests/sqs/helper.rb
|
2052
2078
|
- lib/brightbox-cli/vendor/fog/tests/aws/requests/sqs/message_tests.rb
|
2053
2079
|
- lib/brightbox-cli/vendor/fog/tests/aws/requests/sqs/queue_tests.rb
|
2080
|
+
- lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/acl_utils_tests.rb
|
2054
2081
|
- lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/bucket_tests.rb
|
2055
2082
|
- lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/multipart_upload_tests.rb
|
2056
2083
|
- lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/object_tests.rb
|
@@ -2078,6 +2105,7 @@ files:
|
|
2078
2105
|
- lib/brightbox-cli/vendor/fog/tests/compute/models/servers_tests.rb
|
2079
2106
|
- lib/brightbox-cli/vendor/fog/tests/core/attribute_tests.rb
|
2080
2107
|
- lib/brightbox-cli/vendor/fog/tests/core/credential_tests.rb
|
2108
|
+
- lib/brightbox-cli/vendor/fog/tests/core/mocking_tests.rb
|
2081
2109
|
- lib/brightbox-cli/vendor/fog/tests/core/parser_tests.rb
|
2082
2110
|
- lib/brightbox-cli/vendor/fog/tests/core/timeout_tests.rb
|
2083
2111
|
- lib/brightbox-cli/vendor/fog/tests/dns/helper.rb
|
@@ -2279,6 +2307,7 @@ files:
|
|
2279
2307
|
- spec/fixtures/vcr_cassettes/server_start.yml
|
2280
2308
|
- spec/fixtures/vcr_cassettes/server_stop.yml
|
2281
2309
|
- spec/fixtures/vcr_cassettes/show_firewall_policy.yml
|
2310
|
+
- spec/nilable_hash_spec.rb
|
2282
2311
|
- spec/server_group_spec.rb
|
2283
2312
|
- spec/servers_spec.rb
|
2284
2313
|
- spec/spec_helper.rb
|
@@ -2314,7 +2343,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2314
2343
|
requirements: []
|
2315
2344
|
|
2316
2345
|
rubyforge_project: brightbox-cli
|
2317
|
-
rubygems_version: 1.
|
2346
|
+
rubygems_version: 1.3.7
|
2318
2347
|
signing_key:
|
2319
2348
|
specification_version: 3
|
2320
2349
|
summary: The Brightbox cloud management system
|
@@ -2341,6 +2370,7 @@ test_files:
|
|
2341
2370
|
- spec/fixtures/vcr_cassettes/server_start.yml
|
2342
2371
|
- spec/fixtures/vcr_cassettes/server_stop.yml
|
2343
2372
|
- spec/fixtures/vcr_cassettes/show_firewall_policy.yml
|
2373
|
+
- spec/nilable_hash_spec.rb
|
2344
2374
|
- spec/server_group_spec.rb
|
2345
2375
|
- spec/servers_spec.rb
|
2346
2376
|
- spec/spec_helper.rb
|
@@ -1,44 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Storage
|
3
|
-
class AWS
|
4
|
-
private
|
5
|
-
def self.hash_to_acl(acl)
|
6
|
-
data =
|
7
|
-
<<-DATA
|
8
|
-
<AccessControlPolicy>
|
9
|
-
<Owner>
|
10
|
-
<ID>#{acl['Owner']['ID']}</ID>
|
11
|
-
<DisplayName>#{acl['Owner']['DisplayName']}</DisplayName>
|
12
|
-
</Owner>
|
13
|
-
<AccessControlList>
|
14
|
-
DATA
|
15
|
-
|
16
|
-
acl['AccessControlList'].each do |grant|
|
17
|
-
data << " <Grant>\n"
|
18
|
-
type = case grant['Grantee'].keys.sort
|
19
|
-
when ['DisplayName', 'ID']
|
20
|
-
'CanonicalUser'
|
21
|
-
when ['EmailAddress']
|
22
|
-
'AmazonCustomerByEmail'
|
23
|
-
when ['URI']
|
24
|
-
'Group'
|
25
|
-
end
|
26
|
-
data << " <Grantee xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"#{type}\">\n"
|
27
|
-
data << " <ID>#{grant['Grantee']['ID']}</ID>\n"
|
28
|
-
data << " <DisplayName>#{grant['Grantee']['DisplayName']}</DisplayName>\n"
|
29
|
-
data << " </Grantee>\n"
|
30
|
-
data << " <Permission>#{grant['Permission']}</Permission>\n"
|
31
|
-
data << " </Grant>\n"
|
32
|
-
end
|
33
|
-
|
34
|
-
data <<
|
35
|
-
<<-DATA
|
36
|
-
</AccessControlList>
|
37
|
-
</AccessControlPolicy>
|
38
|
-
DATA
|
39
|
-
data
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|