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
@@ -18,12 +18,13 @@ module Fog
18
18
  # * 'return'<~Boolean> - success?
19
19
  #
20
20
  # {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateSecurityGroup.html]
21
- def create_security_group(name, description)
21
+ def create_security_group(name, description, vpc_id=nil)
22
22
  request(
23
23
  'Action' => 'CreateSecurityGroup',
24
24
  'GroupName' => name,
25
25
  'GroupDescription' => description,
26
- :parser => Fog::Parsers::Compute::AWS::Basic.new
26
+ :parser => Fog::Parsers::Compute::AWS::Basic.new,
27
+ 'VpcId' => vpc_id
27
28
  )
28
29
  end
29
30
 
@@ -31,7 +32,7 @@ module Fog
31
32
 
32
33
  class Mock
33
34
 
34
- def create_security_group(name, description)
35
+ def create_security_group(name, description, vpc_id=nil)
35
36
  response = Excon::Response.new
36
37
  unless self.data[:security_groups][name]
37
38
  data = {
@@ -39,7 +40,8 @@ module Fog
39
40
  'groupName' => name,
40
41
  'ipPermissionsEgress' => [],
41
42
  'ipPermissions' => [],
42
- 'ownerId' => self.data[:owner_id]
43
+ 'ownerId' => self.data[:owner_id],
44
+ 'vpcId' => vpc_id
43
45
  }
44
46
  self.data[:security_groups][name] = data
45
47
  response.body = {
@@ -30,8 +30,9 @@ module Fog
30
30
  params.merge!(Fog::AWS.indexed_param('Tag.%d.Key', tags.keys))
31
31
  params.merge!(Fog::AWS.indexed_param('Tag.%d.Value', tags.values))
32
32
  request({
33
- 'Action' => 'CreateTags',
34
- :parser => Fog::Parsers::Compute::AWS::Basic.new
33
+ 'Action' => 'CreateTags',
34
+ :idempotent => true,
35
+ :parser => Fog::Parsers::Compute::AWS::Basic.new
35
36
  }.merge!(params))
36
37
  end
37
38
 
@@ -57,6 +57,9 @@ module Fog
57
57
 
58
58
  {"messageSet" => [], "regionName" => "us-west-2", "zoneName" => "us-west-2a", "zoneState" => "available"},
59
59
  {"messageSet" => [], "regionName" => "us-west-2", "zoneName" => "us-west-2b", "zoneState" => "available"},
60
+
61
+ {"messageSet" => [], "regionName" => "sa-east-1", "zoneName" => "sa-east-1a", "zoneState" => "available"},
62
+ {"messageSet" => [], "regionName" => "sa-east-1", "zoneName" => "sa-east-1b", "zoneState" => "available"},
60
63
 
61
64
  {"messageSet" => [], "regionName" => "eu-west-1", "zoneName" => "eu-west-1a", "zoneState" => "available"},
62
65
  {"messageSet" => [], "regionName" => "eu-west-1", "zoneName" => "eu-west-1b", "zoneState" => "available"},
@@ -16,6 +16,7 @@ module Fog
16
16
  # * 'requestId'<~String> - Id of request
17
17
  # * 'securityGroupInfo'<~Array>:
18
18
  # * 'groupDescription'<~String> - Description of security group
19
+ # * 'groupId'<~String> - ID of the security group.
19
20
  # * 'groupName'<~String> - Name of security group
20
21
  # * 'ipPermissions'<~Array>:
21
22
  # * 'fromPort'<~Integer> - Start of port range (or -1 for ICMP wildcard)
@@ -59,6 +60,7 @@ module Fog
59
60
  aliases = {
60
61
  'description' => 'groupDescription',
61
62
  'group-name' => 'groupName',
63
+ 'group-id' => 'groupId',
62
64
  'owner-id' => 'ownerId'
63
65
  }
64
66
  permission_aliases = {
@@ -37,6 +37,8 @@ module Fog
37
37
 
38
38
  load_balancer['Policies']['AppCookieStickinessPolicies'] << { 'CookieName' => cookie_name, 'PolicyName' => policy_name }
39
39
 
40
+ create_load_balancer_policy(lb_name, policy_name, 'AppCookieStickinessPolicyType', {'CookieName' => cookie_name})
41
+
40
42
  response.body = {
41
43
  'ResponseMetadata' => {
42
44
  'RequestId' => Fog::AWS::Mock.request_id
@@ -37,7 +37,9 @@ module Fog
37
37
  response = Excon::Response.new
38
38
  response.status = 200
39
39
 
40
- load_balancer['Policies']['LBCookieStickinessPolicies'] << { 'PolicyName' => policy_name, 'CookieExpirationPeriod' => cookie_expiration_period }
40
+ load_balancer['Policies']['LBCookieStickinessPolicies'] << { 'CookieExpirationPeriod' => cookie_expiration_period, 'PolicyName' => policy_name }
41
+
42
+ create_load_balancer_policy(lb_name, policy_name, 'LBCookieStickinessPolicyType', {'CookieExpirationPeriod' => cookie_expiration_period})
41
43
 
42
44
  response.body = {
43
45
  'ResponseMetadata' => {
@@ -11,9 +11,10 @@ module Fog
11
11
  # * availability_zones<~Array> - List of availability zones for the ELB
12
12
  # * lb_name<~String> - Name for the new ELB -- must be unique
13
13
  # * listeners<~Array> - Array of Hashes describing ELB listeners to assign to the ELB
14
- # * 'Protocol'<~String> - Protocol to use. Either HTTP or TCP.
14
+ # * 'Protocol'<~String> - Protocol to use. Either HTTP, HTTPS, TCP or SSL.
15
15
  # * 'LoadBalancerPort'<~Integer> - The port that the ELB will listen to for outside traffic
16
16
  # * 'InstancePort'<~Integer> - The port on the instance that the ELB will forward traffic to
17
+ # * 'InstanceProtocol'<~String> - Protocol for sending traffic to an instance. Either HTTP, HTTPS, TCP or SSL.
17
18
  # * 'SSLCertificateId'<~String> - ARN of the server certificate
18
19
  # ==== Returns
19
20
  # * response<~Excon::Response>:
@@ -28,17 +29,20 @@ module Fog
28
29
  listener_protocol = []
29
30
  listener_lb_port = []
30
31
  listener_instance_port = []
32
+ listener_instance_protocol = []
31
33
  listener_ssl_certificate_id = []
32
34
  listeners.each do |listener|
33
35
  listener_protocol.push(listener['Protocol'])
34
36
  listener_lb_port.push(listener['LoadBalancerPort'])
35
37
  listener_instance_port.push(listener['InstancePort'])
38
+ listener_instance_protocol.push(listener['InstanceProtocol'])
36
39
  listener_ssl_certificate_id.push(listener['SSLCertificateId'])
37
40
  end
38
41
 
39
42
  params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.Protocol', listener_protocol))
40
43
  params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.LoadBalancerPort', listener_lb_port))
41
44
  params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.InstancePort', listener_instance_port))
45
+ params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.InstanceProtocol', listener_instance_protocol))
42
46
  params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.SSLCertificateId', listener_ssl_certificate_id))
43
47
 
44
48
  request({
@@ -83,8 +87,9 @@ module Fog
83
87
  'ListenerDescriptions' => listeners,
84
88
  'LoadBalancerName' => lb_name,
85
89
  'Policies' => {
90
+ 'AppCookieStickinessPolicies' => [],
86
91
  'LBCookieStickinessPolicies' => [],
87
- 'AppCookieStickinessPolicies' => []
92
+ 'Proper' => []
88
93
  },
89
94
  'SourceSecurityGroup' => {
90
95
  'GroupName' => '',
@@ -10,9 +10,10 @@ module Fog
10
10
  # ==== Parameters
11
11
  # * lb_name<~String> - Name for the new ELB -- must be unique
12
12
  # * listeners<~Array> - Array of Hashes describing ELB listeners to add to the ELB
13
- # * 'Protocol'<~String> - Protocol to use. Either HTTP or TCP.
13
+ # * 'Protocol'<~String> - Protocol to use. Either HTTP, HTTPS, TCP or SSL.
14
14
  # * 'LoadBalancerPort'<~Integer> - The port that the ELB will listen to for outside traffic
15
15
  # * 'InstancePort'<~Integer> - The port on the instance that the ELB will forward traffic to
16
+ # * 'InstanceProtocol'<~String> - Protocol for sending traffic to an instance. Either HTTP, HTTPS, TCP or SSL.
16
17
  # * 'SSLCertificateId'<~String> - ARN of the server certificate
17
18
  # ==== Returns
18
19
  # * response<~Excon::Response>:
@@ -25,17 +26,20 @@ module Fog
25
26
  listener_protocol = []
26
27
  listener_lb_port = []
27
28
  listener_instance_port = []
29
+ listener_instance_protocol = []
28
30
  listener_ssl_certificate_id = []
29
31
  listeners.each do |listener|
30
32
  listener_protocol.push(listener['Protocol'])
31
33
  listener_lb_port.push(listener['LoadBalancerPort'])
32
34
  listener_instance_port.push(listener['InstancePort'])
35
+ listener_instance_protocol.push(listener['InstanceProtocol'])
33
36
  listener_ssl_certificate_id.push(listener['SSLCertificateId'])
34
37
  end
35
38
 
36
39
  params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.Protocol', listener_protocol))
37
40
  params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.LoadBalancerPort', listener_lb_port))
38
41
  params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.InstancePort', listener_instance_port))
42
+ params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.InstanceProtocol', listener_instance_protocol))
39
43
  params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.SSLCertificateId', listener_ssl_certificate_id))
40
44
 
41
45
  request({
@@ -58,6 +62,11 @@ module Fog
58
62
  if listener['SSLCertificateId'] and !certificate_ids.include? listener['SSLCertificateId']
59
63
  raise Fog::AWS::IAM::NotFound.new('CertificateNotFound')
60
64
  end
65
+
66
+ if (%w( HTTP HTTPS).include?(listener['Protocol']) && !%w( HTTP HTTPS ).include?(listener['InstanceProtocol'])) ||
67
+ (%w( TCP SSL).include?(listener['Protocol']) && !%w( TCP SSL ).include?(listener['InstanceProtocol']))
68
+ raise Fog::AWS::ELB::ValidationError
69
+ end if listener['Protocol'] && listener['InstanceProtocol']
61
70
  load_balancer['ListenerDescriptions'] << {'Listener' => listener, 'PolicyNames' => []}
62
71
  end
63
72
 
@@ -34,7 +34,7 @@ module Fog
34
34
  response.status = 200
35
35
 
36
36
  load_balancer['Policies'].each do |name, policies|
37
- policies.delete_if { |p| p['PolicyName'] == policy_name }
37
+ policies.delete_if { |policy| policy['PolicyName'] == policy_name }
38
38
  end
39
39
 
40
40
  response.body = {
@@ -73,7 +73,11 @@ module Fog
73
73
  'RequestId' => Fog::AWS::Mock.request_id
74
74
  },
75
75
  'DescribeLoadBalancersResult' => {
76
- 'LoadBalancerDescriptions' => load_balancers.map { |lb| lb['Instances'] = lb['Instances'].map { |i| i['InstanceId'] }; lb }
76
+ 'LoadBalancerDescriptions' => load_balancers.map do |lb|
77
+ lb['Instances'] = lb['Instances'].map { |i| i['InstanceId'] }
78
+ lb['Policies'] = lb['Policies'].reject { |name, policies| name == 'Proper' }
79
+ lb
80
+ end
77
81
  }
78
82
  }
79
83
 
@@ -34,6 +34,33 @@ module Fog
34
34
  end
35
35
 
36
36
  class Mock
37
+ def set_load_balancer_listener_ssl_certificate(lb_name, load_balancer_port, ssl_certificate_id)
38
+ raise Fog::AWS::ELB::NotFound unless load_balancer = self.data[:load_balancers][lb_name]
39
+
40
+ certificate_ids = Fog::AWS::IAM::Mock.data[@aws_access_key_id][:server_certificates].map {|n, c| c['Arn'] }
41
+ if !certificate_ids.include? ssl_certificate_id
42
+ raise Fog::AWS::IAM::NotFound.new('CertificateNotFound')
43
+ end
44
+
45
+ response = Excon::Response.new
46
+
47
+ unless listener = load_balancer['ListenerDescriptions'].find { |listener| listener['Listener']['LoadBalancerPort'] == load_balancer_port }
48
+ response.status = 400
49
+ response.body = "<?xml version=\"1.0\"?><Response><Errors><Error><Code>ListenerNotFound</Code><Message>LoadBalancer does not have a listnener configured at the given port.</Message></Error></Errors><RequestID>#{Fog::AWS::Mock.request_id}</RequestId></Response>"
50
+ raise Excon::Errors.status_error({:expects => 200}, response)
51
+ end
52
+
53
+ listener['Listener']['SSLCertificateId'] = ssl_certificate_id
54
+
55
+ response.status = 200
56
+ response.body = {
57
+ "ResponseMetadata" => {
58
+ "RequestId" => Fog::AWS::Mock.request_id
59
+ }
60
+ }
61
+
62
+ response
63
+ end
37
64
  end
38
65
  end
39
66
  end
@@ -57,7 +57,7 @@ module Fog
57
57
  raise Excon::Errors.status_error({:expects => 200}, response)
58
58
  end
59
59
 
60
- unless load_balancer['Policies'].find { |name, policies| policies.find { |policy| policy['PolicyName'] == policy_names.first } }
60
+ unless load_balancer['Policies']['Proper'].find { |policy| policy['PolicyName'] == policy_names.first }
61
61
  response.status = 400
62
62
  response.body = "<?xml version=\"1.0\"?><Response><Errors><Error><Code>PolicyNotFound</Code><Message>One or more specified policies were not found.</Message></Error></Errors><RequestID>#{Fog::AWS::Mock.request_id}</RequestId></Response>"
63
63
  raise Excon::Errors.status_error({:expects => 200}, response)
@@ -77,13 +77,15 @@ module Fog
77
77
  'Args' => ['s3://us-east-1.elasticmapreduce/libs/hive/hive-script', '--base-path', 's3://us-east-1.elasticmapreduce/libs/hive/', '--install-hive']},
78
78
  'ActionOnFailure' => 'TERMINATE_JOB_FLOW'
79
79
  }
80
- steps << {
81
- 'Name' => 'Install Hive Site Configuration',
82
- 'HadoopJarStep' => {
83
- 'Jar' => 's3://us-east-1.elasticmapreduce/libs/script-runner/script-runner.jar',
84
- 'Args' => ['s3://us-east-1.elasticmapreduce/libs/hive/hive-script', '--base-path', 's3://us-east-1.elasticmapreduce/libs/hive/', '--install-hive-site', '--hive-site=s3://raybeam.okl/prod/hive/hive-site.xml']},
85
- 'ActionOnFailure' => 'TERMINATE_JOB_FLOW'
86
- }
80
+
81
+ # To add a configuration step to the Hive flow, see the step below
82
+ # steps << {
83
+ # 'Name' => 'Install Hive Site Configuration',
84
+ # 'HadoopJarStep' => {
85
+ # 'Jar' => 's3://us-east-1.elasticmapreduce/libs/script-runner/script-runner.jar',
86
+ # 'Args' => ['s3://us-east-1.elasticmapreduce/libs/hive/hive-script', '--base-path', 's3://us-east-1.elasticmapreduce/libs/hive/', '--install-hive-site', '--hive-site=s3://my.bucket/hive/hive-site.xml']},
87
+ # 'ActionOnFailure' => 'TERMINATE_JOB_FLOW'
88
+ # }
87
89
  options['Steps'] = steps
88
90
 
89
91
  if not options['Instances'].nil?
@@ -29,6 +29,30 @@ module Fog
29
29
  end
30
30
 
31
31
  end
32
+
33
+ class Mock
34
+
35
+ def add_user_to_group(group_name, user_name)
36
+ if data[:groups].has_key? group_name
37
+ if data[:users].has_key? user_name
38
+
39
+ unless data[:groups][group_name][:members].include?(user_name)
40
+ data[:groups][group_name][:members] << user_name
41
+ end
42
+
43
+ Excon::Response.new.tap do |response|
44
+ response.status = 200
45
+ response.body = { 'RequestId' => Fog::AWS::Mock.request_id }
46
+ end
47
+ else
48
+ raise Fog::AWS::IAM::NotFound.new("The user with name #{user_name} cannot be found.")
49
+ end
50
+ else
51
+ raise Fog::AWS::IAM::NotFound.new("The group with name #{group_name} cannot be found.")
52
+ end
53
+ end
54
+
55
+ end
32
56
  end
33
57
  end
34
58
  end
@@ -32,6 +32,30 @@ module Fog
32
32
  end
33
33
 
34
34
  end
35
+ class Mock
36
+ def create_access_key(options)
37
+ #FIXME: Not 100% correct as AWS will use the signing credentials when there is no 'UserName' in the options hash
38
+ # Also doesn't raise an error when there are too many keys
39
+ user_name = options['UserName']
40
+ if data[:users].has_key? user_name
41
+ key = { 'SecretAccessKey' => Fog::Mock.random_base64(40),
42
+ 'Status' => 'Active',
43
+ 'AccessKeyId' => Fog::AWS::Mock.key_id(20),
44
+ 'UserName' => user_name
45
+ }
46
+
47
+ data[:users][user_name][:access_keys] << key
48
+
49
+ Excon::Response.new.tap do |response|
50
+ response.status = 200
51
+ response.body = { 'AccessKey' => key,
52
+ 'RequestId' => Fog::AWS::Mock.request_id }
53
+ end
54
+ else
55
+ raise Fog::AWS::IAM::NotFound.new('The user with name booboboboob cannot be found.')
56
+ end
57
+ end
58
+ end
35
59
  end
36
60
  end
37
61
  end
@@ -34,6 +34,27 @@ module Fog
34
34
  end
35
35
 
36
36
  end
37
+
38
+ class Mock
39
+
40
+ def create_group(group_name, path = '/')
41
+ if data[:groups].has_key? group_name
42
+ raise Fog::AWS::IAM::EntityAlreadyExists.new("Group with name #{group_name} already exists.")
43
+ else
44
+ data[:groups][group_name][:path] = path
45
+ Excon::Response.new.tap do |response|
46
+ response.body = { 'Group' => {
47
+ 'GroupId' => data[:groups][group_name][:group_id],
48
+ 'GroupName' => group_name,
49
+ 'Path' => path,
50
+ 'Arn' => data[:groups][group_name][:arn] },
51
+ 'RequestId' => Fog::AWS::Mock.request_id }
52
+ response.status = 200
53
+ end
54
+ end
55
+
56
+ end
57
+ end
37
58
  end
38
59
  end
39
60
  end
@@ -34,6 +34,27 @@ module Fog
34
34
  end
35
35
 
36
36
  end
37
+
38
+ class Mock
39
+ def create_user(user_name, path='/')
40
+ if data[:users].has_key? user_name
41
+ raise Fog::AWS::IAM::EntityAlreadyExists.new "User with name #{user_name} already exists."
42
+ else
43
+ data[:users][user_name][:path] = path
44
+ Excon::Response.new.tap do |response|
45
+ response.status = 200
46
+ response.body = { 'User' => {
47
+ "UserId" => data[:users][user_name][:user_id],
48
+ "Path" => path,
49
+ "UserName" => user_name,
50
+ "Arn" => data[:users][user_name][:arn]
51
+ },
52
+ 'RequestId' => Fog::AWS::Mock.request_id
53
+ }
54
+ end
55
+ end
56
+ end
57
+ end
37
58
  end
38
59
  end
39
60
  end
@@ -29,6 +29,23 @@ module Fog
29
29
  end
30
30
 
31
31
  end
32
+
33
+ class Mock
34
+
35
+ def delete_access_key(access_key_id, options = {})
36
+ user_name = options['UserName']
37
+ if user_name && data[:users].has_key?(user_name) && data[:users][user_name][:access_keys].any? { |akey| akey['AccessKeyId'] == access_key_id }
38
+ data[:users][user_name][:access_keys].delete_if { |akey| akey['AccessKeyId'] == access_key_id }
39
+ Excon::Response.new.tap do |response|
40
+ response.body = { 'RequestId' => Fog::AWS::Mock.request_id }
41
+ response.status = 200
42
+ end
43
+ else
44
+ raise Fog::AWS::IAM::NotFound.new("The Access Key with id #{access_key_id} cannot be found.")
45
+ end
46
+ end
47
+
48
+ end
32
49
  end
33
50
  end
34
51
  end
@@ -27,6 +27,25 @@ module Fog
27
27
  end
28
28
 
29
29
  end
30
+
31
+ class Mock
32
+
33
+ def delete_group(group_name)
34
+ if data[:groups].has_key? group_name
35
+ if data[:groups][group_name][:members].empty?
36
+ data[:groups].delete group_name
37
+ Excon::Response.new.tap do |response|
38
+ response.status = 200
39
+ response.body = { 'RequestId' => Fog::AWS::Mock.request_id }
40
+ end
41
+ else
42
+ raise Fog::AWS::IAM::Error.new("DeleteConflict => Cannot delete entity, must delete users in group first.")
43
+ end
44
+ else
45
+ raise Fog::AWS::IAM::NotFound.new("The group with name #{group_name} cannot be found.")
46
+ end
47
+ end
48
+ end
30
49
  end
31
50
  end
32
51
  end