brightbox-cli 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. data/README +13 -17
  2. data/README.rdoc +13 -17
  3. data/brightbox-cli.gemspec +1 -1
  4. data/lib/brightbox-cli/accounts.rb +7 -0
  5. data/lib/brightbox-cli/api.rb +3 -0
  6. data/lib/brightbox-cli/commands/config-client-list.rb +1 -1
  7. data/lib/brightbox-cli/commands/firewall-rules-create.rb +4 -0
  8. data/lib/brightbox-cli/commands/firewall-rules-update.rb +49 -0
  9. data/lib/brightbox-cli/commands/groups-show.rb +1 -1
  10. data/lib/brightbox-cli/commands/groups-update.rb +3 -1
  11. data/lib/brightbox-cli/commands/images-destroy.rb +1 -1
  12. data/lib/brightbox-cli/commands/images-list.rb +9 -3
  13. data/lib/brightbox-cli/commands/images-register.rb +1 -1
  14. data/lib/brightbox-cli/commands/images-update.rb +3 -1
  15. data/lib/brightbox-cli/commands/lbs-update.rb +4 -2
  16. data/lib/brightbox-cli/commands/{servers-activate-cloud.rb → servers-activate-console.rb} +2 -1
  17. data/lib/brightbox-cli/commands/servers-update.rb +2 -1
  18. data/lib/brightbox-cli/config.rb +17 -2
  19. data/lib/brightbox-cli/detailed_server.rb +1 -1
  20. data/lib/brightbox-cli/firewall_rule.rb +6 -0
  21. data/lib/brightbox-cli/gli_global_hooks.rb +8 -1
  22. data/lib/brightbox-cli/images.rb +22 -1
  23. data/lib/brightbox-cli/nilable_hash.rb +7 -0
  24. data/lib/brightbox-cli/server_groups.rb +0 -6
  25. data/lib/brightbox-cli/servers.rb +6 -2
  26. data/lib/brightbox-cli/tables.rb +13 -0
  27. data/lib/brightbox-cli/vendor/fog/README.rdoc +2 -9
  28. data/lib/brightbox-cli/vendor/fog/Rakefile +3 -2
  29. data/lib/brightbox-cli/vendor/fog/changelog.txt +213 -0
  30. data/lib/brightbox-cli/vendor/fog/docs/_layouts/default.html +1 -1
  31. data/lib/brightbox-cli/vendor/fog/docs/about/contributing.markdown +1 -1
  32. data/lib/brightbox-cli/vendor/fog/docs/about/getting_started.markdown +28 -3
  33. data/lib/brightbox-cli/vendor/fog/docs/dns/index.markdown +1 -1
  34. data/lib/brightbox-cli/vendor/fog/docs/index.markdown +2 -10
  35. data/lib/brightbox-cli/vendor/fog/docs/storage/index.markdown +2 -2
  36. data/lib/brightbox-cli/vendor/fog/fog.gemspec +6 -5
  37. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/auto_scaling.rb +3 -1
  38. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_formation.rb +3 -0
  39. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_watch.rb +3 -1
  40. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/compute.rb +5 -3
  41. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/elb.rb +4 -2
  42. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/emr.rb +133 -0
  43. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/addresses.rb +1 -1
  44. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/key_pairs.rb +1 -1
  45. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/security_groups.rb +1 -1
  46. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/server.rb +4 -2
  47. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/servers.rb +1 -1
  48. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/snapshots.rb +1 -1
  49. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/spot_request.rb +21 -4
  50. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/spot_requests.rb +45 -1
  51. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/volumes.rb +1 -1
  52. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elb/load_balancer.rb +2 -0
  53. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/storage/file.rb +1 -1
  54. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cdn/get_invalidation_list.rb +0 -1
  55. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_formation/update_stack.rb +19 -0
  56. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/add_instance_groups.rb +28 -0
  57. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/add_job_flow_steps.rb +17 -0
  58. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/describe_job_flows.rb +140 -0
  59. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/modify_instance_groups.rb +17 -0
  60. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/run_job_flow.rb +19 -0
  61. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/set_termination_protection.rb +17 -0
  62. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/emr/terminate_job_flows.rb +17 -0
  63. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/rds.rb +3 -1
  64. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_formation/create_stack.rb +6 -0
  65. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_formation/update_stack.rb +62 -0
  66. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +141 -36
  67. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/delete_security_group.rb +25 -0
  68. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/delete_tags.rb +1 -1
  69. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_addresses.rb +2 -2
  70. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_availability_zones.rb +5 -2
  71. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_images.rb +1 -1
  72. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_instances.rb +15 -6
  73. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_key_pairs.rb +2 -2
  74. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_regions.rb +2 -2
  75. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_reserved_instances.rb +1 -1
  76. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_security_groups.rb +2 -2
  77. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_snapshots.rb +4 -4
  78. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_volumes.rb +2 -2
  79. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/modify_instance_attribute.rb +1 -1
  80. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/revoke_security_group_ingress.rb +41 -29
  81. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/describe_load_balancers.rb +3 -3
  82. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +1 -1
  83. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/add_instance_groups.rb +46 -0
  84. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/add_job_flow_steps.rb +49 -0
  85. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/describe_job_flows.rb +108 -0
  86. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/modify_instance_groups.rb +40 -0
  87. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/run_job_flow.rb +106 -0
  88. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/set_termination_protection.rb +39 -0
  89. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/emr/terminate_job_flows.rb +37 -0
  90. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/simpledb/get_attributes.rb +2 -2
  91. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/simpledb/select.rb +1 -1
  92. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/acl_utils.rb +62 -0
  93. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_acl.rb +7 -1
  94. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_acl.rb +7 -1
  95. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_url.rb +2 -2
  96. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_bucket_acl.rb +2 -2
  97. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/put_object_acl.rb +1 -1
  98. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/ses.rb +1 -1
  99. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/simpledb.rb +2 -0
  100. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sns.rb +3 -1
  101. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sqs.rb +4 -2
  102. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/storage.rb +10 -2
  103. data/lib/brightbox-cli/vendor/fog/lib/fog/aws.rb +26 -1
  104. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/aws.rb +8 -4
  105. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/bluebox.rb +2 -2
  106. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/brightbox.rb +1 -1
  107. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/dnsimple.rb +1 -1
  108. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/dnsmadeeasy.rb +1 -1
  109. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/ecloud.rb +1 -1
  110. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/glesys.rb +1 -1
  111. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/go_grid.rb +1 -1
  112. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/google.rb +1 -1
  113. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/libvirt.rb +1 -1
  114. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/linode.rb +2 -2
  115. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/local.rb +1 -1
  116. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/new_servers.rb +1 -1
  117. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/ninefold.rb +2 -2
  118. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/openstack.rb +1 -1
  119. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/rackspace.rb +3 -3
  120. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/slicehost.rb +1 -1
  121. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/stormondemand.rb +1 -1
  122. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/virtual_box.rb +1 -1
  123. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/vmfusion.rb +1 -1
  124. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/voxel.rb +1 -1
  125. data/lib/brightbox-cli/vendor/fog/lib/fog/bin/zerigo.rb +1 -1
  126. data/lib/brightbox-cli/vendor/fog/lib/fog/bin.rb +1 -1
  127. data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/compute.rb +2 -0
  128. data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/cloud_ip.rb +10 -2
  129. data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server.rb +11 -3
  130. data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server_group.rb +9 -0
  131. data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +13 -0
  132. data/lib/brightbox-cli/vendor/fog/lib/fog/core/connection.rb +1 -1
  133. data/lib/brightbox-cli/vendor/fog/lib/fog/core/credentials.rb +3 -3
  134. data/lib/brightbox-cli/vendor/fog/lib/fog/core/deprecation.rb +2 -2
  135. data/lib/brightbox-cli/vendor/fog/lib/fog/core/logger.rb +8 -3
  136. data/lib/brightbox-cli/vendor/fog/lib/fog/core/mock.rb +4 -0
  137. data/lib/brightbox-cli/vendor/fog/lib/fog/core/provider.rb +7 -2
  138. data/lib/brightbox-cli/vendor/fog/lib/fog/core/service.rb +8 -2
  139. data/lib/brightbox-cli/vendor/fog/lib/fog/dnsmadeeasy/models/dns/record.rb +3 -2
  140. data/lib/brightbox-cli/vendor/fog/lib/fog/dynect/dns.rb +25 -3
  141. data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/compute.rb +1 -1
  142. data/lib/brightbox-cli/vendor/fog/lib/fog/go_grid/requests/compute/grid_server_power.rb +1 -1
  143. data/lib/brightbox-cli/vendor/fog/lib/fog/google/models/storage/file.rb +1 -1
  144. data/lib/brightbox-cli/vendor/fog/lib/fog/google/requests/storage/get_object_url.rb +2 -2
  145. data/lib/brightbox-cli/vendor/fog/lib/fog/google/storage.rb +1 -1
  146. data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/models/storage/file.rb +8 -6
  147. data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/models/storage/files.rb +3 -2
  148. data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/requests/storage/head_namespace.rb +20 -0
  149. data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/storage.rb +4 -2
  150. data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/server.rb +7 -1
  151. data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/create_server.rb +6 -11
  152. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/load_balancers.rb +1 -0
  153. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/callback.rb +1 -1
  154. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/record.rb +1 -1
  155. data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/models/dns/zone.rb +1 -1
  156. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/dns.rb +1 -0
  157. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/models/dns/record.rb +7 -3
  158. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/models/dns/zone.rb +1 -1
  159. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/parsers/dns/create_record.rb +8 -2
  160. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/parsers/dns/get_record.rb +17 -5
  161. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/parsers/dns/get_records.rb +10 -2
  162. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/get_record.rb +1 -1
  163. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/get_records.rb +7 -8
  164. data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/requests/dns/update_record.rb +43 -0
  165. data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/balancers.rb +1 -1
  166. data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/configs.rb +1 -1
  167. data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/images.rb +1 -1
  168. data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/servers.rb +1 -1
  169. data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand/models/compute/templates.rb +1 -1
  170. data/lib/brightbox-cli/vendor/fog/lib/fog/terremark/vcloud.rb +1 -1
  171. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/compute.rb +41 -23
  172. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/models/compute/server.rb +19 -0
  173. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/models/compute/servers.rb +8 -2
  174. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/datacenters.rb +34 -0
  175. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +83 -10
  176. data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/requests/compute/vm_clone.rb +76 -37
  177. data/lib/brightbox-cli/vendor/fog/lib/fog.rb +1 -1
  178. data/lib/brightbox-cli/vendor/fog/tests/aws/models/cloud_watch/alarm_data_tests.rb +8 -6
  179. data/lib/brightbox-cli/vendor/fog/tests/aws/models/cloud_watch/alarm_history_tests.rb +3 -1
  180. data/lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb +15 -10
  181. data/lib/brightbox-cli/vendor/fog/tests/aws/models/elb/model_tests.rb +4 -4
  182. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/cloud_formation/stack_tests.rb +14 -0
  183. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/instance_tests.rb +16 -1
  184. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/security_group_tests.rb +251 -32
  185. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/tag_tests.rb +2 -2
  186. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/emr/helper.rb +172 -0
  187. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/emr/instance_group_tests.rb +106 -0
  188. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/emr/job_flow_tests.rb +88 -0
  189. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/acl_utils_tests.rb +209 -0
  190. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/bucket_tests.rb +80 -55
  191. data/lib/brightbox-cli/vendor/fog/tests/aws/requests/storage/object_tests.rb +42 -24
  192. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/account_tests.rb +11 -6
  193. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/api_client_tests.rb +23 -12
  194. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/cloud_ip_tests.rb +29 -20
  195. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/helper.rb +70 -14
  196. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/image_tests.rb +17 -14
  197. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/interface_tests.rb +3 -2
  198. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/load_balancer_tests.rb +57 -11
  199. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_group_tests.rb +29 -22
  200. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_tests.rb +38 -21
  201. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/server_type_tests.rb +7 -6
  202. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/user_tests.rb +11 -16
  203. data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/zone_tests.rb +7 -6
  204. data/lib/brightbox-cli/vendor/fog/tests/compute/helper.rb +1 -1
  205. data/lib/brightbox-cli/vendor/fog/tests/core/credential_tests.rb +2 -2
  206. data/lib/brightbox-cli/vendor/fog/tests/core/mocking_tests.rb +60 -0
  207. data/lib/brightbox-cli/vendor/fog/tests/dns/models/record_tests.rb +4 -2
  208. data/lib/brightbox-cli/vendor/fog/tests/dns/models/records_tests.rb +4 -2
  209. data/lib/brightbox-cli/vendor/fog/tests/dns/models/zone_tests.rb +3 -1
  210. data/lib/brightbox-cli/vendor/fog/tests/dns/models/zones_tests.rb +4 -2
  211. data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/helper.rb +4 -2
  212. data/lib/brightbox-cli/vendor/fog/tests/glesys/requests/compute/server_tests.rb +1 -1
  213. data/lib/brightbox-cli/vendor/fog/tests/helper.rb +4 -0
  214. data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/dns_tests.rb +16 -12
  215. data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/records_tests.rb +13 -11
  216. data/lib/brightbox-cli/vendor/fog/tests/slicehost/requests/dns/dns_tests.rb +58 -11
  217. data/lib/brightbox-cli/vendor/fog/tests/vsphere/compute_tests.rb +18 -10
  218. data/lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_clone_tests.rb +3 -7
  219. data/lib/brightbox-cli/version.rb +1 -1
  220. data/lib/brightbox_cli.rb +1 -0
  221. data/spec/fixtures/vcr_cassettes/list_server_groups.yml +37 -6
  222. data/spec/nilable_hash_spec.rb +30 -0
  223. metadata +48 -18
  224. data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/hash_to_acl.rb +0 -44
@@ -1,3 +1,216 @@
1
+ 1.1.1 11/11/2011 a468aa9a3445aae4f496b1a51e26572b8379c3da
2
+ =========================================================
3
+
4
+ Stats! { 'collaborators' => 19, 'downloads' => 300403, 'forks' => 300, 'open_issues' => 14, 'watchers' => 1667 }
5
+
6
+ [core]
7
+ loosen net-ssh dependency to avoid chef conflict. thanks geemus
8
+
9
+ [misc]
10
+ 1.1.0 changelog. thanks geemus
11
+
12
+
13
+ 1.1.0 11/11/2011 b706c7ed66c2e760fdd6222e38c68768575483b2
14
+ =========================================================
15
+
16
+ Stats! { 'collaborators' => 19, 'downloads' => 300383, 'forks' => 300, 'open_issues' => 16, 'watchers' => 1667 }
17
+
18
+ MVP! Michael Zeng
19
+
20
+ [Compute|Libvirt]
21
+ Take into account a query string can be empty, different on some rubies it gives nil, on some empty string. thanks Patrick Debois
22
+
23
+ [OpenStack|compute]
24
+ fix v2.0 auth endpoints. thanks Todd Willey
25
+ default metadata to empy hash. thanks Todd Willey
26
+ add zone awareness. thanks Todd Willey
27
+
28
+ [aws]
29
+ add us-west-2 region. thanks geemus
30
+
31
+ [aws|cloud_watch]
32
+ mark tests pending when mocked. thanks geemus
33
+
34
+ [aws|cloudwatch]
35
+ Add support for put-metric-alarm call. thanks Jens Braeuer
36
+ Remove duplicate RequestId from response. thanks Jens Braeuer
37
+ Add mocked implementation of put_metric_alarm. thanks Jens Braeuer
38
+ Fix whitespace. thanks Jens Braeuer
39
+ Fix merge error. thanks Jens Braeuer
40
+ Add mocked version of put_metric_alarm. thanks Jens Braeuer
41
+
42
+ [aws|compute]
43
+ Mock modify_image_attribute add/remove users. thanks Dan Peterson
44
+ Allow mock tagging to work across accounts. thanks Dan Peterson
45
+ Fix new instance eventual consistency for the non-filtered case. thanks Dan Peterson
46
+ Update security group operations. thanks Dan Peterson
47
+ Test for more invalid security group request input when mocking. thanks Dan Peterson
48
+ Fix a bug in delete_tags, but come up against a bug in AWS where tags aren't deleted if the resource still exists. thanks Dylan Egan
49
+ tags are reset when reloading. #570. thanks Dylan Egan
50
+ fixed sopt_instance_request reply parsing when the original request contained a device mapping. thanks MaF
51
+ wait_for reload then add server tags. thanks geemus
52
+ spot request fixes. thanks geemus
53
+ tweaks for spot request bootstrap. thanks geemus
54
+ save tags for spot_requests#bootstrap. thanks geemus
55
+ update ami for windows. thanks geemus
56
+
57
+ [aws|elb]
58
+ Missed a change as part of #545. thanks Dan Peterson
59
+ use a set union to register new instances. thanks Dylan Egan
60
+ return only the instance IDs on describe. Use only available availability zones. :v:. thanks Dylan Egan
61
+ attribute aliases for CanonicalHostedZoneName(ID). :v:. thanks Dylan Egan
62
+ eventually consistent, like me getting a haircut. :v:. thanks Dylan Egan
63
+
64
+ [aws|emr]
65
+ mark tests pending when mocked. thanks geemus
66
+
67
+ [aws|iam]
68
+ slight cleanup and test with a certificate chain. :cake:. thanks Dylan Egan
69
+
70
+ [aws|mock]
71
+ Dig into mock data instead of instantiating new service objects. thanks Dan Peterson
72
+
73
+ [aws|storage]
74
+ ensure path isn't empty when specifying endpoint. thanks geemus
75
+
76
+ [brightbox]
77
+ Fixed incorrect call to reset_ftp_password. thanks Paul Thornthwaite
78
+
79
+ [brightbox|compute]
80
+ format fixes for tests. thanks geemus
81
+
82
+ [core]
83
+ treat boolean values as a boolean. thanks Peter Meier
84
+ fix attribute squashing with : in key. thanks Peter Meier
85
+ all services should recognize :connection_options. thanks geemus
86
+ separate loggers for deprecations/warnings. thanks geemus
87
+ avoid duplicates in Fog.providers. thanks geemus
88
+ more useful structure for Fog.providers. thanks geemus
89
+ add newlines to logger messages. thanks geemus
90
+ update stats raketask to point to org. thanks geemus
91
+ toss out nil-value keys when checking required credentials. thanks geemus
92
+
93
+ [dns]
94
+ Made model tests use uniq domain names. thanks Brian Hartsock
95
+
96
+ [dnsmadeeasy|dns]
97
+ Fix Fog::DNS::DNSMadeEasy::Record#save to handle updating a record correctly. thanks Peter Weldon
98
+
99
+ [docs]
100
+ update links to point to http://github.com/fog/fog. thanks geemus
101
+
102
+ [dynect|dns]
103
+ Automatically poll jobs if we get them. Closes #575. thanks Dan Peterson
104
+
105
+ [misc]
106
+ Change response parameter. thanks Alan Ivey
107
+ Missing HEAD method. thanks Andrew Newman
108
+ Missing HEAD method. thanks Andrew Newman
109
+ Putting version back. thanks Andrew Newman
110
+ Reformatting and making consistent with other classes. thanks Andrew Newman
111
+ Missed renam to head_namespace. thanks Andrew Newman
112
+ Reverting version and date in gemspec. thanks Andrew Newman
113
+ Formatting. thanks Andrew Newman
114
+ Removed puts of element name. thanks Arvid Andersson
115
+ Changes to allow EMR control through fog. thanks Bob Briski
116
+ Added EMR functions for AWS. thanks Bob Briski
117
+ Adding tests. thanks Bob Briski
118
+ merge EMR changes with upstream repo. thanks Bob Briski
119
+ (#10055) Search vmFolder inventory vs children. thanks Carl Caum
120
+ Adding a path attribute to the vm_mob_ref hash. thanks Carl Caum
121
+ Cleanup Attributes#merge_attributes. thanks Hemant Kumar
122
+ Update S3 doc example to show current API. thanks Jason Roelofs
123
+ Restructure main website's navigation. thanks Jason Roelofs
124
+ Add CloudFormation UpdateStack call. thanks Jason Roelofs
125
+ Minor whitespace change. thanks Jens Braeuer
126
+ Trailing whitespace cleanup. thanks Jens Braeuer
127
+ Whitespace cleanup. thanks Jens Braeuer
128
+ Fix merge error. thanks Jens Braeuer
129
+ Removed statement about @geemus being only member of collaborators list since it's not true anymore. thanks John Wang
130
+ Fixes Fog::AWS::Storage#put_(bucket|object)_acl. thanks Jonas Pfenniger
131
+ Randomize bucket names in tests. thanks Jonas Pfenniger
132
+ Fix AWS S3 bucket and object tests. thanks Jonas Pfenniger
133
+ (#10570) Use nil in-place of missing attributes. thanks Kelsey Hightower
134
+ (#10570) Update `Fog::Compute::Vsphere` tests. thanks Kelsey Hightower
135
+ We use 'Key' for all S3 objects now. thanks Kevin Menard
136
+ Implemented mocks for Zerigo. thanks Kevin Menard
137
+ Updated docs to use newer arg, rather than the old deprecated one. thanks Kevin Menard
138
+ Added the ability to search Zerigo records for a particular zone. thanks Kevin Menard
139
+ Return the only element of the array, not the array itself. thanks Kevin Menard
140
+ Fixed an issue whereby saving an existing record in Zerigo would nil out its value. thanks Kevin Menard
141
+ added DeleteAlarms, DescribeAlarms and PutMetricAlarms. thanks Michael Zeng
142
+ re-adding files. thanks Michael Zeng
143
+ adding describe_alarm_history. thanks Michael Zeng
144
+ adding diable/enable alarm actions. thanks Michael Zeng
145
+ added DescribeAlarmHistory request and parser. thanks Michael Zeng
146
+ fixing describe_alarms and describe_alarms_for_metric requests. thanks Michael Zeng
147
+ cleaned up requesters and parsers. thanks Michael Zeng
148
+ added SetAlarmState. thanks Michael Zeng
149
+ included more response elements, request parameters should now be complete. Included model and collection classes. thanks Michael Zeng
150
+ bug fixes. thanks Michael Zeng
151
+ fixed models and added tests. thanks Michael Zeng
152
+ no need to add rake dep. thanks Michael Zeng
153
+ revert gempspec date change. thanks Michael Zeng
154
+ reverting cloud_watch.rb. thanks Michael Zeng
155
+ reverting cloud_watch.rb. thanks Michael Zeng
156
+ reverting cloud_watch.rb. thanks Michael Zeng
157
+ reverting cloud_watch.rb. thanks Michael Zeng
158
+ reverting cloud_watch.rb. thanks Michael Zeng
159
+ added newline to the end of file. thanks Michael Zeng
160
+ removed all tabs. thanks Michael Zeng
161
+ added alarm_data_tests. thanks Michael Zeng
162
+ spacing change. thanks Michael Zeng
163
+ AWS#hash_to_acl - add support for EmailAddress and URI grantee types. thanks Nathan Sutton
164
+ Test and improve Fog::Storage::AWS.hash_to_acl. thanks Nathan Sutton
165
+ Adding a method to unmock Fog. Addresses issue #594. thanks Nathan Sutton
166
+ Adding documentation for Fog.unmock! and Fog::Mock.reset. thanks Nathan Sutton
167
+ added linode ssh support. thanks Nicholas Ricketts
168
+ added linode ssh support with proper public ip address. thanks Nicholas Ricketts
169
+ cleaned up code to use att_XX methods. thanks Nicholas Ricketts
170
+ clean up public_ip_address code for linode. thanks Nicholas Ricketts
171
+ Seems like rackspace might have changed this. thanks Nik Wakelin
172
+ Sends power parameter in GoGrid's grid_server_power request. thanks Pablo Baños López
173
+ Slicehost uses record-type and zone-id for their API, which messes with Fog internals, so changing these to record_type and zone_id in the parser. thanks Patrick McKenzie
174
+ Did this do anything?. thanks Patrick McKenzie
175
+ Revert "Slicehost uses record-type and zone-id for their API, which messes with Fog internals, so changing these to record_type and zone_id in the parser.". thanks Patrick McKenzie
176
+ Not having the best of days with git. Revert the reversion of the commit that I really do want to make. thanks Patrick McKenzie
177
+ Slicehost uses record-type and zone-id for their API, which messes with Fog internals, so changing these to record_type and zone_id in the parser. thanks Patrick McKenzie
178
+ Do not touch .gitignore. thanks Patrick McKenzie
179
+ Fixing Slicehost DNS so that a) tests pass b) token names map to what Fog expects -- record_type not record-type, value not data, etc c) creation of new DNS records possible. thanks Patrick McKenzie
180
+ 1) Fix so that getting a single record actually works. 2) zone.records currently returns all records in account, not just records for that zone. Add failing test (temporarily, assumes test account has existing zones for this to actually fail) + fix. 3) Add in data alias for record.value, just in case someone needs it, as Slicehost calls this data. thanks Patrick McKenzie
181
+ Allow updates of DNS records. Updates on zones not supported yet. thanks Patrick McKenzie
182
+ Fixing parsing of zone.records.get(id) so that it parses a single record properly rather than attempting to parse a list of records improperly. Fixing tests to match this (expected) behavior rather than work-around the broken way. thanks Patrick McKenzie
183
+ Getting it so zone.records works as expected (loads all records, for that zone only). thanks Patrick McKenzie
184
+ simplification. thanks Peter Meier
185
+ Optimize vSphere convert_vm_mob_ref_to_attr_hash. thanks Rich Lane
186
+ Compact the way options are mapped to request. thanks Todd Willey
187
+ Allow setting userdata as plain ascii or b64. thanks Todd Willey
188
+ bump excon dep. thanks geemus
189
+ [rackspace][dns] fixes for job request format. thanks geemus
190
+ bump net-ssh dependency. thanks geemus
191
+ tshirt offer should be implicit, rather than explicit. thanks geemus
192
+ add region option to aws sns service recognizes method. thanks lostboy
193
+ add capabilities support to cloudformation createstack request. thanks lostboy
194
+
195
+ [ninefold|storage]
196
+ omit signature in stringtosign. thanks geemus
197
+ check objectid for existence. thanks geemus
198
+ allow overwriting files for consistency. thanks geemus
199
+
200
+ [rackspace|dns]
201
+ Fixed request tests that need unique domain name. thanks Brian Hartsock
202
+ Adapted to changes in callback mechanism. thanks Brian Hartsock
203
+
204
+ [rackspace|load_balancers]
205
+ made lb endpoint configurable. thanks Brian Hartsock
206
+
207
+ [release]
208
+ omit Patrick Debois from future MVP status. thanks geemus
209
+
210
+ [vsphere|compute]
211
+ test fixes. thanks geemus
212
+
213
+
1
214
  1.0.0 09/29/2011 a81be08ef2473af91f16f4926e5b3dfa962a34ae
2
215
  =========================================================
3
216
 
@@ -35,7 +35,7 @@
35
35
  <dl>
36
36
  <dt>version</dt><dd>vX.Y.Z</dd>
37
37
  <dt>install</dt><dd><code>gem install fog</code></dd>
38
- <dt>source</dt><dd><a href="http://github.com/geemus/fog">geemus/fog</a></dd>
38
+ <dt>source</dt><dd><a href="http://github.com/fog/fog">geemus/fog</a></dd>
39
39
  </dl>
40
40
  </header>
41
41
 
@@ -86,7 +86,7 @@ end
86
86
 
87
87
  ## Tests
88
88
 
89
- Now would be a good time to write some tests to make sure what you have written works (and will continue to). I've tried a couple variations on testing in the past, but have settled on consolidated lifetime testing. These vary enough that its hard to give a single simple example, but you can see many examples in "tests/compute/requests/aws":https://github.com/geemus/fog/tree/master/tests/compute/requests/aws/.
89
+ Now would be a good time to write some tests to make sure what you have written works (and will continue to). I've tried a couple variations on testing in the past, but have settled on consolidated lifetime testing. These vary enough that its hard to give a single simple example, but you can see many examples in "tests/compute/requests/aws":https://github.com/fog/fog/tree/master/tests/compute/requests/aws/.
90
90
 
91
91
  ### Highlights:
92
92
  * Reuse the same objects and take them through their whole life cycle (this is much faster, and most of the time if one portion fails the others would anyway).
@@ -65,7 +65,7 @@ After that you should be able to check your directory list in fog or your filesy
65
65
 
66
66
  ## Next Steps
67
67
 
68
- Using the same interface you can also practice working against a real provider (such as Amazon S3). Rather than worrying about signing up for an account right away though, we can use mocks to simulate S3 while we practice.
68
+ Using the same interface you can also practice working against a real provider (such as Amazon S3). Rather than worrying about signing up for an account right away though, we can use mocks to simulate S3 while we practice.
69
69
 
70
70
  This time we will turn on mocking and then, just like before, we will need to make a connection.
71
71
 
@@ -76,8 +76,33 @@ This time we will turn on mocking and then, just like before, we will need to ma
76
76
  :provider => 'AWS'
77
77
  })
78
78
 
79
- You may notice that we used bogus credentials, this is fine since we are just simulating things. To use real S3 you can simply omit `Fog.mock!` and swap in your real credentials.
79
+ You may notice that we used bogus credentials, this is fine since we are just simulating things. To use real S3 you can simply omit Fog.mock! and swap in your real credentials.
80
80
 
81
- Once you have your connection you can go through all the steps you did before, only now you will be working against a real cloud service (or at least a simulated one).
81
+ If you'd like to turn off mocking after turning it on, you can do it at any time and every subsequent connection will be a real connection.
82
+
83
+ # Turn on mocking
84
+ Fog.mock!
85
+
86
+ # Create a mock connection to S3
87
+ storage = Fog::Storage.new({
88
+ :aws_access_key_id => "asdf",
89
+ :aws_secret_access_key => "asdf",
90
+ :provider => "AWS"
91
+ })
92
+
93
+ # Turn off mocking
94
+ Fog.unmock!
95
+
96
+ # Create a real connection to S3
97
+ storage = Fog::Storage.new({
98
+ :aws_access_key_id => "asdf",
99
+ :aws_secret_access_key => "asdf",
100
+ :provider => "AWS"
101
+ })
102
+
103
+ Don't worry about your losing mock data, it stays around until you reset it or until your process exits.
104
+
105
+ # Reset all mock data
106
+ Fog::Mock.reset
82
107
 
83
108
  Congratulations and welcome to the cloud! Continue your journey at [fog.io](http://fog.io)
@@ -76,4 +76,4 @@ If you already have an account with another service you can just as easily use t
76
76
 
77
77
  ## Go Forth and Resolve
78
78
 
79
- You can see an example of reusing code like this in the <a href="https://github.com/geemus/fog/blob/master/examples/dns_tests.rb">examples folder</a>. Using this makes it easier to give yourself shortcuts to your cloud servers and manage how clients and users access them as well. It is great to have this flexibility so that you can modify your cloud infrastructure as needed while keeping everything ship shape. It also provides a nice way to create custom subdomains for users and just generally round out your cloud solution.
79
+ You can see an example of reusing code like this in the <a href="https://github.com/fog/fog/blob/master/examples/dns_tests.rb">examples folder</a>. Using this makes it easier to give yourself shortcuts to your cloud servers and manage how clients and users access them as well. It is great to have this flexibility so that you can modify your cloud infrastructure as needed while keeping everything ship shape. It also provides a nice way to create custom subdomains for users and just generally round out your cloud solution.
@@ -42,20 +42,12 @@ geemus says: "That should give you everything you need to get started, but let m
42
42
 
43
43
  ## Contributing
44
44
 
45
- * Find something you would like to work on. For suggestions look for the `easy`, `medium` and `hard` tags in the [issues](http://github.com/geemus/fog/issues)
45
+ * Find something you would like to work on. For suggestions look for the `easy`, `medium` and `hard` tags in the [issues](http://github.com/fog/fog/issues)
46
46
  * Fork the project and do your work in a topic branch.
47
47
  * Add shindo tests to prove your code works and run all the tests using `bundle exec rake`.
48
48
  * Rebase your branch against geemus/fog to make sure everything is up to date.
49
49
  * Commit your changes and send a pull request.
50
50
 
51
- ## T-Shirts
52
-
53
- Wonder how you can get a lovely fog shirt? Look no further!
54
-
55
- * Blue shirts go to people who have contributed indirectly, great examples are writing blog posts or giving lightning talks.
56
- * Grey shirts and a follow from @fog go to people who have made it on to the [contributors list](https://github.com/geemus/fog/contributors) by submitting code.
57
- * Black shirts go to people who have made it on to the [collaborators list](https://github.com/api/v2/json/repos/show/geemus/fog/collaborators) by coercing geemus into adding them.
58
-
59
51
  ## Resources
60
52
 
61
53
  Enjoy, and let me know what I can do to continue improving fog!
@@ -65,7 +57,7 @@ Enjoy, and let me know what I can do to continue improving fog!
65
57
  * Stay up to date by following [@fog](http://twitter.com/fog) and/or [@geemus](http://twitter.com/geemus) on Twitter.
66
58
  * Get and give help on the [#ruby-fog](irc://irc.freenode.net/ruby-fog) irc channel on Freenode
67
59
  * Follow release notes and discussions on the [mailing list](http://groups.google.com/group/ruby-fog)
68
- * Report bugs or find tasks to help with in the [issues](http://github.com/geemus/fog/issues)
60
+ * Report bugs or find tasks to help with in the [issues](http://github.com/fog/fog/issues)
69
61
  * Learn about [contributing](/about/contributing.html)
70
62
  * See where fog is used and let the world know how you use it [in the wild](/about/users.html)
71
63
  * Check out blog posts and other mentions in the [press](/about/press.html)
@@ -5,13 +5,13 @@ title: Storage
5
5
 
6
6
  Having Ruby experience makes you hirable; but how can you stand out? You need to demonstrate your abilities. What better way than using Ruby and "the cloud" to store and serve your resume!
7
7
 
8
- In this blog post you will learn to use <a href="http://github.com/geemus/fog">fog</a> - the cloud computing library - to upload your resume to Amazon's <a href="http://aws.amazon.com/s3/">Simple Storage Service</a> (S3), Rackspace's <a href="http://www.rackspacecloud.com/cloud_hosting_products/files">CloudFiles</a> or Google's <a href="http://code.google.com/apis/storage/">Storage for Developers</a>.
8
+ In this blog post you will learn to use <a href="http://github.com/fog/fog">fog</a> - the cloud computing library - to upload your resume to Amazon's <a href="http://aws.amazon.com/s3/">Simple Storage Service</a> (S3), Rackspace's <a href="http://www.rackspacecloud.com/cloud_hosting_products/files">CloudFiles</a> or Google's <a href="http://code.google.com/apis/storage/">Storage for Developers</a>.
9
9
 
10
10
  Here's my out of date resume stored on <a href="http://geemus.s3.amazonaws.com/resume.html">S3</a>, <a href="http://c0023559.cdn2.cloudfiles.rackspacecloud.com/resume.html">CloudFiles</a> and <a href="https://geemus.commondatastorage.googleapis.com/resume.html">Google Storage</a>; programmatically stored in the cloud using this tutorial. NOTE: my boss would like me to add that I'm not currently looking for a new gig ;)
11
11
 
12
12
  Check out those cloud-specific URLs! You could put all three in your job application, add the Ruby source for how you did it, and have your choice of Ruby jobs for being so awesome!
13
13
 
14
- How? The all-clouds-in-one library of choice is <a href="https://github.com/geemus/fog">fog</a>.
14
+ How? The all-clouds-in-one library of choice is <a href="https://github.com/fog/fog">fog</a>.
15
15
 
16
16
  ## Installing fog
17
17
 
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
6
6
  ## If your rubyforge_project name is different, then edit it and comment out
7
7
  ## the sub! line in the Rakefile
8
8
  s.name = 'fog'
9
- s.version = '1.0.0'
10
- s.date = '2011-09-29'
9
+ s.version = '1.1.1'
10
+ s.date = '2011-11-11'
11
11
  s.rubyforge_project = 'fog'
12
12
 
13
13
  ## Make sure your summary is short. The description may be as long
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  ## a custom homepage, consider using your GitHub URL or the like.
21
21
  s.authors = ["geemus (Wesley Beary)"]
22
22
  s.email = 'geemus@gmail.com'
23
- s.homepage = 'http://github.com/geemus/fog'
23
+ s.homepage = 'http://github.com/fog/fog'
24
24
 
25
25
  ## This sections is only necessary if you have C extensions.
26
26
  # s.require_paths << 'ext'
@@ -37,12 +37,12 @@ Gem::Specification.new do |s|
37
37
  ## List your runtime dependencies here. Runtime dependencies are those
38
38
  ## that are needed for an end user to actually USE your code.
39
39
  s.add_dependency('builder')
40
- s.add_dependency('excon', '~>0.7.3')
40
+ s.add_dependency('excon', '~>0.7.4')
41
41
  s.add_dependency('formatador', '~>0.2.0')
42
42
  s.add_dependency('multi_json', '~>1.0.3')
43
43
  s.add_dependency('mime-types')
44
44
  s.add_dependency('net-scp', '~>1.0.4')
45
- s.add_dependency('net-ssh', '~>2.1.4')
45
+ s.add_dependency('net-ssh', '>=2.1.3')
46
46
  s.add_dependency('nokogiri', '~>1.5.0')
47
47
  s.add_dependency('ruby-hmac')
48
48
 
@@ -50,6 +50,7 @@ Gem::Specification.new do |s|
50
50
  ## those that are only needed during development
51
51
  s.add_development_dependency('jekyll')
52
52
  s.add_development_dependency('rake')
53
+ s.add_development_dependency('rbvmomi')
53
54
  s.add_development_dependency('rdoc')
54
55
  s.add_development_dependency('rspec', '~>1.3.1')
55
56
  s.add_development_dependency('shindo', '~>0.3.4')
@@ -88,6 +88,8 @@ module Fog
88
88
  'autoscaling.us-east-1.amazonaws.com'
89
89
  when 'us-west-1'
90
90
  'autoscaling.us-west-1.amazonaws.com'
91
+ when 'us-west-2'
92
+ 'autoscaling.us-west-2.amazonaws.com'
91
93
  else
92
94
  raise ArgumentError, "Unknown region: #{options[:region].inspect}"
93
95
  end
@@ -204,7 +206,7 @@ module Fog
204
206
 
205
207
  @region = options[:region] || 'us-east-1'
206
208
 
207
- unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1'].include?(@region)
209
+ unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2'].include?(@region)
208
210
  raise ArgumentError, "Unknown region: #{@region.inspect}"
209
211
  end
210
212
 
@@ -9,6 +9,7 @@ module Fog
9
9
 
10
10
  request_path 'fog/aws/requests/cloud_formation'
11
11
  request :create_stack
12
+ request :update_stack
12
13
  request :delete_stack
13
14
  request :describe_stack_events
14
15
  request :describe_stack_resources
@@ -64,6 +65,8 @@ module Fog
64
65
  'cloudformation.us-east-1.amazonaws.com'
65
66
  when 'us-west-1'
66
67
  'cloudformation.us-west-1.amazonaws.com'
68
+ when 'us-west-2'
69
+ 'cloudformation.us-west-2.amazonaws.com'
67
70
  else
68
71
  raise ArgumentError, "Unknown region: #{options[:region].inspect}"
69
72
  end
@@ -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', 'ap-southeast-1', 'ap-northeast-1']
60
+ # * region<~String> - optional region to use, in ['eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'ap-southeast-1', 'ap-northeast-1']
61
61
  #
62
62
  # ==== Returns
63
63
  # * CloudWatch object with connection to AWS.
@@ -79,6 +79,8 @@ module Fog
79
79
  'monitoring.us-east-1.amazonaws.com'
80
80
  when 'us-west-1'
81
81
  'monitoring.us-west-1.amazonaws.com'
82
+ when 'us-west-2'
83
+ 'monitoring.us-west-2.amazonaws.com'
82
84
  else
83
85
  raise ArgumentError, "Unknown region: #{options[:region].inspect}"
84
86
  end
@@ -93,7 +93,7 @@ module Fog
93
93
  class Real
94
94
 
95
95
  def modify_image_attributes(*params)
96
- Fog::Logger.warning("modify_image_attributes is deprecated, use modify_image_attribute instead [light_black](#{caller.first})[/]")
96
+ Fog::Logger.deprecation("modify_image_attributes is deprecated, use modify_image_attribute instead [light_black](#{caller.first})[/]")
97
97
  modify_image_attribute(*params)
98
98
  end
99
99
 
@@ -170,7 +170,7 @@ module Fog
170
170
 
171
171
  @region = options[:region] || 'us-east-1'
172
172
 
173
- unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1'].include?(@region)
173
+ unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2'].include?(@region)
174
174
  raise ArgumentError, "Unknown region: #{@region.inspect}"
175
175
  end
176
176
  end
@@ -248,7 +248,7 @@ module Fog
248
248
  # ==== Parameters
249
249
  # * options<~Hash> - config arguments for connection. Defaults to {}.
250
250
  # * region<~String> - optional region to use, in
251
- # ['eu-west-1', 'us-east-1', 'us-west-1', 'ap-northeast-1', 'ap-southeast-1']
251
+ # ['eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'ap-northeast-1', 'ap-southeast-1']
252
252
  #
253
253
  # ==== Returns
254
254
  # * EC2 object with connection to aws.
@@ -279,6 +279,8 @@ module Fog
279
279
  'ec2.us-east-1.amazonaws.com'
280
280
  when 'us-west-1'
281
281
  'ec2.us-west-1.amazonaws.com'
282
+ when 'us-west-2'
283
+ 'ec2.us-west-2.amazonaws.com'
282
284
  else
283
285
  raise ArgumentError, "Unknown region: #{options[:region].inspect}"
284
286
  end
@@ -64,7 +64,7 @@ module Fog
64
64
 
65
65
  @region = options[:region] || 'us-east-1'
66
66
 
67
- unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1'].include?(@region)
67
+ unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2'].include?(@region)
68
68
  raise ArgumentError, "Unknown region: #{@region.inspect}"
69
69
  end
70
70
  end
@@ -94,7 +94,7 @@ module Fog
94
94
  #
95
95
  # ==== Parameters
96
96
  # * options<~Hash> - config arguments for connection. Defaults to {}.
97
- # * region<~String> - optional region to use, in ['eu-west-1', 'us-east-1', 'us-west-1', 'ap-northeast-1', 'ap-southeast-1']
97
+ # * region<~String> - optional region to use, in ['eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'ap-northeast-1', 'ap-southeast-1']
98
98
  #
99
99
  # ==== Returns
100
100
  # * ELB object with connection to AWS.
@@ -118,6 +118,8 @@ module Fog
118
118
  'elasticloadbalancing.us-east-1.amazonaws.com'
119
119
  when 'us-west-1'
120
120
  'elasticloadbalancing.us-west-1.amazonaws.com'
121
+ when 'us-west-2'
122
+ 'elasticloadbalancing.us-west-2.amazonaws.com'
121
123
  else
122
124
  raise ArgumentError, "Unknown region: #{options[:region].inspect}"
123
125
  end
@@ -0,0 +1,133 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'aws'))
2
+
3
+ module Fog
4
+ module AWS
5
+ class EMR < Fog::Service
6
+
7
+ class IdentifierTaken < Fog::Errors::Error; end
8
+
9
+ requires :aws_access_key_id, :aws_secret_access_key
10
+ recognizes :region, :host, :path, :port, :scheme, :persistent
11
+
12
+ request_path 'fog/aws/requests/emr'
13
+
14
+ request :add_instance_groups
15
+ request :add_job_flow_steps
16
+ request :describe_job_flows
17
+ request :modify_instance_groups
18
+ request :run_job_flow
19
+ request :set_termination_protection
20
+ request :terminate_job_flows
21
+
22
+ # model_path 'fog/aws/models/rds'
23
+ # model :server
24
+ # collection :servers
25
+ # model :snapshot
26
+ # collection :snapshots
27
+ # model :parameter_group
28
+ # collection :parameter_groups
29
+ #
30
+ # model :parameter
31
+ # collection :parameters
32
+ #
33
+ # model :security_group
34
+ # collection :security_groups
35
+
36
+ class Mock
37
+
38
+ def initialize(options={})
39
+ Fog::Mock.not_implemented
40
+ end
41
+
42
+ end
43
+
44
+ class Real
45
+
46
+ # Initialize connection to EMR
47
+ #
48
+ # ==== Notes
49
+ # options parameter must include values for :aws_access_key_id and
50
+ # :aws_secret_access_key in order to create a connection
51
+ #
52
+ # ==== Examples
53
+ # emr = EMR.new(
54
+ # :aws_access_key_id => your_aws_access_key_id,
55
+ # :aws_secret_access_key => your_aws_secret_access_key
56
+ # )
57
+ #
58
+ # ==== Parameters
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']
61
+ #
62
+ # ==== Returns
63
+ # * EMR object with connection to AWS.
64
+ def initialize(options={})
65
+ @aws_access_key_id = options[:aws_access_key_id]
66
+ @aws_secret_access_key = options[:aws_secret_access_key]
67
+ @connection_options = options[:connection_options] || {}
68
+ @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
69
+
70
+ options[:region] ||= 'us-east-1'
71
+ @host = options[:host] || 'elasticmapreduce.amazonaws.com'
72
+ @path = options[:path] || '/'
73
+ @persistent = options[:persistent] || false
74
+ @port = options[:port] || 443
75
+ @scheme = options[:scheme] || 'https'
76
+ @connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
77
+ end
78
+
79
+ def reload
80
+ @connection.reset
81
+ end
82
+
83
+ private
84
+
85
+ def request(params)
86
+ idempotent = params.delete(:idempotent)
87
+ parser = params.delete(:parser)
88
+
89
+ body = Fog::AWS.signed_params(
90
+ params,
91
+ {
92
+ :aws_access_key_id => @aws_access_key_id,
93
+ :hmac => @hmac,
94
+ :host => @host,
95
+ :path => @path,
96
+ :port => @port,
97
+ :version => '2009-03-31' #'2010-07-28'
98
+ }
99
+ )
100
+
101
+ begin
102
+ response = @connection.request({
103
+ :body => body,
104
+ :expects => 200,
105
+ :headers => { 'Content-Type' => 'application/x-www-form-urlencoded' },
106
+ :idempotent => idempotent,
107
+ :host => @host,
108
+ :method => 'POST',
109
+ :parser => parser
110
+ })
111
+ rescue Excon::Errors::HTTPStatusError => error
112
+ if match = error.message.match(/<Code>(.*)<\/Code>[\s\\\w]+<Message>(.*)<\/Message>/m)
113
+ # case match[1].split('.').last
114
+ # when 'DBInstanceNotFound', 'DBParameterGroupNotFound', 'DBSnapshotNotFound', 'DBSecurityGroupNotFound'
115
+ # raise Fog::AWS::RDS::NotFound.slurp(error, match[2])
116
+ # when 'DBParameterGroupAlreadyExists'
117
+ # raise Fog::AWS::RDS::IdentifierTaken.slurp(error, match[2])
118
+ # else
119
+ # raise
120
+ # end
121
+ raise
122
+ else
123
+ raise
124
+ end
125
+ end
126
+
127
+ response
128
+ end
129
+
130
+ end
131
+ end
132
+ end
133
+ end
@@ -56,7 +56,7 @@ module Fog
56
56
 
57
57
  def all(filters = filters)
58
58
  unless filters.is_a?(Hash)
59
- Fog::Logger.warning("all with #{filters.class} param is deprecated, use all('public-ip' => []) instead [light_black](#{caller.first})[/]")
59
+ Fog::Logger.deprecation("all with #{filters.class} param is deprecated, use all('public-ip' => []) instead [light_black](#{caller.first})[/]")
60
60
  filters = {'public-ip' => [*filters]}
61
61
  end
62
62
  self.filters = filters
@@ -51,7 +51,7 @@ module Fog
51
51
 
52
52
  def all(filters = filters)
53
53
  unless filters.is_a?(Hash)
54
- Fog::Logger.warning("all with #{filters.class} param is deprecated, use all('key-name' => []) instead [light_black](#{caller.first})[/]")
54
+ Fog::Logger.deprecation("all with #{filters.class} param is deprecated, use all('key-name' => []) instead [light_black](#{caller.first})[/]")
55
55
  filters = {'key-name' => [*filters]}
56
56
  end
57
57
  self.filters = filters