fog 1.11.1 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (594) hide show
  1. data/Gemfile +0 -2
  2. data/Rakefile +5 -0
  3. data/changelog.txt +192 -0
  4. data/fog.gemspec +4 -4
  5. data/lib/fog.rb +3 -0
  6. data/lib/fog/account.rb +25 -0
  7. data/lib/fog/aws/cloud_formation.rb +5 -3
  8. data/lib/fog/aws/compute.rb +1 -0
  9. data/lib/fog/aws/iam.rb +2 -0
  10. data/lib/fog/aws/models/compute/server.rb +38 -32
  11. data/lib/fog/aws/models/dns/record.rb +1 -1
  12. data/lib/fog/aws/models/iam/role.rb +36 -0
  13. data/lib/fog/aws/models/iam/roles.rb +40 -0
  14. data/lib/fog/aws/models/rds/snapshots.rb +19 -3
  15. data/lib/fog/aws/models/storage/file.rb +1 -1
  16. data/lib/fog/aws/models/storage/files.rb +1 -1
  17. data/lib/fog/aws/parsers/cloud_formation/list_stack_resources.rb +32 -0
  18. data/lib/fog/aws/parsers/cloud_formation/list_stacks.rb +34 -0
  19. data/lib/fog/aws/parsers/compute/copy_image.rb +22 -0
  20. data/lib/fog/aws/parsers/compute/describe_instances.rb +11 -4
  21. data/lib/fog/aws/parsers/compute/run_instances.rb +5 -4
  22. data/lib/fog/aws/parsers/dns/get_hosted_zone.rb +2 -0
  23. data/lib/fog/aws/rds.rb +1 -1
  24. data/lib/fog/aws/requests/cloud_formation/list_stack_resources.rb +36 -0
  25. data/lib/fog/aws/requests/cloud_formation/list_stacks.rb +37 -0
  26. data/lib/fog/aws/requests/compute/copy_image.rb +63 -0
  27. data/lib/fog/aws/requests/compute/describe_instances.rb +1 -1
  28. data/lib/fog/aws/requests/compute/run_instances.rb +3 -1
  29. data/lib/fog/aws/requests/storage/post_object_restore.rb +54 -0
  30. data/lib/fog/aws/storage.rb +5 -5
  31. data/lib/fog/billing.rb +23 -0
  32. data/lib/fog/bin.rb +2 -0
  33. data/lib/fog/bin/cloudsigma.rb +29 -0
  34. data/lib/fog/bin/openvz.rb +31 -0
  35. data/lib/fog/bluebox/models/dns/zone.rb +1 -1
  36. data/lib/fog/brightbox/compute.rb +15 -9
  37. data/lib/fog/brightbox/oauth2.rb +5 -3
  38. data/lib/fog/brightbox/requests/compute/activate_console_server.rb +1 -1
  39. data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +2 -1
  40. data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +2 -1
  41. data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +11 -3
  42. data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +2 -1
  43. data/lib/fog/brightbox/requests/compute/create_api_client.rb +2 -1
  44. data/lib/fog/brightbox/requests/compute/create_application.rb +2 -1
  45. data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +2 -1
  46. data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +2 -1
  47. data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +2 -1
  48. data/lib/fog/brightbox/requests/compute/create_image.rb +2 -1
  49. data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +2 -1
  50. data/lib/fog/brightbox/requests/compute/create_server.rb +2 -1
  51. data/lib/fog/brightbox/requests/compute/create_server_group.rb +2 -1
  52. data/lib/fog/brightbox/requests/compute/{destroy_api_client.rb → delete_api_client.rb} +10 -3
  53. data/lib/fog/brightbox/requests/compute/{destroy_application.rb → delete_application.rb} +10 -3
  54. data/lib/fog/brightbox/requests/compute/{destroy_cloud_ip.rb → delete_cloud_ip.rb} +10 -3
  55. data/lib/fog/brightbox/requests/compute/{destroy_firewall_policy.rb → delete_firewall_policy.rb} +10 -3
  56. data/lib/fog/brightbox/requests/compute/{destroy_firewall_rule.rb → delete_firewall_rule.rb} +10 -3
  57. data/lib/fog/brightbox/requests/compute/{destroy_image.rb → delete_image.rb} +10 -3
  58. data/lib/fog/brightbox/requests/compute/{destroy_load_balancer.rb → delete_load_balancer.rb} +10 -3
  59. data/lib/fog/brightbox/requests/compute/{destroy_server.rb → delete_server.rb} +10 -3
  60. data/lib/fog/brightbox/requests/compute/{destroy_server_group.rb → delete_server_group.rb} +10 -3
  61. data/lib/fog/brightbox/requests/compute/get_account.rb +1 -1
  62. data/lib/fog/brightbox/requests/compute/get_api_client.rb +1 -1
  63. data/lib/fog/brightbox/requests/compute/get_application.rb +1 -1
  64. data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +1 -1
  65. data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +1 -1
  66. data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +1 -1
  67. data/lib/fog/brightbox/requests/compute/get_image.rb +1 -1
  68. data/lib/fog/brightbox/requests/compute/get_interface.rb +1 -1
  69. data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +1 -1
  70. data/lib/fog/brightbox/requests/compute/get_server.rb +1 -1
  71. data/lib/fog/brightbox/requests/compute/get_server_group.rb +1 -1
  72. data/lib/fog/brightbox/requests/compute/get_server_type.rb +1 -1
  73. data/lib/fog/brightbox/requests/compute/get_user.rb +1 -1
  74. data/lib/fog/brightbox/requests/compute/get_zone.rb +1 -1
  75. data/lib/fog/brightbox/requests/compute/list_accounts.rb +1 -1
  76. data/lib/fog/brightbox/requests/compute/list_api_clients.rb +1 -1
  77. data/lib/fog/brightbox/requests/compute/list_applications.rb +1 -1
  78. data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +1 -1
  79. data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +1 -1
  80. data/lib/fog/brightbox/requests/compute/list_images.rb +1 -1
  81. data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +1 -1
  82. data/lib/fog/brightbox/requests/compute/list_server_groups.rb +1 -1
  83. data/lib/fog/brightbox/requests/compute/list_server_types.rb +1 -1
  84. data/lib/fog/brightbox/requests/compute/list_servers.rb +1 -1
  85. data/lib/fog/brightbox/requests/compute/list_users.rb +1 -1
  86. data/lib/fog/brightbox/requests/compute/list_zones.rb +1 -1
  87. data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +2 -1
  88. data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +12 -3
  89. data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +2 -1
  90. data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +2 -1
  91. data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +2 -1
  92. data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +11 -3
  93. data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +2 -2
  94. data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +1 -2
  95. data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +1 -1
  96. data/lib/fog/brightbox/requests/compute/shutdown_server.rb +1 -1
  97. data/lib/fog/brightbox/requests/compute/snapshot_server.rb +1 -1
  98. data/lib/fog/brightbox/requests/compute/start_server.rb +1 -1
  99. data/lib/fog/brightbox/requests/compute/stop_server.rb +1 -1
  100. data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +1 -1
  101. data/lib/fog/brightbox/requests/compute/update_account.rb +2 -1
  102. data/lib/fog/brightbox/requests/compute/update_api_client.rb +2 -1
  103. data/lib/fog/brightbox/requests/compute/update_application.rb +2 -1
  104. data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +2 -1
  105. data/lib/fog/brightbox/requests/compute/update_firewall_policy.rb +2 -1
  106. data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +2 -1
  107. data/lib/fog/brightbox/requests/compute/update_image.rb +2 -1
  108. data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +2 -1
  109. data/lib/fog/brightbox/requests/compute/update_scoped_account.rb +2 -1
  110. data/lib/fog/brightbox/requests/compute/update_server.rb +2 -1
  111. data/lib/fog/brightbox/requests/compute/update_server_group.rb +2 -1
  112. data/lib/fog/brightbox/requests/compute/update_user.rb +2 -1
  113. data/lib/fog/cloudsigma.rb +9 -0
  114. data/lib/fog/cloudsigma/compute.rb +221 -0
  115. data/lib/fog/cloudsigma/connection.rb +197 -0
  116. data/lib/fog/cloudsigma/error.rb +45 -0
  117. data/lib/fog/cloudsigma/mock_data.rb +46 -0
  118. data/lib/fog/cloudsigma/models/balance.rb +12 -0
  119. data/lib/fog/cloudsigma/models/current_usage.rb +19 -0
  120. data/lib/fog/cloudsigma/models/ip.rb +22 -0
  121. data/lib/fog/cloudsigma/models/ipconf.rb +12 -0
  122. data/lib/fog/cloudsigma/models/ips.rb +27 -0
  123. data/lib/fog/cloudsigma/models/lib_volume.rb +50 -0
  124. data/lib/fog/cloudsigma/models/lib_volumes.rb +27 -0
  125. data/lib/fog/cloudsigma/models/mountpoint.rb +25 -0
  126. data/lib/fog/cloudsigma/models/nic.rb +22 -0
  127. data/lib/fog/cloudsigma/models/obj_ref.rb +12 -0
  128. data/lib/fog/cloudsigma/models/price_calculation.rb +13 -0
  129. data/lib/fog/cloudsigma/models/price_record.rb +38 -0
  130. data/lib/fog/cloudsigma/models/pricing.rb +20 -0
  131. data/lib/fog/cloudsigma/models/profile.rb +50 -0
  132. data/lib/fog/cloudsigma/models/server.rb +208 -0
  133. data/lib/fog/cloudsigma/models/servers.rb +27 -0
  134. data/lib/fog/cloudsigma/models/subscription.rb +53 -0
  135. data/lib/fog/cloudsigma/models/subscriptions.rb +41 -0
  136. data/lib/fog/cloudsigma/models/usage_record.rb +13 -0
  137. data/lib/fog/cloudsigma/models/vlan.rb +29 -0
  138. data/lib/fog/cloudsigma/models/vlans.rb +27 -0
  139. data/lib/fog/cloudsigma/models/volume.rb +71 -0
  140. data/lib/fog/cloudsigma/models/volumes.rb +27 -0
  141. data/lib/fog/cloudsigma/nested_model.rb +60 -0
  142. data/lib/fog/cloudsigma/requests/calculate_subscription_price.rb +18 -0
  143. data/lib/fog/cloudsigma/requests/clone_libvolume.rb +32 -0
  144. data/lib/fog/cloudsigma/requests/clone_server.rb +32 -0
  145. data/lib/fog/cloudsigma/requests/clone_volume.rb +32 -0
  146. data/lib/fog/cloudsigma/requests/close_vnc.rb +30 -0
  147. data/lib/fog/cloudsigma/requests/create_server.rb +33 -0
  148. data/lib/fog/cloudsigma/requests/create_subscription.rb +40 -0
  149. data/lib/fog/cloudsigma/requests/create_volume.rb +30 -0
  150. data/lib/fog/cloudsigma/requests/delete_server.rb +18 -0
  151. data/lib/fog/cloudsigma/requests/delete_volume.rb +18 -0
  152. data/lib/fog/cloudsigma/requests/extend_subscription.rb +22 -0
  153. data/lib/fog/cloudsigma/requests/get_balance.rb +18 -0
  154. data/lib/fog/cloudsigma/requests/get_current_usage.rb +18 -0
  155. data/lib/fog/cloudsigma/requests/get_ip.rb +18 -0
  156. data/lib/fog/cloudsigma/requests/get_lib_volume.rb +18 -0
  157. data/lib/fog/cloudsigma/requests/get_pricing.rb +28 -0
  158. data/lib/fog/cloudsigma/requests/get_profile.rb +18 -0
  159. data/lib/fog/cloudsigma/requests/get_server.rb +18 -0
  160. data/lib/fog/cloudsigma/requests/get_subscription.rb +18 -0
  161. data/lib/fog/cloudsigma/requests/get_vlan.rb +18 -0
  162. data/lib/fog/cloudsigma/requests/get_volume.rb +18 -0
  163. data/lib/fog/cloudsigma/requests/list_ips.rb +18 -0
  164. data/lib/fog/cloudsigma/requests/list_lib_volumes.rb +18 -0
  165. data/lib/fog/cloudsigma/requests/list_servers.rb +18 -0
  166. data/lib/fog/cloudsigma/requests/list_subscriptions.rb +18 -0
  167. data/lib/fog/cloudsigma/requests/list_vlans.rb +18 -0
  168. data/lib/fog/cloudsigma/requests/list_volumes.rb +18 -0
  169. data/lib/fog/cloudsigma/requests/open_vnc.rb +34 -0
  170. data/lib/fog/cloudsigma/requests/start_server.rb +32 -0
  171. data/lib/fog/cloudsigma/requests/stop_server.rb +33 -0
  172. data/lib/fog/cloudsigma/requests/update_profile.rb +18 -0
  173. data/lib/fog/cloudsigma/requests/update_server.rb +40 -0
  174. data/lib/fog/cloudsigma/requests/update_vlan.rb +20 -0
  175. data/lib/fog/cloudsigma/requests/update_volume.rb +18 -0
  176. data/lib/fog/cloudstack/models/compute/servers.rb +3 -2
  177. data/lib/fog/core/json.rb +6 -48
  178. data/lib/fog/dns.rb +10 -6
  179. data/lib/fog/dnsimple/models/dns/record.rb +0 -1
  180. data/lib/fog/dnsmadeeasy/models/dns/record.rb +1 -1
  181. data/lib/fog/dreamhost/dns.rb +3 -1
  182. data/lib/fog/dynect/models/dns/zone.rb +1 -1
  183. data/lib/fog/hp.rb +1 -1
  184. data/lib/fog/internet_archive/models/storage/file.rb +1 -1
  185. data/lib/fog/internet_archive/models/storage/files.rb +1 -1
  186. data/lib/fog/joyent/compute.rb +59 -42
  187. data/lib/fog/joyent/errors.rb +2 -2
  188. data/lib/fog/joyent/models/compute/network.rb +13 -0
  189. data/lib/fog/joyent/models/compute/networks.rb +15 -0
  190. data/lib/fog/joyent/models/compute/server.rb +2 -1
  191. data/lib/fog/joyent/models/compute/servers.rb +3 -1
  192. data/lib/fog/joyent/requests/compute/delete_machine.rb +1 -1
  193. data/lib/fog/joyent/requests/compute/get_machine.rb +1 -1
  194. data/lib/fog/joyent/requests/compute/list_machines.rb +2 -1
  195. data/lib/fog/joyent/requests/compute/list_networks.rb +26 -0
  196. data/lib/fog/joyent/requests/compute/resize_machine.rb +2 -1
  197. data/lib/fog/libvirt/models/compute/nic.rb +1 -0
  198. data/lib/fog/linode/models/dns/record.rb +0 -1
  199. data/lib/fog/linode/models/dns/zone.rb +0 -1
  200. data/lib/fog/local/models/storage/files.rb +13 -13
  201. data/lib/fog/monitoring.rb +24 -0
  202. data/lib/fog/network.rb +4 -1
  203. data/lib/fog/openstack/compute.rb +5 -0
  204. data/lib/fog/openstack/identity.rb +2 -1
  205. data/lib/fog/openstack/image.rb +4 -1
  206. data/lib/fog/openstack/models/image/images.rb +1 -0
  207. data/lib/fog/openstack/models/network/lb_health_monitor.rb +68 -0
  208. data/lib/fog/openstack/models/network/lb_health_monitors.rb +34 -0
  209. data/lib/fog/openstack/models/network/lb_member.rb +53 -0
  210. data/lib/fog/openstack/models/network/lb_members.rb +34 -0
  211. data/lib/fog/openstack/models/network/lb_pool.rb +78 -0
  212. data/lib/fog/openstack/models/network/lb_pools.rb +34 -0
  213. data/lib/fog/openstack/models/network/lb_vip.rb +59 -0
  214. data/lib/fog/openstack/models/network/lb_vips.rb +34 -0
  215. data/lib/fog/openstack/network.rb +52 -4
  216. data/lib/fog/openstack/requests/compute/add_flavor_access.rb +31 -0
  217. data/lib/fog/openstack/requests/compute/allocate_address.rb +1 -1
  218. data/lib/fog/openstack/requests/compute/attach_volume.rb +1 -1
  219. data/lib/fog/openstack/requests/compute/boot_from_snapshot.rb +1 -1
  220. data/lib/fog/openstack/requests/compute/create_flavor.rb +1 -1
  221. data/lib/fog/openstack/requests/compute/create_key_pair.rb +1 -1
  222. data/lib/fog/openstack/requests/compute/create_security_group.rb +1 -1
  223. data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +1 -1
  224. data/lib/fog/openstack/requests/compute/create_server.rb +4 -6
  225. data/lib/fog/openstack/requests/compute/create_volume.rb +1 -1
  226. data/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +1 -1
  227. data/lib/fog/openstack/requests/compute/list_address_pools.rb +10 -0
  228. data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -1
  229. data/lib/fog/openstack/requests/compute/list_tenants_with_flavor_access.rb +26 -0
  230. data/lib/fog/openstack/requests/compute/remove_flavor_access.rb +31 -0
  231. data/lib/fog/openstack/requests/compute/update_quota.rb +1 -1
  232. data/lib/fog/openstack/requests/identity/create_ec2_credential.rb +1 -1
  233. data/lib/fog/openstack/requests/identity/create_role.rb +1 -1
  234. data/lib/fog/openstack/requests/identity/create_user.rb +1 -1
  235. data/lib/fog/openstack/requests/identity/update_user.rb +1 -1
  236. data/lib/fog/openstack/requests/image/update_image_members.rb +1 -1
  237. data/lib/fog/openstack/requests/network/associate_lb_health_monitor.rb +39 -0
  238. data/lib/fog/openstack/requests/network/create_lb_health_monitor.rb +56 -0
  239. data/lib/fog/openstack/requests/network/create_lb_member.rb +53 -0
  240. data/lib/fog/openstack/requests/network/create_lb_pool.rb +60 -0
  241. data/lib/fog/openstack/requests/network/create_lb_vip.rb +60 -0
  242. data/lib/fog/openstack/requests/network/delete_lb_health_monitor.rb +30 -0
  243. data/lib/fog/openstack/requests/network/delete_lb_member.rb +30 -0
  244. data/lib/fog/openstack/requests/network/delete_lb_pool.rb +30 -0
  245. data/lib/fog/openstack/requests/network/delete_lb_vip.rb +30 -0
  246. data/lib/fog/openstack/requests/network/disassociate_lb_health_monitor.rb +31 -0
  247. data/lib/fog/openstack/requests/network/get_lb_health_monitor.rb +30 -0
  248. data/lib/fog/openstack/requests/network/get_lb_member.rb +30 -0
  249. data/lib/fog/openstack/requests/network/get_lb_pool.rb +30 -0
  250. data/lib/fog/openstack/requests/network/get_lb_pool_stats.rb +35 -0
  251. data/lib/fog/openstack/requests/network/get_lb_vip.rb +30 -0
  252. data/lib/fog/openstack/requests/network/list_lb_health_monitors.rb +27 -0
  253. data/lib/fog/openstack/requests/network/list_lb_members.rb +27 -0
  254. data/lib/fog/openstack/requests/network/list_lb_pools.rb +27 -0
  255. data/lib/fog/openstack/requests/network/list_lb_vips.rb +27 -0
  256. data/lib/fog/openstack/requests/network/update_lb_health_monitor.rb +45 -0
  257. data/lib/fog/openstack/requests/network/update_lb_member.rb +41 -0
  258. data/lib/fog/openstack/requests/network/update_lb_pool.rb +42 -0
  259. data/lib/fog/openstack/requests/network/update_lb_vip.rb +44 -0
  260. data/lib/fog/openstack/requests/storage/put_object_manifest.rb +19 -6
  261. data/lib/fog/openstack/requests/volume/create_volume.rb +1 -1
  262. data/lib/fog/openstack/requests/volume/create_volume_snapshot.rb +1 -1
  263. data/lib/fog/openstack/volume.rb +4 -1
  264. data/lib/fog/openvz.rb +9 -0
  265. data/lib/fog/openvz/README.md +188 -0
  266. data/lib/fog/openvz/compute.rb +176 -0
  267. data/lib/fog/openvz/models/compute/server.rb +194 -0
  268. data/lib/fog/openvz/models/compute/servers.rb +27 -0
  269. data/lib/fog/openvz/requests/compute/compact_server.rb +21 -0
  270. data/lib/fog/openvz/requests/compute/convert_server.rb +21 -0
  271. data/lib/fog/openvz/requests/compute/create_server.rb +23 -0
  272. data/lib/fog/openvz/requests/compute/destroy_server.rb +21 -0
  273. data/lib/fog/openvz/requests/compute/exec2_server.rb +21 -0
  274. data/lib/fog/openvz/requests/compute/exec_server.rb +21 -0
  275. data/lib/fog/openvz/requests/compute/get_server_details.rb +21 -0
  276. data/lib/fog/openvz/requests/compute/list_servers.rb +21 -0
  277. data/lib/fog/openvz/requests/compute/mount_server.rb +21 -0
  278. data/lib/fog/openvz/requests/compute/quotainit_server.rb +21 -0
  279. data/lib/fog/openvz/requests/compute/quotaoff_server.rb +21 -0
  280. data/lib/fog/openvz/requests/compute/quotaon_server.rb +21 -0
  281. data/lib/fog/openvz/requests/compute/restart_server.rb +24 -0
  282. data/lib/fog/openvz/requests/compute/resume_server.rb +21 -0
  283. data/lib/fog/openvz/requests/compute/runscript_server.rb +21 -0
  284. data/lib/fog/openvz/requests/compute/set_server.rb +27 -0
  285. data/lib/fog/openvz/requests/compute/snapshot_delete_server.rb +21 -0
  286. data/lib/fog/openvz/requests/compute/snapshot_list_server.rb +21 -0
  287. data/lib/fog/openvz/requests/compute/snapshot_mount_server.rb +21 -0
  288. data/lib/fog/openvz/requests/compute/snapshot_server.rb +21 -0
  289. data/lib/fog/openvz/requests/compute/snapshot_switch_server.rb +21 -0
  290. data/lib/fog/openvz/requests/compute/snapshot_umount_server.rb +21 -0
  291. data/lib/fog/openvz/requests/compute/start_server.rb +24 -0
  292. data/lib/fog/openvz/requests/compute/status_server.rb +21 -0
  293. data/lib/fog/openvz/requests/compute/stop_server.rb +24 -0
  294. data/lib/fog/openvz/requests/compute/suspend_server.rb +21 -0
  295. data/lib/fog/openvz/requests/compute/umount_server.rb +21 -0
  296. data/lib/fog/rackspace.rb +1 -1
  297. data/lib/fog/rackspace/block_storage.rb +2 -1
  298. data/lib/fog/rackspace/compute.rb +2 -1
  299. data/lib/fog/rackspace/compute_v2.rb +8 -7
  300. data/lib/fog/rackspace/databases.rb +2 -1
  301. data/lib/fog/rackspace/dns.rb +2 -1
  302. data/lib/fog/rackspace/docs/storage.md +35 -1
  303. data/lib/fog/rackspace/examples/storage/upload_large_files.rb +103 -0
  304. data/lib/fog/rackspace/load_balancers.rb +2 -1
  305. data/lib/fog/rackspace/models/compute_v2/server.rb +0 -1
  306. data/lib/fog/rackspace/models/load_balancers/load_balancer.rb +7 -7
  307. data/lib/fog/rackspace/models/storage/file.rb +18 -0
  308. data/lib/fog/rackspace/requests/load_balancers/create_load_balancer.rb +1 -1
  309. data/lib/fog/rackspace/requests/load_balancers/update_load_balancer.rb +2 -1
  310. data/lib/fog/rackspace/requests/storage/put_object.rb +7 -4
  311. data/lib/fog/rackspace/requests/storage/put_object_manifest.rb +24 -9
  312. data/lib/fog/rackspace/service.rb +2 -1
  313. data/lib/fog/rackspace/storage.rb +2 -1
  314. data/lib/fog/riakcs.rb +2 -2
  315. data/lib/fog/riakcs/provisioning.rb +3 -1
  316. data/lib/fog/riakcs/requests/provisioning/create_user.rb +2 -2
  317. data/lib/fog/riakcs/requests/provisioning/get_user.rb +1 -1
  318. data/lib/fog/riakcs/requests/provisioning/list_users.rb +1 -1
  319. data/lib/fog/riakcs/requests/usage/get_usage.rb +1 -1
  320. data/lib/fog/riakcs/usage.rb +1 -0
  321. data/lib/fog/serverlove/compute.rb +26 -23
  322. data/lib/fog/serverlove/models/compute/server.rb +1 -1
  323. data/lib/fog/storage.rb +3 -0
  324. data/lib/fog/storm_on_demand.rb +9 -1
  325. data/lib/fog/storm_on_demand/README.md +49 -0
  326. data/lib/fog/storm_on_demand/account.rb +58 -0
  327. data/lib/fog/storm_on_demand/billing.rb +61 -0
  328. data/lib/fog/storm_on_demand/compute.rb +33 -58
  329. data/lib/fog/storm_on_demand/dns.rb +85 -0
  330. data/lib/fog/storm_on_demand/models/account/token.rb +23 -0
  331. data/lib/fog/storm_on_demand/models/account/tokens.rb +20 -0
  332. data/lib/fog/storm_on_demand/models/billing/invoice.rb +28 -0
  333. data/lib/fog/storm_on_demand/models/billing/invoices.rb +30 -0
  334. data/lib/fog/storm_on_demand/models/billing/payment.rb +17 -0
  335. data/lib/fog/storm_on_demand/models/billing/payments.rb +19 -0
  336. data/lib/fog/storm_on_demand/models/compute/config.rb +18 -4
  337. data/lib/fog/storm_on_demand/models/compute/configs.rb +6 -2
  338. data/lib/fog/storm_on_demand/models/compute/image.rb +22 -1
  339. data/lib/fog/storm_on_demand/models/compute/images.rb +12 -2
  340. data/lib/fog/storm_on_demand/models/compute/notification.rb +34 -0
  341. data/lib/fog/storm_on_demand/models/compute/notifications.rb +30 -0
  342. data/lib/fog/storm_on_demand/models/compute/product.rb +40 -0
  343. data/lib/fog/storm_on_demand/models/compute/products.rb +28 -0
  344. data/lib/fog/storm_on_demand/models/compute/server.rb +33 -9
  345. data/lib/fog/storm_on_demand/models/compute/servers.rb +7 -2
  346. data/lib/fog/storm_on_demand/models/compute/template.rb +7 -1
  347. data/lib/fog/storm_on_demand/models/compute/templates.rb +7 -2
  348. data/lib/fog/storm_on_demand/models/dns/domain.rb +34 -0
  349. data/lib/fog/storm_on_demand/models/dns/domains.rb +20 -0
  350. data/lib/fog/storm_on_demand/models/dns/record.rb +64 -0
  351. data/lib/fog/storm_on_demand/models/dns/records.rb +30 -0
  352. data/lib/fog/storm_on_demand/models/dns/reverse.rb +15 -0
  353. data/lib/fog/storm_on_demand/models/dns/reverses.rb +23 -0
  354. data/lib/fog/storm_on_demand/models/dns/zone.rb +40 -0
  355. data/lib/fog/storm_on_demand/models/dns/zones.rb +30 -0
  356. data/lib/fog/storm_on_demand/models/monitoring/bandwidth.rb +23 -0
  357. data/lib/fog/storm_on_demand/models/monitoring/bandwidths.rb +23 -0
  358. data/lib/fog/storm_on_demand/models/{compute/stat.rb → monitoring/load.rb} +6 -6
  359. data/lib/fog/storm_on_demand/models/monitoring/loads.rb +24 -0
  360. data/lib/fog/storm_on_demand/models/monitoring/monitor_service.rb +22 -0
  361. data/lib/fog/storm_on_demand/models/monitoring/monitor_services.rb +32 -0
  362. data/lib/fog/storm_on_demand/models/{compute → network}/balancer.rb +27 -5
  363. data/lib/fog/storm_on_demand/models/network/balancers.rb +44 -0
  364. data/lib/fog/storm_on_demand/models/network/firewall.rb +20 -0
  365. data/lib/fog/storm_on_demand/models/network/firewalls.rb +32 -0
  366. data/lib/fog/storm_on_demand/models/network/network_ip.rb +23 -0
  367. data/lib/fog/storm_on_demand/models/network/network_ips.rb +48 -0
  368. data/lib/fog/storm_on_demand/models/network/pool.rb +32 -0
  369. data/lib/fog/storm_on_demand/models/network/pools.rb +28 -0
  370. data/lib/fog/storm_on_demand/models/{compute → network}/private_ip.rb +2 -3
  371. data/lib/fog/storm_on_demand/models/network/private_ips.rb +40 -0
  372. data/lib/fog/storm_on_demand/models/network/ruleset.rb +27 -0
  373. data/lib/fog/storm_on_demand/models/network/rulesets.rb +28 -0
  374. data/lib/fog/storm_on_demand/models/network/zone.rb +27 -0
  375. data/lib/fog/storm_on_demand/models/network/zones.rb +24 -0
  376. data/lib/fog/storm_on_demand/models/storage/cluster.rb +20 -0
  377. data/lib/fog/storm_on_demand/models/storage/clusters.rb +20 -0
  378. data/lib/fog/storm_on_demand/models/storage/volume.rb +54 -0
  379. data/lib/fog/storm_on_demand/models/storage/volumes.rb +30 -0
  380. data/lib/fog/storm_on_demand/models/support/alert.rb +19 -0
  381. data/lib/fog/storm_on_demand/models/support/alerts.rb +20 -0
  382. data/lib/fog/storm_on_demand/models/support/ticket.rb +74 -0
  383. data/lib/fog/storm_on_demand/models/support/tickets.rb +33 -0
  384. data/lib/fog/storm_on_demand/models/vpn/vpn.rb +30 -0
  385. data/lib/fog/storm_on_demand/models/vpn/vpns.rb +27 -0
  386. data/lib/fog/storm_on_demand/monitoring.rb +68 -0
  387. data/lib/fog/storm_on_demand/network.rb +113 -0
  388. data/lib/fog/storm_on_demand/requests/account/create_token.rb +16 -0
  389. data/lib/fog/storm_on_demand/requests/account/expire_token.rb +16 -0
  390. data/lib/fog/storm_on_demand/requests/billing/get_invoice.rb +16 -0
  391. data/lib/fog/storm_on_demand/requests/billing/list_invoices.rb +16 -0
  392. data/lib/fog/storm_on_demand/requests/billing/make_payment.rb +16 -0
  393. data/lib/fog/storm_on_demand/requests/billing/next_invoice.rb +16 -0
  394. data/lib/fog/storm_on_demand/requests/compute/clone_server.rb +1 -1
  395. data/lib/fog/storm_on_demand/requests/compute/create_image.rb +16 -0
  396. data/lib/fog/storm_on_demand/requests/compute/create_server.rb +1 -1
  397. data/lib/fog/storm_on_demand/requests/compute/current_notifications.rb +16 -0
  398. data/lib/fog/storm_on_demand/requests/compute/delete_image.rb +16 -0
  399. data/lib/fog/storm_on_demand/requests/compute/delete_server.rb +1 -1
  400. data/lib/fog/storm_on_demand/requests/compute/get_config_details.rb +16 -0
  401. data/lib/fog/storm_on_demand/requests/compute/get_image_details.rb +16 -0
  402. data/lib/fog/storm_on_demand/requests/compute/get_notification.rb +16 -0
  403. data/lib/fog/storm_on_demand/requests/compute/get_product.rb +16 -0
  404. data/lib/fog/storm_on_demand/requests/compute/get_product_code.rb +16 -0
  405. data/lib/fog/storm_on_demand/requests/compute/get_product_price.rb +16 -0
  406. data/lib/fog/storm_on_demand/requests/compute/get_product_starting_price.rb +16 -0
  407. data/lib/fog/storm_on_demand/requests/compute/get_server.rb +1 -1
  408. data/lib/fog/storm_on_demand/requests/compute/get_template_details.rb +16 -0
  409. data/lib/fog/storm_on_demand/requests/compute/list_configs.rb +1 -1
  410. data/lib/fog/storm_on_demand/requests/compute/list_images.rb +2 -2
  411. data/lib/fog/storm_on_demand/requests/compute/list_notifications.rb +16 -0
  412. data/lib/fog/storm_on_demand/requests/compute/list_products.rb +16 -0
  413. data/lib/fog/storm_on_demand/requests/compute/list_servers.rb +2 -2
  414. data/lib/fog/storm_on_demand/requests/compute/list_templates.rb +2 -2
  415. data/lib/fog/storm_on_demand/requests/compute/reboot_server.rb +1 -1
  416. data/lib/fog/storm_on_demand/requests/compute/resize_server.rb +1 -1
  417. data/lib/fog/storm_on_demand/requests/compute/resolve_notification.rb +16 -0
  418. data/lib/fog/storm_on_demand/requests/compute/restore_image.rb +16 -0
  419. data/lib/fog/storm_on_demand/requests/compute/restore_template.rb +16 -0
  420. data/lib/fog/storm_on_demand/requests/compute/server_history.rb +16 -0
  421. data/lib/fog/storm_on_demand/requests/compute/server_status.rb +16 -0
  422. data/lib/fog/storm_on_demand/requests/compute/shutdown_server.rb +16 -0
  423. data/lib/fog/storm_on_demand/requests/compute/start_server.rb +16 -0
  424. data/lib/fog/storm_on_demand/requests/compute/update_image.rb +16 -0
  425. data/lib/fog/storm_on_demand/requests/compute/update_server.rb +16 -0
  426. data/lib/fog/storm_on_demand/requests/dns/check_zone_delegation.rb +16 -0
  427. data/lib/fog/storm_on_demand/requests/dns/create_record.rb +16 -0
  428. data/lib/fog/storm_on_demand/requests/dns/create_record_region.rb +16 -0
  429. data/lib/fog/storm_on_demand/requests/dns/create_zone.rb +16 -0
  430. data/lib/fog/storm_on_demand/requests/dns/delete_record.rb +16 -0
  431. data/lib/fog/storm_on_demand/requests/dns/delete_record_region.rb +16 -0
  432. data/lib/fog/storm_on_demand/requests/dns/delete_reverse.rb +16 -0
  433. data/lib/fog/storm_on_demand/requests/dns/delete_zone.rb +16 -0
  434. data/lib/fog/storm_on_demand/requests/dns/get_record.rb +16 -0
  435. data/lib/fog/storm_on_demand/requests/dns/get_zone.rb +16 -0
  436. data/lib/fog/storm_on_demand/requests/dns/list_domains.rb +16 -0
  437. data/lib/fog/storm_on_demand/requests/dns/list_records.rb +16 -0
  438. data/lib/fog/storm_on_demand/requests/dns/list_zones.rb +16 -0
  439. data/lib/fog/storm_on_demand/requests/dns/renew_domain.rb +16 -0
  440. data/lib/fog/storm_on_demand/requests/dns/update_record.rb +16 -0
  441. data/lib/fog/storm_on_demand/requests/dns/update_record_region.rb +16 -0
  442. data/lib/fog/storm_on_demand/requests/dns/update_reverse.rb +16 -0
  443. data/lib/fog/storm_on_demand/requests/dns/update_zone.rb +16 -0
  444. data/lib/fog/storm_on_demand/requests/monitoring/get_bandwidth_graph.rb +16 -0
  445. data/lib/fog/storm_on_demand/requests/monitoring/get_bandwidth_stats.rb +16 -0
  446. data/lib/fog/storm_on_demand/requests/monitoring/get_load_graph.rb +16 -0
  447. data/lib/fog/storm_on_demand/requests/monitoring/get_load_stats.rb +16 -0
  448. data/lib/fog/storm_on_demand/requests/monitoring/get_service.rb +16 -0
  449. data/lib/fog/storm_on_demand/requests/monitoring/get_service_status.rb +16 -0
  450. data/lib/fog/storm_on_demand/requests/monitoring/monitoring_ips.rb +16 -0
  451. data/lib/fog/storm_on_demand/requests/monitoring/update_service.rb +16 -0
  452. data/lib/fog/storm_on_demand/requests/{compute → network}/add_balancer_node.rb +2 -2
  453. data/lib/fog/storm_on_demand/requests/network/add_balancer_service.rb +16 -0
  454. data/lib/fog/storm_on_demand/requests/network/add_ip_to_server.rb +16 -0
  455. data/lib/fog/storm_on_demand/requests/network/attach_server_to_private_ip.rb +16 -0
  456. data/lib/fog/storm_on_demand/requests/network/check_balancer_available.rb +16 -0
  457. data/lib/fog/storm_on_demand/requests/network/check_server_attached.rb +16 -0
  458. data/lib/fog/storm_on_demand/requests/network/create_balancer.rb +16 -0
  459. data/lib/fog/storm_on_demand/requests/network/create_pool.rb +16 -0
  460. data/lib/fog/storm_on_demand/requests/network/create_ruleset.rb +16 -0
  461. data/lib/fog/storm_on_demand/requests/network/delete_balancer.rb +16 -0
  462. data/lib/fog/storm_on_demand/requests/network/delete_pool.rb +16 -0
  463. data/lib/fog/storm_on_demand/requests/network/detach_server_from_private_ip.rb +16 -0
  464. data/lib/fog/storm_on_demand/requests/network/get_assignments.rb +16 -0
  465. data/lib/fog/storm_on_demand/requests/network/get_balancer_details.rb +16 -0
  466. data/lib/fog/storm_on_demand/requests/network/get_balancer_possible_nodes.rb +16 -0
  467. data/lib/fog/storm_on_demand/requests/network/get_balancer_strategies.rb +16 -0
  468. data/lib/fog/storm_on_demand/requests/network/get_firewall.rb +16 -0
  469. data/lib/fog/storm_on_demand/requests/network/get_firewall_basic_options.rb +16 -0
  470. data/lib/fog/storm_on_demand/requests/network/get_firewall_rules.rb +16 -0
  471. data/lib/fog/storm_on_demand/requests/network/get_ip_details.rb +16 -0
  472. data/lib/fog/storm_on_demand/requests/network/get_pool.rb +16 -0
  473. data/lib/fog/storm_on_demand/requests/network/get_private_ip.rb +16 -0
  474. data/lib/fog/storm_on_demand/requests/network/get_ruleset.rb +16 -0
  475. data/lib/fog/storm_on_demand/requests/network/get_zone.rb +16 -0
  476. data/lib/fog/storm_on_demand/requests/{compute → network}/list_balancers.rb +3 -3
  477. data/lib/fog/storm_on_demand/requests/network/list_ip_public_accounts.rb +16 -0
  478. data/lib/fog/storm_on_demand/requests/network/list_network_ips.rb +16 -0
  479. data/lib/fog/storm_on_demand/requests/network/list_network_public_ips.rb +16 -0
  480. data/lib/fog/storm_on_demand/requests/{compute → network}/list_private_ips.rb +3 -3
  481. data/lib/fog/storm_on_demand/requests/network/list_rulesets.rb +16 -0
  482. data/lib/fog/storm_on_demand/requests/network/list_zones.rb +16 -0
  483. data/lib/fog/storm_on_demand/requests/{compute → network}/remove_balancer_node.rb +2 -2
  484. data/lib/fog/storm_on_demand/requests/network/remove_balancer_service.rb +16 -0
  485. data/lib/fog/storm_on_demand/requests/network/remove_ip_from_server.rb +16 -0
  486. data/lib/fog/storm_on_demand/requests/network/request_new_ips.rb +16 -0
  487. data/lib/fog/storm_on_demand/requests/network/set_default_zone.rb +16 -0
  488. data/lib/fog/storm_on_demand/requests/network/update_balancer.rb +16 -0
  489. data/lib/fog/storm_on_demand/requests/network/update_firewall.rb +16 -0
  490. data/lib/fog/storm_on_demand/requests/network/update_pool.rb +16 -0
  491. data/lib/fog/storm_on_demand/requests/network/update_ruleset.rb +16 -0
  492. data/lib/fog/storm_on_demand/requests/storage/attach_volume_to_server.rb +16 -0
  493. data/lib/fog/storm_on_demand/requests/storage/create_volume.rb +16 -0
  494. data/lib/fog/storm_on_demand/requests/storage/delete_volume.rb +16 -0
  495. data/lib/fog/storm_on_demand/requests/storage/detach_volume_from_server.rb +16 -0
  496. data/lib/fog/storm_on_demand/requests/storage/get_volume.rb +16 -0
  497. data/lib/fog/storm_on_demand/requests/storage/list_clusters.rb +16 -0
  498. data/lib/fog/storm_on_demand/requests/storage/list_volumes.rb +16 -0
  499. data/lib/fog/storm_on_demand/requests/storage/resize_volume.rb +16 -0
  500. data/lib/fog/storm_on_demand/requests/storage/update_volume.rb +16 -0
  501. data/lib/fog/storm_on_demand/requests/support/add_feedback.rb +16 -0
  502. data/lib/fog/storm_on_demand/requests/support/add_transaction_feedback.rb +16 -0
  503. data/lib/fog/storm_on_demand/requests/support/authenticate.rb +16 -0
  504. data/lib/fog/storm_on_demand/requests/support/close_ticket.rb +16 -0
  505. data/lib/fog/storm_on_demand/requests/support/create_ticket.rb +16 -0
  506. data/lib/fog/storm_on_demand/requests/support/get_active_alert.rb +16 -0
  507. data/lib/fog/storm_on_demand/requests/support/get_ticket_details.rb +16 -0
  508. data/lib/fog/storm_on_demand/requests/support/list_ticket_types.rb +16 -0
  509. data/lib/fog/storm_on_demand/requests/support/list_tickets.rb +16 -0
  510. data/lib/fog/storm_on_demand/requests/support/reopen_ticket.rb +16 -0
  511. data/lib/fog/storm_on_demand/requests/support/reply_ticket.rb +16 -0
  512. data/lib/fog/storm_on_demand/requests/vpn/create_vpn.rb +16 -0
  513. data/lib/fog/storm_on_demand/requests/vpn/get_vpn.rb +16 -0
  514. data/lib/fog/storm_on_demand/requests/vpn/list_vpn_users.rb +16 -0
  515. data/lib/fog/storm_on_demand/requests/vpn/update_vpn.rb +16 -0
  516. data/lib/fog/storm_on_demand/shared.rb +55 -0
  517. data/lib/fog/storm_on_demand/storage.rb +69 -0
  518. data/lib/fog/storm_on_demand/support.rb +68 -0
  519. data/lib/fog/storm_on_demand/vpn.rb +58 -0
  520. data/lib/fog/support.rb +26 -0
  521. data/lib/fog/vcloud/compute.rb +6 -0
  522. data/lib/fog/vcloud/models/compute/server.rb +20 -0
  523. data/lib/fog/vcloud/models/compute/tag.rb +18 -0
  524. data/lib/fog/vcloud/models/compute/tags.rb +32 -0
  525. data/lib/fog/vcloud/requests/compute/configure_metadata.rb +36 -0
  526. data/lib/fog/vcloud/requests/compute/configure_vm_customization_script.rb +33 -0
  527. data/lib/fog/vcloud/requests/compute/delete_metadata.rb +10 -0
  528. data/lib/fog/vcloud/requests/compute/get_metadata.rb +10 -0
  529. data/lib/fog/version.rb +1 -1
  530. data/lib/fog/vpn.rb +25 -0
  531. data/lib/fog/vsphere/requests/compute/get_folder.rb +1 -1
  532. data/lib/fog/zerigo/models/dns/record.rb +0 -1
  533. data/lib/fog/zerigo/models/dns/zone.rb +1 -1
  534. data/lib/fog/zerigo/models/dns/zones.rb +2 -2
  535. data/lib/fog/zerigo/requests/dns/list_zones.rb +7 -1
  536. data/lib/tasks/changelog_task.rb +1 -0
  537. data/tests/aws/models/iam/roles_tests.rb +63 -0
  538. data/tests/aws/requests/cloud_formation/stack_tests.rb +10 -0
  539. data/tests/aws/requests/compute/image_tests.rb +20 -0
  540. data/tests/aws/requests/compute/instance_tests.rb +50 -54
  541. data/tests/aws/requests/storage/object_tests.rb +7 -0
  542. data/tests/brightbox/oauth2_tests.rb +8 -1
  543. data/tests/cloudsigma/models/server_tests.rb +72 -0
  544. data/tests/cloudsigma/models/servers_tests.rb +7 -0
  545. data/tests/cloudsigma/models/volume_tests.rb +21 -0
  546. data/tests/cloudsigma/models/volumes_tests.rb +9 -0
  547. data/tests/cloudsigma/requests/server_tests.rb +81 -0
  548. data/tests/cloudsigma/requests/volumes_tests.rb +55 -0
  549. data/tests/dynect/requests/dns/dns_tests.rb +4 -4
  550. data/tests/helper.rb +3 -1
  551. data/tests/helpers/mock_helper.rb +3 -1
  552. data/tests/joyent/requests/compute/networks_tests.rb +39 -0
  553. data/tests/openstack/models/image/images_tests.rb +5 -0
  554. data/tests/openstack/models/network/lb_health_monitor_tests.rb +52 -0
  555. data/tests/openstack/models/network/lb_health_monitors_tests.rb +21 -0
  556. data/tests/openstack/models/network/lb_member_tests.rb +28 -0
  557. data/tests/openstack/models/network/lb_members_tests.rb +21 -0
  558. data/tests/openstack/models/network/lb_pool_tests.rb +53 -0
  559. data/tests/openstack/models/network/lb_pools_tests.rb +20 -0
  560. data/tests/openstack/models/network/lb_vip_tests.rb +39 -0
  561. data/tests/openstack/models/network/lb_vips_tests.rb +21 -0
  562. data/tests/openstack/requests/compute/address_tests.rb +8 -0
  563. data/tests/openstack/requests/compute/flavor_tests.rb +12 -0
  564. data/tests/openstack/requests/network/lb_health_monitor_tests.rb +93 -0
  565. data/tests/openstack/requests/network/lb_member_tests.rb +60 -0
  566. data/tests/openstack/requests/network/lb_pool_tests.rb +80 -0
  567. data/tests/openstack/requests/network/lb_vip_tests.rb +71 -0
  568. data/tests/openstack/requests/storage/large_object_tests.rb +75 -11
  569. data/tests/openvz/helper.rb +41 -0
  570. data/tests/openvz/models/compute/server_tests.rb +56 -0
  571. data/tests/openvz/models/compute/servers_tests.rb +35 -0
  572. data/tests/rackspace/block_storage_tests.rb +6 -3
  573. data/tests/rackspace/cdn_tests.rb +5 -2
  574. data/tests/rackspace/compute_tests.rb +4 -2
  575. data/tests/rackspace/compute_v2_tests.rb +4 -2
  576. data/tests/rackspace/databases_tests.rb +5 -2
  577. data/tests/rackspace/dns_tests.rb +5 -2
  578. data/tests/rackspace/load_balancer_tests.rb +4 -2
  579. data/tests/rackspace/models/load_balancers/load_balancer_tests.rb +2 -0
  580. data/tests/rackspace/models/storage/file_tests.rb +30 -0
  581. data/tests/rackspace/requests/identity/token_tests.rb +9 -0
  582. data/tests/rackspace/requests/load_balancers/helper.rb +2 -0
  583. data/tests/rackspace/requests/load_balancers/load_balancer_tests.rb +2 -1
  584. data/tests/rackspace/requests/storage/large_object_tests.rb +75 -11
  585. data/tests/rackspace/requests/storage/object_tests.rb +32 -2
  586. data/tests/rackspace/storage_tests.rb +5 -2
  587. data/tests/vcloud/requests/compute/disk_configure_tests.rb +7 -2
  588. data/tests/zerigo/requests/dns/dns_tests.rb +59 -13
  589. metadata +394 -30
  590. data/lib/fog/storm_on_demand/models/compute/balancers.rb +0 -21
  591. data/lib/fog/storm_on_demand/models/compute/private_ips.rb +0 -31
  592. data/lib/fog/storm_on_demand/models/compute/stats.rb +0 -22
  593. data/lib/fog/storm_on_demand/requests/compute/get_stats.rb +0 -16
  594. data/tests/core/json_tests.rb +0 -62
@@ -0,0 +1,40 @@
1
+ require 'fog/core/collection'
2
+ require 'fog/aws/models/iam/role'
3
+
4
+ module Fog
5
+ module AWS
6
+ class IAM
7
+
8
+ class Roles < Fog::Collection
9
+
10
+ model Fog::AWS::IAM::Role
11
+
12
+ def initialize(attributes = {})
13
+ super
14
+ end
15
+
16
+ def all
17
+ data = service.list_roles.body['Roles']
18
+ load(data)
19
+ end
20
+
21
+ def get(identity)
22
+ role = nil
23
+ begin
24
+ role = service.roles.new( service.get_role( identity ).data[:body]["Role"] )
25
+ rescue Excon::Errors::NotFound # ignore not found error
26
+ end
27
+ role
28
+ end
29
+
30
+ def new(attributes = {})
31
+ if not attributes.has_key?(:assume_role_policy_document)
32
+ attributes[:assume_role_policy_document] = Fog::AWS::IAM::EC2_ASSUME_ROLE_POLICY.to_s
33
+ end
34
+ super
35
+ end
36
+
37
+ end
38
+ end
39
+ end
40
+ end
@@ -21,10 +21,26 @@ module Fog
21
21
  super
22
22
  end
23
23
 
24
+ # This will return a single page based on the current or provided filters,
25
+ # updating the filters with the marker for the next page. Calling this repeatedly
26
+ # will iterate through pages.
24
27
  def all(filters = filters)
25
- self.filters = filters
26
- data = service.describe_db_snapshots(filters).body['DescribeDBSnapshotsResult']['DBSnapshots']
27
- load(data) # data is an array of attribute hashes
28
+ self.filters.merge!(filters)
29
+
30
+ snapshots = service.describe_db_snapshots(filters)
31
+ self.filters[:marker] = snapshots.body['DescribeDBSnapshotsResult']['Marker']
32
+ data = snapshots.body['DescribeDBSnapshotsResult']['DBSnapshots']
33
+ load(data)
34
+ end
35
+
36
+ # This will execute a block for each snapshot, fetching new pages of snapshots as required.
37
+ def each(filters = filters)
38
+ begin
39
+ page = self.all(filters)
40
+ # We need to explicitly use the base 'each' method here on the page, otherwise we get infinite recursion
41
+ base_each = Fog::Collection.instance_method(:each)
42
+ base_each.bind(page).call {|snapshot| yield snapshot}
43
+ end while self.filters[:marker]
28
44
  end
29
45
 
30
46
  def get(identity)
@@ -178,7 +178,7 @@ module Fog
178
178
  #
179
179
  # @param [Hash] options
180
180
  # @option options [String] acl sets x-amz-acl HTTP header. Valid values include, private | public-read | public-read-write | authenticated-read | bucket-owner-read | bucket-owner-full-control
181
- # @option options [String] cache_controle sets Cache-Control header. For example, 'No-cache'
181
+ # @option options [String] cache_control sets Cache-Control header. For example, 'No-cache'
182
182
  # @option options [String] content_disposition sets Content-Disposition HTTP header. For exampple, 'attachment; filename=testing.txt'
183
183
  # @option options [String] content_encoding sets Content-Encoding HTTP header. For example, 'x-gzip'
184
184
  # @option options [String] content_md5 sets Content-MD5. For example, '79054025255fb1a26e4bc422aef54eb4'
@@ -68,7 +68,7 @@ module Fog
68
68
  })
69
69
  new(file_data)
70
70
  rescue Excon::Errors::NotFound => error
71
- case error.message
71
+ case error.response.body
72
72
  when /<Code>NoSuchKey<\/Code>/
73
73
  nil
74
74
  when /<Code>NoSuchBucket<\/Code>/
@@ -0,0 +1,32 @@
1
+ module Fog
2
+ module Parsers
3
+ module AWS
4
+ module CloudFormation
5
+
6
+ class ListStackResources < Fog::Parsers::Base
7
+
8
+ def reset
9
+ @resource = {}
10
+ @response = { 'StackResourceSummaries' => [] }
11
+ end
12
+
13
+ def end_element(name)
14
+ case name
15
+ when 'ResourceStatus', 'LogicalResourceId', 'PhysicalResourceId', 'ResourceType'
16
+ @resource[name] = value
17
+ when 'member'
18
+ @response['StackResourceSummaries'] << @resource
19
+ @resource = {}
20
+ when 'LastUpdatedTimestamp'
21
+ @resource[name] = Time.parse(value)
22
+ when 'RequestId'
23
+ @response[name] = value
24
+ when 'NextToken'
25
+ @response[name] = value
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,34 @@
1
+ module Fog
2
+ module Parsers
3
+ module AWS
4
+ module CloudFormation
5
+
6
+ class ListStacks < Fog::Parsers::Base
7
+
8
+ def reset
9
+ @stack = {}
10
+ @response = { 'StackSummaries' => [] }
11
+ end
12
+
13
+ def end_element(name)
14
+ case name
15
+ when 'StackId', 'StackStatus', 'StackName', 'TemplateDescription'
16
+ @stack[name] = value
17
+ when 'member'
18
+ @response['StackSummaries'] << @stack
19
+ @stack = {}
20
+ when 'RequestId'
21
+ @response[name] = value
22
+ when 'CreationTime'
23
+ @stack[name] = Time.parse(value)
24
+ when 'DeletionTime'
25
+ @stack[name] = Time.parse(value)
26
+ when 'NextToken'
27
+ @response[name] = value
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,22 @@
1
+ module Fog
2
+ module Parsers
3
+ module Compute
4
+ module AWS
5
+
6
+ class CopyImage < Fog::Parsers::Base
7
+
8
+ def end_element(name)
9
+ case name
10
+ when 'imageId'
11
+ @response[name] = value
12
+ when 'requestId'
13
+ @response[name] = value
14
+ end
15
+ end
16
+
17
+ end
18
+
19
+ end
20
+ end
21
+ end
22
+ end
@@ -31,10 +31,11 @@ module Fog
31
31
  @instance[@context.last][name] = value
32
32
  when 'availabilityZone', 'tenancy'
33
33
  @instance['placement'][name] = value
34
- when 'architecture', 'clientToken', 'dnsName', 'imageId',
35
- 'instanceId', 'instanceType', 'ipAddress', 'kernelId',
36
- 'keyName', 'platform', 'privateDnsName', 'privateIpAddress', 'ramdiskId',
37
- 'reason', 'rootDeviceType', 'virtualizationType'
34
+ when 'architecture', 'clientToken', 'dnsName', 'hypervisor', 'imageId',
35
+ 'instanceId', 'instanceType', 'ipAddress', 'kernelId', 'keyName',
36
+ 'instanceLifecycle', 'platform', 'privateDnsName', 'privateIpAddress', 'ramdiskId',
37
+ 'reason', 'requesterId', 'rootDeviceType',
38
+ 'spotInstanceRequestId', 'virtualizationType'
38
39
  @instance[name] = value
39
40
  when 'attachTime'
40
41
  @block_device_mapping[name] = Time.parse(value)
@@ -103,6 +104,12 @@ module Fog
103
104
  @instance['monitoring'][name] = (value == 'enabled')
104
105
  when 'ebsOptimized'
105
106
  @instance['ebsOptimized'] = (value == 'true')
107
+ when 'sourceDestCheck'
108
+ if value == 'true'
109
+ @instance[name] = true
110
+ else
111
+ @instance[name] = false
112
+ end
106
113
  # Eucalyptus passes status in schema non conforming way
107
114
  when 'stateCode'
108
115
  @instance['instanceState']['code'] = value
@@ -24,10 +24,11 @@ module Fog
24
24
  case name
25
25
  when 'amiLaunchIndex'
26
26
  @instance[name] = value.to_i
27
- when 'architecture', 'clientToken', 'dnsName', 'imageId',
28
- 'instanceId', 'instanceType', 'ipAddress', 'kernelId',
29
- 'keyName', 'privateDnsName', 'privateIpAddress', 'ramdiskId',
30
- 'reason', 'rootDeviceType'
27
+ when 'architecture', 'clientToken', 'dnsName', 'hypervisor', 'imageId',
28
+ 'instanceId', 'instanceType', 'ipAddress', 'kernelId', 'keyName',
29
+ 'instanceLifecycle', 'privateDnsName', 'privateIpAddress', 'ramdiskId',
30
+ 'reason', 'requesterId', 'rootDeviceType', 'sourceDestCheck',
31
+ 'spotInstanceRequestId', 'virtualizationType'
31
32
  @instance[name] = value
32
33
  when 'availabilityZone', 'tenancy'
33
34
  @instance['placement'][name] = value
@@ -23,6 +23,8 @@ module Fog
23
23
  @response['HostedZone'] = @hosted_zone
24
24
  @hosted_zone = {}
25
25
  @section = :name_servers
26
+ when 'ResourceRecordSetCount'
27
+ @response['ResourceRecordSetCount'] = value.to_i
26
28
  end
27
29
  elsif @section == :name_servers
28
30
  case name
@@ -206,7 +206,7 @@ module Fog
206
206
  :parser => parser
207
207
  })
208
208
  rescue Excon::Errors::HTTPStatusError => error
209
- if match = error.message.match(/(?:.*<Code>(.*)<\/Code>)(?:.*<Message>(.*)<\/Message>)/m)
209
+ if match = error.response.body.match(/(?:.*<Code>(.*)<\/Code>)(?:.*<Message>(.*)<\/Message>)/m)
210
210
  case match[1].split('.').last
211
211
  when 'DBInstanceNotFound', 'DBParameterGroupNotFound', 'DBSnapshotNotFound', 'DBSecurityGroupNotFound'
212
212
  raise Fog::AWS::RDS::NotFound.slurp(error, match[2])
@@ -0,0 +1,36 @@
1
+ module Fog
2
+ module AWS
3
+ class CloudFormation
4
+ class Real
5
+
6
+ require 'fog/aws/parsers/cloud_formation/list_stack_resources'
7
+
8
+ # List stack resources.
9
+ #
10
+ # @param options [Hash]
11
+ # @option options StackName [String] Name of the stack to describe.
12
+ #
13
+ # @return [Excon::Response]
14
+ # * body [Hash]:
15
+ # * StackResourceSummaries [Array] - Matching stacks
16
+ # * resources [Hash]:
17
+ # * ResourceStatus [String] -
18
+ # * LogicalResourceId [String] -
19
+ # * PhysicalResourceId [String] -
20
+ # * ResourceType [String] -
21
+ # * LastUpdatedTimestamp [Time] -
22
+ #
23
+ #
24
+ # @see http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ListStacks.html
25
+
26
+ def list_stack_resources(options = {})
27
+ request({
28
+ 'Action' => 'ListStackResources',
29
+ :parser => Fog::Parsers::AWS::CloudFormation::ListStackResources.new
30
+ }.merge!(options))
31
+ end
32
+
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,37 @@
1
+ module Fog
2
+ module AWS
3
+ class CloudFormation
4
+ class Real
5
+
6
+ require 'fog/aws/parsers/cloud_formation/list_stacks'
7
+
8
+ # List stacks.
9
+ #
10
+ # @param options [Hash]
11
+ #
12
+ # @return [Excon::Response]
13
+ # * body [Hash]:
14
+ # * StackSummaries [Array] - Matching stacks
15
+ # * stack [Hash]:
16
+ # * StackId [String] -
17
+ # * StackName [String] -
18
+ # * TemplateDescription [String] -
19
+ # * CreationTime [Time] -
20
+ # * DeletionTime [Time] -
21
+ # * StackStatus [String] -
22
+ # * DeletionTime [String] -
23
+ #
24
+ #
25
+ # @see http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ListStacks.html
26
+
27
+ def list_stacks(options = {})
28
+ request({
29
+ 'Action' => 'ListStacks',
30
+ :parser => Fog::Parsers::AWS::CloudFormation::ListStacks.new
31
+ }.merge!(options))
32
+ end
33
+
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,63 @@
1
+ module Fog
2
+ module Compute
3
+ class AWS
4
+ class Real
5
+
6
+ require 'fog/aws/parsers/compute/copy_image'
7
+
8
+ # Copy an image to a different region
9
+ #
10
+ # ==== Parameters
11
+ # * source_image_id<~String> - The ID of the AMI to copy
12
+ # * source_region<~String> - The name of the AWS region that contains the AMI to be copied
13
+ # * name<~String> - The name of the new AMI in the destination region
14
+ # * description<~String> - The description to set on the new AMI in the destination region
15
+ # * client_token<~String> - Unique, case-sensitive identifier you provide to ensure idempotency of the request
16
+ #
17
+ # ==== Returns
18
+ # * response<~Excon::Response>:
19
+ # * body<~Hash>:
20
+ # * 'requestId'<~String> - id of request
21
+ # * 'imageId'<~String> - id of image
22
+ #
23
+ # {Amazon API Reference}[http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-CopyImage.html]
24
+ def copy_image(source_image_id, source_region, name = nil, description = nil, client_token = nil)
25
+ request(
26
+ 'Action' => 'CopyImage',
27
+ 'SourceImageId' => source_image_id,
28
+ 'SourceRegion' => source_region,
29
+ 'Name' => source_region,
30
+ 'Description' => description,
31
+ 'ClientToken' => client_token,
32
+ :parser => Fog::Parsers::Compute::AWS::CopyImage.new
33
+ )
34
+ end
35
+
36
+ end
37
+
38
+ class Mock
39
+
40
+ #
41
+ # Usage
42
+ #
43
+ # AWS[:compute].copy_image("ami-1aad5273", 'us-east-1')
44
+ #
45
+
46
+ def copy_image(source_image_id, source_region, name = nil, description = nil, client_token = nil)
47
+ response = Excon::Response.new
48
+ response.status = 200
49
+ image_id = Fog::AWS::Mock.image_id
50
+ data = {
51
+ 'imageId' => image_id,
52
+ }
53
+ self.data[:images][image_id] = data
54
+ response.body = {
55
+ 'requestId' => Fog::AWS::Mock.request_id
56
+ }.merge!(data)
57
+ response
58
+ end
59
+
60
+ end
61
+ end
62
+ end
63
+ end
@@ -212,7 +212,7 @@ module Fog
212
212
  'ownerId' => instance['ownerId'],
213
213
  'reservationId' => instance['reservationId']
214
214
  }
215
- reservation_set[instance['reservationId']]['instancesSet'] << instance.reject{|key,value| !['amiLaunchIndex', 'architecture', 'blockDeviceMapping', 'clientToken', 'dnsName', 'ebsOptimized', 'iamInstanceProfile', 'imageId', 'instanceId', 'instanceState', 'instanceType', 'ipAddress', 'kernelId', 'keyName', 'launchTime', 'monitoring', 'networkInterfaces', 'ownerId', 'placement', 'platform', 'privateDnsName', 'privateIpAddress', 'productCodes', 'ramdiskId', 'reason', 'rootDeviceType', 'stateReason'].include?(key)}.merge('tagSet' => self.data[:tag_sets][instance['instanceId']])
215
+ reservation_set[instance['reservationId']]['instancesSet'] << instance.reject{|key,value| !['amiLaunchIndex', 'architecture', 'blockDeviceMapping', 'clientToken', 'dnsName', 'ebsOptimized', 'hypervisor', 'iamInstanceProfile', 'imageId', 'instanceId', 'instanceState', 'instanceType', 'ipAddress', 'kernelId', 'keyName', 'launchTime', 'monitoring', 'networkInterfaces', 'ownerId', 'placement', 'platform', 'privateDnsName', 'privateIpAddress', 'productCodes', 'ramdiskId', 'reason', 'rootDeviceType', 'stateReason', 'virtualizationType'].include?(key)}.merge('tagSet' => self.data[:tag_sets][instance['instanceId']])
216
216
  end
217
217
  end
218
218
 
@@ -143,6 +143,8 @@ module Fog
143
143
  'blockDeviceMapping' => [],
144
144
  'clientToken' => options['clientToken'],
145
145
  'dnsName' => nil,
146
+ 'ebsOptimized' => options['EbsOptimized'] || false,
147
+ 'hypervisor' => 'xen',
146
148
  'imageId' => image_id,
147
149
  'instanceId' => instance_id,
148
150
  'instanceState' => { 'code' => 0, 'name' => 'pending' },
@@ -156,7 +158,7 @@ module Fog
156
158
  'productCodes' => [],
157
159
  'reason' => nil,
158
160
  'rootDeviceType' => 'instance-store',
159
- 'ebsOptimized' => options['EbsOptimized'] || false
161
+ 'virtualizationType' => 'paravirtual'
160
162
  }
161
163
  instances_set << instance
162
164
  self.data[:instances][instance_id] = instance.merge({
@@ -0,0 +1,54 @@
1
+ module Fog
2
+ module Storage
3
+ class AWS
4
+ class Real
5
+
6
+ # Restore an object from Glacier to its original S3 path
7
+ #
8
+ # @param bucket_name [String] Name of bucket containing object
9
+ # @param object_name [String] Name of object to restore
10
+ # @option days [Integer] Number of days to restore object for. Defaults to 100000 (a very long time)
11
+ #
12
+ # @return [Excon::Response] response:
13
+ # * status [Integer] 200 (OK) Object is previously restored
14
+ # * status [Integer] 202 (Accepted) Object is not previously restored
15
+ # * status [Integer] 409 (Conflict) Restore is already in progress
16
+ #
17
+ # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPOSTrestore.html
18
+ #
19
+ def post_object_restore(bucket_name, object_name, days = 100000)
20
+ raise ArgumentError.new('bucket_name is required') unless bucket_name
21
+ raise ArgumentError.new('object_name is required') unless object_name
22
+
23
+ data = '<RestoreRequest xmlns="http://s3.amazonaws.com/doc/2006-3-01"><Days>' + days.to_s + '</Days></RestoreRequest>'
24
+
25
+ headers = {}
26
+ headers['Content-MD5'] = Base64.encode64(Digest::MD5.digest(data)).strip
27
+ headers['Content-Type'] = 'application/xml'
28
+ headers['Date'] = Fog::Time.now.to_date_header
29
+
30
+ request({
31
+ :headers => headers,
32
+ :host => "#{bucket_name}.#{@host}",
33
+ :expects => [200, 202, 409],
34
+ :body => data,
35
+ :method => 'POST',
36
+ :query => {'restore' => nil},
37
+ :path => CGI.escape(object_name)
38
+ })
39
+ end
40
+
41
+ end
42
+
43
+ class Mock # :nodoc:all
44
+
45
+ def post_object_restore(bucket_name, object_name, days = 100000)
46
+ response = get_object(bucket_name, object_name)
47
+ response.body = nil
48
+ response
49
+ end
50
+
51
+ end
52
+ end
53
+ end
54
+ end