fog-maestrodev 1.15.0.20130927082724 → 1.18.0.20131111203459

Sign up to get free protection for your applications and to get access to all the features.
Files changed (872) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +0 -1
  3. data/.travis.yml +6 -0
  4. data/Gemfile.1.8.7 +1 -0
  5. data/README.md +27 -1
  6. data/Rakefile +18 -0
  7. data/changelog.txt +1112 -0
  8. data/fog.gemspec +8 -8
  9. data/lib/fog/atmos/models/storage/file.rb +10 -8
  10. data/lib/fog/atmos/models/storage/files.rb +5 -0
  11. data/lib/fog/atmos/storage.rb +5 -1
  12. data/lib/fog/aws/auto_scaling.rb +0 -1
  13. data/lib/fog/aws/cloud_formation.rb +0 -1
  14. data/lib/fog/aws/cloud_watch.rb +0 -1
  15. data/lib/fog/aws/compute.rb +1 -3
  16. data/lib/fog/aws/data_pipeline.rb +0 -1
  17. data/lib/fog/aws/elb.rb +2 -1
  18. data/lib/fog/aws/iam.rb +7 -2
  19. data/lib/fog/aws/models/auto_scaling/group.rb +2 -2
  20. data/lib/fog/aws/models/compute/route_table.rb +1 -1
  21. data/lib/fog/aws/models/compute/server.rb +16 -1
  22. data/lib/fog/aws/models/compute/spot_request.rb +1 -1
  23. data/lib/fog/aws/models/elb/load_balancer.rb +10 -0
  24. data/lib/fog/aws/models/iam/access_key.rb +5 -1
  25. data/lib/fog/aws/models/iam/access_keys.rb +0 -1
  26. data/lib/fog/aws/parsers/compute/describe_internet_gateways.rb +1 -1
  27. data/lib/fog/aws/parsers/compute/describe_reserved_instances.rb +2 -1
  28. data/lib/fog/aws/parsers/compute/run_instances.rb +2 -0
  29. data/lib/fog/aws/parsers/elb/describe_load_balancer_attributes.rb +40 -0
  30. data/lib/fog/aws/parsers/iam/get_group_policy.rb +10 -4
  31. data/lib/fog/aws/parsers/storage/get_bucket_tagging.rb +37 -0
  32. data/lib/fog/aws/rds.rb +0 -1
  33. data/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb +5 -4
  34. data/lib/fog/aws/requests/compute/copy_image.rb +1 -1
  35. data/lib/fog/aws/requests/compute/create_internet_gateway.rb +5 -4
  36. data/lib/fog/aws/requests/compute/create_tags.rb +2 -0
  37. data/lib/fog/aws/requests/compute/create_volume.rb +1 -1
  38. data/lib/fog/aws/requests/compute/delete_internet_gateway.rb +1 -1
  39. data/lib/fog/aws/requests/compute/describe_internet_gateways.rb +1 -1
  40. data/lib/fog/aws/requests/compute/describe_reserved_instances.rb +1 -0
  41. data/lib/fog/aws/requests/compute/purchase_reserved_instances_offering.rb +1 -0
  42. data/lib/fog/aws/requests/compute/run_instances.rb +2 -1
  43. data/lib/fog/aws/requests/elb/create_load_balancer.rb +1 -0
  44. data/lib/fog/aws/requests/elb/describe_load_balancer_attributes.rb +54 -0
  45. data/lib/fog/aws/requests/elb/modify_load_balancer_attributes.rb +59 -0
  46. data/lib/fog/aws/requests/iam/create_access_key.rb +22 -15
  47. data/lib/fog/aws/requests/iam/get_group_policy.rb +18 -1
  48. data/lib/fog/aws/requests/iam/get_user_policy.rb +4 -4
  49. data/lib/fog/aws/requests/iam/list_access_keys.rb +15 -11
  50. data/lib/fog/aws/requests/iam/put_group_policy.rb +17 -1
  51. data/lib/fog/aws/requests/iam/put_user_policy.rb +1 -1
  52. data/lib/fog/aws/requests/iam/update_access_key.rb +22 -0
  53. data/lib/fog/aws/requests/storage/delete_bucket_tagging.rb +46 -0
  54. data/lib/fog/aws/requests/storage/get_bucket_tagging.rb +53 -0
  55. data/lib/fog/aws/requests/storage/post_object_restore.rb +1 -1
  56. data/lib/fog/aws/requests/storage/put_bucket_tagging.rb +60 -0
  57. data/lib/fog/aws/simpledb.rb +0 -1
  58. data/lib/fog/aws/sqs.rb +2 -0
  59. data/lib/fog/aws/storage.rb +41 -20
  60. data/lib/fog/aws.rb +11 -3
  61. data/lib/fog/bin/hp.rb +17 -0
  62. data/lib/fog/bin/rackspace.rb +4 -0
  63. data/lib/fog/brightbox/models/compute/load_balancer.rb +53 -2
  64. data/lib/fog/cloudstack/models/compute/server.rb +1 -0
  65. data/lib/fog/compute.rb +13 -2
  66. data/lib/fog/core/class_from_string.rb +26 -0
  67. data/lib/fog/core/logger.rb +4 -5
  68. data/lib/fog/core/service.rb +1 -1
  69. data/lib/fog/core/uuid.rb +23 -0
  70. data/lib/fog/core.rb +2 -0
  71. data/lib/fog/dynect/dns.rb +1 -1
  72. data/lib/fog/ecloud/compute.rb +8 -3
  73. data/lib/fog/ecloud/models/compute/admin_organization.rb +4 -4
  74. data/lib/fog/ecloud/models/compute/catalog_item.rb +1 -1
  75. data/lib/fog/ecloud/models/compute/compute_pool.rb +8 -8
  76. data/lib/fog/ecloud/models/compute/environment.rb +15 -15
  77. data/lib/fog/ecloud/models/compute/firewall_acl.rb +1 -1
  78. data/lib/fog/ecloud/models/compute/internet_service.rb +1 -1
  79. data/lib/fog/ecloud/models/compute/internet_services.rb +1 -1
  80. data/lib/fog/ecloud/models/compute/location.rb +1 -1
  81. data/lib/fog/ecloud/models/compute/monitor.rb +1 -1
  82. data/lib/fog/ecloud/models/compute/network.rb +1 -1
  83. data/lib/fog/ecloud/models/compute/node.rb +1 -1
  84. data/lib/fog/ecloud/models/compute/nodes.rb +1 -1
  85. data/lib/fog/ecloud/models/compute/organization.rb +10 -10
  86. data/lib/fog/ecloud/models/compute/row.rb +1 -1
  87. data/lib/fog/ecloud/models/compute/rows.rb +1 -1
  88. data/lib/fog/ecloud/models/compute/server.rb +9 -9
  89. data/lib/fog/ecloud/models/compute/templates.rb +3 -1
  90. data/lib/fog/ecloud/models/compute/user.rb +2 -2
  91. data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ip.rb +1 -1
  92. data/lib/fog/ecloud/requests/compute/get_virtual_machine_assigned_ips.rb +1 -1
  93. data/lib/fog/google/README.md +2 -2
  94. data/lib/fog/google/compute.rb +695 -45
  95. data/lib/fog/google/examples/bootstrap.rb +1 -1
  96. data/lib/fog/google/examples/create.rb +1 -0
  97. data/lib/fog/google/examples/get_list_images.rb +1 -2
  98. data/lib/fog/google/examples/network.rb +2 -0
  99. data/lib/fog/google/models/compute/disk.rb +25 -1
  100. data/lib/fog/google/models/compute/disks.rb +9 -2
  101. data/lib/fog/google/models/compute/server.rb +8 -2
  102. data/lib/fog/google/models/compute/servers.rb +1 -1
  103. data/lib/fog/google/models/compute/snapshot.rb +1 -0
  104. data/lib/fog/google/models/compute/zone.rb +25 -0
  105. data/lib/fog/google/models/compute/zones.rb +27 -0
  106. data/lib/fog/google/requests/compute/delete_server.rb +40 -13
  107. data/lib/fog/google/requests/compute/get_image.rb +15 -2
  108. data/lib/fog/google/requests/compute/get_machine_type.rb +16 -1
  109. data/lib/fog/google/requests/compute/get_server.rb +46 -2
  110. data/lib/fog/google/requests/compute/get_zone.rb +14 -1
  111. data/lib/fog/google/requests/compute/insert_server.rb +80 -8
  112. data/lib/fog/google/requests/compute/insert_snapshot.rb +49 -0
  113. data/lib/fog/google/requests/compute/list_images.rb +8 -2
  114. data/lib/fog/google/requests/compute/list_machine_types.rb +9 -2
  115. data/lib/fog/google/requests/compute/list_servers.rb +10 -2
  116. data/lib/fog/google/requests/compute/list_zones.rb +7 -1
  117. data/lib/fog/google/storage.rb +54 -29
  118. data/lib/fog/hp/CHANGELOG.hp +33 -0
  119. data/lib/fog/hp/block_storage.rb +9 -4
  120. data/lib/fog/hp/block_storage_v2.rb +164 -0
  121. data/lib/fog/hp/cdn.rb +7 -3
  122. data/lib/fog/hp/compute.rb +9 -5
  123. data/lib/fog/hp/compute_v2.rb +312 -0
  124. data/lib/fog/hp/dns.rb +135 -0
  125. data/lib/fog/hp/lb.rb +170 -0
  126. data/lib/fog/hp/models/block_storage_v2/snapshot.rb +76 -0
  127. data/lib/fog/hp/models/block_storage_v2/snapshots.rb +43 -0
  128. data/lib/fog/hp/models/block_storage_v2/volume.rb +139 -0
  129. data/lib/fog/hp/models/block_storage_v2/volume_backup.rb +58 -0
  130. data/lib/fog/hp/models/block_storage_v2/volume_backups.rb +42 -0
  131. data/lib/fog/hp/models/block_storage_v2/volumes.rb +42 -0
  132. data/lib/fog/hp/models/compute/image.rb +1 -1
  133. data/lib/fog/hp/models/compute/server.rb +41 -20
  134. data/lib/fog/hp/models/compute_v2/address.rb +70 -0
  135. data/lib/fog/hp/models/compute_v2/addresses.rb +29 -0
  136. data/lib/fog/hp/models/compute_v2/availability_zone.rb +22 -0
  137. data/lib/fog/hp/models/compute_v2/availability_zones.rb +29 -0
  138. data/lib/fog/hp/models/compute_v2/flavor.rb +22 -0
  139. data/lib/fog/hp/models/compute_v2/flavors.rb +42 -0
  140. data/lib/fog/hp/models/compute_v2/image.rb +87 -0
  141. data/lib/fog/hp/models/compute_v2/images.rb +43 -0
  142. data/lib/fog/hp/models/compute_v2/key_pair.rb +54 -0
  143. data/lib/fog/hp/models/compute_v2/key_pairs.rb +31 -0
  144. data/lib/fog/hp/models/compute_v2/meta.rb +29 -0
  145. data/lib/fog/hp/models/compute_v2/meta_parent.rb +33 -0
  146. data/lib/fog/hp/models/compute_v2/metadata.rb +79 -0
  147. data/lib/fog/hp/models/compute_v2/server.rb +339 -0
  148. data/lib/fog/hp/models/compute_v2/servers.rb +56 -0
  149. data/lib/fog/hp/models/compute_v2/volume_attachment.rb +42 -0
  150. data/lib/fog/hp/models/compute_v2/volume_attachments.rb +30 -0
  151. data/lib/fog/hp/models/dns/domain.rb +55 -0
  152. data/lib/fog/hp/models/dns/domains.rb +28 -0
  153. data/lib/fog/hp/models/dns/record.rb +59 -0
  154. data/lib/fog/hp/models/dns/records.rb +32 -0
  155. data/lib/fog/hp/models/lb/algorithm.rb +24 -0
  156. data/lib/fog/hp/models/lb/algorithms.rb +26 -0
  157. data/lib/fog/hp/models/lb/load_balancer.rb +83 -0
  158. data/lib/fog/hp/models/lb/load_balancers.rb +26 -0
  159. data/lib/fog/hp/models/lb/node.rb +53 -0
  160. data/lib/fog/hp/models/lb/nodes.rb +30 -0
  161. data/lib/fog/hp/models/lb/protocol.rb +25 -0
  162. data/lib/fog/hp/models/lb/protocols.rb +26 -0
  163. data/lib/fog/hp/models/lb/virtual_ip.rb +34 -0
  164. data/lib/fog/hp/models/lb/virtual_ips.rb +33 -0
  165. data/lib/fog/hp/models/network/floating_ip.rb +45 -0
  166. data/lib/fog/hp/models/network/floating_ips.rb +36 -0
  167. data/lib/fog/hp/models/network/network.rb +56 -0
  168. data/lib/fog/hp/models/network/networks.rb +36 -0
  169. data/lib/fog/hp/models/network/port.rb +54 -0
  170. data/lib/fog/hp/models/network/ports.rb +36 -0
  171. data/lib/fog/hp/models/network/router.rb +66 -0
  172. data/lib/fog/hp/models/network/routers.rb +36 -0
  173. data/lib/fog/hp/models/network/security_group.rb +30 -0
  174. data/lib/fog/hp/models/network/security_group_rule.rb +35 -0
  175. data/lib/fog/hp/models/network/security_group_rules.rb +36 -0
  176. data/lib/fog/hp/models/network/security_groups.rb +36 -0
  177. data/lib/fog/hp/models/network/subnet.rb +49 -0
  178. data/lib/fog/hp/models/network/subnets.rb +36 -0
  179. data/lib/fog/hp/models/storage/directories.rb +1 -1
  180. data/lib/fog/hp/models/storage/directory.rb +41 -8
  181. data/lib/fog/hp/models/storage/file.rb +12 -0
  182. data/lib/fog/hp/models/storage/files.rb +23 -1
  183. data/lib/fog/hp/models/storage/meta.rb +29 -0
  184. data/lib/fog/hp/models/storage/meta_parent.rb +23 -0
  185. data/lib/fog/hp/models/storage/metadata.rb +82 -0
  186. data/lib/fog/hp/network.rb +198 -0
  187. data/lib/fog/hp/requests/block_storage_v2/create_snapshot.rb +76 -0
  188. data/lib/fog/hp/requests/block_storage_v2/create_volume.rb +90 -0
  189. data/lib/fog/hp/requests/block_storage_v2/create_volume_backup.rb +83 -0
  190. data/lib/fog/hp/requests/block_storage_v2/delete_snapshot.rb +38 -0
  191. data/lib/fog/hp/requests/block_storage_v2/delete_volume.rb +38 -0
  192. data/lib/fog/hp/requests/block_storage_v2/delete_volume_backup.rb +38 -0
  193. data/lib/fog/hp/requests/block_storage_v2/get_snapshot_details.rb +54 -0
  194. data/lib/fog/hp/requests/block_storage_v2/get_volume_backup_details.rb +55 -0
  195. data/lib/fog/hp/requests/block_storage_v2/get_volume_details.rb +58 -0
  196. data/lib/fog/hp/requests/block_storage_v2/list_snapshots.rb +57 -0
  197. data/lib/fog/hp/requests/block_storage_v2/list_snapshots_detail.rb +54 -0
  198. data/lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb +52 -0
  199. data/lib/fog/hp/requests/block_storage_v2/list_volume_backups_detail.rb +58 -0
  200. data/lib/fog/hp/requests/block_storage_v2/list_volumes.rb +61 -0
  201. data/lib/fog/hp/requests/block_storage_v2/list_volumes_detail.rb +59 -0
  202. data/lib/fog/hp/requests/block_storage_v2/restore_volume_backup.rb +97 -0
  203. data/lib/fog/hp/requests/block_storage_v2/update_snapshot.rb +69 -0
  204. data/lib/fog/hp/requests/block_storage_v2/update_volume.rb +70 -0
  205. data/lib/fog/hp/requests/compute/get_console_output.rb +0 -2
  206. data/lib/fog/hp/requests/compute/get_vnc_console.rb +45 -0
  207. data/lib/fog/hp/requests/compute_v2/add_security_group.rb +40 -0
  208. data/lib/fog/hp/requests/compute_v2/allocate_address.rb +53 -0
  209. data/lib/fog/hp/requests/compute_v2/associate_address.rb +46 -0
  210. data/lib/fog/hp/requests/compute_v2/attach_volume.rb +80 -0
  211. data/lib/fog/hp/requests/compute_v2/create_image.rb +63 -0
  212. data/lib/fog/hp/requests/compute_v2/create_key_pair.rb +73 -0
  213. data/lib/fog/hp/requests/compute_v2/create_persistent_server.rb +183 -0
  214. data/lib/fog/hp/requests/compute_v2/create_server.rb +168 -0
  215. data/lib/fog/hp/requests/compute_v2/delete_image.rb +44 -0
  216. data/lib/fog/hp/requests/compute_v2/delete_key_pair.rb +38 -0
  217. data/lib/fog/hp/requests/compute_v2/delete_meta.rb +55 -0
  218. data/lib/fog/hp/requests/compute_v2/delete_server.rb +43 -0
  219. data/lib/fog/hp/requests/compute_v2/detach_volume.rb +47 -0
  220. data/lib/fog/hp/requests/compute_v2/disassociate_address.rb +39 -0
  221. data/lib/fog/hp/requests/compute_v2/get_address.rb +48 -0
  222. data/lib/fog/hp/requests/compute_v2/get_console_output.rb +41 -0
  223. data/lib/fog/hp/requests/compute_v2/get_flavor_details.rb +57 -0
  224. data/lib/fog/hp/requests/compute_v2/get_image_details.rb +55 -0
  225. data/lib/fog/hp/requests/compute_v2/get_key_pair.rb +44 -0
  226. data/lib/fog/hp/requests/compute_v2/get_meta.rb +57 -0
  227. data/lib/fog/hp/requests/compute_v2/get_server_details.rb +72 -0
  228. data/lib/fog/hp/requests/compute_v2/get_server_volume_details.rb +47 -0
  229. data/lib/fog/hp/requests/compute_v2/get_vnc_console.rb +45 -0
  230. data/lib/fog/hp/requests/compute_v2/get_windows_password.rb +43 -0
  231. data/lib/fog/hp/requests/compute_v2/list_addresses.rb +44 -0
  232. data/lib/fog/hp/requests/compute_v2/list_availability_zones.rb +47 -0
  233. data/lib/fog/hp/requests/compute_v2/list_flavors.rb +53 -0
  234. data/lib/fog/hp/requests/compute_v2/list_flavors_detail.rb +53 -0
  235. data/lib/fog/hp/requests/compute_v2/list_images.rb +52 -0
  236. data/lib/fog/hp/requests/compute_v2/list_images_detail.rb +66 -0
  237. data/lib/fog/hp/requests/compute_v2/list_key_pairs.rb +42 -0
  238. data/lib/fog/hp/requests/compute_v2/list_limits.rb +62 -0
  239. data/lib/fog/hp/requests/compute_v2/list_metadata.rb +56 -0
  240. data/lib/fog/hp/requests/compute_v2/list_server_addresses.rb +42 -0
  241. data/lib/fog/hp/requests/compute_v2/list_server_addresses_by_network.rb +46 -0
  242. data/lib/fog/hp/requests/compute_v2/list_server_volumes.rb +49 -0
  243. data/lib/fog/hp/requests/compute_v2/list_servers.rb +53 -0
  244. data/lib/fog/hp/requests/compute_v2/list_servers_detail.rb +80 -0
  245. data/lib/fog/hp/requests/compute_v2/reboot_server.rb +34 -0
  246. data/lib/fog/hp/requests/compute_v2/rebuild_server.rb +82 -0
  247. data/lib/fog/hp/requests/compute_v2/release_address.rb +38 -0
  248. data/lib/fog/hp/requests/compute_v2/remove_security_group.rb +37 -0
  249. data/lib/fog/hp/requests/compute_v2/server_action.rb +25 -0
  250. data/lib/fog/hp/requests/compute_v2/set_metadata.rb +60 -0
  251. data/lib/fog/hp/requests/compute_v2/update_meta.rb +61 -0
  252. data/lib/fog/hp/requests/compute_v2/update_metadata.rb +60 -0
  253. data/lib/fog/hp/requests/compute_v2/update_server.rb +73 -0
  254. data/lib/fog/hp/requests/dns/create_domain.rb +66 -0
  255. data/lib/fog/hp/requests/dns/create_record.rb +79 -0
  256. data/lib/fog/hp/requests/dns/delete_domain.rb +37 -0
  257. data/lib/fog/hp/requests/dns/delete_record.rb +36 -0
  258. data/lib/fog/hp/requests/dns/get_domain.rb +43 -0
  259. data/lib/fog/hp/requests/dns/get_record.rb +47 -0
  260. data/lib/fog/hp/requests/dns/get_servers_hosting_domain.rb +62 -0
  261. data/lib/fog/hp/requests/dns/list_domains.rb +38 -0
  262. data/lib/fog/hp/requests/dns/list_records_in_a_domain.rb +55 -0
  263. data/lib/fog/hp/requests/dns/update_domain.rb +62 -0
  264. data/lib/fog/hp/requests/dns/update_record.rb +70 -0
  265. data/lib/fog/hp/requests/lb/create_load_balancer.rb +110 -0
  266. data/lib/fog/hp/requests/lb/create_load_balancer_node.rb +72 -0
  267. data/lib/fog/hp/requests/lb/delete_load_balancer.rb +36 -0
  268. data/lib/fog/hp/requests/lb/delete_load_balancer_node.rb +47 -0
  269. data/lib/fog/hp/requests/lb/get_load_balancer.rb +60 -0
  270. data/lib/fog/hp/requests/lb/get_load_balancer_node.rb +54 -0
  271. data/lib/fog/hp/requests/lb/list_algorithms.rb +32 -0
  272. data/lib/fog/hp/requests/lb/list_limits.rb +40 -0
  273. data/lib/fog/hp/requests/lb/list_load_balancer_nodes.rb +41 -0
  274. data/lib/fog/hp/requests/lb/list_load_balancer_virtual_ips.rb +44 -0
  275. data/lib/fog/hp/requests/lb/list_load_balancers.rb +41 -0
  276. data/lib/fog/hp/requests/lb/list_protocols.rb +34 -0
  277. data/lib/fog/hp/requests/lb/list_versions.rb +27 -0
  278. data/lib/fog/hp/requests/lb/update_load_balancer.rb +47 -0
  279. data/lib/fog/hp/requests/lb/update_load_balancer_node.rb +59 -0
  280. data/lib/fog/hp/requests/network/add_router_interface.rb +75 -0
  281. data/lib/fog/hp/requests/network/associate_floating_ip.rb +71 -0
  282. data/lib/fog/hp/requests/network/create_floating_ip.rb +69 -0
  283. data/lib/fog/hp/requests/network/create_network.rb +68 -0
  284. data/lib/fog/hp/requests/network/create_port.rb +92 -0
  285. data/lib/fog/hp/requests/network/create_router.rb +64 -0
  286. data/lib/fog/hp/requests/network/create_security_group.rb +100 -0
  287. data/lib/fog/hp/requests/network/create_security_group_rule.rb +83 -0
  288. data/lib/fog/hp/requests/network/create_subnet.rb +97 -0
  289. data/lib/fog/hp/requests/network/delete_floating_ip.rb +34 -0
  290. data/lib/fog/hp/requests/network/delete_network.rb +34 -0
  291. data/lib/fog/hp/requests/network/delete_port.rb +34 -0
  292. data/lib/fog/hp/requests/network/delete_router.rb +34 -0
  293. data/lib/fog/hp/requests/network/delete_security_group.rb +36 -0
  294. data/lib/fog/hp/requests/network/delete_security_group_rule.rb +36 -0
  295. data/lib/fog/hp/requests/network/delete_subnet.rb +34 -0
  296. data/lib/fog/hp/requests/network/disassociate_floating_ip.rb +71 -0
  297. data/lib/fog/hp/requests/network/get_floating_ip.rb +47 -0
  298. data/lib/fog/hp/requests/network/get_network.rb +49 -0
  299. data/lib/fog/hp/requests/network/get_port.rb +53 -0
  300. data/lib/fog/hp/requests/network/get_router.rb +46 -0
  301. data/lib/fog/hp/requests/network/get_security_group.rb +56 -0
  302. data/lib/fog/hp/requests/network/get_security_group_rule.rb +51 -0
  303. data/lib/fog/hp/requests/network/get_subnet.rb +52 -0
  304. data/lib/fog/hp/requests/network/list_floating_ips.rb +46 -0
  305. data/lib/fog/hp/requests/network/list_networks.rb +48 -0
  306. data/lib/fog/hp/requests/network/list_ports.rb +52 -0
  307. data/lib/fog/hp/requests/network/list_routers.rb +45 -0
  308. data/lib/fog/hp/requests/network/list_security_group_rules.rb +52 -0
  309. data/lib/fog/hp/requests/network/list_security_groups.rb +57 -0
  310. data/lib/fog/hp/requests/network/list_subnets.rb +51 -0
  311. data/lib/fog/hp/requests/network/remove_router_interface.rb +67 -0
  312. data/lib/fog/hp/requests/network/update_network.rb +62 -0
  313. data/lib/fog/hp/requests/network/update_port.rb +75 -0
  314. data/lib/fog/hp/requests/network/update_router.rb +62 -0
  315. data/lib/fog/hp/requests/network/update_subnet.rb +72 -0
  316. data/lib/fog/hp/requests/storage/post_container.rb +38 -0
  317. data/lib/fog/hp/requests/storage/post_object.rb +56 -0
  318. data/lib/fog/hp/simple_http_instrumentor.rb +59 -0
  319. data/lib/fog/hp/storage.rb +79 -23
  320. data/lib/fog/hp.rb +108 -23
  321. data/lib/fog/internet_archive/models/storage/file.rb +1 -1
  322. data/lib/fog/internet_archive/requests/storage/head_object.rb +2 -2
  323. data/lib/fog/linode/compute.rb +1 -1
  324. data/lib/fog/linode/dns.rb +1 -1
  325. data/lib/fog/local/models/storage/directories.rb +8 -4
  326. data/lib/fog/openstack/compute.rb +1 -2
  327. data/lib/fog/openstack/examples/compute/basics.rb +74 -0
  328. data/lib/fog/openstack/identity.rb +2 -3
  329. data/lib/fog/openstack/image.rb +1 -2
  330. data/lib/fog/openstack/metering.rb +0 -1
  331. data/lib/fog/openstack/models/compute/host.rb +4 -1
  332. data/lib/fog/openstack/models/compute/server.rb +1 -1
  333. data/lib/fog/openstack/models/network/floating_ip.rb +1 -1
  334. data/lib/fog/openstack/models/storage/file.rb +14 -0
  335. data/lib/fog/openstack/models/storage/files.rb +10 -0
  336. data/lib/fog/openstack/models/volume/volume_type.rb +20 -0
  337. data/lib/fog/openstack/models/volume/volume_types.rb +26 -0
  338. data/lib/fog/openstack/models/volume/volumes.rb +5 -2
  339. data/lib/fog/openstack/network.rb +0 -1
  340. data/lib/fog/openstack/orchestration.rb +4 -3
  341. data/lib/fog/openstack/requests/compute/create_server.rb +5 -6
  342. data/lib/fog/openstack/requests/network/create_floating_ip.rb +1 -4
  343. data/lib/fog/openstack/requests/orchestration/create_stack.rb +5 -2
  344. data/lib/fog/openstack/requests/orchestration/delete_stack.rb +2 -1
  345. data/lib/fog/openstack/requests/orchestration/list_stacks.rb +1 -0
  346. data/lib/fog/openstack/requests/orchestration/update_stack.rb +5 -5
  347. data/lib/fog/openstack/requests/storage/delete_multiple_objects.rb +67 -0
  348. data/lib/fog/openstack/requests/storage/delete_static_large_object.rb +43 -0
  349. data/lib/fog/openstack/requests/storage/get_object_https_url.rb +44 -6
  350. data/lib/fog/openstack/requests/storage/put_dynamic_obj_manifest.rb +43 -0
  351. data/lib/fog/openstack/requests/storage/put_object.rb +13 -4
  352. data/lib/fog/openstack/requests/storage/put_object_manifest.rb +3 -25
  353. data/lib/fog/openstack/requests/storage/put_static_obj_manifest.rb +57 -0
  354. data/lib/fog/openstack/requests/volume/get_volume_type_details.rb +32 -0
  355. data/lib/fog/openstack/requests/volume/list_volume_types.rb +41 -0
  356. data/lib/fog/openstack/requests/volume/list_volumes.rb +4 -4
  357. data/lib/fog/openstack/storage.rb +5 -1
  358. data/lib/fog/openstack/volume.rb +6 -2
  359. data/lib/fog/openstack.rb +0 -4
  360. data/lib/fog/rackspace/auto_scale.rb +4 -0
  361. data/lib/fog/rackspace/block_storage.rb +0 -2
  362. data/lib/fog/rackspace/compute.rb +1 -4
  363. data/lib/fog/rackspace/docs/auto_scale.md +501 -0
  364. data/lib/fog/rackspace/docs/compute_v2.md +2 -2
  365. data/lib/fog/rackspace/docs/getting_started.md +1 -0
  366. data/lib/fog/rackspace/docs/storage.md +1 -1
  367. data/lib/fog/rackspace/examples/auto_scale/add_policy.rb +68 -0
  368. data/lib/fog/rackspace/examples/auto_scale/add_webhook.rb +74 -0
  369. data/lib/fog/rackspace/examples/auto_scale/create_scaling_group.rb +115 -0
  370. data/lib/fog/rackspace/examples/auto_scale/delete_policy.rb +71 -0
  371. data/lib/fog/rackspace/examples/auto_scale/delete_scaling_group.rb +61 -0
  372. data/lib/fog/rackspace/examples/auto_scale/delete_webhook.rb +91 -0
  373. data/lib/fog/rackspace/examples/compute_v2/create_image.rb +1 -1
  374. data/lib/fog/rackspace/examples/compute_v2/delete_image.rb +1 -1
  375. data/lib/fog/rackspace/examples/compute_v2/delete_server.rb +1 -1
  376. data/lib/fog/rackspace/examples/compute_v2/detach_volume.rb +2 -2
  377. data/lib/fog/rackspace/examples/compute_v2/resize_server.rb +1 -1
  378. data/lib/fog/rackspace/examples/compute_v2/server_attachments.rb +1 -1
  379. data/lib/fog/rackspace/examples/storage/create_cdn_directory.rb +1 -1
  380. data/lib/fog/rackspace/examples/storage/delete_directory.rb +1 -1
  381. data/lib/fog/rackspace/examples/storage/delete_file.rb +1 -1
  382. data/lib/fog/rackspace/examples/storage/download_file.rb +1 -1
  383. data/lib/fog/rackspace/models/auto_scale/group.rb +3 -3
  384. data/lib/fog/rackspace/models/auto_scale/group_builder.rb +85 -0
  385. data/lib/fog/rackspace/models/auto_scale/group_config.rb +22 -3
  386. data/lib/fog/rackspace/models/auto_scale/groups.rb +3 -3
  387. data/lib/fog/rackspace/models/auto_scale/launch_config.rb +22 -2
  388. data/lib/fog/rackspace/models/auto_scale/policies.rb +5 -3
  389. data/lib/fog/rackspace/models/auto_scale/policy.rb +78 -62
  390. data/lib/fog/rackspace/models/auto_scale/webhook.rb +40 -27
  391. data/lib/fog/rackspace/models/auto_scale/webhooks.rb +8 -9
  392. data/lib/fog/rackspace/models/compute_v2/images.rb +1 -1
  393. data/lib/fog/rackspace/models/compute_v2/metadata.rb +2 -3
  394. data/lib/fog/rackspace/models/compute_v2/server.rb +11 -10
  395. data/lib/fog/rackspace/models/compute_v2/servers.rb +1 -1
  396. data/lib/fog/rackspace/models/identity/service_catalog.rb +44 -59
  397. data/lib/fog/rackspace/models/queues/claim.rb +92 -0
  398. data/lib/fog/rackspace/models/queues/claims.rb +40 -0
  399. data/lib/fog/rackspace/models/queues/message.rb +51 -0
  400. data/lib/fog/rackspace/models/queues/messages.rb +54 -0
  401. data/lib/fog/rackspace/models/queues/queue.rb +73 -0
  402. data/lib/fog/rackspace/models/queues/queues.rb +32 -0
  403. data/lib/fog/rackspace/models/storage/file.rb +26 -0
  404. data/lib/fog/rackspace/models/storage/files.rb +25 -0
  405. data/lib/fog/rackspace/monitoring.rb +20 -1
  406. data/lib/fog/rackspace/queues.rb +117 -0
  407. data/lib/fog/rackspace/requests/auto_scale/resume_group_state.rb +5 -6
  408. data/lib/fog/rackspace/requests/block_storage/create_volume.rb +1 -1
  409. data/lib/fog/rackspace/requests/compute_v2/delete_image.rb +1 -1
  410. data/lib/fog/rackspace/requests/compute_v2/list_metadata.rb +1 -1
  411. data/lib/fog/rackspace/requests/compute_v2/list_servers.rb +1 -1
  412. data/lib/fog/rackspace/requests/compute_v2/resize_server.rb +1 -1
  413. data/lib/fog/rackspace/requests/compute_v2/set_metadata.rb +1 -1
  414. data/lib/fog/rackspace/requests/compute_v2/set_metadata_item.rb +1 -1
  415. data/lib/fog/rackspace/requests/compute_v2/update_metadata.rb +1 -1
  416. data/lib/fog/rackspace/requests/databases/create_database.rb +2 -2
  417. data/lib/fog/rackspace/requests/databases/create_instance.rb +3 -1
  418. data/lib/fog/rackspace/requests/databases/create_user.rb +1 -1
  419. data/lib/fog/rackspace/requests/monitoring/get_monitoring_zone.rb +15 -0
  420. data/lib/fog/rackspace/requests/monitoring/list_monitoring_zones.rb +15 -0
  421. data/lib/fog/rackspace/requests/queues/create_claim.rb +24 -0
  422. data/lib/fog/rackspace/requests/queues/create_message.rb +21 -0
  423. data/lib/fog/rackspace/requests/queues/create_queue.rb +16 -0
  424. data/lib/fog/rackspace/requests/queues/delete_claim.rb +15 -0
  425. data/lib/fog/rackspace/requests/queues/delete_message.rb +18 -0
  426. data/lib/fog/rackspace/requests/queues/delete_queue.rb +15 -0
  427. data/lib/fog/rackspace/requests/queues/get_claim.rb +15 -0
  428. data/lib/fog/rackspace/requests/queues/get_message.rb +16 -0
  429. data/lib/fog/rackspace/requests/queues/get_queue.rb +15 -0
  430. data/lib/fog/rackspace/requests/queues/get_queue_stats.rb +15 -0
  431. data/lib/fog/rackspace/requests/queues/list_messages.rb +17 -0
  432. data/lib/fog/rackspace/requests/queues/list_queues.rb +15 -0
  433. data/lib/fog/rackspace/requests/queues/update_claim.rb +19 -0
  434. data/lib/fog/rackspace/requests/storage/get_object_http_url.rb +30 -0
  435. data/lib/fog/rackspace/requests/storage/get_object_https_url.rb +2 -1
  436. data/lib/fog/rackspace/requests/storage/put_object.rb +6 -1
  437. data/lib/fog/rackspace/service.rb +11 -3
  438. data/lib/fog/rackspace/storage.rb +2 -4
  439. data/lib/fog/rackspace.rb +6 -3
  440. data/lib/fog/vcloud_director/README.md +8 -22
  441. data/lib/fog/vcloud_director/compute.rb +417 -101
  442. data/lib/fog/vcloud_director/generators/compute/customization.rb +64 -59
  443. data/lib/fog/vcloud_director/generators/compute/disks.rb +81 -70
  444. data/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb +159 -0
  445. data/lib/fog/vcloud_director/generators/compute/metadata.rb +40 -41
  446. data/lib/fog/vcloud_director/generators/compute/vm_network.rb +55 -58
  447. data/lib/fog/vcloud_director/models/compute/catalog_item.rb +1 -0
  448. data/lib/fog/vcloud_director/models/compute/catalog_items.rb +4 -2
  449. data/lib/fog/vcloud_director/models/compute/disk.rb +2 -2
  450. data/lib/fog/vcloud_director/models/compute/disks.rb +1 -1
  451. data/lib/fog/vcloud_director/models/compute/media.rb +29 -0
  452. data/lib/fog/vcloud_director/models/compute/medias.rb +77 -0
  453. data/lib/fog/vcloud_director/models/compute/organizations.rb +1 -1
  454. data/lib/fog/vcloud_director/models/compute/tag.rb +2 -4
  455. data/lib/fog/vcloud_director/models/compute/tags.rb +8 -16
  456. data/lib/fog/vcloud_director/models/compute/task.rb +15 -14
  457. data/lib/fog/vcloud_director/models/compute/tasks.rb +2 -3
  458. data/lib/fog/vcloud_director/models/compute/vapp.rb +92 -6
  459. data/lib/fog/vcloud_director/models/compute/vapps.rb +1 -1
  460. data/lib/fog/vcloud_director/models/compute/vdc.rb +5 -0
  461. data/lib/fog/vcloud_director/models/compute/vm.rb +80 -6
  462. data/lib/fog/vcloud_director/models/compute/vm_customization.rb +3 -2
  463. data/lib/fog/vcloud_director/models/compute/vm_network.rb +1 -1
  464. data/lib/fog/vcloud_director/parsers/compute/metadata.rb +26 -29
  465. data/lib/fog/vcloud_director/parsers/compute/network.rb +60 -62
  466. data/lib/fog/vcloud_director/parsers/compute/vm_customization.rb +1 -1
  467. data/lib/fog/vcloud_director/parsers/compute/vm_network.rb +60 -62
  468. data/lib/fog/vcloud_director/requests/compute/delete_catalog_item.rb +22 -0
  469. data/lib/fog/vcloud_director/requests/compute/delete_catalog_item_metadata_item_metadata.rb +25 -0
  470. data/lib/fog/vcloud_director/requests/compute/delete_disk.rb +60 -0
  471. data/lib/fog/vcloud_director/requests/compute/delete_disk_metadata_item_metadata.rb +25 -0
  472. data/lib/fog/vcloud_director/requests/compute/delete_logout.rb +18 -0
  473. data/lib/fog/vcloud_director/requests/compute/delete_media.rb +122 -0
  474. data/lib/fog/vcloud_director/requests/compute/delete_media_metadata_item_metadata.rb +25 -0
  475. data/lib/fog/vcloud_director/requests/compute/delete_shadow_vm.rb +30 -0
  476. data/lib/fog/vcloud_director/requests/compute/delete_vapp.rb +18 -9
  477. data/lib/fog/vcloud_director/requests/compute/delete_vapp_metadata_item_metadata.rb +30 -0
  478. data/lib/fog/vcloud_director/requests/compute/delete_vapp_template.rb +27 -0
  479. data/lib/fog/vcloud_director/requests/compute/delete_vapp_template_metadata_item_metadata.rb +26 -0
  480. data/lib/fog/vcloud_director/requests/compute/get_allocated_ip_addresses.rb +25 -0
  481. data/lib/fog/vcloud_director/requests/compute/get_catalog.rb +31 -7
  482. data/lib/fog/vcloud_director/requests/compute/get_catalog_item.rb +14 -7
  483. data/lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata.rb +25 -0
  484. data/lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata_item_metadata.rb +26 -0
  485. data/lib/fog/vcloud_director/requests/compute/get_catalog_metadata.rb +25 -0
  486. data/lib/fog/vcloud_director/requests/compute/get_catalog_metadata_item_metadata.rb +26 -0
  487. data/lib/fog/vcloud_director/requests/compute/get_catalogs_from_query.rb +94 -0
  488. data/lib/fog/vcloud_director/requests/compute/get_control_access_params_catalog.rb +26 -0
  489. data/lib/fog/vcloud_director/requests/compute/get_control_access_params_vapp.rb +25 -0
  490. data/lib/fog/vcloud_director/requests/compute/get_cpu_rasd_item.rb +28 -0
  491. data/lib/fog/vcloud_director/requests/compute/get_current_session.rb +31 -23
  492. data/lib/fog/vcloud_director/requests/compute/get_disk.rb +123 -0
  493. data/lib/fog/vcloud_director/requests/compute/get_disk_metadata.rb +25 -0
  494. data/lib/fog/vcloud_director/requests/compute/get_disk_metadata_item_metadata.rb +26 -0
  495. data/lib/fog/vcloud_director/requests/compute/get_disk_owner.rb +70 -0
  496. data/lib/fog/vcloud_director/requests/compute/get_disks_from_query.rb +94 -0
  497. data/lib/fog/vcloud_director/requests/compute/get_disks_rasd_items_list.rb +26 -0
  498. data/lib/fog/vcloud_director/requests/compute/get_edge_gateway.rb +109 -0
  499. data/lib/fog/vcloud_director/requests/compute/get_entity.rb +38 -0
  500. data/lib/fog/vcloud_director/requests/compute/get_execute_query.rb +462 -0
  501. data/lib/fog/vcloud_director/requests/compute/get_groups_from_query.rb +95 -0
  502. data/lib/fog/vcloud_director/requests/compute/get_guest_customization_system_section_vapp.rb +25 -0
  503. data/lib/fog/vcloud_director/requests/compute/get_guest_customization_system_section_vapp_template.rb +25 -0
  504. data/lib/fog/vcloud_director/requests/compute/get_href.rb +4 -2
  505. data/lib/fog/vcloud_director/requests/compute/get_lease_settings_section_vapp.rb +25 -0
  506. data/lib/fog/vcloud_director/requests/compute/get_lease_settings_section_vapp_template.rb +25 -0
  507. data/lib/fog/vcloud_director/requests/compute/get_media.rb +111 -0
  508. data/lib/fog/vcloud_director/requests/compute/get_media_drives_rasd_items_list.rb +26 -0
  509. data/lib/fog/vcloud_director/requests/compute/get_media_metadata.rb +25 -0
  510. data/lib/fog/vcloud_director/requests/compute/get_media_metadata_item_metadata.rb +26 -0
  511. data/lib/fog/vcloud_director/requests/compute/get_media_owner.rb +70 -0
  512. data/lib/fog/vcloud_director/requests/compute/get_medias_from_query.rb +94 -0
  513. data/lib/fog/vcloud_director/requests/compute/get_memory_rasd_item.rb +28 -0
  514. data/lib/fog/vcloud_director/requests/compute/get_metadata.rb +17 -7
  515. data/lib/fog/vcloud_director/requests/compute/get_network.rb +49 -7
  516. data/lib/fog/vcloud_director/requests/compute/get_network_cards_items_list.rb +25 -0
  517. data/lib/fog/vcloud_director/requests/compute/get_network_config_section_vapp.rb +25 -0
  518. data/lib/fog/vcloud_director/requests/compute/get_network_config_section_vapp_template.rb +25 -0
  519. data/lib/fog/vcloud_director/requests/compute/get_network_connection_system_section_vapp.rb +25 -0
  520. data/lib/fog/vcloud_director/requests/compute/get_network_connection_system_section_vapp_template.rb +25 -0
  521. data/lib/fog/vcloud_director/requests/compute/get_network_metadata.rb +25 -0
  522. data/lib/fog/vcloud_director/requests/compute/get_network_metadata_item_metadata.rb +26 -0
  523. data/lib/fog/vcloud_director/requests/compute/get_network_section_vapp.rb +25 -0
  524. data/lib/fog/vcloud_director/requests/compute/get_network_section_vapp_template.rb +25 -0
  525. data/lib/fog/vcloud_director/requests/compute/get_operating_system_section.rb +25 -0
  526. data/lib/fog/vcloud_director/requests/compute/get_org_settings.rb +38 -0
  527. data/lib/fog/vcloud_director/requests/compute/get_org_vdc_gateways.rb +83 -0
  528. data/lib/fog/vcloud_director/requests/compute/get_organization.rb +70 -42
  529. data/lib/fog/vcloud_director/requests/compute/get_organization_metadata.rb +25 -0
  530. data/lib/fog/vcloud_director/requests/compute/get_organization_metadata_item_metadata.rb +28 -0
  531. data/lib/fog/vcloud_director/requests/compute/get_organizations.rb +28 -13
  532. data/lib/fog/vcloud_director/requests/compute/get_organizations_from_query.rb +95 -0
  533. data/lib/fog/vcloud_director/requests/compute/get_product_sections_vapp.rb +25 -0
  534. data/lib/fog/vcloud_director/requests/compute/get_product_sections_vapp_template.rb +26 -0
  535. data/lib/fog/vcloud_director/requests/compute/get_request.rb +7 -5
  536. data/lib/fog/vcloud_director/requests/compute/get_runtime_info_section_type.rb +25 -0
  537. data/lib/fog/vcloud_director/requests/compute/get_serial_ports_items_list.rb +25 -0
  538. data/lib/fog/vcloud_director/requests/compute/get_shadow_vm.rb +24 -0
  539. data/lib/fog/vcloud_director/requests/compute/get_snapshot_section.rb +25 -0
  540. data/lib/fog/vcloud_director/requests/compute/get_startup_section.rb +25 -0
  541. data/lib/fog/vcloud_director/requests/compute/get_supported_systems_info.rb +239 -0
  542. data/lib/fog/vcloud_director/requests/compute/get_supported_versions.rb +4 -5
  543. data/lib/fog/vcloud_director/requests/compute/get_task.rb +156 -6
  544. data/lib/fog/vcloud_director/requests/compute/get_task_list.rb +130 -0
  545. data/lib/fog/vcloud_director/requests/compute/get_thumbnail.rb +28 -0
  546. data/lib/fog/vcloud_director/requests/compute/get_users_from_query.rb +95 -0
  547. data/lib/fog/vcloud_director/requests/compute/get_vapp.rb +17 -8
  548. data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata.rb +25 -0
  549. data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata_item_metadata.rb +26 -0
  550. data/lib/fog/vcloud_director/requests/compute/get_vapp_ovf_descriptor.rb +24 -0
  551. data/lib/fog/vcloud_director/requests/compute/get_vapp_owner.rb +25 -0
  552. data/lib/fog/vcloud_director/requests/compute/get_vapp_template.rb +14 -7
  553. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_customization_system_section.rb +25 -0
  554. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata.rb +25 -0
  555. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata_item_metadata.rb +27 -0
  556. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_ovf_descriptor.rb +24 -0
  557. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_owner.rb +25 -0
  558. data/lib/fog/vcloud_director/requests/compute/get_vapp_templates_from_query.rb +95 -0
  559. data/lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb +94 -0
  560. data/lib/fog/vcloud_director/requests/compute/get_vcloud.rb +76 -0
  561. data/lib/fog/vcloud_director/requests/compute/get_vdc.rb +66 -62
  562. data/lib/fog/vcloud_director/requests/compute/get_vdc_metadata.rb +25 -0
  563. data/lib/fog/vcloud_director/requests/compute/get_vdc_metadata_item_metadata.rb +28 -0
  564. data/lib/fog/vcloud_director/requests/compute/get_vdc_storage_class.rb +83 -0
  565. data/lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata.rb +27 -0
  566. data/lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata_item_metadata.rb +25 -0
  567. data/lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb +94 -0
  568. data/lib/fog/vcloud_director/requests/compute/get_virtual_hardware_section.rb +29 -0
  569. data/lib/fog/vcloud_director/requests/compute/get_vm.rb +15 -7
  570. data/lib/fog/vcloud_director/requests/compute/get_vm_capabilities.rb +30 -0
  571. data/lib/fog/vcloud_director/requests/compute/get_vm_compliance_results.rb +24 -0
  572. data/lib/fog/vcloud_director/requests/compute/get_vm_customization.rb +18 -7
  573. data/lib/fog/vcloud_director/requests/compute/get_vm_disks.rb +18 -7
  574. data/lib/fog/vcloud_director/requests/compute/get_vm_network.rb +18 -7
  575. data/lib/fog/vcloud_director/requests/compute/get_vm_pending_question.rb +34 -0
  576. data/lib/fog/vcloud_director/requests/compute/get_vms.rb +15 -7
  577. data/lib/fog/vcloud_director/requests/compute/get_vms_by_metadata.rb +6 -5
  578. data/lib/fog/vcloud_director/requests/compute/get_vms_disk_attached_to.rb +39 -0
  579. data/lib/fog/vcloud_director/requests/compute/get_vms_in_lease_from_query.rb +95 -0
  580. data/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb +36 -63
  581. data/lib/fog/vcloud_director/requests/compute/post_acquire_ticket.rb +27 -0
  582. data/lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb +36 -0
  583. data/lib/fog/vcloud_director/requests/compute/post_attach_disk.rb +51 -0
  584. data/lib/fog/vcloud_director/requests/compute/post_cancel_task.rb +43 -0
  585. data/lib/fog/vcloud_director/requests/compute/post_capture_vapp.rb +46 -0
  586. data/lib/fog/vcloud_director/requests/compute/post_check_vm_compliance.rb +28 -0
  587. data/lib/fog/vcloud_director/requests/compute/post_clone_media.rb +102 -0
  588. data/lib/fog/vcloud_director/requests/compute/post_clone_vapp.rb +62 -0
  589. data/lib/fog/vcloud_director/requests/compute/post_clone_vapp_template.rb +52 -0
  590. data/lib/fog/vcloud_director/requests/compute/post_configure_edge_gateway_services.rb +70 -0
  591. data/lib/fog/vcloud_director/requests/compute/post_consolidate_vm_vapp.rb +27 -0
  592. data/lib/fog/vcloud_director/requests/compute/post_consolidate_vm_vapp_template.rb +27 -0
  593. data/lib/fog/vcloud_director/requests/compute/post_deploy_vapp.rb +51 -0
  594. data/lib/fog/vcloud_director/requests/compute/post_detach_disk.rb +39 -0
  595. data/lib/fog/vcloud_director/requests/compute/post_disable_nested_hv.rb +27 -0
  596. data/lib/fog/vcloud_director/requests/compute/post_disable_vapp_template_download.rb +24 -0
  597. data/lib/fog/vcloud_director/requests/compute/post_discard_vapp_state.rb +30 -0
  598. data/lib/fog/vcloud_director/requests/compute/post_eject_cd_rom.rb +39 -0
  599. data/lib/fog/vcloud_director/requests/compute/post_enable_nested_hv.rb +27 -0
  600. data/lib/fog/vcloud_director/requests/compute/post_enable_vapp_template_download.rb +24 -0
  601. data/lib/fog/vcloud_director/requests/compute/post_enter_maintenance_mode.rb +26 -0
  602. data/lib/fog/vcloud_director/requests/compute/post_exit_maintenance_mode.rb +22 -0
  603. data/lib/fog/vcloud_director/requests/compute/post_insert_cd_rom.rb +39 -0
  604. data/lib/fog/vcloud_director/requests/compute/post_install_vmware_tools.rb +27 -0
  605. data/lib/fog/vcloud_director/requests/compute/post_instantiate_vapp_template.rb +133 -0
  606. data/lib/fog/vcloud_director/requests/compute/post_login_session.rb +39 -0
  607. data/lib/fog/vcloud_director/requests/compute/post_power_off_vapp.rb +36 -0
  608. data/lib/fog/vcloud_director/requests/compute/post_power_on_vapp.rb +36 -0
  609. data/lib/fog/vcloud_director/requests/compute/post_reboot_vapp.rb +33 -0
  610. data/lib/fog/vcloud_director/requests/compute/post_remove_all_snapshots.rb +27 -0
  611. data/lib/fog/vcloud_director/requests/compute/post_reset_vapp.rb +33 -0
  612. data/lib/fog/vcloud_director/requests/compute/post_revert_snapshot.rb +27 -0
  613. data/lib/fog/vcloud_director/requests/compute/post_shutdown_vapp.rb +33 -0
  614. data/lib/fog/vcloud_director/requests/compute/post_suspend_vapp.rb +33 -0
  615. data/lib/fog/vcloud_director/requests/compute/post_undeploy_vapp.rb +66 -0
  616. data/lib/fog/vcloud_director/requests/compute/post_update_catalog_item_metadata.rb +52 -0
  617. data/lib/fog/vcloud_director/requests/compute/post_update_disk_metadata.rb +52 -0
  618. data/lib/fog/vcloud_director/requests/compute/post_update_media_metadata.rb +52 -0
  619. data/lib/fog/vcloud_director/requests/compute/post_update_vapp_metadata.rb +52 -0
  620. data/lib/fog/vcloud_director/requests/compute/post_update_vapp_template_metadata.rb +52 -0
  621. data/lib/fog/vcloud_director/requests/compute/post_upgrade_hw_version.rb +28 -0
  622. data/lib/fog/vcloud_director/requests/compute/post_upload_disk.rb +133 -0
  623. data/lib/fog/vcloud_director/requests/compute/post_upload_media.rb +120 -0
  624. data/lib/fog/vcloud_director/requests/compute/post_upload_vapp_template.rb +46 -0
  625. data/lib/fog/vcloud_director/requests/compute/put_catalog_item_metadata_item_metadata.rb +50 -0
  626. data/lib/fog/vcloud_director/requests/compute/put_cpu.rb +47 -0
  627. data/lib/fog/vcloud_director/requests/compute/put_disk_metadata_item_metadata.rb +46 -0
  628. data/lib/fog/vcloud_director/requests/compute/put_disks.rb +39 -0
  629. data/lib/fog/vcloud_director/requests/compute/put_guest_customization_section_vapp.rb +139 -0
  630. data/lib/fog/vcloud_director/requests/compute/put_media_metadata_item_metadata.rb +50 -0
  631. data/lib/fog/vcloud_director/requests/compute/put_memory.rb +47 -0
  632. data/lib/fog/vcloud_director/requests/compute/put_metadata_value.rb +4 -3
  633. data/lib/fog/vcloud_director/requests/compute/put_network_connection_system_section_vapp.rb +121 -0
  634. data/lib/fog/vcloud_director/requests/compute/put_vapp_metadata_item_metadata.rb +50 -0
  635. data/lib/fog/vcloud_director/requests/compute/put_vapp_template_metadata_item_metadata.rb +50 -0
  636. data/lib/fog/vcloud_director/requests/compute/put_vm_capabilities.rb +44 -0
  637. data/lib/fog/vcloud_director.rb +58 -2
  638. data/lib/fog/version.rb +1 -1
  639. data/lib/fog/vsphere/compute.rb +41 -15
  640. data/lib/fog/vsphere/models/compute/datacenter.rb +11 -6
  641. data/lib/fog/vsphere/models/compute/interface.rb +55 -3
  642. data/lib/fog/vsphere/models/compute/interfaces.rb +25 -10
  643. data/lib/fog/vsphere/models/compute/interfacetype.rb +26 -0
  644. data/lib/fog/vsphere/models/compute/interfacetypes.rb +40 -0
  645. data/lib/fog/vsphere/models/compute/scsicontroller.rb +19 -0
  646. data/lib/fog/vsphere/models/compute/server.rb +47 -16
  647. data/lib/fog/vsphere/models/compute/servertype.rb +39 -0
  648. data/lib/fog/vsphere/models/compute/servertypes.rb +29 -0
  649. data/lib/fog/vsphere/models/compute/volume.rb +59 -4
  650. data/lib/fog/vsphere/models/compute/volumes.rb +22 -7
  651. data/lib/fog/vsphere/requests/compute/create_vm.rb +46 -13
  652. data/lib/fog/vsphere/requests/compute/get_datacenter.rb +1 -1
  653. data/lib/fog/vsphere/requests/compute/get_interface_type.rb +15 -0
  654. data/lib/fog/vsphere/requests/compute/get_network.rb +2 -2
  655. data/lib/fog/vsphere/requests/compute/get_server_type.rb +32 -0
  656. data/lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb +26 -0
  657. data/lib/fog/vsphere/requests/compute/list_datacenters.rb +22 -3
  658. data/lib/fog/vsphere/requests/compute/list_interface_types.rb +25 -0
  659. data/lib/fog/vsphere/requests/compute/list_server_types.rb +55 -0
  660. data/lib/fog/vsphere/requests/compute/list_vm_volumes.rb +3 -1
  661. data/lib/fog/vsphere/requests/compute/modify_vm_interface.rb +9 -6
  662. data/lib/fog/vsphere/requests/compute/modify_vm_volume.rb +26 -0
  663. data/lib/fog/vsphere/requests/compute/vm_clone.rb +2 -9
  664. data/lib/fog/vsphere/requests/compute/vm_reconfig_cpus.rb +2 -2
  665. data/lib/fog/xenserver/requests/compute/create_server.rb +1 -1
  666. data/lib/tasks/changelog_task.rb +3 -0
  667. data/lib/tasks/test_task.rb +1 -0
  668. data/tests/aws/models/compute/server_tests.rb +21 -1
  669. data/tests/aws/models/elb/model_tests.rb +6 -0
  670. data/tests/aws/requests/compute/instance_tests.rb +2 -0
  671. data/tests/aws/requests/compute/internet_gateway_tests.rb +5 -0
  672. data/tests/aws/requests/compute/network_interface_tests.rb +17 -0
  673. data/tests/aws/requests/elb/load_balancer_tests.rb +6 -0
  674. data/tests/aws/requests/iam/group_policy_tests.rb +12 -6
  675. data/tests/aws/requests/storage/bucket_tests.rb +19 -3
  676. data/tests/aws/requests/storage/object_tests.rb +1 -0
  677. data/tests/aws/signed_params_tests.rb +1 -5
  678. data/tests/aws/storage_tests.rb +7 -0
  679. data/tests/brightbox/compute/schema.rb +1 -0
  680. data/tests/brightbox/requests/compute/interface_tests.rb +7 -19
  681. data/tests/compute/helper.rb +6 -4
  682. data/tests/core/credential_tests.rb +7 -1
  683. data/tests/core/parser_tests.rb +1 -1
  684. data/tests/core/uuid_tests.rb +10 -0
  685. data/tests/ecloud/compute/models/server_tests.rb +34 -41
  686. data/tests/helpers/mock_helper.rb +1 -0
  687. data/tests/hp/block_storage_tests.rb +47 -0
  688. data/tests/hp/cdn_tests.rb +23 -0
  689. data/tests/hp/compute_tests.rb +22 -0
  690. data/tests/hp/models/block_storage_v2/snapshot_tests.rb +22 -0
  691. data/tests/hp/models/block_storage_v2/snapshots_tests.rb +10 -0
  692. data/tests/hp/models/block_storage_v2/volume_backup_tests.rb +22 -0
  693. data/tests/hp/models/block_storage_v2/volume_backups_tests.rb +9 -0
  694. data/tests/hp/models/block_storage_v2/volume_tests.rb +22 -0
  695. data/tests/hp/models/block_storage_v2/volumes_tests.rb +5 -0
  696. data/tests/hp/models/compute_v2/address_tests.rb +23 -0
  697. data/tests/hp/models/compute_v2/addresses_tests.rb +7 -0
  698. data/tests/hp/models/compute_v2/availability_zone_tests.rb +13 -0
  699. data/tests/hp/models/compute_v2/availability_zones_tests.rb +13 -0
  700. data/tests/hp/models/compute_v2/key_pair_tests.rb +29 -0
  701. data/tests/hp/models/compute_v2/key_pairs_tests.rb +7 -0
  702. data/tests/hp/models/compute_v2/metadata_image_tests.rb +60 -0
  703. data/tests/hp/models/compute_v2/metadata_server_tests.rb +56 -0
  704. data/tests/hp/models/compute_v2/server_tests.rb +45 -0
  705. data/tests/hp/models/compute_v2/servers_tests.rb +9 -0
  706. data/tests/hp/models/compute_v2/volume_attachment_tests.rb +40 -0
  707. data/tests/hp/models/compute_v2/volume_attachments_tests.rb +17 -0
  708. data/tests/hp/models/dns/domain_tests.rb +25 -0
  709. data/tests/hp/models/dns/domains_tests.rb +14 -0
  710. data/tests/hp/models/dns/record_tests.rb +29 -0
  711. data/tests/hp/models/dns/records_tests.rb +9 -0
  712. data/tests/hp/models/lb/algorithms_tests.rb +15 -0
  713. data/tests/hp/models/lb/load_balancer_node_tests.rb +9 -0
  714. data/tests/hp/models/lb/load_balancer_nodes_tests.rb +27 -0
  715. data/tests/hp/models/lb/load_balancer_tests.rb +6 -0
  716. data/tests/hp/models/lb/load_balancer_virtual_ips_tests.rb +22 -0
  717. data/tests/hp/models/lb/load_balancers_tests.rb +22 -0
  718. data/tests/hp/models/lb/protocols_tests.rb +15 -0
  719. data/tests/hp/models/network/floating_ip_tests.rb +37 -0
  720. data/tests/hp/models/network/floating_ips_tests.rb +8 -0
  721. data/tests/hp/models/network/network_tests.rb +25 -0
  722. data/tests/hp/models/network/networks_tests.rb +15 -0
  723. data/tests/hp/models/network/port_tests.rb +30 -0
  724. data/tests/hp/models/network/ports_tests.rb +21 -0
  725. data/tests/hp/models/network/router_tests.rb +55 -0
  726. data/tests/hp/models/network/routers_tests.rb +19 -0
  727. data/tests/hp/models/network/security_group_rule_tests.rb +25 -0
  728. data/tests/hp/models/network/security_group_rules_tests.rb +23 -0
  729. data/tests/hp/models/network/security_group_tests.rb +20 -0
  730. data/tests/hp/models/network/security_groups_tests.rb +20 -0
  731. data/tests/hp/models/network/subnet_tests.rb +30 -0
  732. data/tests/hp/models/network/subnets_tests.rb +22 -0
  733. data/tests/hp/models/storage/directory_tests.rb +70 -0
  734. data/tests/hp/requests/block_storage_v2/snapshot_tests.rb +69 -0
  735. data/tests/hp/requests/block_storage_v2/volume_backup_tests.rb +117 -0
  736. data/tests/hp/requests/block_storage_v2/volume_tests.rb +106 -0
  737. data/tests/hp/requests/compute_v2/address_tests.rb +80 -0
  738. data/tests/hp/requests/compute_v2/availability_zone_tests.rb +19 -0
  739. data/tests/hp/requests/compute_v2/flavor_tests.rb +45 -0
  740. data/tests/hp/requests/compute_v2/image_tests.rb +86 -0
  741. data/tests/hp/requests/compute_v2/key_pair_tests.rb +66 -0
  742. data/tests/hp/requests/compute_v2/metadata_tests.rb +101 -0
  743. data/tests/hp/requests/compute_v2/persistent_server_tests.rb +67 -0
  744. data/tests/hp/requests/compute_v2/server_address_tests.rb +46 -0
  745. data/tests/hp/requests/compute_v2/server_security_group_tests.rb +43 -0
  746. data/tests/hp/requests/compute_v2/server_tests.rb +113 -0
  747. data/tests/hp/requests/compute_v2/server_volume_tests.rb +85 -0
  748. data/tests/hp/requests/dns/domain_tests.rb +72 -0
  749. data/tests/hp/requests/dns/records_tests.rb +65 -0
  750. data/tests/hp/requests/lb/algorithms_tests.rb +15 -0
  751. data/tests/hp/requests/lb/limits_tests.rb +18 -0
  752. data/tests/hp/requests/lb/load_balancer_nodes_tests.rb +47 -0
  753. data/tests/hp/requests/lb/load_balancer_tests.rb +56 -0
  754. data/tests/hp/requests/lb/protocols_tests.rb +15 -0
  755. data/tests/hp/requests/lb/versions_tests.rb +17 -0
  756. data/tests/hp/requests/lb/virtual_ips_tests.rb +34 -0
  757. data/tests/hp/requests/network/floating_ip_tests.rb +70 -0
  758. data/tests/hp/requests/network/network_tests.rb +57 -0
  759. data/tests/hp/requests/network/port_tests.rb +71 -0
  760. data/tests/hp/requests/network/router_tests.rb +108 -0
  761. data/tests/hp/requests/network/security_group_rule_tests.rb +58 -0
  762. data/tests/hp/requests/network/security_group_tests.rb +48 -0
  763. data/tests/hp/requests/network/subnet_tests.rb +71 -0
  764. data/tests/hp/requests/storage/container_tests.rb +9 -1
  765. data/tests/hp/requests/storage/object_tests.rb +34 -2
  766. data/tests/hp/storage_tests.rb +25 -0
  767. data/tests/local/models/directories_tests.rb +17 -0
  768. data/tests/openstack/requests/orchestration/stack_tests.rb +6 -1
  769. data/tests/openstack/requests/storage/large_object_tests.rb +320 -59
  770. data/tests/openstack/requests/storage/object_tests.rb +77 -4
  771. data/tests/rackspace/block_storage_tests.rb +1 -1
  772. data/tests/rackspace/cdn_tests.rb +2 -2
  773. data/tests/rackspace/compute_tests.rb +1 -6
  774. data/tests/rackspace/compute_v2_tests.rb +1 -1
  775. data/tests/rackspace/databases_tests.rb +1 -1
  776. data/tests/rackspace/dns_tests.rb +1 -1
  777. data/tests/rackspace/helper.rb +14 -4
  778. data/tests/rackspace/load_balancer_tests.rb +1 -1
  779. data/tests/rackspace/models/auto_scale/group_builder_tests.rb +145 -0
  780. data/tests/rackspace/models/auto_scale/group_tests.rb +36 -0
  781. data/tests/rackspace/models/auto_scale/{groups.rb → groups_tests.rb} +6 -2
  782. data/tests/rackspace/models/auto_scale/policies_tests.rb +25 -0
  783. data/tests/rackspace/models/auto_scale/policy_tests.rb +35 -0
  784. data/tests/rackspace/models/auto_scale/webhook_tests.rb +42 -0
  785. data/tests/rackspace/models/auto_scale/webhooks_tests.rb +28 -0
  786. data/tests/rackspace/models/compute_v2/metadata_tests.rb +1 -1
  787. data/tests/rackspace/models/compute_v2/server_tests.rb +8 -1
  788. data/tests/rackspace/models/identity/service_catalog_tests.rb +88 -40
  789. data/tests/rackspace/models/queues/claim_tests.rb +43 -0
  790. data/tests/rackspace/models/queues/claims_tests.rb +55 -0
  791. data/tests/rackspace/models/queues/message_tests.rb +35 -0
  792. data/tests/rackspace/models/queues/messages_tests.rb +18 -0
  793. data/tests/rackspace/models/queues/queue_tests.rb +30 -0
  794. data/tests/rackspace/models/queues/queues_tests.rb +10 -0
  795. data/tests/rackspace/models/storage/file_tests.rb +48 -6
  796. data/tests/rackspace/models/storage/files_tests.rb +44 -0
  797. data/tests/rackspace/queues_tests.rb +118 -0
  798. data/tests/rackspace/requests/auto_scale/config_tests.rb +61 -15
  799. data/tests/rackspace/requests/auto_scale/group_tests.rb +16 -4
  800. data/tests/rackspace/requests/auto_scale/helper.rb +46 -3
  801. data/tests/rackspace/requests/auto_scale/policy_tests.rb +37 -27
  802. data/tests/rackspace/requests/auto_scale/webhook_tests.rb +37 -28
  803. data/tests/rackspace/requests/compute_v2/address_tests.rb +3 -1
  804. data/tests/rackspace/requests/compute_v2/metadata_tests.rb +4 -2
  805. data/tests/rackspace/requests/compute_v2/server_tests.rb +3 -6
  806. data/tests/rackspace/requests/databases/helper.rb +0 -5
  807. data/tests/rackspace/requests/monitoring/entity_tests.rb +4 -4
  808. data/tests/rackspace/requests/monitoring/helper.rb +64 -0
  809. data/tests/rackspace/requests/monitoring/list_tests.rb +14 -2
  810. data/tests/rackspace/requests/queues/claim_tests.rb +62 -0
  811. data/tests/rackspace/requests/queues/helper.rb +50 -0
  812. data/tests/rackspace/requests/queues/messages_tests.rb +60 -0
  813. data/tests/rackspace/requests/queues/queues_tests.rb +43 -0
  814. data/tests/rackspace/requests/storage/large_object_tests.rb +8 -6
  815. data/tests/rackspace/requests/storage/object_tests.rb +12 -1
  816. data/tests/rackspace/service_tests.rb +0 -1
  817. data/tests/rackspace/storage_tests.rb +5 -5
  818. data/tests/vcloud_director/ensure_list_tests.rb +84 -0
  819. data/tests/vcloud_director/fixtures/test.iso +1 -0
  820. data/tests/vcloud_director/models/compute/catalog_items_tests.rb +31 -32
  821. data/tests/vcloud_director/models/compute/catalogs_tests.rb +30 -32
  822. data/tests/vcloud_director/models/compute/helper.rb +1 -8
  823. data/tests/vcloud_director/models/compute/media_tests.rb +45 -0
  824. data/tests/vcloud_director/models/compute/organizations_tests.rb +11 -15
  825. data/tests/vcloud_director/models/compute/tasks_tests.rb +26 -0
  826. data/tests/vcloud_director/models/compute/vapp_life_cycle_tests.rb +73 -78
  827. data/tests/vcloud_director/models/compute/vapp_tests.rb +29 -32
  828. data/tests/vcloud_director/models/compute/vdcs_tests.rb +31 -35
  829. data/tests/vcloud_director/models/compute/vms_tests.rb +72 -76
  830. data/tests/vcloud_director/requests/compute/admin_tests.rb +16 -0
  831. data/tests/vcloud_director/requests/compute/catalog_tests.rb +42 -0
  832. data/tests/vcloud_director/requests/compute/disk_tests.rb +178 -0
  833. data/tests/vcloud_director/requests/compute/edge_gateway_tests.rb +101 -0
  834. data/tests/vcloud_director/requests/compute/groups_tests.rb +18 -0
  835. data/tests/vcloud_director/requests/compute/helper.rb +34 -0
  836. data/tests/vcloud_director/requests/compute/media_tests.rb +195 -0
  837. data/tests/vcloud_director/requests/compute/network_tests.rb +43 -0
  838. data/tests/vcloud_director/requests/compute/organization_tests.rb +26 -37
  839. data/tests/vcloud_director/requests/compute/ovf_descriptor_tests.rb +36 -0
  840. data/tests/vcloud_director/requests/compute/query_tests.rb +34 -0
  841. data/tests/vcloud_director/requests/compute/schema_helper.rb +638 -0
  842. data/tests/vcloud_director/requests/compute/session_tests.rb +2 -17
  843. data/tests/vcloud_director/requests/compute/supported_systems_tests.rb +11 -0
  844. data/tests/vcloud_director/requests/compute/task_tests.rb +35 -0
  845. data/tests/vcloud_director/requests/compute/users_tests.rb +18 -0
  846. data/tests/vcloud_director/requests/compute/vapp_tests.rb +91 -0
  847. data/tests/vcloud_director/requests/compute/vdc_storage_profile_tests.rb +27 -0
  848. data/tests/vcloud_director/requests/compute/vdc_tests.rb +26 -80
  849. data/tests/vcloud_director/requests/compute/versions_tests.rb +1 -16
  850. data/tests/vcloud_director/requests/compute/vm_tests.rb +125 -0
  851. metadata +771 -122
  852. data/lib/fog/vcloud_director/requests/compute/delete_metadata.rb +0 -20
  853. data/lib/fog/vcloud_director/requests/compute/get_tasks_list.rb +0 -18
  854. data/lib/fog/vcloud_director/requests/compute/get_vm_cpu.rb +0 -18
  855. data/lib/fog/vcloud_director/requests/compute/get_vm_memory.rb +0 -18
  856. data/lib/fog/vcloud_director/requests/compute/helper.rb +0 -93
  857. data/lib/fog/vcloud_director/requests/compute/post_task_cancel.rb +0 -25
  858. data/lib/fog/vcloud_director/requests/compute/post_vapp_undeploy.rb +0 -26
  859. data/lib/fog/vcloud_director/requests/compute/post_vm_metadata.rb +0 -29
  860. data/lib/fog/vcloud_director/requests/compute/post_vm_poweroff.rb +0 -18
  861. data/lib/fog/vcloud_director/requests/compute/post_vm_poweron.rb +0 -18
  862. data/lib/fog/vcloud_director/requests/compute/put_vm_cpu.rb +0 -34
  863. data/lib/fog/vcloud_director/requests/compute/put_vm_customization.rb +0 -24
  864. data/lib/fog/vcloud_director/requests/compute/put_vm_disks.rb +0 -25
  865. data/lib/fog/vcloud_director/requests/compute/put_vm_memory.rb +0 -34
  866. data/lib/fog/vcloud_director/requests/compute/put_vm_network.rb +0 -24
  867. data/tests/rackspace/models/auto_scale/group.rb +0 -19
  868. data/tests/rackspace/models/auto_scale/policies.rb +0 -23
  869. data/tests/rackspace/models/auto_scale/policy.rb +0 -29
  870. data/tests/rackspace/models/auto_scale/webhook.rb +0 -35
  871. data/tests/rackspace/models/auto_scale/webhooks.rb +0 -28
  872. data/tests/vcloud_director/models/tools/reduced_vcr_requests.rb +0 -27
@@ -0,0 +1,94 @@
1
+ module Fog
2
+ module Compute
3
+ class VcloudDirector
4
+ class Real
5
+ # Retrieves a list of vApps by using REST API general QueryHandler.
6
+ #
7
+ # @param [Hash] options
8
+ # @option options [String] :sortAsc (Sorted by database ID) Sort
9
+ # results by attribute-name in ascending order. attribute-name cannot
10
+ # include metadata.
11
+ # @option options [String] :sortDesc (Sorted by database ID) Sort
12
+ # results by attribute-name in descending order. attribute-name
13
+ # cannot include metadata.
14
+ # @option options [Integer] :page (1) If the query results span
15
+ # multiple pages, return this page.
16
+ # @option options [Integer] :pageSize (25) Number of results per page,
17
+ # to a maximum of 128.
18
+ # @option options [String] :format (records) One of the following
19
+ # types:
20
+ # - *references* Returns a reference to each object, including its
21
+ # :name, :type, and :href attributes.
22
+ # - *records* Returns all database records for each object, with each
23
+ # record as an attribute.
24
+ # - *idrecords* Identical to the records format, except that object
25
+ # references are returned in :id format rather than :href format.
26
+ # @option options [Array<String>] :fields (all static attribute names)
27
+ # List of attribute names or metadata key names to return.
28
+ # @option options [Integer] :offset (0) Integer value specifying the
29
+ # first record to return. Record numbers < offset are not returned.
30
+ # @option options [String] :filter (none) Filter expression.
31
+ # @return [Excon::Response]
32
+ # * hash<~Hash>:
33
+ # * :href<~String> - The URI of the entity.
34
+ # * :type<~String> - The MIME type of the entity.
35
+ # * :name<~String> - Query name that generated this result set.
36
+ # * :page<~String> - Page of the result set that this container
37
+ # holds. The first page is page number 1.
38
+ # * :pageSize<~String> - Page size, as a number of records or
39
+ # references.
40
+ # * :total<~String> - Total number of records or references in the
41
+ # container.
42
+ # * :Link<~Array<Hash>>:
43
+ # * :href<~String> - Contains the URI to the entity.
44
+ # * :type<~String> - Contains the type of the entity.
45
+ # * :rel<~String> - Defines the relationship of the link to the
46
+ # object that contains it.
47
+ # * :VAppRecord<~Array<Hash>>:
48
+ # * TODO
49
+ # * :firstPage<~Integer> - First page in the result set.
50
+ # * :previousPage<~Integer> - Previous page in the result set.
51
+ # * :nextPage<~Integer> - Next page in the result set.
52
+ # * :lastPage<~Integer> - Last page in the result set.
53
+ #
54
+ # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VAppsInLeaseFromQuery.html
55
+ # @since vCloud API version 1.5
56
+ def get_vapps_in_lease_from_query(options={})
57
+ query = []
58
+ query << "sortAsc=#{options[:sortAsc]}" if options[:sortAsc]
59
+ query << "sortDesc=#{options[:sortDesc]}" if options[:sortDesc]
60
+ query << "page=#{options[:page]}" if options[:page]
61
+ query << "pageSize=#{options[:pageSize]}" if options[:pageSize]
62
+ query << "format=#{options[:format]}" if options[:format]
63
+ query << "fields=#{Array(options[:fields]).join(',')}" if options[:fields]
64
+ query << "offset=#{options[:offset]}" if options[:offset]
65
+ query << "filter=#{options[:filter]}" if options[:filter]
66
+
67
+ response = request(
68
+ :expects => 200,
69
+ :idempotent => true,
70
+ :method => 'GET',
71
+ :parser => Fog::ToHashDocument.new,
72
+ :path => 'vApps/query',
73
+ :query => query.map {|q| URI.escape(q)}.join('&')
74
+ )
75
+ ensure_list! response.body, :Link
76
+ ensure_list! response.body,
77
+ response.body[:type] == 'application/vnd.vmware.vcloud.query.references+xml' ?
78
+ :VAppReference : :VAppRecord
79
+
80
+ %w[firstPage previousPage nextPage lastPage].each do |rel|
81
+ if link = response.body[:Link].detect {|l| l[:rel] == rel}
82
+ href = Nokogiri::XML.fragment(link[:href])
83
+ query = CGI.parse(URI.parse(href.text).query)
84
+ response.body[rel.to_sym] = query['page'].first.to_i
85
+ response.body[:pageSize] ||= query['pageSize'].first.to_i
86
+ end
87
+ end
88
+
89
+ response
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,76 @@
1
+ module Fog
2
+ module Compute
3
+ class VcloudDirector
4
+ class Real
5
+ # Retrieve an administrative view of a cloud.
6
+ #
7
+ # The VCloud element provides access to cloud-wide namespace of objects
8
+ # that an administrator can view and, in most cases, modify.
9
+ #
10
+ # @return [Excon:Response]
11
+ # * body<~Hash>:
12
+ # * :href<~String> - The URI of the entity.
13
+ # * :type<~String> - The MIME type of the entity.
14
+ # * :name<~String> - The name of the entity.
15
+ # * :Description<~String> - Optional description.
16
+ # * :OrganizationReferences<Hash>:
17
+ # * :OrganizationReference<~Array<Hash>>:
18
+ # * :href<~String> - Contains the URI to the entity.
19
+ # * :name<~String> - Contains the name of the entity.
20
+ # * :type<~String> - Contains the type of the entity.
21
+ # * :ProviderVdcReferences<~Hash>:
22
+ # * :ProviderVdcReferences<~Array<Hash>>:
23
+ # * :RightReferences<~Hash>:
24
+ # * :RightReferences<~Array<Hash>>:
25
+ # * :RoleReferences<~Hash>:
26
+ # * :RoleReferences<~Array<Hash>>:
27
+ # * :Networks<~Hash>:
28
+ # * :Network<~Array<Hash>>:
29
+ #
30
+ # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-Vcloud.html
31
+ # @since vCloud API version 0.9
32
+ def get_vcloud
33
+ response = request(
34
+ :expects => 200,
35
+ :idempotent => true,
36
+ :method => 'GET',
37
+ :parser => Fog::ToHashDocument.new,
38
+ :path => 'admin/'
39
+ )
40
+ ensure_list! response.body, :OrganizationReferences, :OrganizationReference
41
+ ensure_list! response.body, :ProviderVdcReferences, :ProviderVdcReference
42
+ ensure_list! response.body, :RightReferences, :RightReference
43
+ ensure_list! response.body, :RoleReferences, :RoleReference
44
+ ensure_list! response.body, :Networks, :Network
45
+ response
46
+ end
47
+ end
48
+
49
+ class Mock
50
+ def get_vcloud
51
+ body =
52
+ {:href=>make_href('admin/'),
53
+ :type=>"application/vnd.vmware.admin.vcloud+xml",
54
+ :name=>'VMware vCloud Director',
55
+ :Description=>'5.1.2.1377223 Tue Oct 15 20:56:05 GMT 2013',
56
+ :Tasks=>{:Task=>[]},
57
+ :OrganizationReferences=>
58
+ {:OrganizationReference=>
59
+ [{:type=>"application/vnd.vmware.admin.organization+xml",
60
+ :name=>data[:org][:name],
61
+ :href=>make_href("api/admin/org/#{data[:org][:uuid]}")}]},
62
+ :ProviderVdcReferences=>{:ProviderVdcReference=>[]},
63
+ :RightReferences=>{:RightReference=>[]},
64
+ :RoleReferences=>{:RoleReference=>[]},
65
+ :Networks=>{:Network=>[]}}
66
+
67
+ Excon::Response.new(
68
+ :body => body,
69
+ :headers => {'Content-Type' => "#{body[:type]};version=#{api_version}"},
70
+ :status => 200
71
+ )
72
+ end
73
+ end
74
+ end
75
+ end
76
+ end
@@ -2,29 +2,49 @@ module Fog
2
2
  module Compute
3
3
  class VcloudDirector
4
4
  class Real
5
- def get_vdc(vdc_id)
6
- request(
7
- :expects => 200,
8
- :method => 'GET',
9
- :parser => Fog::ToHashDocument.new,
10
- :path => "vdc/#{vdc_id}"
5
+ # Retrieve a vDC.
6
+ #
7
+ # @param [String] id Object identifier of the vDC.
8
+ # @return [Excon::Response]
9
+ # * body<~Hash>:
10
+ #
11
+ # @raise [Fog::Compute::VcloudDirector::Forbidden]
12
+ #
13
+ # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-Vdc.html
14
+ # @since vCloud API version 0.9
15
+ def get_vdc(id)
16
+ response = request(
17
+ :expects => 200,
18
+ :idempotent => true,
19
+ :method => 'GET',
20
+ :parser => Fog::ToHashDocument.new,
21
+ :path => "vdc/#{id}"
11
22
  )
23
+ ensure_list! response.body, :ResourceEntities, :ResourceEntity
24
+ ensure_list! response.body, :AvailableNetworks, :Network
25
+ ensure_list! response.body, :VdcStorageProfiles, :VdcStorageProfile
26
+ response
12
27
  end
13
28
  end
14
29
 
15
30
  class Mock
16
31
  def get_vdc(vdc_id)
17
- vdc = data[:vdc]
18
- raise Excon::Errors::NotFound unless vdc_id == vdc[:uuid]
32
+ response = Excon::Response.new
33
+
34
+ unless vdc = data[:vdcs][vdc_id]
35
+ raise Fog::Compute::VcloudDirector::Forbidden.new(
36
+ "No access to entity \"com.vmware.vcloud.entity.vdc:#{vdc_id}\"."
37
+ )
38
+ end
19
39
 
20
40
  body =
21
41
  {:xmlns=>xmlns,
22
42
  :xmlns_xsi=>xmlns_xsi,
23
43
  :status=>"1",
24
44
  :name=>vdc[:name],
25
- :id=>"urn:vcloud:vdc:#{vdc[:uuid]}",
45
+ :id=>"urn:vcloud:vdc:#{vdc_id}",
26
46
  :type=>"application/vnd.vmware.vcloud.vdc+xml",
27
- :href=>make_href("vdc/#{vdc[:uuid]}"),
47
+ :href=>make_href("vdc/#{vdc_id}"),
28
48
  :xsi_schemaLocation=>xsi_schema_location,
29
49
  :Link=>
30
50
  [{:rel=>"up",
@@ -32,47 +52,47 @@ module Fog
32
52
  :href=>make_href("org/#{data[:org][:uuid]}")},
33
53
  {:rel=>"down",
34
54
  :type=>"application/vnd.vmware.vcloud.metadata+xml",
35
- :href=>make_href("vdc/#{vdc[:uuid]}/metadata")},
55
+ :href=>make_href("vdc/#{vdc_id}/metadata")},
36
56
  {:rel=>"add",
37
57
  :type=>"application/vnd.vmware.vcloud.uploadVAppTemplateParams+xml",
38
58
  :href=>
39
- make_href("vdc/#{vdc[:uuid]}/action/uploadVAppTemplate")},
59
+ make_href("vdc/#{vdc_id}/action/uploadVAppTemplate")},
40
60
  {:rel=>"add",
41
61
  :type=>"application/vnd.vmware.vcloud.media+xml",
42
- :href=>make_href("vdc/#{vdc[:uuid]}/media")},
62
+ :href=>make_href("vdc/#{vdc_id}/media")},
43
63
  {:rel=>"add",
44
64
  :type=>
45
65
  "application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml",
46
66
  :href=>
47
- make_href("vdc/#{vdc[:uuid]}/action/instantiateVAppTemplate")},
67
+ make_href("vdc/#{vdc_id}/action/instantiateVAppTemplate")},
48
68
  {:rel=>"add",
49
69
  :type=>"application/vnd.vmware.vcloud.cloneVAppParams+xml",
50
- :href=>make_href("vdc/#{vdc[:uuid]}/action/cloneVApp")},
70
+ :href=>make_href("vdc/#{vdc_id}/action/cloneVApp")},
51
71
  {:rel=>"add",
52
72
  :type=>"application/vnd.vmware.vcloud.cloneVAppTemplateParams+xml",
53
73
  :href=>
54
- make_href("vdc/#{vdc[:uuid]}/action/cloneVAppTemplate")},
74
+ make_href("vdc/#{vdc_id}/action/cloneVAppTemplate")},
55
75
  {:rel=>"add",
56
76
  :type=>"application/vnd.vmware.vcloud.cloneMediaParams+xml",
57
- :href=>make_href("vdc/#{vdc[:uuid]}/action/cloneMedia")},
77
+ :href=>make_href("vdc/#{vdc_id}/action/cloneMedia")},
58
78
  {:rel=>"add",
59
79
  :type=>"application/vnd.vmware.vcloud.captureVAppParams+xml",
60
- :href=>make_href("vdc/#{vdc[:uuid]}/action/captureVApp")},
80
+ :href=>make_href("vdc/#{vdc_id}/action/captureVApp")},
61
81
  {:rel=>"add",
62
82
  :type=>"application/vnd.vmware.vcloud.composeVAppParams+xml",
63
- :href=>make_href("vdc/#{vdc[:uuid]}/action/composeVApp")},
83
+ :href=>make_href("vdc/#{vdc_id}/action/composeVApp")},
64
84
  {:rel=>"add",
65
85
  :type=>"application/vnd.vmware.vcloud.diskCreateParams+xml",
66
- :href=>make_href("vdc/#{vdc[:uuid]}/disk")},
86
+ :href=>make_href("vdc/#{vdc_id}/disk")},
67
87
  {:rel=>"edgeGateways",
68
88
  :type=>"application/vnd.vmware.vcloud.query.records+xml",
69
- :href=>make_href("admin/vdc/#{vdc[:uuid]}/edgeGateways")},
89
+ :href=>make_href("admin/vdc/#{vdc_id}/edgeGateways")},
70
90
  {:rel=>"add",
71
91
  :type=>"application/vnd.vmware.vcloud.orgVdcNetwork+xml",
72
- :href=>make_href("admin/vdc/#{vdc[:uuid]}/networks")},
92
+ :href=>make_href("admin/vdc/#{vdc_id}/networks")},
73
93
  {:rel=>"orgVdcNetworks",
74
94
  :type=>"application/vnd.vmware.vcloud.query.records+xml",
75
- :href=>make_href("admin/vdc/#{vdc[:uuid]}/networks")}],
95
+ :href=>make_href("admin/vdc/#{vdc_id}/networks")}],
76
96
  :Description=>vdc[:description]||'',
77
97
  :AllocationModel=>"AllocationVApp",
78
98
  :ComputeCapacity=>
@@ -101,52 +121,36 @@ module Fog
101
121
  :VmQuota=>"100",
102
122
  :IsEnabled=>"true"}
103
123
 
104
- # Emulating Fog::ToHashDocument:
105
- if data[:networks].size == 1
106
- body[:AvailableNetworks][:Network] =
107
- [{:type=>"application/vnd.vmware.vcloud.network+xml",
108
- :name=>data[:networks].first[:name],
109
- :href=>make_href("network/#{data[:networks].first[:name]}")}]
110
- else
111
- body[:AvailableNetworks][:Network] = data[:networks].map do |network|
112
- {:type=>"application/vnd.vmware.vcloud.network+xml",
113
- :name=>network[:name],
114
- :href=>make_href("network/#{network[:name]}")}
124
+ body[:ResourceEntities][:ResourceEntity] =
125
+ data[:catalog_items].map do |id, item|
126
+ {:type=>"application/vnd.vmware.vcloud.#{item[:type]}+xml",
127
+ :name=>item[:name],
128
+ :href=>make_href("#{item[:type]}/#{item[:type]}-#{id}")}
115
129
  end
116
- end
117
130
 
118
- # Emulating Fog::ToHashDocument:
119
- if data[:catalog_items].size == 1
120
- item_type = data[:catalog_items].first[:type]
121
- body[:ResourceEntities][:ResourceEntity] =
122
- {:type=>"application/vnd.vmware.vcloud.#{item_type}+xml",
123
- :name=>data[:catalog_items].first[:name],
124
- :href=>
125
- make_href("#{item_type}/#{item_type}-#{data[:catalog_items].first[:uuid]}")}
126
- else
127
- body[:ResourceEntities][:ResourceEntity] = data[:catalog_items].map do |catalog_item|
128
- item_type = catalog_item[:type]
129
- {:type=>"application/vnd.vmware.vcloud.#{item_type}+xml",
130
- :name=>catalog_item[:name],
131
- :href=>
132
- make_href("#{item_type}/#{item_type}-#{catalog_item[:uuid]}")}
133
- end
131
+ body[:AvailableNetworks][:Network] =
132
+ data[:networks].map do |id, network|
133
+ {:type=>"application/vnd.vmware.vcloud.network+xml",
134
+ :name=>network[:name],
135
+ :href=>make_href("network/#{id}")}
134
136
  end
135
137
 
136
138
  if api_version.to_f >= 5.1
137
- # TODO
138
- #body[:VdcStorageProfiles] =
139
- # {:VdcStorageProfile=>
140
- # [{:type=>"application/vnd.vmware.vcloud.vdcStorageProfile+xml",
141
- # :name=>profile[:name],
142
- # :href=>make_href("vdcStorageProfile/#{profile[:uuid]}")}]}
139
+ body[:VdcStorageProfiles] = {}
140
+ body[:VdcStorageProfiles][:VdcStorageProfile] =
141
+ data[:vdc_storage_classes].select do |id, storage_class|
142
+ storage_class[:vdc] == vdc_id
143
+ end.map do |id, storage_class|
144
+ {:type => 'application/vnd.vmware.vcloud.vdcStorageProfile+xml',
145
+ :name => storage_class[:name],
146
+ :href => make_href("vdcStorageProfile/#{id}")}
147
+ end
143
148
  end
144
149
 
145
- Excon::Response.new(
146
- :body => body,
147
- :headers => {'Content-Type' => "#{body[:type]};version=#{api_version}"},
148
- :status => 200
149
- )
150
+ response.status = 200
151
+ response.headers = {'Content-Type' => "#{body[:type]};version=#{api_version}"}
152
+ response.body = body
153
+ response
150
154
  end
151
155
  end
152
156
  end
@@ -0,0 +1,25 @@
1
+ module Fog
2
+ module Compute
3
+ class VcloudDirector
4
+ class Real
5
+ # Retrieve metadata associated with a vDC.
6
+ #
7
+ # @param [String] id Object identifier of the vDC.
8
+ # @return [Excon::Response]
9
+ # * body<~Hash>:
10
+ #
11
+ # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VdcMetadata.html
12
+ # @since vCloud API version 1.5
13
+ def get_vdc_metadata(id)
14
+ request(
15
+ :expects => 200,
16
+ :idempotent => true,
17
+ :method => 'GET',
18
+ :parser => Fog::ToHashDocument.new,
19
+ :path => "vdc/#{id}/metadata/"
20
+ )
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,28 @@
1
+ module Fog
2
+ module Compute
3
+ class VcloudDirector
4
+ class Real
5
+ # Retrieve the value of the specified key from virtual datacenter
6
+ # metadata.
7
+ #
8
+ # @param [String] id Object identifier of the network.
9
+ # @param [String] domain
10
+ # @param [String] key Key of the metadata.
11
+ # @return [Excon::Response]
12
+ # * body<~Hash>:
13
+ #
14
+ # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VdcMetadataItem-metadata.html
15
+ # @since vCloud API version 1.5
16
+ def get_vdc_metadata_item_metadata(id, domain, key)
17
+ request(
18
+ :expects => 200,
19
+ :idempotent => true,
20
+ :method => 'GET',
21
+ :parser => Fog::ToHashDocument.new,
22
+ :path => "admin/vdc/#{id}/metadata/#{URI.escape(key)})"
23
+ )
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,83 @@
1
+ module Fog
2
+ module Compute
3
+ class VcloudDirector
4
+ class Real
5
+ extend Fog::Deprecation
6
+ deprecate :get_vdc_storage_profile, :get_vdc_storage_class
7
+
8
+ # Returns storage class referred by the Id. All properties of the
9
+ # storage classes are visible to vcloud user, except for VDC Storage
10
+ # Class reference.
11
+ #
12
+ # @param [String] id Object identifier of the vDC storage profile.
13
+ # @return [Excon::Response]
14
+ # * body<~Hash>:
15
+ # * :href<~String> - The URI of the entity.
16
+ # * :type<~String> - The MIME type of the entity.
17
+ # * :id<~String> - The entity identifier, expressed in URN format.
18
+ # The value of this attribute uniquely identifies the entity,
19
+ # persists for the life of the entity, and is never reused.
20
+ # * :name<~String> - The name of the entity.
21
+ # * :Description<~String> - Optional description.
22
+ # * :Enabled<~String> - True if this storage profile is enabled for
23
+ # use in the vDC.
24
+ # * :Units<~String> - Units used to define :Limit.
25
+ # * :Limit<~String> - Maximum number of :Units allocated for this
26
+ # storage profile.
27
+ # * :Default<~String> - True if this is default storage profile for
28
+ # this vDC. The default storage profile is used when an object
29
+ # that can specify a storage profile is created with no storage
30
+ # profile specified.
31
+ #
32
+ # @raise [Fog::Compute::VcloudDirector::Forbidden]
33
+ #
34
+ # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VdcStorageClass.html
35
+ def get_vdc_storage_class(id)
36
+ request(
37
+ :expects => 200,
38
+ :idempotent => true,
39
+ :method => 'GET',
40
+ :parser => Fog::ToHashDocument.new,
41
+ :path => "vdcStorageProfile/#{id}"
42
+ )
43
+ end
44
+ end
45
+
46
+ class Mock
47
+ def get_vdc_storage_class(id)
48
+ unless vdc_storage_class = data[:vdc_storage_classes][id]
49
+ raise Fog::Compute::VcloudDirector::Forbidden.new(
50
+ "No access to entity \"(com.vmware.vcloud.entity.vdcstorageProfile:#{id})\"."
51
+ )
52
+ end
53
+
54
+ body =
55
+ {:xmlns=>xmlns,
56
+ :xmlns_xsi=>xmlns_xsi,
57
+ :name=>vdc_storage_class[:name],
58
+ :id=>"urn:vcloud:vdcstorageProfile:#{id}",
59
+ :type=>"application/vnd.vmware.vcloud.vdcStorageProfile+xml",
60
+ :href=>make_href("api/vdcStorageProfile/#{id}"),
61
+ :xsi_schemaLocation=>xsi_schema_location,
62
+ :Link=>
63
+ [{:rel=>"up",
64
+ :type=>"application/vnd.vmware.vcloud.vdc+xml",
65
+ :href=>make_href("vdc/#{vdc_storage_class[:vdc]}")},
66
+ {:rel=>"down",
67
+ :type=>"application/vnd.vmware.vcloud.metadata+xml",
68
+ :href=>make_href("vdcStorageProfile/#{id}/metadata")}],
69
+ :Enabled=>vdc_storage_class[:enabled].to_s,
70
+ :Units=>vdc_storage_class[:units],
71
+ :Limit=>vdc_storage_class[:limit].to_s,
72
+ :Default=>vdc_storage_class[:default].to_s}
73
+
74
+ Excon::Response.new(
75
+ :status => 200,
76
+ :headers => {'Content-Type' => "#{body[:type]};version=#{api_version}"},
77
+ :body => body
78
+ )
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,27 @@
1
+ module Fog
2
+ module Compute
3
+ class VcloudDirector
4
+ class Real
5
+ extend Fog::Deprecation
6
+ deprecate :get_vdc_storage_profile_metadata, :get_vdc_storage_class_metadata
7
+
8
+ # Retrieve metadata associated with the vDC storage profile.
9
+ #
10
+ # @param [String] id Object identifier of the vDC storage profile.
11
+ # @return [Excon::Response]
12
+ # * body<~Hash>:
13
+ #
14
+ # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VdcStorageClassMetadata.html
15
+ def get_vdc_storage_class_metadata(id)
16
+ request(
17
+ :expects => 200,
18
+ :idempotent => true,
19
+ :method => 'GET',
20
+ :parser => Fog::ToHashDocument.new,
21
+ :path => "vdcStorageProfile/#{id}/metadata/"
22
+ )
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,25 @@
1
+ module Fog
2
+ module Compute
3
+ class VcloudDirector
4
+ class Real
5
+ # Retrieve metadata associated with the vDC storage profile.
6
+ #
7
+ # @param [String] id Object identifier of the vDC storage profile.
8
+ # @param [String] key Key of the metadata.
9
+ # @return [Excon::Response]
10
+ # * body<~Hash>:
11
+ #
12
+ # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VdcStorageClassMetadataItem-metadata.html
13
+ def get_vdc_storage_class_metadata_item_metadata(id, key)
14
+ request(
15
+ :expects => 200,
16
+ :idempotent => true,
17
+ :method => 'GET',
18
+ :parser => Fog::ToHashDocument.new,
19
+ :path => "vdcStorageProfile/#{id}/metadata/#{URI.escape(key)})"
20
+ )
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,94 @@
1
+ module Fog
2
+ module Compute
3
+ class VcloudDirector
4
+ class Real
5
+ # Retrieves a list of vdcs in the organization.
6
+ #
7
+ # @param [Hash] options
8
+ # @option options [String] :sortAsc (Sorted by database ID) Sort
9
+ # results by attribute-name in ascending order. attribute-name cannot
10
+ # include metadata.
11
+ # @option options [String] :sortDesc (Sorted by database ID) Sort
12
+ # results by attribute-name in descending order. attribute-name
13
+ # cannot include metadata.
14
+ # @option options [Integer] :page (1) If the query results span
15
+ # multiple pages, return this page.
16
+ # @option options [Integer] :pageSize (25) Number of results per page,
17
+ # to a maximum of 128.
18
+ # @option options [String] :format (records) One of the following
19
+ # types:
20
+ # - *references* Returns a reference to each object, including its
21
+ # :name, :type, and :href attributes.
22
+ # - *records* Returns all database records for each object, with each
23
+ # record as an attribute.
24
+ # - *idrecords* Identical to the records format, except that object
25
+ # references are returned in :id format rather than :href format.
26
+ # @option options [Array<String>] :fields (all static attribute names)
27
+ # List of attribute names or metadata key names to return.
28
+ # @option options [Integer] :offset (0) Integer value specifying the
29
+ # first record to return. Record numbers < offset are not returned.
30
+ # @option options [String] :filter (none) Filter expression.
31
+ # @return [Excon::Response]
32
+ # * hash<~Hash>:
33
+ # * :href<~String> - The URI of the entity.
34
+ # * :type<~String> - The MIME type of the entity.
35
+ # * :name<~String> - Query name that generated this result set.
36
+ # * :page<~String> - Page of the result set that this container
37
+ # holds. The first page is page number 1.
38
+ # * :pageSize<~String> - Page size, as a number of records or
39
+ # references.
40
+ # * :total<~String> - Total number of records or references in the
41
+ # container.
42
+ # * :Link<~Array<Hash>>:
43
+ # * :href<~String> - Contains the URI to the entity.
44
+ # * :type<~String> - Contains the type of the entity.
45
+ # * :rel<~String> - Defines the relationship of the link to the
46
+ # object that contains it.
47
+ # * :OrgVdcRecord<~Array<Hash>>:
48
+ # * TODO
49
+ # * :firstPage<~Integer> - First page in the result set.
50
+ # * :previousPage<~Integer> - Previous page in the result set.
51
+ # * :nextPage<~Integer> - Next page in the result set.
52
+ # * :lastPage<~Integer> - Last page in the result set.
53
+ #
54
+ # @see http://pubs.vmware.com/vcd-55/topic/com.vmware.vcloud.api.reference.doc_55/doc/operations/GET-RightsFromQuery-query.html
55
+ # @since vCloud API version 1.5
56
+ def get_vdcs_from_query(options={})
57
+ query = []
58
+ query << "sortAsc=#{options[:sortAsc]}" if options[:sortAsc]
59
+ query << "sortDesc=#{options[:sortDesc]}" if options[:sortDesc]
60
+ query << "page=#{options[:page]}" if options[:page]
61
+ query << "pageSize=#{options[:pageSize]}" if options[:pageSize]
62
+ query << "format=#{options[:format]}" if options[:format]
63
+ query << "fields=#{Array(options[:fields]).join(',')}" if options[:fields]
64
+ query << "offset=#{options[:offset]}" if options[:offset]
65
+ query << "filter=#{options[:filter]}" if options[:filter]
66
+
67
+ response = request(
68
+ :expects => 200,
69
+ :idempotent => true,
70
+ :method => 'GET',
71
+ :parser => Fog::ToHashDocument.new,
72
+ :path => 'admin/vdcs/query',
73
+ :query => query.map {|q| URI.escape(q)}.join('&')
74
+ )
75
+ ensure_list! response.body, :Link
76
+ ensure_list! response.body,
77
+ response.body[:type] == 'application/vnd.vmware.vcloud.query.references+xml' ?
78
+ :OrgVdcReference : :OrgVdcRecord
79
+
80
+ %w[firstPage previousPage nextPage lastPage].each do |rel|
81
+ if link = response.body[:Link].detect {|l| l[:rel] == rel}
82
+ href = Nokogiri::XML.fragment(link[:href])
83
+ query = CGI.parse(URI.parse(href.text).query)
84
+ response.body[rel.to_sym] = query['page'].first.to_i
85
+ response.body[:pageSize] ||= query['pageSize'].first.to_i
86
+ end
87
+ end
88
+
89
+ response
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end