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
@@ -56,20 +56,7 @@ module Fog
56
56
  @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
57
57
 
58
58
  options[:region] ||= 'us-east-1'
59
- @host = options[:host] || case options[:region]
60
- when 'ap-southeast-1'
61
- 'sns.ap-southeast-1.amazonaws.com'
62
- when 'eu-west-1'
63
- 'sns.eu-west-1.amazonaws.com'
64
- when 'us-east-1'
65
- 'sns.us-east-1.amazonaws.com'
66
- when 'us-west-1'
67
- 'sns.us-west-1.amazonaws.com'
68
- when 'us-west-2'
69
- 'sns.us-west-2.amazonaws.com'
70
- else
71
- raise ArgumentError, "Unknown region: #{options[:region].inspect}"
72
- end
59
+ @host = options[:host] || "sns.#{options[:region]}.amazonaws.com"
73
60
 
74
61
  @path = options[:path] || '/'
75
62
  @persistent = options[:persistent] || false
@@ -5,7 +5,7 @@ module Fog
5
5
  class SQS < Fog::Service
6
6
 
7
7
  requires :aws_access_key_id, :aws_secret_access_key
8
- recognizes :region, :host, :path, :port, :scheme, :persistent
8
+ recognizes :region, :host, :path, :port, :scheme, :persistent, :aws_session_token
9
9
 
10
10
  request_path 'fog/aws/requests/sqs'
11
11
  request :change_message_visibility
@@ -71,29 +71,22 @@ module Fog
71
71
  #
72
72
  # ==== Parameters
73
73
  # * options<~Hash> - config arguments for connection. Defaults to {}.
74
- # * region<~String> - optional region to use, in ['eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'ap-southeast-1']
74
+ # * region<~String> - optional region to use. For instance, 'eu-west-1', 'us-east-1' and etc.
75
75
  #
76
76
  # ==== Returns
77
77
  # * SQS object with connection to AWS.
78
78
  def initialize(options={})
79
79
  @aws_access_key_id = options[:aws_access_key_id]
80
80
  @aws_secret_access_key = options[:aws_secret_access_key]
81
+ @aws_session_token = options[:aws_session_token]
81
82
  @connection_options = options[:connection_options] || {}
82
83
  @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
83
84
  options[:region] ||= 'us-east-1'
84
85
  @host = options[:host] || case options[:region]
85
- when 'ap-southeast-1'
86
- 'ap-southeast-1.queue.amazonaws.com'
87
- when 'eu-west-1'
88
- 'eu-west-1.queue.amazonaws.com'
89
86
  when 'us-east-1'
90
87
  'queue.amazonaws.com'
91
- when 'us-west-1'
92
- 'us-west-1.queue.amazonaws.com'
93
- when 'us-west-2'
94
- 'us-west-2.queue.amazonaws.com'
95
88
  else
96
- raise ArgumentError, "Unknown region: #{options[:region].inspect}"
89
+ "#{options[:region]}.queue.amazonaws.com"
97
90
  end
98
91
  @path = options[:path] || '/'
99
92
  @persistent = options[:persistent] || false
@@ -121,6 +114,7 @@ module Fog
121
114
  params,
122
115
  {
123
116
  :aws_access_key_id => @aws_access_key_id,
117
+ :aws_session_token => @aws_session_token,
124
118
  :hmac => @hmac,
125
119
  :host => @host,
126
120
  :path => path || @path,
@@ -19,11 +19,13 @@ module Fog
19
19
  request :complete_multipart_upload
20
20
  request :copy_object
21
21
  request :delete_bucket
22
+ request :delete_bucket_lifecycle
22
23
  request :delete_bucket_policy
23
24
  request :delete_bucket_website
24
25
  request :delete_object
25
26
  request :get_bucket
26
27
  request :get_bucket_acl
28
+ request :get_bucket_lifecycle
27
29
  request :get_bucket_location
28
30
  request :get_bucket_logging
29
31
  request :get_bucket_object_versions
@@ -45,6 +47,7 @@ module Fog
45
47
  request :post_object_hidden_fields
46
48
  request :put_bucket
47
49
  request :put_bucket_acl
50
+ request :put_bucket_lifecycle
48
51
  request :put_bucket_logging
49
52
  request :put_bucket_policy
50
53
  request :put_bucket_versioning
@@ -189,20 +192,10 @@ module Fog
189
192
  @aws_secret_access_key = options[:aws_secret_access_key]
190
193
  options[:region] ||= 'us-east-1'
191
194
  @host = options[:host] || case options[:region]
192
- when 'ap-northeast-1'
193
- 's3-ap-northeast-1.amazonaws.com'
194
- when 'ap-southeast-1'
195
- 's3-ap-southeast-1.amazonaws.com'
196
- when 'eu-west-1'
197
- 's3-eu-west-1.amazonaws.com'
198
195
  when 'us-east-1'
199
196
  's3.amazonaws.com'
200
- when 'us-west-1'
201
- 's3-us-west-1.amazonaws.com'
202
- when 'us-west-2'
203
- 's3-us-west-2.amazonaws.com'
204
197
  else
205
- raise ArgumentError, "Unknown region: #{options[:region].inspect}"
198
+ "s3-#{options[:region]}.amazonaws.com"
206
199
  end
207
200
  @region = options[:region]
208
201
  end
@@ -263,20 +256,10 @@ module Fog
263
256
  else
264
257
  options[:region] ||= 'us-east-1'
265
258
  @host = options[:host] || case options[:region]
266
- when 'ap-northeast-1'
267
- 's3-ap-northeast-1.amazonaws.com'
268
- when 'ap-southeast-1'
269
- 's3-ap-southeast-1.amazonaws.com'
270
- when 'eu-west-1'
271
- 's3-eu-west-1.amazonaws.com'
272
259
  when 'us-east-1'
273
260
  's3.amazonaws.com'
274
- when 'us-west-1'
275
- 's3-us-west-1.amazonaws.com'
276
- when 'us-west-2'
277
- 's3-us-west-2.amazonaws.com'
278
261
  else
279
- raise ArgumentError, "Unknown region: #{options[:region].inspect}"
262
+ "s3-#{options[:region]}.amazonaws.com"
280
263
  end
281
264
  @path = options[:path] || '/'
282
265
  @persistent = options[:persistent] || true
@@ -332,6 +315,7 @@ DATA
332
315
  for key in (params[:query] || {}).keys.sort
333
316
  if %w{
334
317
  acl
318
+ lifecycle
335
319
  location
336
320
  logging
337
321
  notification
@@ -55,6 +55,8 @@ end
55
55
  require 'fog/bin/aws'
56
56
  require 'fog/bin/bluebox'
57
57
  require 'fog/bin/brightbox'
58
+ require 'fog/bin/cloudstack'
59
+ require 'fog/bin/clodo'
58
60
  require 'fog/bin/dnsimple'
59
61
  require 'fog/bin/dnsmadeeasy'
60
62
  require 'fog/bin/dynect'
@@ -13,6 +13,8 @@ class AWS < Fog::Bin
13
13
  Fog::AWS::CloudWatch
14
14
  when :compute
15
15
  Fog::Compute::AWS
16
+ when :ddb, :dynamodb
17
+ Fog::AWS::DynamoDB
16
18
  when :dns
17
19
  Fog::DNS::AWS
18
20
  when :elasticache
@@ -35,6 +37,8 @@ class AWS < Fog::Bin
35
37
  Fog::AWS::RDS
36
38
  when :sns
37
39
  Fog::AWS::SNS
40
+ when :sts
41
+ Fog::AWS::STS
38
42
  else
39
43
  # @todo Replace most instances of ArgumentError with NotImplementedError
40
44
  # @todo For a list of widely supported Exceptions, see:
@@ -56,8 +60,10 @@ class AWS < Fog::Bin
56
60
  when :cloud_watch
57
61
  Fog::AWS::CloudWatch.new
58
62
  when :compute
59
- Fog::Logger.warning("AWS[:compute] is not recommended, use Comptue[:aws] for portability")
63
+ Fog::Logger.warning("AWS[:compute] is not recommended, use Compute[:aws] for portability")
60
64
  Fog::Compute.new(:provider => 'AWS')
65
+ when :ddb, :dynamodb
66
+ Fog::AWS::DynamoDB.new
61
67
  when :dns
62
68
  Fog::Logger.warning("AWS[:dns] is not recommended, use DNS[:aws] for portability")
63
69
  Fog::DNS.new(:provider => 'AWS')
@@ -84,6 +90,8 @@ class AWS < Fog::Bin
84
90
  Fog::Storage.new(:provider => 'AWS')
85
91
  when :sns
86
92
  Fog::AWS::SNS.new
93
+ when :sts
94
+ Fog::AWS::STS.new
87
95
  else
88
96
  raise ArgumentError, "Unrecognized service: #{key.inspect}"
89
97
  end
@@ -14,7 +14,7 @@ class Voxel < Fog::Bin
14
14
  @@connections ||= Hash.new do |hash, key|
15
15
  hash[key] = case key
16
16
  when :compute
17
- Fog::Logger.warning("Voxel[:comupte] is not recommended, use Compute[:voxel]] for portability")
17
+ Fog::Logger.warning("Voxel[:compute] is not recommended, use Compute[:voxel] for portability")
18
18
  Fog::Compute.new(:provider => 'Voxel')
19
19
  else
20
20
  raise ArgumentError, "Unrecognized service: #{key.inspect}"
@@ -16,6 +16,7 @@ module Fog
16
16
  attribute :hostname
17
17
  attribute :user_data
18
18
  attribute :console_url
19
+ attribute :fqdn
19
20
  attribute :console_token
20
21
 
21
22
  # Times
@@ -17,6 +17,12 @@ module Fog
17
17
  when :brightbox
18
18
  require 'fog/brightbox/compute'
19
19
  Fog::Compute::Brightbox.new(attributes)
20
+ when :cloudstack
21
+ require 'fog/cloudstack/compute'
22
+ Fog::Compute::Cloudstack.new(attributes)
23
+ when :clodo
24
+ require 'fog/clodo/compute'
25
+ Fog::Compute::Clodo.new(attributes)
20
26
  when :ecloud
21
27
  require 'fog/ecloud/compute'
22
28
  Fog::Compute::Ecloud.new(attributes)
@@ -13,6 +13,17 @@ module Fog
13
13
  Fog::SCP.new(public_ip_address, username, scp_options).upload(local_path, remote_path, upload_options)
14
14
  end
15
15
 
16
+ alias_method :scp_upload, :scp
17
+
18
+ def scp_download(remote_path, local_path, download_options = {})
19
+ require 'net/scp'
20
+ requires :public_ip_address, :username
21
+
22
+ scp_options = {}
23
+ scp_options[:key_data] = [private_key] if private_key
24
+ Fog::SCP.new(public_ip_address, username, scp_options).download(remote_path, local_path, download_options)
25
+ end
26
+
16
27
  def ssh(commands, options={})
17
28
  require 'net/ssh'
18
29
  requires :public_ip_address, :username
@@ -5,7 +5,6 @@ $LOAD_PATH.unshift __LIB_DIR__ unless
5
5
  $LOAD_PATH.include?(File.expand_path(__LIB_DIR__))
6
6
 
7
7
  # external core dependencies
8
- require 'rubygems'
9
8
  require 'base64'
10
9
  require 'cgi'
11
10
  require 'uri'
@@ -16,7 +16,6 @@ module Fog
16
16
  block = lambda { |chunk, remaining, total| body << chunk }
17
17
  end
18
18
  end
19
-
20
19
  response = @excon.request(params, &block)
21
20
 
22
21
  if parser
@@ -38,6 +38,8 @@ An alternate file may be used by placing its path in the FOG_RC environment vari
38
38
  :bluebox_customer_id:
39
39
  :brightbox_client_id:
40
40
  :brightbox_secret:
41
+ :clodo_api_key:
42
+ :clodo_username:
41
43
  :go_grid_api_key:
42
44
  :go_grid_shared_secret:
43
45
  :google_storage_access_key_id:
@@ -69,6 +71,9 @@ An alternate file may be used by placing its path in the FOG_RC environment vari
69
71
  :dnsimple_password:
70
72
  :dnsmadeeasy_api_key:
71
73
  :dnsmadeeasy_secret_key:
74
+ :cloudstack_host:
75
+ :cloudstack_api_key:
76
+ :cloudstack_secret_access_key:
72
77
  :vsphere_server:
73
78
  :vsphere_username:
74
79
  :vsphere_password:
@@ -27,6 +27,10 @@ module Fog
27
27
  Fog::Mock.not_implemented
28
28
  end
29
29
 
30
+ def download(remote_path, local_path, download_options = {})
31
+ Fog::Mock.not_implemented
32
+ end
33
+
30
34
  end
31
35
 
32
36
  class Real
@@ -45,10 +49,22 @@ module Fog
45
49
  @options = { :paranoid => false }.merge(options)
46
50
  end
47
51
 
48
- def upload(local_path, remote_path, upload_options = {} )
52
+ def upload(local_path, remote_path, upload_options = {})
53
+ begin
54
+ Net::SCP.start(@address, @username, @options) do |scp|
55
+ scp.upload!(local_path, remote_path, upload_options) do |ch, name, sent, total|
56
+ # TODO: handle progress display?
57
+ end
58
+ end
59
+ rescue Exception => error
60
+ raise error
61
+ end
62
+ end
63
+
64
+ def download(remote_path, local_path, download_options = {})
49
65
  begin
50
66
  Net::SCP.start(@address, @username, @options) do |scp|
51
- scp.upload!(local_path, remote_path, upload_options ) do |ch, name, sent, total|
67
+ scp.download!(remote_path, local_path, download_options) do |ch, name, sent, total|
52
68
  # TODO: handle progress display?
53
69
  end
54
70
  end
@@ -4,7 +4,7 @@ module Fog
4
4
  duration = 0
5
5
  start = Time.now
6
6
  until yield || duration > timeout
7
- sleep(interval)
7
+ sleep(interval.to_f)
8
8
  duration = Time.now - start
9
9
  end
10
10
  if duration > timeout
@@ -68,7 +68,7 @@ module Fog
68
68
  # :dnsmadeeasy_secret_key in order to create a connection
69
69
  #
70
70
  # ==== Examples
71
- # dns = Fog::DNSMadeEasy::DNS.new(
71
+ # dns = Fog::DNS::DNSMadeEasy.new(
72
72
  # :dnsmadeeasy_api_key => your_dnsmadeeasy_api_key,
73
73
  # :dnsmadeeasy_secret_key => your_dnsmadeeasy_secret_key
74
74
  # )
@@ -11,10 +11,10 @@ module Fog
11
11
 
12
12
  model Fog::DNS::Dynect::Record
13
13
 
14
- def all
14
+ def all(options = {})
15
15
  requires :zone
16
16
  data = []
17
- connection.get_node_list(zone.domain).body['data'].each do |fqdn|
17
+ connection.get_node_list(zone.domain, options).body['data'].each do |fqdn|
18
18
  records = connection.get_record('ANY', zone.domain, fqdn).body['data']
19
19
 
20
20
  # data in format ['/REST/xRecord/domain/fqdn/identity]
@@ -11,10 +11,11 @@ module Fog
11
11
  # * fqdn<~String> - fully qualified domain name of node to lookup
12
12
 
13
13
  def get_node_list(zone, options = {})
14
+ requested_fqdn = options['fqdn'] || options[:fqdn]
14
15
  request(
15
16
  :expects => 200,
16
17
  :method => :get,
17
- :path => ['NodeList', zone, options['fqdn']].compact.join('/')
18
+ :path => ['NodeList', zone, requested_fqdn].compact.join('/')
18
19
  )
19
20
  end
20
21
  end
@@ -1184,7 +1184,7 @@ module Fog
1184
1184
  end
1185
1185
 
1186
1186
  def supporting_versions
1187
- ["v0.8b-ext2.6", "0.8b-ext2.6"]
1187
+ ["v0.8b-ext2.6", "0.8b-ext2.6", "v0.8b-ext2.8" , "0.8b-ext2.8"]
1188
1188
  end
1189
1189
 
1190
1190
  private
@@ -7,7 +7,7 @@ module Fog
7
7
  if configure
8
8
  required_opts + [ :id, :href, :timeout ]
9
9
  end
10
- unless required_opts.all? { |opt| service_data.keys.include?(opt) }
10
+ unless required_opts.all? { |opt| service_data.has_key?(opt) }
11
11
  raise ArgumentError.new("Required Backup Internet Service data missing: #{(required_opts - service_data.keys).map(&:inspect).join(", ")}")
12
12
  end
13
13
  end
@@ -15,7 +15,7 @@ module Fog
15
15
  [:type, :url_send_string, :http_headers, :receive_string, :is_enabled]
16
16
  end
17
17
 
18
- unless required_opts.all? { |opt| monitor.keys.include?(opt) && monitor[opt] }
18
+ unless required_opts.all? { |opt| monitor.has_key?(opt) && monitor[opt] }
19
19
  raise ArgumentError.new("Required Monitor data missing: #{(required_opts - monitor.keys).map(&:inspect).join(", ")}")
20
20
  end
21
21
 
@@ -36,7 +36,7 @@ module Fog
36
36
  if configure
37
37
  required_opts + [ :id, :href, :timeout ]
38
38
  end
39
- unless required_opts.all? { |opt| service_data.keys.include?(opt) }
39
+ unless required_opts.all? { |opt| service_data.has_key?(opt) }
40
40
  raise ArgumentError.new("Required Internet Service data missing: #{(required_opts - service_data.keys).map(&:inspect).join(", ")}")
41
41
  end
42
42
  end
@@ -20,7 +20,7 @@ module Fog
20
20
  if configure
21
21
  valid_opts.delete_if { |opt| ![:name, :enabled, :description].include?(opt) }
22
22
  end
23
- unless valid_opts.all? { |opt| node_data.keys.include?(opt) }
23
+ unless valid_opts.all? { |opt| node_data.has_key?(opt) }
24
24
  raise ArgumentError.new("Required data missing: #{(valid_opts - node_data.keys).map(&:inspect).join(", ")}")
25
25
  end
26
26
  end
@@ -5,7 +5,7 @@ module Fog
5
5
 
6
6
  def validate_clone_vapp_options(options)
7
7
  valid_opts = [:name, :poweron]
8
- unless valid_opts.all? { |opt| options.keys.include?(opt) }
8
+ unless valid_opts.all? { |opt| options.has_key?(opt) }
9
9
  raise ArgumentError.new("Required data missing: #{(valid_opts - options.keys).map(&:inspect).join(", ")}")
10
10
  end
11
11
  end
@@ -6,7 +6,7 @@ module Fog
6
6
 
7
7
  def validate_public_ip_address_data(ip_address_data)
8
8
  valid_opts = [:name, :href, :id]
9
- unless valid_opts.all? { |opt| ip_address_data.keys.include?(opt) }
9
+ unless valid_opts.all? { |opt| ip_address_data.has_key?(opt) }
10
10
  raise ArgumentError.new("Required Internet Service data missing: #{(valid_opts - ip_address_data.keys).map(&:inspect).join(", ")}")
11
11
  end
12
12
  end
@@ -5,7 +5,7 @@ module Fog
5
5
 
6
6
  def validate_network_data(network_data, configure=false)
7
7
  valid_opts = [:id, :href, :name, :rnat, :address, :broadcast, :gateway]
8
- unless valid_opts.all? { |opt| network_data.keys.include?(opt) }
8
+ unless valid_opts.all? { |opt| network_data.has_key?(opt) }
9
9
  raise ArgumentError.new("Required data missing: #{(valid_opts - network_data.keys).map(&:inspect).join(", ")}")
10
10
  end
11
11
  end