fog 0.7.2 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (320) hide show
  1. data/README.rdoc +3 -12
  2. data/Rakefile +3 -2
  3. data/benchs/parse_vs_push.rb +17 -8
  4. data/bin/fog +2 -2
  5. data/changelog.txt +123 -0
  6. data/docs/_layouts/default.html +21 -8
  7. data/docs/{_posts/2011-01-01-contributing.markdown → about/contributing.markdown} +0 -0
  8. data/docs/about/getting_started.markdown +83 -0
  9. data/docs/{_posts/2011-01-01-press.markdown → about/press.markdown} +6 -1
  10. data/docs/{_posts/2011-01-01-structure.markdown → about/structure.markdown} +0 -0
  11. data/docs/{_posts/2011-01-01-users.markdown → about/users.markdown} +0 -0
  12. data/docs/{_posts/2011-01-01-cdn.markdown → cdn/index.markdown} +12 -12
  13. data/docs/{_posts/2011-01-01-dns.markdown → dns/index.markdown} +18 -18
  14. data/docs/index.markdown +5 -4
  15. data/docs/{_posts/2011-01-01-storage.markdown → storage/index.markdown} +59 -21
  16. data/fog.gemspec +3 -9
  17. data/lib/fog.rb +1 -1
  18. data/lib/fog/aws/elb.rb +46 -12
  19. data/lib/fog/aws/iam.rb +1 -0
  20. data/lib/fog/aws/models/elb/listener.rb +51 -0
  21. data/lib/fog/aws/models/elb/listeners.rb +32 -0
  22. data/lib/fog/aws/models/elb/load_balancer.rb +129 -0
  23. data/lib/fog/aws/models/elb/load_balancers.rb +28 -0
  24. data/lib/fog/aws/models/elb/policies.rb +40 -0
  25. data/lib/fog/aws/models/elb/policy.rb +52 -0
  26. data/lib/fog/aws/{rds/models → models/rds}/parameter.rb +0 -0
  27. data/lib/fog/aws/{rds/models → models/rds}/parameter_group.rb +0 -0
  28. data/lib/fog/aws/{rds/models → models/rds}/parameter_groups.rb +1 -1
  29. data/lib/fog/aws/{rds/models → models/rds}/parameters.rb +1 -1
  30. data/lib/fog/aws/{rds/models → models/rds}/security_group.rb +0 -0
  31. data/lib/fog/aws/{rds/models → models/rds}/security_groups.rb +1 -1
  32. data/lib/fog/aws/{rds/models → models/rds}/server.rb +0 -0
  33. data/lib/fog/aws/{rds/models → models/rds}/servers.rb +1 -1
  34. data/lib/fog/aws/{rds/models → models/rds}/snapshot.rb +0 -0
  35. data/lib/fog/aws/{rds/models → models/rds}/snapshots.rb +1 -1
  36. data/lib/fog/aws/parsers/cloud_formation/create_stack.rb +1 -1
  37. data/lib/fog/aws/parsers/cloud_formation/describe_stack_events.rb +3 -3
  38. data/lib/fog/aws/parsers/cloud_formation/describe_stack_resources.rb +3 -3
  39. data/lib/fog/aws/parsers/cloud_formation/describe_stacks.rb +6 -6
  40. data/lib/fog/aws/parsers/cloud_formation/get_template.rb +1 -1
  41. data/lib/fog/aws/parsers/cloud_formation/validate_template.rb +5 -5
  42. data/lib/fog/aws/parsers/elb/configure_health_check.rb +37 -0
  43. data/lib/fog/aws/parsers/elb/create_load_balancer.rb +2 -2
  44. data/lib/fog/aws/parsers/elb/delete_load_balancer.rb +1 -1
  45. data/lib/fog/aws/parsers/elb/deregister_instances_from_load_balancer.rb +2 -2
  46. data/lib/fog/aws/parsers/elb/describe_instance_health.rb +2 -2
  47. data/lib/fog/aws/parsers/elb/describe_load_balancers.rb +36 -16
  48. data/lib/fog/aws/parsers/elb/disable_availability_zones_for_load_balancer.rb +2 -2
  49. data/lib/fog/aws/parsers/elb/empty.rb +28 -0
  50. data/lib/fog/aws/parsers/elb/enable_availability_zones_for_load_balancer.rb +2 -2
  51. data/lib/fog/aws/parsers/elb/register_instances_with_load_balancer.rb +2 -2
  52. data/lib/fog/aws/parsers/iam/basic.rb +1 -1
  53. data/lib/fog/aws/parsers/iam/create_access_key.rb +2 -2
  54. data/lib/fog/aws/parsers/iam/create_group.rb +2 -2
  55. data/lib/fog/aws/parsers/iam/create_user.rb +2 -2
  56. data/lib/fog/aws/parsers/iam/get_group.rb +6 -6
  57. data/lib/fog/aws/parsers/iam/get_user.rb +2 -2
  58. data/lib/fog/aws/parsers/iam/get_user_policy.rb +2 -2
  59. data/lib/fog/aws/parsers/iam/list_access_keys.rb +3 -3
  60. data/lib/fog/aws/parsers/iam/list_groups.rb +3 -3
  61. data/lib/fog/aws/parsers/iam/list_groups_for_user.rb +3 -3
  62. data/lib/fog/aws/parsers/iam/list_policies.rb +3 -3
  63. data/lib/fog/aws/parsers/iam/list_server_certificates.rb +38 -0
  64. data/lib/fog/aws/parsers/iam/list_signing_certificates.rb +3 -3
  65. data/lib/fog/aws/parsers/iam/list_users.rb +3 -3
  66. data/lib/fog/aws/parsers/iam/login_profile.rb +3 -3
  67. data/lib/fog/aws/parsers/iam/update_group.rb +2 -2
  68. data/lib/fog/aws/parsers/iam/update_user.rb +2 -2
  69. data/lib/fog/aws/parsers/iam/upload_server_certificate.rb +5 -3
  70. data/lib/fog/aws/parsers/iam/upload_signing_certificate.rb +2 -2
  71. data/lib/fog/aws/parsers/rds/authorize_db_security_group_ingress.rb +1 -1
  72. data/lib/fog/aws/parsers/rds/create_db_instance.rb +1 -1
  73. data/lib/fog/aws/parsers/rds/create_db_instance_read_replica.rb +1 -1
  74. data/lib/fog/aws/parsers/rds/create_db_parameter_group.rb +4 -4
  75. data/lib/fog/aws/parsers/rds/create_db_security_group.rb +1 -1
  76. data/lib/fog/aws/parsers/rds/create_db_snapshot.rb +1 -1
  77. data/lib/fog/aws/parsers/rds/db_parser.rb +16 -16
  78. data/lib/fog/aws/parsers/rds/delete_db_instance.rb +1 -1
  79. data/lib/fog/aws/parsers/rds/delete_db_parameter_group.rb +1 -1
  80. data/lib/fog/aws/parsers/rds/delete_db_security_group.rb +1 -1
  81. data/lib/fog/aws/parsers/rds/delete_db_snapshot.rb +1 -1
  82. data/lib/fog/aws/parsers/rds/describe_db_instances.rb +2 -2
  83. data/lib/fog/aws/parsers/rds/describe_db_parameter_groups.rb +5 -5
  84. data/lib/fog/aws/parsers/rds/describe_db_parameters.rb +10 -10
  85. data/lib/fog/aws/parsers/rds/describe_db_security_groups.rb +2 -2
  86. data/lib/fog/aws/parsers/rds/describe_db_snapshots.rb +2 -2
  87. data/lib/fog/aws/parsers/rds/modify_db_instance.rb +1 -1
  88. data/lib/fog/aws/parsers/rds/modify_db_parameter_group.rb +2 -2
  89. data/lib/fog/aws/parsers/rds/reboot_db_instance.rb +1 -1
  90. data/lib/fog/aws/parsers/rds/restore_db_instance_from_db_snapshot.rb +1 -1
  91. data/lib/fog/aws/parsers/rds/restore_db_instance_to_point_in_time.rb +1 -1
  92. data/lib/fog/aws/parsers/rds/revoke_db_security_group_ingress.rb +1 -1
  93. data/lib/fog/aws/parsers/rds/security_group_parser.rb +4 -4
  94. data/lib/fog/aws/parsers/rds/snapshot_parser.rb +11 -11
  95. data/lib/fog/aws/parsers/ses/delete_verified_email_address.rb +1 -1
  96. data/lib/fog/aws/parsers/ses/get_send_quota.rb +2 -2
  97. data/lib/fog/aws/parsers/ses/get_send_statistics.rb +2 -2
  98. data/lib/fog/aws/parsers/ses/list_verified_email_addresses.rb +2 -2
  99. data/lib/fog/aws/parsers/ses/send_email.rb +2 -2
  100. data/lib/fog/aws/parsers/ses/send_raw_email.rb +2 -2
  101. data/lib/fog/aws/parsers/ses/verify_email_address.rb +1 -1
  102. data/lib/fog/aws/parsers/simpledb/basic.rb +2 -2
  103. data/lib/fog/aws/parsers/simpledb/domain_metadata.rb +4 -4
  104. data/lib/fog/aws/parsers/simpledb/get_attributes.rb +4 -4
  105. data/lib/fog/aws/parsers/simpledb/list_domains.rb +3 -3
  106. data/lib/fog/aws/parsers/simpledb/select.rb +5 -5
  107. data/lib/fog/aws/rds.rb +2 -3
  108. data/lib/fog/aws/requests/elb/configure_health_check.rb +41 -0
  109. data/lib/fog/aws/requests/elb/create_app_cookie_stickiness_policy.rb +33 -0
  110. data/lib/fog/aws/requests/elb/create_lb_cookie_stickiness_policy.rb +35 -0
  111. data/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb +51 -0
  112. data/lib/fog/aws/requests/elb/delete_load_balancer_listeners.rb +31 -0
  113. data/lib/fog/aws/requests/elb/delete_load_balancer_policy.rb +31 -0
  114. data/lib/fog/aws/requests/elb/set_load_balancer_policies_of_listener.rb +43 -0
  115. data/lib/fog/aws/requests/iam/list_server_certificates.rb +42 -0
  116. data/lib/fog/aws/requests/ses/send_raw_email.rb +4 -4
  117. data/lib/fog/aws/simpledb.rb +2 -2
  118. data/lib/fog/bin.rb +1 -0
  119. data/lib/fog/bin/stormondemand.rb +30 -0
  120. data/lib/fog/cdn/parsers/aws/distribution.rb +11 -11
  121. data/lib/fog/cdn/parsers/aws/get_distribution_list.rb +9 -9
  122. data/lib/fog/cdn/parsers/aws/post_invalidation.rb +3 -3
  123. data/lib/fog/compute.rb +3 -0
  124. data/lib/fog/compute/aws.rb +4 -2
  125. data/lib/fog/compute/models/aws/server.rb +16 -2
  126. data/lib/fog/compute/models/bluebox/server.rb +11 -2
  127. data/lib/fog/compute/models/brightbox/server.rb +6 -0
  128. data/lib/fog/compute/models/ecloud/servers.rb +3 -1
  129. data/lib/fog/compute/models/go_grid/server.rb +1 -0
  130. data/lib/fog/compute/models/rackspace/server.rb +2 -1
  131. data/lib/fog/compute/models/slicehost/server.rb +2 -1
  132. data/lib/fog/compute/models/storm_on_demand/balancer.rb +38 -0
  133. data/lib/fog/compute/models/storm_on_demand/balancers.rb +21 -0
  134. data/lib/fog/compute/models/storm_on_demand/config.rb +25 -0
  135. data/lib/fog/compute/models/storm_on_demand/configs.rb +22 -0
  136. data/lib/fog/compute/models/storm_on_demand/image.rb +20 -0
  137. data/lib/fog/compute/models/storm_on_demand/images.rb +21 -0
  138. data/lib/fog/compute/models/storm_on_demand/private_ip.rb +19 -0
  139. data/lib/fog/compute/models/storm_on_demand/private_ips.rb +31 -0
  140. data/lib/fog/compute/models/storm_on_demand/server.rb +74 -0
  141. data/lib/fog/compute/models/storm_on_demand/servers.rb +26 -0
  142. data/lib/fog/compute/models/storm_on_demand/stat.rb +23 -0
  143. data/lib/fog/compute/models/storm_on_demand/stats.rb +22 -0
  144. data/lib/fog/compute/models/storm_on_demand/template.rb +22 -0
  145. data/lib/fog/compute/models/storm_on_demand/templates.rb +21 -0
  146. data/lib/fog/compute/models/voxel/image.rb +4 -1
  147. data/lib/fog/compute/models/voxel/server.rb +1 -0
  148. data/lib/fog/compute/parsers/aws/allocate_address.rb +1 -1
  149. data/lib/fog/compute/parsers/aws/attach_volume.rb +2 -2
  150. data/lib/fog/compute/parsers/aws/basic.rb +2 -2
  151. data/lib/fog/compute/parsers/aws/create_image.rb +1 -1
  152. data/lib/fog/compute/parsers/aws/create_key_pair.rb +1 -1
  153. data/lib/fog/compute/parsers/aws/create_snapshot.rb +4 -4
  154. data/lib/fog/compute/parsers/aws/create_volume.rb +3 -3
  155. data/lib/fog/compute/parsers/aws/deregister_image.rb +1 -1
  156. data/lib/fog/compute/parsers/aws/describe_addresses.rb +2 -2
  157. data/lib/fog/compute/parsers/aws/describe_availability_zones.rb +3 -3
  158. data/lib/fog/compute/parsers/aws/describe_images.rb +7 -7
  159. data/lib/fog/compute/parsers/aws/describe_instances.rb +17 -17
  160. data/lib/fog/compute/parsers/aws/describe_key_pairs.rb +2 -2
  161. data/lib/fog/compute/parsers/aws/describe_regions.rb +2 -2
  162. data/lib/fog/compute/parsers/aws/describe_reserved_instances.rb +5 -5
  163. data/lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb +4 -4
  164. data/lib/fog/compute/parsers/aws/describe_security_groups.rb +8 -8
  165. data/lib/fog/compute/parsers/aws/describe_snapshots.rb +5 -5
  166. data/lib/fog/compute/parsers/aws/describe_tags.rb +2 -2
  167. data/lib/fog/compute/parsers/aws/describe_volumes.rb +8 -8
  168. data/lib/fog/compute/parsers/aws/detach_volume.rb +2 -2
  169. data/lib/fog/compute/parsers/aws/get_console_output.rb +3 -7
  170. data/lib/fog/compute/parsers/aws/import_key_pair.rb +1 -1
  171. data/lib/fog/compute/parsers/aws/monitor_unmonitor_instances.rb +3 -3
  172. data/lib/fog/compute/parsers/aws/register_image.rb +1 -1
  173. data/lib/fog/compute/parsers/aws/run_instances.rb +14 -22
  174. data/lib/fog/compute/parsers/aws/start_stop_instances.rb +3 -3
  175. data/lib/fog/compute/parsers/aws/terminate_instances.rb +6 -6
  176. data/lib/fog/compute/parsers/slicehost/create_slice.rb +4 -4
  177. data/lib/fog/compute/parsers/slicehost/get_backups.rb +3 -3
  178. data/lib/fog/compute/parsers/slicehost/get_flavor.rb +2 -2
  179. data/lib/fog/compute/parsers/slicehost/get_flavors.rb +2 -2
  180. data/lib/fog/compute/parsers/slicehost/get_image.rb +2 -2
  181. data/lib/fog/compute/parsers/slicehost/get_images.rb +2 -2
  182. data/lib/fog/compute/parsers/slicehost/get_slice.rb +4 -4
  183. data/lib/fog/compute/parsers/slicehost/get_slices.rb +4 -4
  184. data/lib/fog/compute/parsers/voxel/devices_list.rb +12 -12
  185. data/lib/fog/compute/parsers/voxel/images_list.rb +5 -5
  186. data/lib/fog/compute/parsers/voxel/voxcloud_create.rb +2 -2
  187. data/lib/fog/compute/parsers/voxel/voxcloud_status.rb +2 -2
  188. data/lib/fog/compute/requests/aws/describe_availability_zones.rb +17 -1
  189. data/lib/fog/compute/requests/aws/describe_instances.rb +6 -1
  190. data/lib/fog/compute/requests/storm_on_demand/add_balancer_node.rb +16 -0
  191. data/lib/fog/compute/requests/storm_on_demand/clone_server.rb +16 -0
  192. data/lib/fog/compute/requests/storm_on_demand/create_server.rb +16 -0
  193. data/lib/fog/compute/requests/storm_on_demand/delete_server.rb +16 -0
  194. data/lib/fog/compute/requests/storm_on_demand/get_server.rb +16 -0
  195. data/lib/fog/compute/requests/storm_on_demand/get_stats.rb +16 -0
  196. data/lib/fog/compute/requests/storm_on_demand/list_balancers.rb +16 -0
  197. data/lib/fog/compute/requests/storm_on_demand/list_configs.rb +16 -0
  198. data/lib/fog/compute/requests/storm_on_demand/list_images.rb +16 -0
  199. data/lib/fog/compute/requests/storm_on_demand/list_private_ips.rb +16 -0
  200. data/lib/fog/compute/requests/storm_on_demand/list_servers.rb +16 -0
  201. data/lib/fog/compute/requests/storm_on_demand/list_templates.rb +16 -0
  202. data/lib/fog/compute/requests/storm_on_demand/reboot_server.rb +16 -0
  203. data/lib/fog/compute/requests/storm_on_demand/remove_balancer_node.rb +16 -0
  204. data/lib/fog/compute/requests/storm_on_demand/resize_server.rb +16 -0
  205. data/lib/fog/compute/requests/voxel/images_list.rb +3 -3
  206. data/lib/fog/compute/storm_on_demand.rb +122 -0
  207. data/lib/fog/core/attributes.rb +12 -0
  208. data/lib/fog/core/credentials.rb +1 -52
  209. data/lib/fog/core/errors.rb +53 -0
  210. data/lib/fog/core/model.rb +10 -5
  211. data/lib/fog/core/parser.rb +8 -3
  212. data/lib/fog/dns/models/aws/records.rb +1 -1
  213. data/lib/fog/dns/models/aws/zones.rb +1 -1
  214. data/lib/fog/dns/parsers/aws/change_resource_record_sets.rb +2 -2
  215. data/lib/fog/dns/parsers/aws/create_hosted_zone.rb +5 -5
  216. data/lib/fog/dns/parsers/aws/delete_hosted_zone.rb +1 -1
  217. data/lib/fog/dns/parsers/aws/get_change.rb +2 -2
  218. data/lib/fog/dns/parsers/aws/get_hosted_zone.rb +3 -3
  219. data/lib/fog/dns/parsers/aws/list_hosted_zones.rb +4 -4
  220. data/lib/fog/dns/parsers/aws/list_resource_record_sets.rb +4 -4
  221. data/lib/fog/dns/parsers/bluebox/create_record.rb +2 -2
  222. data/lib/fog/dns/parsers/bluebox/create_zone.rb +2 -2
  223. data/lib/fog/dns/parsers/bluebox/get_record.rb +1 -1
  224. data/lib/fog/dns/parsers/bluebox/get_records.rb +1 -1
  225. data/lib/fog/dns/parsers/bluebox/get_zone.rb +2 -2
  226. data/lib/fog/dns/parsers/bluebox/get_zones.rb +2 -2
  227. data/lib/fog/dns/parsers/slicehost/create_record.rb +2 -2
  228. data/lib/fog/dns/parsers/slicehost/create_zone.rb +2 -2
  229. data/lib/fog/dns/parsers/slicehost/get_record.rb +2 -2
  230. data/lib/fog/dns/parsers/slicehost/get_records.rb +2 -2
  231. data/lib/fog/dns/parsers/slicehost/get_zone.rb +2 -2
  232. data/lib/fog/dns/parsers/slicehost/get_zones.rb +2 -2
  233. data/lib/fog/dns/parsers/zerigo/count_hosts.rb +1 -1
  234. data/lib/fog/dns/parsers/zerigo/count_zones.rb +1 -1
  235. data/lib/fog/dns/parsers/zerigo/create_host.rb +2 -2
  236. data/lib/fog/dns/parsers/zerigo/create_zone.rb +2 -2
  237. data/lib/fog/dns/parsers/zerigo/find_hosts.rb +2 -2
  238. data/lib/fog/dns/parsers/zerigo/get_host.rb +2 -2
  239. data/lib/fog/dns/parsers/zerigo/get_zone.rb +4 -4
  240. data/lib/fog/dns/parsers/zerigo/get_zone_stats.rb +2 -2
  241. data/lib/fog/dns/parsers/zerigo/list_hosts.rb +2 -2
  242. data/lib/fog/dns/parsers/zerigo/list_zones.rb +2 -2
  243. data/lib/fog/providers.rb +1 -0
  244. data/lib/fog/providers/aws.rb +5 -1
  245. data/lib/fog/providers/storm_on_demand.rb +12 -0
  246. data/lib/fog/storage/models/aws/files.rb +17 -0
  247. data/lib/fog/storage/models/google/files.rb +17 -0
  248. data/lib/fog/storage/models/rackspace/files.rb +17 -0
  249. data/lib/fog/storage/parsers/aws/access_control_list.rb +4 -4
  250. data/lib/fog/storage/parsers/aws/complete_multipart_upload.rb +1 -1
  251. data/lib/fog/storage/parsers/aws/copy_object.rb +2 -2
  252. data/lib/fog/storage/parsers/aws/get_bucket.rb +10 -10
  253. data/lib/fog/storage/parsers/aws/get_bucket_location.rb +1 -1
  254. data/lib/fog/storage/parsers/aws/get_bucket_logging.rb +5 -5
  255. data/lib/fog/storage/parsers/aws/get_bucket_object_versions.rb +8 -8
  256. data/lib/fog/storage/parsers/aws/get_bucket_versioning.rb +1 -1
  257. data/lib/fog/storage/parsers/aws/get_bucket_website.rb +2 -2
  258. data/lib/fog/storage/parsers/aws/get_request_payment.rb +1 -1
  259. data/lib/fog/storage/parsers/aws/get_service.rb +3 -3
  260. data/lib/fog/storage/parsers/aws/initiate_multipart_upload.rb +1 -1
  261. data/lib/fog/storage/parsers/aws/list_multipart_uploads.rb +7 -7
  262. data/lib/fog/storage/parsers/aws/list_parts.rb +7 -7
  263. data/lib/fog/storage/parsers/google/access_control_list.rb +3 -3
  264. data/lib/fog/storage/parsers/google/copy_object.rb +2 -2
  265. data/lib/fog/storage/parsers/google/get_bucket.rb +10 -10
  266. data/lib/fog/storage/parsers/google/get_bucket_logging.rb +5 -5
  267. data/lib/fog/storage/parsers/google/get_bucket_object_versions.rb +9 -9
  268. data/lib/fog/storage/parsers/google/get_bucket_versioning.rb +1 -1
  269. data/lib/fog/storage/parsers/google/get_request_payment.rb +1 -1
  270. data/lib/fog/storage/parsers/google/get_service.rb +3 -3
  271. data/lib/fog/storage/requests/aws/get_object.rb +1 -1
  272. data/lib/fog/terremark/parsers/shared/get_catalog.rb +1 -1
  273. data/lib/fog/terremark/parsers/shared/get_catalog_item.rb +1 -1
  274. data/lib/fog/terremark/parsers/shared/get_internet_services.rb +7 -7
  275. data/lib/fog/terremark/parsers/shared/get_network_ips.rb +1 -1
  276. data/lib/fog/terremark/parsers/shared/get_node_services.rb +3 -3
  277. data/lib/fog/terremark/parsers/shared/get_organization.rb +1 -1
  278. data/lib/fog/terremark/parsers/shared/get_public_ips.rb +2 -2
  279. data/lib/fog/terremark/parsers/shared/get_vapp_template.rb +1 -1
  280. data/lib/fog/terremark/parsers/shared/get_vdc.rb +6 -6
  281. data/lib/fog/terremark/parsers/shared/internet_service.rb +7 -7
  282. data/lib/fog/terremark/parsers/shared/network.rb +1 -1
  283. data/lib/fog/terremark/parsers/shared/node_service.rb +3 -3
  284. data/lib/fog/terremark/parsers/shared/public_ip.rb +2 -2
  285. data/lib/fog/terremark/parsers/shared/vapp.rb +7 -7
  286. data/spec/ecloud/spec_helper.rb +1 -1
  287. data/tests/aws/requests/cloud_formation/stack_tests.rb +2 -0
  288. data/tests/aws/requests/elb/helper.rb +44 -0
  289. data/tests/aws/requests/elb/load_balancer_tests.rb +82 -0
  290. data/tests/aws/requests/elb/model_tests.rb +187 -0
  291. data/tests/aws/requests/iam/helper.rb +41 -0
  292. data/tests/aws/requests/iam/login_profile_tests.rb +1 -1
  293. data/tests/aws/requests/iam/server_certificate_tests.rb +36 -0
  294. data/tests/aws/requests/rds/instance_tests.rb +63 -66
  295. data/tests/aws/requests/simpledb/attributes_tests.rb +4 -4
  296. data/tests/aws/signed_params_tests.rb +3 -0
  297. data/tests/compute/helper.rb +2 -2
  298. data/tests/compute/models/aws/address_tests.rb +2 -2
  299. data/tests/compute/models/aws/security_group_tests.rb +12 -0
  300. data/tests/compute/models/aws/server_tests.rb +8 -1
  301. data/tests/compute/models/aws/snapshot_tests.rb +2 -2
  302. data/tests/compute/models/aws/volume_tests.rb +3 -3
  303. data/tests/compute/requests/aws/address_tests.rb +1 -1
  304. data/tests/compute/requests/aws/instance_tests.rb +1 -1
  305. data/tests/compute/requests/aws/key_pair_tests.rb +5 -1
  306. data/tests/compute/requests/aws/snapshot_tests.rb +1 -1
  307. data/tests/compute/requests/aws/tag_tests.rb +1 -1
  308. data/tests/compute/requests/aws/volume_tests.rb +3 -3
  309. data/tests/compute/requests/bluebox/block_tests.rb +14 -13
  310. data/tests/compute/requests/brightbox/helper.rb +1 -2
  311. data/tests/compute/requests/storm_on_demand/server_tests.rb +64 -0
  312. data/tests/compute/requests/voxel/image_tests.rb +30 -24
  313. data/tests/compute/requests/voxel/server_tests.rb +1 -1
  314. data/tests/dns/requests/aws/dns_tests.rb +1 -1
  315. data/tests/helper.rb +1 -1
  316. data/tests/storage/requests/aws/multipart_upload_tests.rb +1 -1
  317. data/tests/storage/requests/google/bucket_tests.rb +0 -1
  318. data/tests/storage/requests/rackspace/object_tests.rb +1 -0
  319. metadata +125 -66
  320. data/docs/_posts/2011-01-01-start.markdown +0 -21
data/README.rdoc CHANGED
@@ -91,7 +91,7 @@ It will return an {excon}[http://github.com/geemus/excon] response, which has `b
91
91
 
92
92
  == Go forth and conquer
93
93
 
94
- Play around and use the console to explore or check out the {getting started guide}[http://wiki.github.com/geemus/fog/getting-started-with-fog] for more details. Once you are reading to start scripting fog, here is a quick hint on how to make connections without the command line thing to help you.
94
+ Play around and use the console to explore or check out {fog.io}[http://fog.io] for more details and examples. Once you are reading to start scripting fog, here is a quick hint on how to make connections without the command line thing to help you.
95
95
 
96
96
  # create a compute connection
97
97
  compute = Fog::Compute.new(:provider => 'AWS', :aws_access_key_id => ACCESS_KEY_ID, :aws_secret_access_key => SECRET_ACCESS_KEY)
@@ -119,18 +119,9 @@ Wonder how you can get a lovely fog shirt? Look no further!
119
119
  * Grey shirts and a follow from @fog go to people who have made it on to the {contributors list}[https://github.com/geemus/fog/contributors] by submitting code.
120
120
  * Black shirts go to people who have made it on to the {collaborators list}[https://github.com/api/v2/json/repos/show/geemus/fog/collaborators] by coercing geemus into adding them (geemus is currently the only member of this list).
121
121
 
122
- == Resources
122
+ == Additional Resources
123
123
 
124
- Enjoy, and let me know what I can do to continue improving fog!
125
-
126
- * See a list of supported providers and services on the {providers page}[http://fog.io/providers].
127
- * Stay up to date by following {@fog}[http://twitter.com/fog] and/or {@geemus}[http://twitter.com/geemus] on Twitter.
128
- * Get and give help on the {#ruby-fog}[irc://irc.freenode.net/ruby-fog] irc channel on Freenode
129
- * Follow release notes and discussions on the {mailing list}[http://groups.google.com/group/ruby-fog]
130
- * Report bugs or find tasks to help with in the {issues}[http://github.com/geemus/fog/issues]
131
- * Learn about {contributing}[http://github.com/geemus/fog/wiki/contributor-guide]
132
- * See where fog is used and let the world know how you use it {in the wild}[http://wiki.github.com/geemus/fog/in-the-wild]
133
- * Check out blog posts and other mentions in the {press}[http://wiki.github.com/geemus/fog/press]
124
+ {fog.io}[http://fog.io]
134
125
 
135
126
  == Sponsorship
136
127
 
data/Rakefile CHANGED
@@ -149,7 +149,8 @@ task :docs do
149
149
  if File.extname(file_name) == '.html'
150
150
  # rewrite links with version
151
151
  body = File.read(file_path)
152
- body.gsub!(/href="\//, 'href="/' << version << '/')
152
+ body.gsub!(/='\//, %{='/} << version << '/')
153
+ body.gsub!(/="\//, %{="/} << version << '/')
153
154
  content_type = 'text/html'
154
155
  else
155
156
  body = File.open(file_path)
@@ -165,7 +166,7 @@ task :docs do
165
166
 
166
167
  # write base index with redirect to new version
167
168
  directory.files.create(
168
- :body => '<!doctype html><head><script>window.location = "http://fog.io/' << version << '/index.html"</script></head></html>',
169
+ :body => '<!doctype html><head><script>window.location = "http://fog.io/' << version << '"</script></head></html>',
169
170
  :content_type => 'text/html',
170
171
  :key => 'index.html',
171
172
  :public => true
@@ -16,6 +16,7 @@ class Parser < Nokogiri::XML::SAX::Document
16
16
  end
17
17
 
18
18
  def characters(string)
19
+ @value ||= ''
19
20
  @value << string.strip
20
21
  end
21
22
 
@@ -29,10 +30,14 @@ class Parser < Nokogiri::XML::SAX::Document
29
30
  @response[:items] << @item
30
31
  @item = {}
31
32
  when 'key'
32
- @item[:key] = @value
33
+ @item[:key] = value
33
34
  end
34
35
  end
35
36
 
37
+ def value
38
+ @value.dup
39
+ end
40
+
36
41
  end
37
42
 
38
43
  data = <<-DATA
@@ -43,18 +48,22 @@ data = <<-DATA
43
48
  </items>
44
49
  DATA
45
50
 
46
- COUNT = 100
51
+ COUNT = 10_000
47
52
 
48
53
  Benchmark.bmbm(25) do |bench|
49
54
  bench.report('parse') do
50
- parser = Parser.new
51
- Nokogiri::XML::SAX::Parser.new(parser).parse(data)
52
- parser.response
55
+ COUNT.times do
56
+ parser = Parser.new
57
+ Nokogiri::XML::SAX::Parser.new(parser).parse(data)
58
+ parser.response
59
+ end
53
60
  end
54
61
 
55
62
  bench.report('push') do
56
- parser = Parser.new
57
- Nokogiri::XML::SAX::PushParser.new(parser).write(data, true)
58
- parser.response
63
+ COUNT.times do
64
+ parser = Parser.new
65
+ Nokogiri::XML::SAX::PushParser.new(parser).write(data, true)
66
+ parser.response
67
+ end
59
68
  end
60
69
  end
data/bin/fog CHANGED
@@ -4,8 +4,8 @@ require 'irb'
4
4
  require 'yaml'
5
5
  Fog.credential = ARGV.first ? ARGV.first.to_sym : nil
6
6
  Fog.mock! if ENV['FOG_MOCK']
7
- unless Fog.credentials
8
- exit
7
+ if Fog.credentials.empty?
8
+ Fog::Errors.missing_credentials
9
9
  end
10
10
 
11
11
  require 'fog/bin'
data/changelog.txt CHANGED
@@ -1,3 +1,126 @@
1
+ 0.8.0 05/12/2011
2
+ ================
3
+
4
+ MVP! ktheory
5
+
6
+ [aws|cloudformation] tests sleep to avoid throttling error :(
7
+
8
+ [aws|elb]
9
+ Add tests for create, describe, and delete. thanks ktheory
10
+ Fix Policies in describe_load_balancers parser. thanks ktheory
11
+ Stub out missing requests. thanks ktheory
12
+ Add configure_health_check request. thanks ktheory
13
+ Add support for creating and deleting listeners. thanks ktheory
14
+ Add requests for creating cookie policies. thanks ktheory
15
+ Add request ELB#delete_load_balancer_policy. thanks ktheory
16
+ Add request ELB#set_load_balancer_policies_of_listener. thanks ktheory
17
+ Create a model and collection for load_balancers. thanks ktheory
18
+ Create Policies collection and model. thanks ktheory
19
+ Create Listeners collection and model. thanks ktheory
20
+ Remove redundant NotFound error class. thanks ktheory
21
+ reorg model files for consistency
22
+
23
+ [aws|iam]
24
+ Added server certificate tests. thanks ktheory
25
+ Parse server certificate UploadDate. thanks ktheory
26
+ Add list_server_certificates request. thanks ktheory
27
+ fix test description for update_login_profile
28
+
29
+ [aws|rds]
30
+ Fix exception for missing DB security groups. thanks ktheory
31
+ Remove redundant NotFound class. thanks ktheory
32
+ Improve instance tests. thanks ktheory
33
+ reorg model files for consistency
34
+ change status waits for more consistent testing
35
+
36
+ [aws|ses]
37
+ fix format of Destinations in send_raw_email and correct doc. thanks jhawthorne
38
+ Make specifying Destinations for send_raw_email work and match amazon docs. thanks jhawthorne
39
+ fix indent in doc. thanks jhawthorne
40
+
41
+ [aws|simpledb]
42
+ correction for item and attribute counters in encode_batch_attributes. thanks joshounapoli
43
+ Fix a problem with the encoding of the tilde character. AWS needs tilde to be unescaped, or else the signature fails. CGI.escape escapes tilde; don't use it. thanks joshounapoli
44
+ Correction to the regular expression for unreserved characters. thanks joshounapoli
45
+ Test encode_batch_attributes with two attributes in one item to demonstrate an error in encode_batch_attributes. An unmocked test run will show a "400 Bad Request" response from SimpleDB. thanks joshounapoli
46
+
47
+ [compute]
48
+ default to Ubuntu 10.04 LTS 64bit for image id
49
+ [aws]
50
+ Fix server tests. thanks ktheory
51
+ Fixes trailing whitespace in attributes. thanks ktheory
52
+ Fix & improve some tests. thanks ktheory
53
+ Use default AMI in tests. thanks ktheory
54
+ Add failing tests for keypair parsing. thanks ktheory
55
+ Add different availability zones for each region to the mock. thanks smerritt
56
+ Update docs for Compute::Real#initialize to include ap-* regions. thanks smerritt
57
+ change default flavor to t1.micro (so it will be 64-bit)
58
+ use old style, more consistent call to get single instance
59
+ fix console output format in tests
60
+ [bluebox]
61
+ Adding lb_applications, lb_services, lb_backends attributes to the model. thanks cparades
62
+ Adding in a few more tests for LB's. thanks cparades
63
+ Rolling back change. thanks cparades
64
+ Added in some data for testing. thanks cparades
65
+ Fixed typo in Bluebox test. thanks tokengeek
66
+ don't use a lb_application I don't own in tests
67
+ [brightbox]
68
+ Updated Image identifiers to match latest available Ubuntu Lucid 10.04 LTS 64bit image. thanks tokengeek
69
+ [ecloud]
70
+ 1.9.2 compat, String#[] doesn't return nil as we expected. thanks dpiddy
71
+ [stormondemand]
72
+ Implement Stormondemand API. thanks seeingidog
73
+ cleanup
74
+ fixes for tests
75
+ [voxel]
76
+ Prevent voxel tests running if missing credentials. thanks tokengeek
77
+ minor fixes for voxel tests
78
+
79
+ [core]
80
+ Parser does not concatenates all the strings when parsing. thanks geraud
81
+ Drop default_executable line from gemspec. thanks mattsa
82
+ Fix small logic error in Model#wait_for. thanks pvande
83
+ Make Model#reload more resilient against errors. thanks pvande
84
+ Simplify dup-ing of @attributes for models. thanks smerritt
85
+ Make Model#dup copy the attributes too. thanks smerritt
86
+ Fix typo in spec output. thanks smerritt
87
+ tighten excon dependency. Closes #250
88
+ cleanup gemspec. closes #251
89
+ Fixes error messaging when credentials missing
90
+ update parser to better handle whitespace
91
+
92
+ [docs]
93
+ Add link to multipart upload and threads article. thanks gsandie
94
+ restructure toward same organization as rest of repo
95
+ simplify redirector to just point at directory instead of specifically index.html
96
+ generalize version subbing in href to catch src too
97
+ style cleanup for cdn/dns/storage
98
+ storage shouldn't be all caps
99
+ link to fog.io more prominently
100
+ fix new links to properly include version
101
+ replace getting started link
102
+ add link to learn_fog
103
+ remove confusion by linking to fog.io instead of wiki
104
+ reworking getting started guide
105
+ add requires
106
+
107
+ [dns|aws] fix error handling for getting unknown keys
108
+
109
+ [storage]
110
+ auto-paginate for #each closes #268
111
+ [aws]
112
+ Add #each_file method to directory model. thanks smerritt
113
+ Add documentation for #each_file method. thanks smerritt
114
+ Emit warning from Files#each. thanks smerritt
115
+ Make Files#each iterate all files, not just the first page. thanks smerritt
116
+ Fix docs to say files.each, not each_file. thanks smerritt
117
+ Issue #283: S3 get_object request doesn't really support the Range header. thanks yalon
118
+ fix format for multipart upload tests
119
+ [google]
120
+ fix format in bucket_tests
121
+ [rackspace]
122
+ mark get_object with block test pending when mocked
123
+
1
124
  0.7.2 04/05/2011
2
125
  ================
3
126
 
@@ -16,13 +16,13 @@
16
16
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
17
17
 
18
18
  <!--
19
- <link rel="shortcut icon" href="public/favicon.ico">
20
- <link rel="apple-touch-icon" href="public/apple-touch-icon.png">
19
+ <link rel="shortcut icon" href="/public/favicon.ico">
20
+ <link rel="apple-touch-icon" href="/public/apple-touch-icon.png">
21
21
  -->
22
22
 
23
- <link rel="stylesheet" href="public/css/style.css?v=2">
24
- <link rel="stylesheet" href="public/css/fog.css?v=2">
25
- <script src="public/js/libs/modernizr-1.6.min.js"></script>
23
+ <link rel="stylesheet" href="/public/css/style.css?v=2">
24
+ <link rel="stylesheet" href="/public/css/fog.css?v=2">
25
+ <script src="/public/js/libs/modernizr-1.6.min.js"></script>
26
26
 
27
27
  </head>
28
28
 
@@ -30,7 +30,7 @@
30
30
 
31
31
  <div id="container">
32
32
  <header>
33
- <a href="/"><img src="public/images/fog.png" title="fog" /></a>
33
+ <a href="/"><img src="/public/images/fog.png" title="fog" /></a>
34
34
  <h1>{{ page.title }}</h1>
35
35
  <dl>
36
36
  <dt>version</dt><dd>v0.7.2</dd>
@@ -43,13 +43,26 @@
43
43
 
44
44
  {{ content }}
45
45
 
46
- <h2>See Also:</h2>
46
+ <h2>Services</h2>
47
47
  <ul>
48
- <li><a href="/">Home</a></li>
48
+ <li><a href="/cdn">CDN</a></li>
49
+ <li><a href="/dns">DNS</a></li>
50
+ <li><a href="/storage">Storage</a></li>
49
51
  {% for post in site.posts %}
50
52
  <li><a href="{{ post.url }}">{{ post.title }}</a></li>
51
53
  {% endfor %}
52
54
  </ul>
55
+
56
+ <h2>About</h2>
57
+ <ul>
58
+ <li><a href="/">Home</a></li>
59
+ <li><a href="/about/contributing.html">Contributing</a></li>
60
+ <li><a href="/about/getting_started.html">Getting Started</a></li>
61
+ <li><a href="/about/press.html">Press</a></li>
62
+ <li><a href="/about/structure.html">Structure</a></li>
63
+ <li><a href="/about/users.html">Users</a></li>
64
+ </ul>
65
+
53
66
  </div>
54
67
 
55
68
  <footer>
@@ -0,0 +1,83 @@
1
+ ---
2
+ layout: default
3
+ title: Getting Started
4
+ ---
5
+
6
+ First off, install the gem:
7
+
8
+ $ gem install fog
9
+
10
+ ## Setting Up Local Storage
11
+
12
+ We will be using Local storage in the example. Local storage provides the same api that cloud storage services in fog do, but without the bother of needing to signup for stuff or pay extra money.
13
+
14
+ First, make a local directory to hold your data.
15
+
16
+ $ mkdir ~/fog
17
+
18
+ Now we can start writing our script, first off we should require fog.
19
+
20
+ require 'rubygems'
21
+ require 'fog'
22
+
23
+ Now in order to play with our data we need to setup a storage connection.
24
+
25
+ storage = Fog::Storage.new(
26
+ :local_root => '~/fog',
27
+ :provider => 'Local',
28
+ )
29
+
30
+ `storage` will now contain our storage object, configured to use the Local provider from our specified directory.
31
+
32
+ ## Storing Data
33
+
34
+ Now that you have cleared the preliminaries you are ready to start storing data. Storage providers in fog segregate files into `directories` to make it easier to organize things. So lets create a directory so we can see that in action.
35
+
36
+ directory = Fog::Storage.directories.create(
37
+ :key => 'data'
38
+ )
39
+
40
+ To make sure it was created you can always check in your filesystem, but we can also check from inside fog.
41
+
42
+ storage.directories
43
+
44
+ Progress! Now it is time to actually create a file inside our new directory.
45
+
46
+ file = directory.files.create(
47
+ :body => 'Hello World!',
48
+ :key => 'hello_world.txt'
49
+ )
50
+
51
+ We should now have our file, first we can open it up and make sure we are on the right track.
52
+
53
+ $ open ~/fog/hello_world.txt
54
+
55
+ It is much more likely that you will want to see what files you have from inside fog though.
56
+
57
+ directory.files
58
+
59
+ Now that we have run through all the basics, lets clean up our mess.
60
+
61
+ file.destroy
62
+ directory.destroy
63
+
64
+ After that you should be able to check your directory list in fog or your filesystem and see you are safely back to square one.
65
+
66
+ ## Next Steps
67
+
68
+ Using the same interface you can also practice working against a real provider (such as Amazon S3). Rather than worrying about signing up for an account right away though, we can use mocks to simulate S3 while we practice.
69
+
70
+ This time we will turn on mocking and then, just like before, we will need to make a connection.
71
+
72
+ Fog.mock!
73
+ storage = Fog::Storage.new(
74
+ :aws_access_key_id => 'fake_access_key_id',
75
+ :aws_secret_access_key => 'fake_secret_access_key',
76
+ :provider => 'AWS'
77
+ )
78
+
79
+ You may notice that we used bogus credentials, this is fine since we are just simulating things. To use real S3 you can simply omit `Fog.mock!` and swap in your real credentials.
80
+
81
+ Once you have your connection you can go through all the steps you did before, only now you will be working against a real cloud service (or at least a simulated one).
82
+
83
+ Congratulations and welcome to the cloud! Continue your journey at [fog.io](http://fog.io)
@@ -5,6 +5,11 @@ title: Press
5
5
 
6
6
  Mentions and blog posts from elsewhere in reverse chronological order by day (and alphasorted for same days).
7
7
 
8
+
9
+ **April 7th, 2011**
10
+
11
+ * [Testing multipart Uploads to S3 with Threads](http://blog.vicecity.co.uk/post/4425574978/multipart-uploads-fog-threads-win)
12
+
8
13
  **March 9th, 2011**
9
14
 
10
15
  * [Offsite Backups with fog](http://www.engineyard.com/blog/2011/offsite-backups-with-fog/)
@@ -29,4 +34,4 @@ Mentions and blog posts from elsewhere in reverse chronological order by day (an
29
34
 
30
35
  **September 28, 2010**
31
36
 
32
- * [The Curious Tale of the Humble Micro](http://www.engineyard.com/blog/2010/the-curious-tale-of-the-humble-micro/)
37
+ * [The Curious Tale of the Humble Micro](http://www.engineyard.com/blog/2010/the-curious-tale-of-the-humble-micro/)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  layout: default
3
- title: cdn
3
+ title: CDN
4
4
  ---
5
5
 
6
6
  Faster websites are better. <a href="http://www.websiteoptimization.com/speed/tweak/design-factors/">Better experience</a>, <a href="http://exp-platform.com/Documents/IEEEComputer2007OnlineExperiments.pdf">better sales</a>, <a href="http://www.stevesouders.com/blog/2009/07/27/wikia-fast-pages-retain-users/">you name it</a>. Unfortunately, making a website faster can be tough. Thankfully a content distribution network, or CDN, can give you great performance bang for your buck. A CDN helps speed things up by putting copies of your files closer to your users. It's like the difference between pizza delivery from across the street and pizza delivery from the next town over.
@@ -19,9 +19,9 @@ Now you'll need to <a href="https://aws-portal.amazon.com/gp/aws/developer/subsc
19
19
 
20
20
  # create a connection to the service
21
21
  cdn = Fog::CDN.new({
22
- :provider =&gt; 'AWS',
23
- :aws_access_key_id =&gt; AWS_ACCESS_KEY_ID,
24
- :aws_secret_access_key =&gt; AWS_SECRET_ACCESS_KEY
22
+ :provider => 'AWS',
23
+ :aws_access_key_id => AWS_ACCESS_KEY_ID,
24
+ :aws_secret_access_key => AWS_SECRET_ACCESS_KEY
25
25
  }
26
26
 
27
27
  ## Setting Up Your CDN
@@ -29,9 +29,9 @@ Now you'll need to <a href="https://aws-portal.amazon.com/gp/aws/developer/subsc
29
29
  Now you'll need to create a 'distribution' which represents a mapping from the CDN to your domain. For the examples we'll pretend we are working on 'http://www.example.com', but you can just switch it to your actual domain. Some <a href="http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateDistribution.html">other options</a> are available, but the only other one we need to fill in is OriginProtocolPolicy. This sets what to do about http vs https. We will use 'match-viewer' which returns the same protocol as the request, but you can also choose 'http-only' which always returns http responses.
30
30
 
31
31
  data = cdn.post_distribution({
32
- 'CustomOrigin' =&gt; {
33
- 'DNSName' =&gt; 'www.example.com',
34
- 'OriginProtocolPolicy' =&gt; 'match-viewer'
32
+ 'CustomOrigin' => {
33
+ 'DNSName' => 'www.example.com',
34
+ 'OriginProtocolPolicy' => 'match-viewer'
35
35
  }
36
36
  })
37
37
 
@@ -60,12 +60,12 @@ But, just in case you need to update things I'll run through how you can make ch
60
60
  distribution_id,
61
61
  etag,
62
62
  {
63
- 'CustomOrigin' =&gt; {
64
- 'DNSName' =&gt; 'www.example.com',
65
- 'OriginProtocolPolicy' =&gt; 'match-viewer'
63
+ 'CustomOrigin' => {
64
+ 'DNSName' => 'www.example.com',
65
+ 'OriginProtocolPolicy' => 'match-viewer'
66
66
  },
67
- 'CallerReference' =&gt; caller_reference,
68
- 'Enabled' =&gt; 'false'
67
+ 'CallerReference' => caller_reference,
68
+ 'Enabled' => 'false'
69
69
  }
70
70
  )
71
71