Browse files

[compute] refactor provider/service namespacing

  • Loading branch information...
1 parent b4b6375 commit 69407efdbbc0ea7a9595eaf9b624400ef7ec6d45 @geemus geemus committed Jun 16, 2011
Showing with 831 additions and 917 deletions.
  1. +1 −0 bin/fog
  2. +2 −1 lib/fog/bin/aws.rb
  3. +2 −1 lib/fog/bin/bluebox.rb
  4. +2 −1 lib/fog/bin/brightbox.rb
  5. +2 −1 lib/fog/bin/ecloud.rb
  6. +2 −1 lib/fog/bin/go_grid.rb
  7. +2 −1 lib/fog/bin/linode.rb
  8. +2 −1 lib/fog/bin/new_servers.rb
  9. +2 −1 lib/fog/bin/ninefold.rb
  10. +2 −1 lib/fog/bin/rackspace.rb
  11. +2 −1 lib/fog/bin/slicehost.rb
  12. +2 −1 lib/fog/bin/stormondemand.rb
  13. +2 −1 lib/fog/bin/virtual_box.rb
  14. +2 −1 lib/fog/bin/voxel.rb
  15. +43 −28 lib/fog/compute.rb
  16. +4 −18 lib/fog/compute/aws.rb
  17. +3 −17 lib/fog/compute/bluebox.rb
  18. +3 −17 lib/fog/compute/brightbox.rb
  19. +3 −3 lib/fog/compute/ecloud.rb
  20. +3 −17 lib/fog/compute/go_grid.rb
  21. +4 −18 lib/fog/compute/linode.rb
  22. +2 −2 lib/fog/compute/models/aws/address.rb
  23. +3 −3 lib/fog/compute/models/aws/addresses.rb
  24. +2 −2 lib/fog/compute/models/aws/flavor.rb
  25. +4 −4 lib/fog/compute/models/aws/flavors.rb
  26. +2 −2 lib/fog/compute/models/aws/image.rb
  27. +3 −3 lib/fog/compute/models/aws/images.rb
  28. +2 −3 lib/fog/compute/models/aws/key_pair.rb
  29. +3 −3 lib/fog/compute/models/aws/key_pairs.rb
  30. +2 −2 lib/fog/compute/models/aws/security_group.rb
  31. +3 −3 lib/fog/compute/models/aws/security_groups.rb
  32. +2 −2 lib/fog/compute/models/aws/server.rb
  33. +3 −3 lib/fog/compute/models/aws/servers.rb
  34. +2 −2 lib/fog/compute/models/aws/snapshot.rb
  35. +3 −3 lib/fog/compute/models/aws/snapshots.rb
  36. +2 −4 lib/fog/compute/models/aws/tag.rb
  37. +3 −3 lib/fog/compute/models/aws/tags.rb
  38. +2 −2 lib/fog/compute/models/aws/volume.rb
  39. +3 −3 lib/fog/compute/models/aws/volumes.rb
  40. +2 −2 lib/fog/compute/models/bluebox/flavor.rb
  41. +4 −4 lib/fog/compute/models/bluebox/flavors.rb
  42. +2 −2 lib/fog/compute/models/bluebox/image.rb
  43. +4 −4 lib/fog/compute/models/bluebox/images.rb
  44. +2 −2 lib/fog/compute/models/bluebox/server.rb
  45. +4 −4 lib/fog/compute/models/bluebox/servers.rb
  46. +2 −2 lib/fog/compute/models/brightbox/account.rb
  47. +2 −2 lib/fog/compute/models/brightbox/cloud_ip.rb
  48. +3 −3 lib/fog/compute/models/brightbox/cloud_ips.rb
  49. +2 −2 lib/fog/compute/models/brightbox/flavor.rb
  50. +3 −3 lib/fog/compute/models/brightbox/flavors.rb
  51. +2 −2 lib/fog/compute/models/brightbox/image.rb
  52. +3 −3 lib/fog/compute/models/brightbox/images.rb
  53. +2 −2 lib/fog/compute/models/brightbox/load_balancer.rb
  54. +3 −3 lib/fog/compute/models/brightbox/load_balancers.rb
  55. +2 −2 lib/fog/compute/models/brightbox/server.rb
  56. +3 −3 lib/fog/compute/models/brightbox/servers.rb
  57. +2 −2 lib/fog/compute/models/brightbox/user.rb
  58. +3 −3 lib/fog/compute/models/brightbox/users.rb
  59. +2 −2 lib/fog/compute/models/brightbox/zone.rb
  60. +3 −3 lib/fog/compute/models/brightbox/zones.rb
  61. +3 −3 lib/fog/compute/models/ecloud/backup_internet_service.rb
  62. +3 −3 lib/fog/compute/models/ecloud/backup_internet_services.rb
  63. +3 −3 lib/fog/compute/models/ecloud/catalog.rb
  64. +2 −2 lib/fog/compute/models/ecloud/catalog_item.rb
  65. +2 −2 lib/fog/compute/models/ecloud/firewall_acl.rb
  66. +3 −3 lib/fog/compute/models/ecloud/firewall_acls.rb
  67. +2 −2 lib/fog/compute/models/ecloud/internet_service.rb
  68. +3 −3 lib/fog/compute/models/ecloud/internet_services.rb
  69. +2 −2 lib/fog/compute/models/ecloud/ip.rb
  70. +3 −3 lib/fog/compute/models/ecloud/ips.rb
  71. +3 −3 lib/fog/compute/models/ecloud/network.rb
  72. +2 −2 lib/fog/compute/models/ecloud/networks.rb
  73. +2 −2 lib/fog/compute/models/ecloud/node.rb
  74. +3 −3 lib/fog/compute/models/ecloud/nodes.rb
  75. +3 −3 lib/fog/compute/models/ecloud/public_ip.rb
  76. +2 −2 lib/fog/compute/models/ecloud/public_ips.rb
  77. +2 −2 lib/fog/compute/models/ecloud/server.rb
  78. +3 −3 lib/fog/compute/models/ecloud/servers.rb
  79. +2 −2 lib/fog/compute/models/ecloud/task.rb
  80. +3 −3 lib/fog/compute/models/ecloud/tasks.rb
  81. +9 −9 lib/fog/compute/models/ecloud/vdc.rb
  82. +3 −3 lib/fog/compute/models/ecloud/vdcs.rb
  83. +2 −2 lib/fog/compute/models/go_grid/image.rb
  84. +4 −4 lib/fog/compute/models/go_grid/images.rb
  85. +2 −2 lib/fog/compute/models/go_grid/password.rb
  86. +4 −4 lib/fog/compute/models/go_grid/passwords.rb
  87. +2 −2 lib/fog/compute/models/go_grid/server.rb
  88. +4 −4 lib/fog/compute/models/go_grid/servers.rb
  89. +2 −2 lib/fog/compute/models/linode/data_center.rb
  90. +3 −3 lib/fog/compute/models/linode/data_centers.rb
  91. +2 −2 lib/fog/compute/models/linode/disk.rb
  92. +3 −3 lib/fog/compute/models/linode/disks.rb
  93. +2 −2 lib/fog/compute/models/linode/flavor.rb
  94. +3 −3 lib/fog/compute/models/linode/flavors.rb
  95. +2 −2 lib/fog/compute/models/linode/image.rb
  96. +4 −4 lib/fog/compute/models/linode/images.rb
  97. +2 −2 lib/fog/compute/models/linode/ip.rb
  98. +4 −4 lib/fog/compute/models/linode/ips.rb
  99. +2 −2 lib/fog/compute/models/linode/kernel.rb
  100. +4 −4 lib/fog/compute/models/linode/kernels.rb
  101. +4 −4 lib/fog/compute/models/linode/server.rb
  102. +4 −4 lib/fog/compute/models/linode/servers.rb
  103. +2 −2 lib/fog/compute/models/linode/stack_script.rb
  104. +4 −4 lib/fog/compute/models/linode/stack_scripts.rb
  105. +2 −2 lib/fog/compute/models/ninefold/address.rb
  106. +3 −3 lib/fog/compute/models/ninefold/addresses.rb
  107. +2 −2 lib/fog/compute/models/ninefold/flavor.rb
  108. +3 −3 lib/fog/compute/models/ninefold/flavors.rb
  109. +2 −2 lib/fog/compute/models/ninefold/image.rb
  110. +3 −3 lib/fog/compute/models/ninefold/images.rb
  111. +2 −2 lib/fog/compute/models/ninefold/ip_forwarding_rule.rb
  112. +3 −3 lib/fog/compute/models/ninefold/ip_forwarding_rules.rb
  113. +2 −2 lib/fog/compute/models/ninefold/server.rb
  114. +3 −3 lib/fog/compute/models/ninefold/servers.rb
  115. +2 −2 lib/fog/compute/models/rackspace/flavor.rb
  116. +4 −4 lib/fog/compute/models/rackspace/flavors.rb
  117. +2 −2 lib/fog/compute/models/rackspace/image.rb
  118. +4 −4 lib/fog/compute/models/rackspace/images.rb
  119. +2 −2 lib/fog/compute/models/rackspace/server.rb
  120. +4 −4 lib/fog/compute/models/rackspace/servers.rb
  121. +2 −2 lib/fog/compute/models/slicehost/flavor.rb
  122. +3 −3 lib/fog/compute/models/slicehost/flavors.rb
  123. +2 −2 lib/fog/compute/models/slicehost/image.rb
  124. +3 −3 lib/fog/compute/models/slicehost/images.rb
  125. +2 −2 lib/fog/compute/models/slicehost/server.rb
  126. +3 −3 lib/fog/compute/models/slicehost/servers.rb
  127. +2 −2 lib/fog/compute/models/storm_on_demand/balancer.rb
  128. +3 −3 lib/fog/compute/models/storm_on_demand/balancers.rb
  129. +2 −2 lib/fog/compute/models/storm_on_demand/config.rb
  130. +3 −3 lib/fog/compute/models/storm_on_demand/configs.rb
  131. +2 −2 lib/fog/compute/models/storm_on_demand/image.rb
  132. +3 −3 lib/fog/compute/models/storm_on_demand/images.rb
  133. +2 −2 lib/fog/compute/models/storm_on_demand/private_ip.rb
  134. +3 −3 lib/fog/compute/models/storm_on_demand/private_ips.rb
  135. +2 −2 lib/fog/compute/models/storm_on_demand/server.rb
  136. +3 −3 lib/fog/compute/models/storm_on_demand/servers.rb
  137. +2 −2 lib/fog/compute/models/storm_on_demand/stat.rb
  138. +3 −3 lib/fog/compute/models/storm_on_demand/stats.rb
  139. +2 −2 lib/fog/compute/models/storm_on_demand/template.rb
  140. +3 −3 lib/fog/compute/models/storm_on_demand/templates.rb
  141. +3 −3 lib/fog/compute/models/virtual_box/medium.rb
  142. +2 −2 lib/fog/compute/models/virtual_box/medium_format.rb
  143. +3 −3 lib/fog/compute/models/virtual_box/mediums.rb
  144. +3 −3 lib/fog/compute/models/virtual_box/nat_engine.rb
  145. +2 −2 lib/fog/compute/models/virtual_box/nat_redirect.rb
  146. +3 −3 lib/fog/compute/models/virtual_box/nat_redirects.rb
  147. +3 −3 lib/fog/compute/models/virtual_box/network_adapter.rb
  148. +3 −3 lib/fog/compute/models/virtual_box/network_adapters.rb
  149. +4 −4 lib/fog/compute/models/virtual_box/server.rb
  150. +3 −3 lib/fog/compute/models/virtual_box/servers.rb
  151. +2 −2 lib/fog/compute/models/virtual_box/storage_controller.rb
  152. +3 −3 lib/fog/compute/models/virtual_box/storage_controllers.rb
  153. +2 −2 lib/fog/compute/models/voxel/image.rb
  154. +3 −3 lib/fog/compute/models/voxel/images.rb
  155. +2 −2 lib/fog/compute/models/voxel/server.rb
  156. +3 −3 lib/fog/compute/models/voxel/servers.rb
  157. +3 −17 lib/fog/compute/new_servers.rb
  158. +2 −16 lib/fog/compute/ninefold.rb
  159. +2 −2 lib/fog/compute/parsers/aws/allocate_address.rb
  160. +2 −2 lib/fog/compute/parsers/aws/attach_volume.rb
  161. +2 −2 lib/fog/compute/parsers/aws/basic.rb
  162. +2 −2 lib/fog/compute/parsers/aws/create_image.rb
  163. +2 −2 lib/fog/compute/parsers/aws/create_key_pair.rb
  164. +2 −2 lib/fog/compute/parsers/aws/create_snapshot.rb
  165. +2 −2 lib/fog/compute/parsers/aws/create_volume.rb
  166. +2 −2 lib/fog/compute/parsers/aws/deregister_image.rb
  167. +2 −2 lib/fog/compute/parsers/aws/describe_addresses.rb
  168. +2 −2 lib/fog/compute/parsers/aws/describe_availability_zones.rb
  169. +2 −2 lib/fog/compute/parsers/aws/describe_images.rb
  170. +2 −2 lib/fog/compute/parsers/aws/describe_instances.rb
  171. +2 −2 lib/fog/compute/parsers/aws/describe_key_pairs.rb
  172. +2 −2 lib/fog/compute/parsers/aws/describe_regions.rb
  173. +2 −2 lib/fog/compute/parsers/aws/describe_reserved_instances.rb
  174. +2 −2 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb
  175. +2 −2 lib/fog/compute/parsers/aws/describe_security_groups.rb
  176. +2 −2 lib/fog/compute/parsers/aws/describe_snapshots.rb
  177. +2 −2 lib/fog/compute/parsers/aws/describe_tags.rb
  178. +2 −2 lib/fog/compute/parsers/aws/describe_volumes.rb
  179. +2 −2 lib/fog/compute/parsers/aws/detach_volume.rb
  180. +2 −2 lib/fog/compute/parsers/aws/get_console_output.rb
  181. +2 −2 lib/fog/compute/parsers/aws/get_password_data.rb
  182. +2 −2 lib/fog/compute/parsers/aws/import_key_pair.rb
  183. +2 −2 lib/fog/compute/parsers/aws/monitor_unmonitor_instances.rb
  184. +2 −2 lib/fog/compute/parsers/aws/register_image.rb
  185. +2 −2 lib/fog/compute/parsers/aws/run_instances.rb
  186. +2 −2 lib/fog/compute/parsers/aws/start_stop_instances.rb
  187. +2 −2 lib/fog/compute/parsers/aws/terminate_instances.rb
  188. +2 −2 lib/fog/compute/parsers/slicehost/create_slice.rb
  189. +2 −2 lib/fog/compute/parsers/slicehost/get_backups.rb
  190. +2 −2 lib/fog/compute/parsers/slicehost/get_flavor.rb
  191. +2 −2 lib/fog/compute/parsers/slicehost/get_flavors.rb
  192. +2 −2 lib/fog/compute/parsers/slicehost/get_image.rb
  193. +2 −2 lib/fog/compute/parsers/slicehost/get_images.rb
  194. +2 −2 lib/fog/compute/parsers/slicehost/get_slice.rb
  195. +2 −2 lib/fog/compute/parsers/slicehost/get_slices.rb
  196. +2 −2 lib/fog/compute/parsers/voxel/basic.rb
  197. +2 −2 lib/fog/compute/parsers/voxel/devices_list.rb
  198. +2 −2 lib/fog/compute/parsers/voxel/images_list.rb
  199. +2 −2 lib/fog/compute/parsers/voxel/voxcloud_create.rb
  200. +2 −2 lib/fog/compute/parsers/voxel/voxcloud_delete.rb
  201. +2 −2 lib/fog/compute/parsers/voxel/voxcloud_status.rb
  202. +3 −17 lib/fog/compute/rackspace.rb
  203. +3 −3 lib/fog/compute/requests/aws/allocate_address.rb
  204. +5 −5 lib/fog/compute/requests/aws/associate_address.rb
  205. +7 −7 lib/fog/compute/requests/aws/attach_volume.rb
  206. +4 −4 lib/fog/compute/requests/aws/authorize_security_group_ingress.rb
  207. +3 −3 lib/fog/compute/requests/aws/create_image.rb
  208. +4 −4 lib/fog/compute/requests/aws/create_key_pair.rb
  209. +4 −4 lib/fog/compute/requests/aws/create_security_group.rb
  210. +3 −3 lib/fog/compute/requests/aws/create_snapshot.rb
  211. +6 −6 lib/fog/compute/requests/aws/create_tags.rb
  212. +4 −4 lib/fog/compute/requests/aws/create_volume.rb
  213. +3 −3 lib/fog/compute/requests/aws/delete_key_pair.rb
  214. +4 −4 lib/fog/compute/requests/aws/delete_security_group.rb
  215. +4 −4 lib/fog/compute/requests/aws/delete_snapshot.rb
  216. +4 −4 lib/fog/compute/requests/aws/delete_tags.rb
  217. +5 −5 lib/fog/compute/requests/aws/delete_volume.rb
  218. +4 −4 lib/fog/compute/requests/aws/deregister_image.rb
  219. +3 −3 lib/fog/compute/requests/aws/describe_addresses.rb
  220. +3 −3 lib/fog/compute/requests/aws/describe_availability_zones.rb
  221. +3 −3 lib/fog/compute/requests/aws/describe_images.rb
  222. +3 −3 lib/fog/compute/requests/aws/describe_instances.rb
  223. +3 −3 lib/fog/compute/requests/aws/describe_key_pairs.rb
  224. +3 −3 lib/fog/compute/requests/aws/describe_regions.rb
  225. +3 −3 lib/fog/compute/requests/aws/describe_reserved_instances.rb
  226. +3 −3 lib/fog/compute/requests/aws/describe_reserved_instances_offerings.rb
  227. +3 −3 lib/fog/compute/requests/aws/describe_security_groups.rb
  228. +3 −3 lib/fog/compute/requests/aws/describe_snapshots.rb
  229. +3 −3 lib/fog/compute/requests/aws/describe_tags.rb
  230. +3 −3 lib/fog/compute/requests/aws/describe_volumes.rb
  231. +4 −4 lib/fog/compute/requests/aws/detach_volume.rb
  232. +4 −4 lib/fog/compute/requests/aws/disassociate_address.rb
  233. +4 −4 lib/fog/compute/requests/aws/get_console_output.rb
  234. +4 −4 lib/fog/compute/requests/aws/get_password_data.rb
  235. +4 −4 lib/fog/compute/requests/aws/import_key_pair.rb
  236. +3 −3 lib/fog/compute/requests/aws/modify_image_attributes.rb
  237. +5 −5 lib/fog/compute/requests/aws/modify_snapshot_attribute.rb
  238. +5 −5 lib/fog/compute/requests/aws/monitor_instances.rb
  239. +5 −5 lib/fog/compute/requests/aws/reboot_instances.rb
  240. +4 −4 lib/fog/compute/requests/aws/register_image.rb
  241. +4 −4 lib/fog/compute/requests/aws/release_address.rb
  242. +4 −4 lib/fog/compute/requests/aws/revoke_security_group_ingress.rb
  243. +5 −5 lib/fog/compute/requests/aws/run_instances.rb
  244. +4 −4 lib/fog/compute/requests/aws/start_instances.rb
  245. +3 −3 lib/fog/compute/requests/aws/stop_instances.rb
  246. +5 −5 lib/fog/compute/requests/aws/terminate_instances.rb
  247. +5 −5 lib/fog/compute/requests/aws/unmonitor_instances.rb
  248. +2 −2 lib/fog/compute/requests/bluebox/create_block.rb
  249. +2 −2 lib/fog/compute/requests/bluebox/destroy_block.rb
  250. +2 −2 lib/fog/compute/requests/bluebox/get_block.rb
  251. +2 −2 lib/fog/compute/requests/bluebox/get_blocks.rb
  252. +2 −2 lib/fog/compute/requests/bluebox/get_product.rb
  253. +2 −2 lib/fog/compute/requests/bluebox/get_products.rb
  254. +2 −2 lib/fog/compute/requests/bluebox/get_template.rb
  255. +2 −2 lib/fog/compute/requests/bluebox/get_templates.rb
  256. +2 −2 lib/fog/compute/requests/bluebox/reboot_block.rb
  257. +2 −2 lib/fog/compute/requests/brightbox/activate_console_server.rb
  258. +2 −2 lib/fog/compute/requests/brightbox/add_listeners_load_balancer.rb
  259. +2 −2 lib/fog/compute/requests/brightbox/add_nodes_load_balancer.rb
  260. +2 −2 lib/fog/compute/requests/brightbox/create_api_client.rb
  261. +2 −2 lib/fog/compute/requests/brightbox/create_cloud_ip.rb
  262. +2 −2 lib/fog/compute/requests/brightbox/create_image.rb
  263. +2 −2 lib/fog/compute/requests/brightbox/create_load_balancer.rb
  264. +2 −2 lib/fog/compute/requests/brightbox/create_server.rb
  265. +2 −2 lib/fog/compute/requests/brightbox/destroy_api_client.rb
  266. +2 −2 lib/fog/compute/requests/brightbox/destroy_cloud_ip.rb
  267. +2 −2 lib/fog/compute/requests/brightbox/destroy_image.rb
  268. +2 −2 lib/fog/compute/requests/brightbox/destroy_load_balancer.rb
  269. +2 −2 lib/fog/compute/requests/brightbox/destroy_server.rb
  270. +2 −2 lib/fog/compute/requests/brightbox/get_account.rb
  271. +2 −2 lib/fog/compute/requests/brightbox/get_api_client.rb
  272. +2 −2 lib/fog/compute/requests/brightbox/get_cloud_ip.rb
  273. +2 −2 lib/fog/compute/requests/brightbox/get_image.rb
  274. +2 −2 lib/fog/compute/requests/brightbox/get_interface.rb
  275. +2 −2 lib/fog/compute/requests/brightbox/get_load_balancer.rb
  276. +2 −2 lib/fog/compute/requests/brightbox/get_server.rb
  277. +2 −2 lib/fog/compute/requests/brightbox/get_server_type.rb
  278. +2 −2 lib/fog/compute/requests/brightbox/get_user.rb
  279. +2 −2 lib/fog/compute/requests/brightbox/get_zone.rb
  280. +2 −2 lib/fog/compute/requests/brightbox/list_api_clients.rb
  281. +2 −2 lib/fog/compute/requests/brightbox/list_cloud_ips.rb
  282. +2 −2 lib/fog/compute/requests/brightbox/list_images.rb
  283. +2 −2 lib/fog/compute/requests/brightbox/list_load_balancers.rb
  284. +2 −2 lib/fog/compute/requests/brightbox/list_server_types.rb
  285. +2 −2 lib/fog/compute/requests/brightbox/list_servers.rb
  286. +2 −2 lib/fog/compute/requests/brightbox/list_users.rb
  287. +2 −2 lib/fog/compute/requests/brightbox/list_zones.rb
  288. +2 −2 lib/fog/compute/requests/brightbox/map_cloud_ip.rb
  289. +2 −2 lib/fog/compute/requests/brightbox/remove_listeners_load_balancer.rb
  290. +2 −2 lib/fog/compute/requests/brightbox/remove_nodes_load_balancer.rb
  291. +2 −2 lib/fog/compute/requests/brightbox/reset_ftp_password_account.rb
  292. +2 −2 lib/fog/compute/requests/brightbox/resize_server.rb
  293. +2 −2 lib/fog/compute/requests/brightbox/shutdown_server.rb
  294. +2 −2 lib/fog/compute/requests/brightbox/snapshot_server.rb
  295. +2 −2 lib/fog/compute/requests/brightbox/start_server.rb
  296. +2 −2 lib/fog/compute/requests/brightbox/stop_server.rb
  297. +2 −2 lib/fog/compute/requests/brightbox/unmap_cloud_ip.rb
  298. +2 −2 lib/fog/compute/requests/brightbox/update_account.rb
  299. +2 −2 lib/fog/compute/requests/brightbox/update_api_client.rb
  300. +2 −2 lib/fog/compute/requests/brightbox/update_image.rb
Sorry, we could not display the entire diff because too many files (535) changed.
View
1 bin/fog
@@ -38,6 +38,7 @@ else
# FIXME: hacks until we can `include Fog` in bin
CDN = Fog::CDN
+ Compute = Fog::Compute
DNS = Fog::DNS
Storage = Fog::Storage
View
3 lib/fog/bin/aws.rb
@@ -8,7 +8,7 @@ def class_for(key)
when :cloud_formation
Fog::AWS::CloudFormation
when :compute
- Fog::AWS::Compute
+ Fog::Compute::AWS
when :dns
Fog::DNS::AWS
when :elb
@@ -40,6 +40,7 @@ def [](service)
when :cloud_formation
Fog::AWS::CloudFormation.new
when :compute
+ Formatador.display_line("[yellow][WARN] AWS[:compute] is deprecated, use Compute[:aws] instead[/]")
Fog::Compute.new(:provider => 'AWS')
when :dns
Formatador.display_line("[yellow][WARN] AWS[:dns] is deprecated, use DNS[:aws] instead[/]")
View
3 lib/fog/bin/bluebox.rb
@@ -4,7 +4,7 @@ class << self
def class_for(key)
case key
when :compute
- Fog::Bluebox::Compute
+ Fog::Compute::Bluebox
when :dns
Fog::DNS::Bluebox
else
@@ -16,6 +16,7 @@ def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :compute
+ Formatador.display_line("[yellow][WARN] Bluebox[:compute] is deprecated, use Compute[:bluebox] instead[/]")
Fog::Compute.new(:provider => 'Bluebox')
when :dns
Formatador.display_line("[yellow][WARN] Bluebox[:storage] is deprecated, use Storage[:bluebox] instead[/]")
View
3 lib/fog/bin/brightbox.rb
@@ -4,7 +4,7 @@ class << self
def class_for(key)
case key
when :compute
- Fog::Brightbox::Compute
+ Fog::Compute::Brightbox
else
raise ArgumentError, "Unrecognized service: #{key}"
end
@@ -14,6 +14,7 @@ def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :compute
+ Formatador.display_line("[yellow][WARN] Brightbox[:compute] is deprecated, use Brightbox[:aws] instead[/]")
Fog::Compute.new(:provider => 'Brightbox')
else
raise ArgumentError, "Unrecognized service: #{key.inspect}"
View
3 lib/fog/bin/ecloud.rb
@@ -4,7 +4,7 @@ class << self
def class_for(key)
case key
when :compute
- Fog::Ecloud::Compute
+ Fog::Compute::Ecloud
else
raise ArgumentError, "Unrecognized service: #{key}"
end
@@ -14,6 +14,7 @@ def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :compute
+ Formatador.display_line("[yellow][WARN] Ecloud[:compute] is deprecated, use Compute[:ecloud] instead[/]")
Fog::Compute.new(:provider => 'Ecloud')
else
raise ArgumentError, "Unrecognized service: #{key.inspect}"
View
3 lib/fog/bin/go_grid.rb
@@ -4,7 +4,7 @@ class << self
def class_for(key)
case key
when :compute
- Fog::GoGrid::Compute
+ Fog::Compute::GoGrid
else
raise ArgumentError, "Unsupported #{self} service: #{key}"
end
@@ -14,6 +14,7 @@ def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :compute
+ Formatador.display_line("[yellow][WARN] GoGrid[:compute] is deprecated, use Compute[:gogrid] instead[/]")
Fog::Compute.new(:provider => 'GoGrid')
else
raise ArgumentError, "Unrecognized service: #{key.inspect}"
View
3 lib/fog/bin/linode.rb
@@ -4,7 +4,7 @@ class << self
def class_for(key)
case key
when :compute
- Fog::Linode::Compute
+ Fog::Compute::Linode
when :dns
Fog::DNS::Linode
else
@@ -16,6 +16,7 @@ def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :compute
+ Formatador.display_line("[yellow][WARN] Linode[:compute] is deprecated, use Compute[:linode] instead[/]")
Fog::Compute.new(:provider => 'Linode')
when :dns
Formatador.display_line("[yellow][WARN] Linode[:storage] is deprecated, use Storage[:linode] instead[/]")
View
3 lib/fog/bin/new_servers.rb
@@ -4,7 +4,7 @@ class << self
def class_for(key)
case key
when :compute
- Fog::NewServers::Compute
+ Fog::Compute::NewServers
else
raise ArgumentError, "Unsupported #{self} service: #{key}"
end
@@ -14,6 +14,7 @@ def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :compute
+ Formatador.display_line("[yellow][WARN] NewServers[:compute] is deprecated, use Compute[:newservers] instead[/]")
Fog::Compute.new(:provider => 'NewServers')
else
raise ArgumentError, "Unrecognized service: #{key.inspect}"
View
3 lib/fog/bin/ninefold.rb
@@ -4,7 +4,7 @@ class << self
def class_for(key)
case key
when :compute
- Fog::Ninefold::Compute
+ Fog::Compute::Ninefold
else
raise ArgumentError, "Unsupported #{self} service: #{key}"
end
@@ -14,6 +14,7 @@ def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :compute
+ Formatador.display_line("[yellow][WARN] Ninefold[:compute] is deprecated, use Compute[:ninefold] instead[/]")
Fog::Compute.new(:provider => 'Ninefold')
else
raise ArgumentError, "Unrecognized service: #{service}"
View
3 lib/fog/bin/rackspace.rb
@@ -6,7 +6,7 @@ def class_for(key)
when :cdn
Fog::CDN::Rackspace
when :compute
- Fog::Rackspace::Compute
+ Fog::Compute::Rackspace
when :storage
Fog::Storage::Rackspace
else
@@ -21,6 +21,7 @@ def [](service)
Formatador.display_line("[yellow][WARN] Rackspace[:cdn] is deprecated, use CDN[:rackspace] instead[/]")
Fog::CDN.new(:provider => 'Rackspace')
when :compute
+ Formatador.display_line("[yellow][WARN] Rackspace[:compute] is deprecated, use Compute[:rackspace] instead[/]")
Fog::Compute.new(:provider => 'Rackspace')
when :dns
Fog::DNS.new(:provider => 'Rackspace')
View
3 lib/fog/bin/slicehost.rb
@@ -4,7 +4,7 @@ class << self
def class_for(key)
case key
when :compute
- Fog::Slicehost::Compute
+ Fog::Compute::Slicehost
when :dns
Fog::DNS::Slicehost
else
@@ -16,6 +16,7 @@ def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :compute
+ Formatador.display_line("[yellow][WARN] Slicehost[:compute] is deprecated, use Compute[:slicehost] instead[/]")
Fog::Compute.new(:provider => 'Slicehost')
when :dns
Formatador.display_line("[yellow][WARN] Slicehost[:dns] is deprecated, use Storage[:slicehost] instead[/]")
View
3 lib/fog/bin/stormondemand.rb
@@ -4,7 +4,7 @@ class << self
def class_for(key)
case key
when :compute
- Fog::StormOnDemand::Compute
+ Fog::Compute::StormOnDemand
else
raise ArgumentError, "Unsupported #{self} service: #{key}"
end
@@ -14,6 +14,7 @@ def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :compute
+ Formatador.display_line("[yellow][WARN] StormOnDemand[:compute] is deprecated, use Compute[:stormondemand] instead[/]")
Fog::Compute.new(:provider => 'StormOnDemand')
else
raise ArgumentError, "Unrecognized service: #{key.inspect}"
View
3 lib/fog/bin/virtual_box.rb
@@ -4,7 +4,7 @@ class << self
def class_for(key)
case key
when :compute
- Fog::VirtualBox::Compute
+ Fog::Compute::VirtualBox
else
raise ArgumentError, "Unrecognized service: #{key}"
end
@@ -14,6 +14,7 @@ def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :compute
+ Formatador.display_line("[yellow][WARN] VirtualBox[:compute] is deprecated, use Compute[:virtualbox] instead[/]")
Fog::Compute.new(:provider => 'VirtualBox')
else
raise ArgumentError, "Unrecognized service: #{key.inspect}"
View
3 lib/fog/bin/voxel.rb
@@ -4,7 +4,7 @@ class << self
def class_for(key)
case key
when :compute
- Fog::Voxel::Compute
+ Fog::Compute::Voxel
else
raise ArgumentError, "Unrecognized service: #{key}"
end
@@ -14,6 +14,7 @@ def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :compute
+ Formatador.display_line("[yellow][WARN] Voxel[:compute] is deprecated, use Compute[:voxel] instead[/]")
Fog::Compute.new(:provider => 'Voxel')
else
raise ArgumentError, "Unrecognized service: #{key.inspect}"
View
71 lib/fog/compute.rb
@@ -1,52 +1,67 @@
module Fog
- class Compute
+ module Compute
+
+ def self.[](provider)
+ self.new(:provider => provider)
+ end
def self.new(attributes)
attributes = attributes.dup # prevent delete from having side effects
- case provider = attributes[:provider] # attributes.delete(:provider)
- when 'AWS'
+ case provider = attributes[:provider].to_s.downcase.to_sym
+ when :aws
require 'fog/compute/aws'
- Fog::AWS::Compute.new(attributes)
- when 'Bluebox'
+ Fog::Compute::AWS.new(attributes)
+ when :bluebox
require 'fog/compute/bluebox'
- Fog::Bluebox::Compute.new(attributes)
- when 'Brightbox'
+ Fog::Compute::Bluebox.new(attributes)
+ when :brightbox
require 'fog/compute/brightbox'
- Fog::Brightbox::Compute.new(attributes)
- when 'Ecloud'
+ Fog::Compute::Brightbox.new(attributes)
+ when :ecloud
require 'fog/compute/ecloud'
- Fog::Ecloud::Compute.new(attributes)
- when 'GoGrid'
+ Fog::Compute::Ecloud.new(attributes)
+ when :gogrid
require 'fog/compute/go_grid'
- Fog::GoGrid::Compute.new(attributes)
- when 'Linode'
+ Fog::Compute::GoGrid.new(attributes)
+ when :linode
require 'fog/compute/linode'
- Fog::Linode::Compute.new(attributes)
- when 'NewServers'
+ Fog::Compute::Linode.new(attributes)
+ when :newservers
require 'fog/compute/new_servers'
- Fog::NewServers::Compute.new(attributes)
- when 'Ninefold'
+ Fog::Compute::NewServers.new(attributes)
+ when :ninefold
require 'fog/compute/ninefold'
- Fog::Ninefold::Compute.new(attributes)
- when 'Rackspace'
+ Fog::Compute::Ninefold.new(attributes)
+ when :rackspace
require 'fog/compute/rackspace'
- Fog::Rackspace::Compute.new(attributes)
- when 'Slicehost'
+ Fog::Compute::Rackspace.new(attributes)
+ when :slicehost
require 'fog/compute/slicehost'
- Fog::Slicehost::Compute.new(attributes)
- when 'StormOnDemand'
+ Fog::Compute::Slicehost.new(attributes)
+ when :stormondemand
require 'fog/compute/storm_on_demand'
- Fog::StormOnDemand::Compute.new(attributes)
- when 'VirtualBox'
+ Fog::Compute::StormOnDemand.new(attributes)
+ when :virtualbox
require 'fog/compute/virtual_box'
- Fog::VirtualBox::Compute.new(attributes)
- when 'Voxel'
+ Fog::Compute::VirtualBox.new(attributes)
+ when :voxel
require 'fog/compute/voxel'
- Fog::Voxel::Compute.new(attributes)
+ Fog::Compute::Voxel.new(attributes)
else
raise ArgumentError.new("#{provider} is not a recognized compute provider")
end
end
+ def self.servers
+ servers = []
+ for provider in [:aws, :bluebox, :brightbox, :ecloud, :gogrid, :linode, :newservers, :ninefold, :rackspace, :slicehost, :stormondemand, :virtualbox, :voxel]
+ begin
+ servers.concat(self[provider].servers)
+ rescue # ignore any missing credentials/etc
+ end
+ end
+ servers
+ end
+
end
end
View
22 lib/fog/compute/aws.rb
@@ -1,6 +1,6 @@
module Fog
- module AWS
- class Compute < Fog::Service
+ module Compute
+ class AWS < Fog::Service
requires :aws_access_key_id, :aws_secret_access_key
recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent
@@ -130,13 +130,6 @@ def self.reset
end
def initialize(options={})
- unless options.delete(:provider)
- location = caller.first
- warning = "[yellow][WARN] Fog::AWS::Compute.new is deprecated, use Fog::Compute.new(:provider => 'AWS') instead[/]"
- warning << " [light_black](" << location << ")[/] "
- Formatador.display_line(warning)
- end
-
require 'fog/compute/parsers/aws/basic'
@aws_access_key_id = options[:aws_access_key_id]
@@ -204,13 +197,6 @@ class Real
# ==== Returns
# * EC2 object with connection to aws.
def initialize(options={})
- unless options.delete(:provider)
- location = caller.first
- warning = "[yellow][WARN] Fog::AWS::Compute.new is deprecated, use Fog::Compute.new(:provider => 'AWS') instead[/]"
- warning << " [light_black](" << location << ")[/] "
- Formatador.display_line(warning)
- end
-
require 'fog/core/parser'
@aws_access_key_id = options[:aws_access_key_id]
@@ -282,9 +268,9 @@ def request(params)
if match = error.message.match(/<Code>(.*)<\/Code><Message>(.*)<\/Message>/)
raise case match[1].split('.').last
when 'NotFound'
- Fog::AWS::Compute::NotFound.slurp(error, match[2])
+ Fog::Compute::AWS::NotFound.slurp(error, match[2])
else
- Fog::AWS::Compute::Error.slurp(error, "#{match[1]} => #{match[2]}")
+ Fog::Compute::AWS::Error.slurp(error, "#{match[1]} => #{match[2]}")
end
else
raise error
View
20 lib/fog/compute/bluebox.rb
@@ -1,6 +1,6 @@
module Fog
- module Bluebox
- class Compute < Fog::Service
+ module Compute
+ class Bluebox < Fog::Service
requires :bluebox_api_key, :bluebox_customer_id
recognizes :bluebox_host, :bluebox_port, :bluebox_scheme, :persistent
@@ -38,13 +38,6 @@ def self.reset
end
def initialize(options={})
- unless options.delete(:provider)
- location = caller.first
- warning = "[yellow][WARN] Fog::Bluebox::Compute.new is deprecated, use Fog::Compute.new(:provider => 'Bluebox') instead[/]"
- warning << " [light_black](" << location << ")[/] "
- Formatador.display_line(warning)
- end
-
@bluebox_api_key = options[:bluebox_api_key]
end
@@ -61,13 +54,6 @@ def reset_data
class Real
def initialize(options={})
- unless options.delete(:provider)
- location = caller.first
- warning = "[yellow][WARN] Fog::Bluebox::Compute.new is deprecated, use Fog::Compute.new(:provider => 'Bluebox') instead[/]"
- warning << " [light_black](" << location << ")[/] "
- Formatador.display_line(warning)
- end
-
require 'json'
@bluebox_api_key = options[:bluebox_api_key]
@bluebox_customer_id = options[:bluebox_customer_id]
@@ -92,7 +78,7 @@ def request(params)
rescue Excon::Errors::HTTPStatusError => error
raise case error
when Excon::Errors::NotFound
- Fog::Bluebox::Compute::NotFound.slurp(error)
+ Fog::Compute::Bluebox::NotFound.slurp(error)
else
error
end
View
20 lib/fog/compute/brightbox.rb
@@ -1,6 +1,6 @@
module Fog
- module Brightbox
- class Compute < Fog::Service
+ module Compute
+ class Brightbox < Fog::Service
API_URL = "https://api.gb1.brightbox.com/"
@@ -77,13 +77,6 @@ class Compute < Fog::Service
class Mock
def initialize(options)
- unless options.delete(:provider)
- location = caller.first
- warning = "[yellow][WARN] Fog::Brightbox::Compute.new is deprecated, use Fog::Compute.new(:provider => 'Brightbox') instead[/]"
- warning << " [light_black](" << location << ")[/] "
- Formatador.display_line(warning)
- end
-
@brightbox_client_id = options[:brightbox_client_id] || Fog.credentials[:brightbox_client_id]
@brightbox_secret = options[:brightbox_secret] || Fog.credentials[:brightbox_secret]
end
@@ -96,13 +89,6 @@ def request(options)
class Real
def initialize(options)
- unless options.delete(:provider)
- location = caller.first
- warning = "[yellow][WARN] Fog::Brightbox::Compute.new is deprecated, use Fog::Compute.new(:provider => 'Brightbox') instead[/]"
- warning << " [light_black](" << location << ")[/] "
- Formatador.display_line(warning)
- end
-
require "json"
# Currently authentication and api endpoints are the same but may change
@auth_url = options[:brightbox_auth_url] || Fog.credentials[:brightbox_auth_url] || API_URL
@@ -126,7 +112,7 @@ def request(params)
end
def account
- Fog::Brightbox::Compute::Account.new(get_account)
+ Fog::Compute::Brightbox::Account.new(get_account)
end
private
View
6 lib/fog/compute/ecloud.rb
@@ -823,8 +823,8 @@ def load_unless_loaded!
end
module Fog
- module Ecloud
- class Compute < Fog::Service
+ module Compute
+ class Ecloud < Fog::Service
class UnsupportedVersion < Exception ; end
@@ -953,7 +953,7 @@ def xmlns
class Mock
include Shared
- include MockDataClasses
+ include Fog::Ecloud::MockDataClasses
def self.base_url
"https://fakey.com/api/v0.8b-ext2.6"
View
20 lib/fog/compute/go_grid.rb
@@ -1,6 +1,6 @@
module Fog
- module GoGrid
- class Compute < Fog::Service
+ module Compute
+ class GoGrid < Fog::Service
requires :go_grid_api_key, :go_grid_shared_secret
recognizes :host, :path, :port, :scheme, :persistent
@@ -41,13 +41,6 @@ def self.reset
end
def initialize(options={})
- unless options.delete(:provider)
- location = caller.first
- warning = "[yellow][WARN] Fog::GoGrid::Compute.new is deprecated, use Fog::Compute.new(:provider => 'GoGrid') instead[/]"
- warning << " [light_black](" << location << ")[/] "
- Formatador.display_line(warning)
- end
-
@go_grid_api_key = options[:go_grid_api_key]
@go_grid_shared_secret = options[:go_grid_shared_secret]
end
@@ -65,13 +58,6 @@ def reset_data
class Real
def initialize(options={})
- unless options.delete(:provider)
- location = caller.first
- warning = "[yellow][WARN] Fog::GoGrid::Compute.new is deprecated, use Fog::Compute.new(:provider => 'GoGrid') instead[/]"
- warning << " [light_black](" << location << ")[/] "
- Formatador.display_line(warning)
- end
-
require 'digest/md5'
require 'json'
@go_grid_api_key = options[:go_grid_api_key]
@@ -108,7 +94,7 @@ def request(params)
rescue Excon::Errors::HTTPStatusError => error
raise case error
when Excon::Errors::NotFound
- Fog::GoGrid::Compute::NotFound.slurp(error)
+ Fog::Compute::GoGrid::NotFound.slurp(error)
else
error
end
View
22 lib/fog/compute/linode.rb
@@ -1,6 +1,6 @@
module Fog
- module Linode
- class Compute < Fog::Service
+ module Compute
+ class Linode < Fog::Service
requires :linode_api_key
recognizes :port, :scheme, :persistent
@@ -62,13 +62,6 @@ def self.reset
end
def initialize(options={})
- unless options.delete(:provider)
- location = caller.first
- warning = "[yellow][WARN] Fog::Linode::Compute.new is deprecated, use Fog::Compute.new(:provider => 'Linode') instead[/]"
- warning << " [light_black](" << location << ")[/] "
- Formatador.display_line(warning)
- end
-
@linode_api_key = options[:linode_api_key]
end
@@ -85,13 +78,6 @@ def reset_data
class Real
def initialize(options={})
- unless options.delete(:provider)
- location = caller.first
- warning = "[yellow][WARN] Fog::Linode::Compute.new is deprecated, use Fog::Compute.new(:provider => 'Linode') instead[/]"
- warning << " [light_black](" << location << ")[/] "
- Formatador.display_line(warning)
- end
-
require 'json'
@linode_api_key = options[:linode_api_key]
@host = options[:host] || "api.linode.com"
@@ -115,9 +101,9 @@ def request(params)
if data = response.body['ERRORARRAY'].first
error = case data['ERRORCODE']
when 5
- Fog::Linode::Compute::NotFound
+ Fog::Compute::Linode::NotFound
else
- Fog::Linode::Compute::Error
+ Fog::Compute::Linode::Error
end
raise error.new(data['ERRORMESSAGE'])
end
View
4 lib/fog/compute/models/aws/address.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Address < Fog::Model
View
6 lib/fog/compute/models/aws/addresses.rb
@@ -2,15 +2,15 @@
require 'fog/compute/models/aws//address'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Addresses < Fog::Collection
attribute :filters
attribute :server
- model Fog::AWS::Compute::Address
+ model Fog::Compute::AWS::Address
# Used to create an IP address
#
View
4 lib/fog/compute/models/aws/flavor.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Flavor < Fog::Model
View
8 lib/fog/compute/models/aws/flavors.rb
@@ -2,8 +2,8 @@
require 'fog/compute/models/aws/flavor'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
FLAVORS = [
{ :bits => 0, :cores => 2, :disk => 0, :id => 't1.micro', :name => 'Micro Instance', :ram => 613},
@@ -25,7 +25,7 @@ class Compute
class Flavors < Fog::Collection
- model Fog::AWS::Compute::Flavor
+ model Fog::Compute::AWS::Flavor
# Returns an array of all flavors that have been created
#
@@ -131,7 +131,7 @@ class Flavors < Fog::Collection
#
def all
- load(Fog::AWS::Compute::FLAVORS)
+ load(Fog::Compute::AWS::FLAVORS)
self
end
View
4 lib/fog/compute/models/aws/image.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Image < Fog::Model
View
6 lib/fog/compute/models/aws/images.rb
@@ -2,14 +2,14 @@
require 'fog/compute/models/aws/image'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Images < Fog::Collection
attribute :filters
- model Fog::AWS::Compute::Image
+ model Fog::Compute::AWS::Image
# Creates a new Amazon machine image
#
View
5 lib/fog/compute/models/aws/key_pair.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class KeyPair < Fog::Model
@@ -52,7 +52,6 @@ def writable?
!!(private_key && ENV.has_key?('HOME'))
end
- private
end
end
View
6 lib/fog/compute/models/aws/key_pairs.rb
@@ -2,15 +2,15 @@
require 'fog/compute/models/aws/key_pair'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class KeyPairs < Fog::Collection
attribute :filters
attribute :key_name
- model Fog::AWS::Compute::KeyPair
+ model Fog::Compute::AWS::KeyPair
# Used to create a key pair. There are 3 arguments and only name is required. You can generate a new key_pair as follows:
# AWS.key_pairs.create(:name => "test", :fingerprint => "123", :private_key => '234234')
View
4 lib/fog/compute/models/aws/security_group.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class SecurityGroup < Fog::Model
View
6 lib/fog/compute/models/aws/security_groups.rb
@@ -2,14 +2,14 @@
require 'fog/compute/models/aws/security_group'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class SecurityGroups < Fog::Collection
attribute :filters
- model Fog::AWS::Compute::SecurityGroup
+ model Fog::Compute::AWS::SecurityGroup
# Creates a new security group
#
View
4 lib/fog/compute/models/aws/server.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Server < Fog::Model
extend Fog::Deprecation
View
6 lib/fog/compute/models/aws/servers.rb
@@ -2,14 +2,14 @@
require 'fog/compute/models/aws/server'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Servers < Fog::Collection
attribute :filters
- model Fog::AWS::Compute::Server
+ model Fog::Compute::AWS::Server
# Creates a new server
#
View
4 lib/fog/compute/models/aws/snapshot.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Snapshot < Fog::Model
View
6 lib/fog/compute/models/aws/snapshots.rb
@@ -2,15 +2,15 @@
require 'fog/compute/models/aws/snapshot'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Snapshots < Fog::Collection
attribute :filters
attribute :volume
- model Fog::AWS::Compute::Snapshot
+ model Fog::Compute::AWS::Snapshot
def initialize(attributes)
self.filters ||= { 'RestorableBy' => 'self' }
View
6 lib/fog/compute/models/aws/tag.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Tag < Fog::Model
@@ -28,8 +28,6 @@ def save
true
end
- private
-
end
end
end
View
6 lib/fog/compute/models/aws/tags.rb
@@ -2,14 +2,14 @@
require 'fog/compute/models/aws/tag'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Tags < Fog::Collection
attribute :filters
- model Fog::AWS::Compute::Tag
+ model Fog::Compute::AWS::Tag
def initialize(attributes)
self.filters ||= {}
View
4 lib/fog/compute/models/aws/volume.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Volume < Fog::Model
View
6 lib/fog/compute/models/aws/volumes.rb
@@ -2,15 +2,15 @@
require 'fog/compute/models/aws/volume'
module Fog
- module AWS
- class Compute
+ module Compute
+ class AWS
class Volumes < Fog::Collection
attribute :filters
attribute :server
- model Fog::AWS::Compute::Volume
+ model Fog::Compute::AWS::Volume
# Used to create a volume. There are 3 arguments and availability_zone and size are required. You can generate a new key_pair as follows:
# AWS.volumes.create(:availability_zone => 'us-east-1a', :size => 10)
View
4 lib/fog/compute/models/bluebox/flavor.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module Bluebox
- class Compute
+ module Compute
+ class Bluebox
class Flavor < Fog::Model
View
8 lib/fog/compute/models/bluebox/flavors.rb
@@ -2,12 +2,12 @@
require 'fog/compute/models/bluebox/flavor'
module Fog
- module Bluebox
- class Compute
+ module Compute
+ class Bluebox
class Flavors < Fog::Collection
- model Fog::Bluebox::Compute::Flavor
+ model Fog::Compute::Bluebox::Flavor
def all
data = connection.get_products.body
@@ -17,7 +17,7 @@ def all
def get(product_id)
response = connection.get_product(product_id)
new(response.body)
- rescue Fog::Bluebox::Compute::NotFound
+ rescue Fog::Compute::Bluebox::NotFound
nil
end
View
4 lib/fog/compute/models/bluebox/image.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module Bluebox
- class Compute
+ module Compute
+ class Bluebox
class Image < Fog::Model
View
8 lib/fog/compute/models/bluebox/images.rb
@@ -2,12 +2,12 @@
require 'fog/compute/models/bluebox/image'
module Fog
- module Bluebox
- class Compute
+ module Compute
+ class Bluebox
class Images < Fog::Collection
- model Fog::Bluebox::Compute::Image
+ model Fog::Compute::Bluebox::Image
def all
data = connection.get_templates.body
@@ -17,7 +17,7 @@ def all
def get(template_id)
response = connection.get_template(template_id)
new(response.body)
- rescue Fog::Bluebox::Compute::NotFound
+ rescue Fog::Compute::Bluebox::NotFound
nil
end
View
4 lib/fog/compute/models/bluebox/server.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module Bluebox
- class Compute
+ module Compute
+ class Bluebox
class BlockInstantiationError < StandardError; end
View
8 lib/fog/compute/models/bluebox/servers.rb
@@ -2,12 +2,12 @@
require 'fog/compute/models/bluebox/server'
module Fog
- module Bluebox
- class Compute
+ module Compute
+ class Bluebox
class Servers < Fog::Collection
- model Fog::Bluebox::Compute::Server
+ model Fog::Compute::Bluebox::Server
def all
data = connection.get_blocks.body
@@ -25,7 +25,7 @@ def get(server_id)
if server_id && server = connection.get_block(server_id).body
new(server)
end
- rescue Fog::Bluebox::Compute::NotFound
+ rescue Fog::Compute::Bluebox::NotFound
nil
end
View
4 lib/fog/compute/models/brightbox/account.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module Brightbox
- class Compute
+ module Compute
+ class Brightbox
class Account < Fog::Model
View
4 lib/fog/compute/models/brightbox/cloud_ip.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module Brightbox
- class Compute
+ module Compute
+ class Brightbox
class CloudIp < Fog::Model
View
6 lib/fog/compute/models/brightbox/cloud_ips.rb
@@ -2,12 +2,12 @@
require 'fog/compute/models/brightbox/cloud_ip'
module Fog
- module Brightbox
- class Compute
+ module Compute
+ class Brightbox
class CloudIps < Fog::Collection
- model Fog::Brightbox::Compute::CloudIp
+ model Fog::Compute::Brightbox::CloudIp
def all
data = connection.list_cloud_ips
View
4 lib/fog/compute/models/brightbox/flavor.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module Brightbox
- class Compute
+ module Compute
+ class Brightbox
class Flavor < Fog::Model
View
6 lib/fog/compute/models/brightbox/flavors.rb
@@ -2,12 +2,12 @@
require 'fog/compute/models/brightbox/flavor'
module Fog
- module Brightbox
- class Compute
+ module Compute
+ class Brightbox
class Flavors < Fog::Collection
- model Fog::Brightbox::Compute::Flavor
+ model Fog::Compute::Brightbox::Flavor
def all
data = connection.list_server_types
View
4 lib/fog/compute/models/brightbox/image.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module Brightbox
- class Compute
+ module Compute
+ class Brightbox
class Image < Fog::Model
View
6 lib/fog/compute/models/brightbox/images.rb
@@ -2,12 +2,12 @@
require 'fog/compute/models/brightbox/image'
module Fog
- module Brightbox
- class Compute
+ module Compute
+ class Brightbox
class Images < Fog::Collection
- model Fog::Brightbox::Compute::Image
+ model Fog::Compute::Brightbox::Image
def all
data = connection.list_images
View
4 lib/fog/compute/models/brightbox/load_balancer.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module Brightbox
- class Compute
+ module Compute
+ class Brightbox
class LoadBalancer < Fog::Model
View
6 lib/fog/compute/models/brightbox/load_balancers.rb
@@ -2,12 +2,12 @@
require 'fog/compute/models/brightbox/load_balancer'
module Fog
- module Brightbox
- class Compute
+ module Compute
+ class Brightbox
class LoadBalancers < Fog::Collection
- model Fog::Brightbox::Compute::LoadBalancer
+ model Fog::Compute::Brightbox::LoadBalancer
def all
data = connection.list_load_balancers
View
4 lib/fog/compute/models/brightbox/server.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module Brightbox
- class Compute
+ module Compute
+ class Brightbox
class Server < Fog::Model
View
6 lib/fog/compute/models/brightbox/servers.rb
@@ -2,12 +2,12 @@
require 'fog/compute/models/brightbox/server'
module Fog
- module Brightbox
- class Compute
+ module Compute
+ class Brightbox
class Servers < Fog::Collection
- model Fog::Brightbox::Compute::Server
+ model Fog::Compute::Brightbox::Server
def all
data = connection.list_servers
View
4 lib/fog/compute/models/brightbox/user.rb
@@ -1,8 +1,8 @@
require 'fog/core/model'
module Fog
- module Brightbox
- class Compute
+ module Compute
+ class Brightbox
class User < Fog::Model
View
6 lib/fog/compute/models/brightbox/users.rb