fog-maestrodev 1.8.0.20130114204828 → 1.14.0.20130806165225

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1713) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +2 -0
  3. data/.travis.yml +18 -2
  4. data/Gemfile +6 -1
  5. data/Gemfile.1.8.7 +10 -0
  6. data/README.md +54 -42
  7. data/Rakefile +21 -2
  8. data/benchs/load_times.rb +31 -0
  9. data/bin/fog +22 -0
  10. data/changelog.txt +2198 -0
  11. data/fog.gemspec +7 -7
  12. data/lib/fog.rb +44 -14
  13. data/lib/fog/account.rb +25 -0
  14. data/lib/fog/atmos/models/storage/file.rb +2 -2
  15. data/lib/fog/aws.rb +12 -2
  16. data/lib/fog/aws/auto_scaling.rb +15 -18
  17. data/lib/fog/aws/beanstalk.rb +8 -10
  18. data/lib/fog/aws/cloud_formation.rb +11 -12
  19. data/lib/fog/aws/compute.rb +9 -10
  20. data/lib/fog/aws/credential_fetcher.rb +7 -7
  21. data/lib/fog/aws/data_pipeline.rb +114 -0
  22. data/lib/fog/aws/dynamodb.rb +3 -3
  23. data/lib/fog/aws/elasticache.rb +16 -20
  24. data/lib/fog/aws/elb.rb +32 -31
  25. data/lib/fog/aws/elb/policy_types.rb +441 -430
  26. data/lib/fog/aws/iam.rb +13 -13
  27. data/lib/fog/aws/models/auto_scaling/activities.rb +11 -3
  28. data/lib/fog/aws/models/auto_scaling/group.rb +6 -3
  29. data/lib/fog/aws/models/auto_scaling/policies.rb +7 -3
  30. data/lib/fog/aws/models/beanstalk/environment.rb +6 -2
  31. data/lib/fog/aws/models/cdn/distributions.rb +2 -1
  32. data/lib/fog/aws/models/cdn/distributions_helper.rb +2 -1
  33. data/lib/fog/aws/models/cdn/streaming_distributions.rb +2 -1
  34. data/lib/fog/aws/models/compute/flavors.rb +1 -1
  35. data/lib/fog/aws/models/compute/server.rb +39 -33
  36. data/lib/fog/aws/models/compute/spot_request.rb +3 -11
  37. data/lib/fog/aws/models/compute/volume.rb +2 -1
  38. data/lib/fog/aws/models/data_pipeline/pipeline.rb +67 -0
  39. data/lib/fog/aws/models/data_pipeline/pipelines.rb +36 -0
  40. data/lib/fog/aws/models/dns/record.rb +1 -1
  41. data/lib/fog/aws/models/elb/backend_server_description.rb +11 -0
  42. data/lib/fog/aws/models/elb/backend_server_descriptions.rb +22 -0
  43. data/lib/fog/aws/models/elb/load_balancer.rb +15 -2
  44. data/lib/fog/aws/models/elb/policies.rb +28 -13
  45. data/lib/fog/aws/models/elb/policy.rb +20 -10
  46. data/lib/fog/aws/models/iam/role.rb +36 -0
  47. data/lib/fog/aws/models/iam/roles.rb +40 -0
  48. data/lib/fog/aws/models/iam/user.rb +1 -0
  49. data/lib/fog/aws/models/rds/log_file.rb +26 -0
  50. data/lib/fog/aws/models/rds/log_files.rb +50 -0
  51. data/lib/fog/aws/models/rds/server.rb +4 -1
  52. data/lib/fog/aws/models/rds/snapshot.rb +1 -0
  53. data/lib/fog/aws/models/rds/snapshots.rb +26 -3
  54. data/lib/fog/aws/models/storage/directories.rb +1 -1
  55. data/lib/fog/aws/models/storage/directory.rb +20 -17
  56. data/lib/fog/aws/models/storage/file.rb +6 -7
  57. data/lib/fog/aws/models/storage/files.rb +6 -6
  58. data/lib/fog/aws/parsers/auto_scaling/describe_policies.rb +5 -5
  59. data/lib/fog/aws/parsers/beanstalk/describe_environment_resources.rb +11 -0
  60. data/lib/fog/aws/parsers/cloud_formation/list_stack_resources.rb +32 -0
  61. data/lib/fog/aws/parsers/cloud_formation/list_stacks.rb +34 -0
  62. data/lib/fog/aws/parsers/cloud_watch/list_metrics.rb +1 -1
  63. data/lib/fog/aws/parsers/compute/copy_image.rb +22 -0
  64. data/lib/fog/aws/parsers/compute/describe_instances.rb +19 -5
  65. data/lib/fog/aws/parsers/compute/run_instances.rb +5 -4
  66. data/lib/fog/aws/parsers/compute/spot_instance_requests.rb +2 -0
  67. data/lib/fog/aws/parsers/dns/get_hosted_zone.rb +2 -0
  68. data/lib/fog/aws/parsers/elasticache/describe_reserved_cache_nodes.rb +37 -0
  69. data/lib/fog/aws/parsers/elb/describe_load_balancers.rb +44 -13
  70. data/lib/fog/aws/parsers/iam/get_user.rb +2 -0
  71. data/lib/fog/aws/parsers/iam/list_users.rb +2 -0
  72. data/lib/fog/aws/parsers/rds/db_parser.rb +27 -5
  73. data/lib/fog/aws/parsers/rds/describe_db_log_files.rb +44 -0
  74. data/lib/fog/aws/parsers/rds/download_db_logfile_portion.rb +26 -0
  75. data/lib/fog/aws/parsers/ses/verify_domain_identity.rb +26 -0
  76. data/lib/fog/aws/parsers/storage/complete_multipart_upload.rb +1 -1
  77. data/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb +45 -11
  78. data/lib/fog/aws/parsers/sts/assume_role.rb +30 -0
  79. data/lib/fog/aws/rds.rb +27 -14
  80. data/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb +8 -0
  81. data/lib/fog/aws/requests/auto_scaling/update_auto_scaling_group.rb +8 -1
  82. data/lib/fog/aws/requests/cdn/delete_distribution.rb +5 -7
  83. data/lib/fog/aws/requests/cdn/delete_streaming_distribution.rb +5 -7
  84. data/lib/fog/aws/requests/cdn/get_distribution.rb +28 -31
  85. data/lib/fog/aws/requests/cdn/get_distribution_list.rb +29 -33
  86. data/lib/fog/aws/requests/cdn/get_invalidation.rb +15 -13
  87. data/lib/fog/aws/requests/cdn/get_invalidation_list.rb +15 -17
  88. data/lib/fog/aws/requests/cdn/get_streaming_distribution.rb +23 -26
  89. data/lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb +29 -33
  90. data/lib/fog/aws/requests/cdn/post_distribution.rb +40 -42
  91. data/lib/fog/aws/requests/cdn/post_invalidation.rb +14 -18
  92. data/lib/fog/aws/requests/cdn/post_streaming_distribution.rb +28 -30
  93. data/lib/fog/aws/requests/cdn/put_distribution_config.rb +42 -44
  94. data/lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb +31 -33
  95. data/lib/fog/aws/requests/cloud_formation/create_stack.rb +33 -20
  96. data/lib/fog/aws/requests/cloud_formation/delete_stack.rb +5 -8
  97. data/lib/fog/aws/requests/cloud_formation/describe_stack_events.rb +19 -22
  98. data/lib/fog/aws/requests/cloud_formation/describe_stack_resources.rb +18 -21
  99. data/lib/fog/aws/requests/cloud_formation/describe_stacks.rb +18 -21
  100. data/lib/fog/aws/requests/cloud_formation/get_template.rb +7 -10
  101. data/lib/fog/aws/requests/cloud_formation/list_stack_resources.rb +36 -0
  102. data/lib/fog/aws/requests/cloud_formation/list_stacks.rb +37 -0
  103. data/lib/fog/aws/requests/cloud_formation/update_stack.rb +11 -15
  104. data/lib/fog/aws/requests/cloud_formation/validate_template.rb +9 -12
  105. data/lib/fog/aws/requests/compute/associate_address.rb +13 -7
  106. data/lib/fog/aws/requests/compute/copy_image.rb +63 -0
  107. data/lib/fog/aws/requests/compute/create_volume.rb +3 -3
  108. data/lib/fog/aws/requests/compute/describe_instances.rb +1 -1
  109. data/lib/fog/aws/requests/compute/describe_reserved_instances_offerings.rb +16 -2
  110. data/lib/fog/aws/requests/compute/describe_security_groups.rb +2 -2
  111. data/lib/fog/aws/requests/compute/request_spot_instances.rb +1 -0
  112. data/lib/fog/aws/requests/compute/run_instances.rb +3 -1
  113. data/lib/fog/aws/requests/data_pipeline/activate_pipeline.rb +35 -0
  114. data/lib/fog/aws/requests/data_pipeline/create_pipeline.rb +41 -0
  115. data/lib/fog/aws/requests/data_pipeline/delete_pipeline.rb +35 -0
  116. data/lib/fog/aws/requests/data_pipeline/describe_pipelines.rb +36 -0
  117. data/lib/fog/aws/requests/data_pipeline/list_pipelines.rb +36 -0
  118. data/lib/fog/aws/requests/data_pipeline/put_pipeline_definition.rb +72 -0
  119. data/lib/fog/aws/requests/elasticache/describe_reserved_cache_nodes.rb +42 -0
  120. data/lib/fog/aws/requests/elb/create_app_cookie_stickiness_policy.rb +0 -2
  121. data/lib/fog/aws/requests/elb/create_lb_cookie_stickiness_policy.rb +0 -2
  122. data/lib/fog/aws/requests/elb/create_load_balancer.rb +17 -0
  123. data/lib/fog/aws/requests/elb/create_load_balancer_policy.rb +11 -8
  124. data/lib/fog/aws/requests/elb/describe_load_balancers.rb +21 -1
  125. data/lib/fog/aws/requests/elb/set_load_balancer_policies_for_backend_server.rb +67 -0
  126. data/lib/fog/aws/requests/iam/create_user.rb +5 -4
  127. data/lib/fog/aws/requests/iam/get_user.rb +5 -4
  128. data/lib/fog/aws/requests/iam/list_users.rb +5 -4
  129. data/lib/fog/aws/requests/iam/update_server_certificate.rb +27 -0
  130. data/lib/fog/aws/requests/rds/create_db_instance.rb +28 -26
  131. data/lib/fog/aws/requests/rds/describe_db_instances.rb +8 -9
  132. data/lib/fog/aws/requests/rds/describe_db_log_files.rb +67 -0
  133. data/lib/fog/aws/requests/rds/download_db_logfile_portion.rb +63 -0
  134. data/lib/fog/aws/requests/ses/send_raw_email.rb +1 -1
  135. data/lib/fog/aws/requests/ses/verify_domain_identity.rb +30 -0
  136. data/lib/fog/aws/requests/storage/abort_multipart_upload.rb +3 -3
  137. data/lib/fog/aws/requests/storage/complete_multipart_upload.rb +8 -4
  138. data/lib/fog/aws/requests/storage/copy_object.rb +2 -2
  139. data/lib/fog/aws/requests/storage/delete_bucket.rb +1 -1
  140. data/lib/fog/aws/requests/storage/delete_bucket_cors.rb +1 -1
  141. data/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb +1 -1
  142. data/lib/fog/aws/requests/storage/delete_bucket_policy.rb +1 -1
  143. data/lib/fog/aws/requests/storage/delete_bucket_website.rb +1 -1
  144. data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +1 -1
  145. data/lib/fog/aws/requests/storage/delete_object.rb +1 -1
  146. data/lib/fog/aws/requests/storage/get_bucket.rb +1 -1
  147. data/lib/fog/aws/requests/storage/get_bucket_acl.rb +1 -1
  148. data/lib/fog/aws/requests/storage/get_bucket_cors.rb +1 -1
  149. data/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb +1 -1
  150. data/lib/fog/aws/requests/storage/get_bucket_location.rb +1 -1
  151. data/lib/fog/aws/requests/storage/get_bucket_logging.rb +1 -1
  152. data/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +1 -1
  153. data/lib/fog/aws/requests/storage/get_bucket_policy.rb +1 -1
  154. data/lib/fog/aws/requests/storage/get_bucket_versioning.rb +1 -1
  155. data/lib/fog/aws/requests/storage/get_bucket_website.rb +1 -1
  156. data/lib/fog/aws/requests/storage/get_object.rb +8 -4
  157. data/lib/fog/aws/requests/storage/get_object_acl.rb +2 -2
  158. data/lib/fog/aws/requests/storage/get_object_http_url.rb +1 -19
  159. data/lib/fog/aws/requests/storage/get_object_torrent.rb +2 -2
  160. data/lib/fog/aws/requests/storage/get_object_url.rb +5 -14
  161. data/lib/fog/aws/requests/storage/get_request_payment.rb +1 -1
  162. data/lib/fog/aws/requests/storage/get_service.rb +1 -2
  163. data/lib/fog/aws/requests/storage/head_object.rb +2 -5
  164. data/lib/fog/aws/requests/storage/initiate_multipart_upload.rb +3 -5
  165. data/lib/fog/aws/requests/storage/list_multipart_uploads.rb +27 -33
  166. data/lib/fog/aws/requests/storage/list_parts.rb +27 -31
  167. data/lib/fog/aws/requests/storage/post_object_hidden_fields.rb +15 -17
  168. data/lib/fog/aws/requests/storage/post_object_restore.rb +54 -0
  169. data/lib/fog/aws/requests/storage/put_bucket.rb +9 -12
  170. data/lib/fog/aws/requests/storage/put_bucket_acl.rb +16 -18
  171. data/lib/fog/aws/requests/storage/put_bucket_cors.rb +11 -13
  172. data/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb +45 -16
  173. data/lib/fog/aws/requests/storage/put_bucket_logging.rb +14 -16
  174. data/lib/fog/aws/requests/storage/put_bucket_policy.rb +4 -6
  175. data/lib/fog/aws/requests/storage/put_bucket_versioning.rb +4 -6
  176. data/lib/fog/aws/requests/storage/put_bucket_website.rb +6 -8
  177. data/lib/fog/aws/requests/storage/put_object.rb +21 -24
  178. data/lib/fog/aws/requests/storage/put_object_acl.rb +19 -21
  179. data/lib/fog/aws/requests/storage/put_object_url.rb +11 -16
  180. data/lib/fog/aws/requests/storage/put_request_payment.rb +4 -6
  181. data/lib/fog/aws/requests/storage/upload_part.rb +14 -17
  182. data/lib/fog/aws/requests/sts/assume_role.rb +46 -0
  183. data/lib/fog/aws/ses.rb +26 -9
  184. data/lib/fog/aws/storage.rb +204 -97
  185. data/lib/fog/aws/sts.rb +31 -21
  186. data/lib/fog/billing.rb +23 -0
  187. data/lib/fog/bin.rb +6 -2
  188. data/lib/fog/bin/aws.rb +4 -0
  189. data/lib/fog/bin/bluebox.rb +2 -0
  190. data/lib/fog/bin/cloudsigma.rb +29 -0
  191. data/lib/fog/bin/digitalocean.rb +31 -0
  192. data/lib/fog/bin/dreamhost.rb +31 -0
  193. data/lib/fog/bin/google.rb +47 -1
  194. data/lib/fog/bin/hp.rb +7 -0
  195. data/lib/fog/bin/internet_archive.rb +34 -0
  196. data/lib/fog/bin/openstack.rb +22 -2
  197. data/lib/fog/bin/openvz.rb +31 -0
  198. data/lib/fog/bin/rackspace.rb +11 -0
  199. data/lib/fog/bin/riakcs.rb +27 -0
  200. data/lib/fog/bluebox.rb +1 -0
  201. data/lib/fog/bluebox/blb.rb +85 -0
  202. data/lib/fog/bluebox/models/blb/lb_application.rb +32 -0
  203. data/lib/fog/bluebox/models/blb/lb_applications.rb +26 -0
  204. data/lib/fog/bluebox/models/blb/lb_backend.rb +22 -0
  205. data/lib/fog/bluebox/models/blb/lb_backends.rb +30 -0
  206. data/lib/fog/bluebox/models/blb/lb_service.rb +35 -0
  207. data/lib/fog/bluebox/models/blb/lb_services.rb +29 -0
  208. data/lib/fog/bluebox/models/compute/server.rb +3 -1
  209. data/lib/fog/bluebox/models/dns/zone.rb +1 -1
  210. data/lib/fog/bluebox/requests/blb/add_machine_to_lb_application.rb +33 -0
  211. data/lib/fog/bluebox/requests/blb/add_machine_to_lb_backend.rb +31 -0
  212. data/lib/fog/bluebox/requests/blb/get_lb_application.rb +33 -0
  213. data/lib/fog/bluebox/requests/blb/get_lb_applications.rb +31 -0
  214. data/lib/fog/bluebox/requests/blb/get_lb_backend.rb +36 -0
  215. data/lib/fog/bluebox/requests/blb/get_lb_backends.rb +36 -0
  216. data/lib/fog/bluebox/requests/blb/get_lb_machine.rb +35 -0
  217. data/lib/fog/bluebox/requests/blb/get_lb_machines.rb +35 -0
  218. data/lib/fog/bluebox/requests/blb/get_lb_service.rb +36 -0
  219. data/lib/fog/bluebox/requests/blb/get_lb_services.rb +36 -0
  220. data/lib/fog/bluebox/requests/blb/remove_machine_from_lb_backend.rb +28 -0
  221. data/lib/fog/bluebox/requests/blb/update_lb_backend_machine.rb +29 -0
  222. data/lib/fog/brightbox/compute.rb +36 -236
  223. data/lib/fog/brightbox/compute/image_selector.rb +45 -0
  224. data/lib/fog/brightbox/compute/shared.rb +232 -0
  225. data/lib/fog/brightbox/models/compute/collaboration.rb +43 -0
  226. data/lib/fog/brightbox/models/compute/collaborations.rb +23 -0
  227. data/lib/fog/brightbox/models/compute/user_collaboration.rb +29 -0
  228. data/lib/fog/brightbox/models/compute/user_collaborations.rb +23 -0
  229. data/lib/fog/brightbox/oauth2.rb +5 -3
  230. data/lib/fog/brightbox/requests/compute/accept_user_collaboration.rb +21 -0
  231. data/lib/fog/brightbox/requests/compute/activate_console_server.rb +1 -1
  232. data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +2 -1
  233. data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +2 -1
  234. data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +11 -3
  235. data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +2 -1
  236. data/lib/fog/brightbox/requests/compute/create_api_client.rb +2 -1
  237. data/lib/fog/brightbox/requests/compute/create_application.rb +2 -1
  238. data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +2 -1
  239. data/lib/fog/brightbox/requests/compute/create_collaboration.rb +23 -0
  240. data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +3 -1
  241. data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +2 -1
  242. data/lib/fog/brightbox/requests/compute/create_image.rb +2 -1
  243. data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +2 -1
  244. data/lib/fog/brightbox/requests/compute/create_server.rb +2 -1
  245. data/lib/fog/brightbox/requests/compute/create_server_group.rb +2 -1
  246. data/lib/fog/brightbox/requests/compute/{destroy_api_client.rb → delete_api_client.rb} +10 -3
  247. data/lib/fog/brightbox/requests/compute/{destroy_application.rb → delete_application.rb} +10 -3
  248. data/lib/fog/brightbox/requests/compute/{destroy_cloud_ip.rb → delete_cloud_ip.rb} +10 -3
  249. data/lib/fog/brightbox/requests/compute/delete_collaboration.rb +28 -0
  250. data/lib/fog/brightbox/requests/compute/{destroy_firewall_policy.rb → delete_firewall_policy.rb} +10 -3
  251. data/lib/fog/brightbox/requests/compute/{destroy_firewall_rule.rb → delete_firewall_rule.rb} +10 -3
  252. data/lib/fog/brightbox/requests/compute/{destroy_image.rb → delete_image.rb} +10 -3
  253. data/lib/fog/brightbox/requests/compute/{destroy_load_balancer.rb → delete_load_balancer.rb} +10 -3
  254. data/lib/fog/brightbox/requests/compute/{destroy_server.rb → delete_server.rb} +10 -3
  255. data/lib/fog/brightbox/requests/compute/{destroy_server_group.rb → delete_server_group.rb} +10 -3
  256. data/lib/fog/brightbox/requests/compute/delete_user_collaboration.rb +28 -0
  257. data/lib/fog/brightbox/requests/compute/destroy_user_collaboration.rb +21 -0
  258. data/lib/fog/brightbox/requests/compute/get_account.rb +1 -1
  259. data/lib/fog/brightbox/requests/compute/get_api_client.rb +1 -1
  260. data/lib/fog/brightbox/requests/compute/get_application.rb +1 -1
  261. data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +1 -1
  262. data/lib/fog/brightbox/requests/compute/get_collaboration.rb +21 -0
  263. data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +1 -1
  264. data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +1 -1
  265. data/lib/fog/brightbox/requests/compute/get_image.rb +1 -1
  266. data/lib/fog/brightbox/requests/compute/get_interface.rb +1 -1
  267. data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +1 -1
  268. data/lib/fog/brightbox/requests/compute/get_server.rb +1 -1
  269. data/lib/fog/brightbox/requests/compute/get_server_group.rb +1 -1
  270. data/lib/fog/brightbox/requests/compute/get_server_type.rb +1 -1
  271. data/lib/fog/brightbox/requests/compute/get_user.rb +1 -1
  272. data/lib/fog/brightbox/requests/compute/get_user_collaboration.rb +21 -0
  273. data/lib/fog/brightbox/requests/compute/get_zone.rb +1 -1
  274. data/lib/fog/brightbox/requests/compute/list_accounts.rb +1 -1
  275. data/lib/fog/brightbox/requests/compute/list_api_clients.rb +1 -1
  276. data/lib/fog/brightbox/requests/compute/list_applications.rb +1 -1
  277. data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +1 -1
  278. data/lib/fog/brightbox/requests/compute/list_collaborations.rb +19 -0
  279. data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +1 -1
  280. data/lib/fog/brightbox/requests/compute/list_images.rb +1 -1
  281. data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +1 -1
  282. data/lib/fog/brightbox/requests/compute/list_server_groups.rb +1 -1
  283. data/lib/fog/brightbox/requests/compute/list_server_types.rb +1 -1
  284. data/lib/fog/brightbox/requests/compute/list_servers.rb +1 -1
  285. data/lib/fog/brightbox/requests/compute/list_user_collaborations.rb +19 -0
  286. data/lib/fog/brightbox/requests/compute/list_users.rb +1 -1
  287. data/lib/fog/brightbox/requests/compute/list_zones.rb +1 -1
  288. data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +2 -1
  289. data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +12 -3
  290. data/lib/fog/brightbox/requests/compute/reject_user_collaboration.rb +21 -0
  291. data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +2 -1
  292. data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +2 -1
  293. data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +2 -1
  294. data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +11 -3
  295. data/lib/fog/brightbox/requests/compute/resend_collaboration.rb +21 -0
  296. data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +2 -2
  297. data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +1 -2
  298. data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +1 -1
  299. data/lib/fog/brightbox/requests/compute/shutdown_server.rb +1 -1
  300. data/lib/fog/brightbox/requests/compute/snapshot_server.rb +1 -1
  301. data/lib/fog/brightbox/requests/compute/start_server.rb +1 -1
  302. data/lib/fog/brightbox/requests/compute/stop_server.rb +1 -1
  303. data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +1 -1
  304. data/lib/fog/brightbox/requests/compute/update_account.rb +2 -1
  305. data/lib/fog/brightbox/requests/compute/update_api_client.rb +2 -1
  306. data/lib/fog/brightbox/requests/compute/update_application.rb +2 -1
  307. data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +2 -1
  308. data/lib/fog/brightbox/requests/compute/update_firewall_policy.rb +26 -0
  309. data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +2 -1
  310. data/lib/fog/brightbox/requests/compute/update_image.rb +2 -1
  311. data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +2 -1
  312. data/lib/fog/brightbox/requests/compute/update_scoped_account.rb +2 -1
  313. data/lib/fog/brightbox/requests/compute/update_server.rb +3 -1
  314. data/lib/fog/brightbox/requests/compute/update_server_group.rb +2 -1
  315. data/lib/fog/brightbox/requests/compute/update_user.rb +2 -1
  316. data/lib/fog/cdn.rb +5 -12
  317. data/lib/fog/cloudsigma.rb +9 -0
  318. data/lib/fog/cloudsigma/compute.rb +221 -0
  319. data/lib/fog/cloudsigma/connection.rb +197 -0
  320. data/lib/fog/cloudsigma/docs/getting_started.md +59 -0
  321. data/lib/fog/cloudsigma/error.rb +45 -0
  322. data/lib/fog/cloudsigma/mock_data.rb +46 -0
  323. data/lib/fog/cloudsigma/models/balance.rb +12 -0
  324. data/lib/fog/cloudsigma/models/current_usage.rb +19 -0
  325. data/lib/fog/cloudsigma/models/ip.rb +22 -0
  326. data/lib/fog/cloudsigma/models/ipconf.rb +12 -0
  327. data/lib/fog/cloudsigma/models/ips.rb +27 -0
  328. data/lib/fog/cloudsigma/models/lib_volume.rb +50 -0
  329. data/lib/fog/cloudsigma/models/lib_volumes.rb +27 -0
  330. data/lib/fog/cloudsigma/models/mountpoint.rb +25 -0
  331. data/lib/fog/cloudsigma/models/nic.rb +22 -0
  332. data/lib/fog/cloudsigma/models/obj_ref.rb +12 -0
  333. data/lib/fog/cloudsigma/models/price_calculation.rb +13 -0
  334. data/lib/fog/cloudsigma/models/price_record.rb +38 -0
  335. data/lib/fog/cloudsigma/models/pricing.rb +20 -0
  336. data/lib/fog/cloudsigma/models/profile.rb +50 -0
  337. data/lib/fog/cloudsigma/models/server.rb +208 -0
  338. data/lib/fog/cloudsigma/models/servers.rb +27 -0
  339. data/lib/fog/cloudsigma/models/subscription.rb +53 -0
  340. data/lib/fog/cloudsigma/models/subscriptions.rb +41 -0
  341. data/lib/fog/cloudsigma/models/usage_record.rb +13 -0
  342. data/lib/fog/cloudsigma/models/vlan.rb +29 -0
  343. data/lib/fog/cloudsigma/models/vlans.rb +27 -0
  344. data/lib/fog/cloudsigma/models/volume.rb +71 -0
  345. data/lib/fog/cloudsigma/models/volumes.rb +27 -0
  346. data/lib/fog/cloudsigma/nested_model.rb +60 -0
  347. data/lib/fog/cloudsigma/requests/calculate_subscription_price.rb +18 -0
  348. data/lib/fog/cloudsigma/requests/clone_libvolume.rb +32 -0
  349. data/lib/fog/cloudsigma/requests/clone_server.rb +32 -0
  350. data/lib/fog/cloudsigma/requests/clone_volume.rb +32 -0
  351. data/lib/fog/cloudsigma/requests/close_vnc.rb +30 -0
  352. data/lib/fog/cloudsigma/requests/create_server.rb +33 -0
  353. data/lib/fog/cloudsigma/requests/create_subscription.rb +40 -0
  354. data/lib/fog/cloudsigma/requests/create_volume.rb +30 -0
  355. data/lib/fog/cloudsigma/requests/delete_server.rb +18 -0
  356. data/lib/fog/cloudsigma/requests/delete_volume.rb +18 -0
  357. data/lib/fog/cloudsigma/requests/extend_subscription.rb +22 -0
  358. data/lib/fog/cloudsigma/requests/get_balance.rb +18 -0
  359. data/lib/fog/cloudsigma/requests/get_current_usage.rb +18 -0
  360. data/lib/fog/cloudsigma/requests/get_ip.rb +18 -0
  361. data/lib/fog/cloudsigma/requests/get_lib_volume.rb +18 -0
  362. data/lib/fog/cloudsigma/requests/get_pricing.rb +28 -0
  363. data/lib/fog/cloudsigma/requests/get_profile.rb +18 -0
  364. data/lib/fog/cloudsigma/requests/get_server.rb +18 -0
  365. data/lib/fog/cloudsigma/requests/get_subscription.rb +18 -0
  366. data/lib/fog/cloudsigma/requests/get_vlan.rb +18 -0
  367. data/lib/fog/cloudsigma/requests/get_volume.rb +18 -0
  368. data/lib/fog/cloudsigma/requests/list_ips.rb +18 -0
  369. data/lib/fog/cloudsigma/requests/list_lib_volumes.rb +18 -0
  370. data/lib/fog/cloudsigma/requests/list_servers.rb +18 -0
  371. data/lib/fog/cloudsigma/requests/list_subscriptions.rb +18 -0
  372. data/lib/fog/cloudsigma/requests/list_vlans.rb +18 -0
  373. data/lib/fog/cloudsigma/requests/list_volumes.rb +18 -0
  374. data/lib/fog/cloudsigma/requests/open_vnc.rb +34 -0
  375. data/lib/fog/cloudsigma/requests/start_server.rb +32 -0
  376. data/lib/fog/cloudsigma/requests/stop_server.rb +33 -0
  377. data/lib/fog/cloudsigma/requests/update_profile.rb +18 -0
  378. data/lib/fog/cloudsigma/requests/update_server.rb +40 -0
  379. data/lib/fog/cloudsigma/requests/update_vlan.rb +20 -0
  380. data/lib/fog/cloudsigma/requests/update_volume.rb +18 -0
  381. data/lib/fog/cloudstack/compute.rb +72 -1
  382. data/lib/fog/cloudstack/models/compute/disk_offering.rb +46 -0
  383. data/lib/fog/cloudstack/models/compute/disk_offerings.rb +27 -0
  384. data/lib/fog/cloudstack/models/compute/image.rb +1 -1
  385. data/lib/fog/cloudstack/models/compute/servers.rb +6 -4
  386. data/lib/fog/cloudstack/models/compute/snapshot.rb +46 -0
  387. data/lib/fog/cloudstack/models/compute/snapshots.rb +25 -0
  388. data/lib/fog/cloudstack/requests/compute/create_disk_offering.rb +51 -0
  389. data/lib/fog/cloudstack/requests/compute/create_snapshot.rb +24 -0
  390. data/lib/fog/cloudstack/requests/compute/delete_disk_offering.rb +31 -0
  391. data/lib/fog/cloudstack/requests/compute/delete_snapshot.rb +44 -2
  392. data/lib/fog/cloudstack/requests/compute/list_disk_offerings.rb +9 -0
  393. data/lib/fog/cloudstack/requests/compute/list_os_types.rb +9 -0
  394. data/lib/fog/cloudstack/requests/compute/list_snapshots.rb +21 -0
  395. data/lib/fog/compute.rb +7 -65
  396. data/lib/fog/compute/models/server.rb +21 -16
  397. data/lib/fog/core.rb +18 -7
  398. data/lib/fog/core/attributes.rb +1 -1
  399. data/lib/fog/core/connection.rb +62 -25
  400. data/lib/fog/core/deprecated/connection.rb +24 -0
  401. data/lib/fog/core/errors.rb +10 -1
  402. data/lib/fog/core/logger.rb +2 -0
  403. data/lib/fog/core/mock.rb +16 -0
  404. data/lib/fog/core/model.rb +12 -11
  405. data/lib/fog/core/parser.rb +14 -1
  406. data/lib/fog/core/scp.rb +4 -3
  407. data/lib/fog/core/service.rb +1 -1
  408. data/lib/fog/core/ssh.rb +1 -0
  409. data/lib/fog/digitalocean.rb +9 -0
  410. data/lib/fog/digitalocean/CHANGELOG.md +6 -0
  411. data/lib/fog/digitalocean/compute.rb +136 -0
  412. data/lib/fog/digitalocean/examples/getting_started.md +106 -0
  413. data/lib/fog/digitalocean/models/compute/flavor.rb +14 -0
  414. data/lib/fog/digitalocean/models/compute/flavors.rb +25 -0
  415. data/lib/fog/digitalocean/models/compute/image.rb +15 -0
  416. data/lib/fog/digitalocean/models/compute/images.rb +25 -0
  417. data/lib/fog/digitalocean/models/compute/region.rb +14 -0
  418. data/lib/fog/digitalocean/models/compute/regions.rb +25 -0
  419. data/lib/fog/digitalocean/models/compute/server.rb +179 -0
  420. data/lib/fog/digitalocean/models/compute/servers.rb +50 -0
  421. data/lib/fog/digitalocean/models/compute/ssh_key.rb +28 -0
  422. data/lib/fog/digitalocean/models/compute/ssh_keys.rb +26 -0
  423. data/lib/fog/digitalocean/requests/compute/create_server.rb +70 -0
  424. data/lib/fog/digitalocean/requests/compute/create_ssh_key.rb +38 -0
  425. data/lib/fog/digitalocean/requests/compute/destroy_server.rb +37 -0
  426. data/lib/fog/digitalocean/requests/compute/destroy_ssh_key.rb +37 -0
  427. data/lib/fog/digitalocean/requests/compute/get_server_details.rb +35 -0
  428. data/lib/fog/digitalocean/requests/compute/get_ssh_key.rb +39 -0
  429. data/lib/fog/digitalocean/requests/compute/list_flavors.rb +38 -0
  430. data/lib/fog/digitalocean/requests/compute/list_images.rb +49 -0
  431. data/lib/fog/digitalocean/requests/compute/list_regions.rb +34 -0
  432. data/lib/fog/digitalocean/requests/compute/list_servers.rb +31 -0
  433. data/lib/fog/digitalocean/requests/compute/list_ssh_keys.rb +31 -0
  434. data/lib/fog/digitalocean/requests/compute/power_cycle_server.rb +33 -0
  435. data/lib/fog/digitalocean/requests/compute/power_off_server.rb +33 -0
  436. data/lib/fog/digitalocean/requests/compute/power_on_server.rb +33 -0
  437. data/lib/fog/digitalocean/requests/compute/reboot_server.rb +33 -0
  438. data/lib/fog/digitalocean/requests/compute/shutdown_server.rb +36 -0
  439. data/lib/fog/dns.rb +8 -24
  440. data/lib/fog/dnsimple/dns.rb +4 -1
  441. data/lib/fog/dnsimple/models/dns/record.rb +3 -4
  442. data/lib/fog/dnsimple/requests/dns/create_domain.rb +36 -0
  443. data/lib/fog/dnsimple/requests/dns/create_record.rb +27 -0
  444. data/lib/fog/dnsimple/requests/dns/delete_domain.rb +12 -0
  445. data/lib/fog/dnsimple/requests/dns/delete_record.rb +12 -0
  446. data/lib/fog/dnsimple/requests/dns/get_domain.rb +12 -0
  447. data/lib/fog/dnsimple/requests/dns/get_record.rb +24 -0
  448. data/lib/fog/dnsimple/requests/dns/list_domains.rb +12 -0
  449. data/lib/fog/dnsimple/requests/dns/list_records.rb +12 -0
  450. data/lib/fog/dnsimple/requests/dns/update_record.rb +20 -0
  451. data/lib/fog/dnsmadeeasy/models/dns/record.rb +1 -1
  452. data/lib/fog/dreamhost.rb +11 -0
  453. data/lib/fog/dreamhost/CHANGELOG.md +8 -0
  454. data/lib/fog/dreamhost/dns.rb +86 -0
  455. data/lib/fog/dreamhost/examples/dns/getting_started.md +105 -0
  456. data/lib/fog/dreamhost/models/dns/record.rb +35 -0
  457. data/lib/fog/dreamhost/models/dns/records.rb +38 -0
  458. data/lib/fog/dreamhost/models/dns/zone.rb +59 -0
  459. data/lib/fog/dreamhost/models/dns/zones.rb +41 -0
  460. data/lib/fog/dreamhost/requests/dns/create_record.rb +32 -0
  461. data/lib/fog/dreamhost/requests/dns/delete_record.rb +31 -0
  462. data/lib/fog/dreamhost/requests/dns/list_records.rb +25 -0
  463. data/lib/fog/dynect/models/dns/zone.rb +1 -1
  464. data/lib/fog/ecloud/models/compute/detached_disks.rb +3 -7
  465. data/lib/fog/ecloud/models/compute/internet_services.rb +1 -5
  466. data/lib/fog/ecloud/models/compute/ip_address.rb +2 -2
  467. data/lib/fog/ecloud/models/compute/network.rb +1 -1
  468. data/lib/fog/ecloud/models/compute/nodes.rb +1 -5
  469. data/lib/fog/ecloud/models/compute/public_ips.rb +1 -5
  470. data/lib/fog/ecloud/models/compute/servers.rb +2 -6
  471. data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ip.rb +2 -2
  472. data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ips.rb +2 -2
  473. data/lib/fog/ecloud/requests/compute/get_detached_disk.rb +1 -1
  474. data/lib/fog/ecloud/requests/compute/get_internet_service.rb +1 -1
  475. data/lib/fog/ecloud/requests/compute/get_node.rb +1 -1
  476. data/lib/fog/ecloud/requests/compute/get_public_ip.rb +1 -1
  477. data/lib/fog/ecloud/requests/compute/get_server.rb +1 -1
  478. data/lib/fog/ecloud/requests/compute/virtual_machine_create_from_template.rb +1 -1
  479. data/lib/fog/glesys/compute.rb +5 -1
  480. data/lib/fog/glesys/models/compute/ip.rb +47 -46
  481. data/lib/fog/glesys/models/compute/ips.rb +95 -12
  482. data/lib/fog/glesys/models/compute/server.rb +72 -5
  483. data/lib/fog/glesys/models/compute/servers.rb +7 -1
  484. data/lib/fog/glesys/models/compute/template.rb +8 -16
  485. data/lib/fog/glesys/models/compute/templates.rb +23 -5
  486. data/lib/fog/glesys/requests/compute/ip_details.rb +2 -2
  487. data/lib/fog/glesys/requests/compute/server_details.rb +2 -2
  488. data/lib/fog/glesys/requests/compute/template_list.rb +2 -2
  489. data/lib/fog/google.rb +1 -0
  490. data/lib/fog/google/README.md +28 -0
  491. data/lib/fog/google/Rakefile +17 -0
  492. data/lib/fog/google/compute.rb +162 -0
  493. data/lib/fog/google/examples/bootstrap.rb +9 -0
  494. data/lib/fog/google/examples/create.rb +37 -0
  495. data/lib/fog/google/examples/eric-fail.rb +19 -0
  496. data/lib/fog/google/examples/launch_micro_instance.rb +21 -0
  497. data/lib/fog/google/examples/metadata.rb +18 -0
  498. data/lib/fog/google/models/compute/disk.rb +80 -0
  499. data/lib/fog/google/models/compute/disks.rb +38 -0
  500. data/lib/fog/google/models/compute/flavor.rb +24 -0
  501. data/lib/fog/google/models/compute/flavors.rb +29 -0
  502. data/lib/fog/google/models/compute/image.rb +55 -0
  503. data/lib/fog/google/models/compute/images.rb +35 -0
  504. data/lib/fog/google/models/compute/server.rb +93 -0
  505. data/lib/fog/google/models/compute/servers.rb +71 -0
  506. data/lib/fog/google/models/storage/file.rb +7 -1
  507. data/lib/fog/google/parsers/storage/access_control_list.rb +2 -2
  508. data/lib/fog/google/requests/compute/delete_disk.rb +31 -0
  509. data/lib/fog/google/requests/compute/delete_firewall.rb +30 -0
  510. data/lib/fog/google/requests/compute/delete_image.rb +30 -0
  511. data/lib/fog/google/requests/compute/delete_network.rb +30 -0
  512. data/lib/fog/google/requests/compute/delete_operation.rb +30 -0
  513. data/lib/fog/google/requests/compute/delete_server.rb +43 -0
  514. data/lib/fog/google/requests/compute/get_disk.rb +34 -0
  515. data/lib/fog/google/requests/compute/get_firewall.rb +30 -0
  516. data/lib/fog/google/requests/compute/get_image.rb +30 -0
  517. data/lib/fog/google/requests/compute/get_machine_type.rb +30 -0
  518. data/lib/fog/google/requests/compute/get_network.rb +30 -0
  519. data/lib/fog/google/requests/compute/get_server.rb +37 -0
  520. data/lib/fog/google/requests/compute/get_zone.rb +30 -0
  521. data/lib/fog/google/requests/compute/insert_disk.rb +41 -0
  522. data/lib/fog/google/requests/compute/insert_firewall.rb +37 -0
  523. data/lib/fog/google/requests/compute/insert_image.rb +38 -0
  524. data/lib/fog/google/requests/compute/insert_network.rb +34 -0
  525. data/lib/fog/google/requests/compute/insert_server.rb +78 -0
  526. data/lib/fog/google/requests/compute/list_disks.rb +30 -0
  527. data/lib/fog/google/requests/compute/list_firewalls.rb +29 -0
  528. data/lib/fog/google/requests/compute/list_global_operations.rb +28 -0
  529. data/lib/fog/google/requests/compute/list_images.rb +30 -0
  530. data/lib/fog/google/requests/compute/list_machine_types.rb +30 -0
  531. data/lib/fog/google/requests/compute/list_networks.rb +29 -0
  532. data/lib/fog/google/requests/compute/list_servers.rb +30 -0
  533. data/lib/fog/google/requests/compute/list_zone_operations.rb +28 -0
  534. data/lib/fog/google/requests/compute/list_zones.rb +29 -0
  535. data/lib/fog/google/requests/compute/set_metadata.rb +36 -0
  536. data/lib/fog/google/requests/storage/get_object.rb +1 -1
  537. data/lib/fog/google/storage.rb +1 -1
  538. data/lib/fog/hp.rb +56 -26
  539. data/lib/fog/hp/CHANGELOG.hp +123 -0
  540. data/lib/fog/hp/README_HP.rdoc +7 -6
  541. data/lib/fog/hp/block_storage.rb +170 -0
  542. data/lib/fog/hp/cdn.rb +30 -7
  543. data/lib/fog/hp/compute.rb +89 -17
  544. data/lib/fog/hp/models/block_storage/bootable_volumes.rb +28 -0
  545. data/lib/fog/hp/models/block_storage/snapshot.rb +56 -0
  546. data/lib/fog/hp/models/block_storage/snapshots.rb +29 -0
  547. data/lib/fog/hp/models/block_storage/volume.rb +102 -0
  548. data/lib/fog/hp/models/block_storage/volumes.rb +28 -0
  549. data/lib/fog/hp/models/compute/address.rb +0 -1
  550. data/lib/fog/hp/models/compute/image.rb +43 -4
  551. data/lib/fog/hp/models/compute/images.rb +0 -5
  552. data/lib/fog/hp/models/compute/key_pair.rb +0 -5
  553. data/lib/fog/hp/models/compute/meta.rb +29 -0
  554. data/lib/fog/hp/models/compute/metadata.rb +79 -0
  555. data/lib/fog/hp/models/compute/server.rb +96 -26
  556. data/lib/fog/hp/models/meta_parent.rb +33 -0
  557. data/lib/fog/hp/models/storage/directories.rb +35 -10
  558. data/lib/fog/hp/models/storage/directory.rb +139 -29
  559. data/lib/fog/hp/models/storage/file.rb +10 -0
  560. data/lib/fog/hp/models/storage/files.rb +9 -1
  561. data/lib/fog/hp/models/storage/shared_directories.rb +55 -0
  562. data/lib/fog/hp/models/storage/shared_directory.rb +39 -0
  563. data/lib/fog/hp/models/storage/shared_file.rb +67 -0
  564. data/lib/fog/hp/models/storage/shared_files.rb +64 -0
  565. data/lib/fog/hp/requests/block_storage/create_snapshot.rb +76 -0
  566. data/lib/fog/hp/requests/block_storage/create_volume.rb +87 -0
  567. data/lib/fog/hp/requests/block_storage/delete_snapshot.rb +38 -0
  568. data/lib/fog/hp/requests/block_storage/delete_volume.rb +38 -0
  569. data/lib/fog/hp/requests/block_storage/get_bootable_volume_details.rb +59 -0
  570. data/lib/fog/hp/requests/block_storage/get_snapshot_details.rb +54 -0
  571. data/lib/fog/hp/requests/block_storage/get_volume_details.rb +58 -0
  572. data/lib/fog/hp/requests/block_storage/list_bootable_volumes.rb +53 -0
  573. data/lib/fog/hp/requests/block_storage/list_snapshots.rb +48 -0
  574. data/lib/fog/hp/requests/block_storage/list_volumes.rb +52 -0
  575. data/lib/fog/hp/requests/compute/attach_volume.rb +78 -0
  576. data/lib/fog/hp/requests/compute/create_image.rb +5 -8
  577. data/lib/fog/hp/requests/compute/create_persistent_server.rb +168 -0
  578. data/lib/fog/hp/requests/compute/create_server.rb +38 -32
  579. data/lib/fog/hp/requests/compute/delete_meta.rb +55 -0
  580. data/lib/fog/hp/requests/compute/delete_security_group_rule.rb +4 -4
  581. data/lib/fog/hp/requests/compute/detach_volume.rb +47 -0
  582. data/lib/fog/hp/requests/compute/get_console_output.rb +43 -0
  583. data/lib/fog/hp/requests/compute/get_meta.rb +57 -0
  584. data/lib/fog/hp/requests/compute/get_windows_password.rb +43 -0
  585. data/lib/fog/hp/requests/compute/list_metadata.rb +56 -0
  586. data/lib/fog/hp/requests/compute/list_server_volumes.rb +49 -0
  587. data/lib/fog/hp/requests/compute/set_metadata.rb +60 -0
  588. data/lib/fog/hp/requests/compute/update_meta.rb +61 -0
  589. data/lib/fog/hp/requests/compute/update_metadata.rb +60 -0
  590. data/lib/fog/hp/requests/storage/delete_shared_object.rb +38 -0
  591. data/lib/fog/hp/requests/storage/get_object.rb +13 -11
  592. data/lib/fog/hp/requests/storage/get_object_temp_url.rb +31 -0
  593. data/lib/fog/hp/requests/storage/get_shared_container.rb +75 -0
  594. data/lib/fog/hp/requests/storage/get_shared_object.rb +66 -0
  595. data/lib/fog/hp/requests/storage/head_container.rb +1 -0
  596. data/lib/fog/hp/requests/storage/head_object.rb +1 -0
  597. data/lib/fog/hp/requests/storage/head_shared_container.rb +45 -0
  598. data/lib/fog/hp/requests/storage/head_shared_object.rb +39 -0
  599. data/lib/fog/hp/requests/storage/put_container.rb +6 -6
  600. data/lib/fog/hp/requests/storage/put_object.rb +12 -1
  601. data/lib/fog/hp/requests/storage/put_shared_object.rb +85 -0
  602. data/lib/fog/hp/storage.rb +195 -34
  603. data/lib/fog/ibm/requests/compute/create_instance.rb +20 -15
  604. data/lib/fog/identity.rb +8 -4
  605. data/lib/fog/image.rb +5 -6
  606. data/lib/fog/internet_archive.rb +292 -0
  607. data/lib/fog/internet_archive/models/storage/directories.rb +43 -0
  608. data/lib/fog/internet_archive/models/storage/directory.rb +109 -0
  609. data/lib/fog/internet_archive/models/storage/file.rb +267 -0
  610. data/lib/fog/internet_archive/models/storage/files.rb +122 -0
  611. data/lib/fog/internet_archive/models/storage/ia_attributes.rb +39 -0
  612. data/lib/fog/internet_archive/parsers/storage/access_control_list.rb +46 -0
  613. data/lib/fog/internet_archive/parsers/storage/complete_multipart_upload.rb +24 -0
  614. data/lib/fog/internet_archive/parsers/storage/copy_object.rb +22 -0
  615. data/lib/fog/internet_archive/parsers/storage/cors_configuration.rb +41 -0
  616. data/lib/fog/internet_archive/parsers/storage/delete_multiple_objects.rb +50 -0
  617. data/lib/fog/internet_archive/parsers/storage/get_bucket.rb +62 -0
  618. data/lib/fog/internet_archive/parsers/storage/get_bucket_lifecycle.rb +66 -0
  619. data/lib/fog/internet_archive/parsers/storage/get_bucket_location.rb +20 -0
  620. data/lib/fog/internet_archive/parsers/storage/get_bucket_logging.rb +40 -0
  621. data/lib/fog/internet_archive/parsers/storage/get_bucket_website.rb +26 -0
  622. data/lib/fog/internet_archive/parsers/storage/get_request_payment.rb +20 -0
  623. data/lib/fog/internet_archive/parsers/storage/get_service.rb +32 -0
  624. data/lib/fog/internet_archive/parsers/storage/initiate_multipart_upload.rb +24 -0
  625. data/lib/fog/internet_archive/parsers/storage/list_multipart_uploads.rb +56 -0
  626. data/lib/fog/internet_archive/parsers/storage/list_parts.rb +40 -0
  627. data/lib/fog/internet_archive/requests/storage/abort_multipart_upload.rb +28 -0
  628. data/lib/fog/internet_archive/requests/storage/acl_utils.rb +62 -0
  629. data/lib/fog/internet_archive/requests/storage/complete_multipart_upload.rb +48 -0
  630. data/lib/fog/internet_archive/requests/storage/copy_object.rb +81 -0
  631. data/lib/fog/internet_archive/requests/storage/cors_utils.rb +41 -0
  632. data/lib/fog/internet_archive/requests/storage/delete_bucket.rb +47 -0
  633. data/lib/fog/internet_archive/requests/storage/delete_bucket_cors.rb +29 -0
  634. data/lib/fog/internet_archive/requests/storage/delete_bucket_lifecycle.rb +27 -0
  635. data/lib/fog/internet_archive/requests/storage/delete_bucket_policy.rb +29 -0
  636. data/lib/fog/internet_archive/requests/storage/delete_bucket_website.rb +29 -0
  637. data/lib/fog/internet_archive/requests/storage/delete_multiple_objects.rb +93 -0
  638. data/lib/fog/internet_archive/requests/storage/delete_object.rb +50 -0
  639. data/lib/fog/internet_archive/requests/storage/get_bucket.rb +112 -0
  640. data/lib/fog/internet_archive/requests/storage/get_bucket_acl.rb +69 -0
  641. data/lib/fog/internet_archive/requests/storage/get_bucket_cors.rb +65 -0
  642. data/lib/fog/internet_archive/requests/storage/get_bucket_lifecycle.rb +38 -0
  643. data/lib/fog/internet_archive/requests/storage/get_bucket_location.rb +58 -0
  644. data/lib/fog/internet_archive/requests/storage/get_bucket_logging.rb +47 -0
  645. data/lib/fog/internet_archive/requests/storage/get_bucket_policy.rb +34 -0
  646. data/lib/fog/internet_archive/requests/storage/get_bucket_website.rb +40 -0
  647. data/lib/fog/internet_archive/requests/storage/get_object.rb +167 -0
  648. data/lib/fog/internet_archive/requests/storage/get_object_acl.rb +76 -0
  649. data/lib/fog/internet_archive/requests/storage/get_object_http_url.rb +55 -0
  650. data/lib/fog/internet_archive/requests/storage/get_object_https_url.rb +37 -0
  651. data/lib/fog/internet_archive/requests/storage/get_object_torrent.rb +47 -0
  652. data/lib/fog/internet_archive/requests/storage/get_object_url.rb +55 -0
  653. data/lib/fog/internet_archive/requests/storage/get_request_payment.rb +49 -0
  654. data/lib/fog/internet_archive/requests/storage/get_service.rb +54 -0
  655. data/lib/fog/internet_archive/requests/storage/head_object.rb +61 -0
  656. data/lib/fog/internet_archive/requests/storage/initiate_multipart_upload.rb +44 -0
  657. data/lib/fog/internet_archive/requests/storage/list_multipart_uploads.rb +54 -0
  658. data/lib/fog/internet_archive/requests/storage/list_parts.rb +55 -0
  659. data/lib/fog/internet_archive/requests/storage/post_object_hidden_fields.rb +38 -0
  660. data/lib/fog/internet_archive/requests/storage/put_bucket.rb +74 -0
  661. data/lib/fog/internet_archive/requests/storage/put_bucket_acl.rb +71 -0
  662. data/lib/fog/internet_archive/requests/storage/put_bucket_cors.rb +49 -0
  663. data/lib/fog/internet_archive/requests/storage/put_bucket_lifecycle.rb +77 -0
  664. data/lib/fog/internet_archive/requests/storage/put_bucket_logging.rb +81 -0
  665. data/lib/fog/internet_archive/requests/storage/put_bucket_policy.rb +28 -0
  666. data/lib/fog/internet_archive/requests/storage/put_bucket_website.rb +64 -0
  667. data/lib/fog/internet_archive/requests/storage/put_object.rb +98 -0
  668. data/lib/fog/internet_archive/requests/storage/put_object_acl.rb +75 -0
  669. data/lib/fog/internet_archive/requests/storage/put_object_url.rb +48 -0
  670. data/lib/fog/internet_archive/requests/storage/put_request_payment.rb +49 -0
  671. data/lib/fog/internet_archive/requests/storage/sync_clock.rb +28 -0
  672. data/lib/fog/internet_archive/requests/storage/upload_part.rb +41 -0
  673. data/lib/fog/internet_archive/signaturev4.rb +73 -0
  674. data/lib/fog/internet_archive/storage.rb +390 -0
  675. data/lib/fog/joyent.rb +2 -0
  676. data/lib/fog/joyent/compute.rb +59 -42
  677. data/lib/fog/joyent/errors.rb +2 -2
  678. data/lib/fog/joyent/models/compute/network.rb +13 -0
  679. data/lib/fog/joyent/models/compute/networks.rb +15 -0
  680. data/lib/fog/joyent/models/compute/server.rb +3 -2
  681. data/lib/fog/joyent/models/compute/servers.rb +3 -1
  682. data/lib/fog/joyent/requests/compute/delete_machine.rb +1 -1
  683. data/lib/fog/joyent/requests/compute/get_machine.rb +1 -1
  684. data/lib/fog/joyent/requests/compute/list_machines.rb +2 -1
  685. data/lib/fog/joyent/requests/compute/list_networks.rb +26 -0
  686. data/lib/fog/joyent/requests/compute/resize_machine.rb +4 -1
  687. data/lib/fog/{core/json.rb → json.rb} +13 -3
  688. data/lib/fog/libvirt/models/compute/nic.rb +1 -0
  689. data/lib/fog/libvirt/models/compute/volume.rb +1 -1
  690. data/lib/fog/libvirt/requests/compute/get_node_info.rb +1 -1
  691. data/lib/fog/linode/models/dns/record.rb +0 -1
  692. data/lib/fog/linode/models/dns/zone.rb +0 -1
  693. data/lib/fog/local/models/storage/files.rb +13 -13
  694. data/lib/fog/metering.rb +25 -0
  695. data/lib/fog/monitoring.rb +24 -0
  696. data/lib/fog/network.rb +8 -6
  697. data/lib/fog/openstack.rb +40 -1
  698. data/lib/fog/openstack/CHANGELOG.md +47 -0
  699. data/lib/fog/openstack/compute.rb +20 -7
  700. data/lib/fog/openstack/examples/identity/basics.rb +69 -0
  701. data/lib/fog/openstack/examples/image/upload-test-image.rb +77 -0
  702. data/lib/fog/openstack/examples/network/network_subnets_routers.rb +63 -0
  703. data/lib/fog/openstack/examples/storage/set-account-quota.rb +66 -0
  704. data/lib/fog/openstack/identity.rb +5 -5
  705. data/lib/fog/openstack/image.rb +8 -2
  706. data/lib/fog/openstack/metering.rb +215 -0
  707. data/lib/fog/openstack/models/compute/flavors.rb +2 -2
  708. data/lib/fog/openstack/models/compute/images.rb +2 -1
  709. data/lib/fog/openstack/models/compute/metadata.rb +5 -6
  710. data/lib/fog/openstack/models/compute/server.rb +69 -25
  711. data/lib/fog/openstack/models/identity/role.rb +1 -1
  712. data/lib/fog/openstack/models/image/images.rb +2 -1
  713. data/lib/fog/openstack/models/metering/meter.rb +0 -0
  714. data/lib/fog/openstack/models/metering/meters.rb +0 -0
  715. data/lib/fog/openstack/models/metering/resource.rb +24 -0
  716. data/lib/fog/openstack/models/metering/resources.rb +25 -0
  717. data/lib/fog/openstack/models/network/floating_ip.rb +52 -0
  718. data/lib/fog/openstack/models/network/floating_ips.rb +34 -0
  719. data/lib/fog/openstack/models/network/lb_health_monitor.rb +68 -0
  720. data/lib/fog/openstack/models/network/lb_health_monitors.rb +34 -0
  721. data/lib/fog/openstack/models/network/lb_member.rb +53 -0
  722. data/lib/fog/openstack/models/network/lb_members.rb +34 -0
  723. data/lib/fog/openstack/models/network/lb_pool.rb +78 -0
  724. data/lib/fog/openstack/models/network/lb_pools.rb +34 -0
  725. data/lib/fog/openstack/models/network/lb_vip.rb +59 -0
  726. data/lib/fog/openstack/models/network/lb_vips.rb +34 -0
  727. data/lib/fog/openstack/models/network/network.rb +8 -0
  728. data/lib/fog/openstack/models/network/router.rb +56 -0
  729. data/lib/fog/openstack/models/network/routers.rb +34 -0
  730. data/lib/fog/openstack/models/storage/directories.rb +39 -0
  731. data/lib/fog/openstack/models/storage/directory.rb +50 -0
  732. data/lib/fog/openstack/models/storage/file.rb +150 -0
  733. data/lib/fog/openstack/models/storage/files.rb +94 -0
  734. data/lib/fog/openstack/models/volume/volume.rb +3 -1
  735. data/lib/fog/openstack/models/volume/volumes.rb +2 -1
  736. data/lib/fog/openstack/network.rb +103 -29
  737. data/lib/fog/openstack/requests/compute/add_flavor_access.rb +31 -0
  738. data/lib/fog/openstack/requests/compute/allocate_address.rb +1 -1
  739. data/lib/fog/openstack/requests/compute/attach_volume.rb +10 -5
  740. data/lib/fog/openstack/requests/compute/create_flavor.rb +1 -1
  741. data/lib/fog/openstack/requests/compute/create_server.rb +34 -7
  742. data/lib/fog/openstack/requests/compute/create_volume.rb +14 -13
  743. data/lib/fog/openstack/requests/compute/delete_meta.rb +43 -0
  744. data/lib/fog/openstack/requests/compute/delete_volume.rb +9 -2
  745. data/lib/fog/openstack/requests/compute/detach_volume.rb +8 -2
  746. data/lib/fog/openstack/requests/compute/get_limits.rb +1 -1
  747. data/lib/fog/openstack/requests/compute/get_server_volumes.rb +10 -0
  748. data/lib/fog/openstack/requests/compute/get_snapshot_details.rb +1 -1
  749. data/lib/fog/openstack/requests/compute/get_volume_details.rb +8 -17
  750. data/lib/fog/openstack/requests/compute/list_address_pools.rb +10 -0
  751. data/lib/fog/openstack/requests/compute/list_flavors_detail.rb +4 -3
  752. data/lib/fog/openstack/requests/compute/list_security_groups.rb +1 -1
  753. data/lib/fog/openstack/requests/compute/list_servers.rb +1 -1
  754. data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -0
  755. data/lib/fog/openstack/requests/compute/list_tenants_with_flavor_access.rb +26 -0
  756. data/lib/fog/openstack/requests/compute/list_volumes.rb +4 -26
  757. data/lib/fog/openstack/requests/compute/rebuild_server.rb +9 -1
  758. data/lib/fog/openstack/requests/compute/remove_fixed_ip.rb +1 -1
  759. data/lib/fog/openstack/requests/compute/remove_flavor_access.rb +31 -0
  760. data/lib/fog/openstack/requests/compute/revert_resize_server.rb +2 -2
  761. data/lib/fog/openstack/requests/compute/update_meta.rb +46 -0
  762. data/lib/fog/openstack/requests/compute/update_server.rb +1 -1
  763. data/lib/fog/openstack/requests/identity/create_tenant.rb +2 -2
  764. data/lib/fog/openstack/requests/identity/delete_user_role.rb +2 -2
  765. data/lib/fog/openstack/requests/identity/get_user_by_name.rb +2 -2
  766. data/lib/fog/openstack/requests/image/create_image.rb +1 -1
  767. data/lib/fog/openstack/requests/metering/get_resource.rb +32 -0
  768. data/lib/fog/openstack/requests/metering/get_samples.rb +55 -0
  769. data/lib/fog/openstack/requests/metering/get_statistics.rb +56 -0
  770. data/lib/fog/openstack/requests/metering/list_meters.rb +50 -0
  771. data/lib/fog/openstack/requests/metering/list_resources.rb +32 -0
  772. data/lib/fog/openstack/requests/network/add_router_interface.rb +48 -0
  773. data/lib/fog/openstack/requests/network/associate_floating_ip.rb +49 -0
  774. data/lib/fog/openstack/requests/network/associate_lb_health_monitor.rb +39 -0
  775. data/lib/fog/openstack/requests/network/create_floating_ip.rb +50 -0
  776. data/lib/fog/openstack/requests/network/create_lb_health_monitor.rb +56 -0
  777. data/lib/fog/openstack/requests/network/create_lb_member.rb +53 -0
  778. data/lib/fog/openstack/requests/network/create_lb_pool.rb +60 -0
  779. data/lib/fog/openstack/requests/network/create_lb_vip.rb +60 -0
  780. data/lib/fog/openstack/requests/network/create_network.rb +57 -2
  781. data/lib/fog/openstack/requests/network/create_router.rb +57 -0
  782. data/lib/fog/openstack/requests/network/delete_floating_ip.rb +30 -0
  783. data/lib/fog/openstack/requests/network/delete_lb_health_monitor.rb +30 -0
  784. data/lib/fog/openstack/requests/network/delete_lb_member.rb +30 -0
  785. data/lib/fog/openstack/requests/network/delete_lb_pool.rb +30 -0
  786. data/lib/fog/openstack/requests/network/delete_lb_vip.rb +30 -0
  787. data/lib/fog/openstack/requests/network/delete_quota.rb +26 -0
  788. data/lib/fog/openstack/requests/network/delete_router.rb +30 -0
  789. data/lib/fog/openstack/requests/network/disassociate_floating_ip.rb +49 -0
  790. data/lib/fog/openstack/requests/network/disassociate_lb_health_monitor.rb +31 -0
  791. data/lib/fog/openstack/requests/network/get_floating_ip.rb +42 -0
  792. data/lib/fog/openstack/requests/network/get_lb_health_monitor.rb +30 -0
  793. data/lib/fog/openstack/requests/network/get_lb_member.rb +30 -0
  794. data/lib/fog/openstack/requests/network/get_lb_pool.rb +30 -0
  795. data/lib/fog/openstack/requests/network/get_lb_pool_stats.rb +35 -0
  796. data/lib/fog/openstack/requests/network/get_lb_vip.rb +30 -0
  797. data/lib/fog/openstack/requests/network/get_quota.rb +31 -0
  798. data/lib/fog/openstack/requests/network/get_quotas.rb +31 -0
  799. data/lib/fog/openstack/requests/network/get_router.rb +32 -0
  800. data/lib/fog/openstack/requests/network/list_floating_ips.rb +27 -0
  801. data/lib/fog/openstack/requests/network/list_lb_health_monitors.rb +27 -0
  802. data/lib/fog/openstack/requests/network/list_lb_members.rb +27 -0
  803. data/lib/fog/openstack/requests/network/list_lb_pools.rb +27 -0
  804. data/lib/fog/openstack/requests/network/list_lb_vips.rb +27 -0
  805. data/lib/fog/openstack/requests/network/list_routers.rb +27 -0
  806. data/lib/fog/openstack/requests/network/remove_router_interface.rb +36 -0
  807. data/lib/fog/openstack/requests/network/update_lb_health_monitor.rb +45 -0
  808. data/lib/fog/openstack/requests/network/update_lb_member.rb +41 -0
  809. data/lib/fog/openstack/requests/network/update_lb_pool.rb +42 -0
  810. data/lib/fog/openstack/requests/network/update_lb_vip.rb +44 -0
  811. data/lib/fog/openstack/requests/network/update_quota.rb +33 -0
  812. data/lib/fog/openstack/requests/network/update_router.rb +85 -0
  813. data/lib/fog/openstack/requests/storage/copy_object.rb +27 -0
  814. data/lib/fog/openstack/requests/storage/delete_container.rb +22 -0
  815. data/lib/fog/openstack/requests/storage/delete_object.rb +23 -0
  816. data/lib/fog/openstack/requests/storage/get_container.rb +44 -0
  817. data/lib/fog/openstack/requests/storage/get_containers.rb +33 -0
  818. data/lib/fog/openstack/requests/storage/get_object.rb +29 -0
  819. data/lib/fog/openstack/requests/storage/get_object_https_url.rb +51 -0
  820. data/lib/fog/openstack/requests/storage/head_container.rb +28 -0
  821. data/lib/fog/openstack/requests/storage/head_containers.rb +25 -0
  822. data/lib/fog/openstack/requests/storage/head_object.rb +23 -0
  823. data/lib/fog/openstack/requests/storage/post_set_meta_temp_url_key.rb +37 -0
  824. data/lib/fog/openstack/requests/storage/put_container.rb +22 -0
  825. data/lib/fog/openstack/requests/storage/put_object.rb +33 -0
  826. data/lib/fog/openstack/requests/storage/put_object_manifest.rb +38 -0
  827. data/lib/fog/openstack/requests/volume/create_volume.rb +4 -2
  828. data/lib/fog/openstack/requests/volume/get_quota.rb +31 -0
  829. data/lib/fog/openstack/requests/volume/get_quota_defaults.rb +31 -0
  830. data/lib/fog/openstack/requests/volume/update_quota.rb +32 -0
  831. data/lib/fog/openstack/storage.rb +216 -0
  832. data/lib/fog/openstack/volume.rb +14 -5
  833. data/lib/fog/openvz.rb +9 -0
  834. data/lib/fog/openvz/README.md +188 -0
  835. data/lib/fog/openvz/compute.rb +176 -0
  836. data/lib/fog/openvz/models/compute/server.rb +194 -0
  837. data/lib/fog/openvz/models/compute/servers.rb +27 -0
  838. data/lib/fog/openvz/requests/compute/compact_server.rb +21 -0
  839. data/lib/fog/openvz/requests/compute/convert_server.rb +21 -0
  840. data/lib/fog/openvz/requests/compute/create_server.rb +23 -0
  841. data/lib/fog/openvz/requests/compute/destroy_server.rb +21 -0
  842. data/lib/fog/openvz/requests/compute/exec2_server.rb +21 -0
  843. data/lib/fog/openvz/requests/compute/exec_server.rb +21 -0
  844. data/lib/fog/openvz/requests/compute/get_server_details.rb +21 -0
  845. data/lib/fog/openvz/requests/compute/list_servers.rb +21 -0
  846. data/lib/fog/openvz/requests/compute/mount_server.rb +21 -0
  847. data/lib/fog/openvz/requests/compute/quotainit_server.rb +21 -0
  848. data/lib/fog/openvz/requests/compute/quotaoff_server.rb +21 -0
  849. data/lib/fog/openvz/requests/compute/quotaon_server.rb +21 -0
  850. data/lib/fog/openvz/requests/compute/restart_server.rb +24 -0
  851. data/lib/fog/openvz/requests/compute/resume_server.rb +21 -0
  852. data/lib/fog/openvz/requests/compute/runscript_server.rb +21 -0
  853. data/lib/fog/openvz/requests/compute/set_server.rb +27 -0
  854. data/lib/fog/openvz/requests/compute/snapshot_delete_server.rb +21 -0
  855. data/lib/fog/openvz/requests/compute/snapshot_list_server.rb +21 -0
  856. data/lib/fog/openvz/requests/compute/snapshot_mount_server.rb +21 -0
  857. data/lib/fog/openvz/requests/compute/snapshot_server.rb +21 -0
  858. data/lib/fog/openvz/requests/compute/snapshot_switch_server.rb +21 -0
  859. data/lib/fog/openvz/requests/compute/snapshot_umount_server.rb +21 -0
  860. data/lib/fog/openvz/requests/compute/start_server.rb +24 -0
  861. data/lib/fog/openvz/requests/compute/status_server.rb +21 -0
  862. data/lib/fog/openvz/requests/compute/stop_server.rb +24 -0
  863. data/lib/fog/openvz/requests/compute/suspend_server.rb +21 -0
  864. data/lib/fog/openvz/requests/compute/umount_server.rb +21 -0
  865. data/lib/fog/ovirt/compute.rb +5 -0
  866. data/lib/fog/ovirt/models/compute/quota.rb +21 -0
  867. data/lib/fog/ovirt/models/compute/quotas.rb +24 -0
  868. data/lib/fog/ovirt/models/compute/server.rb +4 -3
  869. data/lib/fog/ovirt/models/compute/volume.rb +2 -0
  870. data/lib/fog/ovirt/requests/compute/get_api_version.rb +16 -0
  871. data/lib/fog/ovirt/requests/compute/get_quota.rb +19 -0
  872. data/lib/fog/ovirt/requests/compute/list_quotas.rb +21 -0
  873. data/lib/fog/ovirt/requests/compute/mock_files/quotas.xml +7 -0
  874. data/lib/fog/rackspace.rb +55 -11
  875. data/lib/fog/rackspace/block_storage.rb +103 -40
  876. data/lib/fog/rackspace/cdn.rb +120 -38
  877. data/lib/fog/rackspace/compute.rb +56 -58
  878. data/lib/fog/rackspace/compute_v2.rb +149 -45
  879. data/lib/fog/rackspace/databases.rb +86 -43
  880. data/lib/fog/rackspace/dns.rb +77 -38
  881. data/lib/fog/rackspace/docs/block_storage.md +417 -0
  882. data/lib/fog/rackspace/docs/compute_v2.md +722 -0
  883. data/lib/fog/rackspace/docs/getting_started.md +86 -0
  884. data/lib/fog/rackspace/docs/storage.md +530 -0
  885. data/lib/fog/rackspace/errors.rb +34 -0
  886. data/lib/fog/rackspace/examples/README.md +47 -0
  887. data/lib/fog/rackspace/examples/block_storage/create_snapshot.rb +118 -0
  888. data/lib/fog/rackspace/examples/block_storage/create_volume.rb +58 -0
  889. data/lib/fog/rackspace/examples/block_storage/delete_volume.rb +53 -0
  890. data/lib/fog/rackspace/examples/compute_v2/create_image.rb +61 -0
  891. data/lib/fog/rackspace/examples/compute_v2/create_server.rb +89 -0
  892. data/lib/fog/rackspace/examples/compute_v2/delete_image.rb +61 -0
  893. data/lib/fog/rackspace/examples/compute_v2/delete_server.rb +56 -0
  894. data/lib/fog/rackspace/examples/compute_v2/detach_volume.rb +93 -0
  895. data/lib/fog/rackspace/examples/compute_v2/resize_server.rb +106 -0
  896. data/lib/fog/rackspace/examples/compute_v2/server_attachments.rb +69 -0
  897. data/lib/fog/rackspace/examples/compute_v2/server_metadata.rb +85 -0
  898. data/lib/fog/rackspace/examples/storage/create_cdn_directory.rb +44 -0
  899. data/lib/fog/rackspace/examples/storage/create_private_directory.rb +46 -0
  900. data/lib/fog/rackspace/examples/storage/delete_directory.rb +62 -0
  901. data/lib/fog/rackspace/examples/storage/delete_file.rb +70 -0
  902. data/lib/fog/rackspace/examples/storage/download_file.rb +75 -0
  903. data/lib/fog/rackspace/examples/storage/lorem.txt +1 -0
  904. data/lib/fog/rackspace/examples/storage/storage_metadata.rb +82 -0
  905. data/lib/fog/rackspace/examples/storage/upload_file.rb +45 -0
  906. data/lib/fog/rackspace/examples/storage/upload_large_files.rb +103 -0
  907. data/lib/fog/rackspace/identity.rb +19 -28
  908. data/lib/fog/rackspace/load_balancers.rb +86 -42
  909. data/lib/fog/rackspace/mock_data.rb +172 -0
  910. data/lib/fog/rackspace/models/block_storage/snapshot.rb +42 -0
  911. data/lib/fog/rackspace/models/block_storage/snapshots.rb +15 -0
  912. data/lib/fog/rackspace/models/block_storage/volume.rb +65 -0
  913. data/lib/fog/rackspace/models/block_storage/volume_type.rb +6 -0
  914. data/lib/fog/rackspace/models/block_storage/volume_types.rb +15 -0
  915. data/lib/fog/rackspace/models/block_storage/volumes.rb +15 -0
  916. data/lib/fog/rackspace/models/compute/server.rb +1 -1
  917. data/lib/fog/rackspace/models/compute_v2/attachment.rb +37 -9
  918. data/lib/fog/rackspace/models/compute_v2/attachments.rb +14 -0
  919. data/lib/fog/rackspace/models/compute_v2/flavor.rb +18 -0
  920. data/lib/fog/rackspace/models/compute_v2/flavors.rb +17 -1
  921. data/lib/fog/rackspace/models/compute_v2/image.rb +82 -3
  922. data/lib/fog/rackspace/models/compute_v2/images.rb +17 -0
  923. data/lib/fog/rackspace/models/compute_v2/key_pair.rb +56 -0
  924. data/lib/fog/rackspace/models/compute_v2/key_pairs.rb +43 -0
  925. data/lib/fog/rackspace/models/compute_v2/meta_parent.rb +42 -0
  926. data/lib/fog/rackspace/models/compute_v2/metadata.rb +112 -0
  927. data/lib/fog/rackspace/models/compute_v2/metadatum.rb +41 -0
  928. data/lib/fog/rackspace/models/compute_v2/network.rb +27 -0
  929. data/lib/fog/rackspace/models/compute_v2/networks.rb +23 -0
  930. data/lib/fog/rackspace/models/compute_v2/server.rb +380 -19
  931. data/lib/fog/rackspace/models/compute_v2/servers.rb +35 -2
  932. data/lib/fog/rackspace/models/dns/records.rb +1 -1
  933. data/lib/fog/rackspace/models/dns/zones.rb +46 -4
  934. data/lib/fog/rackspace/models/identity/credentials.rb +3 -2
  935. data/lib/fog/rackspace/models/identity/service_catalog.rb +83 -0
  936. data/lib/fog/rackspace/models/identity/users.rb +2 -2
  937. data/lib/fog/rackspace/models/load_balancers/load_balancer.rb +7 -7
  938. data/lib/fog/rackspace/models/monitoring/agent_token.rb +40 -0
  939. data/lib/fog/rackspace/models/monitoring/agent_tokens.rb +28 -0
  940. data/lib/fog/rackspace/models/monitoring/alarm.rb +51 -0
  941. data/lib/fog/rackspace/models/monitoring/alarm_example.rb +26 -0
  942. data/lib/fog/rackspace/models/monitoring/alarm_examples.rb +31 -0
  943. data/lib/fog/rackspace/models/monitoring/alarms.rb +40 -0
  944. data/lib/fog/rackspace/models/monitoring/base.rb +36 -0
  945. data/lib/fog/rackspace/models/monitoring/check.rb +75 -0
  946. data/lib/fog/rackspace/models/monitoring/check_type.rb +15 -0
  947. data/lib/fog/rackspace/models/monitoring/check_types.rb +23 -0
  948. data/lib/fog/rackspace/models/monitoring/checks.rb +40 -0
  949. data/lib/fog/rackspace/models/monitoring/data_point.rb +18 -0
  950. data/lib/fog/rackspace/models/monitoring/data_points.rb +49 -0
  951. data/lib/fog/rackspace/models/monitoring/entities.rb +48 -0
  952. data/lib/fog/rackspace/models/monitoring/entity.rb +64 -0
  953. data/lib/fog/rackspace/models/monitoring/metric.rb +25 -0
  954. data/lib/fog/rackspace/models/monitoring/metrics.rb +27 -0
  955. data/lib/fog/rackspace/models/storage/account.rb +50 -0
  956. data/lib/fog/rackspace/models/storage/directories.rb +26 -3
  957. data/lib/fog/rackspace/models/storage/directory.rb +151 -38
  958. data/lib/fog/rackspace/models/storage/file.rb +166 -66
  959. data/lib/fog/rackspace/models/storage/files.rb +89 -4
  960. data/lib/fog/rackspace/models/storage/metadata.rb +152 -0
  961. data/lib/fog/rackspace/monitoring.rb +145 -0
  962. data/lib/fog/rackspace/requests/block_storage/create_snapshot.rb +52 -0
  963. data/lib/fog/rackspace/requests/block_storage/create_volume.rb +66 -0
  964. data/lib/fog/rackspace/requests/block_storage/delete_snapshot.rb +17 -0
  965. data/lib/fog/rackspace/requests/block_storage/delete_volume.rb +28 -0
  966. data/lib/fog/rackspace/requests/block_storage/get_snapshot.rb +31 -0
  967. data/lib/fog/rackspace/requests/block_storage/get_volume.rb +41 -0
  968. data/lib/fog/rackspace/requests/block_storage/get_volume_type.rb +27 -0
  969. data/lib/fog/rackspace/requests/block_storage/list_snapshots.rb +25 -0
  970. data/lib/fog/rackspace/requests/block_storage/list_volume_types.rb +20 -0
  971. data/lib/fog/rackspace/requests/block_storage/list_volumes.rb +28 -0
  972. data/lib/fog/rackspace/requests/cdn/delete_object.rb +41 -0
  973. data/lib/fog/rackspace/requests/cdn/get_containers.rb +39 -0
  974. data/lib/fog/rackspace/requests/cdn/head_container.rb +29 -0
  975. data/lib/fog/rackspace/requests/cdn/post_container.rb +27 -1
  976. data/lib/fog/rackspace/requests/cdn/put_container.rb +27 -1
  977. data/lib/fog/rackspace/requests/compute/delete_image.rb +1 -1
  978. data/lib/fog/rackspace/requests/compute_v2/attach_volume.rb +58 -2
  979. data/lib/fog/rackspace/requests/compute_v2/change_server_password.rb +17 -0
  980. data/lib/fog/rackspace/requests/compute_v2/confirm_resize_server.rb +22 -0
  981. data/lib/fog/rackspace/requests/compute_v2/create_image.rb +68 -11
  982. data/lib/fog/rackspace/requests/compute_v2/create_keypair.rb +53 -0
  983. data/lib/fog/rackspace/requests/compute_v2/create_network.rb +36 -0
  984. data/lib/fog/rackspace/requests/compute_v2/create_server.rb +160 -8
  985. data/lib/fog/rackspace/requests/compute_v2/delete_attachment.rb +25 -0
  986. data/lib/fog/rackspace/requests/compute_v2/delete_image.rb +8 -4
  987. data/lib/fog/rackspace/requests/compute_v2/delete_keypair.rb +36 -0
  988. data/lib/fog/rackspace/requests/compute_v2/delete_metadata_item.rb +37 -0
  989. data/lib/fog/rackspace/requests/compute_v2/delete_network.rb +21 -0
  990. data/lib/fog/rackspace/requests/compute_v2/delete_server.rb +21 -0
  991. data/lib/fog/rackspace/requests/compute_v2/get_attachment.rb +24 -0
  992. data/lib/fog/rackspace/requests/compute_v2/get_flavor.rb +29 -0
  993. data/lib/fog/rackspace/requests/compute_v2/get_image.rb +33 -0
  994. data/lib/fog/rackspace/requests/compute_v2/get_keypair.rb +41 -0
  995. data/lib/fog/rackspace/requests/compute_v2/get_metadata_item.rb +39 -0
  996. data/lib/fog/rackspace/requests/compute_v2/get_network.rb +21 -0
  997. data/lib/fog/rackspace/requests/compute_v2/get_server.rb +49 -0
  998. data/lib/fog/rackspace/requests/compute_v2/list_addresses.rb +9 -0
  999. data/lib/fog/rackspace/requests/compute_v2/list_addresses_by_network.rb +16 -0
  1000. data/lib/fog/rackspace/requests/compute_v2/list_attachments.rb +23 -0
  1001. data/lib/fog/rackspace/requests/compute_v2/list_flavors.rb +21 -0
  1002. data/lib/fog/rackspace/requests/compute_v2/list_images.rb +21 -0
  1003. data/lib/fog/rackspace/requests/compute_v2/list_keypairs.rb +37 -0
  1004. data/lib/fog/rackspace/requests/compute_v2/list_metadata.rb +38 -0
  1005. data/lib/fog/rackspace/requests/compute_v2/list_networks.rb +18 -0
  1006. data/lib/fog/rackspace/requests/compute_v2/list_servers.rb +42 -0
  1007. data/lib/fog/rackspace/requests/compute_v2/reboot_server.rb +23 -0
  1008. data/lib/fog/rackspace/requests/compute_v2/rebuild_server.rb +54 -4
  1009. data/lib/fog/rackspace/requests/compute_v2/rescue_server.rb +43 -0
  1010. data/lib/fog/rackspace/requests/compute_v2/resize_server.rb +23 -0
  1011. data/lib/fog/rackspace/requests/compute_v2/revert_resize_server.rb +23 -0
  1012. data/lib/fog/rackspace/requests/compute_v2/set_metadata.rb +41 -0
  1013. data/lib/fog/rackspace/requests/compute_v2/set_metadata_item.rb +41 -0
  1014. data/lib/fog/rackspace/requests/compute_v2/unrescue_server.rb +40 -0
  1015. data/lib/fog/rackspace/requests/compute_v2/update_metadata.rb +40 -0
  1016. data/lib/fog/rackspace/requests/compute_v2/update_server.rb +30 -7
  1017. data/lib/fog/rackspace/requests/dns/list_domains.rb +2 -2
  1018. data/lib/fog/rackspace/requests/load_balancers/create_load_balancer.rb +1 -1
  1019. data/lib/fog/rackspace/requests/load_balancers/set_ssl_termination.rb +3 -3
  1020. data/lib/fog/rackspace/requests/load_balancers/update_load_balancer.rb +2 -1
  1021. data/lib/fog/rackspace/requests/monitoring/create_agent_token.rb +19 -0
  1022. data/lib/fog/rackspace/requests/monitoring/create_alarm.rb +19 -0
  1023. data/lib/fog/rackspace/requests/monitoring/create_check.rb +19 -0
  1024. data/lib/fog/rackspace/requests/monitoring/create_entity.rb +19 -0
  1025. data/lib/fog/rackspace/requests/monitoring/delete_agent_token.rb +17 -0
  1026. data/lib/fog/rackspace/requests/monitoring/delete_alarm.rb +18 -0
  1027. data/lib/fog/rackspace/requests/monitoring/delete_check.rb +17 -0
  1028. data/lib/fog/rackspace/requests/monitoring/delete_entity.rb +17 -0
  1029. data/lib/fog/rackspace/requests/monitoring/evaluate_alarm_example.rb +21 -0
  1030. data/lib/fog/rackspace/requests/monitoring/get_agent_token.rb +19 -0
  1031. data/lib/fog/rackspace/requests/monitoring/get_alarm.rb +19 -0
  1032. data/lib/fog/rackspace/requests/monitoring/get_alarm_example.rb +19 -0
  1033. data/lib/fog/rackspace/requests/monitoring/get_check.rb +19 -0
  1034. data/lib/fog/rackspace/requests/monitoring/get_entity.rb +19 -0
  1035. data/lib/fog/rackspace/requests/monitoring/list_agent_tokens.rb +19 -0
  1036. data/lib/fog/rackspace/requests/monitoring/list_alarm_examples.rb +18 -0
  1037. data/lib/fog/rackspace/requests/monitoring/list_alarms.rb +18 -0
  1038. data/lib/fog/rackspace/requests/monitoring/list_check_types.rb +17 -0
  1039. data/lib/fog/rackspace/requests/monitoring/list_checks.rb +18 -0
  1040. data/lib/fog/rackspace/requests/monitoring/list_data_points.rb +18 -0
  1041. data/lib/fog/rackspace/requests/monitoring/list_entities.rb +19 -0
  1042. data/lib/fog/rackspace/requests/monitoring/list_metrics.rb +18 -0
  1043. data/lib/fog/rackspace/requests/monitoring/list_notification_plans.rb +18 -0
  1044. data/lib/fog/rackspace/requests/monitoring/list_overview.rb +19 -0
  1045. data/lib/fog/rackspace/requests/monitoring/update_alarm.rb +18 -0
  1046. data/lib/fog/rackspace/requests/monitoring/update_check.rb +18 -0
  1047. data/lib/fog/rackspace/requests/monitoring/update_entity.rb +18 -0
  1048. data/lib/fog/rackspace/requests/storage/copy_object.rb +4 -0
  1049. data/lib/fog/rackspace/requests/storage/delete_container.rb +4 -1
  1050. data/lib/fog/rackspace/requests/storage/delete_multiple_objects.rb +75 -0
  1051. data/lib/fog/rackspace/requests/storage/delete_object.rb +4 -1
  1052. data/lib/fog/rackspace/requests/storage/delete_static_large_object.rb +50 -0
  1053. data/lib/fog/rackspace/requests/storage/get_container.rb +4 -0
  1054. data/lib/fog/rackspace/requests/storage/get_containers.rb +4 -0
  1055. data/lib/fog/rackspace/requests/storage/get_object.rb +7 -3
  1056. data/lib/fog/rackspace/requests/storage/get_object_https_url.rb +7 -4
  1057. data/lib/fog/rackspace/requests/storage/head_container.rb +4 -0
  1058. data/lib/fog/rackspace/requests/storage/head_containers.rb +4 -0
  1059. data/lib/fog/rackspace/requests/storage/head_object.rb +4 -1
  1060. data/lib/fog/rackspace/requests/storage/post_set_meta_temp_url_key.rb +4 -1
  1061. data/lib/fog/rackspace/requests/storage/put_container.rb +6 -2
  1062. data/lib/fog/rackspace/requests/storage/put_dynamic_obj_manifest.rb +44 -0
  1063. data/lib/fog/rackspace/requests/storage/put_object.rb +12 -6
  1064. data/lib/fog/rackspace/requests/storage/put_object_manifest.rb +4 -13
  1065. data/lib/fog/rackspace/requests/storage/put_static_obj_manifest.rb +60 -0
  1066. data/lib/fog/rackspace/service.rb +121 -0
  1067. data/lib/fog/rackspace/storage.rb +91 -46
  1068. data/lib/fog/riakcs.rb +122 -0
  1069. data/lib/fog/riakcs/provisioning.rb +101 -0
  1070. data/lib/fog/riakcs/requests/provisioning/create_user.rb +77 -0
  1071. data/lib/fog/riakcs/requests/provisioning/disable_user.rb +23 -0
  1072. data/lib/fog/riakcs/requests/provisioning/enable_user.rb +23 -0
  1073. data/lib/fog/riakcs/requests/provisioning/get_user.rb +41 -0
  1074. data/lib/fog/riakcs/requests/provisioning/list_users.rb +43 -0
  1075. data/lib/fog/riakcs/requests/provisioning/regrant_secret.rb +23 -0
  1076. data/lib/fog/riakcs/requests/provisioning/update_user.rb +23 -0
  1077. data/lib/fog/riakcs/requests/usage/get_usage.rb +68 -0
  1078. data/lib/fog/riakcs/usage.rb +67 -0
  1079. data/lib/fog/schema/data_validator.rb +154 -0
  1080. data/lib/fog/serverlove/compute.rb +26 -23
  1081. data/lib/fog/serverlove/models/compute/server.rb +1 -1
  1082. data/lib/fog/storage.rb +11 -24
  1083. data/lib/fog/storm_on_demand.rb +9 -1
  1084. data/lib/fog/storm_on_demand/README.md +49 -0
  1085. data/lib/fog/storm_on_demand/account.rb +58 -0
  1086. data/lib/fog/storm_on_demand/billing.rb +61 -0
  1087. data/lib/fog/storm_on_demand/compute.rb +33 -58
  1088. data/lib/fog/storm_on_demand/dns.rb +85 -0
  1089. data/lib/fog/storm_on_demand/models/account/token.rb +23 -0
  1090. data/lib/fog/storm_on_demand/models/account/tokens.rb +20 -0
  1091. data/lib/fog/storm_on_demand/models/billing/invoice.rb +28 -0
  1092. data/lib/fog/storm_on_demand/models/billing/invoices.rb +30 -0
  1093. data/lib/fog/storm_on_demand/models/billing/payment.rb +17 -0
  1094. data/lib/fog/storm_on_demand/models/billing/payments.rb +19 -0
  1095. data/lib/fog/storm_on_demand/models/compute/config.rb +18 -4
  1096. data/lib/fog/storm_on_demand/models/compute/configs.rb +6 -2
  1097. data/lib/fog/storm_on_demand/models/compute/image.rb +22 -1
  1098. data/lib/fog/storm_on_demand/models/compute/images.rb +12 -2
  1099. data/lib/fog/storm_on_demand/models/compute/notification.rb +34 -0
  1100. data/lib/fog/storm_on_demand/models/compute/notifications.rb +30 -0
  1101. data/lib/fog/storm_on_demand/models/compute/product.rb +40 -0
  1102. data/lib/fog/storm_on_demand/models/compute/products.rb +28 -0
  1103. data/lib/fog/storm_on_demand/models/compute/server.rb +33 -9
  1104. data/lib/fog/storm_on_demand/models/compute/servers.rb +7 -2
  1105. data/lib/fog/storm_on_demand/models/compute/template.rb +7 -1
  1106. data/lib/fog/storm_on_demand/models/compute/templates.rb +7 -2
  1107. data/lib/fog/storm_on_demand/models/dns/domain.rb +34 -0
  1108. data/lib/fog/storm_on_demand/models/dns/domains.rb +20 -0
  1109. data/lib/fog/storm_on_demand/models/dns/record.rb +64 -0
  1110. data/lib/fog/storm_on_demand/models/dns/records.rb +30 -0
  1111. data/lib/fog/storm_on_demand/models/dns/reverse.rb +15 -0
  1112. data/lib/fog/storm_on_demand/models/dns/reverses.rb +23 -0
  1113. data/lib/fog/storm_on_demand/models/dns/zone.rb +40 -0
  1114. data/lib/fog/storm_on_demand/models/dns/zones.rb +30 -0
  1115. data/lib/fog/storm_on_demand/models/monitoring/bandwidth.rb +23 -0
  1116. data/lib/fog/storm_on_demand/models/monitoring/bandwidths.rb +23 -0
  1117. data/lib/fog/storm_on_demand/models/{compute/stat.rb → monitoring/load.rb} +6 -6
  1118. data/lib/fog/storm_on_demand/models/monitoring/loads.rb +24 -0
  1119. data/lib/fog/storm_on_demand/models/monitoring/monitor_service.rb +22 -0
  1120. data/lib/fog/storm_on_demand/models/monitoring/monitor_services.rb +32 -0
  1121. data/lib/fog/storm_on_demand/models/{compute → network}/balancer.rb +27 -5
  1122. data/lib/fog/storm_on_demand/models/network/balancers.rb +44 -0
  1123. data/lib/fog/storm_on_demand/models/network/firewall.rb +20 -0
  1124. data/lib/fog/storm_on_demand/models/network/firewalls.rb +32 -0
  1125. data/lib/fog/storm_on_demand/models/network/network_ip.rb +23 -0
  1126. data/lib/fog/storm_on_demand/models/network/network_ips.rb +48 -0
  1127. data/lib/fog/storm_on_demand/models/network/pool.rb +32 -0
  1128. data/lib/fog/storm_on_demand/models/network/pools.rb +28 -0
  1129. data/lib/fog/storm_on_demand/models/{compute → network}/private_ip.rb +2 -3
  1130. data/lib/fog/storm_on_demand/models/network/private_ips.rb +40 -0
  1131. data/lib/fog/storm_on_demand/models/network/ruleset.rb +27 -0
  1132. data/lib/fog/storm_on_demand/models/network/rulesets.rb +28 -0
  1133. data/lib/fog/storm_on_demand/models/network/zone.rb +27 -0
  1134. data/lib/fog/storm_on_demand/models/network/zones.rb +24 -0
  1135. data/lib/fog/storm_on_demand/models/storage/cluster.rb +20 -0
  1136. data/lib/fog/storm_on_demand/models/storage/clusters.rb +20 -0
  1137. data/lib/fog/storm_on_demand/models/storage/volume.rb +54 -0
  1138. data/lib/fog/storm_on_demand/models/storage/volumes.rb +30 -0
  1139. data/lib/fog/storm_on_demand/models/support/alert.rb +19 -0
  1140. data/lib/fog/storm_on_demand/models/support/alerts.rb +20 -0
  1141. data/lib/fog/storm_on_demand/models/support/ticket.rb +74 -0
  1142. data/lib/fog/storm_on_demand/models/support/tickets.rb +33 -0
  1143. data/lib/fog/storm_on_demand/models/vpn/vpn.rb +30 -0
  1144. data/lib/fog/storm_on_demand/models/vpn/vpns.rb +27 -0
  1145. data/lib/fog/storm_on_demand/monitoring.rb +68 -0
  1146. data/lib/fog/storm_on_demand/network.rb +113 -0
  1147. data/lib/fog/storm_on_demand/requests/account/create_token.rb +16 -0
  1148. data/lib/fog/storm_on_demand/requests/account/expire_token.rb +16 -0
  1149. data/lib/fog/storm_on_demand/requests/billing/get_invoice.rb +16 -0
  1150. data/lib/fog/storm_on_demand/requests/billing/list_invoices.rb +16 -0
  1151. data/lib/fog/storm_on_demand/requests/billing/make_payment.rb +16 -0
  1152. data/lib/fog/storm_on_demand/requests/billing/next_invoice.rb +16 -0
  1153. data/lib/fog/storm_on_demand/requests/compute/clone_server.rb +1 -1
  1154. data/lib/fog/storm_on_demand/requests/compute/create_image.rb +16 -0
  1155. data/lib/fog/storm_on_demand/requests/compute/create_server.rb +1 -1
  1156. data/lib/fog/storm_on_demand/requests/compute/current_notifications.rb +16 -0
  1157. data/lib/fog/storm_on_demand/requests/compute/delete_image.rb +16 -0
  1158. data/lib/fog/storm_on_demand/requests/compute/delete_server.rb +1 -1
  1159. data/lib/fog/storm_on_demand/requests/compute/get_config_details.rb +16 -0
  1160. data/lib/fog/storm_on_demand/requests/compute/get_image_details.rb +16 -0
  1161. data/lib/fog/storm_on_demand/requests/compute/get_notification.rb +16 -0
  1162. data/lib/fog/storm_on_demand/requests/compute/get_product.rb +16 -0
  1163. data/lib/fog/storm_on_demand/requests/compute/get_product_code.rb +16 -0
  1164. data/lib/fog/storm_on_demand/requests/compute/get_product_price.rb +16 -0
  1165. data/lib/fog/storm_on_demand/requests/compute/get_product_starting_price.rb +16 -0
  1166. data/lib/fog/storm_on_demand/requests/compute/get_server.rb +1 -1
  1167. data/lib/fog/storm_on_demand/requests/compute/get_template_details.rb +16 -0
  1168. data/lib/fog/storm_on_demand/requests/compute/list_configs.rb +1 -1
  1169. data/lib/fog/storm_on_demand/requests/compute/list_images.rb +2 -2
  1170. data/lib/fog/storm_on_demand/requests/compute/list_notifications.rb +16 -0
  1171. data/lib/fog/storm_on_demand/requests/compute/list_products.rb +16 -0
  1172. data/lib/fog/storm_on_demand/requests/compute/list_servers.rb +2 -2
  1173. data/lib/fog/storm_on_demand/requests/compute/list_templates.rb +2 -2
  1174. data/lib/fog/storm_on_demand/requests/compute/reboot_server.rb +1 -1
  1175. data/lib/fog/storm_on_demand/requests/compute/resize_server.rb +1 -1
  1176. data/lib/fog/storm_on_demand/requests/compute/resolve_notification.rb +16 -0
  1177. data/lib/fog/storm_on_demand/requests/compute/restore_image.rb +16 -0
  1178. data/lib/fog/storm_on_demand/requests/compute/restore_template.rb +16 -0
  1179. data/lib/fog/storm_on_demand/requests/compute/server_history.rb +16 -0
  1180. data/lib/fog/storm_on_demand/requests/compute/server_status.rb +16 -0
  1181. data/lib/fog/storm_on_demand/requests/compute/shutdown_server.rb +16 -0
  1182. data/lib/fog/storm_on_demand/requests/compute/start_server.rb +16 -0
  1183. data/lib/fog/storm_on_demand/requests/compute/update_image.rb +16 -0
  1184. data/lib/fog/storm_on_demand/requests/compute/update_server.rb +16 -0
  1185. data/lib/fog/storm_on_demand/requests/dns/check_zone_delegation.rb +16 -0
  1186. data/lib/fog/storm_on_demand/requests/dns/create_record.rb +16 -0
  1187. data/lib/fog/storm_on_demand/requests/dns/create_record_region.rb +16 -0
  1188. data/lib/fog/storm_on_demand/requests/dns/create_zone.rb +16 -0
  1189. data/lib/fog/storm_on_demand/requests/dns/delete_record.rb +16 -0
  1190. data/lib/fog/storm_on_demand/requests/dns/delete_record_region.rb +16 -0
  1191. data/lib/fog/storm_on_demand/requests/dns/delete_reverse.rb +16 -0
  1192. data/lib/fog/storm_on_demand/requests/dns/delete_zone.rb +16 -0
  1193. data/lib/fog/storm_on_demand/requests/dns/get_record.rb +16 -0
  1194. data/lib/fog/storm_on_demand/requests/dns/get_zone.rb +16 -0
  1195. data/lib/fog/storm_on_demand/requests/dns/list_domains.rb +16 -0
  1196. data/lib/fog/storm_on_demand/requests/dns/list_records.rb +16 -0
  1197. data/lib/fog/storm_on_demand/requests/dns/list_zones.rb +16 -0
  1198. data/lib/fog/storm_on_demand/requests/dns/renew_domain.rb +16 -0
  1199. data/lib/fog/storm_on_demand/requests/dns/update_record.rb +16 -0
  1200. data/lib/fog/storm_on_demand/requests/dns/update_record_region.rb +16 -0
  1201. data/lib/fog/storm_on_demand/requests/dns/update_reverse.rb +16 -0
  1202. data/lib/fog/storm_on_demand/requests/dns/update_zone.rb +16 -0
  1203. data/lib/fog/storm_on_demand/requests/monitoring/get_bandwidth_graph.rb +16 -0
  1204. data/lib/fog/storm_on_demand/requests/monitoring/get_bandwidth_stats.rb +16 -0
  1205. data/lib/fog/storm_on_demand/requests/monitoring/get_load_graph.rb +16 -0
  1206. data/lib/fog/storm_on_demand/requests/monitoring/get_load_stats.rb +16 -0
  1207. data/lib/fog/storm_on_demand/requests/monitoring/get_service.rb +16 -0
  1208. data/lib/fog/storm_on_demand/requests/monitoring/get_service_status.rb +16 -0
  1209. data/lib/fog/storm_on_demand/requests/monitoring/monitoring_ips.rb +16 -0
  1210. data/lib/fog/storm_on_demand/requests/monitoring/update_service.rb +16 -0
  1211. data/lib/fog/storm_on_demand/requests/{compute → network}/add_balancer_node.rb +2 -2
  1212. data/lib/fog/storm_on_demand/requests/network/add_balancer_service.rb +16 -0
  1213. data/lib/fog/storm_on_demand/requests/network/add_ip_to_server.rb +16 -0
  1214. data/lib/fog/storm_on_demand/requests/network/attach_server_to_private_ip.rb +16 -0
  1215. data/lib/fog/storm_on_demand/requests/network/check_balancer_available.rb +16 -0
  1216. data/lib/fog/storm_on_demand/requests/network/check_server_attached.rb +16 -0
  1217. data/lib/fog/storm_on_demand/requests/network/create_balancer.rb +16 -0
  1218. data/lib/fog/storm_on_demand/requests/network/create_pool.rb +16 -0
  1219. data/lib/fog/storm_on_demand/requests/network/create_ruleset.rb +16 -0
  1220. data/lib/fog/storm_on_demand/requests/network/delete_balancer.rb +16 -0
  1221. data/lib/fog/storm_on_demand/requests/network/delete_pool.rb +16 -0
  1222. data/lib/fog/storm_on_demand/requests/network/detach_server_from_private_ip.rb +16 -0
  1223. data/lib/fog/storm_on_demand/requests/network/get_assignments.rb +16 -0
  1224. data/lib/fog/storm_on_demand/requests/network/get_balancer_details.rb +16 -0
  1225. data/lib/fog/storm_on_demand/requests/network/get_balancer_possible_nodes.rb +16 -0
  1226. data/lib/fog/storm_on_demand/requests/network/get_balancer_strategies.rb +16 -0
  1227. data/lib/fog/storm_on_demand/requests/network/get_firewall.rb +16 -0
  1228. data/lib/fog/storm_on_demand/requests/network/get_firewall_basic_options.rb +16 -0
  1229. data/lib/fog/storm_on_demand/requests/network/get_firewall_rules.rb +16 -0
  1230. data/lib/fog/storm_on_demand/requests/network/get_ip_details.rb +16 -0
  1231. data/lib/fog/storm_on_demand/requests/network/get_pool.rb +16 -0
  1232. data/lib/fog/storm_on_demand/requests/network/get_private_ip.rb +16 -0
  1233. data/lib/fog/storm_on_demand/requests/network/get_ruleset.rb +16 -0
  1234. data/lib/fog/storm_on_demand/requests/network/get_zone.rb +16 -0
  1235. data/lib/fog/storm_on_demand/requests/{compute → network}/list_balancers.rb +3 -3
  1236. data/lib/fog/storm_on_demand/requests/network/list_ip_public_accounts.rb +16 -0
  1237. data/lib/fog/storm_on_demand/requests/network/list_network_ips.rb +16 -0
  1238. data/lib/fog/storm_on_demand/requests/network/list_network_public_ips.rb +16 -0
  1239. data/lib/fog/storm_on_demand/requests/{compute → network}/list_private_ips.rb +3 -3
  1240. data/lib/fog/storm_on_demand/requests/network/list_rulesets.rb +16 -0
  1241. data/lib/fog/storm_on_demand/requests/network/list_zones.rb +16 -0
  1242. data/lib/fog/storm_on_demand/requests/{compute → network}/remove_balancer_node.rb +2 -2
  1243. data/lib/fog/storm_on_demand/requests/network/remove_balancer_service.rb +16 -0
  1244. data/lib/fog/storm_on_demand/requests/network/remove_ip_from_server.rb +16 -0
  1245. data/lib/fog/storm_on_demand/requests/network/request_new_ips.rb +16 -0
  1246. data/lib/fog/storm_on_demand/requests/network/set_default_zone.rb +16 -0
  1247. data/lib/fog/storm_on_demand/requests/network/update_balancer.rb +16 -0
  1248. data/lib/fog/storm_on_demand/requests/network/update_firewall.rb +16 -0
  1249. data/lib/fog/storm_on_demand/requests/network/update_pool.rb +16 -0
  1250. data/lib/fog/storm_on_demand/requests/network/update_ruleset.rb +16 -0
  1251. data/lib/fog/storm_on_demand/requests/storage/attach_volume_to_server.rb +16 -0
  1252. data/lib/fog/storm_on_demand/requests/storage/create_volume.rb +16 -0
  1253. data/lib/fog/storm_on_demand/requests/storage/delete_volume.rb +16 -0
  1254. data/lib/fog/storm_on_demand/requests/storage/detach_volume_from_server.rb +16 -0
  1255. data/lib/fog/storm_on_demand/requests/storage/get_volume.rb +16 -0
  1256. data/lib/fog/storm_on_demand/requests/storage/list_clusters.rb +16 -0
  1257. data/lib/fog/storm_on_demand/requests/storage/list_volumes.rb +16 -0
  1258. data/lib/fog/storm_on_demand/requests/storage/resize_volume.rb +16 -0
  1259. data/lib/fog/storm_on_demand/requests/storage/update_volume.rb +16 -0
  1260. data/lib/fog/storm_on_demand/requests/support/add_feedback.rb +16 -0
  1261. data/lib/fog/storm_on_demand/requests/support/add_transaction_feedback.rb +16 -0
  1262. data/lib/fog/storm_on_demand/requests/support/authenticate.rb +16 -0
  1263. data/lib/fog/storm_on_demand/requests/support/close_ticket.rb +16 -0
  1264. data/lib/fog/storm_on_demand/requests/support/create_ticket.rb +16 -0
  1265. data/lib/fog/storm_on_demand/requests/support/get_active_alert.rb +16 -0
  1266. data/lib/fog/storm_on_demand/requests/support/get_ticket_details.rb +16 -0
  1267. data/lib/fog/storm_on_demand/requests/support/list_ticket_types.rb +16 -0
  1268. data/lib/fog/storm_on_demand/requests/support/list_tickets.rb +16 -0
  1269. data/lib/fog/storm_on_demand/requests/support/reopen_ticket.rb +16 -0
  1270. data/lib/fog/storm_on_demand/requests/support/reply_ticket.rb +16 -0
  1271. data/lib/fog/storm_on_demand/requests/vpn/create_vpn.rb +16 -0
  1272. data/lib/fog/storm_on_demand/requests/vpn/get_vpn.rb +16 -0
  1273. data/lib/fog/storm_on_demand/requests/vpn/list_vpn_users.rb +16 -0
  1274. data/lib/fog/storm_on_demand/requests/vpn/update_vpn.rb +16 -0
  1275. data/lib/fog/storm_on_demand/shared.rb +55 -0
  1276. data/lib/fog/storm_on_demand/storage.rb +69 -0
  1277. data/lib/fog/storm_on_demand/support.rb +68 -0
  1278. data/lib/fog/storm_on_demand/vpn.rb +58 -0
  1279. data/lib/fog/support.rb +26 -0
  1280. data/lib/fog/terremark/models/shared/server.rb +5 -3
  1281. data/lib/fog/terremark/parser.rb +14 -13
  1282. data/lib/fog/terremark/parsers/shared/get_catalog.rb +5 -19
  1283. data/lib/fog/terremark/parsers/shared/get_catalog_item.rb +4 -14
  1284. data/lib/fog/terremark/parsers/shared/get_internet_services.rb +1 -1
  1285. data/lib/fog/terremark/parsers/shared/get_keys_list.rb +4 -18
  1286. data/lib/fog/terremark/parsers/shared/get_network_ips.rb +1 -1
  1287. data/lib/fog/terremark/parsers/shared/get_node_services.rb +1 -1
  1288. data/lib/fog/terremark/parsers/shared/get_organization.rb +4 -3
  1289. data/lib/fog/terremark/parsers/shared/get_organizations.rb +3 -2
  1290. data/lib/fog/terremark/parsers/shared/get_public_ips.rb +1 -1
  1291. data/lib/fog/terremark/parsers/shared/get_tasks_list.rb +4 -17
  1292. data/lib/fog/terremark/parsers/shared/get_vapp_template.rb +3 -14
  1293. data/lib/fog/terremark/parsers/shared/get_vdc.rb +6 -38
  1294. data/lib/fog/terremark/parsers/shared/instantiate_vapp_template.rb +3 -14
  1295. data/lib/fog/terremark/parsers/shared/internet_service.rb +2 -5
  1296. data/lib/fog/terremark/parsers/shared/network.rb +3 -11
  1297. data/lib/fog/terremark/parsers/shared/node_service.rb +1 -1
  1298. data/lib/fog/terremark/parsers/shared/public_ip.rb +1 -1
  1299. data/lib/fog/terremark/parsers/shared/task.rb +3 -14
  1300. data/lib/fog/terremark/parsers/shared/vapp.rb +3 -14
  1301. data/lib/fog/vcloud/compute.rb +9 -2
  1302. data/lib/fog/vcloud/models/compute/catalog_item.rb +8 -0
  1303. data/lib/fog/vcloud/models/compute/server.rb +36 -2
  1304. data/lib/fog/vcloud/models/compute/tag.rb +18 -0
  1305. data/lib/fog/vcloud/models/compute/tags.rb +32 -0
  1306. data/lib/fog/vcloud/models/compute/vapp.rb +11 -0
  1307. data/lib/fog/vcloud/requests/compute/configure_metadata.rb +36 -0
  1308. data/lib/fog/vcloud/requests/compute/configure_vm.rb +2 -2
  1309. data/lib/fog/vcloud/requests/compute/configure_vm_cpus.rb +1 -1
  1310. data/lib/fog/vcloud/requests/compute/configure_vm_customization_script.rb +33 -0
  1311. data/lib/fog/vcloud/requests/compute/configure_vm_memory.rb +1 -1
  1312. data/lib/fog/vcloud/requests/compute/configure_vm_network.rb +36 -0
  1313. data/lib/fog/vcloud/requests/compute/delete_metadata.rb +10 -0
  1314. data/lib/fog/vcloud/requests/compute/get_metadata.rb +10 -0
  1315. data/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb +8 -4
  1316. data/lib/fog/version.rb +1 -1
  1317. data/lib/fog/volume.rb +6 -6
  1318. data/lib/fog/vpn.rb +25 -0
  1319. data/lib/fog/vsphere/compute.rb +160 -15
  1320. data/lib/fog/vsphere/models/compute/customfield.rb +19 -0
  1321. data/lib/fog/vsphere/models/compute/customfields.rb +27 -0
  1322. data/lib/fog/vsphere/models/compute/customvalue.rb +17 -0
  1323. data/lib/fog/vsphere/models/compute/customvalues.rb +37 -0
  1324. data/lib/fog/vsphere/models/compute/datacenter.rb +4 -0
  1325. data/lib/fog/vsphere/models/compute/interface.rb +2 -0
  1326. data/lib/fog/vsphere/models/compute/interfaces.rb +14 -2
  1327. data/lib/fog/vsphere/models/compute/networks.rb +2 -2
  1328. data/lib/fog/vsphere/models/compute/server.rb +44 -8
  1329. data/lib/fog/vsphere/models/compute/servers.rb +9 -9
  1330. data/lib/fog/vsphere/requests/compute/create_vm.rb +18 -3
  1331. data/lib/fog/vsphere/requests/compute/get_datacenter.rb +3 -1
  1332. data/lib/fog/vsphere/requests/compute/get_datastore.rb +6 -1
  1333. data/lib/fog/vsphere/requests/compute/get_folder.rb +3 -1
  1334. data/lib/fog/vsphere/requests/compute/get_network.rb +6 -1
  1335. data/lib/fog/vsphere/requests/compute/get_template.rb +16 -0
  1336. data/lib/fog/vsphere/requests/compute/get_virtual_machine.rb +13 -28
  1337. data/lib/fog/vsphere/requests/compute/list_customfields.rb +22 -0
  1338. data/lib/fog/vsphere/requests/compute/list_datacenters.rb +1 -0
  1339. data/lib/fog/vsphere/requests/compute/list_templates.rb +49 -0
  1340. data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +25 -122
  1341. data/lib/fog/vsphere/requests/compute/list_vm_customvalues.rb +22 -0
  1342. data/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +14 -1
  1343. data/lib/fog/vsphere/requests/compute/modify_vm_interface.rb +58 -0
  1344. data/lib/fog/vsphere/requests/compute/vm_clone.rb +79 -50
  1345. data/lib/fog/vsphere/requests/compute/vm_power_off.rb +2 -0
  1346. data/lib/fog/vsphere/requests/compute/vm_reconfig_hardware.rb +1 -1
  1347. data/lib/fog/xenserver.rb +2 -0
  1348. data/lib/fog/xenserver/CHANGELOG.md +77 -0
  1349. data/lib/fog/xenserver/compute.rb +23 -12
  1350. data/lib/fog/xenserver/examples/networks-and-vlans.rb +45 -0
  1351. data/lib/fog/xenserver/models/compute/console.rb +27 -0
  1352. data/lib/fog/xenserver/models/compute/consoles.rb +25 -0
  1353. data/lib/fog/xenserver/models/compute/host.rb +19 -6
  1354. data/lib/fog/xenserver/models/compute/host_cpu.rb +37 -0
  1355. data/lib/fog/xenserver/models/compute/network.rb +33 -0
  1356. data/lib/fog/xenserver/models/compute/pbd.rb +1 -1
  1357. data/lib/fog/xenserver/models/compute/pool.rb +4 -4
  1358. data/lib/fog/xenserver/models/compute/server.rb +13 -7
  1359. data/lib/fog/xenserver/models/compute/servers.rb +5 -0
  1360. data/lib/fog/xenserver/models/compute/storage_repository.rb +4 -4
  1361. data/lib/fog/xenserver/models/compute/vlan.rb +80 -0
  1362. data/lib/fog/xenserver/models/compute/vlans.rb +39 -0
  1363. data/lib/fog/xenserver/requests/compute/create_network.rb +42 -0
  1364. data/lib/fog/xenserver/requests/compute/create_server.rb +4 -0
  1365. data/lib/fog/xenserver/requests/compute/create_vlan.rb +35 -0
  1366. data/lib/fog/xenserver/requests/compute/destroy_network.rb +33 -0
  1367. data/lib/fog/xenserver/requests/compute/destroy_vlan.rb +32 -0
  1368. data/lib/fog/xenserver/requests/compute/snapshot_revert.rb +22 -0
  1369. data/lib/fog/xenserver/requests/compute/snapshot_server.rb +22 -0
  1370. data/lib/fog/xml.rb +21 -0
  1371. data/lib/fog/xml/sax_parser_connection.rb +46 -0
  1372. data/lib/fog/zerigo/models/dns/record.rb +0 -1
  1373. data/lib/fog/zerigo/models/dns/records.rb +15 -12
  1374. data/lib/fog/zerigo/models/dns/zone.rb +1 -1
  1375. data/lib/fog/zerigo/models/dns/zones.rb +2 -2
  1376. data/lib/fog/zerigo/requests/dns/list_zones.rb +7 -1
  1377. data/lib/tasks/changelog_task.rb +8 -2
  1378. data/tests/aws/models/auto_scaling/groups_test.rb +22 -0
  1379. data/tests/aws/models/compute/volume_tests.rb +1 -1
  1380. data/tests/aws/models/data_pipeline/pipeline_tests.rb +8 -0
  1381. data/tests/aws/models/data_pipeline/pipelines_tests.rb +8 -0
  1382. data/tests/aws/models/elb/model_tests.rb +28 -1
  1383. data/tests/aws/models/iam/roles_tests.rb +63 -0
  1384. data/tests/aws/models/rds/server_tests.rb +10 -9
  1385. data/tests/aws/models/storage/directory_tests.rb +41 -5
  1386. data/tests/aws/models/storage/file_tests.rb +1 -2
  1387. data/tests/aws/models/storage/files_tests.rb +6 -4
  1388. data/tests/aws/models/storage/url_tests.rb +7 -5
  1389. data/tests/aws/models/storage/version_tests.rb +2 -2
  1390. data/tests/aws/models/storage/versions_tests.rb +5 -5
  1391. data/tests/aws/parsers/elb/describe_load_balancers.rb +65 -0
  1392. data/tests/aws/requests/cloud_formation/stack_tests.rb +10 -0
  1393. data/tests/aws/requests/compute/address_tests.rb +4 -0
  1394. data/tests/aws/requests/compute/image_tests.rb +22 -2
  1395. data/tests/aws/requests/compute/instance_tests.rb +50 -54
  1396. data/tests/aws/requests/compute/security_group_tests.rb +1 -1
  1397. data/tests/aws/requests/compute/spot_instance_tests.rb +3 -2
  1398. data/tests/aws/requests/compute/volume_tests.rb +3 -3
  1399. data/tests/aws/requests/data_pipeline/helper.rb +44 -0
  1400. data/tests/aws/requests/data_pipeline/pipeline_tests.rb +54 -0
  1401. data/tests/aws/requests/elasticache/describe_reserved_cache_nodes.rb +17 -0
  1402. data/tests/aws/requests/elasticache/helper.rb +17 -0
  1403. data/tests/aws/requests/elb/helper.rb +2 -1
  1404. data/tests/aws/requests/elb/listener_tests.rb +1 -1
  1405. data/tests/aws/requests/elb/load_balancer_tests.rb +5 -1
  1406. data/tests/aws/requests/elb/policy_tests.rb +85 -6
  1407. data/tests/aws/requests/glacier/vault_tests.rb +1 -1
  1408. data/tests/aws/requests/iam/helper.rb +4 -1
  1409. data/tests/aws/requests/iam/server_certificate_tests.rb +33 -1
  1410. data/tests/aws/requests/iam/user_tests.rb +10 -8
  1411. data/tests/aws/requests/rds/helper.rb +14 -0
  1412. data/tests/aws/requests/rds/instance_tests.rb +8 -5
  1413. data/tests/aws/requests/rds/log_file_tests.rb +19 -0
  1414. data/tests/aws/requests/ses/verified_domain_identity_tests.rb +16 -0
  1415. data/tests/aws/requests/storage/bucket_tests.rb +23 -3
  1416. data/tests/aws/requests/storage/multipart_upload_tests.rb +1 -1
  1417. data/tests/aws/requests/storage/object_tests.rb +22 -13
  1418. data/tests/aws/requests/sts/assume_role_tests.rb +19 -0
  1419. data/tests/bluebox/requests/blb/helper.rb +64 -0
  1420. data/tests/bluebox/requests/blb/lb_tests.rb +75 -0
  1421. data/tests/brightbox/compute/image_selector_tests.rb +103 -0
  1422. data/tests/brightbox/oauth2_tests.rb +8 -1
  1423. data/tests/brightbox/requests/compute/collaboration_tests.rb +41 -0
  1424. data/tests/brightbox/requests/compute/firewall_policy_tests.rb +7 -0
  1425. data/tests/brightbox/requests/compute/helper.rb +50 -4
  1426. data/tests/brightbox/requests/compute/user_collaboration_tests.rb +67 -0
  1427. data/tests/cloudsigma/models/server_tests.rb +72 -0
  1428. data/tests/cloudsigma/models/servers_tests.rb +7 -0
  1429. data/tests/cloudsigma/models/volume_tests.rb +21 -0
  1430. data/tests/cloudsigma/models/volumes_tests.rb +9 -0
  1431. data/tests/cloudsigma/requests/server_tests.rb +81 -0
  1432. data/tests/cloudsigma/requests/volumes_tests.rb +55 -0
  1433. data/tests/cloudstack/compute/models/disk_offering_tests.rb +5 -0
  1434. data/tests/cloudstack/compute/models/snapshot_tests.rb +19 -0
  1435. data/tests/cloudstack/requests/disk_offering_tests.rb +3 -3
  1436. data/tests/cloudstack/requests/os_type_tests.rb +2 -3
  1437. data/tests/compute/helper.rb +17 -0
  1438. data/tests/core/connection_tests.rb +26 -0
  1439. data/tests/core/mocking_tests.rb +15 -0
  1440. data/tests/core/parser_tests.rb +32 -6
  1441. data/tests/digitalocean/helper.rb +51 -0
  1442. data/tests/digitalocean/models/compute/flavor_tests.rb +30 -0
  1443. data/tests/digitalocean/models/compute/image_tests.rb +31 -0
  1444. data/tests/digitalocean/models/compute/region_tests.rb +30 -0
  1445. data/tests/digitalocean/models/compute/server_tests.rb +92 -0
  1446. data/tests/digitalocean/models/compute/servers_tests.rb +21 -0
  1447. data/tests/digitalocean/models/compute/ssh_key_tests.rb +44 -0
  1448. data/tests/digitalocean/models/compute/ssh_keys_tests.rb +32 -0
  1449. data/tests/digitalocean/requests/compute/create_server_tests.rb +25 -0
  1450. data/tests/digitalocean/requests/compute/create_ssh_key_tests.rb +22 -0
  1451. data/tests/digitalocean/requests/compute/destroy_server_tests.rb +14 -0
  1452. data/tests/digitalocean/requests/compute/destroy_ssh_key_tests.rb +23 -0
  1453. data/tests/digitalocean/requests/compute/get_server_details_tests.rb +13 -0
  1454. data/tests/digitalocean/requests/compute/get_ssh_key_tests.rb +25 -0
  1455. data/tests/digitalocean/requests/compute/list_flavors_tests.rb +23 -0
  1456. data/tests/digitalocean/requests/compute/list_images_tests.rb +24 -0
  1457. data/tests/digitalocean/requests/compute/list_regions_tests.rb +23 -0
  1458. data/tests/digitalocean/requests/compute/list_servers_tests.rb +26 -0
  1459. data/tests/digitalocean/requests/compute/list_ssh_keys_tests.rb +24 -0
  1460. data/tests/digitalocean/requests/compute/power_cycle_server_tests.rb +20 -0
  1461. data/tests/digitalocean/requests/compute/power_state_tests.rb +25 -0
  1462. data/tests/digitalocean/requests/compute/reboot_server_tests.rb +14 -0
  1463. data/tests/dnsimple/requests/dns/dns_tests.rb +30 -26
  1464. data/tests/dreamhost/README.md +56 -0
  1465. data/tests/dreamhost/dns_tests.rb +20 -0
  1466. data/tests/dreamhost/helper.rb +19 -0
  1467. data/tests/dreamhost/models/dns/record_tests.rb +73 -0
  1468. data/tests/dreamhost/models/dns/records_tests.rb +29 -0
  1469. data/tests/dreamhost/models/dns/zone_tests.rb +62 -0
  1470. data/tests/dreamhost/models/dns/zones_tests.rb +29 -0
  1471. data/tests/dreamhost/requests/dns/create_record_tests.rb +39 -0
  1472. data/tests/dreamhost/requests/dns/delete_record_tests.rb +26 -0
  1473. data/tests/dreamhost/requests/dns/list_records_tests.rb +31 -0
  1474. data/tests/dynect/requests/dns/dns_tests.rb +4 -7
  1475. data/tests/ecloud/compute/models/server_tests.rb +9 -1
  1476. data/tests/glesys/requests/compute/helper.rb +5 -5
  1477. data/tests/google/models/compute/server_tests.rb +24 -0
  1478. data/tests/google/requests/compute/disk_tests.rb +88 -0
  1479. data/tests/google/requests/compute/firewall_tests.rb +85 -0
  1480. data/tests/google/requests/compute/image_tests.rb +80 -0
  1481. data/tests/google/requests/compute/network_tests.rb +74 -0
  1482. data/tests/google/requests/compute/operation_tests.rb +19 -0
  1483. data/tests/google/requests/compute/server_tests.rb +84 -0
  1484. data/tests/google/requests/compute/zone_tests.rb +46 -0
  1485. data/tests/helper.rb +16 -1
  1486. data/tests/helpers/collection_helper.rb +35 -0
  1487. data/tests/helpers/formats_helper.rb +63 -50
  1488. data/tests/helpers/formats_helper_tests.rb +87 -36
  1489. data/tests/helpers/mock_helper.rb +15 -2
  1490. data/tests/helpers/schema_validator_tests.rb +107 -0
  1491. data/tests/hp/models/block_storage/bootable_volume_tests.rb +23 -0
  1492. data/tests/hp/models/block_storage/snapshot_tests.rb +23 -0
  1493. data/tests/hp/models/block_storage/volume_tests.rb +21 -0
  1494. data/tests/hp/models/compute/address_tests.rb +1 -1
  1495. data/tests/hp/models/compute/addresses_tests.rb +1 -1
  1496. data/tests/hp/models/compute/key_pair_tests.rb +1 -1
  1497. data/tests/hp/models/compute/key_pairs_tests.rb +1 -1
  1498. data/tests/hp/models/compute/metadata_image_tests.rb +60 -0
  1499. data/tests/hp/models/compute/metadata_server_tests.rb +54 -0
  1500. data/tests/hp/models/compute/security_group_tests.rb +3 -1
  1501. data/tests/hp/models/compute/security_groups_tests.rb +1 -1
  1502. data/tests/hp/models/storage/directories_tests.rb +23 -0
  1503. data/tests/hp/models/storage/directory_tests.rb +62 -0
  1504. data/tests/hp/models/storage/file_tests.rb +44 -0
  1505. data/tests/hp/models/storage/files_tests.rb +38 -0
  1506. data/tests/hp/requests/block_storage/bootable_volume_tests.rb +78 -0
  1507. data/tests/hp/requests/block_storage/snapshot_tests.rb +56 -0
  1508. data/tests/hp/requests/block_storage/volume_tests.rb +94 -0
  1509. data/tests/hp/requests/cdn/container_tests.rb +1 -1
  1510. data/tests/hp/requests/compute/address_tests.rb +5 -6
  1511. data/tests/hp/requests/compute/flavor_tests.rb +1 -1
  1512. data/tests/hp/requests/compute/image_tests.rb +1 -1
  1513. data/tests/hp/requests/compute/key_pair_tests.rb +1 -1
  1514. data/tests/hp/requests/compute/metadata_tests.rb +70 -0
  1515. data/tests/hp/requests/compute/persistent_server_tests.rb +66 -0
  1516. data/tests/hp/requests/compute/security_group_rule_tests.rb +1 -1
  1517. data/tests/hp/requests/compute/security_group_tests.rb +1 -1
  1518. data/tests/hp/requests/compute/server_address_tests.rb +1 -1
  1519. data/tests/hp/requests/compute/server_tests.rb +5 -6
  1520. data/tests/hp/requests/compute/server_volume_tests.rb +76 -0
  1521. data/tests/hp/requests/storage/container_tests.rb +1 -1
  1522. data/tests/hp/requests/storage/object_tests.rb +9 -1
  1523. data/tests/hp/user_agent_tests.rb +13 -0
  1524. data/tests/internet_archive/models/storage/directory_tests.rb +43 -0
  1525. data/tests/internet_archive/models/storage/file_tests.rb +61 -0
  1526. data/tests/internet_archive/models/storage/files_tests.rb +58 -0
  1527. data/tests/internet_archive/models/storage/url_tests.rb +28 -0
  1528. data/tests/internet_archive/requests/storage/acl_utils_tests.rb +209 -0
  1529. data/tests/internet_archive/requests/storage/bucket_tests.rb +324 -0
  1530. data/tests/internet_archive/requests/storage/cors_utils_tests.rb +108 -0
  1531. data/tests/internet_archive/requests/storage/multipart_upload_tests.rb +132 -0
  1532. data/tests/internet_archive/requests/storage/object_tests.rb +166 -0
  1533. data/tests/internet_archive/signaturev4_tests.rb +41 -0
  1534. data/tests/internet_archive/signed_params_tests.rb +5 -0
  1535. data/tests/joyent/requests/compute/networks_tests.rb +39 -0
  1536. data/tests/openstack/models/compute/images_tests.rb +14 -0
  1537. data/tests/openstack/models/compute/server_tests.rb +133 -2
  1538. data/tests/openstack/models/identity/roles_tests.rb +1 -0
  1539. data/tests/openstack/models/identity/user_tests.rb +2 -2
  1540. data/tests/openstack/models/image/images_tests.rb +5 -0
  1541. data/tests/openstack/models/network/floating_ip_tests.rb +30 -0
  1542. data/tests/openstack/models/network/floating_ips_tests.rb +27 -0
  1543. data/tests/openstack/models/network/lb_health_monitor_tests.rb +52 -0
  1544. data/tests/openstack/models/network/lb_health_monitors_tests.rb +21 -0
  1545. data/tests/openstack/models/network/lb_member_tests.rb +28 -0
  1546. data/tests/openstack/models/network/lb_members_tests.rb +21 -0
  1547. data/tests/openstack/models/network/lb_pool_tests.rb +53 -0
  1548. data/tests/openstack/models/network/lb_pools_tests.rb +20 -0
  1549. data/tests/openstack/models/network/lb_vip_tests.rb +39 -0
  1550. data/tests/openstack/models/network/lb_vips_tests.rb +21 -0
  1551. data/tests/openstack/models/network/network_tests.rb +38 -1
  1552. data/tests/openstack/models/network/router_tests.rb +38 -0
  1553. data/tests/openstack/models/network/routers_tests.rb +21 -0
  1554. data/tests/openstack/models/storage/file_tests.rb +178 -0
  1555. data/tests/openstack/requests/compute/address_tests.rb +8 -0
  1556. data/tests/openstack/requests/compute/flavor_tests.rb +12 -0
  1557. data/tests/openstack/requests/compute/limit_tests.rb +1 -1
  1558. data/tests/openstack/requests/compute/tenant_tests.rb +2 -2
  1559. data/tests/openstack/requests/compute/volume_tests.rb +11 -9
  1560. data/tests/openstack/requests/identity/ec2_credentials_tests.rb +7 -4
  1561. data/tests/openstack/requests/identity/helper.rb +17 -0
  1562. data/tests/openstack/requests/identity/role_tests.rb +6 -0
  1563. data/tests/openstack/requests/identity/tenant_tests.rb +14 -12
  1564. data/tests/openstack/requests/identity/user_tests.rb +9 -5
  1565. data/tests/openstack/requests/metering/meter_tests.rb +52 -0
  1566. data/tests/openstack/requests/metering/resource_tests.rb +19 -0
  1567. data/tests/openstack/requests/network/lb_health_monitor_tests.rb +93 -0
  1568. data/tests/openstack/requests/network/lb_member_tests.rb +60 -0
  1569. data/tests/openstack/requests/network/lb_pool_tests.rb +80 -0
  1570. data/tests/openstack/requests/network/lb_vip_tests.rb +71 -0
  1571. data/tests/openstack/requests/network/network_tests.rb +61 -10
  1572. data/tests/openstack/requests/network/quota_tests.rb +65 -0
  1573. data/tests/openstack/requests/network/router_tests.rb +75 -0
  1574. data/tests/openstack/requests/storage/container_tests.rb +64 -0
  1575. data/tests/openstack/requests/storage/large_object_tests.rb +111 -0
  1576. data/tests/openstack/requests/storage/object_tests.rb +109 -0
  1577. data/tests/openstack/requests/volume/quota_tests.rb +51 -0
  1578. data/tests/openstack/storage_tests.rb +19 -0
  1579. data/tests/openstack/version_tests.rb +55 -0
  1580. data/tests/openstack/volume_tests.rb +15 -0
  1581. data/tests/openvz/helper.rb +47 -0
  1582. data/tests/openvz/models/compute/server_tests.rb +56 -0
  1583. data/tests/openvz/models/compute/servers_tests.rb +35 -0
  1584. data/tests/ovirt/requests/compute/list_quotas_tests.rb +12 -0
  1585. data/tests/rackspace/block_storage_tests.rb +114 -0
  1586. data/tests/rackspace/cdn_tests.rb +173 -0
  1587. data/tests/rackspace/compute_tests.rb +99 -0
  1588. data/tests/rackspace/compute_v2_tests.rb +113 -0
  1589. data/tests/rackspace/databases_tests.rb +110 -0
  1590. data/tests/rackspace/dns_tests.rb +105 -0
  1591. data/tests/rackspace/helper.rb +47 -1
  1592. data/tests/rackspace/identity_tests.rb +25 -0
  1593. data/tests/rackspace/load_balancer_tests.rb +111 -0
  1594. data/tests/rackspace/models/block_storage/snapshot_tests.rb +4 -6
  1595. data/tests/rackspace/models/block_storage/snapshots_tests.rb +1 -3
  1596. data/tests/rackspace/models/block_storage/volume_tests.rb +3 -5
  1597. data/tests/rackspace/models/block_storage/volume_types_tests.rb +1 -3
  1598. data/tests/rackspace/models/block_storage/volumes_tests.rb +1 -3
  1599. data/tests/rackspace/models/compute_v2/flavors_tests.rb +2 -5
  1600. data/tests/rackspace/models/compute_v2/image_tests.rb +57 -10
  1601. data/tests/rackspace/models/compute_v2/images_tests.rb +2 -4
  1602. data/tests/rackspace/models/compute_v2/keypairs_tests.rb +47 -0
  1603. data/tests/rackspace/models/compute_v2/metadata_tests.rb +44 -0
  1604. data/tests/rackspace/models/compute_v2/network_tests.rb +10 -0
  1605. data/tests/rackspace/models/compute_v2/networks_tests.rb +10 -0
  1606. data/tests/rackspace/models/compute_v2/server_tests.rb +152 -15
  1607. data/tests/rackspace/models/compute_v2/servers_tests.rb +9 -7
  1608. data/tests/rackspace/models/dns/zones_tests.rb +36 -0
  1609. data/tests/rackspace/models/identity/credentials_tests.rb +14 -5
  1610. data/tests/rackspace/models/identity/service_catalog_tests.rb +81 -0
  1611. data/tests/rackspace/models/load_balancers/load_balancer_tests.rb +2 -0
  1612. data/tests/rackspace/models/monitoring/agent_token_tests.rb +9 -0
  1613. data/tests/rackspace/models/monitoring/agent_tokens_tests.rb +9 -0
  1614. data/tests/rackspace/models/monitoring/alarm_example_tests.rb +18 -0
  1615. data/tests/rackspace/models/monitoring/alarm_examples_tests.rb +19 -0
  1616. data/tests/rackspace/models/monitoring/alarm_tests.rb +56 -0
  1617. data/tests/rackspace/models/monitoring/alarms_tests.rb +25 -0
  1618. data/tests/rackspace/models/monitoring/check_tests.rb +50 -0
  1619. data/tests/rackspace/models/monitoring/check_types_tests.rb +14 -0
  1620. data/tests/rackspace/models/monitoring/checks_tests.rb +16 -0
  1621. data/tests/rackspace/models/monitoring/data_points_tests.rb +19 -0
  1622. data/tests/rackspace/models/monitoring/entities_tests.rb +14 -0
  1623. data/tests/rackspace/models/monitoring/entity_tests.rb +26 -0
  1624. data/tests/rackspace/models/monitoring/metric_tests.rb +19 -0
  1625. data/tests/rackspace/models/monitoring/metrics_tests.rb +17 -0
  1626. data/tests/rackspace/models/storage/account_tests.rb +28 -0
  1627. data/tests/rackspace/models/storage/directories_tests.rb +29 -0
  1628. data/tests/rackspace/models/storage/directory_tests.rb +141 -0
  1629. data/tests/rackspace/models/storage/file_tests.rb +146 -16
  1630. data/tests/rackspace/models/storage/metadata_tests.rb +174 -0
  1631. data/tests/rackspace/monitoring_tests.rb +72 -0
  1632. data/tests/rackspace/rackspace_tests.rb +56 -0
  1633. data/tests/rackspace/requests/block_storage/snapshot_tests.rb +14 -15
  1634. data/tests/rackspace/requests/block_storage/volume_tests.rb +9 -11
  1635. data/tests/rackspace/requests/block_storage/volume_type_tests.rb +6 -16
  1636. data/tests/rackspace/requests/cdn/cdn_tests.rb +76 -0
  1637. data/tests/rackspace/requests/compute/image_tests.rb +3 -3
  1638. data/tests/rackspace/requests/compute_v2/address_tests.rb +1 -1
  1639. data/tests/rackspace/requests/compute_v2/attachment_tests.rb +19 -20
  1640. data/tests/rackspace/requests/compute_v2/flavor_tests.rb +8 -10
  1641. data/tests/rackspace/requests/compute_v2/image_tests.rb +19 -21
  1642. data/tests/rackspace/requests/compute_v2/keypair_tests.rb +55 -0
  1643. data/tests/rackspace/requests/compute_v2/metadata_tests.rb +104 -0
  1644. data/tests/rackspace/requests/compute_v2/network_tests.rb +49 -0
  1645. data/tests/rackspace/requests/compute_v2/server_tests.rb +55 -58
  1646. data/tests/rackspace/requests/databases/database_tests.rb +23 -20
  1647. data/tests/rackspace/requests/databases/user_tests.rb +6 -6
  1648. data/tests/rackspace/requests/dns/dns_tests.rb +1 -1
  1649. data/tests/rackspace/requests/dns/records_tests.rb +3 -3
  1650. data/tests/rackspace/requests/identity/token_tests.rb +9 -0
  1651. data/tests/rackspace/requests/identity/user_tests.rb +4 -5
  1652. data/tests/rackspace/requests/load_balancers/helper.rb +2 -0
  1653. data/tests/rackspace/requests/load_balancers/load_balancer_tests.rb +2 -1
  1654. data/tests/rackspace/requests/load_balancers/usage_tests.rb +4 -2
  1655. data/tests/rackspace/requests/monitoring/agent_tests.rb +34 -0
  1656. data/tests/rackspace/requests/monitoring/alarm_example_tests.rb +30 -0
  1657. data/tests/rackspace/requests/monitoring/alarm_tests.rb +56 -0
  1658. data/tests/rackspace/requests/monitoring/check_tests.rb +40 -0
  1659. data/tests/rackspace/requests/monitoring/entity_tests.rb +37 -0
  1660. data/tests/rackspace/requests/monitoring/helper.rb +78 -0
  1661. data/tests/rackspace/requests/monitoring/list_tests.rb +60 -0
  1662. data/tests/rackspace/requests/storage/container_tests.rb +8 -1
  1663. data/tests/rackspace/requests/storage/large_object_tests.rb +326 -18
  1664. data/tests/rackspace/requests/storage/object_tests.rb +89 -4
  1665. data/tests/rackspace/service_tests.rb +83 -0
  1666. data/tests/rackspace/storage_tests.rb +116 -0
  1667. data/tests/riakcs/requests/provisioning/provisioning_tests.rb +174 -0
  1668. data/tests/riakcs/requests/usage/usage_tests.rb +29 -0
  1669. data/tests/storage/helper.rb +3 -0
  1670. data/tests/vcloud/requests/compute/disk_configure_tests.rb +7 -2
  1671. data/tests/vsphere/models/compute/server_tests.rb +1 -1
  1672. data/tests/vsphere/requests/compute/list_virtual_machines_tests.rb +2 -2
  1673. data/tests/vsphere/requests/compute/vm_clone_tests.rb +21 -5
  1674. data/tests/xenserver/compute_tests.rb +5 -5
  1675. data/tests/xenserver/models/compute/console_test.rb +35 -0
  1676. data/tests/xenserver/models/compute/consoles_test.rb +19 -0
  1677. data/tests/xenserver/models/compute/host_cpu_tests.rb +58 -0
  1678. data/tests/xenserver/models/compute/host_metrics_tests.rb +1 -1
  1679. data/tests/xenserver/models/compute/host_tests.rb +13 -1
  1680. data/tests/xenserver/models/compute/network_tests.rb +18 -6
  1681. data/tests/xenserver/models/compute/server_tests.rb +35 -18
  1682. data/tests/xenserver/models/compute/servers_tests.rb +1 -0
  1683. data/tests/xenserver/models/compute/vlan_tests.rb +76 -0
  1684. data/tests/xenserver/models/compute/vlans_tests.rb +36 -0
  1685. data/tests/xenserver/requests/compute/create_network_tests.rb +20 -0
  1686. data/tests/xenserver/requests/compute/create_vlan_tests.rb +36 -0
  1687. data/tests/xenserver/requests/compute/destroy_network_tests.rb +13 -0
  1688. data/tests/xenserver/requests/compute/destroy_vlan_tests.rb +36 -0
  1689. data/tests/zerigo/requests/dns/dns_tests.rb +59 -13
  1690. metadata +1211 -107
  1691. data/docs/storage/aws.markdown +0 -21
  1692. data/lib/fog/bin/virtual_box.rb +0 -57
  1693. data/lib/fog/openstack/README.identity.md +0 -69
  1694. data/lib/fog/providers.rb +0 -33
  1695. data/lib/fog/rackspace/requests/identity/get_credentials.rb +0 -15
  1696. data/lib/fog/storm_on_demand/models/compute/balancers.rb +0 -21
  1697. data/lib/fog/storm_on_demand/models/compute/private_ips.rb +0 -31
  1698. data/lib/fog/storm_on_demand/models/compute/stats.rb +0 -22
  1699. data/lib/fog/storm_on_demand/requests/compute/get_stats.rb +0 -16
  1700. data/lib/fog/virtual_box.rb +0 -11
  1701. data/lib/fog/virtual_box/compute.rb +0 -59
  1702. data/lib/fog/virtual_box/models/compute/medium.rb +0 -87
  1703. data/lib/fog/virtual_box/models/compute/medium_format.rb +0 -34
  1704. data/lib/fog/virtual_box/models/compute/mediums.rb +0 -32
  1705. data/lib/fog/virtual_box/models/compute/nat_engine.rb +0 -65
  1706. data/lib/fog/virtual_box/models/compute/nat_redirect.rb +0 -91
  1707. data/lib/fog/virtual_box/models/compute/nat_redirects.rb +0 -41
  1708. data/lib/fog/virtual_box/models/compute/network_adapter.rb +0 -82
  1709. data/lib/fog/virtual_box/models/compute/network_adapters.rb +0 -42
  1710. data/lib/fog/virtual_box/models/compute/server.rb +0 -199
  1711. data/lib/fog/virtual_box/models/compute/servers.rb +0 -41
  1712. data/lib/fog/virtual_box/models/compute/storage_controller.rb +0 -83
  1713. data/lib/fog/virtual_box/models/compute/storage_controllers.rb +0 -38
@@ -0,0 +1,417 @@
1
+ #Cloud Block Storage (BlockStorage)
2
+
3
+ This document explains how to get started using Cloud Block Storage with Fog. It assumes you have read the [Getting Started with Fog and the Rackspace Open Cloud](getting_started.md) document.
4
+
5
+ ## Starting irb console
6
+ Start by executing the following command:
7
+
8
+ irb
9
+
10
+ Once `irb` has launched you need to require the Fog library.
11
+
12
+ If using Ruby 1.8.x execute:
13
+
14
+ require 'rubygems'
15
+ require 'fog'
16
+
17
+ If using Ruby 1.9.x execute:
18
+
19
+ require 'fog'
20
+
21
+ ## Create Service
22
+
23
+ Next, create a connection to Cloud Block Storage:
24
+
25
+ Using a US-based account:
26
+
27
+ service = Fog::Rackspace::BlockStorage.new({
28
+ :rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username
29
+ :rackspace_api_key => RACKSPACE_API, # Your Rackspace API key
30
+ :rackspace_region => :ord, # Defaults to :dfw
31
+ :connection_options => {} # Optional
32
+ })
33
+
34
+ Using a UK-based account:
35
+
36
+ service = Fog::Rackspace::BlockStorage.new({
37
+ :rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username
38
+ :rackspace_api_key => RACKSPACE_API, # Your Rackspace API key
39
+ :rackspace_auth_url => Fog::Rackspace::UK_AUTH_ENDPOINT,
40
+ :rackspace_region => :lon,
41
+ :connection_options => {} # Optional
42
+ })
43
+
44
+ To learn more about obtaining cloud credentials refer to the [Getting Started with Fog and the Rackspace Open Cloud](getting_started.md) document.
45
+
46
+ By default `Fog::Rackspace::BlockStorage` will authenticate against the US authentication endpoint and connect to the DFW region. You can specify alternative authentication endpoints using the key `:rackspace_auth_url`. Please refer to [Alternate Authentication Endpoints](http://docs.rackspace.com/auth/api/v2.0/auth-client-devguide/content/Endpoints-d1e180.html) for a list of alternative Rackspace authentication endpoints.
47
+
48
+ Alternative regions are specified using the key `:rackspace_region `. A list of regions available for Cloud Block Storage can be found by executing the following:
49
+
50
+ identity_service = Fog::Identity({
51
+ :provider => 'Rackspace', # Rackspace Fog provider
52
+ :rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username
53
+ :rackspace_api_key => RACKSPACE_API, # Your Rackspace API key
54
+ :rackspace_auth_url => Fog::Rackspace::UK_AUTH_ENDPOINT # Not specified for US Cloud
55
+ })
56
+
57
+ identity_service.service_catalog.display_service_regions :cloudBlockStorage
58
+
59
+ Rackspace Private Cloud installations can skip specifying a region and directly specify their custom service endpoints using the key `:rackspace_block_storage_url`.
60
+
61
+ **Note**: A`Fog::Rackspace::BlockStorage` instance is needed for the desired region.
62
+
63
+ ### Optional Connection Parameters
64
+
65
+ Fog supports passing additional connection parameters to its underlying HTTP library (Excon) using the `:connection_options` parameter.
66
+
67
+ <table>
68
+ <tr>
69
+ <th>Key</th>
70
+ <th>Description</th>
71
+ </tr>
72
+ <tr>
73
+ <td>:connect_timeout</td>
74
+ <td>Connection timeout (default: 60 seconds)</td>
75
+ </tr>
76
+ <tr>
77
+ <td>:read_timeout</td>
78
+ <td>Read timeout for connection (default: 60 seconds)</td> </tr>
79
+ <tr>
80
+ <td>:write_timeout</td>
81
+ <td>Write timeout for connection (default: 60 seconds)</td>
82
+ </tr>
83
+ <tr>
84
+ <td>:proxy</td>
85
+ <td>Proxy for HTTP and HTTPS connections</td>
86
+ </tr>
87
+ <tr>
88
+ <td>:ssl_ca_path</td>
89
+ <td>Path to SSL certificate authorities</td>
90
+ </tr>
91
+ <tr>
92
+ <td>:ssl_ca_file</td>
93
+ <td>SSL certificate authority file</td>
94
+ </tr>
95
+ <tr>
96
+ <td>:ssl_verify_peer</td>
97
+ <td>SSL verify peer (default: true)</td>
98
+ </tr>
99
+ </table>
100
+
101
+
102
+ ## Fog Abstractions
103
+
104
+ Fog provides both a **model** and **request** abstraction. The request abstraction provides the most efficient interface and the model abstraction wraps the request abstraction to provide a convenient `ActiveModel` like interface.
105
+
106
+ ### Request Layer
107
+
108
+ The request abstraction maps directly to the [Cloud Block Storage API](http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/overview.html). It provides the most efficient interface to the Rackspace Open Cloud.
109
+
110
+ To see a list of requests supported by the service:
111
+
112
+ service.requests
113
+
114
+ This returns:
115
+
116
+ :create_volume, :delete_volume, :get_volume, :list_volumes, :get_volume_type, :list_volume_types, :create_snapshot, :delete_snapshot, :get_snapshot, :list_snapshots
117
+
118
+
119
+ #### Example Request
120
+
121
+ To request a list of volume types:
122
+
123
+ response = service.list_volume_types
124
+
125
+ This returns in the following `Excon::Response`:
126
+
127
+ <Excon::Response:0x10a708fb8 @remote_ip="72.32.164.210", @body="{\"volume_types\": [{\"extra_specs\": {}, \"name\": \"SATA\", \"id\": 1}, {\"extra_specs\": {}, \"name\": \"SSD\", \"id\": 2}]}", @status=200, @headers={"Date"=>"Mon, 18 Mar 2013 20:26:03 GMT", "Content-Length"=>"109", "Content-Type"=>"application/json", "X-Compute-Request-Id"=>"req-9c2093d4-8a41-4d8b-a069-114470d1a0dd"}, @data={:status=>200, :headers=>{"Date"=>"Mon, 18 Mar 2013 20:26:03 GMT", "Content-Length"=>"109", "Content-Type"=>"application/json", "X-Compute-Request-Id"=>"req-9c2093d4-8a41-4d8b-a069-114470d1a0dd"}, :remote_ip=>"72.32.164.210", :body=>{"volume_types"=>[{"name"=>"SATA", "id"=>1, "extra_specs"=>{}}, {"name"=>"SSD", "id"=>2, "extra_specs"=>{}}]}}>
128
+
129
+ To view the status of the response:
130
+
131
+ response.status
132
+
133
+ **Note**: Fog is aware of valid HTTP response statuses for each request type. If an unexpected HTTP response status occurs, Fog will raise an exception.
134
+
135
+ To view response body:
136
+
137
+ response.body
138
+
139
+ This will return:
140
+
141
+ {"volume_types"=>[{"name"=>"SATA", "id"=>1, "extra_specs"=>{}}, {"name"=>"SSD", "id"=>2, "extra_specs"=>{}}]}
142
+
143
+
144
+ To learn more about Cloud Block Storage request methods refer to [rdoc](http://rubydoc.info/gems/fog/Fog/Rackspace/BlockStorage/Real). To learn more about Excon refer to [Excon GitHub repo](https://github.com/geemus/excon).
145
+
146
+ ### Model Layer
147
+
148
+ Fog models behave in a manner similar to `ActiveModel`. Models will generally respond to `create`, `save`, `persisted?`, `destroy`, `reload` and `attributes` methods. Additionally, fog will automatically create attribute accessors.
149
+
150
+ Here is a summary of common model methods:
151
+
152
+ <table>
153
+ <tr>
154
+ <th>Method</th>
155
+ <th>Description</th>
156
+ </tr>
157
+ <tr>
158
+ <td>create</td>
159
+ <td>
160
+ Accepts hash of attributes and creates object.<br>
161
+ Note: creation is a non-blocking call and you will be required to wait for a valid state before using resulting object.
162
+ </td>
163
+ </tr>
164
+ <tr>
165
+ <td>save</td>
166
+ <td>Saves object.<br>
167
+ Note: not all objects support updating object.</td>
168
+ </tr>
169
+ <tr>
170
+ <td>persisted?</td>
171
+ <td>Returns true if the object has been persisted.</td>
172
+ </tr>
173
+ <tr>
174
+ <td>destroy</td>
175
+ <td>
176
+ Destroys object.<br>
177
+ Note: this is a non-blocking call and object deletion might not be instantaneous.
178
+ </td>
179
+ <tr>
180
+ <td>reload</td>
181
+ <td>Updates object with latest state from service.</td>
182
+ <tr>
183
+ <td>ready?</td>
184
+ <td>Returns true if object is in a ready state and able to perform actions. This method will raise an exception if object is in an error state.</td>
185
+ </tr>
186
+ <tr>
187
+ <td>attributes</td>
188
+ <td>Returns a hash containing the list of model attributes and values.</td>
189
+ </tr>
190
+ <td>identity</td>
191
+ <td>
192
+ Returns the identity of the object.<br>
193
+ Note: This might not always be equal to object.id.
194
+ </td>
195
+ </tr>
196
+ <tr>
197
+ <td>wait_for</td>
198
+ <td>This method periodically reloads model and then yields to specified block until block returns true or a timeout occurs.</td>
199
+ </tr>
200
+ </table>
201
+
202
+ The remainder of this document details the model abstraction.
203
+
204
+
205
+ ## List Volume Types
206
+
207
+ To retrieve a list of volume types:
208
+
209
+ service.volume_types
210
+
211
+ This returns a collection of `Fog::Rackspace::BlockStorage::VolumeType` models:
212
+
213
+ <Fog::Rackspace::BlockStorage::VolumeTypes
214
+ [
215
+ <Fog::Rackspace::BlockStorage::VolumeType
216
+ id=1,
217
+ name="SATA",
218
+ extra_specs={}
219
+ >,
220
+ <Fog::Rackspace::BlockStorage::VolumeType
221
+ id=2,
222
+ name="SSD",
223
+ extra_specs={}
224
+ >
225
+ ]
226
+ >
227
+
228
+ ## List Volumes
229
+
230
+ To retrieve a list of volumes:
231
+
232
+ service.volumes
233
+
234
+ This returns a collection of `Fog::Rackspace::BlockStorage::Volume` models:
235
+
236
+ <Fog::Rackspace::BlockStorage::Volumes
237
+ [
238
+ <Fog::Rackspace::BlockStorage::Volume
239
+ id="a53a532f-546c-4da3-8c2d-b26be1046630",
240
+ created_at="2013-03-19T14:19:16.000000",
241
+ state="available",
242
+ display_name="fog-ssd",
243
+ display_description=nil,
244
+ size=100,
245
+ attachments=[],
246
+ volume_type="SSD",
247
+ availability_zone="nova"
248
+ >,
249
+ <Fog::Rackspace::BlockStorage::Volume
250
+ id="e2359473-9933-483f-90df-deb4a9fb25ae",
251
+ created_at="2013-03-19T14:16:45.000000",
252
+ state="available",
253
+ display_name="fog-example",
254
+ display_description=nil,
255
+ size=100,
256
+ attachments=[],
257
+ volume_type="SATA",
258
+ availability_zone="nova"
259
+ >
260
+ ]
261
+ >
262
+
263
+ ## Get Volume
264
+
265
+ To retrieve an individual volume:
266
+
267
+ service.volume.get "fog-example"
268
+
269
+ This returns a `Fog::Rackspace::BlockStorage::Volume`:
270
+
271
+ <Fog::Rackspace::BlockStorage::Volume
272
+ id="e2359473-9933-483f-90df-deb4a9fb25ae",
273
+ created_at="2013-03-19T14:16:45.000000",
274
+ state="available",
275
+ display_name="fog-example",
276
+ display_description=nil,
277
+ size=100,
278
+ attachments=[],
279
+ volume_type="SATA",
280
+ availability_zone="nova"
281
+ >
282
+
283
+ ## Create Volume
284
+
285
+ To create a volume:
286
+
287
+ volume = service.volumes.create(:size => 100, :display_name => 'fog-ssd', :volume_type => 'SSD')
288
+
289
+ This will return a `Fog::Rackspace::BlockStorage::Volume`:
290
+
291
+ <Fog::Rackspace::BlockStorage::Volume
292
+ id="a53a532f-546c-4da3-8c2d-b26be1046630",
293
+ created_at="2013-03-19T14:19:16.000000",
294
+ state="available",
295
+ display_name="fog-ssd",
296
+ display_description=nil,
297
+ size=100,
298
+ attachments=[],
299
+ volume_type="SSD",
300
+ availability_zone="nova"
301
+ >
302
+
303
+ **Note**: The `:size` parameter is the only required parameter and is in gigabytes. Volumes must be a minimum of 100 GB.
304
+
305
+ ### Additional Parameters
306
+
307
+ The `create` method also supports the following key values:
308
+
309
+ <table>
310
+ <tr>
311
+ <th>Key</th>
312
+ <th>Description</th>
313
+ </tr>
314
+ <tr>
315
+ <td>:display_name</td>
316
+ <td>The name of the volume.</td>
317
+ </tr>
318
+ <tr>
319
+ <td>:display_description</td>
320
+ <td>A description of the volume.</td>
321
+ </tr>
322
+ <tr>
323
+ <td>:snapshot_id</td>
324
+ <td>The optional snapshot from which to create a volume.</td>
325
+ </tr>
326
+ <tr>
327
+ <td>:volume_type</td>
328
+ <td>The type of volume to create. Refer to <a href="#list-volume-types">List Volume Types</a> section for valid types. SATA is the default volume type.</td>
329
+ </tr>
330
+ </table>
331
+
332
+ ## Attach Volume
333
+
334
+ Please refer to the [Attach Volume](compute_v2.md#attach-volume) section in the [Next Generation Cloud Servers™ (compute_v2)](compute_v2.md) documentation.
335
+
336
+ ## Detach Volume
337
+
338
+ Please refer to the [Detach Volume](compute_v2.md#detach-volume) section in the [Next Generation Cloud Servers™ (compute_v2)](compute_v2.md) documentation.
339
+
340
+
341
+ ## Delete Volume
342
+
343
+ To delete a volume:
344
+
345
+ volume.destroy
346
+
347
+ **Note**: You cannot delete a volume until all of its dependent snapshots have been deleted.
348
+
349
+ ## List Snapshots
350
+
351
+ To retrieve a list of snapshots:
352
+
353
+ service.snapshots
354
+
355
+ To retrieve a list of snapshots for a given volume:
356
+
357
+ volume.snapshots
358
+
359
+ ## Create Snapshot
360
+
361
+ A snapshot is a point-in-time copy of a volume. Each subsequent snapshot will be the difference between the previous snapshot and the current volume.
362
+
363
+ To create a snapshot of a given volume:
364
+
365
+ volume.create_snapshot :display_name => 'initial-snapshot'
366
+
367
+ **Note**: All writes to the volume should be flushed before creating the snapshot, either by unmounting any file systems on the volume or by detaching the volume.
368
+
369
+ ### Additional Parameters
370
+
371
+ The `create_snapshot` method also supports the following key values:
372
+
373
+ <table>
374
+ <tr>
375
+ <th>Key</th>
376
+ <th>Description</th>
377
+ </tr>
378
+ <tr>
379
+ <td>:display_name</td>
380
+ <td>The name of the snapshot.</td>
381
+ </tr>
382
+ <tr>
383
+ <td>:display_description</td>
384
+ <td>A description of the snapshot.</td>
385
+ </tr>
386
+ <tr>
387
+ <td>:force</td>
388
+ <td>If set to true, snapshot will be taken even if volume is still mounted.</td>
389
+ </tr>
390
+ </table>
391
+
392
+
393
+
394
+ ## Delete Snapshot
395
+
396
+ To delete a snapshot:
397
+
398
+ snapshot.destroy
399
+
400
+ ## Examples
401
+
402
+ Example code using Cloud Block Storage can be found [here](https://github.com/fog/fog/tree/master/lib/fog/rackspace/examples).
403
+
404
+ ## Additional Resources
405
+
406
+ * [fog.io](http://fog.io/)
407
+ * [Fog rdoc](http://rubydoc.info/gems/fog/)
408
+ * [Fog Github repo](https://github.com/fog/fog)
409
+ * [Fog Github Issues](https://github.com/fog/fog/issues)
410
+ * [Excon Github repo](https://github.com/geemus/excon)
411
+ * [Cloud Block Storage API](http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/index.html)
412
+
413
+ ## Support and Feedback
414
+
415
+ Your feedback is appreciated! If you have specific issues with the **fog** SDK, you should file an [issue via Github](https://github.com/fog/fog/issues).
416
+
417
+ For general feedback and support requests, send an email to: <sdk-support@rackspace.com>.
@@ -0,0 +1,722 @@
1
+ #Next Generation Cloud Servers™ (compute_v2)
2
+
3
+ This document explains how to get started using Next Generation Cloud Servers with Fog. It assumes you have read the [Getting Started with Fog and the Rackspace Open Cloud](getting_started.md) document.
4
+
5
+ **Note**: Fog also provides an interface to First Gen Cloud Servers™ (compute). The compute interface is deprecated and should only be used if you need to interact with our first generation cloud. Fog determines the appropriate interface based on the `:version` parameter. See [Create Service](#create-service) section for more information.
6
+
7
+ ## Starting irb console
8
+
9
+ Start by executing the following command:
10
+
11
+ irb
12
+
13
+ Once `irb` has launched you need to require the Fog library.
14
+
15
+ If using Ruby 1.8.x execute:
16
+
17
+ require 'rubygems'
18
+ require 'fog'
19
+
20
+ If using Ruby 1.9.x execute:
21
+
22
+ require 'fog'
23
+
24
+ ## Create Service
25
+
26
+ Next, create a connection to the Next Gen Cloud Servers:
27
+
28
+ Using a US-based account:
29
+
30
+ service = Fog::Compute.new({
31
+ :provider => 'Rackspace', # Rackspace Fog provider
32
+ :rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username
33
+ :rackspace_api_key => RACKSPACE_API, # Your Rackspace API key
34
+ :version => :v2, # Use Next Gen Cloud Servers
35
+ :rackspace_region => :ord, # Defaults to :dfw
36
+ :connection_options => {} # Optional
37
+ })
38
+
39
+ Using a UK-based account:
40
+
41
+ service = Fog::Compute.new({
42
+ :provider => 'Rackspace', # Rackspace Fog provider
43
+ :rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username
44
+ :rackspace_api_key => RACKSPACE_API, # Your Rackspace API key
45
+ :version => :v2, # Use Next Gen Cloud Servers
46
+ :rackspace_auth_url => Fog::Rackspace::UK_AUTH_ENDPOINT,
47
+ :rackspace_region => :lon,
48
+ :connection_options => {} # Optional
49
+ })
50
+
51
+ To learn more about obtaining cloud credentials refer to the [Getting Started with Fog and the Rackspace Open Cloud](getting_started.md) document.
52
+
53
+ By default `Fog::Compute` will authenticate against the US authentication endpoint and connect to the DFW region. You can specify alternative authentication endpoints using the key `:rackspace_auth_url`. Please refer to [Alternate Authentication Endpoints](http://docs.rackspace.com/auth/api/v2.0/auth-client-devguide/content/Endpoints-d1e180.html) for a list of alternative Rackspace authentication endpoints.
54
+
55
+ Alternative regions are specified using the key `:rackspace_region `. A list of regions available for Cloud Servers can be found by executing the following:
56
+
57
+ identity_service = Fog::Identity({
58
+ :provider => 'Rackspace', # Rackspace Fog provider
59
+ :rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username
60
+ :rackspace_api_key => RACKSPACE_API, # Your Rackspace API key
61
+ :rackspace_auth_url => Fog::Rackspace::UK_AUTH_ENDPOINT # Not specified for US Cloud
62
+ })
63
+
64
+ identity_service.service_catalog.display_service_regions :cloudServersOpenStack
65
+
66
+ Rackspace Private Cloud installations can skip specifying a region and directly specify their custom service endpoints using the key `:rackspace_compute_url`.
67
+
68
+ **Note**: A`Fog::Compute` instance is needed for the desired region.
69
+
70
+ ### Optional Connection Parameters
71
+
72
+ Fog supports passing additional connection parameters to its underlying HTTP library (Excon) using the `:connection_options` parameter.
73
+
74
+ <table>
75
+ <tr>
76
+ <th>Key</th>
77
+ <th>Description</th>
78
+ </tr>
79
+ <tr>
80
+ <td>:connect_timeout</td>
81
+ <td>Connection timeout (default: 60 seconds)</td>
82
+ </tr>
83
+ <tr>
84
+ <td>:read_timeout</td>
85
+ <td>Read timeout for connection (default: 60 seconds)</td> </tr>
86
+ <tr>
87
+ <td>:write_timeout</td>
88
+ <td>Write timeout for connection (default: 60 seconds)</td>
89
+ </tr>
90
+ <tr>
91
+ <td>:proxy</td>
92
+ <td>Proxy for HTTP and HTTPS connections</td>
93
+ </tr>
94
+ <tr>
95
+ <td>:ssl_ca_path</td>
96
+ <td>Path to SSL certificate authorities</td>
97
+ </tr>
98
+ <tr>
99
+ <td>:ssl_ca_file</td>
100
+ <td>SSL certificate authority file</td>
101
+ </tr>
102
+ <tr>
103
+ <td>:ssl_verify_peer</td>
104
+ <td>SSL verify peer (default: true)</td>
105
+ </tr>
106
+ </table>
107
+
108
+
109
+ ## Fog Abstractions
110
+
111
+ Fog provides both a **model** and **request** abstraction. The request abstraction provides the most efficient interface and the model abstraction wraps the request abstraction to provide a convenient `ActiveModel` like interface.
112
+
113
+ ### Request Layer
114
+
115
+ The request abstraction maps directly to the [Next Gen Cloud Servers API](http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ch_preface.html). It provides the most efficient interface to the Rackspace Open Cloud.
116
+
117
+ To see a list of requests supported by the service:
118
+
119
+ service.requests
120
+
121
+ This returns:
122
+
123
+ :list_servers, :get_server, :create_server, :update_server, :delete_server, :change_server_password, :reboot_server, :rebuild_server, :resize_server, :confirm_resize_server, :revert_resize_server, :list_images, :get_image, :list_flavors, :get_flavor, :attach_volume, :get_attachment, :list_attachments, :delete_attachment
124
+
125
+
126
+ #### Example Request
127
+
128
+ To request a list of flavors:
129
+
130
+ response = service.list_flavors
131
+
132
+ This returns in the following `Excon::Response`:
133
+
134
+ <Excon::Response:0x007fe4b2ea2f38 @body={"flavors"=>[{"id"=>"2", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/2", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/2", "rel"=>"bookmark"}], "name"=>"512MB Standard Instance"}, {"id"=>"3", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/3", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/3", "rel"=>"bookmark"}], "name"=>"1GB Standard Instance"}, {"id"=>"4", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/4", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/4", "rel"=>"bookmark"}], "name"=>"2GB Standard Instance"}, {"id"=>"5", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/5", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/5", "rel"=>"bookmark"}], "name"=>"4GB Standard Instance"}, {"id"=>"6", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/6", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/6", "rel"=>"bookmark"}], "name"=>"8GB Standard Instance"}, {"id"=>"7", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/7", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/7", "rel"=>"bookmark"}], "name"=>"15GB Standard Instance"}, {"id"=>"8", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/8", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/8", "rel"=>"bookmark"}], "name"=>"30GB Standard Instance"}]}, @headers={"Date"=>"Mon, 21 Jan 2013 16:14:45 GMT", "Content-Length"=>"1697", "Content-Type"=>"application/json", "X-Compute-Request-Id"=>"req-0a1e8532-19b3-4993-8b48-cf2d9efe078c", "Server"=>"Jetty(8.0.y.z-SNAPSHOT)"}, @status=200>
135
+
136
+ To view the status of the response:
137
+
138
+ response.status
139
+
140
+ **Note**: Fog is aware of valid HTTP response statuses for each request type. If an unexpected HTTP response status occurs, Fog will raise an exception.
141
+
142
+ To view response body:
143
+
144
+ response.body
145
+
146
+ This will return:
147
+
148
+ {"flavors"=>[{"id"=>"2", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/2", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/2", "rel"=>"bookmark"}], "name"=>"512MB Standard Instance"}, {"id"=>"3", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/3", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/3", "rel"=>"bookmark"}], "name"=>"1GB Standard Instance"}, {"id"=>"4", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/4", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/4", "rel"=>"bookmark"}], "name"=>"2GB Standard Instance"}, {"id"=>"5", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/5", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/5", "rel"=>"bookmark"}], "name"=>"4GB Standard Instance"}, {"id"=>"6", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/6", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/6", "rel"=>"bookmark"}], "name"=>"8GB Standard Instance"}, {"id"=>"7", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/7", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/7", "rel"=>"bookmark"}], "name"=>"15GB Standard Instance"}, {"id"=>"8", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/8", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/8", "rel"=>"bookmark"}], "name"=>"30GB Standard Instance"}]}
149
+
150
+
151
+ To learn more about Compute request methods refer to [rdoc](http://rubydoc.info/gems/fog/Fog/Compute/Rackspace/Real). To learn more about Excon refer to [Excon GitHub repo](https://github.com/geemus/excon).
152
+
153
+ ### Model Layer
154
+
155
+ Fog models behave in a manner similar to `ActiveModel`. Models will generally respond to `create`, `save`, `persisted?`, `destroy`, `reload` and `attributes` methods. Additionally, fog will automatically create attribute accessors.
156
+
157
+ Here is a summary of common model methods:
158
+
159
+ <table>
160
+ <tr>
161
+ <th>Method</th>
162
+ <th>Description</th>
163
+ </tr>
164
+ <tr>
165
+ <td>create</td>
166
+ <td>
167
+ Accepts hash of attributes and creates object.<br>
168
+ Note: creation is a non-blocking call and you will be required to wait for a valid state before using resulting object.
169
+ </td>
170
+ </tr>
171
+ <tr>
172
+ <td>save</td>
173
+ <td>Saves object.<br>
174
+ Note: not all objects support updating object.</td>
175
+ </tr>
176
+ <tr>
177
+ <td>persisted?</td>
178
+ <td>Returns true if the object has been persisted.</td>
179
+ </tr>
180
+ <tr>
181
+ <td>destroy</td>
182
+ <td>
183
+ Destroys object.<br>
184
+ Note: this is a non-blocking call and object deletion might not be instantaneous.
185
+ </td>
186
+ <tr>
187
+ <td>reload</td>
188
+ <td>Updates object with latest state from service.</td>
189
+ <tr>
190
+ <td>ready?</td>
191
+ <td>Returns true if object is in a ready state and able to perform actions. This method will raise an exception if object is in an error state.</td>
192
+ </tr>
193
+ <tr>
194
+ <td>attributes</td>
195
+ <td>Returns a hash containing the list of model attributes and values.</td>
196
+ </tr>
197
+ <td>identity</td>
198
+ <td>
199
+ Returns the identity of the object.<br>
200
+ Note: This might not always be equal to object.id.
201
+ </td>
202
+ </tr>
203
+ <tr>
204
+ <td>wait_for</td>
205
+ <td>This method periodically reloads model and then yields to specified block until block returns true or a timeout occurs.</td>
206
+ </tr>
207
+ </table>
208
+
209
+ The remainder of this document details the model abstraction.
210
+
211
+ ## List Images
212
+
213
+ To retrieve a list of available images:
214
+
215
+ service.images
216
+
217
+ This returns a collection of `Fog::Compute::RackspaceV2::Image` models:
218
+
219
+ <Fog::Compute::RackspaceV2::Images
220
+ [
221
+ <Fog::Compute::RackspaceV2::Image
222
+ id="8a3a9f96-b997-46fd-b7a8-a9e740796ffd",
223
+ name="Ubuntu 12.10 (Quantal Quetzal)",
224
+ created=nil,
225
+ updated=nil,
226
+ state=nil,
227
+ user_id=nil,
228
+ tenant_id=nil,
229
+ progress=nil,
230
+ minDisk=nil,
231
+ minRam=nil,
232
+ metadata=nil,
233
+ disk_config=nil,
234
+ links=[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/images/8a3a9f96-b997-46fd-b7a8-a9e740796ffd", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/images/8a3a9f96-b997-46fd-b7a8-a9e740796ffd", "rel"=>"bookmark"}, {"href"=>"https://ord.images.api.rackspacecloud.com/772045/images/8a3a9f96-b997-46fd-b7a8-a9e740796ffd", "type"=>"application/vnd.openstack.image", "rel"=>"alternate"}]
235
+ >,
236
+ <Fog::Compute::RackspaceV2::Image
237
+ id="992ba82c-083b-4eed-9c26-c54473686466",
238
+ name="Windows Server 2012 + SharePoint Foundation 2013 with SQL Server 2012 Standard",
239
+ created=nil,
240
+ updated=nil,
241
+ state=nil,
242
+ user_id=nil,
243
+ tenant_id=nil,
244
+ progress=nil,
245
+ minDisk=nil,
246
+ minRam=nil,
247
+ metadata=nil,
248
+ disk_config=nil,
249
+ links=[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/images/992ba82c-083b-4eed-9c26-c54473686466", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/images/992ba82c-083b-4eed-9c26-c54473686466", "rel"=>"bookmark"}, {"href"=>"https://ord.images.api.rackspacecloud.com/772045/images/992ba82c-083b-4eed-9c26-c54473686466", "type"=>"application/vnd.openstack.image", "rel"=>"alternate"}]
250
+ >,
251
+
252
+
253
+ **Note**: In order to speed up access `service.images` does not retrieve all attribute values. To retrieve additional details you will either need to `reload` each individual image or use the request abstraction.
254
+
255
+ ## Get Image
256
+
257
+ To retrieve individual image:
258
+
259
+ service.images.get "8a3a9f96-b997-46fd-b7a8-a9e740796ffd"
260
+
261
+ This returns an `Fog::Compute::RackspaceV2::Image` instance:
262
+
263
+ <Fog::Compute::RackspaceV2::Image
264
+ id="8a3a9f96-b997-46fd-b7a8-a9e740796ffd",
265
+ name="Ubuntu 12.10 (Quantal Quetzal)",
266
+ created="2012-11-27T15:27:08Z",
267
+ updated="2012-11-28T14:35:21Z",
268
+ state="ACTIVE",
269
+ user_id=nil,
270
+ tenant_id=nil,
271
+ progress=100,
272
+ minDisk=10,
273
+ minRam=512,
274
+ metadata={"os_distro"=>"ubuntu", "com.rackspace__1__visible_core"=>"1", "com.rackspace__1__build_rackconnect"=>"1", "auto_disk_config"=>"True", "com.rackspace__1__options"=>"0", "image_type"=>"base", "org.openstack__1__os_version"=>"12.10", "os_version"=>"12.10", "rax_options"=>"0", "com.rackspace__1__visible_rackconnect"=>"1", "org.openstack__1__os_distro"=>"org.ubuntu", "com.rackspace__1__visible_managed"=>"1", "com.rackspace__1__build_core"=>"1", "arch"=>"x86-64", "os_type"=>"linux", "org.openstack__1__architecture"=>"x64", "com.rackspace__1__build_managed"=>"1"},
275
+ disk_config="AUTO",
276
+ links=[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/images/8a3a9f96-b997-46fd-b7a8-a9e740796ffd", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/images/8a3a9f96-b997-46fd-b7a8-a9e740796ffd", "rel"=>"bookmark"}, {"href"=>"https://ord.images.api.rackspacecloud.com/772045/images/8a3a9f96-b997-46fd-b7a8-a9e740796ffd", "type"=>"application/vnd.openstack.image", "rel"=>"alternate"}]
277
+ >
278
+
279
+ **Note**: This request populates all Image attributes.
280
+
281
+ ## List Flavors
282
+
283
+ To retrieve a list of available flavors:
284
+
285
+ service.images
286
+
287
+ This returns a collection of `Fog::Compute::RackspaceV2::Flavor` models:
288
+
289
+ <Fog::Compute::RackspaceV2::Flavors
290
+ [
291
+ <Fog::Compute::RackspaceV2::Flavor
292
+ id="2",
293
+ name="512MB Standard Instance",
294
+ ram=nil,
295
+ disk=nil,
296
+ vcpus=nil,
297
+ links=[{"href"=>"https://dfw.servers.api.rackspacecloud.com/v2/772045/flavors/2", "rel"=>"self"}, {"href"=>"https://dfw.servers.api.rackspacecloud.com/772045/flavors/2", "rel"=>"bookmark"}]
298
+ >,
299
+ <Fog::Compute::RackspaceV2::Flavor
300
+ id="3",
301
+ name="1GB Standard Instance",
302
+ ram=nil,
303
+ disk=nil,
304
+ vcpus=nil,
305
+ links=[{"href"=>"https://dfw.servers.api.rackspacecloud.com/v2/772045/flavors/3", "rel"=>"self"}, {"href"=>"https://dfw.servers.api.rackspacecloud.com/772045/flavors/3", "rel"=>"bookmark"}]
306
+ >,
307
+
308
+
309
+ **Note**: In order to speed up access `service.flavors` does not retrieve all attribute values. To retrieve additional details you will either need to `reload` each individual flavor or use the request abstraction.
310
+
311
+
312
+ ## Get Flavor
313
+
314
+ To retrieve individual flavor:
315
+
316
+ service.flavor.get 2
317
+
318
+ This returns a `Fog::Compute::RackspaceV2::Flavor` instance:
319
+
320
+ <Fog::Compute::RackspaceV2::Flavor
321
+ id="2",
322
+ name="512MB Standard Instance",
323
+ ram=512,
324
+ disk=20,
325
+ vcpus=1,
326
+ links=[{"href"=>"https://dfw.servers.api.rackspacecloud.com/v2/772045/flavors/2", "rel"=>"self"}, {"href"=>"https://dfw.servers.api.rackspacecloud.com/772045/flavors/2", "rel"=>"bookmark"}]
327
+ >
328
+
329
+ **Note**: This request populates all Flavor attributes.
330
+
331
+
332
+ ## List Servers
333
+
334
+ To retrieve a list of available servers:
335
+
336
+ service.servers
337
+
338
+ This returns a collection of `Fog::Compute::RackspaceV2::Servers` models:
339
+
340
+ <Fog::Compute::RackspaceV2::Servers
341
+ [
342
+ <Fog::Compute::RackspaceV2::Server
343
+ id="6a273531-8ee4-4bef-ad1a-baca963f8bbb",
344
+ name="rax-example",
345
+ created="2013-01-17T22:28:14Z",
346
+ updated="2013-01-17T22:31:19Z",
347
+ host_id="7361c18d94a9933039dae57ae07b0a39fdb39ea3775a25329086531f",
348
+ state="ACTIVE",
349
+ progress=100,
350
+ user_id="296063",
351
+ tenant_id="772045",
352
+ links=[{"href"=>"https://dfw.servers.api.rackspacecloud.com/v2/772045/servers/6a273531-8ee4-4bef-ad1a-baca963f8bbb", "rel"=>"self"}, {"href"=>"https://dfw.servers.api.rackspacecloud.com/772045/servers/6a273531-8ee4-4bef-ad1a-baca963f8bbb", "rel"=>"bookmark"}],
353
+ metadata={},
354
+ personality=nil,
355
+ ipv4_address="198.101.255.186",
356
+ ipv6_address="2001:4800:780e:0510:0fe1:75e8:ff04:c4a0",
357
+ disk_config="AUTO",
358
+ bandwidth=[],
359
+ addresses={"public"=>[{"version"=>4, "addr"=>"198.101.255.186"}, {"version"=>6, "addr"=>"2001:4800:780e:0510:0fe1:75e8:ff04:c4a0"}], "private"=>[{"version"=>4, "addr"=>"10.180.22.165"}]},
360
+ flavor_id="2",
361
+ image_id="33e21646-43ed-407e-9dbf-7c7873fccd9a"
362
+ >,
363
+
364
+
365
+ ## Get Server
366
+
367
+ To return an individual server:
368
+
369
+ service.servers.get "6a273531-8ee4-4bef-ad1a-baca963f8bbb"
370
+
371
+ This returns a `Fog::Compute::RackspaceV2::Server` instance:
372
+
373
+ <Fog::Compute::RackspaceV2::Servers
374
+ [
375
+ <Fog::Compute::RackspaceV2::Server
376
+ id="6a273531-8ee4-4bef-ad1a-baca963f8bbb",
377
+ name="rax-example",
378
+ created="2013-01-17T22:28:14Z",
379
+ updated="2013-01-17T22:31:19Z",
380
+ host_id="7361c18d94a9933039dae57ae07b0a39fdb39ea3775a25329086531f",
381
+ state="ACTIVE",
382
+ progress=100,
383
+ user_id="296063",
384
+ tenant_id="772045",
385
+ links=[{"href"=>"https://dfw.servers.api.rackspacecloud.com/v2/772045/servers/6a273531-8ee4-4bef-ad1a-baca963f8bbb", "rel"=>"self"}, {"href"=>"https://dfw.servers.api.rackspacecloud.com/772045/servers/6a273531-8ee4-4bef-ad1a-baca963f8bbb", "rel"=>"bookmark"}],
386
+ metadata={},
387
+ personality=nil,
388
+ ipv4_address="198.101.255.186",
389
+ ipv6_address="2001:4800:780e:0510:0fe1:75e8:ff04:c4a0",
390
+ disk_config="AUTO",
391
+ bandwidth=[],
392
+ addresses={"public"=>[{"version"=>4, "addr"=>"198.101.255.186"}, {"version"=>6, "addr"=>"2001:4800:780e:0510:0fe1:75e8:ff04:c4a0"}], "private"=>[{"version"=>4, "addr"=>"10.180.22.165"}]},
393
+ flavor_id="2",
394
+ image_id="33e21646-43ed-407e-9dbf-7c7873fccd9a"
395
+ >,
396
+ ...
397
+
398
+ ## Create Server
399
+
400
+ If you are interested in creating a server utilizing ssh key authenication, you are recommended to use [bootstrap](#bootstrap) method.
401
+
402
+ To create a server:
403
+
404
+ flavor = service.flavors.first
405
+ image = service.images.first
406
+ server = service.servers.create(:name => 'fog-doc', :flavor_id => flavor.id, :image_id => image.id)
407
+
408
+ **Note**: The `:name`, `:flavor_id`, and `image_id` attributes are required for server creation.
409
+
410
+ This will return a `Fog::Compute::RackspaceV2::Server` instance:
411
+
412
+ <Fog::Compute::RackspaceV2::Server
413
+ id="8ff308a6-e04a-4602-b991-ed526ab3b6be",
414
+ name="fog-server",
415
+ created=nil,
416
+ updated=nil,
417
+ host_id=nil,
418
+ state=nil,
419
+ progress=nil,
420
+ user_id=nil,
421
+ tenant_id=nil,
422
+ links=[{"href"=>"https://dfw.servers.api.rackspacecloud.com/v2/772045/servers/8ff308a6-e04a-4602-b991-ed526ab3b6be", "rel"=>"self"}, {"href"=>"https://dfw.servers.api.rackspacecloud.com/772045/servers/8ff308a6-e04a-4602-b991-ed526ab3b6be", "rel"=>"bookmark"}],
423
+ metadata=nil,
424
+ personality=nil,
425
+ ipv4_address=nil,
426
+ ipv6_address=nil,
427
+ disk_config="AUTO",
428
+ bandwidth=nil,
429
+ addresses=nil,
430
+ flavor_id=2,
431
+ image_id="3afe97b2-26dc-49c5-a2cc-a2fc8d80c001"
432
+ >
433
+
434
+ Notice that your server contains several `nil` attributes. To see the latest status, reload the instance as follows:
435
+
436
+ server.reload
437
+
438
+ You can see that the server is currently 17% built:
439
+
440
+ Fog::Compute::RackspaceV2::Server
441
+ id="8ff308a6-e04a-4602-b991-ed526ab3b6be",
442
+ name="fog-server",
443
+ created="2013-01-18T16:15:41Z",
444
+ updated="2013-01-18T16:16:14Z",
445
+ host_id="775837108e45aa3f2a58527c9c3b6160838078e83148f07906c933ca",
446
+ state="BUILD",
447
+ progress=17,
448
+ user_id="296063",
449
+ tenant_id="772045",
450
+ links=[{"href"=>"https://dfw.servers.api.rackspacecloud.com/v2/772045/servers/8ff308a6-e04a-4602-b991-ed526ab3b6be", "rel"=>"self"}, {"href"=>"https://dfw.servers.api.rackspacecloud.com/772045/servers/8ff308a6-e04a-4602-b991-ed526ab3b6be", "rel"=>"bookmark"}],
451
+ metadata={},
452
+ personality=nil,
453
+ ipv4_address="",
454
+ ipv6_address="",
455
+ disk_config="AUTO",
456
+ bandwidth=[],
457
+ addresses={"public"=>[{"version"=>4, "addr"=>"198.61.209.78"}, {"version"=>6, "addr"=>"2001:4800:7810:0512:0fe1:75e8:ff04:94e4"}], "private"=>[{"version"=>4, "addr"=>"10.181.13.198"}]},
458
+ flavor_id="2",
459
+ image_id="3afe97b2-26dc-49c5-a2cc-a2fc8d80c001"
460
+ >
461
+
462
+ You will be unable to perform any actions to this server until it reaches an `ACTIVE` state. Since this is true for most server actions, Fog provides the convenience method `wait_for`.
463
+
464
+ Fog can wait for the server to become ready as follows:
465
+
466
+ server.wait_for { ready? }
467
+
468
+ **Note**: The `Fog::Compute::RackspaceV2::Server` instance returned from the create method contains a `password` attribute. The `password` attribute will NOT be present in subsequent retrievals either through `service.servers` or `server.servers.get my_server_id`.
469
+
470
+ ### Additional Parameters
471
+
472
+ The `create` method also supports the following key values:
473
+
474
+ <table>
475
+ <tr>
476
+ <th>Key</th>
477
+ <th>Description</th>
478
+ </tr>
479
+ <tr>
480
+ <td>:disk_config</td>
481
+ <td>The disk configuration value (AUTO or MANUAL). Refer to Next Gen Server API documentation - <a href="http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ch_extensions.html#diskconfig_attribute">Disk Configuration Extension</a>.</td>
482
+ </tr>
483
+ <tr>
484
+ <td>:metadata</td>
485
+ <td>Hash containing server metadata.</td>
486
+ </tr>
487
+ <tr>
488
+ <td>:personality</td>
489
+ <td>Array of files to be injected onto the server. Please refer to the Fog <a href="http://rubydoc.info/github/fog/fog/Fog/Compute/RackspaceV2/Servers:bootstrap">bootstrap </a> API documentation for further information.</td>
490
+ </tr>
491
+ </table>
492
+
493
+ ## Bootstrap
494
+
495
+ In addition to the `create` method, Fog provides a `bootstrap` method which creates a server and then performs the following actions via ssh:
496
+
497
+ 1. Create `ROOT_USER/.ssh/authorized_keys` file using the ssh key specified in `:public_key_path`.
498
+ 2. Lock password for root user using `passwd -l root`.
499
+ 3. Create `ROOT_USER/attributes.json` file with the contents of `server.attributes`.
500
+ 4. Create `ROOT_USER/metadata.json` file with the contents of `server.metadata`.
501
+
502
+ **Note**: Unlike the `create` method, `bootstrap` is blocking method call. If non-blocking behavior is desired, developers should use the `:personality` parameter on the `create` method.
503
+
504
+ The following example demonstrates bootstraping a server:
505
+
506
+ service.servers.bootstrap :name => 'bootstrap-server',
507
+ :flavor_id => service.flavors.first.id,
508
+ :image_id => service.images.find {|img| img.name =~ /Ubuntu/}.id,
509
+ :public_key_path => '~/.ssh/fog_rsa.pub',
510
+ :private_key_path => '~/.ssh/fog_rsa'
511
+
512
+ **Note**: The `:name`, `:flavor_id`, `:image_id`, `:public_key_path`, `:private_key_path` are required for the `bootstrap` method.
513
+
514
+ The `bootstrap` method uses the same additional parameters as the `create` method. Refer to the [Additional Parameters](#additional-parameters) section for more information.
515
+
516
+ ## SSH
517
+
518
+ Once a server has been created and set up for ssh key authentication, fog can execute remote commands as follows:
519
+
520
+ result = server.ssh ['pwd']
521
+
522
+ This will return the following:
523
+
524
+ [#<Fog::SSH::Result:0x1108241d0 @stderr="", @status=0, @stdout="/root\r\n", @command="pwd">]
525
+
526
+ **Note**: SSH key authentication can be set up using `bootstrap` method or by using the `:personality` attribute on the `:create` method. See [Bootstrap](#bootstrap) or [Create Server](#create-server) for more information.
527
+
528
+ ## Update Server
529
+
530
+ Next Gen Cloud Servers support updating the following attributes `name`, `access_ipv4_address`, and `access_ipv6_address`.
531
+
532
+ To update these attributes:
533
+
534
+ server.name = "batman"
535
+ server.access_ipv4_address = "10.0.0.1"
536
+ server.access_ipv6_address = "fdbb:1717:4533:7c89:0:0:0:1"
537
+ server.save
538
+
539
+ Additional information about server access addresses can be found [here](http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Server_Primary_Addresses-d1e2558.html).
540
+
541
+ **Note**: Updating the server name does not change the host name. Names are not guaranteed to be unique.
542
+
543
+ ## Delete Server
544
+
545
+ To delete a server:
546
+
547
+ server.destroy
548
+
549
+ **Note**: The server is not immediately destroyed, but it does occur shortly there after.
550
+
551
+ ## Metadata
552
+
553
+ You can access metadata as an attribute on both `Fog::Compute::RackspaceV2::Server` and `Fog::Compute::RackspaceV2::Metadata::Image`. You can specify metadata during creation of a server or an image. Please refer to [Create Server](#create-server) or [Create Image](#create-image) sections for more information.
554
+
555
+ This example demonstrates how to iterate through a server's metadata:
556
+
557
+ server.metadata.each {|metadatum| puts "#{metadatum.key}: #{metadatum.value}" }
558
+
559
+ You can update and retrieve metadata in a manner similar to a hash:
560
+
561
+ server.metadata["os_type"]
562
+
563
+ server.metadata["installed_ruby"] = "MRI 1.9.3"
564
+
565
+ Metadata also responds to `save` and `reload` as follows:
566
+
567
+ server.metadata.save
568
+
569
+ server.metadata.reload
570
+
571
+
572
+ ## Change Admin Password
573
+
574
+ To change the administrator password:
575
+
576
+ server.change_admin_password "superSecure"
577
+
578
+ ## Reboot
579
+
580
+ To perform a soft reboot:
581
+
582
+ server.reboot
583
+
584
+ To perform a hard reboot:
585
+
586
+ server.reboot 'HARD'
587
+
588
+ ## Rebuild
589
+
590
+ Rebuild removes all data on the server and replaces it with the specified image. The id and all IP addresses remain the same.
591
+
592
+ To rebuild a server:
593
+
594
+ image = service.images.first
595
+ server.rebuild image.id
596
+
597
+ Additionally, the `rebuild` method will take a second parameter containing a hash with the following values:
598
+
599
+ <table>
600
+ <tr>
601
+ <th>Key</th>
602
+ <th>Description</th>
603
+ </tr>
604
+ <tr>
605
+ <td>:name</td>
606
+ <td>Name of Server</td>
607
+ </tr>
608
+ <tr>
609
+ <td>:flavorRef</td>
610
+ <td>Flavor id</td>
611
+ </tr>
612
+ <tr>
613
+ <td>:accessIPv4</td>
614
+ <td>IPv4 access address</td>
615
+ </tr>
616
+ <tr>
617
+ <td>:accessIPv6</td>
618
+ <td>IPv6 access address</td>
619
+ </tr>
620
+ <tr>
621
+ <td>:metadata</td>
622
+ <td>Hash containing server metadata</td>
623
+ </tr>
624
+ <tr>
625
+ <td>:personality</td>
626
+ <td>File path and contents. Refer to Next Gen Server API documentation - <a href="http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Server_Personality-d1e2543.html">Server Personality</a>. </td>
627
+ </tr>
628
+ <tr>
629
+ <td>:disk_config</td>
630
+ <td>The disk configuration value (AUTO or MANUAL). Refer to Next Gen Server API documentation - <a href="http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ch_extensions.html#diskconfig_attribute">Disk Configuration Extension</a>.</td>
631
+ </tr>
632
+ </table>
633
+
634
+ ## Resize
635
+
636
+ Resizing a server allows you to change the resources dedicated to the server.
637
+
638
+ To resize a server:
639
+
640
+ flavor_id = service.flavor[2].id
641
+ server.resize flavor_id #flavor_id should be your desired flavor
642
+
643
+ During the resize process the server will have a state of `RESIZE`. Once a server has completed resizing it will be in a `VERIFY_RESIZE` state.
644
+
645
+ You can use Fog's `wait_for` method to wait for this state as follows:
646
+
647
+ server.wait_for { ready?('VERIFY_RESIZE', ['ACTIVE', 'ERROR']) }
648
+
649
+
650
+ In this case, `wait_for` is waiting for the server to become `VERIFY_READY` and will raise an exception if we enter an `ACTIVE` or `ERROR` state.
651
+
652
+ Once a server enters the `VERIFY_RESIZE` we will need to call `confirm_resize` to confirm the server was properly resized or `revert_resize` to rollback to the old size/flavor.
653
+
654
+ **Note:** A server will automatically confirm resize after 24 hours.
655
+
656
+ To confirm resize:
657
+
658
+ server.confirm_resize
659
+
660
+ To revert to previous size/flavor:
661
+
662
+ server.revert_resize
663
+
664
+
665
+ ## Create Image
666
+
667
+ To create an image of your server:
668
+
669
+ image = server.create_image "back-image-#{server.name}", :metadata => { :environment => 'development' }
670
+
671
+ You can use the second parameter to specify image metadata. This is an optional parameter.
672
+
673
+ During the imaging process, the image state will be `SAVING`. The image is ready for use when when state `ACTIVE` is reached. Fog can use `wait_for` to wait for an active state as follows:
674
+
675
+ image.wait_for { ready? }
676
+
677
+ ## List Attached Volumes
678
+ To list Cloud Block Volumes attached to server:
679
+
680
+ server.attachments
681
+
682
+ ## Attach Volume
683
+ To attach volume using the volume id:
684
+
685
+ server.attach_volume "0e7a706c-340d-48b3-802d-192850387f93"
686
+
687
+ If the volume id is unknown you can look it up using the Cloud Block Storage service. Start by creating a `cbs_service` similar to our Compute Service:
688
+
689
+ cbs_service = Fog::Rackspace::BlockStorage.new({
690
+ :rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username
691
+ :rackspace_api_key => RACKSPACE_API # Your Rackspace API key
692
+ })
693
+
694
+ volume = cbs_service.volumes.first
695
+ server.attach_volume volume, "/dev/xvdb" # name of device on server is optional
696
+
697
+ The `attach_volume` method accepts a volume id `String` or `Fog::Rackspace::BlockStorage::Volume` instance. This example also demonstrates passing in the optional device name. Valid device names are `/dev/xvd[a-p]`.
698
+
699
+ ## Detach Volume
700
+ To detach a volume:
701
+
702
+ server.attachments.first.detach
703
+
704
+ ## Examples
705
+
706
+ Example code using Next Gen Cloud Servers can be found [here](https://github.com/fog/fog/tree/master/lib/fog/rackspace/examples).
707
+
708
+ ## Additional Resources
709
+
710
+ * [fog.io](http://fog.io/)
711
+ * [Fog rdoc](http://rubydoc.info/gems/fog/)
712
+ * [Fog Github repo](https://github.com/fog/fog)
713
+ * [Fog Github Issues](https://github.com/fog/fog/issues)
714
+ * [Excon Github repo](https://github.com/geemus/excon)
715
+ * [Next Gen Cloud Servers API](http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ch_preface.html)
716
+
717
+ ## Support and Feedback
718
+
719
+ Your feedback is appreciated! If you have specific issues with the **fog** SDK, you should file an [issue via Github](https://github.com/fog/fog/issues).
720
+
721
+ For general feedback and support requests, send an email to: <sdk-support@rackspace.com>.
722
+