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
@@ -3,9 +3,9 @@ module Fog
|
|
3
3
|
class Compute
|
4
4
|
class Ip < Fog::Vcloud::Model
|
5
5
|
|
6
|
-
ignore_attributes :xmlns_i, :xmlns
|
7
|
-
|
8
6
|
identity :href, :aliases => :Href
|
7
|
+
attribute :links, :aliases => :Link, :type => :array
|
8
|
+
ignore_attributes :xmlns, :xmlns_i, :xmlns_xsi, :xmlns_xsd
|
9
9
|
|
10
10
|
attribute :name, :aliases => :Name
|
11
11
|
attribute :status, :aliases => :Status
|
@@ -3,61 +3,19 @@ module Fog
|
|
3
3
|
class Compute
|
4
4
|
class Network < Fog::Vcloud::Model
|
5
5
|
|
6
|
-
identity :href
|
7
|
-
|
8
|
-
ignore_attributes :xmlns, :xmlns_xsi, :xmlns_xsd, :xmlns_i, :Configuration, :Id
|
9
|
-
|
10
|
-
attribute :name, :aliases => :Name
|
11
|
-
#attribute :id, :aliases => :Id
|
12
|
-
attribute :features, :aliases => :Features, :type => :array
|
6
|
+
identity :href, :aliases => :Href
|
13
7
|
attribute :links, :aliases => :Link, :type => :array
|
14
|
-
|
15
|
-
attribute :gateway, :aliases => :GatewayAddress
|
16
|
-
attribute :broadcast, :aliases => :BroadcastAddress
|
17
|
-
attribute :address, :aliases => :Address
|
18
|
-
attribute :extension_href, :aliases => :Href
|
19
|
-
attribute :network_type, :aliases => :NetworkType
|
20
|
-
attribute :vlan, :aliases => :Vlan
|
21
|
-
attribute :friendly_name, :aliases => :FriendlyName
|
22
|
-
|
23
|
-
def ips
|
24
|
-
load_unless_loaded!
|
25
|
-
Fog::Vcloud::Compute::Ips.new( :connection => connection,
|
26
|
-
:href => links.detect { |link| link[:name] == "IP Addresses" }[:href] )
|
27
|
-
end
|
28
|
-
|
29
|
-
def save
|
30
|
-
if @changed
|
31
|
-
connection.configure_network( extension_href, _compose_network_data )
|
32
|
-
end
|
33
|
-
true
|
34
|
-
end
|
8
|
+
ignore_attributes :xmlns, :xmlns_i, :xmlns_xsi, :xmlns_xsd
|
35
9
|
|
36
|
-
|
37
|
-
super
|
38
|
-
merge_attributes(extension_data.body)
|
39
|
-
self
|
40
|
-
end
|
41
|
-
|
42
|
-
private
|
43
|
-
|
44
|
-
def extension_data
|
45
|
-
connection.get_network_extensions( extensions_link[:href] )
|
46
|
-
end
|
10
|
+
attribute :name, :aliases => :Name
|
47
11
|
|
48
|
-
|
49
|
-
|
50
|
-
|
12
|
+
attribute :description, :aliases => :Description
|
13
|
+
attribute :configuration, :aliases => :Configuration
|
14
|
+
attribute :provider_info, :aliases => :ProviderInfo
|
51
15
|
|
52
|
-
def
|
53
|
-
|
54
|
-
|
55
|
-
:href => extension_href,
|
56
|
-
:name => name,
|
57
|
-
:address => address,
|
58
|
-
:broadcast => broadcast,
|
59
|
-
:gateway => gateway
|
60
|
-
}
|
16
|
+
def parent_network
|
17
|
+
return nil if configuration[:ParentNetwork].nil?
|
18
|
+
@parent_network ||= connection.get_network(configuration[:ParentNetwork][:href])
|
61
19
|
end
|
62
20
|
end
|
63
21
|
end
|
@@ -14,20 +14,34 @@ module Fog
|
|
14
14
|
|
15
15
|
def all
|
16
16
|
self.href = connection.default_vdc_href unless self.href
|
17
|
-
|
18
|
-
if
|
19
|
-
|
17
|
+
data = nil
|
18
|
+
if self.href =~ /\/vdc\//
|
19
|
+
check_href!("Vdc")
|
20
|
+
data = [connection.get_vdc(self.href).available_networks].flatten.compact.reject{|n| n == '' }
|
21
|
+
elsif self.href =~ /\/org\//
|
22
|
+
check_href!("Org")
|
23
|
+
data = connection.get_organization(self.href).links.select{|l| l[:type] == network_type_id }
|
24
|
+
elsif self.href =~ /\/vApp\//
|
25
|
+
check_href!("Vapp")
|
26
|
+
data = [(connection.get_vapp(self.href).network_configs||{})[:NetworkConfig]].flatten.compact.collect{|n| n[:Configuration][:ParentNetwork] unless n[:Configuration].nil? }.compact
|
20
27
|
end
|
28
|
+
load([*data]) unless data.nil?
|
21
29
|
end
|
22
30
|
|
23
31
|
def get(uri)
|
24
|
-
|
25
|
-
|
26
|
-
end
|
27
|
-
rescue Fog::Errors::NotFound
|
32
|
+
connection.get_network(uri)
|
33
|
+
rescue Fog::Errors::NotFound
|
28
34
|
nil
|
29
35
|
end
|
30
36
|
|
37
|
+
private
|
38
|
+
def network_type_id
|
39
|
+
if connection.version == '1.0'
|
40
|
+
'application/vnd.vmware.vcloud.network+xml'
|
41
|
+
else
|
42
|
+
'application/vnd.vmware.vcloud.orgNetwork+xml'
|
43
|
+
end
|
44
|
+
end
|
31
45
|
end
|
32
46
|
end
|
33
47
|
end
|
@@ -1,58 +1,57 @@
|
|
1
|
+
require 'fog/vcloud/models/compute/helpers/status'
|
1
2
|
module Fog
|
2
3
|
module Vcloud
|
3
4
|
class Compute
|
4
5
|
class Server < Fog::Vcloud::Model
|
5
6
|
|
6
|
-
|
7
|
+
include Fog::Vcloud::Compute::Helpers::Status
|
7
8
|
|
9
|
+
identity :href, :aliases => :Href
|
10
|
+
attribute :links, :aliases => :Link, :type => :array
|
8
11
|
ignore_attributes :xmlns, :xmlns_i, :xmlns_xsi, :xmlns_xsd
|
9
12
|
|
10
13
|
attribute :type
|
11
14
|
attribute :name
|
12
15
|
attribute :status
|
13
|
-
attribute :
|
14
|
-
attribute :os, :aliases => :OperatingSystemSection
|
15
|
-
attribute :virtual_hardware, :aliases => :VirtualHardwareSection
|
16
|
+
attribute :deployed, :type => :boolean
|
16
17
|
attribute :description, :aliases => :Description
|
17
|
-
|
18
|
-
attribute :
|
18
|
+
|
19
|
+
attribute :vapp_scoped_local_id, :aliases => :VAppScopedLocalId
|
20
|
+
|
21
|
+
attribute :network_connections, :aliases => :NetworkConnectionSection, :squash => :NetworkConnection
|
22
|
+
attribute :virtual_hardware, :aliases => :'ovf:VirtualHardwareSection', :squash => :'ovf:Item'
|
23
|
+
|
24
|
+
attribute :guest_customization, :aliases => :GuestCustomizationSection
|
25
|
+
attribute :operating_system, :aliases => :'ovf:OperatingSystemSection'
|
26
|
+
|
19
27
|
attribute :tasks, :aliases => :Tasks, :type => :array
|
20
28
|
|
21
|
-
|
29
|
+
has_up :vapp
|
22
30
|
|
23
|
-
def
|
31
|
+
def computer_name
|
24
32
|
load_unless_loaded!
|
25
|
-
|
33
|
+
self.guest_customization[:ComputerName]
|
26
34
|
end
|
27
35
|
|
28
|
-
def
|
36
|
+
def os_desc
|
29
37
|
load_unless_loaded!
|
30
|
-
|
31
|
-
when '0'
|
32
|
-
'creating'
|
33
|
-
when '8'
|
34
|
-
'off'
|
35
|
-
when '4'
|
36
|
-
'on'
|
37
|
-
else
|
38
|
-
'unkown'
|
39
|
-
end
|
38
|
+
self.operating_system[:'ovf:Description']
|
40
39
|
end
|
41
40
|
|
42
|
-
def
|
43
|
-
|
44
|
-
|
45
|
-
status != '0' && !running_tasks # 0 is provisioning, and no running tasks
|
41
|
+
def os_type
|
42
|
+
load_unless_loaded!
|
43
|
+
self.operating_system[:vmw_osType]
|
46
44
|
end
|
47
45
|
|
48
|
-
def
|
49
|
-
|
50
|
-
|
46
|
+
def ip_addresses
|
47
|
+
load_unless_loaded!
|
48
|
+
[self.network_connections].flatten.collect{|n| n[:IpAddress] }
|
51
49
|
end
|
52
50
|
|
53
|
-
def
|
51
|
+
def ready?
|
54
52
|
reload_status # always ensure we have the correct status
|
55
|
-
status == '
|
53
|
+
running_tasks = tasks && tasks.flatten.any? {|ti| ti.kind_of?(Hash) && ti[:status] == 'running' }
|
54
|
+
status != '0' && !running_tasks # 0 is provisioning, and no running tasks
|
56
55
|
end
|
57
56
|
|
58
57
|
def power_on
|
@@ -83,11 +82,6 @@ module Fog
|
|
83
82
|
power_on
|
84
83
|
end
|
85
84
|
|
86
|
-
def vm
|
87
|
-
load_unless_loaded!
|
88
|
-
self.vm_data
|
89
|
-
end
|
90
|
-
|
91
85
|
def name=(new_name)
|
92
86
|
attributes[:name] = new_name
|
93
87
|
@changed = true
|
@@ -120,7 +114,7 @@ module Fog
|
|
120
114
|
|
121
115
|
def disks
|
122
116
|
disk_mess.map do |dm|
|
123
|
-
{ :number => dm[:"rasd:AddressOnParent"], :size => dm[:"rasd:
|
117
|
+
{ :number => dm[:"rasd:AddressOnParent"].to_i, :size => dm[:"rasd:HostResource"][:vcloud_capacity].to_i, :resource => dm[:"rasd:HostResource"], :disk_data => dm }
|
124
118
|
end
|
125
119
|
end
|
126
120
|
|
@@ -187,12 +181,12 @@ module Fog
|
|
187
181
|
vh[:'rasd:ResourceType'] == '17' &&
|
188
182
|
vh[:'rasd:AddressOnParent'].to_s == @remove_disk.to_s
|
189
183
|
end
|
190
|
-
connection.configure_vm_disks(
|
184
|
+
connection.configure_vm_disks(self.href, data)
|
191
185
|
end
|
192
186
|
if @disk_change == :added
|
193
187
|
data = disk_mess
|
194
188
|
data << @add_disk
|
195
|
-
connection.configure_vm_disks(
|
189
|
+
connection.configure_vm_disks(self.href, data)
|
196
190
|
end
|
197
191
|
if @name_changed || @description_changed
|
198
192
|
edit_uri = links.select {|i| i[:rel] == 'edit'}
|
@@ -216,14 +210,6 @@ module Fog
|
|
216
210
|
end
|
217
211
|
alias :delete :destroy
|
218
212
|
|
219
|
-
def vm_href
|
220
|
-
load_unless_loaded!
|
221
|
-
#require 'pp'
|
222
|
-
#pp vm_data
|
223
|
-
#vm_data[0][:Link].select {|v| v[:rel] == 'edit'}[0][:href]
|
224
|
-
vm_data.kind_of?(Array)? vm_data[0][:href] : vm_data[:href]
|
225
|
-
end
|
226
|
-
|
227
213
|
private
|
228
214
|
|
229
215
|
def reset_tracking
|
@@ -242,29 +228,24 @@ module Fog
|
|
242
228
|
}
|
243
229
|
end
|
244
230
|
|
245
|
-
def virtual_hardware_section
|
246
|
-
load_unless_loaded!
|
247
|
-
vm[0][:"ovf:VirtualHardwareSection"][:"ovf:Item"]
|
248
|
-
end
|
249
|
-
|
250
231
|
def memory_mess
|
251
232
|
load_unless_loaded!
|
252
|
-
if
|
253
|
-
|
233
|
+
if virtual_hardware
|
234
|
+
virtual_hardware.detect { |item| item[:"rasd:ResourceType"] == "4" }
|
254
235
|
end
|
255
236
|
end
|
256
237
|
|
257
238
|
def cpu_mess
|
258
239
|
load_unless_loaded!
|
259
|
-
if
|
260
|
-
|
240
|
+
if virtual_hardware
|
241
|
+
virtual_hardware.detect { |item| item[:"rasd:ResourceType"] == "3" }
|
261
242
|
end
|
262
243
|
end
|
263
244
|
|
264
245
|
def disk_mess
|
265
246
|
load_unless_loaded!
|
266
|
-
if
|
267
|
-
|
247
|
+
if virtual_hardware
|
248
|
+
virtual_hardware.select { |item| item[:"rasd:ResourceType"] == "17" }
|
268
249
|
else
|
269
250
|
[]
|
270
251
|
end
|
@@ -282,9 +263,8 @@ module Fog
|
|
282
263
|
end
|
283
264
|
|
284
265
|
def reload_status
|
285
|
-
self.status = connection.get_vapp(href).
|
266
|
+
self.status = connection.get_vapp(href).status
|
286
267
|
end
|
287
|
-
|
288
268
|
end
|
289
269
|
end
|
290
270
|
end
|
@@ -13,16 +13,13 @@ module Fog
|
|
13
13
|
attribute :href, :aliases => :Href
|
14
14
|
|
15
15
|
def all
|
16
|
-
check_href!(
|
17
|
-
|
16
|
+
check_href!("Vapp")
|
17
|
+
vapp.load_unless_loaded!
|
18
|
+
load(vapp.children||[])
|
18
19
|
end
|
19
20
|
|
20
21
|
def get(uri)
|
21
|
-
|
22
|
-
# If no tasks returned, set a mock entry to flush on reload
|
23
|
-
data.body[:Tasks] = {} unless data.body[:Tasks]
|
24
|
-
new(data.body)
|
25
|
-
end
|
22
|
+
connection.get_vapp(uri)
|
26
23
|
rescue Fog::Errors::NotFound
|
27
24
|
nil
|
28
25
|
end
|
@@ -37,19 +34,16 @@ module Fog
|
|
37
34
|
|
38
35
|
private
|
39
36
|
|
40
|
-
def
|
41
|
-
|
42
|
-
resource_entities[:ResourceEntity]
|
43
|
-
end
|
37
|
+
def vapp
|
38
|
+
@vapp ||= (attributes[:vapp] || init_vapp)
|
44
39
|
end
|
45
40
|
|
46
|
-
def
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
end
|
41
|
+
def init_vapp
|
42
|
+
Fog::Vcloud::Compute::Vapp.new(
|
43
|
+
:connection => connection,
|
44
|
+
:href => self.href,
|
45
|
+
:collection => Fog::Vcloud::Compute::Vapps.new(:connection => connection)
|
46
|
+
)
|
53
47
|
end
|
54
48
|
|
55
49
|
end
|
@@ -3,20 +3,24 @@ module Fog
|
|
3
3
|
class Compute
|
4
4
|
class Vdc < Fog::Vcloud::Model
|
5
5
|
|
6
|
-
identity :href
|
7
|
-
|
8
|
-
ignore_attributes :xmlns, :xmlns_xsi, :xmlns_xsd
|
6
|
+
identity :href, :aliases => :Href
|
7
|
+
attribute :links, :aliases => :Link, :type => :array
|
8
|
+
ignore_attributes :xmlns, :xmlns_i, :xmlns_xsi, :xmlns_xsd
|
9
9
|
|
10
10
|
attribute :name
|
11
11
|
attribute :type
|
12
12
|
attribute :description, :aliases => :Description
|
13
|
-
attribute :
|
13
|
+
attribute :network_quota, :aliases => :NetworkQuota, :type => :integer
|
14
|
+
attribute :nic_quota, :aliases => :NicQuota, :type => :integer
|
15
|
+
attribute :vm_quota, :aliases => :VmQuota, :type => :integer
|
16
|
+
attribute :is_enabled, :aliases => :IsEnabled, :type => :boolean
|
14
17
|
attribute :compute_capacity, :aliases => :ComputeCapacity
|
15
18
|
attribute :storage_capacity, :aliases => :StorageCapacity
|
16
19
|
attribute :available_networks, :aliases => :AvailableNetworks, :squash => :Network
|
20
|
+
|
17
21
|
attribute :resource_entities, :aliases => :ResourceEntities, :squash => :ResourceEntity
|
18
|
-
|
19
|
-
|
22
|
+
|
23
|
+
has_up :organization
|
20
24
|
|
21
25
|
def networks
|
22
26
|
@networks ||= Fog::Vcloud::Compute::Networks.
|
@@ -24,32 +28,13 @@ module Fog
|
|
24
28
|
:href => href )
|
25
29
|
end
|
26
30
|
|
27
|
-
def
|
28
|
-
@
|
31
|
+
def vapps
|
32
|
+
@vapps ||= Fog::Vcloud::Compute::Vapps.
|
29
33
|
new( :connection => connection,
|
30
|
-
:href => href
|
34
|
+
:href => href
|
35
|
+
)
|
31
36
|
end
|
32
37
|
|
33
|
-
def tasks
|
34
|
-
@tasks ||= Fog::Vcloud::Compute::Tasks.
|
35
|
-
new( :connection => connection,
|
36
|
-
:href => href + "/tasksList" )
|
37
|
-
end
|
38
|
-
|
39
|
-
private
|
40
|
-
|
41
|
-
def collection_based_on_type(type, klass = nil)
|
42
|
-
load_unless_loaded!
|
43
|
-
test_links = other_links.kind_of?(Array) ? other_links : [other_links]
|
44
|
-
if link = test_links.detect { |link| link[:type] == type }
|
45
|
-
case type
|
46
|
-
when "application/vnd.vmware.vcloud.catalog+xml"
|
47
|
-
Fog::Vcloud::Compute::Catalog
|
48
|
-
end.new( :connection => connection, :href => link[:href] )
|
49
|
-
else
|
50
|
-
[ ]
|
51
|
-
end
|
52
|
-
end
|
53
38
|
end
|
54
39
|
end
|
55
40
|
end
|