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
@@ -26,10 +26,10 @@ module Fog
26
26
  # collection :snapshots
27
27
  # model :parameter_group
28
28
  # collection :parameter_groups
29
- #
29
+ #
30
30
  # model :parameter
31
31
  # collection :parameters
32
- #
32
+ #
33
33
  # model :security_group
34
34
  # collection :security_groups
35
35
 
@@ -57,7 +57,7 @@ module Fog
57
57
  #
58
58
  # ==== Parameters
59
59
  # * options<~Hash> - config arguments for connection. Defaults to {}.
60
- # * region<~String> - optional region to use, in ['eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'ap-southeast-1']
60
+ # * region<~String> - optional region to use. For instance, in 'eu-west-1', 'us-east-1' and etc.
61
61
  #
62
62
  # ==== Returns
63
63
  # * EMR object with connection to AWS.
@@ -68,12 +68,13 @@ module Fog
68
68
  @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
69
69
 
70
70
  options[:region] ||= 'us-east-1'
71
- @host = options[:host] || 'elasticmapreduce.amazonaws.com'
71
+ @host = options[:host] || "elasticmapreduce.#{options[:region]}.amazonaws.com"
72
72
  @path = options[:path] || '/'
73
73
  @persistent = options[:persistent] || false
74
74
  @port = options[:port] || 443
75
75
  @scheme = options[:scheme] || 'https'
76
76
  @connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
77
+ @region = options[:region]
77
78
  end
78
79
 
79
80
  def reload
@@ -61,7 +61,22 @@ module Fog
61
61
  @data ||= Hash.new do |hash, key|
62
62
  hash[key] = {
63
63
  :owner_id => Fog::AWS::Mock.owner_id,
64
- :server_certificates => {}
64
+ :server_certificates => {},
65
+ :users => Hash.new do |uhash, ukey|
66
+ uhash[ukey] = {
67
+ :user_id => Fog::AWS::Mock.key_id,
68
+ :arn => "arn:aws:iam::#{Fog::AWS::Mock.owner_id}:user/#{ukey}",
69
+ :access_keys => [],
70
+ :policies => {}
71
+ }
72
+ end,
73
+ :groups => Hash.new do |ghash, gkey|
74
+ ghash[gkey] = {
75
+ :group_id => Fog::AWS::Mock.key_id,
76
+ :arn => "arn:aws:iam::#{Fog::AWS::Mock.owner_id}:group/#{gkey}",
77
+ :members => []
78
+ }
79
+ end
65
80
  }
66
81
  end
67
82
  end
@@ -65,9 +65,9 @@ module Fog
65
65
  reload
66
66
  end
67
67
 
68
- def enable_metrics_collection(metrics = {})
68
+ def enable_metrics_collection(granularity = '1Minute', metrics = {})
69
69
  requires :id
70
- connection.enable_metrics_collection(id, 'Metrics' => metrics)
70
+ connection.enable_metrics_collection(id, granularity, 'Metrics' => metrics)
71
71
  reload
72
72
  end
73
73
 
@@ -25,7 +25,6 @@ module Fog
25
25
 
26
26
  put_opts = {'MetricName' => metric_name, 'Unit' => unit}
27
27
  put_opts.merge!('Dimensions' => dimensions) if dimensions
28
- put_opts.merge!('Timestamp' => dimensions) if timestamp
29
28
  if value
30
29
  put_opts.merge!('Value' => value)
31
30
  else
@@ -43,4 +42,4 @@ module Fog
43
42
  end
44
43
  end
45
44
  end
46
- end
45
+ end
@@ -7,10 +7,11 @@ module Fog
7
7
  class SecurityGroup < Fog::Model
8
8
 
9
9
  identity :name, :aliases => 'groupName'
10
-
11
10
  attribute :description, :aliases => 'groupDescription'
11
+ attribute :group_id, :aliases => 'groupId'
12
12
  attribute :ip_permissions, :aliases => 'ipPermissions'
13
13
  attribute :owner_id, :aliases => 'ownerId'
14
+ attribute :vpc_id, :aliases => 'vpcId'
14
15
 
15
16
  # Authorize access by another security group
16
17
  #
@@ -193,8 +194,7 @@ module Fog
193
194
 
194
195
  def save
195
196
  requires :description, :name
196
-
197
- data = connection.create_security_group(name, description).body
197
+ data = connection.create_security_group(name, description, vpc_id).body
198
198
  true
199
199
  end
200
200
 
@@ -25,6 +25,7 @@ module Fog
25
25
  # description=nil,
26
26
  # ip_permissions=nil,
27
27
  # owner_id=nil
28
+ # vpc_id=nil
28
29
  # >
29
30
  #
30
31
 
@@ -50,6 +51,7 @@ module Fog
50
51
  # description="default group",
51
52
  # ip_permissions=[{"groups"=>[{"groupName"=>"default", "userId"=>"312571045469"}], "fromPort"=>-1, "toPort"=>-1, "ipRanges"=>[], "ipProtocol"=>"icmp"}, {"groups"=>[{"groupName"=>"default", "userId"=>"312571045469"}], "fromPort"=>0, "toPort"=>65535, "ipRanges"=>[], "ipProtocol"=>"tcp"}, {"groups"=>[{"groupName"=>"default", "userId"=>"312571045469"}], "fromPort"=>0, "toPort"=>65535, "ipRanges"=>[], "ipProtocol"=>"udp"}],
52
53
  # owner_id="312571045469"
54
+ # vpc_id=nill
53
55
  # >
54
56
  # ]
55
57
  # >
@@ -79,6 +81,7 @@ module Fog
79
81
  # description="default group",
80
82
  # ip_permissions=[{"groups"=>[{"groupName"=>"default", "userId"=>"312571045469"}], "fromPort"=>-1, "toPort"=>-1, "ipRanges"=>[], "ipProtocol"=>"icmp"}, {"groups"=>[{"groupName"=>"default", "userId"=>"312571045469"}], "fromPort"=>0, "toPort"=>65535, "ipRanges"=>[], "ipProtocol"=>"tcp"}, {"groups"=>[{"groupName"=>"default", "userId"=>"312571045469"}], "fromPort"=>0, "toPort"=>65535, "ipRanges"=>[], "ipProtocol"=>"udp"}],
81
83
  # owner_id="312571045469"
84
+ # vpc_id=nil
82
85
  # >
83
86
  #
84
87
 
@@ -88,6 +91,28 @@ module Fog
88
91
  end
89
92
  end
90
93
 
94
+ # Used to retreive a security group
95
+ # group id is required to get the associated flavor information.
96
+ #
97
+ # You can run the following command to get the details:
98
+ # AWS.security_groups.get_by_id("default")
99
+ #
100
+ # ==== Returns
101
+ #
102
+ #>> AWS.security_groups.get_by_id("sg-123456")
103
+ # <Fog::AWS::Compute::SecurityGroup
104
+ # name="default",
105
+ # description="default group",
106
+ # ip_permissions=[{"groups"=>[{"groupName"=>"default", "userId"=>"312571045469"}], "fromPort"=>-1, "toPort"=>-1, "ipRanges"=>[], "ipProtocol"=>"icmp"}, {"groups"=>[{"groupName"=>"default", "userId"=>"312571045469"}], "fromPort"=>0, "toPort"=>65535, "ipRanges"=>[], "ipProtocol"=>"tcp"}, {"groups"=>[{"groupName"=>"default", "userId"=>"312571045469"}], "fromPort"=>0, "toPort"=>65535, "ipRanges"=>[], "ipProtocol"=>"udp"}],
107
+ # owner_id="312571045469"
108
+ # >
109
+ #
110
+
111
+ def get_by_id(group_id)
112
+ if group_id
113
+ self.class.new(:connection => connection).all('group-id' => group_id).first
114
+ end
115
+ end
91
116
  end
92
117
 
93
118
  end
@@ -34,18 +34,20 @@ module Fog
34
34
  attribute :reason
35
35
  attribute :root_device_name, :aliases => 'rootDeviceName'
36
36
  attribute :root_device_type, :aliases => 'rootDeviceType'
37
+ attribute :security_group_ids, :aliases => 'securityGroupIds'
37
38
  attribute :state, :aliases => 'instanceState', :squash => 'name'
38
39
  attribute :state_reason, :aliases => 'stateReason'
39
40
  attribute :subnet_id, :aliases => 'subnetId'
40
41
  attribute :tenancy
41
42
  attribute :tags, :aliases => 'tagSet'
42
43
  attribute :user_data
44
+ attribute :vpc_id, :aliases => 'vpcId'
43
45
 
44
46
  attr_accessor :password
45
47
  attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username
46
48
 
47
49
  def initialize(attributes={})
48
- self.groups ||= ["default"] unless attributes[:subnet_id]
50
+ self.groups ||= ["default"] unless (attributes[:subnet_id] || attributes[:security_group_ids])
49
51
  self.flavor_id ||= 't1.micro'
50
52
  self.image_id ||= begin
51
53
  self.username = 'ubuntu'
@@ -152,6 +154,7 @@ module Fog
152
154
  'Placement.Tenancy' => tenancy,
153
155
  'RamdiskId' => ramdisk_id,
154
156
  'SecurityGroup' => groups,
157
+ 'SecurityGroupId' => security_group_ids,
155
158
  'SubnetId' => subnet_id,
156
159
  'UserData' => user_data
157
160
  }
@@ -20,9 +20,9 @@ module Fog
20
20
 
21
21
  def all(options = {})
22
22
  requires :zone
23
- options['MaxItems'] ||= max_items
24
- options['Name'] ||= name
25
- options['Type'] ||= type
23
+ options['maxitems'] ||= max_items
24
+ options['name'] ||= name
25
+ options['type'] ||= type
26
26
  data = connection.list_resource_record_sets(zone.id, options).body
27
27
  merge_attributes(data.reject {|key, value| !['IsTruncated', 'MaxItems', 'NextRecordName', 'NextRecordType'].include?(key)})
28
28
  # leave out the default, read only records
@@ -4,20 +4,21 @@ module Fog
4
4
  class ELB
5
5
  class Listener < Fog::Model
6
6
 
7
- attribute :policy_names, :aliases => 'PolicyNames'
8
- attribute :instance_port, :aliases => 'InstancePort'
9
- attribute :lb_port, :aliases => 'LoadBalancerPort'
10
- attribute :protocol, :aliases => 'Protocol'
11
- attribute :ssl_id, :aliases => 'SSLCertificateId'
7
+ attribute :policy_names, :aliases => 'PolicyNames'
8
+ attribute :instance_port, :aliases => 'InstancePort'
9
+ attribute :instance_protocol, :aliases => 'InstanceProtocol'
10
+ attribute :lb_port, :aliases => 'LoadBalancerPort'
11
+ attribute :protocol, :aliases => 'Protocol'
12
+ attribute :ssl_id, :aliases => 'SSLCertificateId'
12
13
 
13
14
  def initialize(attributes={})
14
15
  # set defaults, which may be overridden in super
15
- merge_attributes(:policy_names => [], :instance_port => 80, :lb_port => 80, :protocol => 'HTTP')
16
+ merge_attributes(:policy_names => [], :instance_port => 80, :instance_protocol => 'HTTP', :lb_port => 80, :protocol => 'HTTP')
16
17
  super
17
18
  end
18
19
 
19
20
  def save
20
- requires :load_balancer, :instance_port, :lb_port, :protocol
21
+ requires :load_balancer, :instance_port, :lb_port, :protocol, :instance_protocol
21
22
  connection.create_load_balancer_listeners(load_balancer.id, [to_params])
22
23
  reload
23
24
  end
@@ -44,6 +45,7 @@ module Fog
44
45
  def to_params
45
46
  {
46
47
  'InstancePort' => instance_port,
48
+ 'InstanceProtocol' => instance_protocol,
47
49
  'LoadBalancerPort' => lb_port,
48
50
  'Protocol' => protocol,
49
51
  'SSLCertificateId' => ssl_id
@@ -96,6 +96,12 @@ module Fog
96
96
  reload
97
97
  end
98
98
 
99
+ def set_listener_ssl_certificate(port, ssl_certificate_id)
100
+ requires :id
101
+ connection.set_load_balancer_listener_ssl_certificate(id, port, ssl_certificate_id)
102
+ reload
103
+ end
104
+
99
105
  def unset_listener_policy(port)
100
106
  set_listener_policy(port, [])
101
107
  end
@@ -1,5 +1,6 @@
1
1
  require 'fog/core/model'
2
2
  require 'fog/aws/models/storage/files'
3
+ require 'fog/aws/models/storage/versions'
3
4
 
4
5
  module Fog
5
6
  module Storage
@@ -58,6 +59,26 @@ module Fog
58
59
  @payer = new_payer
59
60
  end
60
61
 
62
+ def versioning?
63
+ requires :key
64
+ data = connection.get_bucket_versioning(key)
65
+ data.body['VersioningConfiguration']['Status'] == 'Enabled'
66
+ end
67
+
68
+ def versioning=(new_versioning)
69
+ requires :key
70
+ connection.put_bucket_versioning(key, new_versioning ? 'Enabled' : 'Suspended')
71
+ end
72
+
73
+ def versions
74
+ @versions ||= begin
75
+ Fog::Storage::AWS::Versions.new(
76
+ :directory => self,
77
+ :connection => connection
78
+ )
79
+ end
80
+ end
81
+
61
82
  def public=(new_public)
62
83
  if new_public
63
84
  @acl = 'public-read'
@@ -1,4 +1,5 @@
1
1
  require 'fog/core/model'
2
+ require 'fog/aws/models/storage/versions'
2
3
 
3
4
  module Fog
4
5
  module Storage
@@ -21,6 +22,8 @@ module Fog
21
22
  attribute :metadata
22
23
  attribute :owner, :aliases => 'Owner'
23
24
  attribute :storage_class, :aliases => ['x-amz-storage-class', 'StorageClass']
25
+ attribute :encryption, :aliases => 'x-amz-server-side-encryption'
26
+ attribute :version, :aliases => 'x-amz-version-id'
24
27
 
25
28
  def acl=(new_acl)
26
29
  valid_acls = ['private', 'public-read', 'public-read-write', 'authenticated-read']
@@ -50,12 +53,13 @@ module Fog
50
53
  requires :directory, :key
51
54
  connection.copy_object(directory.key, key, target_directory_key, target_file_key, options)
52
55
  target_directory = connection.directories.new(:key => target_directory_key)
53
- target_directory.files.get(target_file_key)
56
+ target_directory.files.head(target_file_key)
54
57
  end
55
58
 
56
- def destroy
59
+ def destroy(options = {})
57
60
  requires :directory, :key
58
- connection.delete_object(directory.key, key)
61
+ attributes[:body] = nil if options['versionId'] == version
62
+ connection.delete_object(directory.key, key, options)
59
63
  true
60
64
  end
61
65
 
@@ -115,6 +119,7 @@ module Fog
115
119
  options['Expires'] = expires if expires
116
120
  options.merge!(metadata)
117
121
  options['x-amz-storage-class'] = storage_class if storage_class
122
+ options['x-amz-server-side-encryption'] = encryption if encryption
118
123
 
119
124
  data = connection.put_object(directory.key, key, body, options)
120
125
  data.headers['ETag'].gsub!('"','')
@@ -123,9 +128,18 @@ module Fog
123
128
  true
124
129
  end
125
130
 
126
- def url(expires)
131
+ def url(expires, options = {})
127
132
  requires :key
128
- collection.get_https_url(key, expires)
133
+ collection.get_https_url(key, expires, options)
134
+ end
135
+
136
+ def versions
137
+ @versions ||= begin
138
+ Fog::Storage::AWS::Versions.new(
139
+ :file => self,
140
+ :connection => connection
141
+ )
142
+ end
129
143
  end
130
144
 
131
145
  private
@@ -78,14 +78,14 @@ module Fog
78
78
  end
79
79
  end
80
80
 
81
- def get_http_url(key, expires)
81
+ def get_http_url(key, expires, options = {})
82
82
  requires :directory
83
- connection.get_object_http_url(directory.key, key, expires)
83
+ connection.get_object_http_url(directory.key, key, expires, options)
84
84
  end
85
85
 
86
- def get_https_url(key, expires)
86
+ def get_https_url(key, expires, options = {})
87
87
  requires :directory
88
- connection.get_object_https_url(directory.key, key, expires)
88
+ connection.get_object_https_url(directory.key, key, expires, options)
89
89
  end
90
90
 
91
91
  def head(key, options = {})
@@ -31,7 +31,7 @@ module Fog
31
31
  when 'architecture', 'clientToken', 'dnsName', 'imageId',
32
32
  'instanceId', 'instanceType', 'ipAddress', 'kernelId',
33
33
  'keyName', 'platform', 'privateDnsName', 'privateIpAddress', 'ramdiskId',
34
- 'reason', 'rootDeviceType'
34
+ 'reason', 'rootDeviceType', 'subnetId', 'vpcId'
35
35
  @instance[name] = value
36
36
  when 'attachTime'
37
37
  @block_device_mapping[name] = Time.parse(value)
@@ -46,7 +46,7 @@ module Fog
46
46
  when 'groupId', 'groupName'
47
47
  case @context.last
48
48
  when 'groupSet'
49
- @reservation['groupSet'] << value
49
+ @reservation['groupSet'] << value if @context.first != "instancesSet"
50
50
  when 'placement'
51
51
  @instance['placement'][name] = value
52
52
  end
@@ -40,9 +40,9 @@ module Fog
40
40
  end
41
41
  when 'groups'
42
42
  @in_groups = false
43
- when 'groupDescription', 'ownerId'
43
+ when 'groupDescription', 'ownerId', 'vpcId'
44
44
  @security_group[name] = value
45
- when 'groupName'
45
+ when 'groupId','groupName'
46
46
  if @in_groups
47
47
  @group[name] = value
48
48
  else
@@ -24,7 +24,7 @@ module Fog
24
24
  when 'Value'
25
25
  case @current_attribute_name
26
26
  when 'ApproximateFirstReceiveTimestamp', 'SentTimestamp'
27
- @message['Attributes'][@current_attribute_name] = Time.at(@value.to_i)
27
+ @message['Attributes'][@current_attribute_name] = Time.at(@value.to_i / 1000.0)
28
28
  when 'ApproximateReceiveCount'
29
29
  @message['Attributes'][@current_attribute_name] = @value.to_i
30
30
  else
@@ -5,6 +5,8 @@ module Fog
5
5
  class RDS < Fog::Service
6
6
 
7
7
  class IdentifierTaken < Fog::Errors::Error; end
8
+
9
+ class AuthorizationAlreadyExists < Fog::Errors::Error; end
8
10
 
9
11
  requires :aws_access_key_id, :aws_secret_access_key
10
12
  recognizes :region, :host, :path, :port, :scheme, :persistent
@@ -57,9 +59,43 @@ module Fog
57
59
 
58
60
  class Mock
59
61
 
62
+ def self.data
63
+ @data ||= Hash.new do |hash, region|
64
+ owner_id = Fog::AWS::Mock.owner_id
65
+ hash[region] = Hash.new do |region_hash, key|
66
+ region_hash[key] = {
67
+ :servers => {},
68
+ :security_groups => {}
69
+ }
70
+ end
71
+ end
72
+ end
73
+
74
+ def self.reset
75
+ @data = nil
76
+ end
77
+
60
78
  def initialize(options={})
61
- Fog::Mock.not_implemented
79
+
80
+ @aws_access_key_id = options[:aws_access_key_id]
81
+
82
+ @region = options[:region] || 'us-east-1'
83
+
84
+ unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2'].include?(@region)
85
+ raise ArgumentError, "Unknown region: #{@region.inspect}"
86
+ end
87
+
88
+ end
89
+
90
+ def data
91
+ self.class.data[@region][@aws_access_key_id]
62
92
  end
93
+
94
+ def reset_data
95
+ self.class.data[@region].delete(@aws_access_key_id)
96
+ end
97
+
98
+
63
99
 
64
100
  end
65
101
 
@@ -79,7 +115,7 @@ module Fog
79
115
  #
80
116
  # ==== Parameters
81
117
  # * options<~Hash> - config arguments for connection. Defaults to {}.
82
- # * region<~String> - optional region to use, in ['eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'ap-southeast-1']
118
+ # * region<~String> - optional region to use. For instance, 'eu-west-1', 'us-east-1' and etc.
83
119
  #
84
120
  # ==== Returns
85
121
  # * ELB object with connection to AWS.
@@ -90,22 +126,7 @@ module Fog
90
126
  @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
91
127
 
92
128
  options[:region] ||= 'us-east-1'
93
- @host = options[:host] || case options[:region]
94
- when 'ap-northeast-1'
95
- 'rds.ap-northeast-1.amazonaws.com'
96
- when 'ap-southeast-1'
97
- 'rds.ap-southeast-1.amazonaws.com'
98
- when 'eu-west-1'
99
- 'rds.eu-west-1.amazonaws.com'
100
- when 'us-east-1'
101
- 'rds.us-east-1.amazonaws.com'
102
- when 'us-west-1'
103
- 'rds.us-west-1.amazonaws.com'
104
- when 'us-west-2'
105
- 'rds.us-west-2.amazonaws.com'
106
- else
107
- raise ArgumentError, "Unknown region: #{options[:region].inspect}"
108
- end
129
+ @host = options[:host] || "rds.#{options[:region]}.amazonaws.com"
109
130
  @path = options[:path] || '/'
110
131
  @persistent = options[:persistent] || false
111
132
  @port = options[:port] || 443
@@ -152,6 +173,8 @@ module Fog
152
173
  raise Fog::AWS::RDS::NotFound.slurp(error, match[2])
153
174
  when 'DBParameterGroupAlreadyExists'
154
175
  raise Fog::AWS::RDS::IdentifierTaken.slurp(error, match[2])
176
+ when 'AuthorizationAlreadyExists'
177
+ raise Fog::AWS::RDS::AuthorizationAlreadyExists.slurp(error, match[2])
155
178
  else
156
179
  raise
157
180
  end