fog 0.2.30 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (531) hide show
  1. data/Gemfile.lock +8 -8
  2. data/README.rdoc +15 -6
  3. data/Rakefile +12 -19
  4. data/bin/fog +12 -10
  5. data/fog.gemspec +298 -286
  6. data/lib/fog.rb +22 -12
  7. data/lib/fog/attributes.rb +2 -6
  8. data/lib/fog/aws.rb +10 -5
  9. data/lib/fog/aws/bin.rb +29 -65
  10. data/lib/fog/aws/compute.rb +220 -0
  11. data/lib/fog/aws/ec2.rb +9 -216
  12. data/lib/fog/aws/elb.rb +9 -12
  13. data/lib/fog/aws/models/{ec2 → compute}/address.rb +3 -3
  14. data/lib/fog/aws/models/{ec2 → compute}/addresses.rb +3 -11
  15. data/lib/fog/aws/models/{ec2 → compute}/flavor.rb +2 -2
  16. data/lib/fog/aws/models/compute/flavors.rb +39 -0
  17. data/lib/fog/aws/models/compute/image.rb +44 -0
  18. data/lib/fog/aws/models/{ec2 → compute}/images.rb +3 -9
  19. data/lib/fog/aws/models/compute/key_pair.rb +44 -0
  20. data/lib/fog/aws/models/{ec2 → compute}/key_pairs.rb +3 -9
  21. data/lib/fog/aws/models/{ec2 → compute}/security_group.rb +28 -6
  22. data/lib/fog/aws/models/{ec2 → compute}/security_groups.rb +3 -9
  23. data/lib/fog/aws/models/{ec2 → compute}/server.rb +65 -38
  24. data/lib/fog/aws/models/compute/servers.rb +80 -0
  25. data/lib/fog/aws/models/{ec2 → compute}/snapshot.rb +7 -7
  26. data/lib/fog/aws/models/{ec2 → compute}/snapshots.rb +5 -13
  27. data/lib/fog/aws/models/{ec2 → compute}/volume.rb +8 -8
  28. data/lib/fog/aws/models/{ec2 → compute}/volumes.rb +3 -11
  29. data/lib/fog/aws/models/{s3 → storage}/directories.rb +3 -9
  30. data/lib/fog/aws/models/{s3 → storage}/directory.rb +5 -5
  31. data/lib/fog/aws/models/{s3 → storage}/file.rb +9 -9
  32. data/lib/fog/aws/models/{s3 → storage}/files.rb +13 -8
  33. data/lib/fog/aws/parsers/{ec2 → compute}/allocate_address.rb +1 -1
  34. data/lib/fog/aws/parsers/{ec2 → compute}/attach_volume.rb +1 -1
  35. data/lib/fog/aws/parsers/{ec2 → compute}/basic.rb +1 -1
  36. data/lib/fog/aws/parsers/{ec2 → compute}/create_image.rb +1 -1
  37. data/lib/fog/aws/parsers/{ec2 → compute}/create_key_pair.rb +1 -1
  38. data/lib/fog/aws/parsers/{ec2 → compute}/create_snapshot.rb +2 -2
  39. data/lib/fog/aws/parsers/{ec2 → compute}/create_volume.rb +1 -1
  40. data/lib/fog/aws/parsers/{ec2 → compute}/deregister_image.rb +1 -1
  41. data/lib/fog/aws/parsers/{ec2 → compute}/describe_addresses.rb +1 -1
  42. data/lib/fog/aws/parsers/{ec2 → compute}/describe_availability_zones.rb +2 -2
  43. data/lib/fog/aws/parsers/{ec2 → compute}/describe_images.rb +1 -1
  44. data/lib/fog/aws/parsers/{ec2 → compute}/describe_instances.rb +1 -1
  45. data/lib/fog/aws/parsers/{ec2 → compute}/describe_key_pairs.rb +1 -1
  46. data/lib/fog/aws/parsers/{ec2 → compute}/describe_regions.rb +2 -2
  47. data/lib/fog/aws/parsers/{ec2 → compute}/describe_reserved_instances.rb +1 -1
  48. data/lib/fog/aws/parsers/{ec2 → compute}/describe_security_groups.rb +1 -1
  49. data/lib/fog/aws/parsers/{ec2 → compute}/describe_snapshots.rb +1 -1
  50. data/lib/fog/aws/parsers/{ec2 → compute}/describe_volumes.rb +1 -1
  51. data/lib/fog/aws/parsers/{ec2 → compute}/detach_volume.rb +1 -1
  52. data/lib/fog/aws/parsers/{ec2 → compute}/get_console_output.rb +2 -2
  53. data/lib/fog/aws/parsers/compute/import_key_pair.rb +20 -0
  54. data/lib/fog/aws/parsers/{ec2 → compute}/register_image.rb +1 -1
  55. data/lib/fog/aws/parsers/{ec2 → compute}/run_instances.rb +1 -1
  56. data/lib/fog/aws/parsers/{ec2 → compute}/start_stop_instances.rb +1 -1
  57. data/lib/fog/aws/parsers/{ec2 → compute}/terminate_instances.rb +1 -1
  58. data/lib/fog/aws/parsers/{s3 → storage}/access_control_list.rb +1 -1
  59. data/lib/fog/aws/parsers/{s3 → storage}/copy_object.rb +1 -1
  60. data/lib/fog/aws/parsers/{s3 → storage}/get_bucket.rb +1 -1
  61. data/lib/fog/aws/parsers/{s3 → storage}/get_bucket_location.rb +1 -1
  62. data/lib/fog/aws/parsers/{s3 → storage}/get_bucket_logging.rb +1 -1
  63. data/lib/fog/aws/parsers/{s3 → storage}/get_bucket_object_versions.rb +1 -1
  64. data/lib/fog/aws/parsers/{s3 → storage}/get_bucket_versioning.rb +1 -1
  65. data/lib/fog/aws/parsers/{s3 → storage}/get_request_payment.rb +1 -1
  66. data/lib/fog/aws/parsers/{s3 → storage}/get_service.rb +1 -1
  67. data/lib/fog/aws/requests/{ec2 → compute}/allocate_address.rb +3 -3
  68. data/lib/fog/aws/requests/{ec2 → compute}/associate_address.rb +4 -4
  69. data/lib/fog/aws/requests/{ec2 → compute}/attach_volume.rb +6 -6
  70. data/lib/fog/aws/requests/{ec2 → compute}/authorize_security_group_ingress.rb +3 -3
  71. data/lib/fog/aws/requests/{ec2 → compute}/create_image.rb +3 -3
  72. data/lib/fog/aws/requests/{ec2 → compute}/create_key_pair.rb +4 -4
  73. data/lib/fog/aws/requests/{ec2 → compute}/create_security_group.rb +3 -3
  74. data/lib/fog/aws/requests/{ec2 → compute}/create_snapshot.rb +3 -3
  75. data/lib/fog/aws/requests/{ec2 → compute}/create_volume.rb +3 -3
  76. data/lib/fog/aws/requests/{ec2 → compute}/delete_key_pair.rb +2 -2
  77. data/lib/fog/aws/requests/{ec2 → compute}/delete_security_group.rb +3 -3
  78. data/lib/fog/aws/requests/{ec2 → compute}/delete_snapshot.rb +3 -3
  79. data/lib/fog/aws/requests/{ec2 → compute}/delete_volume.rb +4 -4
  80. data/lib/fog/aws/requests/{ec2 → compute}/deregister_image.rb +4 -4
  81. data/lib/fog/aws/requests/{ec2 → compute}/describe_addresses.rb +4 -4
  82. data/lib/fog/aws/requests/{ec2 → compute}/describe_availability_zones.rb +4 -4
  83. data/lib/fog/aws/requests/{ec2 → compute}/describe_images.rb +3 -3
  84. data/lib/fog/aws/requests/{ec2 → compute}/describe_instances.rb +4 -4
  85. data/lib/fog/aws/requests/{ec2 → compute}/describe_key_pairs.rb +4 -4
  86. data/lib/fog/aws/requests/{ec2 → compute}/describe_regions.rb +4 -4
  87. data/lib/fog/aws/requests/{ec2 → compute}/describe_reserved_instances.rb +3 -3
  88. data/lib/fog/aws/requests/{ec2 → compute}/describe_security_groups.rb +4 -4
  89. data/lib/fog/aws/requests/{ec2 → compute}/describe_snapshots.rb +4 -4
  90. data/lib/fog/aws/requests/{ec2 → compute}/describe_volumes.rb +4 -4
  91. data/lib/fog/aws/requests/{ec2 → compute}/detach_volume.rb +4 -4
  92. data/lib/fog/aws/requests/{ec2 → compute}/disassociate_address.rb +3 -3
  93. data/lib/fog/aws/requests/{ec2 → compute}/get_console_output.rb +4 -4
  94. data/lib/fog/aws/requests/compute/import_key_pair.rb +54 -0
  95. data/lib/fog/aws/requests/{ec2 → compute}/modify_image_attributes.rb +2 -2
  96. data/lib/fog/aws/requests/{ec2 → compute}/modify_snapshot_attribute.rb +2 -2
  97. data/lib/fog/aws/requests/{ec2 → compute}/reboot_instances.rb +3 -3
  98. data/lib/fog/aws/requests/{ec2 → compute}/register_image.rb +4 -4
  99. data/lib/fog/aws/requests/{ec2 → compute}/release_address.rb +3 -3
  100. data/lib/fog/aws/requests/{ec2 → compute}/revoke_security_group_ingress.rb +3 -3
  101. data/lib/fog/aws/requests/{ec2 → compute}/run_instances.rb +4 -3
  102. data/lib/fog/aws/requests/{ec2 → compute}/start_instances.rb +3 -3
  103. data/lib/fog/aws/requests/{ec2 → compute}/stop_instances.rb +3 -3
  104. data/lib/fog/aws/requests/{ec2 → compute}/terminate_instances.rb +4 -4
  105. data/lib/fog/aws/requests/elb/create_load_balancer.rb +1 -1
  106. data/lib/fog/aws/requests/elb/delete_load_balancer.rb +1 -1
  107. data/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb +1 -1
  108. data/lib/fog/aws/requests/elb/describe_instance_health.rb +1 -1
  109. data/lib/fog/aws/requests/elb/describe_load_balancers.rb +1 -1
  110. data/lib/fog/aws/requests/elb/disable_availability_zones_for_load_balancer.rb +1 -1
  111. data/lib/fog/aws/requests/elb/enable_availability_zones_for_load_balancer.rb +1 -1
  112. data/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +1 -1
  113. data/lib/fog/aws/requests/simpledb/batch_put_attributes.rb +1 -1
  114. data/lib/fog/aws/requests/simpledb/create_domain.rb +1 -1
  115. data/lib/fog/aws/requests/simpledb/delete_attributes.rb +1 -1
  116. data/lib/fog/aws/requests/simpledb/delete_domain.rb +1 -1
  117. data/lib/fog/aws/requests/simpledb/domain_metadata.rb +1 -1
  118. data/lib/fog/aws/requests/simpledb/get_attributes.rb +1 -1
  119. data/lib/fog/aws/requests/simpledb/list_domains.rb +1 -1
  120. data/lib/fog/aws/requests/simpledb/put_attributes.rb +1 -1
  121. data/lib/fog/aws/requests/simpledb/select.rb +1 -1
  122. data/lib/fog/aws/requests/{s3 → storage}/copy_object.rb +3 -3
  123. data/lib/fog/aws/requests/{s3 → storage}/delete_bucket.rb +1 -1
  124. data/lib/fog/aws/requests/{s3 → storage}/delete_object.rb +2 -2
  125. data/lib/fog/aws/requests/{s3 → storage}/get_bucket.rb +3 -3
  126. data/lib/fog/aws/requests/{s3 → storage}/get_bucket_acl.rb +3 -3
  127. data/lib/fog/aws/requests/{s3 → storage}/get_bucket_location.rb +3 -3
  128. data/lib/fog/aws/requests/{s3 → storage}/get_bucket_logging.rb +3 -3
  129. data/lib/fog/aws/requests/{s3 → storage}/get_bucket_object_versions.rb +3 -3
  130. data/lib/fog/aws/requests/{s3 → storage}/get_bucket_versioning.rb +3 -3
  131. data/lib/fog/aws/requests/{s3 → storage}/get_object.rb +1 -1
  132. data/lib/fog/aws/requests/{s3 → storage}/get_object_acl.rb +3 -3
  133. data/lib/fog/aws/requests/{s3 → storage}/get_object_torrent.rb +1 -1
  134. data/lib/fog/aws/requests/{s3 → storage}/get_object_url.rb +1 -1
  135. data/lib/fog/aws/requests/{s3 → storage}/get_request_payment.rb +3 -3
  136. data/lib/fog/aws/requests/{s3 → storage}/get_service.rb +3 -3
  137. data/lib/fog/aws/requests/{s3 → storage}/head_object.rb +1 -1
  138. data/lib/fog/aws/requests/{s3 → storage}/put_bucket.rb +1 -1
  139. data/lib/fog/aws/requests/{s3 → storage}/put_bucket_acl.rb +1 -1
  140. data/lib/fog/aws/requests/{s3 → storage}/put_bucket_logging.rb +1 -1
  141. data/lib/fog/aws/requests/{s3 → storage}/put_bucket_versioning.rb +1 -1
  142. data/lib/fog/aws/requests/{s3 → storage}/put_object.rb +1 -1
  143. data/lib/fog/aws/requests/{s3 → storage}/put_object_url.rb +1 -1
  144. data/lib/fog/aws/requests/{s3 → storage}/put_request_payment.rb +1 -1
  145. data/lib/fog/aws/s3.rb +8 -205
  146. data/lib/fog/aws/simpledb.rb +10 -13
  147. data/lib/fog/aws/storage.rb +209 -0
  148. data/lib/fog/bin.rb +59 -50
  149. data/lib/fog/bluebox.rb +9 -78
  150. data/lib/fog/bluebox/bin.rb +10 -28
  151. data/lib/fog/bluebox/compute.rb +87 -0
  152. data/lib/fog/bluebox/models/compute/flavor.rb +45 -0
  153. data/lib/fog/bluebox/models/compute/flavors.rb +28 -0
  154. data/lib/fog/bluebox/models/compute/image.rb +19 -0
  155. data/lib/fog/bluebox/models/compute/images.rb +28 -0
  156. data/lib/fog/bluebox/models/compute/server.rb +81 -0
  157. data/lib/fog/bluebox/models/compute/servers.rb +29 -0
  158. data/lib/fog/bluebox/requests/compute/create_block.rb +41 -0
  159. data/lib/fog/bluebox/requests/compute/destroy_block.rb +34 -0
  160. data/lib/fog/bluebox/requests/compute/get_block.rb +34 -0
  161. data/lib/fog/bluebox/requests/compute/get_blocks.rb +36 -0
  162. data/lib/fog/bluebox/requests/compute/get_product.rb +34 -0
  163. data/lib/fog/bluebox/requests/compute/get_products.rb +33 -0
  164. data/lib/fog/bluebox/requests/compute/get_template.rb +34 -0
  165. data/lib/fog/bluebox/requests/compute/get_templates.rb +34 -0
  166. data/lib/fog/bluebox/requests/compute/reboot_block.rb +35 -0
  167. data/lib/fog/go_grid.rb +9 -88
  168. data/lib/fog/go_grid/bin.rb +17 -22
  169. data/lib/fog/go_grid/compute.rb +96 -0
  170. data/lib/fog/go_grid/requests/compute/common_lookup_list.rb +36 -0
  171. data/lib/fog/go_grid/requests/compute/grid_image_list.rb +39 -0
  172. data/lib/fog/go_grid/requests/compute/grid_ip_list.rb +38 -0
  173. data/lib/fog/go_grid/requests/compute/grid_loadbalancer_list.rb +36 -0
  174. data/lib/fog/go_grid/requests/compute/grid_server_add.rb +44 -0
  175. data/lib/fog/go_grid/requests/compute/grid_server_delete.rb +33 -0
  176. data/lib/fog/go_grid/requests/compute/grid_server_get.rb +33 -0
  177. data/lib/fog/go_grid/requests/compute/grid_server_list.rb +38 -0
  178. data/lib/fog/go_grid/requests/compute/grid_server_power.rb +34 -0
  179. data/lib/fog/linode.rb +10 -71
  180. data/lib/fog/linode/bin.rb +17 -22
  181. data/lib/fog/linode/compute.rb +79 -0
  182. data/lib/fog/linode/requests/compute/avail_datacenters.rb +31 -0
  183. data/lib/fog/linode/requests/compute/avail_distributions.rb +38 -0
  184. data/lib/fog/linode/requests/compute/avail_kernels.rb +36 -0
  185. data/lib/fog/linode/requests/compute/avail_linodeplans.rb +35 -0
  186. data/lib/fog/linode/requests/compute/avail_stackscripts.rb +37 -0
  187. data/lib/fog/linode/requests/compute/linode_create.rb +41 -0
  188. data/lib/fog/linode/requests/compute/linode_delete.rb +36 -0
  189. data/lib/fog/linode/requests/compute/linode_list.rb +38 -0
  190. data/lib/fog/linode/requests/compute/linode_reboot.rb +36 -0
  191. data/lib/fog/local.rb +10 -51
  192. data/lib/fog/local/bin.rb +17 -26
  193. data/lib/fog/local/models/storage/directories.rb +33 -0
  194. data/lib/fog/local/models/storage/directory.rb +52 -0
  195. data/lib/fog/local/models/storage/file.rb +60 -0
  196. data/lib/fog/local/models/storage/files.rb +73 -0
  197. data/lib/fog/local/storage.rb +58 -0
  198. data/lib/fog/model.rb +1 -1
  199. data/lib/fog/new_servers.rb +9 -80
  200. data/lib/fog/new_servers/bin.rb +17 -22
  201. data/lib/fog/new_servers/compute.rb +88 -0
  202. data/lib/fog/new_servers/requests/compute/add_server.rb +41 -0
  203. data/lib/fog/new_servers/requests/compute/cancel_server.rb +38 -0
  204. data/lib/fog/new_servers/requests/compute/get_server.rb +44 -0
  205. data/lib/fog/new_servers/requests/compute/list_images.rb +35 -0
  206. data/lib/fog/new_servers/requests/compute/list_plans.rb +38 -0
  207. data/lib/fog/new_servers/requests/compute/list_servers.rb +44 -0
  208. data/lib/fog/new_servers/requests/compute/reboot_server.rb +32 -0
  209. data/lib/fog/provider.rb +18 -0
  210. data/lib/fog/rackspace.rb +8 -3
  211. data/lib/fog/rackspace/bin.rb +26 -41
  212. data/lib/fog/rackspace/compute.rb +107 -0
  213. data/lib/fog/rackspace/files.rb +9 -130
  214. data/lib/fog/rackspace/models/{servers → compute}/flavor.rb +1 -1
  215. data/lib/fog/rackspace/models/{servers → compute}/flavors.rb +4 -10
  216. data/lib/fog/rackspace/models/{servers → compute}/image.rb +4 -4
  217. data/lib/fog/rackspace/models/{servers → compute}/images.rb +4 -12
  218. data/lib/fog/rackspace/models/{servers → compute}/server.rb +20 -16
  219. data/lib/fog/rackspace/models/{servers → compute}/servers.rb +5 -11
  220. data/lib/fog/rackspace/models/{files → storage}/directories.rb +4 -10
  221. data/lib/fog/rackspace/models/{files → storage}/directory.rb +4 -4
  222. data/lib/fog/rackspace/models/{files → storage}/file.rb +6 -6
  223. data/lib/fog/rackspace/models/{files → storage}/files.rb +11 -15
  224. data/lib/fog/rackspace/requests/{servers → compute}/create_image.rb +1 -1
  225. data/lib/fog/rackspace/requests/{servers → compute}/create_server.rb +1 -1
  226. data/lib/fog/rackspace/requests/{servers → compute}/delete_image.rb +1 -1
  227. data/lib/fog/rackspace/requests/{servers → compute}/delete_server.rb +2 -2
  228. data/lib/fog/rackspace/requests/{servers → compute}/get_flavor_details.rb +1 -1
  229. data/lib/fog/rackspace/requests/{servers → compute}/get_image_details.rb +1 -1
  230. data/lib/fog/rackspace/requests/{servers → compute}/get_server_details.rb +2 -2
  231. data/lib/fog/rackspace/requests/{servers → compute}/list_addresses.rb +2 -2
  232. data/lib/fog/rackspace/requests/{servers → compute}/list_flavors.rb +1 -1
  233. data/lib/fog/rackspace/requests/{servers → compute}/list_flavors_detail.rb +1 -1
  234. data/lib/fog/rackspace/requests/{servers → compute}/list_images.rb +1 -1
  235. data/lib/fog/rackspace/requests/{servers → compute}/list_images_detail.rb +1 -1
  236. data/lib/fog/rackspace/requests/{servers → compute}/list_private_addresses.rb +2 -2
  237. data/lib/fog/rackspace/requests/{servers → compute}/list_public_addresses.rb +2 -2
  238. data/lib/fog/rackspace/requests/{servers → compute}/list_servers.rb +1 -1
  239. data/lib/fog/rackspace/requests/{servers → compute}/list_servers_detail.rb +1 -1
  240. data/lib/fog/rackspace/requests/{servers → compute}/reboot_server.rb +1 -1
  241. data/lib/fog/rackspace/requests/{servers → compute}/update_server.rb +2 -2
  242. data/lib/fog/rackspace/requests/{files → storage}/delete_container.rb +1 -1
  243. data/lib/fog/rackspace/requests/{files → storage}/delete_object.rb +1 -1
  244. data/lib/fog/rackspace/requests/{files → storage}/get_container.rb +1 -1
  245. data/lib/fog/rackspace/requests/{files → storage}/get_containers.rb +1 -1
  246. data/lib/fog/rackspace/requests/{files → storage}/get_object.rb +1 -1
  247. data/lib/fog/rackspace/requests/{files → storage}/head_container.rb +1 -1
  248. data/lib/fog/rackspace/requests/{files → storage}/head_containers.rb +1 -1
  249. data/lib/fog/rackspace/requests/{files → storage}/head_object.rb +1 -1
  250. data/lib/fog/rackspace/requests/{files → storage}/put_container.rb +1 -1
  251. data/lib/fog/rackspace/requests/{files → storage}/put_object.rb +1 -1
  252. data/lib/fog/rackspace/servers.rb +9 -104
  253. data/lib/fog/rackspace/storage.rb +151 -0
  254. data/lib/fog/service.rb +111 -59
  255. data/lib/fog/slicehost.rb +9 -83
  256. data/lib/fog/slicehost/bin.rb +17 -34
  257. data/lib/fog/slicehost/compute.rb +91 -0
  258. data/lib/fog/slicehost/models/compute/flavor.rb +45 -0
  259. data/lib/fog/slicehost/models/compute/flavors.rb +28 -0
  260. data/lib/fog/slicehost/models/compute/image.rb +17 -0
  261. data/lib/fog/slicehost/models/compute/images.rb +27 -0
  262. data/lib/fog/slicehost/models/compute/server.rb +64 -0
  263. data/lib/fog/slicehost/models/compute/servers.rb +31 -0
  264. data/lib/fog/slicehost/parsers/compute/create_slice.rb +31 -0
  265. data/lib/fog/slicehost/parsers/compute/get_backups.rb +32 -0
  266. data/lib/fog/slicehost/parsers/compute/get_flavor.rb +26 -0
  267. data/lib/fog/slicehost/parsers/compute/get_flavors.rb +30 -0
  268. data/lib/fog/slicehost/parsers/compute/get_image.rb +26 -0
  269. data/lib/fog/slicehost/parsers/compute/get_images.rb +30 -0
  270. data/lib/fog/slicehost/parsers/compute/get_slice.rb +31 -0
  271. data/lib/fog/slicehost/parsers/compute/get_slices.rb +35 -0
  272. data/lib/fog/slicehost/requests/compute/create_slice.rb +49 -0
  273. data/lib/fog/slicehost/requests/compute/delete_slice.rb +45 -0
  274. data/lib/fog/slicehost/requests/compute/get_backups.rb +37 -0
  275. data/lib/fog/slicehost/requests/compute/get_flavor.rb +40 -0
  276. data/lib/fog/slicehost/requests/compute/get_flavors.rb +37 -0
  277. data/lib/fog/slicehost/requests/compute/get_image.rb +38 -0
  278. data/lib/fog/slicehost/requests/compute/get_images.rb +35 -0
  279. data/lib/fog/slicehost/requests/compute/get_slice.rb +46 -0
  280. data/lib/fog/slicehost/requests/compute/get_slices.rb +43 -0
  281. data/lib/fog/slicehost/requests/compute/reboot_slice.rb +44 -0
  282. data/lib/fog/ssh.rb +16 -7
  283. data/lib/fog/terremark/bin.rb +25 -33
  284. data/lib/fog/terremark/models/shared/address.rb +1 -1
  285. data/lib/fog/terremark/models/shared/task.rb +6 -6
  286. data/lib/fog/vcloud.rb +60 -36
  287. data/lib/fog/vcloud/bin.rb +2 -2
  288. data/lib/fog/vcloud/collection.rb +1 -1
  289. data/lib/fog/vcloud/generators.rb +1 -1
  290. data/lib/fog/vcloud/model.rb +1 -1
  291. data/lib/fog/vcloud/models/vdc.rb +1 -1
  292. data/lib/fog/vcloud/models/vdcs.rb +3 -9
  293. data/lib/fog/vcloud/requests/get_network.rb +1 -1
  294. data/lib/fog/vcloud/requests/get_organization.rb +1 -1
  295. data/lib/fog/vcloud/requests/get_vdc.rb +1 -1
  296. data/lib/fog/vcloud/requests/get_versions.rb +1 -1
  297. data/lib/fog/vcloud/requests/login.rb +1 -1
  298. data/lib/fog/vcloud/terremark/ecloud.rb +19 -14
  299. data/lib/fog/vcloud/terremark/ecloud/models/catalog.rb +2 -2
  300. data/lib/fog/vcloud/terremark/ecloud/models/catalog_item.rb +3 -3
  301. data/lib/fog/vcloud/terremark/ecloud/models/firewall_acl.rb +3 -3
  302. data/lib/fog/vcloud/terremark/ecloud/models/firewall_acls.rb +4 -2
  303. data/lib/fog/vcloud/terremark/ecloud/models/internet_service.rb +4 -4
  304. data/lib/fog/vcloud/terremark/ecloud/models/internet_services.rb +4 -8
  305. data/lib/fog/vcloud/terremark/ecloud/models/ip.rb +4 -4
  306. data/lib/fog/vcloud/terremark/ecloud/models/ips.rb +4 -2
  307. data/lib/fog/vcloud/terremark/ecloud/models/network.rb +2 -2
  308. data/lib/fog/vcloud/terremark/ecloud/models/networks.rb +4 -8
  309. data/lib/fog/vcloud/terremark/ecloud/models/node.rb +3 -3
  310. data/lib/fog/vcloud/terremark/ecloud/models/nodes.rb +4 -2
  311. data/lib/fog/vcloud/terremark/ecloud/models/public_ip.rb +3 -3
  312. data/lib/fog/vcloud/terremark/ecloud/models/public_ips.rb +4 -14
  313. data/lib/fog/vcloud/terremark/ecloud/models/server.rb +4 -4
  314. data/lib/fog/vcloud/terremark/ecloud/models/servers.rb +4 -2
  315. data/lib/fog/vcloud/terremark/ecloud/models/task.rb +3 -3
  316. data/lib/fog/vcloud/terremark/ecloud/models/tasks.rb +4 -2
  317. data/lib/fog/vcloud/terremark/ecloud/models/vdc.rb +2 -2
  318. data/lib/fog/vcloud/terremark/ecloud/models/vdcs.rb +25 -15
  319. data/lib/fog/vcloud/terremark/ecloud/requests/add_internet_service.rb +4 -4
  320. data/lib/fog/vcloud/terremark/ecloud/requests/add_node.rb +4 -4
  321. data/lib/fog/vcloud/terremark/ecloud/requests/clone_vapp.rb +4 -4
  322. data/lib/fog/vcloud/terremark/ecloud/requests/configure_internet_service.rb +4 -4
  323. data/lib/fog/vcloud/terremark/ecloud/requests/configure_network.rb +4 -4
  324. data/lib/fog/vcloud/terremark/ecloud/requests/configure_network_ip.rb +4 -4
  325. data/lib/fog/vcloud/terremark/ecloud/requests/configure_node.rb +4 -4
  326. data/lib/fog/vcloud/terremark/ecloud/requests/configure_vapp.rb +4 -4
  327. data/lib/fog/vcloud/terremark/ecloud/requests/delete_internet_service.rb +4 -4
  328. data/lib/fog/vcloud/terremark/ecloud/requests/delete_node.rb +4 -4
  329. data/lib/fog/vcloud/terremark/ecloud/requests/delete_vapp.rb +4 -4
  330. data/lib/fog/vcloud/terremark/ecloud/requests/get_catalog.rb +4 -4
  331. data/lib/fog/vcloud/terremark/ecloud/requests/get_catalog_item.rb +4 -4
  332. data/lib/fog/vcloud/terremark/ecloud/requests/get_customization_options.rb +4 -4
  333. data/lib/fog/vcloud/terremark/ecloud/requests/get_firewall_acl.rb +4 -4
  334. data/lib/fog/vcloud/terremark/ecloud/requests/get_firewall_acls.rb +4 -4
  335. data/lib/fog/vcloud/terremark/ecloud/requests/get_internet_services.rb +4 -4
  336. data/lib/fog/vcloud/terremark/ecloud/requests/get_network.rb +4 -4
  337. data/lib/fog/vcloud/terremark/ecloud/requests/get_network_extensions.rb +4 -4
  338. data/lib/fog/vcloud/terremark/ecloud/requests/get_network_ip.rb +4 -4
  339. data/lib/fog/vcloud/terremark/ecloud/requests/get_network_ips.rb +4 -4
  340. data/lib/fog/vcloud/terremark/ecloud/requests/get_node.rb +4 -4
  341. data/lib/fog/vcloud/terremark/ecloud/requests/get_nodes.rb +4 -4
  342. data/lib/fog/vcloud/terremark/ecloud/requests/get_public_ip.rb +4 -4
  343. data/lib/fog/vcloud/terremark/ecloud/requests/get_public_ips.rb +4 -4
  344. data/lib/fog/vcloud/terremark/ecloud/requests/get_task.rb +4 -4
  345. data/lib/fog/vcloud/terremark/ecloud/requests/get_task_list.rb +4 -4
  346. data/lib/fog/vcloud/terremark/ecloud/requests/get_vapp.rb +4 -4
  347. data/lib/fog/vcloud/terremark/ecloud/requests/get_vapp_template.rb +4 -4
  348. data/lib/fog/vcloud/terremark/ecloud/requests/get_vdc.rb +4 -4
  349. data/lib/fog/vcloud/terremark/ecloud/requests/instantiate_vapp_template.rb +4 -4
  350. data/lib/fog/vcloud/terremark/ecloud/requests/power_off.rb +4 -4
  351. data/lib/fog/vcloud/terremark/ecloud/requests/power_on.rb +4 -4
  352. data/lib/fog/vcloud/terremark/ecloud/requests/power_reset.rb +4 -4
  353. data/lib/fog/vcloud/terremark/ecloud/requests/power_shutdown.rb +4 -4
  354. data/lib/fog/vcloud/terremark/vcloud.rb +9 -5
  355. data/lib/fog/vcloud/terremark/vcloud/requests/get_vdc.rb +4 -4
  356. data/spec/aws/models/{ec2 → compute}/address_spec.rb +12 -12
  357. data/spec/aws/models/compute/addresses_spec.rb +70 -0
  358. data/spec/aws/models/{ec2 → compute}/flavors_spec.rb +2 -2
  359. data/spec/aws/models/{ec2 → compute}/key_pair_spec.rb +12 -12
  360. data/spec/aws/models/compute/key_pairs_spec.rb +71 -0
  361. data/spec/aws/models/{ec2 → compute}/security_group_spec.rb +12 -12
  362. data/spec/aws/models/compute/security_groups_spec.rb +71 -0
  363. data/spec/aws/models/{ec2 → compute}/server_spec.rb +9 -9
  364. data/spec/aws/models/{ec2 → compute}/servers_spec.rb +2 -2
  365. data/spec/aws/models/{ec2 → compute}/snapshot_spec.rb +7 -7
  366. data/spec/aws/models/{ec2 → compute}/snapshots_spec.rb +12 -12
  367. data/spec/aws/models/{ec2 → compute}/volume_spec.rb +16 -16
  368. data/spec/aws/models/compute/volumes_spec.rb +71 -0
  369. data/spec/aws/models/storage/directories_spec.rb +49 -0
  370. data/spec/aws/models/{s3 → storage}/directory_spec.rb +13 -13
  371. data/spec/aws/models/{s3 → storage}/file_spec.rb +6 -6
  372. data/spec/aws/models/{s3 → storage}/files_spec.rb +6 -6
  373. data/spec/aws/requests/{ec2 → compute}/describe_images_spec.rb +4 -4
  374. data/spec/aws/requests/s3/copy_object_spec.rb +12 -12
  375. data/spec/aws/requests/s3/delete_bucket_spec.rb +9 -9
  376. data/spec/aws/requests/s3/delete_object_spec.rb +9 -9
  377. data/spec/aws/requests/s3/get_bucket_location_spec.rb +5 -5
  378. data/spec/aws/requests/s3/get_bucket_spec.rb +13 -13
  379. data/spec/aws/requests/s3/get_object_spec.rb +10 -10
  380. data/spec/aws/requests/s3/get_request_payment_spec.rb +5 -5
  381. data/spec/aws/requests/s3/get_service_spec.rb +6 -6
  382. data/spec/aws/requests/s3/head_object_spec.rb +6 -6
  383. data/spec/aws/requests/s3/put_bucket_spec.rb +4 -4
  384. data/spec/aws/requests/s3/put_object_spec.rb +12 -12
  385. data/spec/aws/requests/s3/put_request_payment_spec.rb +5 -5
  386. data/spec/{rackspace/models/servers → bluebox/models/compute}/flavors_spec.rb +3 -3
  387. data/spec/bluebox/models/{server_spec.rb → compute/server_spec.rb} +4 -4
  388. data/spec/bluebox/models/{servers_spec.rb → compute/servers_spec.rb} +4 -4
  389. data/spec/rackspace/models/compute/flavors_spec.rb +14 -0
  390. data/spec/rackspace/models/{servers → compute}/server_spec.rb +4 -4
  391. data/spec/rackspace/models/compute/servers_spec.rb +22 -0
  392. data/spec/rackspace/requests/{files → storage}/delete_container_spec.rb +5 -5
  393. data/spec/rackspace/requests/storage/delete_object_spec.rb +37 -0
  394. data/spec/rackspace/requests/{files → storage}/get_container_spec.rb +9 -9
  395. data/spec/rackspace/requests/{files → storage}/get_containers_spec.rb +4 -4
  396. data/spec/rackspace/requests/storage/get_object_spec.rb +21 -0
  397. data/spec/rackspace/requests/storage/head_container_spec.rb +30 -0
  398. data/spec/rackspace/requests/storage/head_containers_spec.rb +19 -0
  399. data/spec/rackspace/requests/storage/head_object_spec.rb +21 -0
  400. data/spec/rackspace/requests/{files → storage}/put_container_spec.rb +3 -3
  401. data/spec/rackspace/requests/storage/put_object_spec.rb +20 -0
  402. data/spec/slicehost/models/compute/flavors_spec.rb +14 -0
  403. data/spec/slicehost/models/{server_spec.rb → compute/server_spec.rb} +8 -8
  404. data/spec/{rackspace/models/servers → slicehost/models/compute}/servers_spec.rb +4 -4
  405. data/spec/spec_helper.rb +14 -14
  406. data/spec/vcloud/models/vdc_spec.rb +1 -1
  407. data/spec/vcloud/spec_helper.rb +7 -7
  408. data/spec/vcloud/terremark/ecloud/models/internet_service_spec.rb +1 -1
  409. data/tests/aws/helper.rb +8 -8
  410. data/tests/aws/models/storage/directory_tests.rb +8 -0
  411. data/tests/aws/requests/compute/address_tests.rb +80 -0
  412. data/tests/aws/requests/{ec2 → compute}/availability_zone_tests.rb +5 -5
  413. data/tests/aws/requests/{ec2 → compute}/instance_tests.rb +17 -17
  414. data/tests/aws/requests/{ec2 → compute}/key_pair_tests.rb +12 -12
  415. data/tests/aws/requests/{ec2 → compute}/region_tests.rb +5 -5
  416. data/tests/aws/requests/{ec2 → compute}/security_group_tests.rb +31 -31
  417. data/tests/aws/requests/{ec2 → compute}/snapshot_tests.rb +12 -12
  418. data/tests/aws/requests/{ec2 → compute}/volume_tests.rb +23 -23
  419. data/tests/bluebox/helper.rb +13 -9
  420. data/tests/bluebox/requests/{block_tests.rb → compute/block_tests.rb} +16 -17
  421. data/tests/bluebox/requests/compute/product_tests.rb +25 -0
  422. data/tests/bluebox/requests/{template_tests.rb → compute/template_tests.rb} +5 -5
  423. data/tests/linode/helper.rb +12 -8
  424. data/tests/linode/requests/{datacenter_tests.rb → compute/datacenter_tests.rb} +3 -3
  425. data/tests/linode/requests/{distribution_tests.rb → compute/distribution_tests.rb} +4 -4
  426. data/tests/linode/requests/{linode_tests.rb → compute/linode_tests.rb} +13 -13
  427. data/tests/linode/requests/{linodeplans_tests.rb → compute/linodeplans_tests.rb} +4 -4
  428. data/tests/rackspace/helper.rb +5 -13
  429. data/tests/rackspace/requests/compute/address_tests.rb +40 -0
  430. data/tests/rackspace/requests/compute/flavor_tests.rb +34 -0
  431. data/tests/rackspace/requests/compute/image_tests.rb +62 -0
  432. data/tests/rackspace/requests/{servers → compute}/server_tests.rb +20 -20
  433. data/tests/slicehost/helper.rb +3 -3
  434. data/tests/slicehost/requests/{backup_tests.rb → compute/backup_tests.rb} +2 -2
  435. data/tests/slicehost/requests/{flavor_tests.rb → compute/flavor_tests.rb} +4 -4
  436. data/tests/slicehost/requests/{image_tests.rb → compute/image_tests.rb} +4 -4
  437. data/tests/slicehost/requests/{slice_tests.rb → compute/slice_tests.rb} +12 -12
  438. metadata +304 -290
  439. data/lib/fog/aws/models/ec2/flavors.rb +0 -43
  440. data/lib/fog/aws/models/ec2/image.rb +0 -44
  441. data/lib/fog/aws/models/ec2/key_pair.rb +0 -34
  442. data/lib/fog/aws/models/ec2/servers.rb +0 -49
  443. data/lib/fog/bluebox/models/flavor.rb +0 -43
  444. data/lib/fog/bluebox/models/flavors.rb +0 -32
  445. data/lib/fog/bluebox/models/image.rb +0 -17
  446. data/lib/fog/bluebox/models/images.rb +0 -34
  447. data/lib/fog/bluebox/models/server.rb +0 -79
  448. data/lib/fog/bluebox/models/servers.rb +0 -33
  449. data/lib/fog/bluebox/requests/create_block.rb +0 -39
  450. data/lib/fog/bluebox/requests/destroy_block.rb +0 -32
  451. data/lib/fog/bluebox/requests/get_block.rb +0 -32
  452. data/lib/fog/bluebox/requests/get_blocks.rb +0 -34
  453. data/lib/fog/bluebox/requests/get_product.rb +0 -32
  454. data/lib/fog/bluebox/requests/get_products.rb +0 -31
  455. data/lib/fog/bluebox/requests/get_template.rb +0 -32
  456. data/lib/fog/bluebox/requests/get_templates.rb +0 -32
  457. data/lib/fog/bluebox/requests/reboot_block.rb +0 -33
  458. data/lib/fog/go_grid/requests/common_lookup_list.rb +0 -34
  459. data/lib/fog/go_grid/requests/grid_image_list.rb +0 -37
  460. data/lib/fog/go_grid/requests/grid_ip_list.rb +0 -36
  461. data/lib/fog/go_grid/requests/grid_loadbalancer_list.rb +0 -34
  462. data/lib/fog/go_grid/requests/grid_server_add.rb +0 -42
  463. data/lib/fog/go_grid/requests/grid_server_delete.rb +0 -31
  464. data/lib/fog/go_grid/requests/grid_server_get.rb +0 -31
  465. data/lib/fog/go_grid/requests/grid_server_list.rb +0 -36
  466. data/lib/fog/go_grid/requests/grid_server_power.rb +0 -32
  467. data/lib/fog/linode/requests/avail_datacenters.rb +0 -29
  468. data/lib/fog/linode/requests/avail_distributions.rb +0 -36
  469. data/lib/fog/linode/requests/avail_kernels.rb +0 -34
  470. data/lib/fog/linode/requests/avail_linodeplans.rb +0 -33
  471. data/lib/fog/linode/requests/avail_stackscripts.rb +0 -35
  472. data/lib/fog/linode/requests/linode_create.rb +0 -39
  473. data/lib/fog/linode/requests/linode_delete.rb +0 -34
  474. data/lib/fog/linode/requests/linode_list.rb +0 -36
  475. data/lib/fog/linode/requests/linode_reboot.rb +0 -34
  476. data/lib/fog/local/models/directories.rb +0 -37
  477. data/lib/fog/local/models/directory.rb +0 -50
  478. data/lib/fog/local/models/file.rb +0 -58
  479. data/lib/fog/local/models/files.rb +0 -74
  480. data/lib/fog/new_servers/requests/add_server.rb +0 -39
  481. data/lib/fog/new_servers/requests/cancel_server.rb +0 -36
  482. data/lib/fog/new_servers/requests/get_server.rb +0 -42
  483. data/lib/fog/new_servers/requests/list_images.rb +0 -33
  484. data/lib/fog/new_servers/requests/list_plans.rb +0 -36
  485. data/lib/fog/new_servers/requests/list_servers.rb +0 -43
  486. data/lib/fog/new_servers/requests/reboot_server.rb +0 -30
  487. data/lib/fog/slicehost/models/flavor.rb +0 -43
  488. data/lib/fog/slicehost/models/flavors.rb +0 -31
  489. data/lib/fog/slicehost/models/image.rb +0 -15
  490. data/lib/fog/slicehost/models/images.rb +0 -33
  491. data/lib/fog/slicehost/models/server.rb +0 -62
  492. data/lib/fog/slicehost/models/servers.rb +0 -35
  493. data/lib/fog/slicehost/parsers/create_slice.rb +0 -29
  494. data/lib/fog/slicehost/parsers/get_backups.rb +0 -30
  495. data/lib/fog/slicehost/parsers/get_flavor.rb +0 -24
  496. data/lib/fog/slicehost/parsers/get_flavors.rb +0 -28
  497. data/lib/fog/slicehost/parsers/get_image.rb +0 -24
  498. data/lib/fog/slicehost/parsers/get_images.rb +0 -28
  499. data/lib/fog/slicehost/parsers/get_slice.rb +0 -29
  500. data/lib/fog/slicehost/parsers/get_slices.rb +0 -33
  501. data/lib/fog/slicehost/requests/create_slice.rb +0 -47
  502. data/lib/fog/slicehost/requests/delete_slice.rb +0 -43
  503. data/lib/fog/slicehost/requests/get_backups.rb +0 -35
  504. data/lib/fog/slicehost/requests/get_flavor.rb +0 -38
  505. data/lib/fog/slicehost/requests/get_flavors.rb +0 -35
  506. data/lib/fog/slicehost/requests/get_image.rb +0 -36
  507. data/lib/fog/slicehost/requests/get_images.rb +0 -33
  508. data/lib/fog/slicehost/requests/get_slice.rb +0 -44
  509. data/lib/fog/slicehost/requests/get_slices.rb +0 -41
  510. data/lib/fog/slicehost/requests/reboot_slice.rb +0 -42
  511. data/lib/fog/vcloud/extension.rb +0 -37
  512. data/spec/aws/models/ec2/addresses_spec.rb +0 -70
  513. data/spec/aws/models/ec2/key_pairs_spec.rb +0 -71
  514. data/spec/aws/models/ec2/security_groups_spec.rb +0 -71
  515. data/spec/aws/models/ec2/volumes_spec.rb +0 -71
  516. data/spec/aws/models/s3/directories_spec.rb +0 -49
  517. data/spec/bluebox/models/flavors_spec.rb +0 -14
  518. data/spec/rackspace/requests/files/delete_object_spec.rb +0 -37
  519. data/spec/rackspace/requests/files/get_object_spec.rb +0 -21
  520. data/spec/rackspace/requests/files/head_container_spec.rb +0 -30
  521. data/spec/rackspace/requests/files/head_containers_spec.rb +0 -19
  522. data/spec/rackspace/requests/files/head_object_spec.rb +0 -21
  523. data/spec/rackspace/requests/files/put_object_spec.rb +0 -20
  524. data/spec/slicehost/models/flavors_spec.rb +0 -14
  525. data/spec/slicehost/models/servers_spec.rb +0 -22
  526. data/tests/aws/models/s3/directory_tests.rb +0 -8
  527. data/tests/aws/requests/ec2/address_tests.rb +0 -80
  528. data/tests/bluebox/requests/product_tests.rb +0 -25
  529. data/tests/rackspace/requests/servers/address_tests.rb +0 -40
  530. data/tests/rackspace/requests/servers/flavor_tests.rb +0 -34
  531. data/tests/rackspace/requests/servers/image_tests.rb +0 -59
@@ -0,0 +1,20 @@
1
+ require File.dirname(__FILE__) + '/../../../spec_helper'
2
+
3
+ describe 'Rackspace::Storage.put_object' do
4
+ describe 'success' do
5
+
6
+ before(:each) do
7
+ Rackspace[:storage].put_container('container_name')
8
+ end
9
+
10
+ after(:each) do
11
+ Rackspace[:storage].delete_object('container_name', 'object_name')
12
+ Rackspace[:storage].delete_container('container_name')
13
+ end
14
+
15
+ it "should return proper attributes" do
16
+ Rackspace[:storage].put_object('container_name', 'object_name', lorem_file)
17
+ end
18
+
19
+ end
20
+ end
@@ -0,0 +1,14 @@
1
+ require File.dirname(__FILE__) + '/../../../spec_helper'
2
+ require File.dirname(__FILE__) + '/../../../shared_examples/flavors_examples'
3
+
4
+ describe 'Fog::Slicehost::Compute::Flavors' do
5
+
6
+ it_should_behave_like "Flavors"
7
+
8
+ subject { @flavor = @flavors.all.first }
9
+
10
+ before(:each) do
11
+ @flavors = Slicehost[:compute].flavors
12
+ end
13
+
14
+ end
@@ -1,15 +1,15 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
2
- require File.dirname(__FILE__) + '/../../shared_examples/server_examples'
1
+ require File.dirname(__FILE__) + '/../../../spec_helper'
2
+ require File.dirname(__FILE__) + '/../../../shared_examples/server_examples'
3
3
 
4
- describe 'Fog::Slicehost::Server' do
4
+ describe 'Fog::Slicehost::Compute::Server' do
5
5
 
6
6
  it_should_behave_like "Server"
7
7
 
8
- # flavor 1 = 256, image 3 = gentoo 2008.0
9
- subject { @server = @servers.new(:flavor_id => 1, :image_id => 3, :name => Time.now.to_i.to_s) }
8
+ # flavor 1 = 256, image 49 = Ubuntu 10.04 LTS (lucid)
9
+ subject { @server = @servers.new(:flavor_id => 1, :image_id => 49, :name => Time.now.to_i.to_s) }
10
10
 
11
11
  before(:each) do
12
- @servers = Slicehost[:slices].servers
12
+ @servers = Slicehost[:compute].servers
13
13
  end
14
14
 
15
15
  after(:each) do
@@ -36,8 +36,8 @@ describe 'Fog::Slicehost::Server' do
36
36
  })
37
37
  server.addresses.should == 'addresses'
38
38
  server.backup_id.should == 'backup_id'
39
- server.bw_in.should == 'bw_in'
40
- server.bw_out.should == 'bw_out'
39
+ server.bandwidth_in.should == 'bw_in'
40
+ server.bandwidth_out.should == 'bw_out'
41
41
  server.flavor_id.should == 'flavor_id'
42
42
  server.image_id.should == 'image_id'
43
43
  server.name.should == 'name'
@@ -1,15 +1,15 @@
1
1
  require File.dirname(__FILE__) + '/../../../spec_helper'
2
2
  require File.dirname(__FILE__) + '/../../../shared_examples/servers_examples'
3
3
 
4
- describe 'Fog::Rackspace::Servers::Servers' do
4
+ describe 'Fog::Slicehost::Compute::Servers' do
5
5
 
6
6
  it_should_behave_like "Servers"
7
7
 
8
- # flavor 1 = 256, image 3 = gentoo 2008.0
9
- subject { @server = @servers.new(:flavor_id => 1, :image_id => 3, :name => 'name') }
8
+ # flavor 1 = 256, image 49 = Ubuntu 10.04 LTS (lucid)
9
+ subject { @server = @servers.new(:flavor_id => 1, :image_id => 49, :name => Time.now.to_i.to_s) }
10
10
 
11
11
  before(:each) do
12
- @servers = Rackspace[:servers].servers
12
+ @servers = Slicehost[:compute].servers
13
13
  end
14
14
 
15
15
  after(:each) do
@@ -16,14 +16,14 @@ module AWS
16
16
  ![:aws_access_key_id, :aws_secret_access_key].include?(k)
17
17
  end
18
18
  hash[key] = case key
19
- when :ec2
20
- Fog::AWS::EC2.new(credentials)
21
- when :eu_s3
22
- Fog::AWS::S3.new(credentials.merge!(:host => 's3-external-3.amazonaws.com'))
19
+ when :compute
20
+ Fog::AWS::Compute.new(credentials)
21
+ when :eu_storage
22
+ Fog::AWS::Storage.new(credentials.merge!(:host => 's3-external-3.amazonaws.com'))
23
23
  when :sdb
24
24
  Fog::AWS::SimpleDB.new(credentials)
25
- when :s3
26
- Fog::AWS::S3.new(credentials)
25
+ when :storage
26
+ Fog::AWS::Storage.new(credentials)
27
27
  end
28
28
  end
29
29
  @@connections[service]
@@ -39,10 +39,10 @@ module Rackspace
39
39
  ![:rackspace_api_key, :rackspace_username].include?(k)
40
40
  end
41
41
  hash[key] = case key
42
- when :files
43
- Fog::Rackspace::Files.new(credentials)
44
- when :servers
45
- Fog::Rackspace::Servers.new(credentials)
42
+ when :compute
43
+ Fog::Rackspace::Compute.new(credentials)
44
+ when :storage
45
+ Fog::Rackspace::Storage.new(credentials)
46
46
  end
47
47
  end
48
48
  @@connections[service]
@@ -58,8 +58,8 @@ module Slicehost
58
58
  ![:slicehost_password].include?(k)
59
59
  end
60
60
  hash[key] = case key
61
- when :slices
62
- Fog::Slicehost.new(credentials)
61
+ when :compute
62
+ Fog::Slicehost::Compute.new(credentials)
63
63
  end
64
64
  end
65
65
  @@connections[service]
@@ -75,8 +75,8 @@ module Bluebox
75
75
  ![:bluebox_api_key, :bluebox_customer_id].include?(k)
76
76
  end
77
77
  hash[key] = case key
78
- when :blocks
79
- Fog::Bluebox.new(credentials)
78
+ when :compute
79
+ Fog::Bluebox::Compute.new(credentials)
80
80
  end
81
81
  end
82
82
  @@connections[service]
@@ -21,7 +21,7 @@ if Fog.mocking?
21
21
  end
22
22
 
23
23
  context "as a collection member" do
24
- subject { @vcloud.vdcs[0].reload; @vcloud.vdcs[0] }
24
+ subject { p @vcloud.vdcs[0]; @vcloud.vdcs[0].reload; @vcloud.vdcs[0] }
25
25
 
26
26
  it { should be_an_instance_of Fog::Vcloud::Vdc }
27
27
 
@@ -234,12 +234,9 @@ Spec::Runner.configure do |config|
234
234
  end
235
235
 
236
236
  config.before(:each, :type => :vcloud_request) do
237
- @vcloud = Fog.services.detect { |service| service == Vcloud }[:vcloud]
237
+ @vcloud = Fog::Vcloud::Terremark::Ecloud.new(Fog.credentials[:vcloud][:ecloud])
238
238
  end
239
239
 
240
- config.before(:all, :type => :mock_vcloud_model) do
241
- @vcloud = Fog::Vcloud.new(:username => "foo", :password => "bar", :versions_uri => "http://fakey.com/api/versions")
242
- end
243
240
  config.before(:all, :type => :mock_vcloud_model) do
244
241
  @base_url = Fog::Vcloud::Mock.base_url
245
242
  @mock_data = Fog::Vcloud::Mock.data
@@ -256,20 +253,23 @@ Spec::Runner.configure do |config|
256
253
  @mock_vdc = @mock_organization[:vdcs][0]
257
254
  @mock_network = @mock_vdc[:networks][0]
258
255
  end
256
+ config.before(:all, :type => :mock_vcloud_model) do
257
+ @vcloud = Fog::Vcloud.new(:username => "foo", :password => "bar", :versions_uri => "http://fakey.com/api/versions")
258
+ end
259
259
  config.before(:each, :type => :mock_vcloud_request) do
260
- @vcloud = Fog::Vcloud.new(:username => "", :password => "bar", :versions_uri => "http://fakey.com/api/versions")
260
+ @vcloud = Fog::Vcloud.new(:username => "foo", :password => "bar", :versions_uri => "http://fakey.com/api/versions")
261
261
  end
262
262
  config.before(:each, :type => :mock_tmrk_ecloud_request) do
263
263
  Fog::Vcloud::Mock.data_reset
264
264
  Fog::Vcloud::Terremark::Ecloud::Mock.data_reset
265
265
  setup_ecloud_mock_data
266
- @vcloud = Fog::Vcloud.new(:username => "foo", :password => "bar", :versions_uri => "http://fakey.com/api/versions", :module => "Fog::Vcloud::Terremark::Ecloud")
266
+ @vcloud = Fog::Vcloud::Terremark::Ecloud.new(:username => "foo", :password => "bar", :versions_uri => "http://fakey.com/api/versions", :module => "Fog::Vcloud::Terremark::Ecloud")
267
267
  end
268
268
  config.before(:each, :type => :mock_tmrk_ecloud_model) do
269
269
  Fog::Vcloud::Mock.data_reset
270
270
  Fog::Vcloud::Terremark::Ecloud::Mock.data_reset
271
271
  setup_ecloud_mock_data
272
- @vcloud = Fog::Vcloud.new(:username => "foo", :password => "bar", :versions_uri => "http://fakey.com/api/versions", :module => "Fog::Vcloud::Terremark::Ecloud")
272
+ @vcloud = Fog::Vcloud::Terremark::Ecloud.new(:username => "foo", :password => "bar", :versions_uri => "http://fakey.com/api/versions", :module => "Fog::Vcloud::Terremark::Ecloud")
273
273
  end
274
274
  end
275
275
 
@@ -46,7 +46,7 @@ if Fog.mocking?
46
46
  its(:public_ip) { should == public_ip }
47
47
  its(:timeout) { should == @mock_service[:timeout] }
48
48
  its(:redirect_url) { should == @mock_service[:redirect_url] }
49
- its(:monitor) { should == "" }
49
+ its(:monitor) { should == nil }
50
50
 
51
51
  specify { composed_public_ip_data[:href].should == public_ip[:Href].to_s }
52
52
  specify { composed_public_ip_data[:name].should == public_ip[:Name] }
@@ -7,21 +7,21 @@ module AWS
7
7
  ![:aws_access_key_id, :aws_secret_access_key].include?(k)
8
8
  end
9
9
  hash[key] = case key
10
- when :ec2
11
- Fog::AWS::EC2.new(credentials)
12
- when :eu_s3
13
- Fog::AWS::S3.new(credentials.merge!(:host => 's3-external-3.amazonaws.com'))
10
+ when :compute
11
+ Fog::AWS::Compute.new(credentials)
12
+ when :eu_storage
13
+ Fog::AWS::Storage.new(credentials.merge!(:host => 's3-external-3.amazonaws.com'))
14
14
  when :sdb
15
15
  Fog::AWS::SimpleDB.new(credentials)
16
- when :s3
17
- Fog::AWS::S3.new(credentials)
16
+ when :storage
17
+ Fog::AWS::Storage.new(credentials)
18
18
  end
19
19
  end
20
20
  @@connections[service]
21
21
  end
22
22
  end
23
23
 
24
- module EC2
24
+ module Compute
25
25
 
26
26
  module Formats
27
27
 
@@ -38,4 +38,4 @@ end
38
38
 
39
39
  unless defined?(GENTOO_AMI)
40
40
  GENTOO_AMI = 'ami-5ee70037'
41
- end
41
+ end
@@ -0,0 +1,8 @@
1
+ Shindo.tests('AWS::Storage | directory models', ['aws']) do
2
+
3
+ @collection = AWS[:storage].directories
4
+ @model = @collection.new(:key => Time.now.to_f.to_s)
5
+
6
+ tests_models
7
+
8
+ end
@@ -0,0 +1,80 @@
1
+ Shindo.tests('AWS::Compute | address requests', ['aws']) do
2
+
3
+ @addresses_format = {
4
+ 'addressesSet' => [{
5
+ 'instanceId' => NilClass,
6
+ 'publicIp' => String
7
+ }],
8
+ 'requestId' => String
9
+ }
10
+
11
+ @server = AWS[:compute].servers.create(:image_id => GENTOO_AMI)
12
+ @server.wait_for { ready? }
13
+ @ip_address = @server.ip_address
14
+
15
+ tests('success') do
16
+
17
+ @public_ip = nil
18
+
19
+ tests('#allocate_address').formats({'publicIp' => String, 'requestId' => String}) do
20
+ data = AWS[:compute].allocate_address.body
21
+ @public_ip = data['publicIp']
22
+ data
23
+ end
24
+
25
+ tests('#describe_addresses').formats(@addresses_format) do
26
+ AWS[:compute].describe_addresses.body
27
+ end
28
+
29
+ tests("#describe_addresses('#{@public_Ip}')").formats(@addresses_format) do
30
+ AWS[:compute].describe_addresses(@public_ip).body
31
+ end
32
+
33
+ tests("#associate_addresses('#{@server.identity}', '#{@public_Ip}')").formats(AWS::Compute::Formats::BASIC) do
34
+ AWS[:compute].associate_address(@server.identity, @public_ip).body
35
+ end
36
+
37
+ tests("#dissassociate_address('#{@public_ip}')").formats(AWS::Compute::Formats::BASIC) do
38
+ AWS[:compute].disassociate_address(@public_ip).body
39
+ end
40
+
41
+ tests("#release_address('#{@public_ip}')").formats(AWS::Compute::Formats::BASIC) do
42
+ AWS[:compute].release_address(@public_ip).body
43
+ end
44
+
45
+ end
46
+ tests ('failure') do
47
+
48
+ @address = AWS[:compute].addresses.create
49
+
50
+ tests("#describe_addresses('127.0.0.1')").raises(Fog::AWS::Compute::NotFound) do
51
+ AWS[:compute].describe_addresses('127.0.0.1')
52
+ end
53
+
54
+ tests("#associate_addresses('i-00000000', '#{@address.identity}')").raises(Fog::AWS::Compute::NotFound) do
55
+ AWS[:compute].associate_address('i-00000000', @address.identity)
56
+ end
57
+
58
+ tests("#associate_addresses('#{@server.identity}', '127.0.0.1')").raises(Fog::AWS::Compute::Error) do
59
+ AWS[:compute].associate_address(@server.identity, '127.0.0.1')
60
+ end
61
+
62
+ tests("#associate_addresses('i-00000000', '127.0.0.1')").raises(Fog::AWS::Compute::NotFound) do
63
+ AWS[:compute].associate_address('i-00000000', '127.0.0.1')
64
+ end
65
+
66
+ tests("#disassociate_addresses('127.0.0.1') raises BadRequest error").raises(Fog::AWS::Compute::Error) do
67
+ AWS[:compute].disassociate_address('127.0.0.1')
68
+ end
69
+
70
+ tests("#release_address('127.0.0.1')").raises(Fog::AWS::Compute::Error) do
71
+ AWS[:compute].release_address('127.0.0.1')
72
+ end
73
+
74
+ @address.destroy
75
+
76
+ end
77
+
78
+ @server.destroy
79
+
80
+ end
@@ -1,4 +1,4 @@
1
- Shindo.tests('AWS::EC2 | availability zone requests', ['aws']) do
1
+ Shindo.tests('AWS::Compute | availability zone requests', ['aws']) do
2
2
 
3
3
  @availability_zones_format = {
4
4
  'availabilityZoneInfo' => [{
@@ -12,19 +12,19 @@ Shindo.tests('AWS::EC2 | availability zone requests', ['aws']) do
12
12
  tests('success') do
13
13
 
14
14
  tests('#describe_availability_zones').formats(@availability_zones_format) do
15
- AWS[:ec2].describe_availability_zones.body
15
+ AWS[:compute].describe_availability_zones.body
16
16
  end
17
17
 
18
18
  tests("#describe_availability_zones('us-east-1a')").formats(@availability_zones_format) do
19
- AWS[:ec2].describe_availability_zones('us-east-1a').body
19
+ AWS[:compute].describe_availability_zones('us-east-1a').body
20
20
  end
21
21
 
22
22
  end
23
23
 
24
24
  tests('failure') do
25
25
 
26
- tests("#describe_availability_zones('us-east-1e')").raises(Fog::AWS::EC2::Error) do
27
- AWS[:ec2].describe_availability_zones('us-east-1e')
26
+ tests("#describe_availability_zones('us-east-1e')").raises(Fog::AWS::Compute::Error) do
27
+ AWS[:compute].describe_availability_zones('us-east-1e')
28
28
  end
29
29
 
30
30
  end
@@ -1,4 +1,4 @@
1
- Shindo.tests('AWS::EC2 | instance requests', ['aws']) do
1
+ Shindo.tests('AWS::Compute | instance requests', ['aws']) do
2
2
 
3
3
  @instance_format = {
4
4
  # 'architecture' => String,
@@ -69,52 +69,52 @@ Shindo.tests('AWS::EC2 | instance requests', ['aws']) do
69
69
  @instance_id = nil
70
70
 
71
71
  tests("#run_instances('#{GENTOO_AMI}', 1, 1)").formats(@run_instances_format) do
72
- data = AWS[:ec2].run_instances(GENTOO_AMI, 1, 1).body
72
+ data = AWS[:compute].run_instances(GENTOO_AMI, 1, 1).body
73
73
  @instance_id = data['instancesSet'].first['instanceId']
74
74
  data
75
75
  end
76
76
 
77
- AWS[:ec2].servers.get(@instance_id).wait_for { ready? }
77
+ AWS[:compute].servers.get(@instance_id).wait_for { ready? }
78
78
 
79
79
  # The format changes depending on state of instance, so this would be brittle
80
80
  # tests("#describe_instances").formats(@describe_instances_format) do
81
- # AWS[:ec2].describe_instances.body
81
+ # AWS[:compute].describe_instances.body
82
82
  # end
83
83
 
84
84
  tests("#describe_instances('#{@instance_id}')").formats(@describe_instances_format) do
85
- AWS[:ec2].describe_instances(@instance_id).body
85
+ AWS[:compute].describe_instances(@instance_id).body
86
86
  end
87
87
 
88
88
  tests("#get_console_output('#{@instance_id}')").formats(@get_console_output_format) do
89
- AWS[:ec2].get_console_output(@instance_id).body
89
+ AWS[:compute].get_console_output(@instance_id).body
90
90
  end
91
91
 
92
- tests("#reboot_instances('#{@instance_id}')").formats(AWS::EC2::Formats::BASIC) do
93
- AWS[:ec2].reboot_instances(@instance_id).body
92
+ tests("#reboot_instances('#{@instance_id}')").formats(AWS::Compute::Formats::BASIC) do
93
+ AWS[:compute].reboot_instances(@instance_id).body
94
94
  end
95
95
 
96
96
  tests("#terminate_instances('#{@instance_id}')").formats(@terminate_instances_format) do
97
- AWS[:ec2].terminate_instances(@instance_id).body
97
+ AWS[:compute].terminate_instances(@instance_id).body
98
98
  end
99
99
 
100
100
  end
101
101
 
102
102
  tests('failure') do
103
103
 
104
- tests("#describe_instances('i-00000000')").raises(Fog::AWS::EC2::NotFound) do
105
- AWS[:ec2].describe_instances('i-00000000')
104
+ tests("#describe_instances('i-00000000')").raises(Fog::AWS::Compute::NotFound) do
105
+ AWS[:compute].describe_instances('i-00000000')
106
106
  end
107
107
 
108
- tests("#get_console_output('i-00000000')").raises(Fog::AWS::EC2::NotFound) do
109
- AWS[:ec2].get_console_output('i-00000000')
108
+ tests("#get_console_output('i-00000000')").raises(Fog::AWS::Compute::NotFound) do
109
+ AWS[:compute].get_console_output('i-00000000')
110
110
  end
111
111
 
112
- tests("#reboot_instances('i-00000000')").raises(Fog::AWS::EC2::NotFound) do
113
- AWS[:ec2].reboot_instances('i-00000000')
112
+ tests("#reboot_instances('i-00000000')").raises(Fog::AWS::Compute::NotFound) do
113
+ AWS[:compute].reboot_instances('i-00000000')
114
114
  end
115
115
 
116
- tests("#terminate_instances('i-00000000')").raises(Fog::AWS::EC2::NotFound) do
117
- AWS[:ec2].terminate_instances('i-00000000')
116
+ tests("#terminate_instances('i-00000000')").raises(Fog::AWS::Compute::NotFound) do
117
+ AWS[:compute].terminate_instances('i-00000000')
118
118
  end
119
119
 
120
120
  end
@@ -1,4 +1,4 @@
1
- Shindo.tests('AWS::EC2 | key pair requests', ['aws']) do
1
+ Shindo.tests('AWS::Compute | key pair requests', ['aws']) do
2
2
 
3
3
  tests('success') do
4
4
 
@@ -20,36 +20,36 @@ Shindo.tests('AWS::EC2 | key pair requests', ['aws']) do
20
20
  @key_pair_name = 'fog_key_pair'
21
21
 
22
22
  tests("#create_key_pair('#{@key_pair_name}')").formats(@keypair_format) do
23
- AWS[:ec2].create_key_pair(@key_pair_name).body
23
+ AWS[:compute].create_key_pair(@key_pair_name).body
24
24
  end
25
25
 
26
26
  tests('#describe_key_pairs').formats(@keypairs_format) do
27
- AWS[:ec2].describe_key_pairs.body
27
+ AWS[:compute].describe_key_pairs.body
28
28
  end
29
29
 
30
30
  tests("#describe_key_pairs(#{@key_pair_name})").formats(@keypairs_format) do
31
- AWS[:ec2].describe_key_pairs(@key_pair_name).body
31
+ AWS[:compute].describe_key_pairs(@key_pair_name).body
32
32
  end
33
33
 
34
- tests("#delete_key_pair('#{@key_pair_name}')").formats(AWS::EC2::Formats::BASIC) do
35
- AWS[:ec2].delete_key_pair(@key_pair_name).body
34
+ tests("#delete_key_pair('#{@key_pair_name}')").formats(AWS::Compute::Formats::BASIC) do
35
+ AWS[:compute].delete_key_pair(@key_pair_name).body
36
36
  end
37
37
 
38
38
  tests("#delete_key_pair('not_a_key_name')").succeeds do
39
- AWS[:ec2].delete_key_pair('not_a_key_name')
39
+ AWS[:compute].delete_key_pair('not_a_key_name')
40
40
  end
41
41
 
42
42
  end
43
43
  tests('failure') do
44
44
 
45
- @key_pair = AWS[:ec2].key_pairs.create(:name => 'fog_key_pair')
45
+ @key_pair = AWS[:compute].key_pairs.create(:name => 'fog_key_pair')
46
46
 
47
- tests("duplicate #create_key_pair('#{@key_pair.name}')").raises(Fog::AWS::EC2::Error) do
48
- AWS[:ec2].create_key_pair(@key_pair.name)
47
+ tests("duplicate #create_key_pair('#{@key_pair.name}')").raises(Fog::AWS::Compute::Error) do
48
+ AWS[:compute].create_key_pair(@key_pair.name)
49
49
  end
50
50
 
51
- tests("#describe_key_pair('not_a_key_name')").raises(Fog::AWS::EC2::NotFound) do
52
- AWS[:ec2].describe_key_pairs('not_a_key_name').body
51
+ tests("#describe_key_pair('not_a_key_name')").raises(Fog::AWS::Compute::NotFound) do
52
+ AWS[:compute].describe_key_pairs('not_a_key_name').body
53
53
  end
54
54
 
55
55
  @key_pair.destroy