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
@@ -10,30 +10,25 @@ module Fog
|
|
10
10
|
|
11
11
|
undef_method :create
|
12
12
|
|
13
|
+
attribute :href
|
14
|
+
|
13
15
|
def all
|
14
|
-
data = connection.get_organization(
|
16
|
+
data = connection.get_organization(org_uri).links.select { |link| link[:type] == "application/vnd.vmware.vcloud.vdc+xml" }
|
15
17
|
data.each { |link| link.delete_if { |key, value| [:rel].include?(key) } }
|
16
18
|
load(data)
|
17
19
|
end
|
18
20
|
|
19
21
|
def get(uri)
|
20
|
-
|
21
|
-
new(data.body)
|
22
|
-
end
|
22
|
+
connection.get_vdc(uri)
|
23
23
|
rescue Fog::Errors::NotFound
|
24
24
|
nil
|
25
25
|
end
|
26
26
|
|
27
|
-
def organization_uri
|
28
|
-
@organization_uri ||= connection.default_organization_uri
|
29
|
-
end
|
30
|
-
|
31
27
|
private
|
32
28
|
|
33
|
-
def
|
34
|
-
|
29
|
+
def org_uri
|
30
|
+
self.href ||= connection.default_organization_uri
|
35
31
|
end
|
36
|
-
|
37
32
|
end
|
38
33
|
end
|
39
34
|
end
|
@@ -5,7 +5,7 @@ module Fog
|
|
5
5
|
|
6
6
|
def validate_clone_vapp_options(options)
|
7
7
|
valid_opts = [:name, :poweron]
|
8
|
-
unless valid_opts.all? { |opt| options.
|
8
|
+
unless valid_opts.all? { |opt| options.has_key?(opt) }
|
9
9
|
raise ArgumentError.new("Required data missing: #{(valid_opts - options.keys).map(&:inspect).join(", ")}")
|
10
10
|
end
|
11
11
|
end
|
@@ -5,7 +5,7 @@ module Fog
|
|
5
5
|
|
6
6
|
def validate_network_data(network_data, configure=false)
|
7
7
|
valid_opts = [:id, :href, :name, :address, :broadcast, :gateway]
|
8
|
-
unless valid_opts.all? { |opt| network_data.
|
8
|
+
unless valid_opts.all? { |opt| network_data.has_key?(opt) }
|
9
9
|
raise ArgumentError.new("Required data missing: #{(valid_opts - network_data.keys).map(&:inspect).join(", ")}")
|
10
10
|
end
|
11
11
|
end
|
@@ -6,7 +6,7 @@ module Fog
|
|
6
6
|
|
7
7
|
def validate_network_ip_data(network_ip_data)
|
8
8
|
valid_opts = [:id, :href, :name, :status, :server]
|
9
|
-
unless valid_opts.all? { |opt| network_ip_data.
|
9
|
+
unless valid_opts.all? { |opt| network_ip_data.has_key?(opt) }
|
10
10
|
raise ArgumentError.new("Required data missing: #{(valid_opts - network_ip_data.keys).map(&:inspect).join(", ")}")
|
11
11
|
end
|
12
12
|
end
|
@@ -6,7 +6,7 @@ module Fog
|
|
6
6
|
|
7
7
|
def validate_vapp_data(vapp_data)
|
8
8
|
valid_opts = [:name, :cpus, :memory, :disks]
|
9
|
-
unless valid_opts.all? { |opt| vapp_data.
|
9
|
+
unless valid_opts.all? { |opt| vapp_data.has_key?(opt) }
|
10
10
|
raise ArgumentError.new("Required Vapp data missing: #{(valid_opts - vapp_data.keys).map(&:inspect).join(", ")}")
|
11
11
|
end
|
12
12
|
end
|
@@ -138,7 +138,7 @@ module Fog
|
|
138
138
|
|
139
139
|
def validate_vm_data(vm_data)
|
140
140
|
valid_opts = [:name, :cpus, :memory, :disks]
|
141
|
-
unless valid_opts.all? { |opt| vm_data.
|
141
|
+
unless valid_opts.all? { |opt| vm_data.has_key?(opt) }
|
142
142
|
raise ArgumentError.new("Required vm data missing: #{(valid_opts - vm_data.keys).map(&:inspect).join(", ")}")
|
143
143
|
end
|
144
144
|
end
|
data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb
CHANGED
@@ -7,7 +7,7 @@ module Fog
|
|
7
7
|
def validate_instantiate_vapp_template_options options
|
8
8
|
# :network_uri removed, if not specified will use template network config.
|
9
9
|
valid_opts = [:catalog_item_uri, :name, :vdc_uri]
|
10
|
-
unless valid_opts.all? { |opt| options.
|
10
|
+
unless valid_opts.all? { |opt| options.has_key?(opt) }
|
11
11
|
raise ArgumentError.new("Required data missing: #{(valid_opts - options.keys).map(&:inspect).join(", ")}")
|
12
12
|
end
|
13
13
|
|
@@ -6,14 +6,18 @@ module Fog
|
|
6
6
|
|
7
7
|
|
8
8
|
def login
|
9
|
+
headers = { 'Authorization' => authorization_header }
|
10
|
+
uri = if version == '1.0'
|
11
|
+
"#{base_url}/login"
|
12
|
+
else
|
13
|
+
"#{base_path_url}/sessions"
|
14
|
+
end
|
9
15
|
unauthenticated_request({
|
10
16
|
:expects => 200,
|
11
|
-
:headers =>
|
12
|
-
'Authorization' => authorization_header
|
13
|
-
},
|
17
|
+
:headers => headers,
|
14
18
|
:method => 'POST',
|
15
19
|
:parse => true,
|
16
|
-
:uri =>
|
20
|
+
:uri => uri
|
17
21
|
})
|
18
22
|
end
|
19
23
|
|
@@ -34,6 +34,10 @@ module Fog
|
|
34
34
|
@connection = ::VirtualBox::Global.global.lib.virtualbox
|
35
35
|
end
|
36
36
|
|
37
|
+
def respond_to?(method, *)
|
38
|
+
super or @connection.respond_to? method
|
39
|
+
end
|
40
|
+
|
37
41
|
# hack to provide 'requests'
|
38
42
|
def method_missing(method_sym, *arguments, &block)
|
39
43
|
if @connection.respond_to?(method_sym)
|
@@ -56,7 +56,13 @@ module Fog
|
|
56
56
|
requires :instance_uuid
|
57
57
|
connection.vm_destroy('instance_uuid' => instance_uuid)
|
58
58
|
end
|
59
|
-
|
59
|
+
def create(options ={})
|
60
|
+
requires :name, :path
|
61
|
+
new_vm = self.class.new(create_results['vm_attributes'])
|
62
|
+
new_vm.collection = self.collection
|
63
|
+
new_vm.connection = self.connection
|
64
|
+
new_vm
|
65
|
+
end
|
60
66
|
def clone(options = {})
|
61
67
|
requires :name, :path
|
62
68
|
# Convert symbols to strings
|
@@ -26,7 +26,7 @@ module Fog
|
|
26
26
|
# If the first path element contains "vm" this denotes the vmFolder
|
27
27
|
# and needs to be shifted out since each DC contains only one
|
28
28
|
# vmFolder
|
29
|
-
path_elements.shift if path_elements[0]
|
29
|
+
path_elements.shift if path_elements[0] == 'vm'
|
30
30
|
# Make sure @datacenters is populated (the keys are DataCenter instances)
|
31
31
|
self.datacenters.include? dc_name or raise ArgumentError, "Could not find a Datacenter named #{dc_name}"
|
32
32
|
# Get the datacenter managed object
|
@@ -138,93 +138,93 @@ module Fog
|
|
138
138
|
case options['instance_uuid']
|
139
139
|
when nil
|
140
140
|
rval = YAML.load <<-'ENDvmLISTING'
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
141
|
+
---
|
142
|
+
virtual_machines:
|
143
|
+
- name: centos56gm
|
144
|
+
hypervisor: gunab.puppetlabs.lan
|
145
|
+
tools_version: guestToolsCurrent
|
146
|
+
ipaddress:
|
147
|
+
mo_ref: vm-698
|
148
|
+
power_state: poweredOff
|
149
|
+
uuid: 42322347-d791-cd34-80b9-e25fe28ad37c
|
150
|
+
is_a_template: true
|
151
|
+
id: 50323f93-6835-1178-8b8f-9e2109890e1a
|
152
|
+
tools_state: toolsNotRunning
|
153
|
+
connection_state: connected
|
154
|
+
instance_uuid: 50323f93-6835-1178-8b8f-9e2109890e1a
|
155
|
+
hostname:
|
156
|
+
mac_addresses:
|
157
|
+
Network adapter 1: 00:50:56:b2:00:a1
|
158
|
+
operatingsystem:
|
159
|
+
- name: centos56gm2
|
160
|
+
hypervisor: gunab.puppetlabs.lan
|
161
|
+
tools_version: guestToolsCurrent
|
162
|
+
ipaddress:
|
163
|
+
mo_ref: vm-640
|
164
|
+
power_state: poweredOff
|
165
|
+
uuid: 564ddcbe-853a-d29a-b329-a0a3693a004d
|
166
|
+
is_a_template: true
|
167
|
+
id: 5257dee8-050c-cbcd-ae25-db0e582ab530
|
168
|
+
tools_state: toolsNotRunning
|
169
|
+
connection_state: connected
|
170
|
+
instance_uuid: 5257dee8-050c-cbcd-ae25-db0e582ab530
|
171
|
+
hostname:
|
172
|
+
mac_addresses:
|
173
|
+
Network adapter 1: 00:0c:29:3a:00:4d
|
174
|
+
operatingsystem:
|
175
|
+
- name: dashboard_gm
|
176
|
+
hypervisor: gunab.puppetlabs.lan
|
177
|
+
tools_version: guestToolsCurrent
|
178
|
+
ipaddress: 192.168.100.184
|
179
|
+
mo_ref: vm-669
|
180
|
+
power_state: poweredOn
|
181
|
+
uuid: 564d3f91-3452-a509-a678-1246f7897979
|
182
|
+
is_a_template: false
|
183
|
+
id: 5032739c-c871-c0d2-034f-9700a0b5383e
|
184
|
+
tools_state: toolsOk
|
185
|
+
connection_state: connected
|
186
|
+
instance_uuid: 5032739c-c871-c0d2-034f-9700a0b5383e
|
187
|
+
hostname: compliance.puppetlabs.vm
|
188
|
+
mac_addresses:
|
189
|
+
Network adapter 1: 00:50:56:b2:00:96
|
190
|
+
operatingsystem: Red Hat Enterprise Linux 6 (64-bit)
|
191
|
+
- name: jefftest
|
192
|
+
hypervisor: gunab.puppetlabs.lan
|
193
|
+
tools_version: guestToolsCurrent
|
194
|
+
ipaddress: 192.168.100.187
|
195
|
+
mo_ref: vm-715
|
196
|
+
power_state: poweredOn
|
197
|
+
uuid: 42329da7-e8ab-29ec-1892-d6a4a964912a
|
198
|
+
is_a_template: false
|
199
|
+
id: 5032c8a5-9c5e-ba7a-3804-832a03e16381
|
200
|
+
tools_state: toolsOk
|
201
|
+
connection_state: connected
|
202
|
+
instance_uuid: 5032c8a5-9c5e-ba7a-3804-832a03e16381
|
203
|
+
hostname: centos56gm.localdomain
|
204
|
+
mac_addresses:
|
205
|
+
Network adapter 1: 00:50:56:b2:00:af
|
206
|
+
operatingsystem: CentOS 4/5 (32-bit)
|
207
|
+
ENDvmLISTING
|
208
208
|
when '5032c8a5-9c5e-ba7a-3804-832a03e16381'
|
209
209
|
YAML.load <<-'5032c8a5-9c5e-ba7a-3804-832a03e16381'
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
210
|
+
---
|
211
|
+
virtual_machines:
|
212
|
+
- name: jefftest
|
213
|
+
hypervisor: gunab.puppetlabs.lan
|
214
|
+
tools_version: guestToolsCurrent
|
215
|
+
ipaddress: 192.168.100.187
|
216
|
+
mo_ref: vm-715
|
217
|
+
power_state: poweredOn
|
218
|
+
uuid: 42329da7-e8ab-29ec-1892-d6a4a964912a
|
219
|
+
is_a_template: false
|
220
|
+
id: 5032c8a5-9c5e-ba7a-3804-832a03e16381
|
221
|
+
tools_state: toolsOk
|
222
|
+
connection_state: connected
|
223
|
+
instance_uuid: 5032c8a5-9c5e-ba7a-3804-832a03e16381
|
224
|
+
hostname: centos56gm.localdomain
|
225
|
+
mac_addresses:
|
226
|
+
Network adapter 1: 00:50:56:b2:00:af
|
227
|
+
operatingsystem: CentOS 4/5 (32-bit)
|
228
228
|
5032c8a5-9c5e-ba7a-3804-832a03e16381
|
229
229
|
when 'does-not-exist-and-is-not-a-uuid', '50323f93-6835-1178-8b8f-9e2109890e1a'
|
230
230
|
{ 'virtual_machines' => [] }
|
@@ -5,7 +5,11 @@ module Fog
|
|
5
5
|
module Shared
|
6
6
|
private
|
7
7
|
def vm_clone_check_options(options)
|
8
|
-
|
8
|
+
default_options = {
|
9
|
+
'force' => false,
|
10
|
+
'linked_clone' => false,
|
11
|
+
}
|
12
|
+
options = default_options.merge(options)
|
9
13
|
required_options = %w{ path name }
|
10
14
|
required_options.each do |param|
|
11
15
|
raise ArgumentError, "#{required_options.join(', ')} are required" unless options.has_key? param
|
@@ -41,7 +45,7 @@ module Fog
|
|
41
45
|
template_dc = path_elements.shift
|
42
46
|
# If the first path element contains "vm" this denotes the vmFolder
|
43
47
|
# and needs to be shifted out
|
44
|
-
path_elements.shift if path_elements[0]
|
48
|
+
path_elements.shift if path_elements[0] == 'vm'
|
45
49
|
# The template name. The remaining elements are the folders in the
|
46
50
|
# datacenter.
|
47
51
|
template_name = path_elements.pop
|
@@ -70,16 +74,47 @@ module Fog
|
|
70
74
|
esx_host = vm_mob_ref.collect!('runtime.host')['runtime.host']
|
71
75
|
# The parent of the ESX host itself is a ComputeResource which has a resourcePool
|
72
76
|
resource_pool = esx_host.parent.resourcePool
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
+
relocation_spec=nil
|
78
|
+
if ( options['linked_clone'] )
|
79
|
+
# cribbed heavily from the rbvmomi clone_vm.rb
|
80
|
+
# this chunk of code reconfigures the disk of the clone source to be read only,
|
81
|
+
# and then creates a delta disk on top of that, this is required by the API in order to create
|
82
|
+
# linked clondes
|
83
|
+
disks = vm_mob_ref.config.hardware.device.select do |vm_device|
|
84
|
+
vm_device.class == RbVmomi::VIM::VirtualDisk
|
85
|
+
end
|
86
|
+
disks.select{|vm_device| vm_device.backing.parent == nil}.each do |disk|
|
87
|
+
disk_spec = {
|
88
|
+
:deviceChange => [
|
89
|
+
{
|
90
|
+
:operation => :remove,
|
91
|
+
:device => disk
|
92
|
+
},
|
93
|
+
{
|
94
|
+
:operation => :add,
|
95
|
+
:fileOperation => :create,
|
96
|
+
:device => disk.dup.tap{|disk_backing|
|
97
|
+
disk_backing.backing = disk_backing.backing.dup;
|
98
|
+
disk_backing.backing.fileName = "[#{disk.backing.datastore.name}]";
|
99
|
+
disk_backing.backing.parent = disk.backing
|
100
|
+
}
|
101
|
+
},
|
102
|
+
]
|
103
|
+
}
|
104
|
+
vm_mob_ref.ReconfigVM_Task(:spec => disk_spec).wait_for_completion
|
105
|
+
end
|
106
|
+
# Next, create a Relocation Spec instance
|
107
|
+
relocation_spec = RbVmomi::VIM.VirtualMachineRelocateSpec(:pool => resource_pool,
|
108
|
+
:diskMoveType => :moveChildMostDiskBacking)
|
109
|
+
else
|
110
|
+
relocation_spec = RbVmomi::VIM.VirtualMachineRelocateSpec(:pool => resource_pool,
|
111
|
+
:transform => options['transform'] || 'sparse')
|
112
|
+
end
|
77
113
|
# And the clone specification
|
78
114
|
clone_spec = RbVmomi::VIM.VirtualMachineCloneSpec(:location => relocation_spec,
|
79
115
|
:powerOn => options['power_on'] || true,
|
80
116
|
:template => false)
|
81
117
|
task = vm_mob_ref.CloneVM_Task(:folder => vm_mob_ref.parent, :name => options['name'], :spec => clone_spec)
|
82
|
-
|
83
118
|
# Waiting for the VM to complete allows us to get the VirtulMachine
|
84
119
|
# object of the new machine when it's done. It is HIGHLY recommended
|
85
120
|
# to set 'wait' => true if your app wants to wait. Otherwise, you're
|
@@ -126,7 +161,7 @@ module Fog
|
|
126
161
|
end
|
127
162
|
{
|
128
163
|
'vm_ref' => 'vm-123',
|
129
|
-
'task_ref' => 'task-1234'
|
164
|
+
'task_ref' => 'task-1234',
|
130
165
|
}
|
131
166
|
end
|
132
167
|
|
@@ -44,19 +44,21 @@ module Fog
|
|
44
44
|
options[:notes] = description if description
|
45
45
|
options[:priority] = priority if priority
|
46
46
|
options[:ttl] = ttl if ttl
|
47
|
-
|
48
|
-
|
49
|
-
else
|
47
|
+
|
48
|
+
if identity
|
50
49
|
options[:host_type] = type
|
51
50
|
options[:data] = value
|
52
51
|
connection.update_host(identity, options)
|
52
|
+
else
|
53
|
+
data = connection.create_host(@zone.id, type, value, options)
|
54
|
+
merge_attributes(data.body)
|
53
55
|
end
|
54
|
-
|
56
|
+
|
55
57
|
true
|
56
58
|
end
|
57
59
|
|
58
60
|
private
|
59
|
-
|
61
|
+
|
60
62
|
def zone=(new_zone)
|
61
63
|
@zone = new_zone
|
62
64
|
end
|