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.
Files changed (229) hide show
  1. data/.gitignore +1 -1
  2. data/brightbox-cli.gemspec +10 -9
  3. data/lib/brightbox-cli/commands/servers-activate-console.rb +1 -1
  4. data/lib/brightbox-cli/commands/types-show.rb +5 -4
  5. data/lib/brightbox-cli/config.rb +1 -1
  6. data/lib/brightbox-cli/detailed_server.rb +2 -1
  7. data/lib/brightbox-cli/gli_global_hooks.rb +1 -8
  8. data/lib/brightbox-cli/server_groups.rb +4 -0
  9. data/lib/brightbox-cli/servers.rb +5 -13
  10. data/lib/brightbox-cli/types.rb +1 -1
  11. data/lib/brightbox-cli/vendor/fog/.gitignore +1 -0
  12. data/lib/brightbox-cli/vendor/fog/README.rdoc +1 -1
  13. data/lib/brightbox-cli/vendor/fog/Rakefile +4 -3
  14. data/lib/brightbox-cli/vendor/fog/changelog.txt +213 -0
  15. data/lib/brightbox-cli/vendor/fog/docs/compute/index.markdown +15 -1
  16. data/lib/brightbox-cli/vendor/fog/docs/index.markdown +1 -1
  17. data/lib/brightbox-cli/vendor/fog/docs/storage/index.markdown +4 -4
  18. data/lib/brightbox-cli/vendor/fog/examples/compute_tests.rb +18 -6
  19. data/lib/brightbox-cli/vendor/fog/examples/dns_tests.rb +1 -1
  20. data/lib/brightbox-cli/vendor/fog/examples/storage_tests.rb +1 -1
  21. data/lib/brightbox-cli/vendor/fog/fog.gemspec +4 -3
  22. data/lib/brightbox-cli/vendor/fog/lib/fog.rb +1 -1
  23. data/lib/brightbox-cli/vendor/fog/lib/fog/aws.rb +16 -1
  24. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/auto_scaling.rb +2 -17
  25. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_formation.rb +1 -16
  26. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_watch.rb +2 -17
  27. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/compute.rb +10 -21
  28. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/elasticache.rb +1 -7
  29. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/elb.rb +34 -24
  30. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/emr.rb +5 -4
  31. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/iam.rb +16 -1
  32. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/auto_scaling/group.rb +2 -2
  33. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/metric_statistic.rb +1 -2
  34. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/security_group.rb +3 -3
  35. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/security_groups.rb +25 -0
  36. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/server.rb +4 -1
  37. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/dns/records.rb +3 -3
  38. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elb/listener.rb +9 -7
  39. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elb/load_balancer.rb +6 -0
  40. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/storage/directory.rb +21 -0
  41. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/storage/file.rb +19 -5
  42. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/storage/files.rb +4 -4
  43. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_instances.rb +2 -2
  44. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_security_groups.rb +2 -2
  45. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/sqs/receive_message.rb +1 -1
  46. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/rds.rb +41 -18
  47. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_security_group.rb +6 -4
  48. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_tags.rb +3 -2
  49. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_availability_zones.rb +3 -0
  50. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_security_groups.rb +2 -0
  51. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_app_cookie_stickiness_policy.rb +2 -0
  52. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_lb_cookie_stickiness_policy.rb +3 -1
  53. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_load_balancer.rb +7 -2
  54. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb +10 -1
  55. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/delete_load_balancer_policy.rb +1 -1
  56. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/describe_load_balancers.rb +5 -1
  57. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/set_load_balancer_listener_ssl_certificate.rb +27 -0
  58. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/set_load_balancer_policies_of_listener.rb +1 -1
  59. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/run_job_flow.rb +9 -7
  60. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/add_user_to_group.rb +24 -0
  61. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/create_access_key.rb +24 -0
  62. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/create_group.rb +21 -0
  63. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/create_user.rb +21 -0
  64. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/delete_access_key.rb +17 -0
  65. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/delete_group.rb +19 -0
  66. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/delete_user.rb +17 -0
  67. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/delete_user_policy.rb +16 -0
  68. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_access_keys.rb +21 -0
  69. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_groups.rb +18 -0
  70. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_groups_for_user.rb +24 -0
  71. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_user_policies.rb +18 -0
  72. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_users.rb +17 -0
  73. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/put_user_policy.rb +18 -0
  74. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/remove_user_from_group.rb +19 -0
  75. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/upload_server_certificate.rb +1 -1
  76. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb +30 -1
  77. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/create_db_instance.rb +67 -1
  78. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/create_db_security_group.rb +19 -1
  79. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/delete_db_instance.rb +19 -3
  80. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/delete_db_security_group.rb +11 -1
  81. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/describe_db_instances.rb +56 -1
  82. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/describe_db_reserved_instances.rb +1 -1
  83. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/describe_db_security_groups.rb +44 -2
  84. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/modify_db_instance.rb +26 -1
  85. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/reboot_db_instance.rb +17 -1
  86. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb +27 -1
  87. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/change_message_visibility.rb +1 -1
  88. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/delete_message.rb +1 -1
  89. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/receive_message.rb +13 -14
  90. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/copy_object.rb +14 -6
  91. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/delete_object.rb +73 -2
  92. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket.rb +3 -2
  93. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +95 -2
  94. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_versioning.rb +32 -0
  95. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object.rb +27 -1
  96. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_http_url.rb +4 -3
  97. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_https_url.rb +4 -3
  98. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_bucket_versioning.rb +41 -0
  99. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_bucket_website.rb +17 -0
  100. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_object.rb +25 -9
  101. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/ses.rb +2 -7
  102. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/simpledb.rb +4 -17
  103. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sns.rb +1 -14
  104. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sqs.rb +5 -11
  105. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/storage.rb +6 -22
  106. data/lib/brightbox-cli/vendor/fog/lib/fog/bin.rb +2 -0
  107. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/aws.rb +9 -1
  108. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/voxel.rb +1 -1
  109. data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server.rb +1 -0
  110. data/lib/brightbox-cli/vendor/fog/lib/fog/compute.rb +6 -0
  111. data/lib/brightbox-cli/vendor/fog/lib/fog/compute/models/server.rb +11 -0
  112. data/lib/brightbox-cli/vendor/fog/lib/fog/core.rb +0 -1
  113. data/lib/brightbox-cli/vendor/fog/lib/fog/core/connection.rb +0 -1
  114. data/lib/brightbox-cli/vendor/fog/lib/fog/core/errors.rb +5 -0
  115. data/lib/brightbox-cli/vendor/fog/lib/fog/core/scp.rb +18 -2
  116. data/lib/brightbox-cli/vendor/fog/lib/fog/core/wait_for.rb +1 -1
  117. data/lib/brightbox-cli/vendor/fog/lib/fog/dnsmadeeasy/dns.rb +1 -1
  118. data/lib/brightbox-cli/vendor/fog/lib/fog/dynect/models/dns/records.rb +2 -2
  119. data/lib/brightbox-cli/vendor/fog/lib/fog/dynect/requests/dns/get_node_list.rb +2 -1
  120. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/compute.rb +1 -1
  121. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/add_backup_internet_service.rb +1 -1
  122. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/add_internet_service.rb +2 -2
  123. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/add_node.rb +1 -1
  124. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/clone_vapp.rb +1 -1
  125. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/configure_internet_service.rb +1 -1
  126. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/configure_network.rb +1 -1
  127. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/configure_network_ip.rb +1 -1
  128. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/configure_vapp.rb +1 -1
  129. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/instantiate_vapp_template.rb +1 -1
  130. data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/compute.rb +7 -3
  131. data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/nodes.rb +1 -3
  132. data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/server.rb +93 -99
  133. data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/servers.rb +2 -1
  134. data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/util.rb +1 -2
  135. data/lib/brightbox-cli/vendor/fog/lib/fog/providers.rb +2 -0
  136. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/dns.rb +10 -2
  137. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/load_balancers.rb +3 -0
  138. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/compute/flavor.rb +2 -0
  139. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/compute/server.rb +2 -2
  140. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/callback.rb +3 -1
  141. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/record.rb +4 -0
  142. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/load_balancers/load_balancer.rb +18 -8
  143. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/storage/directory.rb +5 -1
  144. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/compute/create_image.rb +1 -3
  145. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/load_balancers/delete_nodes.rb +1 -2
  146. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/load_balancers/list_load_balancers.rb +8 -2
  147. data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/compute.rb +1 -1
  148. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/compute.rb +91 -30
  149. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/catalog.rb +1 -1
  150. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/catalog_item.rb +1 -1
  151. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/catalogs.rb +5 -8
  152. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/ip.rb +2 -2
  153. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/network.rb +9 -51
  154. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/networks.rb +21 -7
  155. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/server.rb +38 -58
  156. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/servers.rb +12 -18
  157. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/task.rb +1 -1
  158. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/tasks.rb +1 -3
  159. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/vdc.rb +14 -29
  160. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/models/compute/vdcs.rb +6 -11
  161. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/clone_vapp.rb +1 -1
  162. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/configure_network.rb +1 -1
  163. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/configure_network_ip.rb +1 -1
  164. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/configure_vapp.rb +1 -1
  165. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/configure_vm.rb +1 -1
  166. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb +1 -1
  167. data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud/requests/compute/login.rb +8 -4
  168. data/lib/brightbox-cli/vendor/fog/lib/fog/virtual_box/compute.rb +4 -0
  169. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/compute.rb +1 -0
  170. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/models/compute/server.rb +7 -1
  171. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +86 -86
  172. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/vm_clone.rb +43 -8
  173. data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/models/dns/record.rb +7 -5
  174. data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/update_host.rb +2 -2
  175. data/lib/brightbox-cli/vendor/fog/spec/ecloud/spec_helper.rb +1 -1
  176. data/lib/brightbox-cli/vendor/fog/tests/aws/models/elb/model_tests.rb +15 -6
  177. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/instance_tests.rb +37 -0
  178. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/security_group_tests.rb +6 -4
  179. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elb/helper.rb +33 -0
  180. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elb/listener_tests.rb +22 -4
  181. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elb/policy_tests.rb +13 -0
  182. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/access_key_tests.rb +2 -7
  183. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/group_tests.rb +1 -4
  184. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/user_policy_tests.rb +4 -11
  185. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/user_tests.rb +19 -12
  186. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/rds/helper.rb +38 -3
  187. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/rds/instance_tests.rb +3 -1
  188. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/bucket_tests.rb +66 -1
  189. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/account_tests.rb +3 -3
  190. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/api_client_tests.rb +6 -6
  191. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/cloud_ip_tests.rb +15 -9
  192. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/helper.rb +6 -2
  193. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/image_tests.rb +2 -2
  194. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/interface_tests.rb +1 -1
  195. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/load_balancer_tests.rb +9 -9
  196. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_group_tests.rb +8 -8
  197. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_tests.rb +17 -13
  198. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_type_tests.rb +2 -2
  199. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/user_tests.rb +3 -3
  200. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/zone_tests.rb +2 -2
  201. data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/helper.rb +87 -64
  202. data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/ip_tests.rb +1 -1
  203. data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/server_tests.rb +4 -4
  204. data/lib/brightbox-cli/vendor/fog/tests/helpers/formats_helper.rb +1 -1
  205. data/lib/brightbox-cli/vendor/fog/tests/helpers/mock_helper.rb +2 -0
  206. data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/dns_tests.rb +4 -2
  207. data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/load_balancers/helper.rb +27 -11
  208. data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/load_balancers/load_balancer_tests.rb +4 -1
  209. data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/load_balancers/node_tests.rb +24 -25
  210. data/lib/brightbox-cli/vendor/fog/tests/slicehost/requests/compute/slice_tests.rb +2 -2
  211. data/lib/brightbox-cli/vendor/fog/tests/storm_on_demand/requests/compute/server_tests.rb +3 -3
  212. data/lib/brightbox-cli/vendor/fog/tests/vcloud/models/compute/servers_tests.rb +18 -90
  213. data/lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_clone_tests.rb +16 -4
  214. data/lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_power_on_tests.rb +1 -1
  215. data/lib/brightbox-cli/version.rb +1 -1
  216. data/spec/cloud_ips_spec.rb +1 -1
  217. data/spec/fixtures/vcr_cassettes/list_cloud_ip.yml +58 -26
  218. data/spec/fixtures/vcr_cassettes/server_show.yml +143 -102
  219. data/spec/servers_spec.rb +3 -2
  220. data/spec/spec_helper.rb +4 -0
  221. metadata +128 -213
  222. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/access_list_tests.rb +0 -12
  223. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/access_lists_tests.rb +0 -12
  224. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/load_balancer_tests.rb +0 -116
  225. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/load_balancers_tests.rb +0 -19
  226. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/node_tests.rb +0 -19
  227. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/nodes_tests.rb +0 -12
  228. data/lib/brightbox-cli/vendor/fog/tests/rackspace/models/virtual_ip_tests.rb +0 -16
  229. 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
- attribute :type
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
- def reload
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
- def extensions_link
49
- links.detect { |link| link[:name] == name }
50
- end
12
+ attribute :description, :aliases => :Description
13
+ attribute :configuration, :aliases => :Configuration
14
+ attribute :provider_info, :aliases => :ProviderInfo
51
15
 
52
- def _compose_network_data
53
- {
54
- :id => id,
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
- check_href!("Vdc")
18
- if data = connection.get_vdc(href).body[:AvailableNetworks][:Network]
19
- load(data)
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
- if data = connection.get_network(uri)
25
- new(data.body)
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
- identity :href, :aliases => :Href
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 :network_connections, :aliases => :NetworkConnectionSection, :squash => :NetworkConnection
14
- attribute :os, :aliases => :OperatingSystemSection
15
- attribute :virtual_hardware, :aliases => :VirtualHardwareSection
16
+ attribute :deployed, :type => :boolean
16
17
  attribute :description, :aliases => :Description
17
- attribute :storage_size, :aliases => :size
18
- attribute :links, :aliases => :Link, :type => :array
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
- attribute :vm_data, :aliases => :Children, :squash => :Vm
29
+ has_up :vapp
22
30
 
23
- def ip_address
31
+ def computer_name
24
32
  load_unless_loaded!
25
- vm[0][:NetworkConnectionSection][:NetworkConnection][:IpAddress]
33
+ self.guest_customization[:ComputerName]
26
34
  end
27
35
 
28
- def friendly_status
36
+ def os_desc
29
37
  load_unless_loaded!
30
- case status
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 ready?
43
- reload_status # always ensure we have the correct status
44
- running_tasks = tasks && tasks.flatten.any? {|ti| ti.kind_of?(Hash) && ti[:status] == 'running' }
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 on?
49
- reload_status # always ensure we have the correct status
50
- status == '4'
46
+ def ip_addresses
47
+ load_unless_loaded!
48
+ [self.network_connections].flatten.collect{|n| n[:IpAddress] }
51
49
  end
52
50
 
53
- def off?
51
+ def ready?
54
52
  reload_status # always ensure we have the correct status
55
- status == '8'
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:VirtualQuantity"].to_i, :resource => dm[:"rasd:HostResource"] }
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(vm_href, data)
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(vm_href, data)
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 virtual_hardware_section
253
- virtual_hardware_section.detect { |item| item[:"rasd:ResourceType"] == "4" }
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 virtual_hardware_section
260
- virtual_hardware_section.detect { |item| item[:"rasd:ResourceType"] == "3" }
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 virtual_hardware_section
267
- virtual_hardware_section.select { |item| item[:"rasd:ResourceType"] == "17" }
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).body[:status]
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!(:parent => "Vdc")
17
- load(_vapps)
16
+ check_href!("Vapp")
17
+ vapp.load_unless_loaded!
18
+ load(vapp.children||[])
18
19
  end
19
20
 
20
21
  def get(uri)
21
- if data = connection.get_vapp(uri)
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 _resource_entities
41
- if Hash === resource_entities = connection.get_vdc(href).body[:ResourceEntities]
42
- resource_entities[:ResourceEntity]
43
- end
37
+ def vapp
38
+ @vapp ||= (attributes[:vapp] || init_vapp)
44
39
  end
45
40
 
46
- def _vapps
47
- resource_entities = _resource_entities
48
- if resource_entities.nil?
49
- []
50
- else
51
- resource_entities.select {|re| re[:type] == 'application/vnd.vmware.vcloud.vApp+xml' }
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
@@ -4,7 +4,7 @@ module Fog
4
4
  class Task < Fog::Vcloud::Model
5
5
 
6
6
  identity :href, :aliases => :Href
7
-
7
+ attribute :links, :aliases => :Link, :type => :array
8
8
  ignore_attributes :xmlns, :xmlns_i, :xmlns_xsi, :xmlns_xsd
9
9
 
10
10
  attribute :status
@@ -19,9 +19,7 @@ module Fog
19
19
  end
20
20
 
21
21
  def get(uri)
22
- if data = connection.get_task(uri)
23
- new(data.body)
24
- end
22
+ connection.get_task(uri)
25
23
  rescue Fog::Errors::NotFound
26
24
  nil
27
25
  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 :other_links, :aliases => :Link
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
- attribute :deployed_vm_quota
19
- attribute :instantiated_vm_quota
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 servers
28
- @servers ||= Fog::Vcloud::Compute::Servers.
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