fog 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (780) hide show
  1. data/.gitignore +6 -0
  2. data/README.rdoc +1 -1
  3. data/Rakefile +7 -19
  4. data/changelog.txt +827 -2
  5. data/docs/_layouts/default.html +1 -1
  6. data/docs/compute/index.markdown +15 -1
  7. data/docs/index.markdown +2 -2
  8. data/docs/storage/index.markdown +4 -4
  9. data/fog.gemspec +8 -5
  10. data/lib/fog/aws/auto_scaling.rb +2 -17
  11. data/lib/fog/aws/beanstalk.rb +140 -0
  12. data/lib/fog/aws/cloud_formation.rb +1 -16
  13. data/lib/fog/aws/cloud_watch.rb +2 -17
  14. data/lib/fog/aws/compute.rb +22 -21
  15. data/lib/fog/aws/dns.rb +2 -2
  16. data/lib/fog/aws/dynamodb.rb +162 -0
  17. data/lib/fog/aws/elasticache.rb +1 -7
  18. data/lib/fog/aws/elb/policy_types.rb +35 -0
  19. data/lib/fog/aws/elb.rb +34 -24
  20. data/lib/fog/aws/emr.rb +5 -4
  21. data/lib/fog/aws/iam.rb +16 -1
  22. data/lib/fog/aws/models/auto_scaling/activity.rb +1 -1
  23. data/lib/fog/aws/models/auto_scaling/group.rb +2 -2
  24. data/lib/fog/aws/models/beanstalk/application.rb +62 -0
  25. data/lib/fog/aws/models/beanstalk/applications.rb +25 -0
  26. data/lib/fog/aws/models/beanstalk/environment.rb +129 -0
  27. data/lib/fog/aws/models/beanstalk/environments.rb +29 -0
  28. data/lib/fog/aws/models/beanstalk/event.rb +20 -0
  29. data/lib/fog/aws/models/beanstalk/events.rb +19 -0
  30. data/lib/fog/aws/models/beanstalk/template.rb +62 -0
  31. data/lib/fog/aws/models/beanstalk/templates.rb +70 -0
  32. data/lib/fog/aws/models/beanstalk/version.rb +79 -0
  33. data/lib/fog/aws/models/beanstalk/versions.rb +31 -0
  34. data/lib/fog/aws/models/cloud_watch/metric_statistic.rb +1 -2
  35. data/lib/fog/aws/models/compute/address.rb +7 -4
  36. data/lib/fog/aws/models/compute/addresses.rb +2 -2
  37. data/lib/fog/aws/models/compute/flavors.rb +1 -1
  38. data/lib/fog/aws/models/compute/key_pairs.rb +2 -2
  39. data/lib/fog/aws/models/compute/security_group.rb +3 -3
  40. data/lib/fog/aws/models/compute/security_groups.rb +30 -5
  41. data/lib/fog/aws/models/compute/server.rb +5 -1
  42. data/lib/fog/aws/models/compute/servers.rb +2 -2
  43. data/lib/fog/aws/models/compute/subnet.rb +58 -0
  44. data/lib/fog/aws/models/compute/subnets.rb +99 -0
  45. data/lib/fog/aws/models/compute/volumes.rb +3 -3
  46. data/lib/fog/aws/models/compute/vpc.rb +63 -0
  47. data/lib/fog/aws/models/compute/vpcs.rb +93 -0
  48. data/lib/fog/aws/models/dns/record.rb +37 -23
  49. data/lib/fog/aws/models/dns/records.rb +3 -3
  50. data/lib/fog/aws/models/elasticache/cluster.rb +1 -1
  51. data/lib/fog/aws/models/elb/listener.rb +9 -7
  52. data/lib/fog/aws/models/elb/load_balancer.rb +6 -0
  53. data/lib/fog/aws/models/storage/directory.rb +22 -1
  54. data/lib/fog/aws/models/storage/file.rb +60 -9
  55. data/lib/fog/aws/models/storage/files.rb +4 -4
  56. data/lib/fog/aws/models/storage/version.rb +36 -0
  57. data/lib/fog/aws/models/storage/versions.rb +38 -0
  58. data/lib/fog/aws/parsers/auto_scaling/describe_scheduled_actions.rb +3 -3
  59. data/lib/fog/aws/parsers/beanstalk/check_dns_availability.rb +19 -0
  60. data/lib/fog/aws/parsers/beanstalk/create_application.rb +24 -0
  61. data/lib/fog/aws/parsers/beanstalk/create_application_version.rb +26 -0
  62. data/lib/fog/aws/parsers/beanstalk/create_configuration_template.rb +29 -0
  63. data/lib/fog/aws/parsers/beanstalk/create_environment.rb +37 -0
  64. data/lib/fog/aws/parsers/beanstalk/create_storage_location.rb +18 -0
  65. data/lib/fog/aws/parsers/beanstalk/describe_application_versions.rb +26 -0
  66. data/lib/fog/aws/parsers/beanstalk/describe_applications.rb +24 -0
  67. data/lib/fog/aws/parsers/beanstalk/describe_configuration_options.rb +32 -0
  68. data/lib/fog/aws/parsers/beanstalk/describe_configuration_settings.rb +30 -0
  69. data/lib/fog/aws/parsers/beanstalk/describe_environment_resources.rb +26 -0
  70. data/lib/fog/aws/parsers/beanstalk/describe_environments.rb +38 -0
  71. data/lib/fog/aws/parsers/beanstalk/describe_events.rb +27 -0
  72. data/lib/fog/aws/parsers/beanstalk/empty.rb +27 -0
  73. data/lib/fog/aws/parsers/beanstalk/list_available_solution_stacks.rb +21 -0
  74. data/lib/fog/aws/parsers/beanstalk/parser.rb +93 -0
  75. data/lib/fog/aws/parsers/beanstalk/retrieve_environment_info.rb +22 -0
  76. data/lib/fog/aws/parsers/beanstalk/terminate_environment.rb +37 -0
  77. data/lib/fog/aws/parsers/beanstalk/update_application.rb +24 -0
  78. data/lib/fog/aws/parsers/beanstalk/update_application_version.rb +26 -0
  79. data/lib/fog/aws/parsers/beanstalk/update_configuration_template.rb +29 -0
  80. data/lib/fog/aws/parsers/beanstalk/update_environment.rb +37 -0
  81. data/lib/fog/aws/parsers/beanstalk/validate_configuration_settings.rb +22 -0
  82. data/lib/fog/aws/parsers/compute/allocate_address.rb +1 -1
  83. data/lib/fog/aws/parsers/compute/associate_address.rb +25 -0
  84. data/lib/fog/aws/parsers/compute/create_subnet.rb +51 -0
  85. data/lib/fog/aws/parsers/compute/create_vpc.rb +51 -0
  86. data/lib/fog/aws/parsers/compute/delete_subnet.rb +24 -0
  87. data/lib/fog/aws/parsers/compute/delete_vpc.rb +24 -0
  88. data/lib/fog/aws/parsers/compute/describe_addresses.rb +1 -1
  89. data/lib/fog/aws/parsers/compute/describe_images.rb +20 -13
  90. data/lib/fog/aws/parsers/compute/describe_instance_status.rb +97 -0
  91. data/lib/fog/aws/parsers/compute/describe_instances.rb +2 -2
  92. data/lib/fog/aws/parsers/compute/describe_security_groups.rb +4 -4
  93. data/lib/fog/aws/parsers/compute/describe_subnets.rb +49 -0
  94. data/lib/fog/aws/parsers/compute/describe_volume_status.rb +70 -0
  95. data/lib/fog/aws/parsers/compute/describe_vpcs.rb +49 -0
  96. data/lib/fog/aws/parsers/dns/list_resource_record_sets.rb +15 -7
  97. data/lib/fog/aws/parsers/elb/describe_load_balancer_policies.rb +64 -0
  98. data/lib/fog/aws/parsers/elb/describe_load_balancer_policy_types.rb +70 -0
  99. data/lib/fog/aws/parsers/sns/confirm_subscription.rb +1 -1
  100. data/lib/fog/aws/parsers/sns/create_topic.rb +1 -1
  101. data/lib/fog/aws/parsers/sns/list_subscriptions.rb +2 -2
  102. data/lib/fog/aws/parsers/sns/list_topics.rb +1 -1
  103. data/lib/fog/aws/parsers/sns/subscribe.rb +1 -1
  104. data/lib/fog/aws/parsers/sqs/receive_message.rb +1 -1
  105. data/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb +32 -0
  106. data/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb +1 -1
  107. data/lib/fog/aws/parsers/storage/get_bucket_versioning.rb +1 -1
  108. data/lib/fog/aws/parsers/sts/get_session_token.rb +31 -0
  109. data/lib/fog/aws/rds.rb +51 -18
  110. data/lib/fog/aws/requests/auto_scaling/delete_launch_configuration.rb +10 -1
  111. data/lib/fog/aws/requests/auto_scaling/describe_launch_configurations.rb +16 -7
  112. data/lib/fog/aws/requests/auto_scaling/describe_scheduled_actions.rb +5 -0
  113. data/lib/fog/aws/requests/auto_scaling/put_scheduled_update_group_action.rb +13 -3
  114. data/lib/fog/aws/requests/beanstalk/check_dns_availability.rb +27 -0
  115. data/lib/fog/aws/requests/beanstalk/create_application.rb +29 -0
  116. data/lib/fog/aws/requests/beanstalk/create_application_version.rb +41 -0
  117. data/lib/fog/aws/requests/beanstalk/create_configuration_template.rb +44 -0
  118. data/lib/fog/aws/requests/beanstalk/create_environment.rb +50 -0
  119. data/lib/fog/aws/requests/beanstalk/create_storage_location.rb +27 -0
  120. data/lib/fog/aws/requests/beanstalk/delete_application.rb +29 -0
  121. data/lib/fog/aws/requests/beanstalk/delete_application_version.rb +36 -0
  122. data/lib/fog/aws/requests/beanstalk/delete_configuration_template.rb +34 -0
  123. data/lib/fog/aws/requests/beanstalk/delete_environment_configuration.rb +34 -0
  124. data/lib/fog/aws/requests/beanstalk/describe_application_versions.rb +34 -0
  125. data/lib/fog/aws/requests/beanstalk/describe_applications.rb +30 -0
  126. data/lib/fog/aws/requests/beanstalk/describe_configuration_options.rb +40 -0
  127. data/lib/fog/aws/requests/beanstalk/describe_configuration_settings.rb +31 -0
  128. data/lib/fog/aws/requests/beanstalk/describe_environment_resources.rb +29 -0
  129. data/lib/fog/aws/requests/beanstalk/describe_environments.rb +40 -0
  130. data/lib/fog/aws/requests/beanstalk/describe_events.rb +29 -0
  131. data/lib/fog/aws/requests/beanstalk/list_available_solution_stacks.rb +27 -0
  132. data/lib/fog/aws/requests/beanstalk/rebuild_environment.rb +30 -0
  133. data/lib/fog/aws/requests/beanstalk/request_environment_info.rb +29 -0
  134. data/lib/fog/aws/requests/beanstalk/restart_app_server.rb +29 -0
  135. data/lib/fog/aws/requests/beanstalk/retrieve_environment_info.rb +29 -0
  136. data/lib/fog/aws/requests/beanstalk/swap_environment_cnames.rb +29 -0
  137. data/lib/fog/aws/requests/beanstalk/terminate_environment.rb +31 -0
  138. data/lib/fog/aws/requests/beanstalk/update_application.rb +30 -0
  139. data/lib/fog/aws/requests/beanstalk/update_application_version.rb +30 -0
  140. data/lib/fog/aws/requests/beanstalk/update_configuration_template.rb +36 -0
  141. data/lib/fog/aws/requests/beanstalk/update_environment.rb +42 -0
  142. data/lib/fog/aws/requests/beanstalk/validate_configuration_settings.rb +33 -0
  143. data/lib/fog/aws/requests/compute/allocate_address.rb +11 -4
  144. data/lib/fog/aws/requests/compute/associate_address.rb +44 -17
  145. data/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +15 -17
  146. data/lib/fog/aws/requests/compute/create_security_group.rb +8 -4
  147. data/lib/fog/aws/requests/compute/create_subnet.rb +79 -0
  148. data/lib/fog/aws/requests/compute/create_tags.rb +3 -2
  149. data/lib/fog/aws/requests/compute/create_vpc.rb +71 -0
  150. data/lib/fog/aws/requests/compute/delete_security_group.rb +22 -4
  151. data/lib/fog/aws/requests/compute/delete_subnet.rb +49 -0
  152. data/lib/fog/aws/requests/compute/delete_vpc.rb +52 -0
  153. data/lib/fog/aws/requests/compute/describe_availability_zones.rb +3 -0
  154. data/lib/fog/aws/requests/compute/describe_instance_status.rb +36 -0
  155. data/lib/fog/aws/requests/compute/describe_security_groups.rb +4 -0
  156. data/lib/fog/aws/requests/compute/describe_subnets.rb +66 -0
  157. data/lib/fog/aws/requests/compute/describe_volume_status.rb +50 -0
  158. data/lib/fog/aws/requests/compute/describe_vpcs.rb +62 -0
  159. data/lib/fog/aws/requests/compute/detach_volume.rb +13 -8
  160. data/lib/fog/aws/requests/compute/disassociate_address.rb +7 -5
  161. data/lib/fog/aws/requests/compute/request_spot_instances.rb +5 -1
  162. data/lib/fog/aws/requests/compute/revoke_security_group_ingress.rb +11 -13
  163. data/lib/fog/aws/requests/compute/run_instances.rb +5 -1
  164. data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +43 -28
  165. data/lib/fog/aws/requests/dns/create_hosted_zone.rb +9 -9
  166. data/lib/fog/aws/requests/dns/delete_hosted_zone.rb +7 -7
  167. data/lib/fog/aws/requests/dns/get_change.rb +5 -5
  168. data/lib/fog/aws/requests/dns/get_hosted_zone.rb +8 -8
  169. data/lib/fog/aws/requests/dns/list_hosted_zones.rb +15 -15
  170. data/lib/fog/aws/requests/dns/list_resource_record_sets.rb +23 -20
  171. data/lib/fog/aws/requests/dynamodb/batch_get_item.rb +43 -0
  172. data/lib/fog/aws/requests/dynamodb/create_table.rb +55 -0
  173. data/lib/fog/aws/requests/dynamodb/delete_item.rb +45 -0
  174. data/lib/fog/aws/requests/dynamodb/delete_table.rb +42 -0
  175. data/lib/fog/aws/requests/dynamodb/describe_table.rb +44 -0
  176. data/lib/fog/aws/requests/dynamodb/get_item.rb +43 -0
  177. data/lib/fog/aws/requests/dynamodb/list_tables.rb +29 -0
  178. data/lib/fog/aws/requests/dynamodb/put_item.rb +41 -0
  179. data/lib/fog/aws/requests/dynamodb/query.rb +44 -0
  180. data/lib/fog/aws/requests/dynamodb/scan.rb +45 -0
  181. data/lib/fog/aws/requests/dynamodb/update_item.rb +49 -0
  182. data/lib/fog/aws/requests/dynamodb/update_table.rb +46 -0
  183. data/lib/fog/aws/requests/elasticache/create_cache_cluster.rb +2 -2
  184. data/lib/fog/aws/requests/elasticache/modify_cache_cluster.rb +2 -2
  185. data/lib/fog/aws/requests/elb/create_app_cookie_stickiness_policy.rb +2 -0
  186. data/lib/fog/aws/requests/elb/create_lb_cookie_stickiness_policy.rb +3 -1
  187. data/lib/fog/aws/requests/elb/create_load_balancer.rb +7 -2
  188. data/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb +10 -1
  189. data/lib/fog/aws/requests/elb/create_load_balancer_policy.rb +79 -0
  190. data/lib/fog/aws/requests/elb/delete_load_balancer_policy.rb +1 -1
  191. data/lib/fog/aws/requests/elb/describe_load_balancer_policies.rb +71 -0
  192. data/lib/fog/aws/requests/elb/describe_load_balancer_policy_types.rb +68 -0
  193. data/lib/fog/aws/requests/elb/describe_load_balancers.rb +5 -1
  194. data/lib/fog/aws/requests/elb/set_load_balancer_listener_ssl_certificate.rb +27 -0
  195. data/lib/fog/aws/requests/elb/set_load_balancer_policies_of_listener.rb +1 -1
  196. data/lib/fog/aws/requests/emr/run_job_flow.rb +9 -7
  197. data/lib/fog/aws/requests/iam/add_user_to_group.rb +24 -0
  198. data/lib/fog/aws/requests/iam/create_access_key.rb +24 -0
  199. data/lib/fog/aws/requests/iam/create_group.rb +21 -0
  200. data/lib/fog/aws/requests/iam/create_user.rb +21 -0
  201. data/lib/fog/aws/requests/iam/delete_access_key.rb +17 -0
  202. data/lib/fog/aws/requests/iam/delete_group.rb +19 -0
  203. data/lib/fog/aws/requests/iam/delete_user.rb +17 -0
  204. data/lib/fog/aws/requests/iam/delete_user_policy.rb +16 -0
  205. data/lib/fog/aws/requests/iam/list_access_keys.rb +21 -0
  206. data/lib/fog/aws/requests/iam/list_groups.rb +18 -0
  207. data/lib/fog/aws/requests/iam/list_groups_for_user.rb +24 -0
  208. data/lib/fog/aws/requests/iam/list_user_policies.rb +18 -0
  209. data/lib/fog/aws/requests/iam/list_users.rb +17 -0
  210. data/lib/fog/aws/requests/iam/put_user_policy.rb +18 -0
  211. data/lib/fog/aws/requests/iam/remove_user_from_group.rb +19 -0
  212. data/lib/fog/aws/requests/iam/upload_server_certificate.rb +4 -1
  213. data/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb +30 -1
  214. data/lib/fog/aws/requests/rds/create_db_instance.rb +73 -7
  215. data/lib/fog/aws/requests/rds/create_db_parameter_group.rb +19 -1
  216. data/lib/fog/aws/requests/rds/create_db_security_group.rb +19 -1
  217. data/lib/fog/aws/requests/rds/create_db_snapshot.rb +38 -2
  218. data/lib/fog/aws/requests/rds/delete_db_instance.rb +18 -3
  219. data/lib/fog/aws/requests/rds/delete_db_parameter_group.rb +11 -1
  220. data/lib/fog/aws/requests/rds/delete_db_security_group.rb +11 -1
  221. data/lib/fog/aws/requests/rds/delete_db_snapshot.rb +15 -4
  222. data/lib/fog/aws/requests/rds/describe_db_instances.rb +57 -2
  223. data/lib/fog/aws/requests/rds/describe_db_parameter_groups.rb +19 -1
  224. data/lib/fog/aws/requests/rds/describe_db_parameters.rb +0 -1
  225. data/lib/fog/aws/requests/rds/describe_db_reserved_instances.rb +1 -1
  226. data/lib/fog/aws/requests/rds/describe_db_security_groups.rb +49 -3
  227. data/lib/fog/aws/requests/rds/describe_db_snapshots.rb +28 -1
  228. data/lib/fog/aws/requests/rds/modify_db_instance.rb +26 -1
  229. data/lib/fog/aws/requests/rds/reboot_db_instance.rb +17 -1
  230. data/lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb +27 -1
  231. data/lib/fog/aws/requests/sns/confirm_subscription.rb +1 -1
  232. data/lib/fog/aws/requests/sns/delete_topic.rb +1 -1
  233. data/lib/fog/aws/requests/sns/get_topic_attributes.rb +1 -1
  234. data/lib/fog/aws/requests/sns/list_subscriptions_by_topic.rb +1 -1
  235. data/lib/fog/aws/requests/sns/publish.rb +1 -1
  236. data/lib/fog/aws/requests/sns/set_topic_attributes.rb +1 -1
  237. data/lib/fog/aws/requests/sns/subscribe.rb +1 -1
  238. data/lib/fog/aws/requests/sns/unsubscribe.rb +1 -1
  239. data/lib/fog/aws/requests/sqs/change_message_visibility.rb +1 -1
  240. data/lib/fog/aws/requests/sqs/delete_message.rb +1 -1
  241. data/lib/fog/aws/requests/sqs/receive_message.rb +13 -14
  242. data/lib/fog/aws/requests/storage/{hash_to_acl.rb → acl_utils.rb} +8 -0
  243. data/lib/fog/aws/requests/storage/copy_object.rb +11 -5
  244. data/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb +30 -0
  245. data/lib/fog/aws/requests/storage/delete_object.rb +73 -2
  246. data/lib/fog/aws/requests/storage/get_bucket.rb +3 -2
  247. data/lib/fog/aws/requests/storage/get_bucket_acl.rb +7 -1
  248. data/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb +41 -0
  249. data/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +95 -2
  250. data/lib/fog/aws/requests/storage/get_bucket_versioning.rb +32 -0
  251. data/lib/fog/aws/requests/storage/get_object.rb +42 -12
  252. data/lib/fog/aws/requests/storage/get_object_acl.rb +7 -1
  253. data/lib/fog/aws/requests/storage/get_object_http_url.rb +10 -4
  254. data/lib/fog/aws/requests/storage/get_object_https_url.rb +10 -4
  255. data/lib/fog/aws/requests/storage/head_object.rb +7 -6
  256. data/lib/fog/aws/requests/storage/put_bucket_acl.rb +2 -2
  257. data/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb +48 -0
  258. data/lib/fog/aws/requests/storage/put_bucket_versioning.rb +41 -0
  259. data/lib/fog/aws/requests/storage/put_bucket_website.rb +17 -0
  260. data/lib/fog/aws/requests/storage/put_object.rb +26 -10
  261. data/lib/fog/aws/requests/storage/put_object_acl.rb +1 -1
  262. data/lib/fog/aws/requests/storage/sync_clock.rb +1 -1
  263. data/lib/fog/aws/requests/sts/get_federation_token.rb +21 -0
  264. data/lib/fog/aws/requests/sts/get_session_token.rb +19 -0
  265. data/lib/fog/aws/ses.rb +2 -7
  266. data/lib/fog/aws/simpledb.rb +4 -17
  267. data/lib/fog/aws/sns.rb +1 -14
  268. data/lib/fog/aws/sqs.rb +5 -11
  269. data/lib/fog/aws/storage.rb +7 -23
  270. data/lib/fog/aws/sts.rb +137 -0
  271. data/lib/fog/aws.rb +40 -5
  272. data/lib/fog/{new_servers → bare_metal_cloud}/compute.rb +14 -14
  273. data/lib/fog/{new_servers → bare_metal_cloud}/requests/compute/add_server.rb +1 -1
  274. data/lib/fog/{new_servers → bare_metal_cloud}/requests/compute/cancel_server.rb +1 -1
  275. data/lib/fog/{new_servers → bare_metal_cloud}/requests/compute/get_server.rb +1 -1
  276. data/lib/fog/{new_servers → bare_metal_cloud}/requests/compute/list_images.rb +1 -1
  277. data/lib/fog/{new_servers → bare_metal_cloud}/requests/compute/list_plans.rb +1 -1
  278. data/lib/fog/{new_servers → bare_metal_cloud}/requests/compute/list_servers.rb +1 -1
  279. data/lib/fog/{new_servers → bare_metal_cloud}/requests/compute/reboot_server.rb +1 -1
  280. data/lib/fog/{new_servers.rb → bare_metal_cloud.rb} +2 -2
  281. data/lib/fog/bin/aws.rb +11 -1
  282. data/lib/fog/bin/{new_servers.rb → bare_metal_cloud.rb} +5 -5
  283. data/lib/fog/bin/clodo.rb +31 -0
  284. data/lib/fog/bin/cloudstack.rb +30 -0
  285. data/lib/fog/bin/joyent.rb +31 -0
  286. data/lib/fog/bin/ovirt.rb +30 -0
  287. data/lib/fog/bin/voxel.rb +1 -1
  288. data/lib/fog/bin.rb +5 -1
  289. data/lib/fog/bluebox/compute.rb +4 -0
  290. data/lib/fog/bluebox/models/compute/location.rb +17 -0
  291. data/lib/fog/bluebox/models/compute/locations.rb +28 -0
  292. data/lib/fog/bluebox/models/compute/server.rb +12 -5
  293. data/lib/fog/bluebox/requests/compute/create_block.rb +2 -2
  294. data/lib/fog/bluebox/requests/compute/get_location.rb +26 -0
  295. data/lib/fog/bluebox/requests/compute/get_locations.rb +24 -0
  296. data/lib/fog/brightbox/compute.rb +8 -0
  297. data/lib/fog/brightbox/models/compute/cloud_ip.rb +10 -2
  298. data/lib/fog/brightbox/models/compute/firewall_policies.rb +29 -0
  299. data/lib/fog/brightbox/models/compute/firewall_policy.rb +65 -0
  300. data/lib/fog/brightbox/models/compute/firewall_rule.rb +54 -0
  301. data/lib/fog/brightbox/models/compute/firewall_rules.rb +24 -0
  302. data/lib/fog/brightbox/models/compute/image.rb +2 -0
  303. data/lib/fog/brightbox/models/compute/server.rb +41 -6
  304. data/lib/fog/brightbox/models/compute/server_group.rb +56 -17
  305. data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +14 -0
  306. data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +13 -0
  307. data/lib/fog/clodo/compute.rb +152 -0
  308. data/lib/fog/clodo/models/compute/image.rb +31 -0
  309. data/lib/fog/clodo/models/compute/images.rb +28 -0
  310. data/lib/fog/clodo/models/compute/server.rb +163 -0
  311. data/lib/fog/clodo/models/compute/servers.rb +36 -0
  312. data/lib/fog/clodo/requests/compute/add_ip_address.rb +49 -0
  313. data/lib/fog/clodo/requests/compute/create_server.rb +112 -0
  314. data/lib/fog/clodo/requests/compute/delete_ip_address.rb +47 -0
  315. data/lib/fog/clodo/requests/compute/delete_server.rb +44 -0
  316. data/lib/fog/clodo/requests/compute/get_image_details.rb +20 -0
  317. data/lib/fog/clodo/requests/compute/get_server_details.rb +49 -0
  318. data/lib/fog/clodo/requests/compute/list_images.rb +48 -0
  319. data/lib/fog/clodo/requests/compute/list_images_detail.rb +61 -0
  320. data/lib/fog/clodo/requests/compute/list_servers.rb +50 -0
  321. data/lib/fog/clodo/requests/compute/list_servers_detail.rb +51 -0
  322. data/lib/fog/clodo/requests/compute/move_ip_address.rb +34 -0
  323. data/lib/fog/clodo/requests/compute/reboot_server.rb +19 -0
  324. data/lib/fog/clodo/requests/compute/rebuild_server.rb +21 -0
  325. data/lib/fog/clodo/requests/compute/server_action.rb +25 -0
  326. data/lib/fog/clodo/requests/compute/start_server.rb +19 -0
  327. data/lib/fog/clodo/requests/compute/stop_server.rb +19 -0
  328. data/lib/fog/clodo.rb +34 -0
  329. data/lib/fog/cloudstack/compute.rb +254 -0
  330. data/lib/fog/cloudstack/requests/compute/acquire_ip_address.rb +21 -0
  331. data/lib/fog/cloudstack/requests/compute/assign_to_load_balancer_rule.rb +25 -0
  332. data/lib/fog/cloudstack/requests/compute/attach_volume.rb +23 -0
  333. data/lib/fog/cloudstack/requests/compute/authorize_security_group_ingress.rb +22 -0
  334. data/lib/fog/cloudstack/requests/compute/change_service_for_virtual_machine.rb +20 -0
  335. data/lib/fog/cloudstack/requests/compute/create_account.rb +20 -0
  336. data/lib/fog/cloudstack/requests/compute/create_domain.rb +20 -0
  337. data/lib/fog/cloudstack/requests/compute/create_load_balancer_rule.rb +20 -0
  338. data/lib/fog/cloudstack/requests/compute/create_network.rb +20 -0
  339. data/lib/fog/cloudstack/requests/compute/create_port_forwarding_rule.rb +20 -0
  340. data/lib/fog/cloudstack/requests/compute/create_security_group.rb +20 -0
  341. data/lib/fog/cloudstack/requests/compute/create_snapshot.rb +20 -0
  342. data/lib/fog/cloudstack/requests/compute/create_snapshot_policy.rb +20 -0
  343. data/lib/fog/cloudstack/requests/compute/create_ssh_key_pair.rb +22 -0
  344. data/lib/fog/cloudstack/requests/compute/create_user.rb +20 -0
  345. data/lib/fog/cloudstack/requests/compute/create_volume.rb +20 -0
  346. data/lib/fog/cloudstack/requests/compute/delete_account.rb +20 -0
  347. data/lib/fog/cloudstack/requests/compute/delete_domain.rb +20 -0
  348. data/lib/fog/cloudstack/requests/compute/delete_load_balancer_rule.rb +20 -0
  349. data/lib/fog/cloudstack/requests/compute/delete_port_forwarding_rule.rb +20 -0
  350. data/lib/fog/cloudstack/requests/compute/delete_security_group.rb +20 -0
  351. data/lib/fog/cloudstack/requests/compute/delete_snapshot.rb +20 -0
  352. data/lib/fog/cloudstack/requests/compute/delete_snapshot_policies.rb +20 -0
  353. data/lib/fog/cloudstack/requests/compute/delete_ssh_key_pair.rb +21 -0
  354. data/lib/fog/cloudstack/requests/compute/delete_user.rb +20 -0
  355. data/lib/fog/cloudstack/requests/compute/delete_volume.rb +20 -0
  356. data/lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb +33 -0
  357. data/lib/fog/cloudstack/requests/compute/destroy_virtual_machine.rb +20 -0
  358. data/lib/fog/cloudstack/requests/compute/detach_volume.rb +21 -0
  359. data/lib/fog/cloudstack/requests/compute/disable_account.rb +20 -0
  360. data/lib/fog/cloudstack/requests/compute/disable_user.rb +20 -0
  361. data/lib/fog/cloudstack/requests/compute/enable_account.rb +20 -0
  362. data/lib/fog/cloudstack/requests/compute/enable_user.rb +20 -0
  363. data/lib/fog/cloudstack/requests/compute/generate_usage_records.rb +28 -0
  364. data/lib/fog/cloudstack/requests/compute/get_vm_password.rb +21 -0
  365. data/lib/fog/cloudstack/requests/compute/list_accounts.rb +20 -0
  366. data/lib/fog/cloudstack/requests/compute/list_alerts.rb +20 -0
  367. data/lib/fog/cloudstack/requests/compute/list_async_jobs.rb +20 -0
  368. data/lib/fog/cloudstack/requests/compute/list_capabilities.rb +20 -0
  369. data/lib/fog/cloudstack/requests/compute/list_capacity.rb +20 -0
  370. data/lib/fog/cloudstack/requests/compute/list_clusters.rb +20 -0
  371. data/lib/fog/cloudstack/requests/compute/list_configurations.rb +20 -0
  372. data/lib/fog/cloudstack/requests/compute/list_disk_offerings.rb +20 -0
  373. data/lib/fog/cloudstack/requests/compute/list_domain_children.rb +20 -0
  374. data/lib/fog/cloudstack/requests/compute/list_domains.rb +20 -0
  375. data/lib/fog/cloudstack/requests/compute/list_events.rb +20 -0
  376. data/lib/fog/cloudstack/requests/compute/list_external_firewalls.rb +20 -0
  377. data/lib/fog/cloudstack/requests/compute/list_external_load_balancers.rb +20 -0
  378. data/lib/fog/cloudstack/requests/compute/list_hosts.rb +20 -0
  379. data/lib/fog/cloudstack/requests/compute/list_hypervisors.rb +20 -0
  380. data/lib/fog/cloudstack/requests/compute/list_instance_groups.rb +20 -0
  381. data/lib/fog/cloudstack/requests/compute/list_isos.rb +20 -0
  382. data/lib/fog/cloudstack/requests/compute/list_load_balancer_rule_instances.rb +23 -0
  383. data/lib/fog/cloudstack/requests/compute/list_load_balancer_rules.rb +22 -0
  384. data/lib/fog/cloudstack/requests/compute/list_network_offerings.rb +20 -0
  385. data/lib/fog/cloudstack/requests/compute/list_networks.rb +20 -0
  386. data/lib/fog/cloudstack/requests/compute/list_os_categories.rb +22 -0
  387. data/lib/fog/cloudstack/requests/compute/list_os_types.rb +22 -0
  388. data/lib/fog/cloudstack/requests/compute/list_pods.rb +20 -0
  389. data/lib/fog/cloudstack/requests/compute/list_port_forwarding_rules.rb +22 -0
  390. data/lib/fog/cloudstack/requests/compute/list_public_ip_addresses.rb +22 -0
  391. data/lib/fog/cloudstack/requests/compute/list_resource_limits.rb +20 -0
  392. data/lib/fog/cloudstack/requests/compute/list_security_groups.rb +20 -0
  393. data/lib/fog/cloudstack/requests/compute/list_service_offerings.rb +20 -0
  394. data/lib/fog/cloudstack/requests/compute/list_snapshot_policies.rb +20 -0
  395. data/lib/fog/cloudstack/requests/compute/list_snapshots.rb +20 -0
  396. data/lib/fog/cloudstack/requests/compute/list_ssh_key_pairs.rb +20 -0
  397. data/lib/fog/cloudstack/requests/compute/list_storage_pools.rb +20 -0
  398. data/lib/fog/cloudstack/requests/compute/list_templates.rb +20 -0
  399. data/lib/fog/cloudstack/requests/compute/list_usage_records.rb +28 -0
  400. data/lib/fog/cloudstack/requests/compute/list_users.rb +20 -0
  401. data/lib/fog/cloudstack/requests/compute/list_virtual_machines.rb +20 -0
  402. data/lib/fog/cloudstack/requests/compute/list_volumes.rb +20 -0
  403. data/lib/fog/cloudstack/requests/compute/list_zones.rb +20 -0
  404. data/lib/fog/cloudstack/requests/compute/migrate_virtual_machine.rb +20 -0
  405. data/lib/fog/cloudstack/requests/compute/query_async_job_result.rb +20 -0
  406. data/lib/fog/cloudstack/requests/compute/reboot_virtual_machine.rb +20 -0
  407. data/lib/fog/cloudstack/requests/compute/recover_virtual_machine.rb +20 -0
  408. data/lib/fog/cloudstack/requests/compute/register_ssh_key_pair.rb +20 -0
  409. data/lib/fog/cloudstack/requests/compute/register_user_keys.rb +20 -0
  410. data/lib/fog/cloudstack/requests/compute/remove_from_load_balancer_rule.rb +25 -0
  411. data/lib/fog/cloudstack/requests/compute/reset_password_for_virtual_machine.rb +21 -0
  412. data/lib/fog/cloudstack/requests/compute/revoke_security_group_ingress.rb +21 -0
  413. data/lib/fog/cloudstack/requests/compute/start_virtual_machine.rb +20 -0
  414. data/lib/fog/cloudstack/requests/compute/stop_virtual_machine.rb +20 -0
  415. data/lib/fog/cloudstack/requests/compute/update_account.rb +20 -0
  416. data/lib/fog/cloudstack/requests/compute/update_domain.rb +20 -0
  417. data/lib/fog/cloudstack/requests/compute/update_resource_count.rb +20 -0
  418. data/lib/fog/cloudstack/requests/compute/update_user.rb +20 -0
  419. data/lib/fog/cloudstack/requests/compute/update_virtual_machine.rb +20 -0
  420. data/lib/fog/cloudstack.rb +28 -0
  421. data/lib/fog/compute/models/server.rb +11 -0
  422. data/lib/fog/compute.rb +20 -3
  423. data/lib/fog/core/connection.rb +2 -2
  424. data/lib/fog/core/credentials.rb +3 -3
  425. data/lib/fog/core/errors.rb +10 -2
  426. data/lib/fog/core/model.rb +8 -0
  427. data/lib/fog/core/scp.rb +18 -2
  428. data/lib/fog/core/wait_for.rb +1 -1
  429. data/lib/fog/core.rb +1 -3
  430. data/lib/fog/dns.rb +1 -0
  431. data/lib/fog/dnsimple/dns.rb +1 -1
  432. data/lib/fog/dnsmadeeasy/dns.rb +1 -1
  433. data/lib/fog/dynect/models/dns/records.rb +2 -2
  434. data/lib/fog/dynect/requests/dns/get_node_list.rb +2 -1
  435. data/lib/fog/ecloud/compute.rb +1 -1
  436. data/lib/fog/ecloud/requests/compute/add_backup_internet_service.rb +1 -1
  437. data/lib/fog/ecloud/requests/compute/add_internet_service.rb +2 -2
  438. data/lib/fog/ecloud/requests/compute/add_node.rb +1 -1
  439. data/lib/fog/ecloud/requests/compute/clone_vapp.rb +1 -1
  440. data/lib/fog/ecloud/requests/compute/configure_internet_service.rb +1 -1
  441. data/lib/fog/ecloud/requests/compute/configure_network.rb +1 -1
  442. data/lib/fog/ecloud/requests/compute/configure_network_ip.rb +1 -1
  443. data/lib/fog/ecloud/requests/compute/configure_vapp.rb +1 -1
  444. data/lib/fog/ecloud/requests/compute/instantiate_vapp_template.rb +1 -1
  445. data/lib/fog/glesys/compute.rb +4 -2
  446. data/lib/fog/glesys/models/compute/server.rb +14 -14
  447. data/lib/fog/google/requests/storage/get_object.rb +22 -14
  448. data/lib/fog/joyent/compute.rb +228 -0
  449. data/lib/fog/joyent/errors.rb +90 -0
  450. data/lib/fog/joyent/models/compute/flavor.rb +17 -0
  451. data/lib/fog/joyent/models/compute/flavors.rb +25 -0
  452. data/lib/fog/joyent/models/compute/image.rb +18 -0
  453. data/lib/fog/joyent/models/compute/images.rb +25 -0
  454. data/lib/fog/joyent/models/compute/key.rb +19 -0
  455. data/lib/fog/joyent/models/compute/keys.rb +34 -0
  456. data/lib/fog/joyent/models/compute/server.rb +117 -0
  457. data/lib/fog/joyent/models/compute/servers.rb +35 -0
  458. data/lib/fog/joyent/models/compute/snapshot.rb +45 -0
  459. data/lib/fog/joyent/models/compute/snapshots.rb +37 -0
  460. data/lib/fog/joyent/requests/compute/add_machine_tags.rb +20 -0
  461. data/lib/fog/joyent/requests/compute/create_key.rb +56 -0
  462. data/lib/fog/joyent/requests/compute/create_machine.rb +16 -0
  463. data/lib/fog/joyent/requests/compute/create_machine_snapshot.rb +18 -0
  464. data/lib/fog/joyent/requests/compute/delete_all_machine_metadata.rb +16 -0
  465. data/lib/fog/joyent/requests/compute/delete_all_machine_tags.rb +15 -0
  466. data/lib/fog/joyent/requests/compute/delete_key.rb +29 -0
  467. data/lib/fog/joyent/requests/compute/delete_machine.rb +15 -0
  468. data/lib/fog/joyent/requests/compute/delete_machine_metadata.rb +18 -0
  469. data/lib/fog/joyent/requests/compute/delete_machine_snapshot.rb +21 -0
  470. data/lib/fog/joyent/requests/compute/delete_machine_tag.rb +15 -0
  471. data/lib/fog/joyent/requests/compute/get_dataset.rb +28 -0
  472. data/lib/fog/joyent/requests/compute/get_key.rb +29 -0
  473. data/lib/fog/joyent/requests/compute/get_machine.rb +29 -0
  474. data/lib/fog/joyent/requests/compute/get_machine_metadata.rb +25 -0
  475. data/lib/fog/joyent/requests/compute/get_machine_snapshot.rb +14 -0
  476. data/lib/fog/joyent/requests/compute/get_machine_tag.rb +19 -0
  477. data/lib/fog/joyent/requests/compute/get_package.rb +33 -0
  478. data/lib/fog/joyent/requests/compute/list_datasets.rb +24 -0
  479. data/lib/fog/joyent/requests/compute/list_keys.rb +25 -0
  480. data/lib/fog/joyent/requests/compute/list_machine_snapshots.rb +14 -0
  481. data/lib/fog/joyent/requests/compute/list_machine_tags.rb +20 -0
  482. data/lib/fog/joyent/requests/compute/list_machines.rb +25 -0
  483. data/lib/fog/joyent/requests/compute/list_packages.rb +36 -0
  484. data/lib/fog/joyent/requests/compute/reboot_machine.rb +15 -0
  485. data/lib/fog/joyent/requests/compute/resize_machine.rb +13 -0
  486. data/lib/fog/joyent/requests/compute/start_machine.rb +16 -0
  487. data/lib/fog/joyent/requests/compute/start_machine_from_snapshot.rb +15 -0
  488. data/lib/fog/joyent/requests/compute/stop_machine.rb +16 -0
  489. data/lib/fog/joyent/requests/compute/update_machine_metadata.rb +15 -0
  490. data/lib/fog/joyent.rb +8 -0
  491. data/lib/fog/libvirt/compute.rb +7 -3
  492. data/lib/fog/libvirt/models/compute/nodes.rb +1 -3
  493. data/lib/fog/libvirt/models/compute/server.rb +93 -99
  494. data/lib/fog/libvirt/models/compute/servers.rb +2 -1
  495. data/lib/fog/libvirt/models/compute/util.rb +1 -2
  496. data/lib/fog/local/models/storage/file.rb +8 -1
  497. data/lib/fog/local/storage.rb +8 -0
  498. data/lib/fog/ninefold/models/storage/file.rb +8 -0
  499. data/lib/fog/openstack/compute.rb +0 -2
  500. data/lib/fog/openstack.rb +9 -7
  501. data/lib/fog/ovirt/compute.rb +106 -0
  502. data/lib/fog/ovirt/models/compute/cluster.rb +24 -0
  503. data/lib/fog/ovirt/models/compute/clusters.rb +23 -0
  504. data/lib/fog/ovirt/models/compute/interface.rb +22 -0
  505. data/lib/fog/ovirt/models/compute/interfaces.rb +32 -0
  506. data/lib/fog/ovirt/models/compute/server.rb +112 -0
  507. data/lib/fog/ovirt/models/compute/servers.rb +30 -0
  508. data/lib/fog/ovirt/models/compute/template.rb +53 -0
  509. data/lib/fog/ovirt/models/compute/templates.rb +23 -0
  510. data/lib/fog/ovirt/requests/compute/add_interface.rb +23 -0
  511. data/lib/fog/ovirt/requests/compute/create_vm.rb +20 -0
  512. data/lib/fog/ovirt/requests/compute/datacenters.rb +22 -0
  513. data/lib/fog/ovirt/requests/compute/destroy_interface.rb +25 -0
  514. data/lib/fog/ovirt/requests/compute/destroy_vm.rb +22 -0
  515. data/lib/fog/ovirt/requests/compute/get_cluster.rb +18 -0
  516. data/lib/fog/ovirt/requests/compute/get_template.rb +18 -0
  517. data/lib/fog/ovirt/requests/compute/get_virtual_machine.rb +18 -0
  518. data/lib/fog/ovirt/requests/compute/list_clusters.rb +20 -0
  519. data/lib/fog/ovirt/requests/compute/list_networks.rb +17 -0
  520. data/lib/fog/ovirt/requests/compute/list_template_interfaces.rb +20 -0
  521. data/lib/fog/ovirt/requests/compute/list_templates.rb +20 -0
  522. data/lib/fog/ovirt/requests/compute/list_virtual_machines.rb +20 -0
  523. data/lib/fog/ovirt/requests/compute/list_vm_interfaces.rb +20 -0
  524. data/lib/fog/ovirt/requests/compute/mock_files/cluster.xml +20 -0
  525. data/lib/fog/ovirt/requests/compute/mock_files/clusters.xml +39 -0
  526. data/lib/fog/ovirt/requests/compute/mock_files/data_centers.xml +17 -0
  527. data/lib/fog/ovirt/requests/compute/mock_files/nics.xml +10 -0
  528. data/lib/fog/ovirt/requests/compute/mock_files/storage_domains.xml +36 -0
  529. data/lib/fog/ovirt/requests/compute/mock_files/template.xml +39 -0
  530. data/lib/fog/ovirt/requests/compute/mock_files/templates.xml +110 -0
  531. data/lib/fog/ovirt/requests/compute/mock_files/vm.xml +54 -0
  532. data/lib/fog/ovirt/requests/compute/mock_files/vms.xml +152 -0
  533. data/lib/fog/ovirt/requests/compute/storage_domains.rb +22 -0
  534. data/lib/fog/ovirt/requests/compute/update_interface.rb +25 -0
  535. data/lib/fog/ovirt/requests/compute/update_vm.rb +20 -0
  536. data/lib/fog/ovirt/requests/compute/vm_action.rb +26 -0
  537. data/lib/fog/ovirt.rb +17 -0
  538. data/lib/fog/providers.rb +5 -1
  539. data/lib/fog/rackspace/dns.rb +10 -2
  540. data/lib/fog/rackspace/load_balancers.rb +3 -0
  541. data/lib/fog/rackspace/models/compute/flavor.rb +2 -0
  542. data/lib/fog/rackspace/models/compute/server.rb +2 -2
  543. data/lib/fog/rackspace/models/dns/callback.rb +3 -1
  544. data/lib/fog/rackspace/models/dns/record.rb +4 -0
  545. data/lib/fog/rackspace/models/load_balancers/load_balancer.rb +18 -8
  546. data/lib/fog/rackspace/models/storage/directory.rb +5 -1
  547. data/lib/fog/rackspace/models/storage/file.rb +7 -0
  548. data/lib/fog/rackspace/requests/compute/create_image.rb +1 -3
  549. data/lib/fog/rackspace/requests/load_balancers/delete_nodes.rb +1 -2
  550. data/lib/fog/rackspace/requests/load_balancers/get_error_page.rb +15 -0
  551. data/lib/fog/rackspace/requests/load_balancers/list_load_balancers.rb +8 -2
  552. data/lib/fog/rackspace/requests/load_balancers/remove_error_page.rb +15 -0
  553. data/lib/fog/rackspace/requests/load_balancers/set_error_page.rb +21 -0
  554. data/lib/fog/rackspace/requests/storage/copy_object.rb +27 -0
  555. data/lib/fog/rackspace/requests/storage/get_object.rb +8 -2
  556. data/lib/fog/rackspace/requests/storage/put_object.rb +6 -5
  557. data/lib/fog/rackspace/storage.rb +1 -0
  558. data/lib/fog/storm_on_demand/compute.rb +1 -1
  559. data/lib/fog/vcloud/compute.rb +91 -30
  560. data/lib/fog/vcloud/models/compute/catalog.rb +1 -1
  561. data/lib/fog/vcloud/models/compute/catalog_item.rb +1 -1
  562. data/lib/fog/vcloud/models/compute/catalogs.rb +5 -8
  563. data/lib/fog/vcloud/models/compute/helpers/status.rb +37 -0
  564. data/lib/fog/vcloud/models/compute/ip.rb +2 -2
  565. data/lib/fog/vcloud/models/compute/network.rb +9 -51
  566. data/lib/fog/vcloud/models/compute/networks.rb +21 -7
  567. data/lib/fog/vcloud/models/compute/organization.rb +43 -0
  568. data/lib/fog/vcloud/models/compute/organizations.rb +32 -0
  569. data/lib/fog/vcloud/models/compute/server.rb +38 -58
  570. data/lib/fog/vcloud/models/compute/servers.rb +12 -18
  571. data/lib/fog/vcloud/models/compute/task.rb +1 -1
  572. data/lib/fog/vcloud/models/compute/tasks.rb +1 -3
  573. data/lib/fog/vcloud/models/compute/vapp.rb +43 -0
  574. data/lib/fog/vcloud/models/compute/vapps.rb +28 -0
  575. data/lib/fog/vcloud/models/compute/vdc.rb +14 -29
  576. data/lib/fog/vcloud/models/compute/vdcs.rb +6 -11
  577. data/lib/fog/vcloud/requests/compute/clone_vapp.rb +1 -1
  578. data/lib/fog/vcloud/requests/compute/configure_network.rb +1 -1
  579. data/lib/fog/vcloud/requests/compute/configure_network_ip.rb +1 -1
  580. data/lib/fog/vcloud/requests/compute/configure_vapp.rb +1 -1
  581. data/lib/fog/vcloud/requests/compute/configure_vm.rb +1 -1
  582. data/lib/fog/vcloud/requests/compute/get_server.rb +10 -0
  583. data/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb +1 -1
  584. data/lib/fog/vcloud/requests/compute/login.rb +8 -4
  585. data/lib/fog/virtual_box/compute.rb +4 -0
  586. data/lib/fog/vmfusion/models/compute/server.rb +120 -52
  587. data/lib/fog/vmfusion/models/compute/servers.rb +11 -7
  588. data/lib/fog/voxel/compute.rb +1 -1
  589. data/lib/fog/vsphere/compute.rb +6 -0
  590. data/lib/fog/vsphere/models/compute/server.rb +43 -0
  591. data/lib/fog/vsphere/models/compute/servers.rb +8 -2
  592. data/lib/fog/vsphere/requests/compute/datacenters.rb +34 -0
  593. data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +132 -91
  594. data/lib/fog/vsphere/requests/compute/vm_clone.rb +115 -41
  595. data/lib/fog/vsphere/requests/compute/vm_create.rb +97 -0
  596. data/lib/fog/vsphere/requests/compute/vm_migrate.rb +37 -0
  597. data/lib/fog/vsphere/requests/compute/vm_reconfig_cpus.rb +23 -0
  598. data/lib/fog/vsphere/requests/compute/vm_reconfig_hardware.rb +25 -0
  599. data/lib/fog/vsphere/requests/compute/vm_reconfig_memory.rb +23 -0
  600. data/lib/fog/zerigo/models/dns/record.rb +7 -5
  601. data/lib/fog/zerigo/parsers/dns/create_host.rb +3 -1
  602. data/lib/fog/zerigo/parsers/dns/find_hosts.rb +3 -1
  603. data/lib/fog/zerigo/parsers/dns/get_host.rb +3 -1
  604. data/lib/fog/zerigo/parsers/dns/get_zone.rb +3 -1
  605. data/lib/fog/zerigo/parsers/dns/list_hosts.rb +3 -1
  606. data/lib/fog/zerigo/requests/dns/update_host.rb +2 -2
  607. data/lib/fog.rb +1 -1
  608. data/spec/ecloud/spec_helper.rb +1 -1
  609. data/spec/lib/fog/aws/parsers/sqs/receive_message_spec.rb +58 -0
  610. data/tests/aws/models/beanstalk/application_tests.rb +70 -0
  611. data/tests/aws/models/beanstalk/applications_tests.rb +7 -0
  612. data/tests/aws/models/beanstalk/environment_tests.rb +132 -0
  613. data/tests/aws/models/beanstalk/environments_tests.rb +34 -0
  614. data/tests/aws/models/beanstalk/template_tests.rb +47 -0
  615. data/tests/aws/models/beanstalk/templates_tests.rb +62 -0
  616. data/tests/aws/models/beanstalk/version_tests.rb +66 -0
  617. data/tests/aws/models/beanstalk/versions_tests.rb +61 -0
  618. data/tests/aws/models/compute/subnet_tests.rb +5 -0
  619. data/tests/aws/models/compute/subnets_tests.rb +6 -0
  620. data/tests/aws/models/compute/vpc_tests.rb +4 -0
  621. data/tests/aws/models/compute/vpcs_tests.rb +6 -0
  622. data/tests/aws/models/dns/record_tests.rb +23 -0
  623. data/tests/aws/models/dns/records_tests.rb +23 -0
  624. data/tests/aws/models/dns/zone_tests.rb +4 -0
  625. data/tests/aws/models/dns/zones_tests.rb +4 -0
  626. data/tests/aws/models/elb/model_tests.rb +15 -6
  627. data/tests/aws/models/rds/security_group_tests.rb +6 -3
  628. data/tests/aws/models/rds/security_groups_tests.rb +1 -2
  629. data/tests/aws/models/rds/server_tests.rb +5 -3
  630. data/tests/aws/models/rds/servers_tests.rb +1 -3
  631. data/tests/aws/models/rds/snapshot_tests.rb +1 -3
  632. data/tests/aws/models/rds/snapshots_tests.rb +1 -3
  633. data/tests/aws/models/storage/directory_tests.rb +51 -0
  634. data/tests/aws/models/storage/file_tests.rb +80 -0
  635. data/tests/aws/models/storage/files_tests.rb +56 -0
  636. data/tests/aws/models/storage/version_tests.rb +52 -0
  637. data/tests/aws/models/storage/versions_tests.rb +56 -0
  638. data/tests/aws/requests/auto_scaling/helper.rb +2 -2
  639. data/tests/aws/requests/beanstalk/application_tests.rb +140 -0
  640. data/tests/aws/requests/beanstalk/solution_stack_tests.rb +22 -0
  641. data/tests/aws/requests/compute/address_tests.rb +7 -5
  642. data/tests/aws/requests/compute/instance_tests.rb +37 -0
  643. data/tests/aws/requests/compute/security_group_tests.rb +78 -4
  644. data/tests/aws/requests/compute/subnet_tests.rb +36 -0
  645. data/tests/aws/requests/compute/volume_tests.rb +4 -0
  646. data/tests/aws/requests/compute/vpc_tests.rb +34 -0
  647. data/tests/aws/requests/dns/dns_tests.rb +106 -99
  648. data/tests/aws/requests/dns/helper.rb +21 -0
  649. data/tests/aws/requests/dynamodb/item_tests.rb +117 -0
  650. data/tests/aws/requests/dynamodb/table_tests.rb +99 -0
  651. data/tests/aws/requests/elb/helper.rb +33 -0
  652. data/tests/aws/requests/elb/listener_tests.rb +22 -4
  653. data/tests/aws/requests/elb/policy_tests.rb +13 -0
  654. data/tests/aws/requests/iam/access_key_tests.rb +2 -7
  655. data/tests/aws/requests/iam/group_tests.rb +1 -4
  656. data/tests/aws/requests/iam/helper.rb +19 -0
  657. data/tests/aws/requests/iam/server_certificate_tests.rb +5 -0
  658. data/tests/aws/requests/iam/user_policy_tests.rb +4 -11
  659. data/tests/aws/requests/iam/user_tests.rb +19 -12
  660. data/tests/aws/requests/rds/helper.rb +45 -11
  661. data/tests/aws/requests/rds/instance_tests.rb +2 -3
  662. data/tests/aws/requests/rds/parameter_group_tests.rb +1 -7
  663. data/tests/aws/requests/rds/security_group_tests.rb +101 -0
  664. data/tests/aws/requests/storage/{hash_to_acl_tests.rb → acl_utils_tests.rb} +38 -2
  665. data/tests/aws/requests/storage/bucket_tests.rb +66 -4
  666. data/tests/aws/requests/storage/object_tests.rb +2 -4
  667. data/tests/aws/requests/storage/versioning_tests.rb +188 -0
  668. data/tests/aws/requests/sts/get_federation_token_tests.rb +21 -0
  669. data/tests/aws/requests/sts/session_token_tests.rb +16 -0
  670. data/tests/bluebox/requests/compute/block_tests.rb +9 -8
  671. data/tests/bluebox/requests/compute/helper.rb +5 -0
  672. data/tests/bluebox/requests/compute/location_tests.rb +32 -0
  673. data/tests/bluebox/requests/compute/product_tests.rb +10 -4
  674. data/tests/bluebox/requests/compute/template_tests.rb +4 -2
  675. data/tests/brightbox/requests/compute/account_tests.rb +11 -6
  676. data/tests/brightbox/requests/compute/api_client_tests.rb +23 -12
  677. data/tests/brightbox/requests/compute/cloud_ip_tests.rb +32 -17
  678. data/tests/brightbox/requests/compute/helper.rb +62 -11
  679. data/tests/brightbox/requests/compute/image_tests.rb +17 -14
  680. data/tests/brightbox/requests/compute/interface_tests.rb +3 -2
  681. data/tests/brightbox/requests/compute/load_balancer_tests.rb +57 -11
  682. data/tests/brightbox/requests/compute/server_group_tests.rb +29 -22
  683. data/tests/brightbox/requests/compute/server_tests.rb +43 -22
  684. data/tests/brightbox/requests/compute/server_type_tests.rb +7 -6
  685. data/tests/brightbox/requests/compute/user_tests.rb +11 -16
  686. data/tests/brightbox/requests/compute/zone_tests.rb +7 -6
  687. data/tests/clodo/requests/compute/image_tests.rb +36 -0
  688. data/tests/clodo/requests/compute/server_tests.rb +152 -0
  689. data/tests/cloudstack/requests/disk_offering_tests.rb +29 -0
  690. data/tests/cloudstack/requests/os_type_tests.rb +38 -0
  691. data/tests/cloudstack/requests/security_group_tests.rb +29 -0
  692. data/tests/cloudstack/requests/service_offering_tests.rb +38 -0
  693. data/tests/cloudstack/requests/snapshot_tests.rb +32 -0
  694. data/tests/cloudstack/requests/ssh_key_pair_tests.rb +23 -0
  695. data/tests/cloudstack/requests/template_tests.rb +53 -0
  696. data/tests/cloudstack/requests/virtual_machine_tests.rb +71 -0
  697. data/tests/cloudstack/requests/volume_tests.rb +48 -0
  698. data/tests/cloudstack/requests/zone_tests.rb +33 -0
  699. data/tests/cloudstack/signed_params_tests.rb +12 -0
  700. data/tests/compute/helper.rb +8 -3
  701. data/tests/core/credential_tests.rb +2 -2
  702. data/tests/glesys/requests/compute/helper.rb +187 -139
  703. data/tests/glesys/requests/compute/ip_tests.rb +4 -4
  704. data/tests/glesys/requests/compute/server_tests.rb +55 -17
  705. data/tests/helper.rb +1 -1
  706. data/tests/helpers/formats_helper.rb +1 -1
  707. data/tests/helpers/mock_helper.rb +9 -2
  708. data/tests/joyent/requests/compute/datasets_tests.rb +49 -0
  709. data/tests/joyent/requests/compute/keys_tests.rb +47 -0
  710. data/tests/joyent/requests/compute/machines_tests.rb +67 -0
  711. data/tests/joyent/requests/compute/packages_tests.rb +68 -0
  712. data/tests/ovirt/compute_tests.rb +24 -0
  713. data/tests/ovirt/models/compute/cluster_tests.rb +31 -0
  714. data/tests/ovirt/models/compute/clusters_tests.rb +9 -0
  715. data/tests/ovirt/models/compute/interface_tests.rb +27 -0
  716. data/tests/ovirt/models/compute/interfaces_tests.rb +9 -0
  717. data/tests/ovirt/models/compute/server_tests.rb +51 -0
  718. data/tests/ovirt/models/compute/servers_tests.rb +14 -0
  719. data/tests/ovirt/models/compute/template_tests.rb +28 -0
  720. data/tests/ovirt/models/compute/templates_tests.rb +9 -0
  721. data/tests/ovirt/requests/compute/create_vm_tests.rb +26 -0
  722. data/tests/ovirt/requests/compute/destroy_vm_tests.rb +18 -0
  723. data/tests/ovirt/requests/compute/list_datacenters_tests.rb +13 -0
  724. data/tests/ovirt/requests/compute/list_storage_domains_tests.rb +13 -0
  725. data/tests/ovirt/requests/compute/update_vm_tests.rb +18 -0
  726. data/tests/rackspace/models/dns/zone_tests.rb +14 -0
  727. data/tests/rackspace/models/{load_balancer_tests.rb → load_balancers/load_balancer_tests.rb} +25 -0
  728. data/tests/rackspace/requests/dns/dns_tests.rb +4 -2
  729. data/tests/rackspace/requests/load_balancers/error_page_tests.rb +31 -0
  730. data/tests/rackspace/requests/load_balancers/helper.rb +27 -11
  731. data/tests/rackspace/requests/load_balancers/load_balancer_tests.rb +4 -1
  732. data/tests/rackspace/requests/load_balancers/node_tests.rb +24 -25
  733. data/tests/slicehost/requests/compute/slice_tests.rb +2 -2
  734. data/tests/storm_on_demand/requests/compute/server_tests.rb +3 -3
  735. data/tests/vcloud/data/api_+_admin_+_network_+_2 +110 -0
  736. data/tests/vcloud/data/api_+_network_+_1 +44 -0
  737. data/tests/vcloud/data/api_+_org_+_ +5 -0
  738. data/tests/vcloud/data/api_+_org_+_1 +17 -0
  739. data/tests/vcloud/data/api_+_sessions +8 -0
  740. data/tests/vcloud/data/api_+_v1.0_+_admin_+_network_+_2 +110 -0
  741. data/tests/vcloud/data/api_+_v1.0_+_login +5 -0
  742. data/tests/vcloud/data/api_+_v1.0_+_network_+_1 +44 -0
  743. data/tests/vcloud/data/api_+_v1.0_+_network_+_2 +31 -0
  744. data/tests/vcloud/data/api_+_v1.0_+_org_+_1 +17 -0
  745. data/tests/vcloud/data/api_+_v1.0_+_vApp_+_vapp-1 +369 -0
  746. data/tests/vcloud/data/api_+_v1.0_+_vApp_+_vm-1 +139 -0
  747. data/tests/vcloud/data/api_+_v1.0_+_vApp_+_vm-2 +155 -0
  748. data/tests/vcloud/data/api_+_v1.0_+_vdc_+_1 +61 -0
  749. data/tests/vcloud/data/api_+_vApp_+_vapp-1 +369 -0
  750. data/tests/vcloud/data/api_+_vApp_+_vm-2 +155 -0
  751. data/tests/vcloud/data/api_+_vdc_+_1 +61 -0
  752. data/tests/vcloud/models/compute/conn_helper.rb +20 -0
  753. data/tests/vcloud/models/compute/network_tests.rb +67 -0
  754. data/tests/vcloud/models/compute/networks_tests.rb +61 -0
  755. data/tests/vcloud/models/compute/organization_tests.rb +20 -0
  756. data/tests/vcloud/models/compute/organizations_tests.rb +16 -0
  757. data/tests/vcloud/models/compute/server_tests.rb +142 -0
  758. data/tests/vcloud/models/compute/servers_tests.rb +18 -90
  759. data/tests/vcloud/models/compute/vapp_tests.rb +32 -0
  760. data/tests/vcloud/models/compute/vapps_tests.rb +19 -0
  761. data/tests/vcloud/models/compute/vdc_tests.rb +48 -0
  762. data/tests/vcloud/models/compute/vdcs_tests.rb +24 -0
  763. data/tests/vsphere/requests/compute/vm_clone_tests.rb +16 -8
  764. data/tests/vsphere/requests/compute/vm_create_tests.rb +20 -0
  765. data/tests/vsphere/requests/compute/vm_migrate_tests.rb +16 -0
  766. data/tests/vsphere/requests/compute/vm_power_on_tests.rb +1 -1
  767. data/tests/vsphere/requests/compute/vm_reconfig_cpus_tests.rb +19 -0
  768. data/tests/vsphere/requests/compute/vm_reconfig_hardware_tests.rb +19 -0
  769. data/tests/vsphere/requests/compute/vm_reconfig_memory_tests.rb +19 -0
  770. metadata +635 -70
  771. data/examples/compute_tests.rb +0 -71
  772. data/examples/dns_tests.rb +0 -78
  773. data/examples/storage_tests.rb +0 -105
  774. /data/tests/rackspace/models/{access_list_tests.rb → load_balancers/access_list_tests.rb} +0 -0
  775. /data/tests/rackspace/models/{access_lists_tests.rb → load_balancers/access_lists_tests.rb} +0 -0
  776. /data/tests/rackspace/models/{load_balancers_tests.rb → load_balancers/load_balancers_tests.rb} +0 -0
  777. /data/tests/rackspace/models/{node_tests.rb → load_balancers/node_tests.rb} +0 -0
  778. /data/tests/rackspace/models/{nodes_tests.rb → load_balancers/nodes_tests.rb} +0 -0
  779. /data/tests/rackspace/models/{virtual_ip_tests.rb → load_balancers/virtual_ip_tests.rb} +0 -0
  780. /data/tests/rackspace/models/{virtual_ips_tests.rb → load_balancers/virtual_ips_tests.rb} +0 -0
@@ -9,7 +9,7 @@ module Fog
9
9
  #
10
10
  # ==== Parameters
11
11
  # * options<~Hash>
12
- # * marker<~String> - Indicates where to begin in your list of hosted zones.
12
+ # * marker<~String> - Indicates where to begin in your list of hosted zones.
13
13
  # * max_items<~Integer> - The maximum number of hosted zones to be included in the response body
14
14
  #
15
15
  # ==== Returns
@@ -17,33 +17,33 @@ module Fog
17
17
  # * body<~Hash>:
18
18
  # * 'HostedZones'<~Array>:
19
19
  # * 'HostedZone'<~Hash>:
20
- # * 'Id'<~String> -
21
- # * 'Name'<~String> -
20
+ # * 'Id'<~String> -
21
+ # * 'Name'<~String> -
22
22
  # * 'CallerReference'<~String>
23
- # * 'Comment'<~String> -
24
- # * 'Marker'<~String> -
25
- # * 'MaxItems'<~Integer> -
26
- # * 'IsTruncated'<~String> -
23
+ # * 'Comment'<~String> -
24
+ # * 'Marker'<~String> -
25
+ # * 'MaxItems'<~Integer> -
26
+ # * 'IsTruncated'<~String> -
27
27
  # * 'NextMarket'<~String>
28
28
  # * status<~Integer> - 200 when successful
29
29
  def list_hosted_zones(options = {})
30
30
 
31
31
  parameters = {}
32
- options.each { |option, value|
32
+ options.each do |option, value|
33
33
  case option
34
34
  when :marker
35
35
  parameters[option] = value
36
36
  when :max_items
37
37
  parameters[:maxitems] = value
38
38
  end
39
- }
40
-
39
+ end
40
+
41
41
  request({
42
- :query => parameters,
43
- :parser => Fog::Parsers::DNS::AWS::ListHostedZones.new,
44
- :expects => 200,
45
- :method => 'GET',
46
- :path => "hostedzone"
42
+ :query => parameters,
43
+ :parser => Fog::Parsers::DNS::AWS::ListHostedZones.new,
44
+ :expects => 200,
45
+ :method => 'GET',
46
+ :path => "hostedzone"
47
47
  })
48
48
 
49
49
  end
@@ -8,48 +8,51 @@ module Fog
8
8
  # list your resource record sets
9
9
  #
10
10
  # ==== Parameters
11
- # * zone_id<~String> -
11
+ # * zone_id<~String> -
12
12
  # * options<~Hash>
13
- # * type<~String> -
13
+ # * type<~String> -
14
14
  # * name<~String> -
15
- # * max_items<~Integer> -
15
+ # * max_items<~Integer> -
16
16
  #
17
17
  # ==== Returns
18
18
  # * response<~Excon::Response>:
19
19
  # * body<~Hash>:
20
20
  # * 'ResourceRecordSet'<~Array>:
21
- # * 'Name'<~String> -
22
- # * 'Type'<~String> -
23
- # * 'TTL'<~Integer> -
21
+ # * 'Name'<~String> -
22
+ # * 'Type'<~String> -
23
+ # * 'TTL'<~Integer> -
24
+ # * 'AliasTarget'<~Hash> -
25
+ # * 'HostedZoneId'<~String> -
26
+ # * 'DNSName'<~String> -
24
27
  # * 'ResourceRecords'<~Array>
25
- # * 'Value'<~String> -
26
- # * 'IsTruncated'<~String> -
27
- # * 'MaxItems'<~String> -
28
+ # * 'Value'<~String> -
29
+ # * 'IsTruncated'<~String> -
30
+ # * 'MaxItems'<~String> -
28
31
  # * 'NextRecordName'<~String>
29
32
  # * 'NexRecordType'<~String>
30
33
  # * status<~Integer> - 201 when successful
31
34
  def list_resource_record_sets(zone_id, options = {})
32
35
 
33
- # AWS methods return zone_ids that looks like '/hostedzone/id'. Let the caller either use
36
+ # AWS methods return zone_ids that looks like '/hostedzone/id'. Let the caller either use
34
37
  # that form or just the actual id (which is what this request needs)
35
38
  zone_id = zone_id.sub('/hostedzone/', '')
36
39
 
37
40
  parameters = {}
38
- options.each { |option, value|
41
+ options.each do |option, value|
39
42
  case option
40
43
  when :type, :name
41
- parameters[option]= "#{value}"
44
+ parameters[option] = "#{value}"
42
45
  when :max_items
43
- parameters['maxitems']= "#{value}"
46
+ parameters['maxitems'] = "#{value}"
44
47
  end
45
- }
46
-
48
+ end
49
+
47
50
  request({
48
- :query => parameters,
49
- :parser => Fog::Parsers::DNS::AWS::ListResourceRecordSets.new,
50
- :expects => 200,
51
- :method => 'GET',
52
- :path => "hostedzone/#{zone_id}/rrset"
51
+ :query => parameters,
52
+ :parser => Fog::Parsers::DNS::AWS::ListResourceRecordSets.new,
53
+ :expects => 200,
54
+ :method => 'GET',
55
+ :path => "hostedzone/#{zone_id}/rrset"
53
56
  })
54
57
 
55
58
  end
@@ -0,0 +1,43 @@
1
+ module Fog
2
+ module AWS
3
+ class DynamoDB
4
+ class Real
5
+
6
+ # Get DynamoDB items
7
+ #
8
+ # ==== Parameters
9
+ # * 'request_items'<~Hash>:
10
+ # * 'table_name'<~Hash>:
11
+ # * 'Keys'<~Array>: array of keys
12
+ # * 'HashKeyElement'<~Hash>: info for primary key
13
+ # * 'AttributeType'<~String> - type of attribute
14
+ # * 'AttributeName'<~String> - name of attribute
15
+ # * 'RangeKeyElement'<~Hash>: optional, info for range key
16
+ # * 'AttributeType'<~String> - type of attribute
17
+ # * 'AttributeName'<~String> - name of attribute
18
+ # * 'AttributesToGet'<~Array> - optional attributes to return, defaults to all
19
+ #
20
+ # ==== Returns
21
+ # * response<~Excon::Response>:
22
+ # * body<~Hash>:
23
+ # * 'Responses'<~Hash>:
24
+ # * 'table_name'<~Hash>:
25
+ # * 'Items'<~Array> - Matching items
26
+ # * 'ConsumedCapacityUnits'<~Float> - Capacity units used in read
27
+ # * 'UnprocessedKeys':<~Hash> - tables and keys in excess of per request limit, pass this to subsequent batch get for pseudo-pagination
28
+ def batch_get_item(request_items)
29
+ body = {
30
+ 'RequestItems' => request_items
31
+ }
32
+
33
+ request(
34
+ :body => MultiJson.encode(body),
35
+ :headers => {'x-amz-target' => 'DynamoDB_20111205.BatchGetItem'},
36
+ :idempotent => true
37
+ )
38
+ end
39
+
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,55 @@
1
+ module Fog
2
+ module AWS
3
+ class DynamoDB
4
+ class Real
5
+
6
+ # Create DynamoDB table
7
+ #
8
+ # ==== Parameters
9
+ # * 'table_name'<~String> - name of table to create
10
+ # * 'key_schema'<~Hash>:
11
+ # * 'HashKeyElement'<~Hash>: info for primary key
12
+ # * 'AttributeName'<~String> - name of attribute
13
+ # * 'AttributeType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
14
+ # * 'RangeKeyElement'<~Hash>: optional, info for range key
15
+ # * 'AttributeName'<~String> - name of attribute
16
+ # * 'AttributeType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
17
+ # * 'provisioned_throughput'<~Hash>:
18
+ # * 'ReadCapacityUnits'<~Integer> - read capacity for table, in 5..10000
19
+ # * 'WriteCapacityUnits'<~Integer> - write capacity for table, in 5..10000
20
+ #
21
+ # ==== Returns
22
+ # * response<~Excon::Response>:
23
+ # * body<~Hash>:
24
+ # * 'TableDescription'<~Hash>
25
+ # * 'CreationDateTime'<~Float> - Unix epoch time of table creation
26
+ # * 'KeySchema'<~Hash> - schema for table
27
+ # * 'HashKeyElement'<~Hash>: info for primary key
28
+ # * 'AttributeName'<~String> - name of attribute
29
+ # * 'AttributeType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
30
+ # * 'RangeKeyElement'<~Hash>: optional, info for range key
31
+ # * 'AttributeName'<~String> - name of attribute
32
+ # * 'AttributeType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
33
+ # * 'ProvisionedThroughput'<~Hash>:
34
+ # * 'ReadCapacityUnits'<~Integer> - read capacity for table, in 5..10000
35
+ # * 'WriteCapacityUnits'<~Integer> - write capacity for table, in 5..10000
36
+ # * 'TableName'<~String> - name of table
37
+ # * 'TableStatus'<~String> - status of table
38
+ def create_table(table_name, key_schema, provisioned_throughput)
39
+ body = {
40
+ 'KeySchema' => key_schema,
41
+ 'ProvisionedThroughput' => provisioned_throughput,
42
+ 'TableName' => table_name
43
+ }
44
+
45
+ request(
46
+ :body => MultiJson.encode(body),
47
+ :headers => {'x-amz-target' => 'DynamoDB_20111205.CreateTable'},
48
+ :idempotent => true
49
+ )
50
+ end
51
+
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,45 @@
1
+ module Fog
2
+ module AWS
3
+ class DynamoDB
4
+ class Real
5
+
6
+ # Delete DynamoDB item
7
+ #
8
+ # ==== Parameters
9
+ # * 'table_name'<~String> - name of table for item
10
+ # * 'key'<~Hash>:
11
+ # * 'HashKeyElement'<~Hash>: info for primary key
12
+ # * 'AttributeName'<~String> - name of attribute
13
+ # * 'AttributeType'<~String> - type of attribute
14
+ # * 'RangeKeyElement'<~Hash>: optional, info for range key
15
+ # * 'AttributeName'<~String> - name of attribute
16
+ # * 'AttributeType'<~String> - type of attribute
17
+ # * 'options'<~Hash>:
18
+ # * 'Expected'<~Hash>: data to check against
19
+ # * 'AttributeName'<~String> - name of attribute
20
+ # * 'Value'<~Hash> - a value to check for the value of
21
+ # or
22
+ # * 'Exists'<~Boolean> - set as false to only allow update if attribute doesn't exist
23
+ # * 'ReturnValues'<~String> - data to return in %w{ALL_NEW ALL_OLD NONE UPDATED_NEW UPDATED_OLD}, defaults to NONE
24
+ #
25
+ # ==== Returns
26
+ # * response<~Excon::Response>:
27
+ # * body<~Hash>:
28
+ # varies based on ReturnValues param, see: http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/API_UpdateItem.html
29
+ def delete_item(table_name, key, options = {})
30
+ body = {
31
+ 'Key' => key,
32
+ 'TableName' => table_name
33
+ }.merge(options)
34
+
35
+ request(
36
+ :body => MultiJson.encode(body),
37
+ :headers => {'x-amz-target' => 'DynamoDB_20111205.DeleteItem'},
38
+ :idempotent => true
39
+ )
40
+ end
41
+
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,42 @@
1
+ module Fog
2
+ module AWS
3
+ class DynamoDB
4
+ class Real
5
+
6
+ # Delete DynamoDB table
7
+ #
8
+ # ==== Parameters
9
+ # * 'table_name'<~String> - name of table to delete
10
+ #
11
+ # ==== Returns
12
+ # * response<~Excon::Response>:
13
+ # * body<~Hash>:
14
+ # * 'TableDescription'<~Hash>
15
+ # * 'KeySchema'<~Hash> - schema for table
16
+ # * 'HashKeyElement'<~Hash>: info for primary key
17
+ # * 'AttributeName'<~String> - name of attribute
18
+ # * 'AttributeType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
19
+ # * 'RangeKeyElement'<~Hash>: optional, info for range key
20
+ # * 'AttributeName'<~String> - name of attribute
21
+ # * 'AttributeType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
22
+ # * 'ProvisionedThroughput'<~Hash>:
23
+ # * 'ReadCapacityUnits'<~Integer> - read capacity for table, in 5..10000
24
+ # * 'WriteCapacityUnits'<~Integer> - write capacity for table, in 5..10000
25
+ # * 'TableName'<~String> - name of table
26
+ # * 'TableStatus'<~String> - status of table
27
+ def delete_table(table_name)
28
+ body = {
29
+ 'TableName' => table_name
30
+ }
31
+
32
+ request(
33
+ :body => MultiJson.encode(body),
34
+ :headers => {'x-amz-target' => 'DynamoDB_20111205.DeleteTable'},
35
+ :idempotent => true
36
+ )
37
+ end
38
+
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,44 @@
1
+ module Fog
2
+ module AWS
3
+ class DynamoDB
4
+ class Real
5
+
6
+ # Describe DynamoDB table
7
+ #
8
+ # ==== Parameters
9
+ # * 'table_name'<~String> - name of table to describe
10
+ #
11
+ # ==== Returns
12
+ # * response<~Excon::Response>:
13
+ # * body<~Hash>:
14
+ # * 'Table'<~Hash>
15
+ # * 'CreationDateTime'<~Float> - Unix epoch time of table creation
16
+ # * 'KeySchema'<~Hash> - schema for table
17
+ # * 'HashKeyElement'<~Hash>: info for primary key
18
+ # * 'AttributeName'<~String> - name of attribute
19
+ # * 'AttributeType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
20
+ # * 'RangeKeyElement'<~Hash>: optional, info for range key
21
+ # * 'AttributeName'<~String> - name of attribute
22
+ # * 'AttributeType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
23
+ # * 'ProvisionedThroughput'<~Hash>:
24
+ # * 'ReadCapacityUnits'<~Integer> - read capacity for table, in 5..10000
25
+ # * 'WriteCapacityUnits'<~Integer> - write capacity for table, in 5..10000
26
+ # * 'TableName'<~String> - name of table
27
+ # * 'TableSizeBytes'<~Integer> - size of table in bytes
28
+ # * 'TableStatus'<~String> - status of table
29
+ def describe_table(table_name)
30
+ body = {
31
+ 'TableName' => table_name
32
+ }
33
+
34
+ request(
35
+ :body => MultiJson.encode(body),
36
+ :headers => {'x-amz-target' => 'DynamoDB_20111205.DescribeTable'},
37
+ :idempotent => true
38
+ )
39
+ end
40
+
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,43 @@
1
+ module Fog
2
+ module AWS
3
+ class DynamoDB
4
+ class Real
5
+
6
+ # Get DynamoDB item
7
+ #
8
+ # ==== Parameters
9
+ # * 'table_name'<~String> - name of table for item
10
+ # * 'key'<~Hash>:
11
+ # * 'HashKeyElement'<~Hash>: info for primary key
12
+ # * 'AttributeType'<~String> - type of attribute
13
+ # * 'AttributeName'<~String> - name of attribute
14
+ # * 'RangeKeyElement'<~Hash>: optional, info for range key
15
+ # * 'AttributeType'<~String> - type of attribute
16
+ # * 'AttributeName'<~String> - name of attribute
17
+ # * 'options'<~Hash>:
18
+ # * 'AttributesToGet'<~Array>: list of array names to return, defaults to returning all
19
+ # * 'ConsistentRead'<~Boolean>: whether to wait for updates, defaults to false
20
+ #
21
+ # ==== Returns
22
+ # * response<~Excon::Response>:
23
+ # * body<~Hash>:
24
+ # * 'ConsumedCapacityUnits'<~Float> - Capacity units used in read
25
+ # * 'Item':<~Hash>:
26
+ # * 'AttributeName'<~Hash>: in form of {"type":value}
27
+ def get_item(table_name, key, options = {})
28
+ body = {
29
+ 'Key' => key,
30
+ 'TableName' => table_name
31
+ }.merge(options)
32
+
33
+ request(
34
+ :body => MultiJson.encode(body),
35
+ :headers => {'x-amz-target' => 'DynamoDB_20111205.GetItem'},
36
+ :idempotent => true
37
+ )
38
+ end
39
+
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,29 @@
1
+ module Fog
2
+ module AWS
3
+ class DynamoDB
4
+ class Real
5
+
6
+ # List DynamoDB tables
7
+ #
8
+ # ==== Parameters
9
+ # * 'options'<~Hash> - options, defaults to {}
10
+ # * 'ExclusiveStartTableName'<~String> - name of table to begin listing with
11
+ # * 'Limit'<~Integer> - limit number of tables to return
12
+ #
13
+ # ==== Returns
14
+ # * response<~Excon::Response>:
15
+ # * body<~Hash>:
16
+ # * 'LastEvaluatedTableName'<~String> - last table name, for pagination
17
+ # * 'TableNames'<~Array> - table names
18
+ def list_tables(options = {})
19
+ request(
20
+ :body => MultiJson.encode(options),
21
+ :headers => {'x-amz-target' => 'DynamoDB_20111205.ListTables'},
22
+ :idempotent => true
23
+ )
24
+ end
25
+
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,41 @@
1
+ module Fog
2
+ module AWS
3
+ class DynamoDB
4
+ class Real
5
+
6
+ # Update DynamoDB item
7
+ #
8
+ # ==== Parameters
9
+ # * 'table_name'<~String> - name of table for item
10
+ # * 'item'<~Hash>: data to update, must include primary key
11
+ # * 'AttributeName'<~String> - Attribute to update
12
+ # * 'Value'<~Hash> - formated as {type => value}
13
+ # * 'Action'<~String> - action to take if expects matches, in %w{ADD DELETE PUT}, defaults to PUT
14
+ # * 'options'<~Hash>:
15
+ # * 'Expected'<~Hash>: data to check against
16
+ # * 'AttributeName'<~String> - name of attribute
17
+ # * 'Value'<~Hash> - a value to check for the value of
18
+ # or
19
+ # * 'Exists'<~Boolean> - set as false to only allow update if attribute doesn't exist
20
+ # * 'ReturnValues'<~String> - data to return in %w{ALL_NEW ALL_OLD NONE UPDATED_NEW UPDATED_OLD}, defaults to NONE
21
+ #
22
+ # ==== Returns
23
+ # * response<~Excon::Response>:
24
+ # * body<~Hash>:
25
+ # varies based on ReturnValues param, see: http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/API_UpdateItem.html
26
+ def put_item(table_name, item, options = {})
27
+ body = {
28
+ 'Item' => item,
29
+ 'TableName' => table_name
30
+ }.merge(options)
31
+
32
+ request(
33
+ :body => MultiJson.encode(body),
34
+ :headers => {'x-amz-target' => 'DynamoDB_20111205.PutItem'}
35
+ )
36
+ end
37
+
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,44 @@
1
+ module Fog
2
+ module AWS
3
+ class DynamoDB
4
+ class Real
5
+
6
+ # Query DynamoDB items
7
+ #
8
+ # ==== Parameters
9
+ # * 'table_name'<~String> - name of table to query
10
+ # * 'hash_key'<~Hash> - hash key to query
11
+ # * options<~Hash>:
12
+ # * 'AttributesToGet'<~Array> - Array of attributes to get for each item, defaults to all
13
+ # * 'ConsistentRead'<~Boolean> - Whether to wait for consistency, defaults to false
14
+ # * 'Count'<~Boolean> - If true, returns only a count of such items rather than items themselves, defaults to false
15
+ # * 'Limit'<~Integer> - limit of total items to return
16
+ # * 'RangeKeyCondition'<~Hash>: value to compare against range key
17
+ # * 'AttributeValueList'<~Hash>: one or more values to compare against
18
+ # * 'ComparisonOperator'<~String>: comparison operator to use with attribute value list, in %w{BETWEEN BEGINS_WITH EQ LE LT GE GT}
19
+ # * 'ScanIndexForward'<~Boolean>: Whether to scan from start or end of index, defaults to start
20
+ # * 'ExclusiveStartKey'<~Hash>: Key to start listing from, can be taken from LastEvaluatedKey in response
21
+ #
22
+ # ==== Returns
23
+ # * response<~Excon::Response>:
24
+ # * body<~Hash>:
25
+ # * 'ConsumedCapacityUnits'<~Integer> - number of capacity units used for query
26
+ # * 'Count'<~Integer> - number of items in response
27
+ # * 'Items'<~Array> - array of items returned
28
+ # * 'LastEvaluatedKey'<~Hash> - last key scanned, can be passed to ExclusiveStartKey for pagination
29
+ def query(table_name, hash_key, options = {})
30
+ body = {
31
+ 'TableName' => table_name,
32
+ 'HashKeyValue' => hash_key
33
+ }.merge(options)
34
+
35
+ request(
36
+ :body => MultiJson.encode(body),
37
+ :headers => {'x-amz-target' => 'DynamoDB_20111205.Query'}
38
+ )
39
+ end
40
+
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,45 @@
1
+ module Fog
2
+ module AWS
3
+ class DynamoDB
4
+ class Real
5
+
6
+ # Scan DynamoDB items
7
+ #
8
+ # ==== Parameters
9
+ # * 'table_name'<~String> - name of table to query
10
+ # * options<~Hash>:
11
+ # * 'AttributesToGet'<~Array> - Array of attributes to get for each item, defaults to all
12
+ # * 'ConsistentRead'<~Boolean> - Whether to wait for consistency, defaults to false
13
+ # * 'Count'<~Boolean> - If true, returns only a count of such items rather than items themselves, defaults to false
14
+ # * 'Limit'<~Integer> - limit of total items to return
15
+ # * 'ScanFilter'<~Hash>: value to compare against
16
+ # * attribute_name<~Hash>:
17
+ # * 'AttributeValueList'<~Hash>: one or more values to compare against
18
+ # * 'ComparisonOperator'<~String>: comparison operator to use with attribute value list, in %w{BETWEEN BEGINS_WITH EQ LE LT GE GT}
19
+ # * 'ScanIndexForward'<~Boolean>: Whether to scan from start or end of index, defaults to start
20
+ # * 'ExclusiveStartKey'<~Hash>: Key to start listing from, can be taken from LastEvaluatedKey in response
21
+ #
22
+ # ==== Returns
23
+ # * response<~Excon::Response>:
24
+ # * body<~Hash>:
25
+ # * 'ConsumedCapacityUnits'<~Integer> - number of capacity units used for scan
26
+ # * 'Count'<~Integer> - number of items in response
27
+ # * 'Items'<~Array> - array of items returned
28
+ # * 'LastEvaluatedKey'<~Hash> - last key scanned, can be passed to ExclusiveStartKey for pagination
29
+ # * 'ScannedCount'<~Integer> - number of items scanned before applying filters
30
+ def scan(table_name, options = {})
31
+ body = {
32
+ 'TableName' => table_name
33
+ }.merge(options)
34
+
35
+ request(
36
+ :body => MultiJson.encode(body),
37
+ :headers => {'x-amz-target' => 'DynamoDB_20111205.Scan'},
38
+ :idempotent => true
39
+ )
40
+ end
41
+
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,49 @@
1
+ module Fog
2
+ module AWS
3
+ class DynamoDB
4
+ class Real
5
+
6
+ # Update DynamoDB item
7
+ #
8
+ # ==== Parameters
9
+ # * 'table_name'<~String> - name of table for item
10
+ # * 'key'<~Hash>:
11
+ # * 'HashKeyElement'<~Hash>: info for primary key
12
+ # * 'AttributeName'<~String> - name of attribute
13
+ # * 'AttributeType'<~String> - type of attribute
14
+ # * 'RangeKeyElement'<~Hash>: optional, info for range key
15
+ # * 'AttributeName'<~String> - name of attribute
16
+ # * 'AttributeType'<~String> - type of attribute
17
+ # * 'attribute_updates'<~Hash>:
18
+ # * 'AttributeName'<~String> - Attribute to update
19
+ # * 'Value'<~Hash> - formated as {type => value}
20
+ # * 'Action'<~String> - action to take if expects matches, in %w{ADD DELETE PUT}, defaults to PUT
21
+ # * 'options'<~Hash>:
22
+ # * 'Expected'<~Hash>: data to check against
23
+ # * 'AttributeName'<~String> - name of attribute
24
+ # * 'Value'<~Hash> - a value to check for the value of
25
+ # or
26
+ # * 'Exists'<~Boolean> - set as false to only allow update if attribute doesn't exist
27
+ # * 'ReturnValues'<~String> - data to return in %w{ALL_NEW ALL_OLD NONE UPDATED_NEW UPDATED_OLD}, defaults to NONE
28
+ #
29
+ # ==== Returns
30
+ # * response<~Excon::Response>:
31
+ # * body<~Hash>:
32
+ # varies based on ReturnValues param, see: http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/API_UpdateItem.html
33
+ def update_item(table_name, key, attribute_updates, options = {})
34
+ body = {
35
+ 'AttributeUpdates' => attribute_updates,
36
+ 'Key' => key,
37
+ 'TableName' => table_name
38
+ }.merge(options)
39
+
40
+ request(
41
+ :body => MultiJson.encode(body),
42
+ :headers => {'x-amz-target' => 'DynamoDB_20111205.UpdateItem'}
43
+ )
44
+ end
45
+
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,46 @@
1
+ module Fog
2
+ module AWS
3
+ class DynamoDB
4
+ class Real
5
+
6
+ # Update DynamoDB table throughput
7
+ #
8
+ # ==== Parameters
9
+ # * 'table_name'<~String> - name of table to describe
10
+ # * 'provisioned_throughput'<~Hash>:
11
+ # * 'ReadCapacityUnits'<~Integer> - read capacity for table, in 5..10000
12
+ # * 'WriteCapacityUnits'<~Integer> - write capacity for table, in 5..10000
13
+ #
14
+ # ==== Returns
15
+ # * response<~Excon::Response>:
16
+ # * body<~Hash>:
17
+ # * 'Table'<~Hash>
18
+ # * 'KeySchema'<~Hash> - schema for table
19
+ # * 'HashKeyElement'<~Hash>: info for primary key
20
+ # * 'AttributeName'<~String> - name of attribute
21
+ # * 'AttributeType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
22
+ # * 'RangeKeyElement'<~Hash>: optional, info for range key
23
+ # * 'AttributeName'<~String> - name of attribute
24
+ # * 'AttributeType'<~String> - type of attribute, in %w{N NS S SS} for number, number set, string, string set
25
+ # * 'ProvisionedThroughput'<~Hash>:
26
+ # * 'ReadCapacityUnits'<~Integer> - read capacity for table, in 5..10000
27
+ # * 'WriteCapacityUnits'<~Integer> - write capacity for table, in 5..10000
28
+ # * 'TableName'<~String> - name of table
29
+ # * 'TableStatus'<~String> - status of table
30
+ def update_table(table_name, provisioned_throughput)
31
+ body = {
32
+ 'ProvisionedThroughput' => provisioned_throughput,
33
+ 'TableName' => table_name
34
+ }
35
+
36
+ request(
37
+ :body => MultiJson.encode(body),
38
+ :headers => {'x-amz-target' => 'DynamoDB_20111205.UpdateTable'},
39
+ :idempotent => true
40
+ )
41
+ end
42
+
43
+ end
44
+ end
45
+ end
46
+ end