brightbox-cli 0.17.1 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -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, :rnat]
|
|
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
|
data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/instantiate_vapp_template.rb
CHANGED
|
@@ -6,7 +6,7 @@ module Fog
|
|
|
6
6
|
|
|
7
7
|
def validate_instantiate_vapp_template_options(catalog_item_uri, options)
|
|
8
8
|
valid_opts = [:name, :vdc_uri, :network_uri, :cpus, :memory, :row, :group]
|
|
9
|
-
unless valid_opts.all? { |opt| options.
|
|
9
|
+
unless valid_opts.all? { |opt| options.has_key?(opt) }
|
|
10
10
|
raise ArgumentError.new("Required data missing: #{(valid_opts - options.keys).map(&:inspect).join(", ")}")
|
|
11
11
|
end
|
|
12
12
|
|
|
@@ -8,6 +8,8 @@ module Fog
|
|
|
8
8
|
class Libvirt < Fog::Service
|
|
9
9
|
|
|
10
10
|
requires :libvirt_uri
|
|
11
|
+
recognizes :libvirt_username, :libvirt_password
|
|
12
|
+
recognizes :libvirt_ip_command
|
|
11
13
|
|
|
12
14
|
model_path 'fog/libvirt/models/compute'
|
|
13
15
|
model :server
|
|
@@ -60,7 +62,7 @@ module Fog
|
|
|
60
62
|
end
|
|
61
63
|
|
|
62
64
|
rescue ::Libvirt::ConnectionError
|
|
63
|
-
raise Fog::Errors::Error.new("Error making a connection to libvirt URI #{
|
|
65
|
+
raise Fog::Errors::Error.new("Error making a connection to libvirt URI #{uri.uri}:\n#{$!}")
|
|
64
66
|
end
|
|
65
67
|
|
|
66
68
|
end
|
|
@@ -84,10 +86,12 @@ module Fog
|
|
|
84
86
|
end
|
|
85
87
|
end
|
|
86
88
|
end
|
|
87
|
-
|
|
88
|
-
return newuri
|
|
89
|
+
uri+append
|
|
89
90
|
end
|
|
90
91
|
|
|
92
|
+
def respond_to?(method, *)
|
|
93
|
+
super or @connection.respond_to? method
|
|
94
|
+
end
|
|
91
95
|
|
|
92
96
|
# hack to provide 'requests'
|
|
93
97
|
def method_missing(method_sym, *arguments, &block)
|
|
@@ -48,100 +48,73 @@ module Fog
|
|
|
48
48
|
# @returns server/domain created
|
|
49
49
|
def initialize(attributes={} )
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
self.name ||="fog-#{SecureRandom.random_number*10E14.to_i.round}" unless attributes[:name]
|
|
56
|
-
|
|
57
|
-
self.os_type ||="hvm" unless attributes[:os_type]
|
|
58
|
-
self.arch ||="x86_64" unless attributes[:arch]
|
|
59
|
-
|
|
60
|
-
self.domain_type ||="kvm" unless attributes[:domain_type]
|
|
61
|
-
|
|
62
|
-
self.iso_file ||=nil unless attributes[:iso_file]
|
|
63
|
-
self.iso_dir ||="/var/lib/libvirt/images" unless attributes[:iso_dir]
|
|
64
|
-
|
|
65
|
-
self.volume_format_type ||=nil unless attributes[:volume_format_type]
|
|
66
|
-
self.volume_capacity ||=nil unless attributes[:volume_capacity]
|
|
67
|
-
self.volume_allocation ||=nil unless attributes[:volume_allocation]
|
|
68
|
-
|
|
69
|
-
self.volume_name ||=nil unless attributes[:volume_name]
|
|
70
|
-
self.volume_pool_name ||=nil unless attributes[:volume_pool_name]
|
|
71
|
-
self.volume_template_name ||=nil unless attributes[:volume_template_name]
|
|
72
|
-
|
|
73
|
-
self.network_interface_type ||="nat" unless attributes[:network_interface_type]
|
|
74
|
-
self.network_nat_network ||="default" unless attributes[:network_nat_network]
|
|
75
|
-
self.network_bridge_name ||="br0" unless attributes[:network_bridge_name]
|
|
51
|
+
# setup all attributes.
|
|
52
|
+
defaults.merge(attributes).each do |k,v|
|
|
53
|
+
eval("self.#{k}= v") if self.respond_to?("#{k}=")
|
|
54
|
+
end
|
|
76
55
|
|
|
77
56
|
super
|
|
78
57
|
end
|
|
79
58
|
|
|
59
|
+
def new?
|
|
60
|
+
uuid.nil?
|
|
61
|
+
end
|
|
62
|
+
|
|
80
63
|
def save
|
|
81
64
|
|
|
82
|
-
raise Fog::Errors::Error.new('Resaving an existing server may create a duplicate')
|
|
65
|
+
raise Fog::Errors::Error.new('Resaving an existing server may create a duplicate') unless new?
|
|
83
66
|
|
|
84
67
|
validate_template_options
|
|
85
68
|
|
|
86
|
-
xml
|
|
69
|
+
xml ||= xml_from_template
|
|
87
70
|
|
|
88
71
|
create_or_clone_volume
|
|
89
72
|
|
|
90
|
-
xml=xml_from_template
|
|
73
|
+
xml = xml_from_template
|
|
91
74
|
|
|
92
75
|
# We either now have xml provided by the user or generated by the template
|
|
93
76
|
begin
|
|
94
|
-
if
|
|
95
|
-
|
|
96
|
-
if self.persistent
|
|
97
|
-
domain=connection.raw.define_domain_xml(xml)
|
|
98
|
-
else
|
|
99
|
-
domain=connection.raw.create_domain_xml(xml)
|
|
100
|
-
end
|
|
101
|
-
self.raw=domain
|
|
77
|
+
if xml
|
|
78
|
+
self.raw = persistent ? connection.raw.define_domain_xml(xml) : connection.raw.create_domain_xml(xml)
|
|
102
79
|
end
|
|
103
80
|
rescue
|
|
104
81
|
raise Fog::Errors::Error.new("Error saving the server: #{$!}")
|
|
105
82
|
end
|
|
106
83
|
end
|
|
107
84
|
|
|
85
|
+
#TODO move all of this to the volume class
|
|
108
86
|
def create_or_clone_volume
|
|
109
87
|
|
|
110
|
-
volume_options=Hash.new
|
|
88
|
+
volume_options = Hash.new
|
|
111
89
|
|
|
112
|
-
|
|
113
|
-
volume_options[:name]=self.volume_name
|
|
114
|
-
else
|
|
115
|
-
extension = self.volume_format_type.nil? ? "img" : self.volume_format_type
|
|
116
|
-
volume_name = "#{self.name}.#{extension}"
|
|
117
|
-
volume_options[:name]=volume_name
|
|
118
|
-
end
|
|
90
|
+
volume_options[:name] = volume_name || default_volume_name
|
|
119
91
|
|
|
120
92
|
# Check if a disk template was specified
|
|
121
93
|
unless self.volume_template_name.nil?
|
|
122
94
|
|
|
123
|
-
template_volumes=connection.volumes.all(:name => self.volume_template_name)
|
|
95
|
+
template_volumes = connection.volumes.all(:name => self.volume_template_name)
|
|
124
96
|
|
|
125
|
-
raise Fog::Errors::Error.new("Template #{self.volume_template_name} not found") unless template_volumes.
|
|
97
|
+
raise Fog::Errors::Error.new("Template #{self.volume_template_name} not found") unless template_volumes.empty?
|
|
126
98
|
|
|
127
|
-
orig_volume=template_volumes.first
|
|
128
|
-
|
|
129
|
-
volume=orig_volume.clone("#{volume_options[:name]}")
|
|
99
|
+
orig_volume = template_volumes.first
|
|
100
|
+
volume = orig_volume.clone("#{volume_options[:name]}")
|
|
130
101
|
|
|
102
|
+
# if we cloned it, it has the original volume type.
|
|
103
|
+
self.volume_format_type = orig_volume.format_type
|
|
131
104
|
# This gets passed to the domain to know the path of the disk
|
|
132
|
-
self.volume_path=volume.path
|
|
105
|
+
self.volume_path = volume.path
|
|
133
106
|
|
|
134
107
|
else
|
|
135
108
|
# If no template volume was given, let's create our own volume
|
|
136
109
|
|
|
137
|
-
volume_options[:format_type]=self.volume_format_type
|
|
138
|
-
volume_options[:capacity]=self.volume_capacity
|
|
139
|
-
volume_options[:allocation]=self.volume_allocation
|
|
110
|
+
volume_options[:format_type] = self.volume_format_type if volume_format_type
|
|
111
|
+
volume_options[:capacity] = self.volume_capacity if volume_capacity
|
|
112
|
+
volume_options[:allocation] = self.volume_allocation if volume_allocation
|
|
140
113
|
|
|
141
114
|
begin
|
|
142
|
-
volume=connection.volumes.create(volume_options)
|
|
143
|
-
self.volume_path=volume.path
|
|
144
|
-
self.volume_format_type
|
|
115
|
+
volume = connection.volumes.create(volume_options)
|
|
116
|
+
self.volume_path = volume.path
|
|
117
|
+
self.volume_format_type ||= volume.format_type
|
|
145
118
|
rescue
|
|
146
119
|
raise Fog::Errors::Error.new("Error creating the volume : #{$!}")
|
|
147
120
|
end
|
|
@@ -158,27 +131,27 @@ module Fog
|
|
|
158
131
|
def xml_from_template
|
|
159
132
|
|
|
160
133
|
template_options={
|
|
161
|
-
:cpus
|
|
162
|
-
:memory_size
|
|
163
|
-
:domain_type
|
|
164
|
-
:name
|
|
165
|
-
:iso_file
|
|
166
|
-
:iso_dir
|
|
167
|
-
:os_type
|
|
168
|
-
:arch
|
|
169
|
-
:volume_path
|
|
170
|
-
:volume_format_type
|
|
171
|
-
:network_interface_type =>
|
|
172
|
-
:network_nat_network
|
|
173
|
-
:network_bridge_name
|
|
134
|
+
:cpus => cpus,
|
|
135
|
+
:memory_size => memory_size,
|
|
136
|
+
:domain_type => domain_type,
|
|
137
|
+
:name => name,
|
|
138
|
+
:iso_file => iso_file,
|
|
139
|
+
:iso_dir => iso_dir,
|
|
140
|
+
:os_type => os_type,
|
|
141
|
+
:arch => arch,
|
|
142
|
+
:volume_path => volume_path,
|
|
143
|
+
:volume_format_type => volume_format_type,
|
|
144
|
+
:network_interface_type => network_interface_type,
|
|
145
|
+
:network_nat_network => network_nat_network,
|
|
146
|
+
:network_bridge_name => network_bridge_name
|
|
174
147
|
}
|
|
175
|
-
vars
|
|
176
|
-
template_path=File.join(File.dirname(__FILE__),"templates","server.xml.erb")
|
|
177
|
-
template=File.open(template_path).readlines.join
|
|
178
|
-
erb
|
|
179
|
-
vars_binding
|
|
180
|
-
|
|
181
|
-
|
|
148
|
+
vars = ErbBinding.new(template_options)
|
|
149
|
+
template_path = File.join(File.dirname(__FILE__),"templates","server.xml.erb")
|
|
150
|
+
template = File.open(template_path).readlines.join
|
|
151
|
+
erb = ERB.new(template)
|
|
152
|
+
vars_binding = vars.send(:get_binding)
|
|
153
|
+
|
|
154
|
+
erb.result(vars_binding)
|
|
182
155
|
end
|
|
183
156
|
|
|
184
157
|
def username
|
|
@@ -202,10 +175,14 @@ module Fog
|
|
|
202
175
|
# In fog a destroy means the remove of a machine
|
|
203
176
|
def destroy(options={ :destroy_volumes => false})
|
|
204
177
|
requires :raw
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
end
|
|
178
|
+
poweroff unless stopped?
|
|
179
|
+
#TODO: add handling of failure
|
|
208
180
|
@raw.undefine
|
|
181
|
+
|
|
182
|
+
if options[:destroy_volumes]
|
|
183
|
+
# volumes.all filters do not handle nil keys well
|
|
184
|
+
connection.volumes.all(:path => disk_path).each { |vol| vol.destroy}
|
|
185
|
+
end
|
|
209
186
|
end
|
|
210
187
|
|
|
211
188
|
def reboot
|
|
@@ -215,7 +192,7 @@ module Fog
|
|
|
215
192
|
|
|
216
193
|
# Alias for poweroff
|
|
217
194
|
def halt
|
|
218
|
-
|
|
195
|
+
poweroff
|
|
219
196
|
end
|
|
220
197
|
|
|
221
198
|
# In libvirt a destroy means a hard power-off of the domain
|
|
@@ -250,7 +227,10 @@ module Fog
|
|
|
250
227
|
when 5 then "shutoff"
|
|
251
228
|
when 6 then "crashed"
|
|
252
229
|
end
|
|
253
|
-
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
def stopped?
|
|
233
|
+
state == "shutoff"
|
|
254
234
|
end
|
|
255
235
|
|
|
256
236
|
def ready?
|
|
@@ -259,20 +239,15 @@ module Fog
|
|
|
259
239
|
|
|
260
240
|
def stop
|
|
261
241
|
requires :raw
|
|
262
|
-
|
|
263
242
|
@raw.shutdown
|
|
264
243
|
end
|
|
265
244
|
|
|
266
|
-
#def xml_desc
|
|
267
|
-
#requires :raw
|
|
268
|
-
#raw.xml_desc
|
|
269
|
-
#end
|
|
270
|
-
|
|
271
245
|
# This retrieves the ip address of the mac address
|
|
272
246
|
# It returns an array of public and private ip addresses
|
|
273
247
|
# Currently only one ip address is returned, but in the future this could be multiple
|
|
274
248
|
# if the server has multiple network interface
|
|
275
249
|
#
|
|
250
|
+
#TODO: move this into the util class
|
|
276
251
|
def addresses(options={})
|
|
277
252
|
mac=self.mac
|
|
278
253
|
|
|
@@ -282,7 +257,7 @@ module Fog
|
|
|
282
257
|
ip_command_global=@connection.ip_command.nil? ? 'grep $mac /var/log/arpwatch.log|sed -e "s/new station//"|sed -e "s/changed ethernet address//g" |sed -e "s/reused old ethernet //" |tail -1 |cut -d ":" -f 4-| cut -d " " -f 3' : @connection.ip_command
|
|
283
258
|
ip_command_local=options[:ip_command].nil? ? ip_command_global : options[:ip_command]
|
|
284
259
|
|
|
285
|
-
ip_command="mac=#{mac}; "+ip_command_local
|
|
260
|
+
ip_command="mac=#{mac}; server_name=#{name}; "+ip_command_local
|
|
286
261
|
|
|
287
262
|
ip_address=nil
|
|
288
263
|
|
|
@@ -480,21 +455,20 @@ module Fog
|
|
|
480
455
|
# Retrieves the mac address from parsing the XML of the domain
|
|
481
456
|
def mac
|
|
482
457
|
mac = document("domain/devices/interface/mac", "address")
|
|
483
|
-
return mac
|
|
484
458
|
end
|
|
485
459
|
|
|
486
460
|
def vnc_port
|
|
487
|
-
|
|
488
461
|
port = document("domain/devices/graphics[@type='vnc']", "port")
|
|
489
|
-
return port
|
|
490
462
|
end
|
|
491
463
|
|
|
464
|
+
def disk_path
|
|
465
|
+
document("domain/devices/disk/source", "file")
|
|
466
|
+
rescue
|
|
467
|
+
[]
|
|
468
|
+
end
|
|
492
469
|
|
|
493
470
|
private
|
|
494
|
-
|
|
495
|
-
def raw
|
|
496
|
-
@raw
|
|
497
|
-
end
|
|
471
|
+
attr_reader :raw
|
|
498
472
|
|
|
499
473
|
def raw=(new_raw)
|
|
500
474
|
@raw = new_raw
|
|
@@ -516,13 +490,33 @@ module Fog
|
|
|
516
490
|
merge_attributes(raw_attributes)
|
|
517
491
|
end
|
|
518
492
|
|
|
493
|
+
def randomized_name
|
|
494
|
+
"fog-#{SecureRandom.random_number*10E14.to_i.round}"
|
|
495
|
+
end
|
|
519
496
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
xml = REXML::Document.new(self.xml)
|
|
523
|
-
attribute.nil? ? xml.elements[path].text : xml.elements[path].attributes[attribute]
|
|
497
|
+
def default_iso_dir
|
|
498
|
+
"/var/lib/libvirt/images"
|
|
524
499
|
end
|
|
525
500
|
|
|
501
|
+
def default_volume_name
|
|
502
|
+
"#{name}.#{volume_format_type || 'img'}"
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
def defaults
|
|
506
|
+
{
|
|
507
|
+
:persistent => true,
|
|
508
|
+
:cpus => 1,
|
|
509
|
+
:memory_size => 256 *1024,
|
|
510
|
+
:name => randomized_name,
|
|
511
|
+
:os_type => "hvm",
|
|
512
|
+
:arch => "x86_64",
|
|
513
|
+
:domain_type => "kvm",
|
|
514
|
+
:iso_dir => default_iso_dir ,
|
|
515
|
+
:network_interface_type => "nat",
|
|
516
|
+
:network_nat_network => "default",
|
|
517
|
+
:network_bridge_name => "br0"
|
|
518
|
+
}
|
|
519
|
+
end
|
|
526
520
|
|
|
527
521
|
end
|
|
528
522
|
|
|
@@ -9,7 +9,7 @@ module Fog
|
|
|
9
9
|
# finds a value from xml
|
|
10
10
|
def document path, attribute=nil
|
|
11
11
|
return nil if new?
|
|
12
|
-
xml = REXML::Document.new(
|
|
12
|
+
xml = REXML::Document.new(self.xml)
|
|
13
13
|
attribute.nil? ? xml.elements[path].text : xml.elements[path].attributes[attribute]
|
|
14
14
|
end
|
|
15
15
|
|
|
@@ -19,7 +19,6 @@ module Fog
|
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
|
|
23
22
|
end
|
|
24
23
|
end
|
|
25
24
|
end
|
|
@@ -5,12 +5,20 @@ module Fog
|
|
|
5
5
|
module DNS
|
|
6
6
|
class Rackspace < Fog::Service
|
|
7
7
|
|
|
8
|
+
class CallbackError < Fog::Errors::Error
|
|
9
|
+
attr_reader :response, :message, :details
|
|
10
|
+
def initialize(response)
|
|
11
|
+
@response = response
|
|
12
|
+
@message = response.body['error']['message']
|
|
13
|
+
@details = response.body['error']['details']
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
8
17
|
US_ENDPOINT = 'https://dns.api.rackspacecloud.com/v1.0'
|
|
9
18
|
UK_ENDPOINT = 'https://lon.dns.api.rackspacecloud.com/v1.0'
|
|
10
19
|
|
|
11
20
|
requires :rackspace_api_key, :rackspace_username
|
|
12
|
-
recognizes :rackspace_auth_url
|
|
13
|
-
recognizes :rackspace_auth_token
|
|
21
|
+
recognizes :rackspace_auth_url, :rackspace_auth_token, :rackspace_dns_endpoint
|
|
14
22
|
|
|
15
23
|
model_path 'fog/rackspace/models/dns'
|
|
16
24
|
model :record
|