fog-maestrodev 1.7.0.20121114190951 → 1.8.0.20130109172219

Sign up to get free protection for your applications and to get access to all the features.
Files changed (964) hide show
  1. data/.gitignore +2 -2
  2. data/README.md +48 -37
  3. data/RELEASE.md +39 -0
  4. data/Rakefile +48 -312
  5. data/bin/fog +4 -0
  6. data/changelog.txt +153 -0
  7. data/docs/storage/aws.markdown +21 -0
  8. data/fog.gemspec +3 -3
  9. data/lib/fog.rb +0 -5
  10. data/lib/fog/atmos/models/storage/directories.rb +2 -2
  11. data/lib/fog/atmos/models/storage/directory.rb +11 -11
  12. data/lib/fog/atmos/models/storage/file.rb +8 -8
  13. data/lib/fog/atmos/models/storage/files.rb +3 -3
  14. data/lib/fog/aws.rb +1 -0
  15. data/lib/fog/aws/auto_scaling.rb +1 -1
  16. data/lib/fog/aws/cloud_watch.rb +1 -1
  17. data/lib/fog/aws/compute.rb +4 -2
  18. data/lib/fog/aws/dynamodb.rb +30 -64
  19. data/lib/fog/aws/elb.rb +1 -1
  20. data/lib/fog/aws/glacier.rb +1 -1
  21. data/lib/fog/aws/iam.rb +1 -0
  22. data/lib/fog/aws/models/auto_scaling/activities.rb +2 -2
  23. data/lib/fog/aws/models/auto_scaling/activity.rb +1 -1
  24. data/lib/fog/aws/models/auto_scaling/configuration.rb +2 -2
  25. data/lib/fog/aws/models/auto_scaling/configurations.rb +2 -2
  26. data/lib/fog/aws/models/auto_scaling/group.rb +13 -13
  27. data/lib/fog/aws/models/auto_scaling/groups.rb +2 -2
  28. data/lib/fog/aws/models/auto_scaling/instance.rb +5 -5
  29. data/lib/fog/aws/models/auto_scaling/instances.rb +2 -2
  30. data/lib/fog/aws/models/auto_scaling/policies.rb +2 -2
  31. data/lib/fog/aws/models/auto_scaling/policy.rb +2 -2
  32. data/lib/fog/aws/models/beanstalk/application.rb +7 -7
  33. data/lib/fog/aws/models/beanstalk/applications.rb +2 -2
  34. data/lib/fog/aws/models/beanstalk/environment.rb +10 -10
  35. data/lib/fog/aws/models/beanstalk/environments.rb +2 -2
  36. data/lib/fog/aws/models/beanstalk/events.rb +1 -1
  37. data/lib/fog/aws/models/beanstalk/template.rb +5 -5
  38. data/lib/fog/aws/models/beanstalk/templates.rb +3 -3
  39. data/lib/fog/aws/models/beanstalk/version.rb +6 -6
  40. data/lib/fog/aws/models/beanstalk/versions.rb +2 -2
  41. data/lib/fog/aws/models/cdn/distribution.rb +4 -4
  42. data/lib/fog/aws/models/cdn/distributions.rb +2 -2
  43. data/lib/fog/aws/models/cdn/invalidation.rb +2 -2
  44. data/lib/fog/aws/models/cdn/invalidations.rb +2 -2
  45. data/lib/fog/aws/models/cdn/streaming_distribution.rb +3 -3
  46. data/lib/fog/aws/models/cdn/streaming_distributions.rb +2 -2
  47. data/lib/fog/aws/models/cloud_watch/alarm.rb +2 -2
  48. data/lib/fog/aws/models/cloud_watch/alarm_data.rb +9 -9
  49. data/lib/fog/aws/models/cloud_watch/alarm_datum.rb +3 -3
  50. data/lib/fog/aws/models/cloud_watch/alarm_histories.rb +1 -1
  51. data/lib/fog/aws/models/cloud_watch/alarms.rb +7 -7
  52. data/lib/fog/aws/models/cloud_watch/metric_statistic.rb +2 -2
  53. data/lib/fog/aws/models/cloud_watch/metric_statistics.rb +3 -3
  54. data/lib/fog/aws/models/cloud_watch/metrics.rb +27 -7
  55. data/lib/fog/aws/models/compute/address.rb +9 -9
  56. data/lib/fog/aws/models/compute/addresses.rb +2 -2
  57. data/lib/fog/aws/models/compute/dhcp_option.rb +3 -3
  58. data/lib/fog/aws/models/compute/dhcp_options.rb +2 -2
  59. data/lib/fog/aws/models/compute/flavors.rb +1 -1
  60. data/lib/fog/aws/models/compute/image.rb +2 -2
  61. data/lib/fog/aws/models/compute/images.rb +5 -5
  62. data/lib/fog/aws/models/compute/internet_gateway.rb +4 -4
  63. data/lib/fog/aws/models/compute/internet_gateways.rb +2 -2
  64. data/lib/fog/aws/models/compute/key_pair.rb +4 -4
  65. data/lib/fog/aws/models/compute/key_pairs.rb +2 -2
  66. data/lib/fog/aws/models/compute/network_interface.rb +3 -3
  67. data/lib/fog/aws/models/compute/network_interfaces.rb +2 -2
  68. data/lib/fog/aws/models/compute/security_group.rb +7 -7
  69. data/lib/fog/aws/models/compute/security_groups.rb +3 -3
  70. data/lib/fog/aws/models/compute/server.rb +22 -16
  71. data/lib/fog/aws/models/compute/servers.rb +6 -6
  72. data/lib/fog/aws/models/compute/snapshot.rb +4 -4
  73. data/lib/fog/aws/models/compute/snapshots.rb +3 -3
  74. data/lib/fog/aws/models/compute/spot_request.rb +18 -8
  75. data/lib/fog/aws/models/compute/spot_requests.rb +11 -11
  76. data/lib/fog/aws/models/compute/subnet.rb +3 -3
  77. data/lib/fog/aws/models/compute/subnets.rb +2 -2
  78. data/lib/fog/aws/models/compute/tag.rb +2 -2
  79. data/lib/fog/aws/models/compute/tags.rb +3 -3
  80. data/lib/fog/aws/models/compute/volume.rb +12 -13
  81. data/lib/fog/aws/models/compute/volumes.rb +2 -2
  82. data/lib/fog/aws/models/compute/vpc.rb +2 -2
  83. data/lib/fog/aws/models/compute/vpcs.rb +2 -2
  84. data/lib/fog/aws/models/dns/record.rb +4 -4
  85. data/lib/fog/aws/models/dns/records.rb +3 -3
  86. data/lib/fog/aws/models/dns/zone.rb +3 -3
  87. data/lib/fog/aws/models/dns/zones.rb +2 -2
  88. data/lib/fog/aws/models/elasticache/cluster.rb +2 -2
  89. data/lib/fog/aws/models/elasticache/clusters.rb +2 -2
  90. data/lib/fog/aws/models/elasticache/parameter_group.rb +2 -2
  91. data/lib/fog/aws/models/elasticache/parameter_groups.rb +2 -2
  92. data/lib/fog/aws/models/elasticache/security_group.rb +4 -4
  93. data/lib/fog/aws/models/elasticache/security_groups.rb +2 -2
  94. data/lib/fog/aws/models/elb/listener.rb +2 -2
  95. data/lib/fog/aws/models/elb/load_balancer.rb +19 -19
  96. data/lib/fog/aws/models/elb/load_balancers.rb +2 -2
  97. data/lib/fog/aws/models/elb/policy.rb +3 -3
  98. data/lib/fog/aws/models/glacier/archive.rb +7 -7
  99. data/lib/fog/aws/models/glacier/job.rb +2 -2
  100. data/lib/fog/aws/models/glacier/jobs.rb +3 -3
  101. data/lib/fog/aws/models/glacier/vault.rb +7 -7
  102. data/lib/fog/aws/models/glacier/vaults.rb +2 -2
  103. data/lib/fog/aws/models/iam/access_key.rb +8 -8
  104. data/lib/fog/aws/models/iam/access_keys.rb +7 -7
  105. data/lib/fog/aws/models/iam/policies.rb +10 -10
  106. data/lib/fog/aws/models/iam/policy.rb +8 -8
  107. data/lib/fog/aws/models/iam/user.rb +10 -10
  108. data/lib/fog/aws/models/iam/users.rb +2 -2
  109. data/lib/fog/aws/models/rds/parameter.rb +2 -2
  110. data/lib/fog/aws/models/rds/parameter_group.rb +10 -10
  111. data/lib/fog/aws/models/rds/parameter_groups.rb +3 -3
  112. data/lib/fog/aws/models/rds/parameters.rb +2 -2
  113. data/lib/fog/aws/models/rds/security_group.rb +4 -4
  114. data/lib/fog/aws/models/rds/security_groups.rb +2 -2
  115. data/lib/fog/aws/models/rds/server.rb +10 -10
  116. data/lib/fog/aws/models/rds/servers.rb +3 -3
  117. data/lib/fog/aws/models/rds/snapshot.rb +3 -3
  118. data/lib/fog/aws/models/rds/snapshots.rb +3 -3
  119. data/lib/fog/aws/models/rds/subnet_groups.rb +2 -2
  120. data/lib/fog/aws/models/storage/directories.rb +2 -2
  121. data/lib/fog/aws/models/storage/directory.rb +13 -13
  122. data/lib/fog/aws/models/storage/file.rb +106 -14
  123. data/lib/fog/aws/models/storage/files.rb +5 -5
  124. data/lib/fog/aws/models/storage/version.rb +2 -2
  125. data/lib/fog/aws/models/storage/versions.rb +3 -3
  126. data/lib/fog/aws/parsers/compute/copy_snapshot.rb +22 -0
  127. data/lib/fog/aws/parsers/compute/describe_instances.rb +3 -1
  128. data/lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb +1 -1
  129. data/lib/fog/aws/parsers/compute/spot_instance_requests.rb +5 -3
  130. data/lib/fog/aws/parsers/storage/cors_configuration.rb +41 -0
  131. data/lib/fog/aws/parsers/storage/delete_multiple_objects.rb +50 -0
  132. data/lib/fog/aws/rds.rb +2 -2
  133. data/lib/fog/aws/requests/auto_scaling/resume_processes.rb +10 -1
  134. data/lib/fog/aws/requests/auto_scaling/suspend_processes.rb +7 -2
  135. data/lib/fog/aws/requests/cloud_watch/list_metrics.rb +27 -0
  136. data/lib/fog/aws/requests/compute/copy_snapshot.rb +58 -0
  137. data/lib/fog/aws/requests/compute/describe_availability_zones.rb +3 -0
  138. data/lib/fog/aws/requests/compute/describe_reserved_instances_offerings.rb +11 -8
  139. data/lib/fog/aws/requests/compute/modify_volume_attribute.rb +51 -0
  140. data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +1 -0
  141. data/lib/fog/aws/requests/storage/abort_multipart_upload.rb +5 -7
  142. data/lib/fog/aws/requests/storage/complete_multipart_upload.rb +12 -16
  143. data/lib/fog/aws/requests/storage/copy_object.rb +19 -20
  144. data/lib/fog/aws/requests/storage/cors_utils.rb +41 -0
  145. data/lib/fog/aws/requests/storage/delete_bucket.rb +4 -7
  146. data/lib/fog/aws/requests/storage/delete_bucket_cors.rb +29 -0
  147. data/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb +4 -7
  148. data/lib/fog/aws/requests/storage/delete_bucket_policy.rb +5 -8
  149. data/lib/fog/aws/requests/storage/delete_bucket_website.rb +4 -7
  150. data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +167 -0
  151. data/lib/fog/aws/requests/storage/delete_object.rb +5 -8
  152. data/lib/fog/aws/requests/storage/get_bucket.rb +25 -28
  153. data/lib/fog/aws/requests/storage/get_bucket_acl.rb +15 -18
  154. data/lib/fog/aws/requests/storage/get_bucket_cors.rb +65 -0
  155. data/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb +9 -12
  156. data/lib/fog/aws/requests/storage/get_bucket_location.rb +5 -8
  157. data/lib/fog/aws/requests/storage/get_bucket_logging.rb +15 -18
  158. data/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +37 -43
  159. data/lib/fog/aws/requests/storage/get_bucket_policy.rb +4 -7
  160. data/lib/fog/aws/requests/storage/get_bucket_versioning.rb +6 -9
  161. data/lib/fog/aws/requests/storage/get_bucket_website.rb +9 -11
  162. data/lib/fog/aws/requests/storage/get_object.rb +17 -20
  163. data/lib/fog/aws/requests/storage/get_object_acl.rb +18 -21
  164. data/lib/fog/aws/requests/storage/get_object_http_url.rb +6 -9
  165. data/lib/fog/aws/requests/storage/get_object_https_url.rb +6 -9
  166. data/lib/fog/aws/requests/storage/get_object_torrent.rb +15 -18
  167. data/lib/fog/aws/requests/storage/get_object_url.rb +7 -10
  168. data/lib/fog/aws/requests/storage/get_request_payment.rb +5 -8
  169. data/lib/fog/aws/requests/storage/get_service.rb +9 -11
  170. data/lib/fog/aws/requests/storage/head_object.rb +21 -21
  171. data/lib/fog/aws/requests/storage/initiate_multipart_upload.rb +18 -19
  172. data/lib/fog/aws/requests/storage/put_bucket_cors.rb +51 -0
  173. data/lib/fog/aws/signaturev4.rb +1 -1
  174. data/lib/fog/aws/sqs.rb +1 -1
  175. data/lib/fog/aws/storage.rb +10 -1
  176. data/lib/fog/bluebox/models/compute/flavors.rb +2 -2
  177. data/lib/fog/bluebox/models/compute/image.rb +8 -8
  178. data/lib/fog/bluebox/models/compute/images.rb +2 -2
  179. data/lib/fog/bluebox/models/compute/locations.rb +2 -2
  180. data/lib/fog/bluebox/models/compute/server.rb +10 -10
  181. data/lib/fog/bluebox/models/compute/servers.rb +2 -2
  182. data/lib/fog/bluebox/models/dns/record.rb +3 -3
  183. data/lib/fog/bluebox/models/dns/records.rb +2 -2
  184. data/lib/fog/bluebox/models/dns/zone.rb +3 -3
  185. data/lib/fog/bluebox/models/dns/zones.rb +2 -2
  186. data/lib/fog/bluebox/requests/compute/create_block.rb +3 -5
  187. data/lib/fog/brightbox/compute.rb +284 -82
  188. data/lib/fog/brightbox/models/compute/account.rb +9 -3
  189. data/lib/fog/brightbox/models/compute/accounts.rb +3 -3
  190. data/lib/fog/brightbox/models/compute/api_client.rb +4 -4
  191. data/lib/fog/brightbox/models/compute/api_clients.rb +2 -2
  192. data/lib/fog/brightbox/models/compute/application.rb +2 -2
  193. data/lib/fog/brightbox/models/compute/applications.rb +3 -3
  194. data/lib/fog/brightbox/models/compute/cloud_ip.rb +4 -3
  195. data/lib/fog/brightbox/models/compute/cloud_ips.rb +4 -4
  196. data/lib/fog/brightbox/models/compute/firewall_policies.rb +3 -3
  197. data/lib/fog/brightbox/models/compute/firewall_policy.rb +5 -5
  198. data/lib/fog/brightbox/models/compute/firewall_rule.rb +3 -3
  199. data/lib/fog/brightbox/models/compute/firewall_rules.rb +2 -2
  200. data/lib/fog/brightbox/models/compute/flavors.rb +3 -3
  201. data/lib/fog/brightbox/models/compute/image.rb +3 -3
  202. data/lib/fog/brightbox/models/compute/images.rb +2 -2
  203. data/lib/fog/brightbox/models/compute/load_balancer.rb +3 -3
  204. data/lib/fog/brightbox/models/compute/load_balancers.rb +2 -2
  205. data/lib/fog/brightbox/models/compute/server.rb +25 -18
  206. data/lib/fog/brightbox/models/compute/server_group.rb +6 -6
  207. data/lib/fog/brightbox/models/compute/server_groups.rb +3 -3
  208. data/lib/fog/brightbox/models/compute/servers.rb +35 -3
  209. data/lib/fog/brightbox/models/compute/user.rb +1 -1
  210. data/lib/fog/brightbox/models/compute/users.rb +3 -3
  211. data/lib/fog/brightbox/models/compute/zones.rb +3 -3
  212. data/lib/fog/brightbox/oauth2.rb +164 -0
  213. data/lib/fog/brightbox/requests/compute/activate_console_server.rb +10 -3
  214. data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +12 -3
  215. data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +12 -3
  216. data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +10 -12
  217. data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +12 -3
  218. data/lib/fog/brightbox/requests/compute/create_api_client.rb +12 -3
  219. data/lib/fog/brightbox/requests/compute/create_application.rb +12 -3
  220. data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +12 -2
  221. data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +14 -3
  222. data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +18 -3
  223. data/lib/fog/brightbox/requests/compute/create_image.rb +19 -3
  224. data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +15 -3
  225. data/lib/fog/brightbox/requests/compute/create_server.rb +18 -3
  226. data/lib/fog/brightbox/requests/compute/create_server_group.rb +12 -3
  227. data/lib/fog/brightbox/requests/compute/destroy_api_client.rb +10 -3
  228. data/lib/fog/brightbox/requests/compute/destroy_application.rb +10 -3
  229. data/lib/fog/brightbox/requests/compute/destroy_cloud_ip.rb +10 -3
  230. data/lib/fog/brightbox/requests/compute/destroy_firewall_policy.rb +10 -3
  231. data/lib/fog/brightbox/requests/compute/destroy_firewall_rule.rb +10 -3
  232. data/lib/fog/brightbox/requests/compute/destroy_image.rb +10 -3
  233. data/lib/fog/brightbox/requests/compute/destroy_load_balancer.rb +10 -3
  234. data/lib/fog/brightbox/requests/compute/destroy_server.rb +10 -3
  235. data/lib/fog/brightbox/requests/compute/destroy_server_group.rb +10 -3
  236. data/lib/fog/brightbox/requests/compute/get_account.rb +8 -16
  237. data/lib/fog/brightbox/requests/compute/get_api_client.rb +10 -3
  238. data/lib/fog/brightbox/requests/compute/get_application.rb +10 -3
  239. data/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +2 -4
  240. data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +10 -3
  241. data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +10 -3
  242. data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +10 -3
  243. data/lib/fog/brightbox/requests/compute/get_image.rb +10 -3
  244. data/lib/fog/brightbox/requests/compute/get_interface.rb +10 -3
  245. data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +10 -3
  246. data/lib/fog/brightbox/requests/compute/get_scoped_account.rb +2 -6
  247. data/lib/fog/brightbox/requests/compute/get_server.rb +10 -3
  248. data/lib/fog/brightbox/requests/compute/get_server_group.rb +10 -3
  249. data/lib/fog/brightbox/requests/compute/get_server_type.rb +10 -3
  250. data/lib/fog/brightbox/requests/compute/get_user.rb +8 -16
  251. data/lib/fog/brightbox/requests/compute/get_zone.rb +10 -3
  252. data/lib/fog/brightbox/requests/compute/list_accounts.rb +7 -3
  253. data/lib/fog/brightbox/requests/compute/list_api_clients.rb +9 -3
  254. data/lib/fog/brightbox/requests/compute/list_applications.rb +9 -3
  255. data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +9 -3
  256. data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +9 -3
  257. data/lib/fog/brightbox/requests/compute/list_images.rb +9 -3
  258. data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +9 -3
  259. data/lib/fog/brightbox/requests/compute/list_server_groups.rb +9 -3
  260. data/lib/fog/brightbox/requests/compute/list_server_types.rb +9 -3
  261. data/lib/fog/brightbox/requests/compute/list_servers.rb +9 -3
  262. data/lib/fog/brightbox/requests/compute/list_users.rb +9 -3
  263. data/lib/fog/brightbox/requests/compute/list_zones.rb +9 -3
  264. data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +12 -3
  265. data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +11 -13
  266. data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +12 -3
  267. data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +12 -3
  268. data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +12 -3
  269. data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +10 -11
  270. data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +22 -3
  271. data/lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb +18 -0
  272. data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +14 -2
  273. data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +10 -3
  274. data/lib/fog/brightbox/requests/compute/shutdown_server.rb +10 -3
  275. data/lib/fog/brightbox/requests/compute/snapshot_server.rb +10 -3
  276. data/lib/fog/brightbox/requests/compute/start_server.rb +10 -3
  277. data/lib/fog/brightbox/requests/compute/stop_server.rb +10 -3
  278. data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +10 -3
  279. data/lib/fog/brightbox/requests/compute/update_account.rb +33 -35
  280. data/lib/fog/brightbox/requests/compute/update_api_client.rb +13 -3
  281. data/lib/fog/brightbox/requests/compute/update_application.rb +13 -3
  282. data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +14 -3
  283. data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +17 -2
  284. data/lib/fog/brightbox/requests/compute/update_image.rb +18 -3
  285. data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +16 -3
  286. data/lib/fog/brightbox/requests/compute/update_scoped_account.rb +13 -20
  287. data/lib/fog/brightbox/requests/compute/update_server.rb +13 -3
  288. data/lib/fog/brightbox/requests/compute/update_server_group.rb +13 -3
  289. data/lib/fog/brightbox/requests/compute/update_user.rb +16 -3
  290. data/lib/fog/clodo/models/compute/images.rb +2 -2
  291. data/lib/fog/clodo/models/compute/server.rb +7 -7
  292. data/lib/fog/clodo/models/compute/servers.rb +2 -2
  293. data/lib/fog/cloudstack/models/compute/flavors.rb +2 -2
  294. data/lib/fog/cloudstack/models/compute/image.rb +2 -2
  295. data/lib/fog/cloudstack/models/compute/images.rb +2 -2
  296. data/lib/fog/cloudstack/models/compute/job.rb +2 -2
  297. data/lib/fog/cloudstack/models/compute/jobs.rb +2 -2
  298. data/lib/fog/cloudstack/models/compute/security_group.rb +3 -3
  299. data/lib/fog/cloudstack/models/compute/security_group_rule.rb +5 -5
  300. data/lib/fog/cloudstack/models/compute/security_group_rules.rb +1 -1
  301. data/lib/fog/cloudstack/models/compute/security_groups.rb +2 -2
  302. data/lib/fog/cloudstack/models/compute/server.rb +14 -12
  303. data/lib/fog/cloudstack/models/compute/servers.rb +2 -2
  304. data/lib/fog/cloudstack/models/compute/volume.rb +8 -8
  305. data/lib/fog/cloudstack/models/compute/volumes.rb +2 -2
  306. data/lib/fog/cloudstack/models/compute/zone.rb +1 -1
  307. data/lib/fog/cloudstack/models/compute/zones.rb +2 -2
  308. data/lib/fog/compute.rb +2 -1
  309. data/lib/fog/core.rb +1 -0
  310. data/lib/fog/core/attributes.rb +19 -2
  311. data/lib/fog/core/collection.rb +17 -6
  312. data/lib/fog/core/connection.rb +1 -0
  313. data/lib/fog/core/deprecated_connection_accessors.rb +41 -0
  314. data/lib/fog/core/errors.rb +2 -0
  315. data/lib/fog/core/json.rb +4 -16
  316. data/lib/fog/core/model.rb +11 -1
  317. data/lib/fog/core/service.rb +1 -1
  318. data/lib/fog/core/wait_for.rb +1 -1
  319. data/lib/fog/dnsimple/models/dns/record.rb +4 -4
  320. data/lib/fog/dnsimple/models/dns/records.rb +2 -2
  321. data/lib/fog/dnsimple/models/dns/zone.rb +3 -3
  322. data/lib/fog/dnsimple/models/dns/zones.rb +2 -2
  323. data/lib/fog/dnsmadeeasy/models/dns/record.rb +5 -5
  324. data/lib/fog/dnsmadeeasy/models/dns/records.rb +2 -2
  325. data/lib/fog/dnsmadeeasy/models/dns/zone.rb +3 -3
  326. data/lib/fog/dnsmadeeasy/models/dns/zones.rb +2 -2
  327. data/lib/fog/dynect/models/dns/record.rb +3 -3
  328. data/lib/fog/dynect/models/dns/records.rb +2 -2
  329. data/lib/fog/dynect/models/dns/zone.rb +4 -4
  330. data/lib/fog/dynect/models/dns/zones.rb +2 -2
  331. data/lib/fog/ecloud.rb +19 -5
  332. data/lib/fog/ecloud/compute.rb +663 -351
  333. data/lib/fog/ecloud/generate_collection.rb +3 -3
  334. data/lib/fog/ecloud/models/compute/admin_organization.rb +14 -10
  335. data/lib/fog/ecloud/models/compute/admin_organizations.rb +1 -6
  336. data/lib/fog/ecloud/models/compute/api_keys.rb +2 -2
  337. data/lib/fog/ecloud/models/compute/association.rb +3 -3
  338. data/lib/fog/ecloud/models/compute/associations.rb +2 -2
  339. data/lib/fog/ecloud/models/compute/authentication_levels.rb +2 -2
  340. data/lib/fog/ecloud/models/compute/backup_internet_service.rb +7 -7
  341. data/lib/fog/ecloud/models/compute/backup_internet_services.rb +3 -3
  342. data/lib/fog/ecloud/models/compute/catalog.rb +2 -2
  343. data/lib/fog/ecloud/models/compute/catalog_configurations.rb +2 -2
  344. data/lib/fog/ecloud/models/compute/catalog_item.rb +1 -1
  345. data/lib/fog/ecloud/models/compute/compute_pool.rb +27 -15
  346. data/lib/fog/ecloud/models/compute/compute_pools.rb +2 -2
  347. data/lib/fog/ecloud/models/compute/cpu_usage_detail_summary.rb +2 -2
  348. data/lib/fog/ecloud/models/compute/detached_disk.rb +27 -0
  349. data/lib/fog/ecloud/models/compute/detached_disks.rb +31 -0
  350. data/lib/fog/ecloud/models/compute/environment.rb +27 -20
  351. data/lib/fog/ecloud/models/compute/environments.rb +2 -2
  352. data/lib/fog/ecloud/models/compute/firewall_acl.rb +1 -1
  353. data/lib/fog/ecloud/models/compute/firewall_acls.rb +2 -2
  354. data/lib/fog/ecloud/models/compute/group.rb +8 -6
  355. data/lib/fog/ecloud/models/compute/groups.rb +17 -6
  356. data/lib/fog/ecloud/models/compute/guest_processes.rb +2 -2
  357. data/lib/fog/ecloud/models/compute/hardware_configuration.rb +4 -4
  358. data/lib/fog/ecloud/models/compute/hardware_configurations.rb +2 -2
  359. data/lib/fog/ecloud/models/compute/internet_service.rb +35 -29
  360. data/lib/fog/ecloud/models/compute/internet_services.rb +11 -8
  361. data/lib/fog/ecloud/models/compute/ip_address.rb +17 -3
  362. data/lib/fog/ecloud/models/compute/ip_addresses.rb +7 -2
  363. data/lib/fog/ecloud/models/compute/layout.rb +1 -1
  364. data/lib/fog/ecloud/models/compute/layouts.rb +2 -2
  365. data/lib/fog/ecloud/models/compute/location.rb +1 -1
  366. data/lib/fog/ecloud/models/compute/locations.rb +2 -2
  367. data/lib/fog/ecloud/models/compute/login_banners.rb +2 -2
  368. data/lib/fog/ecloud/models/compute/memory_usage_detail_summary.rb +2 -2
  369. data/lib/fog/ecloud/models/compute/monitor.rb +4 -4
  370. data/lib/fog/ecloud/models/compute/monitors.rb +2 -2
  371. data/lib/fog/ecloud/models/compute/network.rb +22 -12
  372. data/lib/fog/ecloud/models/compute/networks.rb +9 -5
  373. data/lib/fog/ecloud/models/compute/node.rb +12 -6
  374. data/lib/fog/ecloud/models/compute/nodes.rb +7 -4
  375. data/lib/fog/ecloud/models/compute/operating_system_families.rb +2 -2
  376. data/lib/fog/ecloud/models/compute/operating_system_family.rb +1 -1
  377. data/lib/fog/ecloud/models/compute/operating_systems.rb +1 -1
  378. data/lib/fog/ecloud/models/compute/organization.rb +17 -17
  379. data/lib/fog/ecloud/models/compute/organizations.rb +3 -3
  380. data/lib/fog/ecloud/models/compute/password_complexity_rules.rb +2 -2
  381. data/lib/fog/ecloud/models/compute/physical_devices.rb +2 -2
  382. data/lib/fog/ecloud/models/compute/public_ip.rb +2 -2
  383. data/lib/fog/ecloud/models/compute/public_ips.rb +8 -5
  384. data/lib/fog/ecloud/models/compute/rnat.rb +2 -2
  385. data/lib/fog/ecloud/models/compute/rnats.rb +2 -2
  386. data/lib/fog/ecloud/models/compute/roles.rb +2 -2
  387. data/lib/fog/ecloud/models/compute/row.rb +10 -7
  388. data/lib/fog/ecloud/models/compute/rows.rb +9 -6
  389. data/lib/fog/ecloud/models/compute/server.rb +139 -93
  390. data/lib/fog/ecloud/models/compute/server_configuration_options.rb +2 -2
  391. data/lib/fog/ecloud/models/compute/servers.rb +18 -15
  392. data/lib/fog/ecloud/models/compute/ssh_key.rb +1 -1
  393. data/lib/fog/ecloud/models/compute/ssh_keys.rb +2 -2
  394. data/lib/fog/ecloud/models/compute/storage_usage_detail_summary.rb +2 -2
  395. data/lib/fog/ecloud/models/compute/support_tickets.rb +2 -2
  396. data/lib/fog/ecloud/models/compute/tags.rb +2 -2
  397. data/lib/fog/ecloud/models/compute/task.rb +3 -0
  398. data/lib/fog/ecloud/models/compute/tasks.rb +3 -3
  399. data/lib/fog/ecloud/models/compute/template.rb +8 -9
  400. data/lib/fog/ecloud/models/compute/templates.rb +2 -2
  401. data/lib/fog/ecloud/models/compute/trusted_network_group.rb +5 -5
  402. data/lib/fog/ecloud/models/compute/trusted_network_groups.rb +2 -2
  403. data/lib/fog/ecloud/models/compute/user.rb +2 -2
  404. data/lib/fog/ecloud/models/compute/users.rb +2 -2
  405. data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ip.rb +32 -0
  406. data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ips.rb +27 -0
  407. data/lib/fog/ecloud/requests/compute/admin_edit_authentication_levels.rb +1 -2
  408. data/lib/fog/ecloud/requests/compute/get_admin_organization.rb +14 -0
  409. data/lib/fog/ecloud/requests/compute/get_compute_pool.rb +11 -0
  410. data/lib/fog/ecloud/requests/compute/get_compute_pools.rb +21 -0
  411. data/lib/fog/ecloud/requests/compute/get_detached_disk.rb +21 -0
  412. data/lib/fog/ecloud/requests/compute/get_detached_disks.rb +33 -0
  413. data/lib/fog/ecloud/requests/compute/get_environment.rb +21 -0
  414. data/lib/fog/ecloud/requests/compute/get_group.rb +8 -1
  415. data/lib/fog/ecloud/requests/compute/get_groups.rb +8 -1
  416. data/lib/fog/ecloud/requests/compute/get_hardware_configuration.rb +19 -0
  417. data/lib/fog/ecloud/requests/compute/get_hardware_configurations.rb +4 -0
  418. data/lib/fog/ecloud/requests/compute/get_internet_service.rb +12 -0
  419. data/lib/fog/ecloud/requests/compute/get_internet_services.rb +8 -0
  420. data/lib/fog/ecloud/requests/compute/get_ip_address.rb +11 -0
  421. data/lib/fog/ecloud/requests/compute/get_layout.rb +8 -1
  422. data/lib/fog/ecloud/requests/compute/get_layouts.rb +8 -1
  423. data/lib/fog/ecloud/requests/compute/get_network.rb +11 -0
  424. data/lib/fog/ecloud/requests/compute/get_networks.rb +20 -0
  425. data/lib/fog/ecloud/requests/compute/get_node.rb +11 -0
  426. data/lib/fog/ecloud/requests/compute/get_nodes.rb +9 -0
  427. data/lib/fog/ecloud/requests/compute/get_operating_system.rb +14 -0
  428. data/lib/fog/ecloud/requests/compute/get_operating_system_families.rb +20 -0
  429. data/lib/fog/ecloud/requests/compute/get_organization.rb +14 -0
  430. data/lib/fog/ecloud/requests/compute/get_organizations.rb +14 -2
  431. data/lib/fog/ecloud/requests/compute/get_public_ip.rb +11 -1
  432. data/lib/fog/ecloud/requests/compute/get_public_ips.rb +22 -0
  433. data/lib/fog/ecloud/requests/compute/get_row.rb +8 -1
  434. data/lib/fog/ecloud/requests/compute/get_rows.rb +2 -1
  435. data/lib/fog/ecloud/requests/compute/get_server.rb +11 -0
  436. data/lib/fog/ecloud/requests/compute/get_servers.rb +32 -1
  437. data/lib/fog/ecloud/requests/compute/get_ssh_key.rb +11 -0
  438. data/lib/fog/ecloud/requests/compute/get_ssh_keys.rb +20 -0
  439. data/lib/fog/ecloud/requests/compute/get_task.rb +4 -2
  440. data/lib/fog/ecloud/requests/compute/get_template.rb +11 -0
  441. data/lib/fog/ecloud/requests/compute/get_templates.rb +38 -0
  442. data/lib/fog/ecloud/requests/compute/get_virtual_machine_assigned_ips.rb +44 -0
  443. data/lib/fog/ecloud/requests/compute/groups_delete.rb +16 -1
  444. data/lib/fog/ecloud/requests/compute/internet_service_create.rb +36 -1
  445. data/lib/fog/ecloud/requests/compute/internet_service_delete.rb +23 -0
  446. data/lib/fog/ecloud/requests/compute/node_service_create.rb +49 -1
  447. data/lib/fog/ecloud/requests/compute/node_service_delete.rb +24 -0
  448. data/lib/fog/ecloud/requests/compute/rows_delete.rb +11 -1
  449. data/lib/fog/ecloud/requests/compute/virtual_machine_attach_disk.rb +62 -0
  450. data/lib/fog/ecloud/requests/compute/virtual_machine_create_from_template.rb +136 -16
  451. data/lib/fog/ecloud/requests/compute/virtual_machine_delete.rb +36 -1
  452. data/lib/fog/ecloud/requests/compute/virtual_machine_detach_disk.rb +71 -0
  453. data/lib/fog/ecloud/requests/compute/virtual_machine_edit_assigned_ips.rb +82 -0
  454. data/lib/fog/ecloud/requests/compute/virtual_machine_edit_hardware_configuration.rb +27 -3
  455. data/lib/fog/ecloud/requests/compute/virtual_machine_import.rb +120 -6
  456. data/lib/fog/glesys/models/compute/ip.rb +7 -7
  457. data/lib/fog/glesys/models/compute/ips.rb +7 -7
  458. data/lib/fog/glesys/models/compute/server.rb +6 -6
  459. data/lib/fog/glesys/models/compute/servers.rb +4 -4
  460. data/lib/fog/glesys/models/compute/template.rb +1 -1
  461. data/lib/fog/glesys/models/compute/templates.rb +2 -2
  462. data/lib/fog/go_grid/models/compute/image.rb +3 -3
  463. data/lib/fog/go_grid/models/compute/images.rb +2 -2
  464. data/lib/fog/go_grid/models/compute/password.rb +5 -5
  465. data/lib/fog/go_grid/models/compute/passwords.rb +3 -3
  466. data/lib/fog/go_grid/models/compute/server.rb +4 -4
  467. data/lib/fog/go_grid/models/compute/servers.rb +2 -2
  468. data/lib/fog/google/models/storage/directories.rb +2 -2
  469. data/lib/fog/google/models/storage/directory.rb +4 -4
  470. data/lib/fog/google/models/storage/file.rb +5 -5
  471. data/lib/fog/google/models/storage/files.rb +4 -4
  472. data/lib/fog/google/storage.rb +13 -2
  473. data/lib/fog/hp.rb +6 -3
  474. data/lib/fog/hp/models/compute/address.rb +8 -8
  475. data/lib/fog/hp/models/compute/addresses.rb +2 -2
  476. data/lib/fog/hp/models/compute/flavors.rb +2 -2
  477. data/lib/fog/hp/models/compute/image.rb +2 -2
  478. data/lib/fog/hp/models/compute/images.rb +2 -2
  479. data/lib/fog/hp/models/compute/key_pair.rb +3 -3
  480. data/lib/fog/hp/models/compute/key_pairs.rb +2 -2
  481. data/lib/fog/hp/models/compute/security_group.rb +4 -4
  482. data/lib/fog/hp/models/compute/security_groups.rb +3 -3
  483. data/lib/fog/hp/models/compute/server.rb +15 -15
  484. data/lib/fog/hp/models/compute/servers.rb +2 -2
  485. data/lib/fog/hp/models/storage/directories.rb +3 -3
  486. data/lib/fog/hp/models/storage/directory.rb +18 -18
  487. data/lib/fog/hp/models/storage/file.rb +4 -4
  488. data/lib/fog/hp/models/storage/files.rb +2 -2
  489. data/lib/fog/ibm/models/compute/address.rb +2 -2
  490. data/lib/fog/ibm/models/compute/addresses.rb +2 -2
  491. data/lib/fog/ibm/models/compute/image.rb +3 -3
  492. data/lib/fog/ibm/models/compute/images.rb +2 -2
  493. data/lib/fog/ibm/models/compute/key.rb +2 -2
  494. data/lib/fog/ibm/models/compute/keys.rb +3 -3
  495. data/lib/fog/ibm/models/compute/locations.rb +2 -2
  496. data/lib/fog/ibm/models/compute/server.rb +12 -12
  497. data/lib/fog/ibm/models/compute/servers.rb +2 -2
  498. data/lib/fog/ibm/models/compute/vlans.rb +2 -2
  499. data/lib/fog/ibm/models/storage/offerings.rb +1 -1
  500. data/lib/fog/ibm/models/storage/volume.rb +5 -5
  501. data/lib/fog/ibm/models/storage/volumes.rb +2 -2
  502. data/lib/fog/joyent/models/compute/flavors.rb +2 -2
  503. data/lib/fog/joyent/models/compute/images.rb +2 -2
  504. data/lib/fog/joyent/models/compute/key.rb +1 -1
  505. data/lib/fog/joyent/models/compute/keys.rb +3 -3
  506. data/lib/fog/joyent/models/compute/server.rb +13 -13
  507. data/lib/fog/joyent/models/compute/servers.rb +3 -3
  508. data/lib/fog/joyent/models/compute/snapshot.rb +4 -4
  509. data/lib/fog/joyent/models/compute/snapshots.rb +3 -3
  510. data/lib/fog/libvirt/compute.rb +6 -1
  511. data/lib/fog/libvirt/models/compute/interface.rb +1 -1
  512. data/lib/fog/libvirt/models/compute/interfaces.rb +1 -1
  513. data/lib/fog/libvirt/models/compute/network.rb +1 -1
  514. data/lib/fog/libvirt/models/compute/networks.rb +1 -1
  515. data/lib/fog/libvirt/models/compute/nic.rb +2 -2
  516. data/lib/fog/libvirt/models/compute/nodes.rb +1 -1
  517. data/lib/fog/libvirt/models/compute/pool.rb +7 -7
  518. data/lib/fog/libvirt/models/compute/pools.rb +1 -1
  519. data/lib/fog/libvirt/models/compute/server.rb +29 -28
  520. data/lib/fog/libvirt/models/compute/servers.rb +2 -2
  521. data/lib/fog/libvirt/models/compute/volume.rb +5 -5
  522. data/lib/fog/libvirt/models/compute/volumes.rb +1 -1
  523. data/lib/fog/libvirt/requests/compute/list_domains.rb +2 -2
  524. data/lib/fog/linode/models/compute/data_centers.rb +2 -2
  525. data/lib/fog/linode/models/compute/disk.rb +7 -7
  526. data/lib/fog/linode/models/compute/disks.rb +2 -2
  527. data/lib/fog/linode/models/compute/flavors.rb +2 -2
  528. data/lib/fog/linode/models/compute/images.rb +2 -2
  529. data/lib/fog/linode/models/compute/ip.rb +3 -3
  530. data/lib/fog/linode/models/compute/ips.rb +2 -2
  531. data/lib/fog/linode/models/compute/kernels.rb +2 -2
  532. data/lib/fog/linode/models/compute/server.rb +13 -13
  533. data/lib/fog/linode/models/compute/servers.rb +2 -2
  534. data/lib/fog/linode/models/compute/stack_scripts.rb +3 -3
  535. data/lib/fog/linode/models/dns/record.rb +6 -6
  536. data/lib/fog/linode/models/dns/records.rb +2 -2
  537. data/lib/fog/linode/models/dns/zone.rb +6 -6
  538. data/lib/fog/linode/models/dns/zones.rb +2 -2
  539. data/lib/fog/local/models/storage/directories.rb +3 -3
  540. data/lib/fog/local/models/storage/directory.rb +2 -2
  541. data/lib/fog/local/models/storage/file.rb +6 -6
  542. data/lib/fog/local/models/storage/files.rb +2 -2
  543. data/lib/fog/ninefold/models/compute/address.rb +5 -5
  544. data/lib/fog/ninefold/models/compute/addresses.rb +2 -2
  545. data/lib/fog/ninefold/models/compute/flavors.rb +2 -2
  546. data/lib/fog/ninefold/models/compute/images.rb +2 -2
  547. data/lib/fog/ninefold/models/compute/ip_forwarding_rule.rb +3 -3
  548. data/lib/fog/ninefold/models/compute/ip_forwarding_rules.rb +2 -2
  549. data/lib/fog/ninefold/models/compute/server.rb +9 -9
  550. data/lib/fog/ninefold/models/compute/servers.rb +2 -2
  551. data/lib/fog/openstack.rb +89 -65
  552. data/lib/fog/openstack/README.identity.md +69 -0
  553. data/lib/fog/openstack/compute.rb +71 -41
  554. data/lib/fog/openstack/identity.rb +43 -22
  555. data/lib/fog/openstack/image.rb +11 -5
  556. data/lib/fog/openstack/models/compute/address.rb +8 -8
  557. data/lib/fog/openstack/models/compute/addresses.rb +3 -3
  558. data/lib/fog/openstack/models/compute/flavor.rb +9 -4
  559. data/lib/fog/openstack/models/compute/flavors.rb +2 -2
  560. data/lib/fog/openstack/models/compute/host.rb +3 -2
  561. data/lib/fog/openstack/models/compute/hosts.rb +2 -2
  562. data/lib/fog/openstack/models/compute/image.rb +4 -3
  563. data/lib/fog/openstack/models/compute/images.rb +2 -2
  564. data/lib/fog/openstack/models/compute/key_pair.rb +3 -3
  565. data/lib/fog/openstack/models/compute/key_pairs.rb +1 -1
  566. data/lib/fog/openstack/models/compute/metadata.rb +4 -4
  567. data/lib/fog/openstack/models/compute/metadatum.rb +2 -2
  568. data/lib/fog/openstack/models/compute/security_group.rb +5 -5
  569. data/lib/fog/openstack/models/compute/security_groups.rb +2 -2
  570. data/lib/fog/openstack/models/compute/server.rb +41 -27
  571. data/lib/fog/openstack/models/compute/servers.rb +2 -2
  572. data/lib/fog/openstack/models/compute/snapshot.rb +4 -3
  573. data/lib/fog/openstack/models/compute/snapshots.rb +2 -2
  574. data/lib/fog/openstack/models/compute/tenant.rb +1 -1
  575. data/lib/fog/openstack/models/compute/tenants.rb +7 -3
  576. data/lib/fog/openstack/models/compute/volume.rb +6 -5
  577. data/lib/fog/openstack/models/compute/volumes.rb +2 -2
  578. data/lib/fog/openstack/models/identity/ec2_credential.rb +44 -0
  579. data/lib/fog/openstack/models/identity/ec2_credentials.rb +53 -0
  580. data/lib/fog/openstack/models/identity/role.rb +4 -4
  581. data/lib/fog/openstack/models/identity/roles.rb +2 -2
  582. data/lib/fog/openstack/models/identity/tenant.rb +7 -7
  583. data/lib/fog/openstack/models/identity/tenants.rb +3 -3
  584. data/lib/fog/openstack/models/identity/user.rb +12 -6
  585. data/lib/fog/openstack/models/identity/users.rb +4 -5
  586. data/lib/fog/openstack/models/image/image.rb +10 -9
  587. data/lib/fog/openstack/models/image/images.rb +6 -6
  588. data/lib/fog/openstack/models/network/network.rb +6 -5
  589. data/lib/fog/openstack/models/network/networks.rb +3 -3
  590. data/lib/fog/openstack/models/network/port.rb +6 -5
  591. data/lib/fog/openstack/models/network/ports.rb +3 -3
  592. data/lib/fog/openstack/models/network/subnet.rb +6 -5
  593. data/lib/fog/openstack/models/network/subnets.rb +3 -3
  594. data/lib/fog/openstack/models/volume/volume.rb +4 -3
  595. data/lib/fog/openstack/models/volume/volumes.rb +2 -2
  596. data/lib/fog/openstack/network.rb +5 -3
  597. data/lib/fog/openstack/requests/compute/create_flavor.rb +4 -1
  598. data/lib/fog/openstack/requests/compute/create_security_group.rb +3 -2
  599. data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +1 -0
  600. data/lib/fog/openstack/requests/compute/create_server.rb +54 -7
  601. data/lib/fog/openstack/requests/compute/delete_security_group.rb +2 -0
  602. data/lib/fog/openstack/requests/compute/get_limits.rb +93 -0
  603. data/lib/fog/openstack/requests/compute/list_security_groups.rb +17 -41
  604. data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -0
  605. data/lib/fog/openstack/requests/compute/release_address.rb +13 -1
  606. data/lib/fog/openstack/requests/compute/reset_server_state.rb +24 -0
  607. data/lib/fog/openstack/requests/identity/add_user_to_tenant.rb +7 -2
  608. data/lib/fog/openstack/requests/identity/create_ec2_credential.rb +58 -0
  609. data/lib/fog/openstack/requests/identity/create_role.rb +1 -1
  610. data/lib/fog/openstack/requests/identity/create_tenant.rb +1 -3
  611. data/lib/fog/openstack/requests/identity/delete_ec2_credential.rb +44 -0
  612. data/lib/fog/openstack/requests/identity/get_ec2_credential.rb +49 -0
  613. data/lib/fog/openstack/requests/identity/get_user_by_name.rb +8 -0
  614. data/lib/fog/openstack/requests/identity/list_ec2_credentials.rb +44 -0
  615. data/lib/fog/openstack/requests/identity/list_roles_for_user_on_tenant.rb +7 -1
  616. data/lib/fog/openstack/requests/identity/list_users.rb +10 -1
  617. data/lib/fog/openstack/requests/identity/set_tenant.rb +21 -0
  618. data/lib/fog/openstack/requests/identity/update_tenant.rb +1 -3
  619. data/lib/fog/openstack/requests/image/create_image.rb +3 -1
  620. data/lib/fog/openstack/volume.rb +6 -3
  621. data/lib/fog/ovirt/models/compute/cluster.rb +1 -1
  622. data/lib/fog/ovirt/models/compute/clusters.rb +2 -2
  623. data/lib/fog/ovirt/models/compute/interfaces.rb +3 -3
  624. data/lib/fog/ovirt/models/compute/server.rb +15 -15
  625. data/lib/fog/ovirt/models/compute/servers.rb +2 -2
  626. data/lib/fog/ovirt/models/compute/template.rb +5 -5
  627. data/lib/fog/ovirt/models/compute/templates.rb +2 -2
  628. data/lib/fog/ovirt/models/compute/volumes.rb +3 -3
  629. data/lib/fog/rackspace.rb +20 -11
  630. data/lib/fog/rackspace/block_storage.rb +1 -0
  631. data/lib/fog/rackspace/compute_v2.rb +10 -0
  632. data/lib/fog/rackspace/load_balancers.rb +2 -0
  633. data/lib/fog/rackspace/models/block_storage/snapshot.rb +3 -2
  634. data/lib/fog/rackspace/models/block_storage/snapshots.rb +2 -2
  635. data/lib/fog/rackspace/models/block_storage/volume.rb +9 -3
  636. data/lib/fog/rackspace/models/block_storage/volume_types.rb +3 -3
  637. data/lib/fog/rackspace/models/block_storage/volumes.rb +2 -2
  638. data/lib/fog/rackspace/models/compute/flavors.rb +2 -2
  639. data/lib/fog/rackspace/models/compute/image.rb +3 -3
  640. data/lib/fog/rackspace/models/compute/images.rb +2 -2
  641. data/lib/fog/rackspace/models/compute/server.rb +7 -7
  642. data/lib/fog/rackspace/models/compute/servers.rb +2 -2
  643. data/lib/fog/rackspace/models/compute_v2/attachment.rb +2 -2
  644. data/lib/fog/rackspace/models/compute_v2/attachments.rb +2 -2
  645. data/lib/fog/rackspace/models/compute_v2/flavors.rb +2 -2
  646. data/lib/fog/rackspace/models/compute_v2/image.rb +9 -0
  647. data/lib/fog/rackspace/models/compute_v2/images.rb +2 -2
  648. data/lib/fog/rackspace/models/compute_v2/server.rb +47 -14
  649. data/lib/fog/rackspace/models/compute_v2/servers.rb +10 -2
  650. data/lib/fog/rackspace/models/databases/database.rb +2 -2
  651. data/lib/fog/rackspace/models/databases/databases.rb +1 -1
  652. data/lib/fog/rackspace/models/databases/flavors.rb +2 -2
  653. data/lib/fog/rackspace/models/databases/instance.rb +10 -10
  654. data/lib/fog/rackspace/models/databases/instances.rb +2 -2
  655. data/lib/fog/rackspace/models/databases/user.rb +2 -2
  656. data/lib/fog/rackspace/models/databases/users.rb +1 -1
  657. data/lib/fog/rackspace/models/dns/callback.rb +1 -1
  658. data/lib/fog/rackspace/models/dns/record.rb +23 -5
  659. data/lib/fog/rackspace/models/dns/records.rb +2 -2
  660. data/lib/fog/rackspace/models/dns/zone.rb +5 -5
  661. data/lib/fog/rackspace/models/dns/zones.rb +2 -2
  662. data/lib/fog/rackspace/models/identity/credentials.rb +1 -1
  663. data/lib/fog/rackspace/models/identity/roles.rb +1 -1
  664. data/lib/fog/rackspace/models/identity/tenants.rb +1 -1
  665. data/lib/fog/rackspace/models/identity/user.rb +6 -6
  666. data/lib/fog/rackspace/models/identity/users.rb +3 -3
  667. data/lib/fog/rackspace/models/load_balancers/access_rule.rb +4 -4
  668. data/lib/fog/rackspace/models/load_balancers/access_rules.rb +1 -1
  669. data/lib/fog/rackspace/models/load_balancers/load_balancer.rb +45 -27
  670. data/lib/fog/rackspace/models/load_balancers/load_balancers.rb +2 -2
  671. data/lib/fog/rackspace/models/load_balancers/node.rb +4 -4
  672. data/lib/fog/rackspace/models/load_balancers/nodes.rb +2 -2
  673. data/lib/fog/rackspace/models/load_balancers/virtual_ip.rb +3 -3
  674. data/lib/fog/rackspace/models/load_balancers/virtual_ips.rb +1 -1
  675. data/lib/fog/rackspace/models/storage/directories.rb +2 -2
  676. data/lib/fog/rackspace/models/storage/directory.rb +12 -12
  677. data/lib/fog/rackspace/models/storage/file.rb +71 -5
  678. data/lib/fog/rackspace/models/storage/files.rb +2 -2
  679. data/lib/fog/rackspace/requests/compute_v2/create_image.rb +41 -0
  680. data/lib/fog/rackspace/requests/compute_v2/create_server.rb +3 -0
  681. data/lib/fog/rackspace/requests/compute_v2/delete_image.rb +31 -0
  682. data/lib/fog/rackspace/requests/compute_v2/list_addresses.rb +34 -0
  683. data/lib/fog/rackspace/requests/compute_v2/list_addresses_by_network.rb +36 -0
  684. data/lib/fog/rackspace/requests/dns/add_records.rb +5 -1
  685. data/lib/fog/rackspace/requests/load_balancers/get_content_caching.rb +15 -0
  686. data/lib/fog/rackspace/requests/load_balancers/set_content_caching.rb +21 -0
  687. data/lib/fog/rackspace/requests/storage/post_set_meta_temp_url_key.rb +1 -1
  688. data/lib/fog/serverlove/models/compute/image.rb +11 -11
  689. data/lib/fog/serverlove/models/compute/images.rb +2 -2
  690. data/lib/fog/serverlove/models/compute/server.rb +10 -10
  691. data/lib/fog/serverlove/models/compute/servers.rb +2 -2
  692. data/lib/fog/storm_on_demand/models/compute/balancer.rb +7 -7
  693. data/lib/fog/storm_on_demand/models/compute/balancers.rb +1 -1
  694. data/lib/fog/storm_on_demand/models/compute/configs.rb +1 -1
  695. data/lib/fog/storm_on_demand/models/compute/images.rb +1 -1
  696. data/lib/fog/storm_on_demand/models/compute/private_ips.rb +2 -2
  697. data/lib/fog/storm_on_demand/models/compute/server.rb +5 -5
  698. data/lib/fog/storm_on_demand/models/compute/servers.rb +2 -2
  699. data/lib/fog/storm_on_demand/models/compute/stats.rb +1 -1
  700. data/lib/fog/storm_on_demand/models/compute/templates.rb +1 -1
  701. data/lib/fog/terremark/models/shared/address.rb +1 -1
  702. data/lib/fog/terremark/models/shared/addresses.rb +5 -5
  703. data/lib/fog/terremark/models/shared/images.rb +5 -5
  704. data/lib/fog/terremark/models/shared/internetservice.rb +6 -6
  705. data/lib/fog/terremark/models/shared/internetservices.rb +5 -5
  706. data/lib/fog/terremark/models/shared/network.rb +1 -1
  707. data/lib/fog/terremark/models/shared/networks.rb +6 -6
  708. data/lib/fog/terremark/models/shared/nodeservice.rb +3 -3
  709. data/lib/fog/terremark/models/shared/nodeservices.rb +4 -4
  710. data/lib/fog/terremark/models/shared/server.rb +17 -17
  711. data/lib/fog/terremark/models/shared/servers.rb +6 -6
  712. data/lib/fog/terremark/models/shared/task.rb +4 -4
  713. data/lib/fog/terremark/models/shared/tasks.rb +5 -5
  714. data/lib/fog/terremark/models/shared/vdc.rb +4 -4
  715. data/lib/fog/terremark/models/shared/vdcs.rb +5 -5
  716. data/lib/fog/terremark/parser.rb +1 -1
  717. data/lib/fog/terremark/shared.rb +1 -1
  718. data/lib/fog/vcloud/compute.rb +4 -4
  719. data/lib/fog/vcloud/models/compute/catalog.rb +1 -1
  720. data/lib/fog/vcloud/models/compute/catalog_item.rb +1 -1
  721. data/lib/fog/vcloud/models/compute/catalog_items.rb +4 -4
  722. data/lib/fog/vcloud/models/compute/catalogs.rb +3 -3
  723. data/lib/fog/vcloud/models/compute/ip.rb +1 -1
  724. data/lib/fog/vcloud/models/compute/ips.rb +3 -3
  725. data/lib/fog/vcloud/models/compute/network.rb +1 -1
  726. data/lib/fog/vcloud/models/compute/networks.rb +6 -6
  727. data/lib/fog/vcloud/models/compute/organization.rb +4 -4
  728. data/lib/fog/vcloud/models/compute/organizations.rb +4 -4
  729. data/lib/fog/vcloud/models/compute/server.rb +13 -13
  730. data/lib/fog/vcloud/models/compute/servers.rb +4 -4
  731. data/lib/fog/vcloud/models/compute/tasks.rb +3 -3
  732. data/lib/fog/vcloud/models/compute/vapp.rb +2 -2
  733. data/lib/fog/vcloud/models/compute/vapps.rb +2 -2
  734. data/lib/fog/vcloud/models/compute/vdc.rb +2 -2
  735. data/lib/fog/vcloud/models/compute/vdcs.rb +3 -3
  736. data/lib/fog/version.rb +3 -0
  737. data/lib/fog/virtual_box/compute.rb +11 -5
  738. data/lib/fog/virtual_box/models/compute/medium.rb +2 -2
  739. data/lib/fog/virtual_box/models/compute/mediums.rb +4 -4
  740. data/lib/fog/virtual_box/models/compute/nat_engine.rb +2 -2
  741. data/lib/fog/virtual_box/models/compute/network_adapter.rb +1 -1
  742. data/lib/fog/virtual_box/models/compute/network_adapters.rb +1 -1
  743. data/lib/fog/virtual_box/models/compute/server.rb +5 -5
  744. data/lib/fog/virtual_box/models/compute/servers.rb +2 -2
  745. data/lib/fog/vmfusion/compute.rb +6 -1
  746. data/lib/fog/vmfusion/models/compute/server.rb +1 -1
  747. data/lib/fog/voxel/models/compute/images.rb +2 -2
  748. data/lib/fog/voxel/models/compute/server.rb +6 -6
  749. data/lib/fog/voxel/models/compute/servers.rb +2 -2
  750. data/lib/fog/vsphere/compute.rb +78 -9
  751. data/lib/fog/vsphere/models/compute/cluster.rb +31 -0
  752. data/lib/fog/vsphere/models/compute/clusters.rb +26 -0
  753. data/lib/fog/vsphere/models/compute/datacenter.rb +39 -0
  754. data/lib/fog/vsphere/models/compute/datacenters.rb +23 -0
  755. data/lib/fog/vsphere/models/compute/datastore.rb +24 -0
  756. data/lib/fog/vsphere/models/compute/datastores.rb +25 -0
  757. data/lib/fog/vsphere/models/compute/folder.rb +28 -0
  758. data/lib/fog/vsphere/models/compute/folders.rb +27 -0
  759. data/lib/fog/vsphere/models/compute/interface.rb +39 -0
  760. data/lib/fog/vsphere/models/compute/interfaces.rb +33 -0
  761. data/lib/fog/vsphere/models/compute/network.rb +21 -0
  762. data/lib/fog/vsphere/models/compute/networks.rb +25 -0
  763. data/lib/fog/vsphere/models/compute/resource_pool.rb +23 -0
  764. data/lib/fog/vsphere/models/compute/resource_pools.rb +26 -0
  765. data/lib/fog/vsphere/models/compute/server.rb +106 -29
  766. data/lib/fog/vsphere/models/compute/servers.rb +16 -20
  767. data/lib/fog/vsphere/models/compute/template.rb +13 -0
  768. data/lib/fog/vsphere/models/compute/templates.rb +23 -0
  769. data/lib/fog/vsphere/models/compute/volume.rb +45 -0
  770. data/lib/fog/vsphere/models/compute/volumes.rb +33 -0
  771. data/lib/fog/vsphere/requests/compute/create_folder.rb +22 -0
  772. data/lib/fog/vsphere/requests/compute/create_vm.rb +114 -0
  773. data/lib/fog/vsphere/requests/compute/get_cluster.rb +25 -0
  774. data/lib/fog/vsphere/requests/compute/get_datacenter.rb +29 -0
  775. data/lib/fog/vsphere/requests/compute/get_datastore.rb +25 -0
  776. data/lib/fog/vsphere/requests/compute/get_folder.rb +73 -0
  777. data/lib/fog/vsphere/requests/compute/get_network.rb +25 -0
  778. data/lib/fog/vsphere/requests/compute/get_resource_pool.rb +26 -0
  779. data/lib/fog/vsphere/requests/compute/get_virtual_machine.rb +62 -0
  780. data/lib/fog/vsphere/requests/compute/list_clusters.rb +37 -0
  781. data/lib/fog/vsphere/requests/compute/list_datacenters.rb +34 -0
  782. data/lib/fog/vsphere/requests/compute/list_datastores.rb +40 -0
  783. data/lib/fog/vsphere/requests/compute/list_folders.rb +45 -0
  784. data/lib/fog/vsphere/requests/compute/list_networks.rb +38 -0
  785. data/lib/fog/vsphere/requests/compute/list_resource_pools.rb +39 -0
  786. data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +132 -166
  787. data/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +52 -0
  788. data/lib/fog/vsphere/requests/compute/list_vm_volumes.rb +51 -0
  789. data/lib/fog/vsphere/requests/compute/vm_clone.rb +134 -67
  790. data/lib/fog/vsphere/requests/compute/vm_destroy.rb +1 -8
  791. data/lib/fog/vsphere/requests/compute/vm_reconfig_hardware.rb +1 -2
  792. data/lib/fog/xenserver.rb +26 -2
  793. data/lib/fog/xenserver/compute.rb +8 -0
  794. data/lib/fog/xenserver/examples/README.md +11 -0
  795. data/lib/fog/xenserver/examples/chage_default_storage_repository.md +99 -0
  796. data/lib/fog/xenserver/examples/creating_servers.md +168 -0
  797. data/lib/fog/xenserver/examples/getting_started.md +163 -0
  798. data/lib/fog/xenserver/examples/storage_repositories.md +94 -0
  799. data/lib/fog/xenserver/models/compute/host.rb +75 -8
  800. data/lib/fog/xenserver/models/compute/host_metrics.rb +29 -0
  801. data/lib/fog/xenserver/models/compute/hosts.rb +8 -8
  802. data/lib/fog/xenserver/models/compute/network.rb +11 -11
  803. data/lib/fog/xenserver/models/compute/networks.rb +3 -3
  804. data/lib/fog/xenserver/models/compute/pbd.rb +11 -6
  805. data/lib/fog/xenserver/models/compute/pbds.rb +3 -3
  806. data/lib/fog/xenserver/models/compute/pif.rb +9 -9
  807. data/lib/fog/xenserver/models/compute/pifs.rb +3 -3
  808. data/lib/fog/xenserver/models/compute/pool.rb +30 -8
  809. data/lib/fog/xenserver/models/compute/pools.rb +3 -3
  810. data/lib/fog/xenserver/models/compute/server.rb +29 -29
  811. data/lib/fog/xenserver/models/compute/servers.rb +8 -8
  812. data/lib/fog/xenserver/models/compute/storage_repositories.rb +2 -2
  813. data/lib/fog/xenserver/models/compute/storage_repository.rb +52 -9
  814. data/lib/fog/xenserver/models/compute/vbd.rb +16 -16
  815. data/lib/fog/xenserver/models/compute/vbds.rb +3 -3
  816. data/lib/fog/xenserver/models/compute/vdi.rb +17 -17
  817. data/lib/fog/xenserver/models/compute/vdis.rb +3 -3
  818. data/lib/fog/xenserver/models/compute/vif.rb +10 -10
  819. data/lib/fog/xenserver/models/compute/vifs.rb +3 -3
  820. data/lib/fog/xenserver/requests/compute/create_sr.rb +72 -0
  821. data/lib/fog/xenserver/requests/compute/destroy_sr.rb +30 -0
  822. data/lib/fog/xenserver/requests/compute/disable_host.rb +29 -0
  823. data/lib/fog/xenserver/requests/compute/enable_host.rb +28 -0
  824. data/lib/fog/xenserver/requests/compute/reboot_host.rb +23 -0
  825. data/lib/fog/xenserver/requests/compute/shutdown_host.rb +23 -0
  826. data/lib/fog/xenserver/requests/compute/unplug_pbd.rb +25 -0
  827. data/lib/fog/zerigo/models/dns/record.rb +4 -4
  828. data/lib/fog/zerigo/models/dns/records.rb +2 -2
  829. data/lib/fog/zerigo/models/dns/zone.rb +6 -6
  830. data/lib/fog/zerigo/models/dns/zones.rb +2 -2
  831. data/lib/tasks/changelog_task.rb +98 -0
  832. data/lib/tasks/test_task.rb +46 -0
  833. data/tests/aws/models/cloud_watch/metrics_tests.rb +16 -1
  834. data/tests/aws/models/iam/users_tests.rb +16 -2
  835. data/tests/aws/requests/auto_scaling/model_tests.rb +1 -3
  836. data/tests/aws/requests/auto_scaling/notification_configuration_tests.rb +1 -0
  837. data/tests/aws/requests/auto_scaling/tag_tests.rb +1 -0
  838. data/tests/aws/requests/compute/instance_tests.rb +2 -0
  839. data/tests/aws/requests/compute/snapshot_tests.rb +19 -0
  840. data/tests/aws/requests/compute/spot_instance_tests.rb +4 -2
  841. data/tests/aws/requests/compute/volume_tests.rb +8 -0
  842. data/tests/aws/requests/storage/bucket_tests.rb +14 -0
  843. data/tests/aws/requests/storage/cors_utils_tests.rb +108 -0
  844. data/tests/aws/requests/storage/object_tests.rb +18 -1
  845. data/tests/aws/requests/storage/versioning_tests.rb +70 -0
  846. data/tests/brightbox/compute_tests.rb +96 -4
  847. data/tests/brightbox/models/compute/account_tests.rb +17 -0
  848. data/tests/brightbox/models/compute/server_tests.rb +21 -0
  849. data/tests/brightbox/oauth2_tests.rb +103 -0
  850. data/tests/brightbox/requests/compute/account_tests.rb +9 -2
  851. data/tests/brightbox/requests/compute/firewall_policy_tests.rb +33 -0
  852. data/tests/brightbox/requests/compute/firewall_rule_tests.rb +43 -0
  853. data/tests/brightbox/requests/compute/helper.rb +33 -30
  854. data/tests/brightbox/requests/compute/interface_tests.rb +18 -4
  855. data/tests/compute/helper.rb +28 -6
  856. data/tests/compute/models/flavors_tests.rb +4 -2
  857. data/tests/compute/models/server_tests.rb +5 -1
  858. data/tests/compute/models/servers_tests.rb +5 -2
  859. data/tests/core/wait_for_tests.rb +13 -0
  860. data/tests/dns/models/record_tests.rb +17 -3
  861. data/tests/ecloud/compute/models/admin_organization_tests.rb +16 -0
  862. data/tests/ecloud/compute/models/compute_pool_tests.rb +17 -0
  863. data/tests/ecloud/compute/models/detached_disk_tests.rb +26 -0
  864. data/tests/ecloud/compute/models/environment_tests.rb +23 -0
  865. data/tests/ecloud/compute/models/internet_service_tests.rb +28 -0
  866. data/tests/ecloud/compute/models/ip_address_tests.rb +19 -0
  867. data/tests/ecloud/compute/models/network_tests.rb +17 -0
  868. data/tests/ecloud/compute/models/operating_system_families_tests.rb +13 -0
  869. data/tests/ecloud/compute/models/operating_system_tests.rb +22 -0
  870. data/tests/ecloud/compute/models/organization_tests.rb +21 -0
  871. data/tests/ecloud/compute/models/public_ip_tests.rb +19 -0
  872. data/tests/ecloud/compute/models/server_tests.rb +143 -0
  873. data/tests/ecloud/compute/models/ssh_key_tests.rb +19 -0
  874. data/tests/ecloud/compute/models/template_tests.rb +20 -0
  875. data/tests/openstack/authenticate_tests.rb +142 -0
  876. data/tests/openstack/models/compute/server_tests.rb +45 -0
  877. data/tests/openstack/models/identity/ec2_credential_tests.rb +41 -0
  878. data/tests/openstack/models/identity/ec2_credentials_tests.rb +58 -0
  879. data/tests/openstack/models/identity/tenant_tests.rb +6 -0
  880. data/tests/openstack/requests/compute/address_tests.rb +20 -19
  881. data/tests/openstack/requests/compute/flavor_tests.rb +4 -2
  882. data/tests/openstack/requests/compute/helper.rb +20 -0
  883. data/tests/openstack/requests/compute/limit_tests.rb +60 -0
  884. data/tests/openstack/requests/compute/quota_tests.rb +18 -3
  885. data/tests/openstack/requests/compute/security_group_tests.rb +11 -3
  886. data/tests/openstack/requests/compute/server_tests.rb +29 -14
  887. data/tests/openstack/requests/identity/ec2_credentials_tests.rb +41 -0
  888. data/tests/openstack/requests/identity/role_tests.rb +0 -1
  889. data/tests/openstack/requests/identity/user_tests.rb +8 -0
  890. data/tests/rackspace/models/block_storage/snapshot_tests.rb +18 -11
  891. data/tests/rackspace/models/block_storage/volume_tests.rb +13 -7
  892. data/tests/rackspace/models/compute_v2/image_tests.rb +28 -0
  893. data/tests/rackspace/models/compute_v2/server_tests.rb +15 -0
  894. data/tests/rackspace/models/compute_v2/servers_tests.rb +6 -0
  895. data/tests/rackspace/models/load_balancers/load_balancer_tests.rb +17 -0
  896. data/tests/rackspace/models/storage/file_tests.rb +178 -0
  897. data/tests/rackspace/requests/compute/address_tests.rb +11 -9
  898. data/tests/rackspace/requests/compute/flavor_tests.rb +6 -5
  899. data/tests/rackspace/requests/compute/image_tests.rb +12 -10
  900. data/tests/rackspace/requests/compute/resize_tests.rb +8 -6
  901. data/tests/rackspace/requests/compute/server_tests.rb +19 -17
  902. data/tests/rackspace/requests/compute_v2/address_tests.rb +43 -0
  903. data/tests/rackspace/requests/compute_v2/image_tests.rb +38 -10
  904. data/tests/rackspace/requests/dns/helper.rb +12 -26
  905. data/tests/rackspace/requests/dns/records_tests.rb +2 -2
  906. data/tests/rackspace/requests/load_balancers/content_caching_tests.rb +25 -0
  907. data/tests/rackspace/requests/load_balancers/helper.rb +5 -1
  908. data/tests/vsphere/compute_tests.rb +3 -3
  909. data/tests/vsphere/models/compute/server_tests.rb +1 -2
  910. data/tests/vsphere/requests/compute/list_virtual_machines_tests.rb +5 -13
  911. data/tests/vsphere/requests/compute/vm_clone_tests.rb +6 -4
  912. data/tests/xenserver/models/compute/host_metrics_tests.rb +48 -0
  913. data/tests/xenserver/models/compute/host_tests.rb +20 -1
  914. data/tests/xenserver/models/compute/pbd_tests.rb +33 -1
  915. data/tests/xenserver/models/compute/pool_tests.rb +7 -1
  916. data/tests/xenserver/models/compute/storage_repository_tests.rb +52 -1
  917. data/tests/xenserver/requests/compute/create_sr_tests.rb +54 -0
  918. data/tests/xenserver/requests/compute/destroy_sr_tests.rb +46 -0
  919. data/tests/xenserver/requests/compute/disable_host_tests.rb +16 -0
  920. data/tests/xenserver/requests/compute/enable_host_tests.rb +16 -0
  921. data/tests/xenserver/requests/compute/unplug_pbd_tests.rb +48 -0
  922. metadata +312 -89
  923. data/docs/_config.yml +0 -39
  924. data/docs/_layouts/default.html +0 -111
  925. data/docs/about/contributing.markdown +0 -228
  926. data/docs/about/getting_started.markdown +0 -108
  927. data/docs/about/press.markdown +0 -52
  928. data/docs/about/structure.markdown +0 -78
  929. data/docs/about/users.markdown +0 -34
  930. data/docs/cdn/index.markdown +0 -148
  931. data/docs/compute/index.markdown +0 -122
  932. data/docs/dns/index.markdown +0 -79
  933. data/docs/index.markdown +0 -88
  934. data/docs/public/crossdomain.xml +0 -25
  935. data/docs/public/css/fog.css +0 -142
  936. data/docs/public/css/handheld.css +0 -8
  937. data/docs/public/css/style.css +0 -129
  938. data/docs/public/images/.gitignore +0 -3
  939. data/docs/public/images/engineyard.png +0 -0
  940. data/docs/public/images/fog.png +0 -0
  941. data/docs/public/js/libs/dd_belatedpng.js +0 -289
  942. data/docs/public/js/libs/dd_belatedpng.min.js +0 -13
  943. data/docs/public/js/libs/jquery-1.4.2.js +0 -6240
  944. data/docs/public/js/libs/jquery-1.4.2.min.js +0 -154
  945. data/docs/public/js/libs/modernizr-1.6.js +0 -892
  946. data/docs/public/js/libs/modernizr-1.6.min.js +0 -30
  947. data/docs/public/js/mylibs/.gitignore +0 -3
  948. data/docs/public/js/plugins.js +0 -34
  949. data/docs/public/js/profiling/config.js +0 -59
  950. data/docs/public/js/profiling/yahoo-profiling.css +0 -7
  951. data/docs/public/js/profiling/yahoo-profiling.js +0 -1028
  952. data/docs/public/js/profiling/yahoo-profiling.min.js +0 -39
  953. data/docs/public/js/script.js +0 -26
  954. data/docs/public/robots.txt +0 -5
  955. data/docs/storage/index.markdown +0 -204
  956. data/lib/fog/ecloud/requests/compute/get_admin_organizations.rb +0 -11
  957. data/lib/fog/ecloud/requests/compute/get_ip_addresses.rb +0 -11
  958. data/lib/fog/ecloud/requests/compute/get_operating_system_family.rb +0 -11
  959. data/lib/fog/ecloud/requests/compute/virtual_machine_add_ip.rb +0 -40
  960. data/lib/fog/vsphere/requests/compute/datacenters.rb +0 -34
  961. data/lib/fog/vsphere/requests/compute/find_vm_by_ref.rb +0 -41
  962. data/lib/fog/vsphere/requests/compute/vm_create.rb +0 -97
  963. data/tests/vsphere/requests/compute/find_vm_by_ref_tests.rb +0 -26
  964. data/tests/vsphere/requests/compute/vm_create_tests.rb +0 -20
@@ -1,30 +0,0 @@
1
- /*
2
- * Modernizr v1.6
3
- * http://www.modernizr.com
4
- *
5
- * Developed by:
6
- * - Faruk Ates http://farukat.es/
7
- * - Paul Irish http://paulirish.com/
8
- *
9
- * Copyright (c) 2009-2010
10
- * Dual-licensed under the BSD or MIT licenses.
11
- * http://www.modernizr.com/license/
12
- */
13
- window.Modernizr=function(i,e,u){function s(a,b){return(""+a).indexOf(b)!==-1}function D(a,b){for(var c in a)if(j[a[c]]!==u&&(!b||b(a[c],E)))return true}function n(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);c=(a+" "+F.join(c+" ")+c).split(" ");return!!D(c,b)}function S(){f.input=function(a){for(var b=0,c=a.length;b<c;b++)L[a[b]]=!!(a[b]in h);return L}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));f.inputtypes=function(a){for(var b=0,c,k=a.length;b<
14
- k;b++){h.setAttribute("type",a[b]);if(c=h.type!=="text"){h.value=M;if(/^range$/.test(h.type)&&h.style.WebkitAppearance!==u){l.appendChild(h);c=e.defaultView;c=c.getComputedStyle&&c.getComputedStyle(h,null).WebkitAppearance!=="textfield"&&h.offsetHeight!==0;l.removeChild(h)}else/^(search|tel)$/.test(h.type)||(c=/^(url|email)$/.test(h.type)?h.checkValidity&&h.checkValidity()===false:h.value!=M)}N[a[b]]=!!c}return N}("search tel url email datetime date month week time datetime-local number range color".split(" "))}
15
- var f={},l=e.documentElement,E=e.createElement("modernizr"),j=E.style,h=e.createElement("input"),M=":)",O=Object.prototype.toString,q=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),F="Webkit Moz O ms Khtml".split(" "),v={svg:"http://www.w3.org/2000/svg"},d={},N={},L={},P=[],w,Q=function(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent=a+"{#modernizr{height:3px}}";(e.head||e.getElementsByTagName("head")[0]).appendChild(b);c.id="modernizr";l.appendChild(c);a=c.offsetHeight===
16
- 3;b.parentNode.removeChild(b);c.parentNode.removeChild(c);return!!a},o=function(){var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(b,c){c=c||document.createElement(a[b]||"div");b="on"+b;var k=b in c;if(!k){c.setAttribute||(c=document.createElement("div"));if(c.setAttribute&&c.removeAttribute){c.setAttribute(b,"");k=typeof c[b]=="function";if(typeof c[b]!="undefined")c[b]=u;c.removeAttribute(b)}}return k}}(),G={}.hasOwnProperty,R;R=
17
- typeof G!=="undefined"&&typeof G.call!=="undefined"?function(a,b){return G.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"};d.flexbox=function(){var a=e.createElement("div"),b=e.createElement("div");(function(k,g,r,x){g+=":";k.style.cssText=(g+q.join(r+";"+g)).slice(0,-g.length)+(x||"")})(a,"display","box","width:42px;padding:0;");b.style.cssText=q.join("box-flex:1;")+"width:10px;";a.appendChild(b);l.appendChild(a);var c=b.offsetWidth===42;a.removeChild(b);
18
- l.removeChild(a);return c};d.canvas=function(){var a=e.createElement("canvas");return!!(a.getContext&&a.getContext("2d"))};d.canvastext=function(){return!!(f.canvas&&typeof e.createElement("canvas").getContext("2d").fillText=="function")};d.webgl=function(){var a=e.createElement("canvas");try{if(a.getContext("webgl"))return true}catch(b){}try{if(a.getContext("experimental-webgl"))return true}catch(c){}return false};d.touch=function(){return"ontouchstart"in i||Q("@media ("+q.join("touch-enabled),(")+
19
- "modernizr)")};d.geolocation=function(){return!!navigator.geolocation};d.postmessage=function(){return!!i.postMessage};d.websqldatabase=function(){return!!i.openDatabase};d.indexedDB=function(){for(var a=-1,b=F.length;++a<b;){var c=F[a].toLowerCase();if(i[c+"_indexedDB"]||i[c+"IndexedDB"])return true}return false};d.hashchange=function(){return o("hashchange",i)&&(document.documentMode===u||document.documentMode>7)};d.history=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return o("drag")&&
20
- o("dragstart")&&o("dragenter")&&o("dragover")&&o("dragleave")&&o("dragend")&&o("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){j.cssText="background-color:rgba(150,255,150,.5)";return s(j.backgroundColor,"rgba")};d.hsla=function(){j.cssText="background-color:hsla(120,40%,100%,.5)";return s(j.backgroundColor,"rgba")||s(j.backgroundColor,"hsla")};d.multiplebgs=function(){j.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(j.background)};d.backgroundsize=
21
- function(){return n("backgroundSize")};d.borderimage=function(){return n("borderImage")};d.borderradius=function(){return n("borderRadius","",function(a){return s(a,"orderRadius")})};d.boxshadow=function(){return n("boxShadow")};d.textshadow=function(){return e.createElement("div").style.textShadow===""};d.opacity=function(){var a=q.join("opacity:.5;")+"";j.cssText=a;return s(j.opacity,"0.5")};d.cssanimations=function(){return n("animationName")};d.csscolumns=function(){return n("columnCount")};d.cssgradients=
22
- function(){var a=("background-image:"+q.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+q.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);j.cssText=a;return s(j.backgroundImage,"gradient")};d.cssreflections=function(){return n("boxReflect")};d.csstransforms=function(){return!!D(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!D(["perspectiveProperty","WebkitPerspective",
23
- "MozPerspective","OPerspective","msPerspective"]);if(a)a=Q("@media ("+q.join("transform-3d),(")+"modernizr)");return a};d.csstransitions=function(){return n("transitionProperty")};d.fontface=function(){var a,b=e.head||e.getElementsByTagName("head")[0]||l,c=e.createElement("style"),k=e.implementation||{hasFeature:function(){return false}};c.type="text/css";b.insertBefore(c,b.firstChild);a=c.sheet||c.styleSheet;b=k.hasFeature("CSS2","")?function(g){if(!(a&&g))return false;var r=false;try{a.insertRule(g,
24
- 0);r=!/unknown/i.test(a.cssRules[0].cssText);a.deleteRule(a.cssRules.length-1)}catch(x){}return r}:function(g){if(!(a&&g))return false;a.cssText=g;return a.cssText.length!==0&&!/unknown/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(g.split(" ")[0])===0};f._fontfaceready=function(g){g(f.fontface)};return b('@font-face { font-family: "font"; src: "font.ttf"; }')};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');
25
- b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"')||a.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b};d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localstorage=function(){try{return"localStorage"in
26
- i&&i.localStorage!==null}catch(a){return false}};d.sessionstorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webWorkers=function(){return!!i.Worker};d.applicationcache=function(){return!!i.applicationCache};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS(v.svg,"svg").createSVGRect};d.inlinesvg=function(){var a=document.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==v.svg};d.smil=function(){return!!e.createElementNS&&
27
- /SVG/.test(O.call(e.createElementNS(v.svg,"animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(O.call(e.createElementNS(v.svg,"clipPath")))};for(var H in d)if(R(d,H)){w=H.toLowerCase();f[w]=d[H]();P.push((f[w]?"":"no-")+w)}f.input||S();f.crosswindowmessaging=f.postmessage;f.historymanagement=f.history;f.addTest=function(a,b){a=a.toLowerCase();if(!f[a]){b=!!b();l.className+=" "+(b?"":"no-")+a;f[a]=b;return f}};j.cssText="";E=h=null;i.attachEvent&&function(){var a=e.createElement("div");
28
- a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function c(p){for(var m=-1;++m<r;)p.createElement(g[m])}function k(p,m){for(var I=p.length,t=-1,y,J=[];++t<I;){y=p[t];m=y.media||m;J.push(k(y.imports,m));J.push(y.cssText)}return J.join("")}var g="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"),r=g.length,x=RegExp("<(/*)(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)",
29
- "gi"),T=RegExp("\\b(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)\\b(?!.*[;}])","gi"),z=b.createDocumentFragment(),A=b.documentElement,K=A.firstChild,B=b.createElement("style"),C=b.createElement("body");B.media="all";c(b);c(z);a.attachEvent("onbeforeprint",function(){for(var p=-1;++p<r;)for(var m=b.getElementsByTagName(g[p]),I=m.length,t=-1;++t<I;)if(m[t].className.indexOf("iepp_")<0)m[t].className+=" iepp_"+
30
- g[p];K.insertBefore(B,K.firstChild);B.styleSheet.cssText=k(b.styleSheets,"all").replace(T,".iepp_$1");z.appendChild(b.body);A.appendChild(C);C.innerHTML=z.firstChild.innerHTML.replace(x,"<$1bdo")});a.attachEvent("onafterprint",function(){C.innerHTML="";A.removeChild(C);K.removeChild(B);A.appendChild(z.firstChild)})}(this,document);f._enableHTML5=true;f._version="1.6";l.className=l.className.replace(/\bno-js\b/,"")+" js";l.className+=" "+P.join(" ");return f}(this,this.document);
@@ -1,3 +0,0 @@
1
- *
2
- !.gitignore
3
-
@@ -1,34 +0,0 @@
1
-
2
- (function($){
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
- })(this.jQuery);
15
-
16
-
17
-
18
-
19
- window.log = function(){
20
- log.history = log.history || [];
21
- log.history.push(arguments);
22
- if(this.console){
23
- console.log( Array.prototype.slice.call(arguments) );
24
- }
25
- };
26
- (function(doc){
27
- var write = doc.write;
28
- doc.write = function(q){
29
- log('document.write(): ',arguments);
30
- if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments);
31
- };
32
- })(document);
33
-
34
-
@@ -1,59 +0,0 @@
1
-
2
-
3
- // call PROFILE.show() to show the profileViewer
4
-
5
- var PROFILE = {
6
-
7
- init : function(bool) {
8
-
9
- // define what objects, constructors and functions you want to profile
10
- // documentation here: http://developer.yahoo.com/yui/profiler/
11
-
12
- YAHOO.tool.Profiler.registerObject("jQuery", jQuery, true);
13
-
14
- // the following would profile all methods within constructor's prototype
15
- // YAHOO.tool.Profiler.registerConstructor("Person");
16
-
17
- // the following would profile the global function sayHi
18
- // YAHOO.tool.Profiler.registerFunction("sayHi", window);
19
-
20
- // if true is passed into init(), F9 will bring up the profiler
21
- if (bool){
22
- $(document).keyup(function(e){
23
- if (e.keyCode === 120){
24
- PROFILE.show();
25
- $(document).unbind('keyup',arguments.callee);
26
- }
27
- })
28
- }
29
- },
30
-
31
- //When the showProfile button is clicked, use YUI Loader to get all required
32
- //dependencies and then show the profile:
33
- show : function() {
34
-
35
-
36
-
37
- var s = document.createElement('link');
38
- s.setAttribute('rel','stylesheet');
39
- s.setAttribute('type','text/css');
40
- s.setAttribute('href','js/profiling/yahoo-profiling.css');
41
- document.body.appendChild(s);
42
-
43
- YAHOO.util.Dom.addClass(document.body, 'yui-skin-sam');
44
-
45
- //instantiate ProfilerViewer with desired options:
46
- var pv = new YAHOO.widget.ProfilerViewer("", {
47
- visible: true, //expand the viewer mmediately after instantiation
48
- showChart: true,
49
- // base:"../../build/",
50
- swfUrl: "js/profiling/charts.swf"
51
- });
52
-
53
- }
54
-
55
- };
56
-
57
- // check some global debug variable to see if we should be profiling..
58
- if (true) { PROFILE.init(true) }
59
-
@@ -1,7 +0,0 @@
1
- /*
2
- Copyright (c) 2009, Yahoo! Inc. All rights reserved.
3
- Code licensed under the BSD License:
4
- http://developer.yahoo.net/yui/license.txt
5
- version: 2.7.0
6
- */
7
- .yui-skin-sam .yui-pv{background-color:#4a4a4a;font:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(http://yui.yahooapis.com/2.7.0/build/profilerviewer/assets/skins/sam/header_background.png) repeat-x;min-height:30px;overflow:hidden;zoom:1;padding:2px 0;}.yui-skin-sam .yui-pv .hd h4{padding:8px 10px;margin:0;font:bold 14px arial;color:#fff;}.yui-skin-sam .yui-pv .hd a{background:#3f6bc3;font:bold 11px arial;color:#fff;padding:4px;margin:3px 10px 0 0;border:1px solid #3f567d;cursor:pointer;display:block;float:right;}.yui-skin-sam .yui-pv .hd span{display:none;}.yui-skin-sam .yui-pv .hd span.yui-pv-busy{height:18px;width:18px;background:url(http://yui.yahooapis.com/2.7.0/build/profilerviewer/assets/skins/sam/wait.gif) no-repeat;overflow:hidden;display:block;float:right;margin:4px 10px 0 0;}.yui-skin-sam .yui-pv .hd:after,.yui-pv .bd:after,.yui-skin-sam .yui-pv-chartlegend dl:after{content:'.';visibility:hidden;clear:left;height:0;display:block;}.yui-skin-sam .yui-pv .bd{position:relative;zoom:1;overflow-x:auto;overflow-y:hidden;}.yui-skin-sam .yui-pv .yui-pv-table{padding:0 10px;margin:5px 0 10px 0;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td{color:#eeee5c;font:12px arial;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd{background:#929292;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even{background:#58637a;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc{background:#384970;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc{background:#6F6E6E;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th{background-image:none;background:#2E2D2D;}.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner{background:transparent url(http://yui.yahooapis.com/2.7.0/build/profilerviewer/assets/skins/sam/asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(http://yui.yahooapis.com/2.7.0/build/profilerviewer/assets/skins/sam/desc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a{color:#fff;font:bold 12px arial;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc{background:#333;}.yui-skin-sam .yui-pv-chartcontainer{padding:0 10px;}.yui-skin-sam .yui-pv-chart{height:250px;clear:right;margin:5px 0 0 0;color:#fff;}.yui-skin-sam .yui-pv-chartlegend div{float:right;margin:0 0 0 10px;_width:250px;}.yui-skin-sam .yui-pv-chartlegend dl{border:1px solid #999;padding:.2em 0 .2em .5em;zoom:1;margin:5px 0;}.yui-skin-sam .yui-pv-chartlegend dt{float:left;display:block;height:.7em;width:.7em;padding:0;}.yui-skin-sam .yui-pv-chartlegend dd{float:left;display:block;color:#fff;margin:0 1em 0 .5em;padding:0;font:11px arial;}.yui-skin-sam .yui-pv-minimized{height:35px;}.yui-skin-sam .yui-pv-minimized .bd{top:-3000px;}.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh{display:none;}
@@ -1,1028 +0,0 @@
1
- /*
2
- Copyright (c) 2009, Yahoo! Inc. All rights reserved.
3
- Code licensed under the BSD License:
4
- http://developer.yahoo.net/yui/license.txt
5
- version: 2.7.0
6
- */
7
- /**
8
- * The YAHOO object is the single global object used by YUI Library. It
9
- * contains utility function for setting up namespaces, inheritance, and
10
- * logging. YAHOO.util, YAHOO.widget, and YAHOO.example are namespaces
11
- * created automatically for and used by the library.
12
- * @module yahoo
13
- * @title YAHOO Global
14
- */
15
-
16
- /**
17
- * YAHOO_config is not included as part of the library. Instead it is an
18
- * object that can be defined by the implementer immediately before
19
- * including the YUI library. The properties included in this object
20
- * will be used to configure global properties needed as soon as the
21
- * library begins to load.
22
- * @class YAHOO_config
23
- * @static
24
- */
25
-
26
- /**
27
- * A reference to a function that will be executed every time a YAHOO module
28
- * is loaded. As parameter, this function will receive the version
29
- * information for the module. See <a href="YAHOO.env.html#getVersion">
30
- * YAHOO.env.getVersion</a> for the description of the version data structure.
31
- * @property listener
32
- * @type Function
33
- * @static
34
- * @default undefined
35
- */
36
-
37
- /**
38
- * Set to true if the library will be dynamically loaded after window.onload.
39
- * Defaults to false
40
- * @property injecting
41
- * @type boolean
42
- * @static
43
- * @default undefined
44
- */
45
-
46
- /**
47
- * Instructs the yuiloader component to dynamically load yui components and
48
- * their dependencies. See the yuiloader documentation for more information
49
- * about dynamic loading
50
- * @property load
51
- * @static
52
- * @default undefined
53
- * @see yuiloader
54
- */
55
-
56
- /**
57
- * Forces the use of the supplied locale where applicable in the library
58
- * @property locale
59
- * @type string
60
- * @static
61
- * @default undefined
62
- */
63
-
64
- if (typeof YAHOO == "undefined" || !YAHOO) {
65
- /**
66
- * The YAHOO global namespace object. If YAHOO is already defined, the
67
- * existing YAHOO object will not be overwritten so that defined
68
- * namespaces are preserved.
69
- * @class YAHOO
70
- * @static
71
- */
72
- var YAHOO = {};
73
- }
74
-
75
- /**
76
- * Returns the namespace specified and creates it if it doesn't exist
77
- * <pre>
78
- * YAHOO.namespace("property.package");
79
- * YAHOO.namespace("YAHOO.property.package");
80
- * </pre>
81
- * Either of the above would create YAHOO.property, then
82
- * YAHOO.property.package
83
- *
84
- * Be careful when naming packages. Reserved words may work in some browsers
85
- * and not others. For instance, the following will fail in Safari:
86
- * <pre>
87
- * YAHOO.namespace("really.long.nested.namespace");
88
- * </pre>
89
- * This fails because "long" is a future reserved word in ECMAScript
90
- *
91
- * For implementation code that uses YUI, do not create your components
92
- * in the namespaces created by the library. defined by YUI -- create
93
- * your own (YAHOO.util, YAHOO.widget, YAHOO.lang, YAHOO.env)
94
- *
95
- * @method namespace
96
- * @static
97
- * @param {String*} arguments 1-n namespaces to create
98
- * @return {Object} A reference to the last namespace object created
99
- */
100
- YAHOO.namespace = function() {
101
- var a=arguments, o=null, i, j, d;
102
- for (i=0; i<a.length; i=i+1) {
103
- d=(""+a[i]).split(".");
104
- o=YAHOO;
105
-
106
- // YAHOO is implied, so it is ignored if it is included
107
- for (j=(d[0] == "YAHOO") ? 1 : 0; j<d.length; j=j+1) {
108
- o[d[j]]=o[d[j]] || {};
109
- o=o[d[j]];
110
- }
111
- }
112
-
113
- return o;
114
- };
115
-
116
- /**
117
- * Uses YAHOO.widget.Logger to output a log message, if the widget is
118
- * available.
119
- *
120
- * @method log
121
- * @static
122
- * @param {String} msg The message to log.
123
- * @param {String} cat The log category for the message. Default
124
- * categories are "info", "warn", "error", time".
125
- * Custom categories can be used as well. (opt)
126
- * @param {String} src The source of the the message (opt)
127
- * @return {Boolean} True if the log operation was successful.
128
- */
129
- YAHOO.log = function(msg, cat, src) {
130
- var l=YAHOO.widget.Logger;
131
- if(l && l.log) {
132
- return l.log(msg, cat, src);
133
- } else {
134
- return false;
135
- }
136
- };
137
-
138
- /**
139
- * Registers a module with the YAHOO object
140
- * @method register
141
- * @static
142
- * @param {String} name the name of the module (event, slider, etc)
143
- * @param {Function} mainClass a reference to class in the module. This
144
- * class will be tagged with the version info
145
- * so that it will be possible to identify the
146
- * version that is in use when multiple versions
147
- * have loaded
148
- * @param {Object} data metadata object for the module. Currently it
149
- * is expected to contain a "version" property
150
- * and a "build" property at minimum.
151
- */
152
- YAHOO.register = function(name, mainClass, data) {
153
- var mods = YAHOO.env.modules, m, v, b, ls, i;
154
-
155
- if (!mods[name]) {
156
- mods[name] = {
157
- versions:[],
158
- builds:[]
159
- };
160
- }
161
-
162
- m = mods[name];
163
- v = data.version;
164
- b = data.build;
165
- ls = YAHOO.env.listeners;
166
-
167
- m.name = name;
168
- m.version = v;
169
- m.build = b;
170
- m.versions.push(v);
171
- m.builds.push(b);
172
- m.mainClass = mainClass;
173
-
174
- // fire the module load listeners
175
- for (i=0;i<ls.length;i=i+1) {
176
- ls[i](m);
177
- }
178
- // label the main class
179
- if (mainClass) {
180
- mainClass.VERSION = v;
181
- mainClass.BUILD = b;
182
- } else {
183
- YAHOO.log("mainClass is undefined for module " + name, "warn");
184
- }
185
- };
186
-
187
- /**
188
- * YAHOO.env is used to keep track of what is known about the YUI library and
189
- * the browsing environment
190
- * @class YAHOO.env
191
- * @static
192
- */
193
- YAHOO.env = YAHOO.env || {
194
-
195
- /**
196
- * Keeps the version info for all YUI modules that have reported themselves
197
- * @property modules
198
- * @type Object[]
199
- */
200
- modules: [],
201
-
202
- /**
203
- * List of functions that should be executed every time a YUI module
204
- * reports itself.
205
- * @property listeners
206
- * @type Function[]
207
- */
208
- listeners: []
209
- };
210
-
211
- /**
212
- * Returns the version data for the specified module:
213
- * <dl>
214
- * <dt>name:</dt> <dd>The name of the module</dd>
215
- * <dt>version:</dt> <dd>The version in use</dd>
216
- * <dt>build:</dt> <dd>The build number in use</dd>
217
- * <dt>versions:</dt> <dd>All versions that were registered</dd>
218
- * <dt>builds:</dt> <dd>All builds that were registered.</dd>
219
- * <dt>mainClass:</dt> <dd>An object that was was stamped with the
220
- * current version and build. If
221
- * mainClass.VERSION != version or mainClass.BUILD != build,
222
- * multiple versions of pieces of the library have been
223
- * loaded, potentially causing issues.</dd>
224
- * </dl>
225
- *
226
- * @method getVersion
227
- * @static
228
- * @param {String} name the name of the module (event, slider, etc)
229
- * @return {Object} The version info
230
- */
231
- YAHOO.env.getVersion = function(name) {
232
- return YAHOO.env.modules[name] || null;
233
- };
234
-
235
- /**
236
- * Do not fork for a browser if it can be avoided. Use feature detection when
237
- * you can. Use the user agent as a last resort. YAHOO.env.ua stores a version
238
- * number for the browser engine, 0 otherwise. This value may or may not map
239
- * to the version number of the browser using the engine. The value is
240
- * presented as a float so that it can easily be used for boolean evaluation
241
- * as well as for looking for a particular range of versions. Because of this,
242
- * some of the granularity of the version info may be lost (e.g., Gecko 1.8.0.9
243
- * reports 1.8).
244
- * @class YAHOO.env.ua
245
- * @static
246
- */
247
- YAHOO.env.ua = function() {
248
- var o={
249
-
250
- /**
251
- * Internet Explorer version number or 0. Example: 6
252
- * @property ie
253
- * @type float
254
- */
255
- ie:0,
256
-
257
- /**
258
- * Opera version number or 0. Example: 9.2
259
- * @property opera
260
- * @type float
261
- */
262
- opera:0,
263
-
264
- /**
265
- * Gecko engine revision number. Will evaluate to 1 if Gecko
266
- * is detected but the revision could not be found. Other browsers
267
- * will be 0. Example: 1.8
268
- * <pre>
269
- * Firefox 1.0.0.4: 1.7.8 <-- Reports 1.7
270
- * Firefox 1.5.0.9: 1.8.0.9 <-- Reports 1.8
271
- * Firefox 2.0.0.3: 1.8.1.3 <-- Reports 1.8
272
- * Firefox 3 alpha: 1.9a4 <-- Reports 1.9
273
- * </pre>
274
- * @property gecko
275
- * @type float
276
- */
277
- gecko:0,
278
-
279
- /**
280
- * AppleWebKit version. KHTML browsers that are not WebKit browsers
281
- * will evaluate to 1, other browsers 0. Example: 418.9.1
282
- * <pre>
283
- * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the
284
- * latest available for Mac OSX 10.3.
285
- * Safari 2.0.2: 416 <-- hasOwnProperty introduced
286
- * Safari 2.0.4: 418 <-- preventDefault fixed
287
- * Safari 2.0.4 (419.3): 418.9.1 <-- One version of Safari may run
288
- * different versions of webkit
289
- * Safari 2.0.4 (419.3): 419 <-- Tiger installations that have been
290
- * updated, but not updated
291
- * to the latest patch.
292
- * Webkit 212 nightly: 522+ <-- Safari 3.0 precursor (with native SVG
293
- * and many major issues fixed).
294
- * 3.x yahoo.com, flickr:422 <-- Safari 3.x hacks the user agent
295
- * string when hitting yahoo.com and
296
- * flickr.com.
297
- * Safari 3.0.4 (523.12):523.12 <-- First Tiger release - automatic update
298
- * from 2.x via the 10.4.11 OS patch
299
- * Webkit nightly 1/2008:525+ <-- Supports DOMContentLoaded event.
300
- * yahoo.com user agent hack removed.
301
- *
302
- * </pre>
303
- * http://developer.apple.com/internet/safari/uamatrix.html
304
- * @property webkit
305
- * @type float
306
- */
307
- webkit: 0,
308
-
309
- /**
310
- * The mobile property will be set to a string containing any relevant
311
- * user agent information when a modern mobile browser is detected.
312
- * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series
313
- * devices with the WebKit-based browser, and Opera Mini.
314
- * @property mobile
315
- * @type string
316
- */
317
- mobile: null,
318
-
319
- /**
320
- * Adobe AIR version number or 0. Only populated if webkit is detected.
321
- * Example: 1.0
322
- * @property air
323
- * @type float
324
- */
325
- air: 0,
326
-
327
- /**
328
- * Google Caja version number or 0.
329
- * @property caja
330
- * @type float
331
- */
332
- caja: 0
333
-
334
- },
335
-
336
- ua = navigator.userAgent,
337
-
338
- m;
339
-
340
- // Modern KHTML browsers should qualify as Safari X-Grade
341
- if ((/KHTML/).test(ua)) {
342
- o.webkit=1;
343
- }
344
- // Modern WebKit browsers are at least X-Grade
345
- m=ua.match(/AppleWebKit\/([^\s]*)/);
346
- if (m&&m[1]) {
347
- o.webkit=parseFloat(m[1]);
348
-
349
- // Mobile browser check
350
- if (/ Mobile\//.test(ua)) {
351
- o.mobile = "Apple"; // iPhone or iPod Touch
352
- } else {
353
- m=ua.match(/NokiaN[^\/]*/);
354
- if (m) {
355
- o.mobile = m[0]; // Nokia N-series, ex: NokiaN95
356
- }
357
- }
358
-
359
- m=ua.match(/AdobeAIR\/([^\s]*)/);
360
- if (m) {
361
- o.air = m[0]; // Adobe AIR 1.0 or better
362
- }
363
-
364
- }
365
-
366
- if (!o.webkit) { // not webkit
367
- // @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr)
368
- m=ua.match(/Opera[\s\/]([^\s]*)/);
369
- if (m&&m[1]) {
370
- o.opera=parseFloat(m[1]);
371
- m=ua.match(/Opera Mini[^;]*/);
372
- if (m) {
373
- o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316
374
- }
375
- } else { // not opera or webkit
376
- m=ua.match(/MSIE\s([^;]*)/);
377
- if (m&&m[1]) {
378
- o.ie=parseFloat(m[1]);
379
- } else { // not opera, webkit, or ie
380
- m=ua.match(/Gecko\/([^\s]*)/);
381
- if (m) {
382
- o.gecko=1; // Gecko detected, look for revision
383
- m=ua.match(/rv:([^\s\)]*)/);
384
- if (m&&m[1]) {
385
- o.gecko=parseFloat(m[1]);
386
- }
387
- }
388
- }
389
- }
390
- }
391
-
392
- m=ua.match(/Caja\/([^\s]*)/);
393
- if (m&&m[1]) {
394
- o.caja=parseFloat(m[1]);
395
- }
396
-
397
- return o;
398
- }();
399
-
400
- /*
401
- * Initializes the global by creating the default namespaces and applying
402
- * any new configuration information that is detected. This is the setup
403
- * for env.
404
- * @method init
405
- * @static
406
- * @private
407
- */
408
- (function() {
409
- YAHOO.namespace("util", "widget", "example");
410
- /*global YAHOO_config*/
411
- if ("undefined" !== typeof YAHOO_config) {
412
- var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;
413
- if (l) {
414
- // if YAHOO is loaded multiple times we need to check to see if
415
- // this is a new config object. If it is, add the new component
416
- // load listener to the stack
417
- for (i=0;i<ls.length;i=i+1) {
418
- if (ls[i]==l) {
419
- unique=false;
420
- break;
421
- }
422
- }
423
- if (unique) {
424
- ls.push(l);
425
- }
426
- }
427
- }
428
- })();
429
- /**
430
- * Provides the language utilites and extensions used by the library
431
- * @class YAHOO.lang
432
- */
433
- YAHOO.lang = YAHOO.lang || {};
434
-
435
- (function() {
436
-
437
-
438
- var L = YAHOO.lang,
439
-
440
- ARRAY_TOSTRING = '[object Array]',
441
- FUNCTION_TOSTRING = '[object Function]',
442
- OP = Object.prototype,
443
-
444
- // ADD = ["toString", "valueOf", "hasOwnProperty"],
445
- ADD = ["toString", "valueOf"],
446
-
447
- OB = {
448
-
449
- /**
450
- * Determines wheather or not the provided object is an array.
451
- * @method isArray
452
- * @param {any} o The object being testing
453
- * @return {boolean} the result
454
- */
455
- isArray: function(o) {
456
- return OP.toString.apply(o) === ARRAY_TOSTRING;
457
- },
458
-
459
- /**
460
- * Determines whether or not the provided object is a boolean
461
- * @method isBoolean
462
- * @param {any} o The object being testing
463
- * @return {boolean} the result
464
- */
465
- isBoolean: function(o) {
466
- return typeof o === 'boolean';
467
- },
468
-
469
- /**
470
- * Determines whether or not the provided object is a function.
471
- * Note: Internet Explorer thinks certain functions are objects:
472
- *
473
- * var obj = document.createElement("object");
474
- * YAHOO.lang.isFunction(obj.getAttribute) // reports false in IE
475
- *
476
- * var input = document.createElement("input"); // append to body
477
- * YAHOO.lang.isFunction(input.focus) // reports false in IE
478
- *
479
- * You will have to implement additional tests if these functions
480
- * matter to you.
481
- *
482
- * @method isFunction
483
- * @param {any} o The object being testing
484
- * @return {boolean} the result
485
- */
486
- isFunction: function(o) {
487
- return OP.toString.apply(o) === FUNCTION_TOSTRING;
488
- },
489
-
490
- /**
491
- * Determines whether or not the provided object is null
492
- * @method isNull
493
- * @param {any} o The object being testing
494
- * @return {boolean} the result
495
- */
496
- isNull: function(o) {
497
- return o === null;
498
- },
499
-
500
- /**
501
- * Determines whether or not the provided object is a legal number
502
- * @method isNumber
503
- * @param {any} o The object being testing
504
- * @return {boolean} the result
505
- */
506
- isNumber: function(o) {
507
- return typeof o === 'number' && isFinite(o);
508
- },
509
-
510
- /**
511
- * Determines whether or not the provided object is of type object
512
- * or function
513
- * @method isObject
514
- * @param {any} o The object being testing
515
- * @return {boolean} the result
516
- */
517
- isObject: function(o) {
518
- return (o && (typeof o === 'object' || L.isFunction(o))) || false;
519
- },
520
-
521
- /**
522
- * Determines whether or not the provided object is a string
523
- * @method isString
524
- * @param {any} o The object being testing
525
- * @return {boolean} the result
526
- */
527
- isString: function(o) {
528
- return typeof o === 'string';
529
- },
530
-
531
- /**
532
- * Determines whether or not the provided object is undefined
533
- * @method isUndefined
534
- * @param {any} o The object being testing
535
- * @return {boolean} the result
536
- */
537
- isUndefined: function(o) {
538
- return typeof o === 'undefined';
539
- },
540
-
541
-
542
- /**
543
- * IE will not enumerate native functions in a derived object even if the
544
- * function was overridden. This is a workaround for specific functions
545
- * we care about on the Object prototype.
546
- * @property _IEEnumFix
547
- * @param {Function} r the object to receive the augmentation
548
- * @param {Function} s the object that supplies the properties to augment
549
- * @static
550
- * @private
551
- */
552
- _IEEnumFix: (YAHOO.env.ua.ie) ? function(r, s) {
553
- var i, fname, f;
554
- for (i=0;i<ADD.length;i=i+1) {
555
-
556
- fname = ADD[i];
557
- f = s[fname];
558
-
559
- if (L.isFunction(f) && f!=OP[fname]) {
560
- r[fname]=f;
561
- }
562
- }
563
- } : function(){},
564
-
565
- /**
566
- * Utility to set up the prototype, constructor and superclass properties to
567
- * support an inheritance strategy that can chain constructors and methods.
568
- * Static members will not be inherited.
569
- *
570
- * @method extend
571
- * @static
572
- * @param {Function} subc the object to modify
573
- * @param {Function} superc the object to inherit
574
- * @param {Object} overrides additional properties/methods to add to the
575
- * subclass prototype. These will override the
576
- * matching items obtained from the superclass
577
- * if present.
578
- */
579
- extend: function(subc, superc, overrides) {
580
- if (!superc||!subc) {
581
- throw new Error("extend failed, please check that " +
582
- "all dependencies are included.");
583
- }
584
- var F = function() {}, i;
585
- F.prototype=superc.prototype;
586
- subc.prototype=new F();
587
- subc.prototype.constructor=subc;
588
- subc.superclass=superc.prototype;
589
- if (superc.prototype.constructor == OP.constructor) {
590
- superc.prototype.constructor=superc;
591
- }
592
-
593
- if (overrides) {
594
- for (i in overrides) {
595
- if (L.hasOwnProperty(overrides, i)) {
596
- subc.prototype[i]=overrides[i];
597
- }
598
- }
599
-
600
- L._IEEnumFix(subc.prototype, overrides);
601
- }
602
- },
603
-
604
- /**
605
- * Applies all properties in the supplier to the receiver if the
606
- * receiver does not have these properties yet. Optionally, one or
607
- * more methods/properties can be specified (as additional
608
- * parameters). This option will overwrite the property if receiver
609
- * has it already. If true is passed as the third parameter, all
610
- * properties will be applied and _will_ overwrite properties in
611
- * the receiver.
612
- *
613
- * @method augmentObject
614
- * @static
615
- * @since 2.3.0
616
- * @param {Function} r the object to receive the augmentation
617
- * @param {Function} s the object that supplies the properties to augment
618
- * @param {String*|boolean} arguments zero or more properties methods
619
- * to augment the receiver with. If none specified, everything
620
- * in the supplier will be used unless it would
621
- * overwrite an existing property in the receiver. If true
622
- * is specified as the third parameter, all properties will
623
- * be applied and will overwrite an existing property in
624
- * the receiver
625
- */
626
- augmentObject: function(r, s) {
627
- if (!s||!r) {
628
- throw new Error("Absorb failed, verify dependencies.");
629
- }
630
- var a=arguments, i, p, overrideList=a[2];
631
- if (overrideList && overrideList!==true) { // only absorb the specified properties
632
- for (i=2; i<a.length; i=i+1) {
633
- r[a[i]] = s[a[i]];
634
- }
635
- } else { // take everything, overwriting only if the third parameter is true
636
- for (p in s) {
637
- if (overrideList || !(p in r)) {
638
- r[p] = s[p];
639
- }
640
- }
641
-
642
- L._IEEnumFix(r, s);
643
- }
644
- },
645
-
646
- /**
647
- * Same as YAHOO.lang.augmentObject, except it only applies prototype properties
648
- * @see YAHOO.lang.augmentObject
649
- * @method augmentProto
650
- * @static
651
- * @param {Function} r the object to receive the augmentation
652
- * @param {Function} s the object that supplies the properties to augment
653
- * @param {String*|boolean} arguments zero or more properties methods
654
- * to augment the receiver with. If none specified, everything
655
- * in the supplier will be used unless it would overwrite an existing
656
- * property in the receiver. if true is specified as the third
657
- * parameter, all properties will be applied and will overwrite an
658
- * existing property in the receiver
659
- */
660
- augmentProto: function(r, s) {
661
- if (!s||!r) {
662
- throw new Error("Augment failed, verify dependencies.");
663
- }
664
- //var a=[].concat(arguments);
665
- var a=[r.prototype,s.prototype], i;
666
- for (i=2;i<arguments.length;i=i+1) {
667
- a.push(arguments[i]);
668
- }
669
- L.augmentObject.apply(this, a);
670
- },
671
-
672
-
673
- /**
674
- * Returns a simple string representation of the object or array.
675
- * Other types of objects will be returned unprocessed. Arrays
676
- * are expected to be indexed. Use object notation for
677
- * associative arrays.
678
- * @method dump
679
- * @since 2.3.0
680
- * @param o {Object} The object to dump
681
- * @param d {int} How deep to recurse child objects, default 3
682
- * @return {String} the dump result
683
- */
684
- dump: function(o, d) {
685
- var i,len,s=[],OBJ="{...}",FUN="f(){...}",
686
- COMMA=', ', ARROW=' => ';
687
-
688
- // Cast non-objects to string
689
- // Skip dates because the std toString is what we want
690
- // Skip HTMLElement-like objects because trying to dump
691
- // an element will cause an unhandled exception in FF 2.x
692
- if (!L.isObject(o)) {
693
- return o + "";
694
- } else if (o instanceof Date || ("nodeType" in o && "tagName" in o)) {
695
- return o;
696
- } else if (L.isFunction(o)) {
697
- return FUN;
698
- }
699
-
700
- // dig into child objects the depth specifed. Default 3
701
- d = (L.isNumber(d)) ? d : 3;
702
-
703
- // arrays [1, 2, 3]
704
- if (L.isArray(o)) {
705
- s.push("[");
706
- for (i=0,len=o.length;i<len;i=i+1) {
707
- if (L.isObject(o[i])) {
708
- s.push((d > 0) ? L.dump(o[i], d-1) : OBJ);
709
- } else {
710
- s.push(o[i]);
711
- }
712
- s.push(COMMA);
713
- }
714
- if (s.length > 1) {
715
- s.pop();
716
- }
717
- s.push("]");
718
- // objects {k1 => v1, k2 => v2}
719
- } else {
720
- s.push("{");
721
- for (i in o) {
722
- if (L.hasOwnProperty(o, i)) {
723
- s.push(i + ARROW);
724
- if (L.isObject(o[i])) {
725
- s.push((d > 0) ? L.dump(o[i], d-1) : OBJ);
726
- } else {
727
- s.push(o[i]);
728
- }
729
- s.push(COMMA);
730
- }
731
- }
732
- if (s.length > 1) {
733
- s.pop();
734
- }
735
- s.push("}");
736
- }
737
-
738
- return s.join("");
739
- },
740
-
741
- /**
742
- * Does variable substitution on a string. It scans through the string
743
- * looking for expressions enclosed in { } braces. If an expression
744
- * is found, it is used a key on the object. If there is a space in
745
- * the key, the first word is used for the key and the rest is provided
746
- * to an optional function to be used to programatically determine the
747
- * value (the extra information might be used for this decision). If
748
- * the value for the key in the object, or what is returned from the
749
- * function has a string value, number value, or object value, it is
750
- * substituted for the bracket expression and it repeats. If this
751
- * value is an object, it uses the Object's toString() if this has
752
- * been overridden, otherwise it does a shallow dump of the key/value
753
- * pairs.
754
- * @method substitute
755
- * @since 2.3.0
756
- * @param s {String} The string that will be modified.
757
- * @param o {Object} An object containing the replacement values
758
- * @param f {Function} An optional function that can be used to
759
- * process each match. It receives the key,
760
- * value, and any extra metadata included with
761
- * the key inside of the braces.
762
- * @return {String} the substituted string
763
- */
764
- substitute: function (s, o, f) {
765
- var i, j, k, key, v, meta, saved=[], token,
766
- DUMP='dump', SPACE=' ', LBRACE='{', RBRACE='}',
767
- dump;
768
-
769
-
770
- for (;;) {
771
- i = s.lastIndexOf(LBRACE);
772
- if (i < 0) {
773
- break;
774
- }
775
- j = s.indexOf(RBRACE, i);
776
- if (i + 1 >= j) {
777
- break;
778
- }
779
-
780
- //Extract key and meta info
781
- token = s.substring(i + 1, j);
782
- key = token;
783
- meta = null;
784
- k = key.indexOf(SPACE);
785
- if (k > -1) {
786
- meta = key.substring(k + 1);
787
- key = key.substring(0, k);
788
- }
789
-
790
- // lookup the value
791
- v = o[key];
792
-
793
- // if a substitution function was provided, execute it
794
- if (f) {
795
- v = f(key, v, meta);
796
- }
797
-
798
- if (L.isObject(v)) {
799
- if (L.isArray(v)) {
800
- v = L.dump(v, parseInt(meta, 10));
801
- } else {
802
- meta = meta || "";
803
-
804
- // look for the keyword 'dump', if found force obj dump
805
- dump = meta.indexOf(DUMP);
806
- if (dump > -1) {
807
- meta = meta.substring(4);
808
- }
809
-
810
- // use the toString if it is not the Object toString
811
- // and the 'dump' meta info was not found
812
- if (v.toString===OP.toString || dump>-1) {
813
- v = L.dump(v, parseInt(meta, 10));
814
- } else {
815
- v = v.toString();
816
- }
817
- }
818
- } else if (!L.isString(v) && !L.isNumber(v)) {
819
- // This {block} has no replace string. Save it for later.
820
- v = "~-" + saved.length + "-~";
821
- saved[saved.length] = token;
822
-
823
- // break;
824
- }
825
-
826
- s = s.substring(0, i) + v + s.substring(j + 1);
827
-
828
-
829
- }
830
-
831
- // restore saved {block}s
832
- for (i=saved.length-1; i>=0; i=i-1) {
833
- s = s.replace(new RegExp("~-" + i + "-~"), "{" + saved[i] + "}", "g");
834
- }
835
-
836
- return s;
837
- },
838
-
839
-
840
- /**
841
- * Returns a string without any leading or trailing whitespace. If
842
- * the input is not a string, the input will be returned untouched.
843
- * @method trim
844
- * @since 2.3.0
845
- * @param s {string} the string to trim
846
- * @return {string} the trimmed string
847
- */
848
- trim: function(s){
849
- try {
850
- return s.replace(/^\s+|\s+$/g, "");
851
- } catch(e) {
852
- return s;
853
- }
854
- },
855
-
856
- /**
857
- * Returns a new object containing all of the properties of
858
- * all the supplied objects. The properties from later objects
859
- * will overwrite those in earlier objects.
860
- * @method merge
861
- * @since 2.3.0
862
- * @param arguments {Object*} the objects to merge
863
- * @return the new merged object
864
- */
865
- merge: function() {
866
- var o={}, a=arguments, l=a.length, i;
867
- for (i=0; i<l; i=i+1) {
868
- L.augmentObject(o, a[i], true);
869
- }
870
- return o;
871
- },
872
-
873
- /**
874
- * Executes the supplied function in the context of the supplied
875
- * object 'when' milliseconds later. Executes the function a
876
- * single time unless periodic is set to true.
877
- * @method later
878
- * @since 2.4.0
879
- * @param when {int} the number of milliseconds to wait until the fn
880
- * is executed
881
- * @param o the context object
882
- * @param fn {Function|String} the function to execute or the name of
883
- * the method in the 'o' object to execute
884
- * @param data [Array] data that is provided to the function. This accepts
885
- * either a single item or an array. If an array is provided, the
886
- * function is executed with one parameter for each array item. If
887
- * you need to pass a single array parameter, it needs to be wrapped in
888
- * an array [myarray]
889
- * @param periodic {boolean} if true, executes continuously at supplied
890
- * interval until canceled
891
- * @return a timer object. Call the cancel() method on this object to
892
- * stop the timer.
893
- */
894
- later: function(when, o, fn, data, periodic) {
895
- when = when || 0;
896
- o = o || {};
897
- var m=fn, d=data, f, r;
898
-
899
- if (L.isString(fn)) {
900
- m = o[fn];
901
- }
902
-
903
- if (!m) {
904
- throw new TypeError("method undefined");
905
- }
906
-
907
- if (!L.isArray(d)) {
908
- d = [data];
909
- }
910
-
911
- f = function() {
912
- m.apply(o, d);
913
- };
914
-
915
- r = (periodic) ? setInterval(f, when) : setTimeout(f, when);
916
-
917
- return {
918
- interval: periodic,
919
- cancel: function() {
920
- if (this.interval) {
921
- clearInterval(r);
922
- } else {
923
- clearTimeout(r);
924
- }
925
- }
926
- };
927
- },
928
-
929
- /**
930
- * A convenience method for detecting a legitimate non-null value.
931
- * Returns false for null/undefined/NaN, true for other values,
932
- * including 0/false/''
933
- * @method isValue
934
- * @since 2.3.0
935
- * @param o {any} the item to test
936
- * @return {boolean} true if it is not null/undefined/NaN || false
937
- */
938
- isValue: function(o) {
939
- // return (o || o === false || o === 0 || o === ''); // Infinity fails
940
- return (L.isObject(o) || L.isString(o) || L.isNumber(o) || L.isBoolean(o));
941
- }
942
-
943
- };
944
-
945
- /**
946
- * Determines whether or not the property was added
947
- * to the object instance. Returns false if the property is not present
948
- * in the object, or was inherited from the prototype.
949
- * This abstraction is provided to enable hasOwnProperty for Safari 1.3.x.
950
- * There is a discrepancy between YAHOO.lang.hasOwnProperty and
951
- * Object.prototype.hasOwnProperty when the property is a primitive added to
952
- * both the instance AND prototype with the same value:
953
- * <pre>
954
- * var A = function() {};
955
- * A.prototype.foo = 'foo';
956
- * var a = new A();
957
- * a.foo = 'foo';
958
- * alert(a.hasOwnProperty('foo')); // true
959
- * alert(YAHOO.lang.hasOwnProperty(a, 'foo')); // false when using fallback
960
- * </pre>
961
- * @method hasOwnProperty
962
- * @param {any} o The object being testing
963
- * @param prop {string} the name of the property to test
964
- * @return {boolean} the result
965
- */
966
- L.hasOwnProperty = (OP.hasOwnProperty) ?
967
- function(o, prop) {
968
- return o && o.hasOwnProperty(prop);
969
- } : function(o, prop) {
970
- return !L.isUndefined(o[prop]) &&
971
- o.constructor.prototype[prop] !== o[prop];
972
- };
973
-
974
- // new lang wins
975
- OB.augmentObject(L, OB, true);
976
-
977
- /*
978
- * An alias for <a href="YAHOO.lang.html">YAHOO.lang</a>
979
- * @class YAHOO.util.Lang
980
- */
981
- YAHOO.util.Lang = L;
982
-
983
- /**
984
- * Same as YAHOO.lang.augmentObject, except it only applies prototype
985
- * properties. This is an alias for augmentProto.
986
- * @see YAHOO.lang.augmentObject
987
- * @method augment
988
- * @static
989
- * @param {Function} r the object to receive the augmentation
990
- * @param {Function} s the object that supplies the properties to augment
991
- * @param {String*|boolean} arguments zero or more properties methods to
992
- * augment the receiver with. If none specified, everything
993
- * in the supplier will be used unless it would
994
- * overwrite an existing property in the receiver. if true
995
- * is specified as the third parameter, all properties will
996
- * be applied and will overwrite an existing property in
997
- * the receiver
998
- */
999
- L.augment = L.augmentProto;
1000
-
1001
- /**
1002
- * An alias for <a href="YAHOO.lang.html#augment">YAHOO.lang.augment</a>
1003
- * @for YAHOO
1004
- * @method augment
1005
- * @static
1006
- * @param {Function} r the object to receive the augmentation
1007
- * @param {Function} s the object that supplies the properties to augment
1008
- * @param {String*} arguments zero or more properties methods to
1009
- * augment the receiver with. If none specified, everything
1010
- * in the supplier will be used unless it would
1011
- * overwrite an existing property in the receiver
1012
- */
1013
- YAHOO.augment = L.augmentProto;
1014
-
1015
- /**
1016
- * An alias for <a href="YAHOO.lang.html#extend">YAHOO.lang.extend</a>
1017
- * @method extend
1018
- * @static
1019
- * @param {Function} subc the object to modify
1020
- * @param {Function} superc the object to inherit
1021
- * @param {Object} overrides additional properties/methods to add to the
1022
- * subclass prototype. These will override the
1023
- * matching items obtained from the superclass if present.
1024
- */
1025
- YAHOO.extend = L.extend;
1026
-
1027
- })();
1028
- YAHOO.register("yahoo", YAHOO, {version: "2.7.0", build: "1796"});