fog-openstack 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (784) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +30 -0
  7. data/CODE_OF_CONDUCT.md +49 -0
  8. data/CONTRIBUTING.md +18 -0
  9. data/Gemfile +4 -0
  10. data/LICENSE.md +20 -0
  11. data/README.md +41 -0
  12. data/Rakefile +8 -0
  13. data/bin/console +14 -0
  14. data/bin/setup +8 -0
  15. data/fog-openstack.gemspec +33 -0
  16. data/lib/fog/openstack.rb +508 -0
  17. data/lib/fog/openstack/CHANGELOG.md +47 -0
  18. data/lib/fog/openstack/baremetal.rb +308 -0
  19. data/lib/fog/openstack/common.rb +46 -0
  20. data/lib/fog/openstack/compute.rb +397 -0
  21. data/lib/fog/openstack/core.rb +114 -0
  22. data/lib/fog/openstack/docs/compute.md +681 -0
  23. data/lib/fog/openstack/docs/getting_started.md +81 -0
  24. data/lib/fog/openstack/docs/orchestration.md +318 -0
  25. data/lib/fog/openstack/docs/planning.md +270 -0
  26. data/lib/fog/openstack/docs/storage.md +453 -0
  27. data/lib/fog/openstack/errors.rb +42 -0
  28. data/lib/fog/openstack/examples/compute/basics.rb +50 -0
  29. data/lib/fog/openstack/examples/compute/block_device_mapping_v2.rb +32 -0
  30. data/lib/fog/openstack/examples/identity/basics.rb +68 -0
  31. data/lib/fog/openstack/examples/image/upload-test-image.rb +77 -0
  32. data/lib/fog/openstack/examples/network/network_subnets_routers.rb +62 -0
  33. data/lib/fog/openstack/examples/planning/basics.rb +53 -0
  34. data/lib/fog/openstack/examples/storage/set-account-quota.rb +66 -0
  35. data/lib/fog/openstack/identity.rb +27 -0
  36. data/lib/fog/openstack/identity_v2.rb +203 -0
  37. data/lib/fog/openstack/identity_v3.rb +181 -0
  38. data/lib/fog/openstack/image.rb +22 -0
  39. data/lib/fog/openstack/image_v1.rb +148 -0
  40. data/lib/fog/openstack/image_v2.rb +142 -0
  41. data/lib/fog/openstack/metering.rb +145 -0
  42. data/lib/fog/openstack/models/baremetal/chassis.rb +49 -0
  43. data/lib/fog/openstack/models/baremetal/chassis_collection.rb +44 -0
  44. data/lib/fog/openstack/models/baremetal/driver.rb +24 -0
  45. data/lib/fog/openstack/models/baremetal/drivers.rb +21 -0
  46. data/lib/fog/openstack/models/baremetal/node.rb +96 -0
  47. data/lib/fog/openstack/models/baremetal/nodes.rb +44 -0
  48. data/lib/fog/openstack/models/baremetal/port.rb +50 -0
  49. data/lib/fog/openstack/models/baremetal/ports.rb +44 -0
  50. data/lib/fog/openstack/models/collection.rb +45 -0
  51. data/lib/fog/openstack/models/compute/address.rb +67 -0
  52. data/lib/fog/openstack/models/compute/addresses.rb +28 -0
  53. data/lib/fog/openstack/models/compute/aggregate.rb +58 -0
  54. data/lib/fog/openstack/models/compute/aggregates.rb +26 -0
  55. data/lib/fog/openstack/models/compute/availability_zone.rb +14 -0
  56. data/lib/fog/openstack/models/compute/availability_zones.rb +22 -0
  57. data/lib/fog/openstack/models/compute/flavor.rb +52 -0
  58. data/lib/fog/openstack/models/compute/flavors.rb +29 -0
  59. data/lib/fog/openstack/models/compute/host.rb +28 -0
  60. data/lib/fog/openstack/models/compute/hosts.rb +28 -0
  61. data/lib/fog/openstack/models/compute/image.rb +48 -0
  62. data/lib/fog/openstack/models/compute/images.rb +38 -0
  63. data/lib/fog/openstack/models/compute/key_pair.rb +56 -0
  64. data/lib/fog/openstack/models/compute/key_pairs.rb +29 -0
  65. data/lib/fog/openstack/models/compute/metadata.rb +65 -0
  66. data/lib/fog/openstack/models/compute/metadatum.rb +27 -0
  67. data/lib/fog/openstack/models/compute/network.rb +13 -0
  68. data/lib/fog/openstack/models/compute/networks.rb +30 -0
  69. data/lib/fog/openstack/models/compute/security_group.rb +57 -0
  70. data/lib/fog/openstack/models/compute/security_group_rule.rb +32 -0
  71. data/lib/fog/openstack/models/compute/security_group_rules.rb +21 -0
  72. data/lib/fog/openstack/models/compute/security_groups.rb +24 -0
  73. data/lib/fog/openstack/models/compute/server.rb +410 -0
  74. data/lib/fog/openstack/models/compute/servers.rb +59 -0
  75. data/lib/fog/openstack/models/compute/service.rb +42 -0
  76. data/lib/fog/openstack/models/compute/services.rb +23 -0
  77. data/lib/fog/openstack/models/compute/snapshot.rb +32 -0
  78. data/lib/fog/openstack/models/compute/snapshots.rb +37 -0
  79. data/lib/fog/openstack/models/compute/tenant.rb +24 -0
  80. data/lib/fog/openstack/models/compute/tenants.rb +25 -0
  81. data/lib/fog/openstack/models/compute/volume.rb +52 -0
  82. data/lib/fog/openstack/models/compute/volumes.rb +37 -0
  83. data/lib/fog/openstack/models/identity_v2/ec2_credential.rb +39 -0
  84. data/lib/fog/openstack/models/identity_v2/ec2_credentials.rb +56 -0
  85. data/lib/fog/openstack/models/identity_v2/role.rb +52 -0
  86. data/lib/fog/openstack/models/identity_v2/roles.rb +22 -0
  87. data/lib/fog/openstack/models/identity_v2/tenant.rb +60 -0
  88. data/lib/fog/openstack/models/identity_v2/tenants.rb +31 -0
  89. data/lib/fog/openstack/models/identity_v2/user.rb +69 -0
  90. data/lib/fog/openstack/models/identity_v2/users.rb +45 -0
  91. data/lib/fog/openstack/models/identity_v3/domain.rb +49 -0
  92. data/lib/fog/openstack/models/identity_v3/domains.rb +50 -0
  93. data/lib/fog/openstack/models/identity_v3/endpoint.rb +46 -0
  94. data/lib/fog/openstack/models/identity_v3/endpoints.rb +26 -0
  95. data/lib/fog/openstack/models/identity_v3/group.rb +92 -0
  96. data/lib/fog/openstack/models/identity_v3/groups.rb +31 -0
  97. data/lib/fog/openstack/models/identity_v3/os_credential.rb +73 -0
  98. data/lib/fog/openstack/models/identity_v3/os_credentials.rb +31 -0
  99. data/lib/fog/openstack/models/identity_v3/policies.rb +31 -0
  100. data/lib/fog/openstack/models/identity_v3/policy.rb +42 -0
  101. data/lib/fog/openstack/models/identity_v3/project.rb +106 -0
  102. data/lib/fog/openstack/models/identity_v3/projects.rb +57 -0
  103. data/lib/fog/openstack/models/identity_v3/role.rb +40 -0
  104. data/lib/fog/openstack/models/identity_v3/role_assignment.rb +22 -0
  105. data/lib/fog/openstack/models/identity_v3/role_assignments.rb +25 -0
  106. data/lib/fog/openstack/models/identity_v3/roles.rb +39 -0
  107. data/lib/fog/openstack/models/identity_v3/service.rb +47 -0
  108. data/lib/fog/openstack/models/identity_v3/services.rb +31 -0
  109. data/lib/fog/openstack/models/identity_v3/token.rb +26 -0
  110. data/lib/fog/openstack/models/identity_v3/tokens.rb +41 -0
  111. data/lib/fog/openstack/models/identity_v3/user.rb +81 -0
  112. data/lib/fog/openstack/models/identity_v3/users.rb +35 -0
  113. data/lib/fog/openstack/models/image_v1/image.rb +78 -0
  114. data/lib/fog/openstack/models/image_v1/images.rb +70 -0
  115. data/lib/fog/openstack/models/image_v2/image.rb +149 -0
  116. data/lib/fog/openstack/models/image_v2/images.rb +67 -0
  117. data/lib/fog/openstack/models/meta_parent.rb +31 -0
  118. data/lib/fog/openstack/models/metering/meter.rb +0 -0
  119. data/lib/fog/openstack/models/metering/meters.rb +0 -0
  120. data/lib/fog/openstack/models/metering/resource.rb +15 -0
  121. data/lib/fog/openstack/models/metering/resources.rb +23 -0
  122. data/lib/fog/openstack/models/model.rb +44 -0
  123. data/lib/fog/openstack/models/network/floating_ip.rb +40 -0
  124. data/lib/fog/openstack/models/network/floating_ips.rb +32 -0
  125. data/lib/fog/openstack/models/network/lb_health_monitor.rb +57 -0
  126. data/lib/fog/openstack/models/network/lb_health_monitors.rb +32 -0
  127. data/lib/fog/openstack/models/network/lb_member.rb +42 -0
  128. data/lib/fog/openstack/models/network/lb_members.rb +32 -0
  129. data/lib/fog/openstack/models/network/lb_pool.rb +67 -0
  130. data/lib/fog/openstack/models/network/lb_pools.rb +32 -0
  131. data/lib/fog/openstack/models/network/lb_vip.rb +48 -0
  132. data/lib/fog/openstack/models/network/lb_vips.rb +32 -0
  133. data/lib/fog/openstack/models/network/network.rb +43 -0
  134. data/lib/fog/openstack/models/network/networks.rb +32 -0
  135. data/lib/fog/openstack/models/network/port.rb +42 -0
  136. data/lib/fog/openstack/models/network/ports.rb +32 -0
  137. data/lib/fog/openstack/models/network/router.rb +61 -0
  138. data/lib/fog/openstack/models/network/routers.rb +32 -0
  139. data/lib/fog/openstack/models/network/security_group.rb +32 -0
  140. data/lib/fog/openstack/models/network/security_group_rule.rb +33 -0
  141. data/lib/fog/openstack/models/network/security_group_rules.rb +32 -0
  142. data/lib/fog/openstack/models/network/security_groups.rb +32 -0
  143. data/lib/fog/openstack/models/network/subnet.rb +44 -0
  144. data/lib/fog/openstack/models/network/subnets.rb +32 -0
  145. data/lib/fog/openstack/models/orchestration/event.rb +20 -0
  146. data/lib/fog/openstack/models/orchestration/events.rb +31 -0
  147. data/lib/fog/openstack/models/orchestration/resource.rb +32 -0
  148. data/lib/fog/openstack/models/orchestration/resource_schemas.rb +17 -0
  149. data/lib/fog/openstack/models/orchestration/resources.rb +36 -0
  150. data/lib/fog/openstack/models/orchestration/stack.rb +120 -0
  151. data/lib/fog/openstack/models/orchestration/stacks.rb +64 -0
  152. data/lib/fog/openstack/models/orchestration/template.rb +15 -0
  153. data/lib/fog/openstack/models/orchestration/templates.rb +45 -0
  154. data/lib/fog/openstack/models/planning/plan.rb +70 -0
  155. data/lib/fog/openstack/models/planning/plans.rb +31 -0
  156. data/lib/fog/openstack/models/planning/role.rb +23 -0
  157. data/lib/fog/openstack/models/planning/roles.rb +16 -0
  158. data/lib/fog/openstack/models/storage/directories.rb +36 -0
  159. data/lib/fog/openstack/models/storage/directory.rb +50 -0
  160. data/lib/fog/openstack/models/storage/file.rb +185 -0
  161. data/lib/fog/openstack/models/storage/files.rb +101 -0
  162. data/lib/fog/openstack/models/volume/availability_zone.rb +10 -0
  163. data/lib/fog/openstack/models/volume/availability_zones.rb +14 -0
  164. data/lib/fog/openstack/models/volume/transfer.rb +28 -0
  165. data/lib/fog/openstack/models/volume/transfers.rb +35 -0
  166. data/lib/fog/openstack/models/volume/volume.rb +36 -0
  167. data/lib/fog/openstack/models/volume/volume_type.rb +36 -0
  168. data/lib/fog/openstack/models/volume/volume_types.rb +22 -0
  169. data/lib/fog/openstack/models/volume/volumes.rb +35 -0
  170. data/lib/fog/openstack/models/volume_v1/availability_zone.rb +15 -0
  171. data/lib/fog/openstack/models/volume_v1/availability_zones.rb +16 -0
  172. data/lib/fog/openstack/models/volume_v1/transfer.rb +18 -0
  173. data/lib/fog/openstack/models/volume_v1/transfers.rb +16 -0
  174. data/lib/fog/openstack/models/volume_v1/volume.rb +26 -0
  175. data/lib/fog/openstack/models/volume_v1/volume_type.rb +16 -0
  176. data/lib/fog/openstack/models/volume_v1/volume_types.rb +16 -0
  177. data/lib/fog/openstack/models/volume_v1/volumes.rb +16 -0
  178. data/lib/fog/openstack/models/volume_v2/availability_zone.rb +15 -0
  179. data/lib/fog/openstack/models/volume_v2/availability_zones.rb +16 -0
  180. data/lib/fog/openstack/models/volume_v2/transfer.rb +19 -0
  181. data/lib/fog/openstack/models/volume_v2/transfers.rb +16 -0
  182. data/lib/fog/openstack/models/volume_v2/volume.rb +27 -0
  183. data/lib/fog/openstack/models/volume_v2/volume_type.rb +16 -0
  184. data/lib/fog/openstack/models/volume_v2/volume_types.rb +16 -0
  185. data/lib/fog/openstack/models/volume_v2/volumes.rb +16 -0
  186. data/lib/fog/openstack/network.rb +293 -0
  187. data/lib/fog/openstack/orchestration.rb +192 -0
  188. data/lib/fog/openstack/planning.rb +174 -0
  189. data/lib/fog/openstack/requests/baremetal/create_chassis.rb +44 -0
  190. data/lib/fog/openstack/requests/baremetal/create_node.rb +54 -0
  191. data/lib/fog/openstack/requests/baremetal/create_port.rb +46 -0
  192. data/lib/fog/openstack/requests/baremetal/delete_chassis.rb +25 -0
  193. data/lib/fog/openstack/requests/baremetal/delete_node.rb +25 -0
  194. data/lib/fog/openstack/requests/baremetal/delete_port.rb +25 -0
  195. data/lib/fog/openstack/requests/baremetal/get_chassis.rb +24 -0
  196. data/lib/fog/openstack/requests/baremetal/get_driver.rb +24 -0
  197. data/lib/fog/openstack/requests/baremetal/get_driver_properties.rb +40 -0
  198. data/lib/fog/openstack/requests/baremetal/get_node.rb +24 -0
  199. data/lib/fog/openstack/requests/baremetal/get_port.rb +24 -0
  200. data/lib/fog/openstack/requests/baremetal/list_chassis.rb +42 -0
  201. data/lib/fog/openstack/requests/baremetal/list_chassis_detailed.rb +25 -0
  202. data/lib/fog/openstack/requests/baremetal/list_drivers.rb +25 -0
  203. data/lib/fog/openstack/requests/baremetal/list_nodes.rb +34 -0
  204. data/lib/fog/openstack/requests/baremetal/list_nodes_detailed.rb +25 -0
  205. data/lib/fog/openstack/requests/baremetal/list_ports.rb +42 -0
  206. data/lib/fog/openstack/requests/baremetal/list_ports_detailed.rb +25 -0
  207. data/lib/fog/openstack/requests/baremetal/patch_chassis.rb +42 -0
  208. data/lib/fog/openstack/requests/baremetal/patch_node.rb +41 -0
  209. data/lib/fog/openstack/requests/baremetal/patch_port.rb +41 -0
  210. data/lib/fog/openstack/requests/baremetal/set_node_maintenance.rb +30 -0
  211. data/lib/fog/openstack/requests/baremetal/set_node_power_state.rb +35 -0
  212. data/lib/fog/openstack/requests/baremetal/set_node_provision_state.rb +38 -0
  213. data/lib/fog/openstack/requests/baremetal/unset_node_maintenance.rb +30 -0
  214. data/lib/fog/openstack/requests/compute/add_aggregate_host.rb +30 -0
  215. data/lib/fog/openstack/requests/compute/add_fixed_ip.rb +29 -0
  216. data/lib/fog/openstack/requests/compute/add_flavor_access.rb +31 -0
  217. data/lib/fog/openstack/requests/compute/add_security_group.rb +20 -0
  218. data/lib/fog/openstack/requests/compute/allocate_address.rb +39 -0
  219. data/lib/fog/openstack/requests/compute/associate_address.rb +30 -0
  220. data/lib/fog/openstack/requests/compute/attach_volume.rb +38 -0
  221. data/lib/fog/openstack/requests/compute/boot_from_snapshot.rb +41 -0
  222. data/lib/fog/openstack/requests/compute/change_server_password.rb +20 -0
  223. data/lib/fog/openstack/requests/compute/confirm_resize_server.rb +20 -0
  224. data/lib/fog/openstack/requests/compute/create_aggregate.rb +42 -0
  225. data/lib/fog/openstack/requests/compute/create_flavor.rb +85 -0
  226. data/lib/fog/openstack/requests/compute/create_flavor_metadata.rb +38 -0
  227. data/lib/fog/openstack/requests/compute/create_image.rb +44 -0
  228. data/lib/fog/openstack/requests/compute/create_key_pair.rb +46 -0
  229. data/lib/fog/openstack/requests/compute/create_security_group.rb +50 -0
  230. data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +57 -0
  231. data/lib/fog/openstack/requests/compute/create_server.rb +185 -0
  232. data/lib/fog/openstack/requests/compute/create_volume.rb +51 -0
  233. data/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +51 -0
  234. data/lib/fog/openstack/requests/compute/delete_aggregate.rb +28 -0
  235. data/lib/fog/openstack/requests/compute/delete_flavor.rb +28 -0
  236. data/lib/fog/openstack/requests/compute/delete_image.rb +35 -0
  237. data/lib/fog/openstack/requests/compute/delete_key_pair.rb +29 -0
  238. data/lib/fog/openstack/requests/compute/delete_meta.rb +35 -0
  239. data/lib/fog/openstack/requests/compute/delete_metadata.rb +23 -0
  240. data/lib/fog/openstack/requests/compute/delete_security_group.rb +31 -0
  241. data/lib/fog/openstack/requests/compute/delete_security_group_rule.rb +31 -0
  242. data/lib/fog/openstack/requests/compute/delete_server.rb +34 -0
  243. data/lib/fog/openstack/requests/compute/delete_service.rb +32 -0
  244. data/lib/fog/openstack/requests/compute/delete_snapshot.rb +28 -0
  245. data/lib/fog/openstack/requests/compute/delete_volume.rb +28 -0
  246. data/lib/fog/openstack/requests/compute/detach_volume.rb +28 -0
  247. data/lib/fog/openstack/requests/compute/disable_service.rb +37 -0
  248. data/lib/fog/openstack/requests/compute/disable_service_log_reason.rb +38 -0
  249. data/lib/fog/openstack/requests/compute/disassociate_address.rb +25 -0
  250. data/lib/fog/openstack/requests/compute/enable_service.rb +38 -0
  251. data/lib/fog/openstack/requests/compute/evacuate_server.rb +26 -0
  252. data/lib/fog/openstack/requests/compute/get_address.rb +38 -0
  253. data/lib/fog/openstack/requests/compute/get_aggregate.rb +26 -0
  254. data/lib/fog/openstack/requests/compute/get_console_output.rb +24 -0
  255. data/lib/fog/openstack/requests/compute/get_flavor_details.rb +39 -0
  256. data/lib/fog/openstack/requests/compute/get_flavor_metadata.rb +27 -0
  257. data/lib/fog/openstack/requests/compute/get_host_details.rb +66 -0
  258. data/lib/fog/openstack/requests/compute/get_hypervisor_statistics.rb +39 -0
  259. data/lib/fog/openstack/requests/compute/get_image_details.rb +28 -0
  260. data/lib/fog/openstack/requests/compute/get_limits.rb +89 -0
  261. data/lib/fog/openstack/requests/compute/get_metadata.rb +24 -0
  262. data/lib/fog/openstack/requests/compute/get_quota.rb +26 -0
  263. data/lib/fog/openstack/requests/compute/get_quota_defaults.rb +26 -0
  264. data/lib/fog/openstack/requests/compute/get_security_group.rb +37 -0
  265. data/lib/fog/openstack/requests/compute/get_security_group_rule.rb +38 -0
  266. data/lib/fog/openstack/requests/compute/get_server_details.rb +28 -0
  267. data/lib/fog/openstack/requests/compute/get_server_password.rb +28 -0
  268. data/lib/fog/openstack/requests/compute/get_server_volumes.rb +27 -0
  269. data/lib/fog/openstack/requests/compute/get_snapshot_details.rb +29 -0
  270. data/lib/fog/openstack/requests/compute/get_usage.rb +51 -0
  271. data/lib/fog/openstack/requests/compute/get_vnc_console.rb +40 -0
  272. data/lib/fog/openstack/requests/compute/get_volume_details.rb +28 -0
  273. data/lib/fog/openstack/requests/compute/list_address_pools.rb +28 -0
  274. data/lib/fog/openstack/requests/compute/list_addresses.rb +28 -0
  275. data/lib/fog/openstack/requests/compute/list_aggregates.rb +36 -0
  276. data/lib/fog/openstack/requests/compute/list_all_addresses.rb +62 -0
  277. data/lib/fog/openstack/requests/compute/list_flavors.rb +35 -0
  278. data/lib/fog/openstack/requests/compute/list_flavors_detail.rb +35 -0
  279. data/lib/fog/openstack/requests/compute/list_hosts.rb +28 -0
  280. data/lib/fog/openstack/requests/compute/list_images.rb +29 -0
  281. data/lib/fog/openstack/requests/compute/list_images_detail.rb +36 -0
  282. data/lib/fog/openstack/requests/compute/list_key_pairs.rb +38 -0
  283. data/lib/fog/openstack/requests/compute/list_metadata.rb +24 -0
  284. data/lib/fog/openstack/requests/compute/list_private_addresses.rb +28 -0
  285. data/lib/fog/openstack/requests/compute/list_public_addresses.rb +28 -0
  286. data/lib/fog/openstack/requests/compute/list_security_groups.rb +69 -0
  287. data/lib/fog/openstack/requests/compute/list_servers.rb +36 -0
  288. data/lib/fog/openstack/requests/compute/list_servers_detail.rb +43 -0
  289. data/lib/fog/openstack/requests/compute/list_services.rb +66 -0
  290. data/lib/fog/openstack/requests/compute/list_snapshots.rb +40 -0
  291. data/lib/fog/openstack/requests/compute/list_snapshots_detail.rb +26 -0
  292. data/lib/fog/openstack/requests/compute/list_tenants.rb +45 -0
  293. data/lib/fog/openstack/requests/compute/list_tenants_with_flavor_access.rb +26 -0
  294. data/lib/fog/openstack/requests/compute/list_usages.rb +41 -0
  295. data/lib/fog/openstack/requests/compute/list_volumes.rb +39 -0
  296. data/lib/fog/openstack/requests/compute/list_volumes_detail.rb +25 -0
  297. data/lib/fog/openstack/requests/compute/list_zones.rb +33 -0
  298. data/lib/fog/openstack/requests/compute/list_zones_detailed.rb +55 -0
  299. data/lib/fog/openstack/requests/compute/live_migrate_server.rb +26 -0
  300. data/lib/fog/openstack/requests/compute/migrate_server.rb +20 -0
  301. data/lib/fog/openstack/requests/compute/pause_server.rb +24 -0
  302. data/lib/fog/openstack/requests/compute/reboot_server.rb +20 -0
  303. data/lib/fog/openstack/requests/compute/rebuild_server.rb +34 -0
  304. data/lib/fog/openstack/requests/compute/release_address.rb +29 -0
  305. data/lib/fog/openstack/requests/compute/remove_aggregate_host.rb +30 -0
  306. data/lib/fog/openstack/requests/compute/remove_fixed_ip.rb +29 -0
  307. data/lib/fog/openstack/requests/compute/remove_flavor_access.rb +31 -0
  308. data/lib/fog/openstack/requests/compute/remove_security_group.rb +20 -0
  309. data/lib/fog/openstack/requests/compute/rescue_server.rb +24 -0
  310. data/lib/fog/openstack/requests/compute/reset_server_state.rb +20 -0
  311. data/lib/fog/openstack/requests/compute/resize_server.rb +20 -0
  312. data/lib/fog/openstack/requests/compute/resume_server.rb +24 -0
  313. data/lib/fog/openstack/requests/compute/revert_resize_server.rb +26 -0
  314. data/lib/fog/openstack/requests/compute/server_action.rb +16 -0
  315. data/lib/fog/openstack/requests/compute/server_actions.rb +38 -0
  316. data/lib/fog/openstack/requests/compute/server_diagnostics.rb +25 -0
  317. data/lib/fog/openstack/requests/compute/set_metadata.rb +37 -0
  318. data/lib/fog/openstack/requests/compute/set_tenant.rb +19 -0
  319. data/lib/fog/openstack/requests/compute/shelve_offload_server.rb +24 -0
  320. data/lib/fog/openstack/requests/compute/shelve_server.rb +24 -0
  321. data/lib/fog/openstack/requests/compute/start_server.rb +24 -0
  322. data/lib/fog/openstack/requests/compute/stop_server.rb +24 -0
  323. data/lib/fog/openstack/requests/compute/suspend_server.rb +24 -0
  324. data/lib/fog/openstack/requests/compute/unpause_server.rb +24 -0
  325. data/lib/fog/openstack/requests/compute/unshelve_server.rb +24 -0
  326. data/lib/fog/openstack/requests/compute/update_aggregate.rb +37 -0
  327. data/lib/fog/openstack/requests/compute/update_aggregate_metadata.rb +30 -0
  328. data/lib/fog/openstack/requests/compute/update_meta.rb +38 -0
  329. data/lib/fog/openstack/requests/compute/update_metadata.rb +38 -0
  330. data/lib/fog/openstack/requests/compute/update_quota.rb +28 -0
  331. data/lib/fog/openstack/requests/compute/update_server.rb +31 -0
  332. data/lib/fog/openstack/requests/identity_v2/add_user_to_tenant.rb +36 -0
  333. data/lib/fog/openstack/requests/identity_v2/check_token.rb +22 -0
  334. data/lib/fog/openstack/requests/identity_v2/create_ec2_credential.rb +59 -0
  335. data/lib/fog/openstack/requests/identity_v2/create_role.rb +38 -0
  336. data/lib/fog/openstack/requests/identity_v2/create_tenant.rb +34 -0
  337. data/lib/fog/openstack/requests/identity_v2/create_user.rb +45 -0
  338. data/lib/fog/openstack/requests/identity_v2/create_user_role.rb +26 -0
  339. data/lib/fog/openstack/requests/identity_v2/delete_ec2_credential.rb +43 -0
  340. data/lib/fog/openstack/requests/identity_v2/delete_role.rb +30 -0
  341. data/lib/fog/openstack/requests/identity_v2/delete_tenant.rb +33 -0
  342. data/lib/fog/openstack/requests/identity_v2/delete_user.rb +30 -0
  343. data/lib/fog/openstack/requests/identity_v2/delete_user_role.rb +25 -0
  344. data/lib/fog/openstack/requests/identity_v2/get_ec2_credential.rb +50 -0
  345. data/lib/fog/openstack/requests/identity_v2/get_role.rb +30 -0
  346. data/lib/fog/openstack/requests/identity_v2/get_tenant.rb +33 -0
  347. data/lib/fog/openstack/requests/identity_v2/get_tenants_by_id.rb +20 -0
  348. data/lib/fog/openstack/requests/identity_v2/get_tenants_by_name.rb +20 -0
  349. data/lib/fog/openstack/requests/identity_v2/get_user_by_id.rb +34 -0
  350. data/lib/fog/openstack/requests/identity_v2/get_user_by_name.rb +29 -0
  351. data/lib/fog/openstack/requests/identity_v2/list_ec2_credentials.rb +61 -0
  352. data/lib/fog/openstack/requests/identity_v2/list_endpoints_for_token.rb +20 -0
  353. data/lib/fog/openstack/requests/identity_v2/list_roles.rb +34 -0
  354. data/lib/fog/openstack/requests/identity_v2/list_roles_for_user_on_tenant.rb +32 -0
  355. data/lib/fog/openstack/requests/identity_v2/list_tenants.rb +53 -0
  356. data/lib/fog/openstack/requests/identity_v2/list_user_global_roles.rb +20 -0
  357. data/lib/fog/openstack/requests/identity_v2/list_users.rb +47 -0
  358. data/lib/fog/openstack/requests/identity_v2/remove_user_from_tenant.rb +22 -0
  359. data/lib/fog/openstack/requests/identity_v2/set_tenant.rb +21 -0
  360. data/lib/fog/openstack/requests/identity_v2/update_tenant.rb +30 -0
  361. data/lib/fog/openstack/requests/identity_v2/update_user.rb +34 -0
  362. data/lib/fog/openstack/requests/identity_v2/validate_token.rb +22 -0
  363. data/lib/fog/openstack/requests/identity_v3/add_user_to_group.rb +20 -0
  364. data/lib/fog/openstack/requests/identity_v3/auth_domains.rb +24 -0
  365. data/lib/fog/openstack/requests/identity_v3/auth_projects.rb +24 -0
  366. data/lib/fog/openstack/requests/identity_v3/check_domain_group_role.rb +20 -0
  367. data/lib/fog/openstack/requests/identity_v3/check_domain_user_role.rb +20 -0
  368. data/lib/fog/openstack/requests/identity_v3/check_project_group_role.rb +20 -0
  369. data/lib/fog/openstack/requests/identity_v3/check_project_user_role.rb +20 -0
  370. data/lib/fog/openstack/requests/identity_v3/create_domain.rb +21 -0
  371. data/lib/fog/openstack/requests/identity_v3/create_endpoint.rb +21 -0
  372. data/lib/fog/openstack/requests/identity_v3/create_group.rb +21 -0
  373. data/lib/fog/openstack/requests/identity_v3/create_os_credential.rb +21 -0
  374. data/lib/fog/openstack/requests/identity_v3/create_policy.rb +21 -0
  375. data/lib/fog/openstack/requests/identity_v3/create_project.rb +21 -0
  376. data/lib/fog/openstack/requests/identity_v3/create_role.rb +21 -0
  377. data/lib/fog/openstack/requests/identity_v3/create_service.rb +21 -0
  378. data/lib/fog/openstack/requests/identity_v3/create_user.rb +21 -0
  379. data/lib/fog/openstack/requests/identity_v3/delete_domain.rb +20 -0
  380. data/lib/fog/openstack/requests/identity_v3/delete_endpoint.rb +20 -0
  381. data/lib/fog/openstack/requests/identity_v3/delete_group.rb +20 -0
  382. data/lib/fog/openstack/requests/identity_v3/delete_os_credential.rb +20 -0
  383. data/lib/fog/openstack/requests/identity_v3/delete_policy.rb +20 -0
  384. data/lib/fog/openstack/requests/identity_v3/delete_project.rb +20 -0
  385. data/lib/fog/openstack/requests/identity_v3/delete_role.rb +20 -0
  386. data/lib/fog/openstack/requests/identity_v3/delete_service.rb +20 -0
  387. data/lib/fog/openstack/requests/identity_v3/delete_user.rb +20 -0
  388. data/lib/fog/openstack/requests/identity_v3/get_domain.rb +23 -0
  389. data/lib/fog/openstack/requests/identity_v3/get_endpoint.rb +23 -0
  390. data/lib/fog/openstack/requests/identity_v3/get_group.rb +23 -0
  391. data/lib/fog/openstack/requests/identity_v3/get_os_credential.rb +23 -0
  392. data/lib/fog/openstack/requests/identity_v3/get_policy.rb +23 -0
  393. data/lib/fog/openstack/requests/identity_v3/get_project.rb +23 -0
  394. data/lib/fog/openstack/requests/identity_v3/get_role.rb +23 -0
  395. data/lib/fog/openstack/requests/identity_v3/get_service.rb +23 -0
  396. data/lib/fog/openstack/requests/identity_v3/get_user.rb +23 -0
  397. data/lib/fog/openstack/requests/identity_v3/grant_domain_group_role.rb +20 -0
  398. data/lib/fog/openstack/requests/identity_v3/grant_domain_user_role.rb +20 -0
  399. data/lib/fog/openstack/requests/identity_v3/grant_project_group_role.rb +20 -0
  400. data/lib/fog/openstack/requests/identity_v3/grant_project_user_role.rb +20 -0
  401. data/lib/fog/openstack/requests/identity_v3/group_user_check.rb +20 -0
  402. data/lib/fog/openstack/requests/identity_v3/list_domain_group_roles.rb +23 -0
  403. data/lib/fog/openstack/requests/identity_v3/list_domain_user_roles.rb +23 -0
  404. data/lib/fog/openstack/requests/identity_v3/list_domains.rb +24 -0
  405. data/lib/fog/openstack/requests/identity_v3/list_endpoints.rb +24 -0
  406. data/lib/fog/openstack/requests/identity_v3/list_group_users.rb +24 -0
  407. data/lib/fog/openstack/requests/identity_v3/list_groups.rb +32 -0
  408. data/lib/fog/openstack/requests/identity_v3/list_os_credentials.rb +24 -0
  409. data/lib/fog/openstack/requests/identity_v3/list_policies.rb +24 -0
  410. data/lib/fog/openstack/requests/identity_v3/list_project_group_roles.rb +23 -0
  411. data/lib/fog/openstack/requests/identity_v3/list_project_user_roles.rb +23 -0
  412. data/lib/fog/openstack/requests/identity_v3/list_projects.rb +31 -0
  413. data/lib/fog/openstack/requests/identity_v3/list_role_assignments.rb +39 -0
  414. data/lib/fog/openstack/requests/identity_v3/list_roles.rb +24 -0
  415. data/lib/fog/openstack/requests/identity_v3/list_services.rb +24 -0
  416. data/lib/fog/openstack/requests/identity_v3/list_user_groups.rb +23 -0
  417. data/lib/fog/openstack/requests/identity_v3/list_user_projects.rb +23 -0
  418. data/lib/fog/openstack/requests/identity_v3/list_users.rb +24 -0
  419. data/lib/fog/openstack/requests/identity_v3/remove_user_from_group.rb +20 -0
  420. data/lib/fog/openstack/requests/identity_v3/revoke_domain_group_role.rb +20 -0
  421. data/lib/fog/openstack/requests/identity_v3/revoke_domain_user_role.rb +20 -0
  422. data/lib/fog/openstack/requests/identity_v3/revoke_project_group_role.rb +20 -0
  423. data/lib/fog/openstack/requests/identity_v3/revoke_project_user_role.rb +20 -0
  424. data/lib/fog/openstack/requests/identity_v3/token_authenticate.rb +21 -0
  425. data/lib/fog/openstack/requests/identity_v3/token_check.rb +21 -0
  426. data/lib/fog/openstack/requests/identity_v3/token_revoke.rb +21 -0
  427. data/lib/fog/openstack/requests/identity_v3/token_validate.rb +22 -0
  428. data/lib/fog/openstack/requests/identity_v3/update_domain.rb +21 -0
  429. data/lib/fog/openstack/requests/identity_v3/update_endpoint.rb +21 -0
  430. data/lib/fog/openstack/requests/identity_v3/update_group.rb +21 -0
  431. data/lib/fog/openstack/requests/identity_v3/update_os_credential.rb +21 -0
  432. data/lib/fog/openstack/requests/identity_v3/update_policy.rb +21 -0
  433. data/lib/fog/openstack/requests/identity_v3/update_project.rb +21 -0
  434. data/lib/fog/openstack/requests/identity_v3/update_role.rb +21 -0
  435. data/lib/fog/openstack/requests/identity_v3/update_service.rb +21 -0
  436. data/lib/fog/openstack/requests/identity_v3/update_user.rb +21 -0
  437. data/lib/fog/openstack/requests/image_v1/add_member_to_image.rb +25 -0
  438. data/lib/fog/openstack/requests/image_v1/create_image.rb +78 -0
  439. data/lib/fog/openstack/requests/image_v1/delete_image.rb +25 -0
  440. data/lib/fog/openstack/requests/image_v1/get_image.rb +47 -0
  441. data/lib/fog/openstack/requests/image_v1/get_image_by_id.rb +34 -0
  442. data/lib/fog/openstack/requests/image_v1/get_image_members.rb +31 -0
  443. data/lib/fog/openstack/requests/image_v1/get_shared_images.rb +31 -0
  444. data/lib/fog/openstack/requests/image_v1/list_public_images.rb +35 -0
  445. data/lib/fog/openstack/requests/image_v1/list_public_images_detailed.rb +37 -0
  446. data/lib/fog/openstack/requests/image_v1/remove_member_from_image.rb +25 -0
  447. data/lib/fog/openstack/requests/image_v1/set_tenant.rb +21 -0
  448. data/lib/fog/openstack/requests/image_v1/update_image.rb +66 -0
  449. data/lib/fog/openstack/requests/image_v1/update_image_members.rb +39 -0
  450. data/lib/fog/openstack/requests/image_v2/add_member_to_image.rb +26 -0
  451. data/lib/fog/openstack/requests/image_v2/add_tag_to_image.rb +25 -0
  452. data/lib/fog/openstack/requests/image_v2/create_image.rb +54 -0
  453. data/lib/fog/openstack/requests/image_v2/deactivate_image.rb +25 -0
  454. data/lib/fog/openstack/requests/image_v2/delete_image.rb +25 -0
  455. data/lib/fog/openstack/requests/image_v2/download_image.rb +29 -0
  456. data/lib/fog/openstack/requests/image_v2/get_image.rb +47 -0
  457. data/lib/fog/openstack/requests/image_v2/get_image_by_id.rb +34 -0
  458. data/lib/fog/openstack/requests/image_v2/get_image_members.rb +31 -0
  459. data/lib/fog/openstack/requests/image_v2/get_member_details.rb +33 -0
  460. data/lib/fog/openstack/requests/image_v2/get_shared_images.rb +31 -0
  461. data/lib/fog/openstack/requests/image_v2/list_images.rb +35 -0
  462. data/lib/fog/openstack/requests/image_v2/reactivate_image.rb +25 -0
  463. data/lib/fog/openstack/requests/image_v2/remove_member_from_image.rb +25 -0
  464. data/lib/fog/openstack/requests/image_v2/remove_tag_from_image.rb +25 -0
  465. data/lib/fog/openstack/requests/image_v2/set_tenant.rb +21 -0
  466. data/lib/fog/openstack/requests/image_v2/update_image.rb +49 -0
  467. data/lib/fog/openstack/requests/image_v2/update_image_member.rb +34 -0
  468. data/lib/fog/openstack/requests/image_v2/upload_image.rb +30 -0
  469. data/lib/fog/openstack/requests/metering/get_resource.rb +28 -0
  470. data/lib/fog/openstack/requests/metering/get_samples.rb +50 -0
  471. data/lib/fog/openstack/requests/metering/get_statistics.rb +51 -0
  472. data/lib/fog/openstack/requests/metering/list_meters.rb +45 -0
  473. data/lib/fog/openstack/requests/metering/list_resources.rb +28 -0
  474. data/lib/fog/openstack/requests/network/add_router_interface.rb +54 -0
  475. data/lib/fog/openstack/requests/network/associate_floating_ip.rb +47 -0
  476. data/lib/fog/openstack/requests/network/associate_lb_health_monitor.rb +37 -0
  477. data/lib/fog/openstack/requests/network/create_floating_ip.rb +45 -0
  478. data/lib/fog/openstack/requests/network/create_lb_health_monitor.rb +54 -0
  479. data/lib/fog/openstack/requests/network/create_lb_member.rb +51 -0
  480. data/lib/fog/openstack/requests/network/create_lb_pool.rb +58 -0
  481. data/lib/fog/openstack/requests/network/create_lb_vip.rb +58 -0
  482. data/lib/fog/openstack/requests/network/create_network.rb +97 -0
  483. data/lib/fog/openstack/requests/network/create_port.rb +53 -0
  484. data/lib/fog/openstack/requests/network/create_router.rb +76 -0
  485. data/lib/fog/openstack/requests/network/create_security_group.rb +94 -0
  486. data/lib/fog/openstack/requests/network/create_security_group_rule.rb +79 -0
  487. data/lib/fog/openstack/requests/network/create_subnet.rb +54 -0
  488. data/lib/fog/openstack/requests/network/delete_floating_ip.rb +28 -0
  489. data/lib/fog/openstack/requests/network/delete_lb_health_monitor.rb +28 -0
  490. data/lib/fog/openstack/requests/network/delete_lb_member.rb +28 -0
  491. data/lib/fog/openstack/requests/network/delete_lb_pool.rb +28 -0
  492. data/lib/fog/openstack/requests/network/delete_lb_vip.rb +28 -0
  493. data/lib/fog/openstack/requests/network/delete_network.rb +28 -0
  494. data/lib/fog/openstack/requests/network/delete_port.rb +28 -0
  495. data/lib/fog/openstack/requests/network/delete_quota.rb +23 -0
  496. data/lib/fog/openstack/requests/network/delete_router.rb +28 -0
  497. data/lib/fog/openstack/requests/network/delete_security_group.rb +32 -0
  498. data/lib/fog/openstack/requests/network/delete_security_group_rule.rb +32 -0
  499. data/lib/fog/openstack/requests/network/delete_subnet.rb +28 -0
  500. data/lib/fog/openstack/requests/network/disassociate_floating_ip.rb +47 -0
  501. data/lib/fog/openstack/requests/network/disassociate_lb_health_monitor.rb +29 -0
  502. data/lib/fog/openstack/requests/network/get_floating_ip.rb +39 -0
  503. data/lib/fog/openstack/requests/network/get_lb_health_monitor.rb +28 -0
  504. data/lib/fog/openstack/requests/network/get_lb_member.rb +28 -0
  505. data/lib/fog/openstack/requests/network/get_lb_pool.rb +28 -0
  506. data/lib/fog/openstack/requests/network/get_lb_pool_stats.rb +33 -0
  507. data/lib/fog/openstack/requests/network/get_lb_vip.rb +28 -0
  508. data/lib/fog/openstack/requests/network/get_network.rb +40 -0
  509. data/lib/fog/openstack/requests/network/get_port.rb +51 -0
  510. data/lib/fog/openstack/requests/network/get_quota.rb +26 -0
  511. data/lib/fog/openstack/requests/network/get_quotas.rb +26 -0
  512. data/lib/fog/openstack/requests/network/get_router.rb +30 -0
  513. data/lib/fog/openstack/requests/network/get_security_group.rb +52 -0
  514. data/lib/fog/openstack/requests/network/get_security_group_rule.rb +47 -0
  515. data/lib/fog/openstack/requests/network/get_subnet.rb +47 -0
  516. data/lib/fog/openstack/requests/network/list_floating_ips.rb +25 -0
  517. data/lib/fog/openstack/requests/network/list_lb_health_monitors.rb +25 -0
  518. data/lib/fog/openstack/requests/network/list_lb_members.rb +25 -0
  519. data/lib/fog/openstack/requests/network/list_lb_pools.rb +25 -0
  520. data/lib/fog/openstack/requests/network/list_lb_vips.rb +25 -0
  521. data/lib/fog/openstack/requests/network/list_networks.rb +25 -0
  522. data/lib/fog/openstack/requests/network/list_ports.rb +25 -0
  523. data/lib/fog/openstack/requests/network/list_routers.rb +25 -0
  524. data/lib/fog/openstack/requests/network/list_security_group_rules.rb +48 -0
  525. data/lib/fog/openstack/requests/network/list_security_groups.rb +53 -0
  526. data/lib/fog/openstack/requests/network/list_subnets.rb +25 -0
  527. data/lib/fog/openstack/requests/network/remove_router_interface.rb +34 -0
  528. data/lib/fog/openstack/requests/network/set_tenant.rb +20 -0
  529. data/lib/fog/openstack/requests/network/update_lb_health_monitor.rb +43 -0
  530. data/lib/fog/openstack/requests/network/update_lb_member.rb +39 -0
  531. data/lib/fog/openstack/requests/network/update_lb_pool.rb +40 -0
  532. data/lib/fog/openstack/requests/network/update_lb_vip.rb +42 -0
  533. data/lib/fog/openstack/requests/network/update_network.rb +39 -0
  534. data/lib/fog/openstack/requests/network/update_port.rb +43 -0
  535. data/lib/fog/openstack/requests/network/update_quota.rb +27 -0
  536. data/lib/fog/openstack/requests/network/update_router.rb +69 -0
  537. data/lib/fog/openstack/requests/network/update_subnet.rb +43 -0
  538. data/lib/fog/openstack/requests/orchestration/abandon_stack.rb +15 -0
  539. data/lib/fog/openstack/requests/orchestration/build_info.rb +15 -0
  540. data/lib/fog/openstack/requests/orchestration/create_stack.rb +75 -0
  541. data/lib/fog/openstack/requests/orchestration/delete_stack.rb +58 -0
  542. data/lib/fog/openstack/requests/orchestration/get_stack_template.rb +20 -0
  543. data/lib/fog/openstack/requests/orchestration/list_events.rb +46 -0
  544. data/lib/fog/openstack/requests/orchestration/list_resource_events.rb +28 -0
  545. data/lib/fog/openstack/requests/orchestration/list_resource_types.rb +27 -0
  546. data/lib/fog/openstack/requests/orchestration/list_resources.rb +46 -0
  547. data/lib/fog/openstack/requests/orchestration/list_stack_data.rb +27 -0
  548. data/lib/fog/openstack/requests/orchestration/list_stack_data_detailed.rb +49 -0
  549. data/lib/fog/openstack/requests/orchestration/list_stack_events.rb +27 -0
  550. data/lib/fog/openstack/requests/orchestration/patch_stack.rb +37 -0
  551. data/lib/fog/openstack/requests/orchestration/preview_stack.rb +16 -0
  552. data/lib/fog/openstack/requests/orchestration/show_event_details.rb +26 -0
  553. data/lib/fog/openstack/requests/orchestration/show_resource_data.rb +26 -0
  554. data/lib/fog/openstack/requests/orchestration/show_resource_metadata.rb +26 -0
  555. data/lib/fog/openstack/requests/orchestration/show_resource_schema.rb +15 -0
  556. data/lib/fog/openstack/requests/orchestration/show_resource_template.rb +20 -0
  557. data/lib/fog/openstack/requests/orchestration/show_stack_details.rb +26 -0
  558. data/lib/fog/openstack/requests/orchestration/update_stack.rb +66 -0
  559. data/lib/fog/openstack/requests/orchestration/validate_template.rb +16 -0
  560. data/lib/fog/openstack/requests/planning/add_role_to_plan.rb +40 -0
  561. data/lib/fog/openstack/requests/planning/create_plan.rb +33 -0
  562. data/lib/fog/openstack/requests/planning/delete_plan.rb +23 -0
  563. data/lib/fog/openstack/requests/planning/get_plan.rb +58 -0
  564. data/lib/fog/openstack/requests/planning/get_plan_templates.rb +28 -0
  565. data/lib/fog/openstack/requests/planning/list_plans.rb +61 -0
  566. data/lib/fog/openstack/requests/planning/list_roles.rb +32 -0
  567. data/lib/fog/openstack/requests/planning/patch_plan.rb +51 -0
  568. data/lib/fog/openstack/requests/planning/remove_role_from_plan.rb +32 -0
  569. data/lib/fog/openstack/requests/storage/copy_object.rb +25 -0
  570. data/lib/fog/openstack/requests/storage/delete_container.rb +20 -0
  571. data/lib/fog/openstack/requests/storage/delete_multiple_objects.rb +65 -0
  572. data/lib/fog/openstack/requests/storage/delete_object.rb +21 -0
  573. data/lib/fog/openstack/requests/storage/delete_static_large_object.rb +41 -0
  574. data/lib/fog/openstack/requests/storage/get_container.rb +42 -0
  575. data/lib/fog/openstack/requests/storage/get_containers.rb +31 -0
  576. data/lib/fog/openstack/requests/storage/get_object.rb +27 -0
  577. data/lib/fog/openstack/requests/storage/get_object_http_url.rb +21 -0
  578. data/lib/fog/openstack/requests/storage/get_object_https_url.rb +81 -0
  579. data/lib/fog/openstack/requests/storage/head_container.rb +26 -0
  580. data/lib/fog/openstack/requests/storage/head_containers.rb +23 -0
  581. data/lib/fog/openstack/requests/storage/head_object.rb +21 -0
  582. data/lib/fog/openstack/requests/storage/post_set_meta_temp_url_key.rb +33 -0
  583. data/lib/fog/openstack/requests/storage/public_url.rb +28 -0
  584. data/lib/fog/openstack/requests/storage/put_container.rb +24 -0
  585. data/lib/fog/openstack/requests/storage/put_dynamic_obj_manifest.rb +41 -0
  586. data/lib/fog/openstack/requests/storage/put_object.rb +41 -0
  587. data/lib/fog/openstack/requests/storage/put_object_manifest.rb +14 -0
  588. data/lib/fog/openstack/requests/storage/put_static_obj_manifest.rb +55 -0
  589. data/lib/fog/openstack/requests/volume/accept_transfer.rb +22 -0
  590. data/lib/fog/openstack/requests/volume/create_transfer.rb +25 -0
  591. data/lib/fog/openstack/requests/volume/create_volume.rb +22 -0
  592. data/lib/fog/openstack/requests/volume/create_volume_snapshot.rb +26 -0
  593. data/lib/fog/openstack/requests/volume/create_volume_type.rb +41 -0
  594. data/lib/fog/openstack/requests/volume/delete_snapshot.rb +23 -0
  595. data/lib/fog/openstack/requests/volume/delete_transfer.rb +15 -0
  596. data/lib/fog/openstack/requests/volume/delete_volume.rb +23 -0
  597. data/lib/fog/openstack/requests/volume/delete_volume_type.rb +23 -0
  598. data/lib/fog/openstack/requests/volume/extend_volume.rb +25 -0
  599. data/lib/fog/openstack/requests/volume/get_quota.rb +26 -0
  600. data/lib/fog/openstack/requests/volume/get_quota_defaults.rb +26 -0
  601. data/lib/fog/openstack/requests/volume/get_quota_usage.rb +44 -0
  602. data/lib/fog/openstack/requests/volume/get_snapshot_details.rb +15 -0
  603. data/lib/fog/openstack/requests/volume/get_transfer_details.rb +17 -0
  604. data/lib/fog/openstack/requests/volume/get_volume_details.rb +16 -0
  605. data/lib/fog/openstack/requests/volume/get_volume_type_details.rb +32 -0
  606. data/lib/fog/openstack/requests/volume/list_snapshots.rb +41 -0
  607. data/lib/fog/openstack/requests/volume/list_snapshots_detailed.rb +27 -0
  608. data/lib/fog/openstack/requests/volume/list_transfers.rb +18 -0
  609. data/lib/fog/openstack/requests/volume/list_transfers_detailed.rb +18 -0
  610. data/lib/fog/openstack/requests/volume/list_volume_types.rb +41 -0
  611. data/lib/fog/openstack/requests/volume/list_volumes.rb +30 -0
  612. data/lib/fog/openstack/requests/volume/list_volumes_detailed.rb +16 -0
  613. data/lib/fog/openstack/requests/volume/list_zones.rb +32 -0
  614. data/lib/fog/openstack/requests/volume/set_tenant.rb +19 -0
  615. data/lib/fog/openstack/requests/volume/update_quota.rb +28 -0
  616. data/lib/fog/openstack/requests/volume/update_volume_type.rb +41 -0
  617. data/lib/fog/openstack/requests/volume_v1/accept_transfer.rb +2 -0
  618. data/lib/fog/openstack/requests/volume_v1/create_transfer.rb +2 -0
  619. data/lib/fog/openstack/requests/volume_v1/create_volume.rb +49 -0
  620. data/lib/fog/openstack/requests/volume_v1/create_volume_snapshot.rb +44 -0
  621. data/lib/fog/openstack/requests/volume_v1/create_volume_type.rb +2 -0
  622. data/lib/fog/openstack/requests/volume_v1/delete_snapshot.rb +2 -0
  623. data/lib/fog/openstack/requests/volume_v1/delete_transfer.rb +2 -0
  624. data/lib/fog/openstack/requests/volume_v1/delete_volume.rb +2 -0
  625. data/lib/fog/openstack/requests/volume_v1/delete_volume_type.rb +2 -0
  626. data/lib/fog/openstack/requests/volume_v1/extend_volume.rb +2 -0
  627. data/lib/fog/openstack/requests/volume_v1/get_quota.rb +2 -0
  628. data/lib/fog/openstack/requests/volume_v1/get_quota_defaults.rb +2 -0
  629. data/lib/fog/openstack/requests/volume_v1/get_quota_usage.rb +2 -0
  630. data/lib/fog/openstack/requests/volume_v1/get_snapshot_details.rb +32 -0
  631. data/lib/fog/openstack/requests/volume_v1/get_transfer_details.rb +2 -0
  632. data/lib/fog/openstack/requests/volume_v1/get_volume_details.rb +35 -0
  633. data/lib/fog/openstack/requests/volume_v1/get_volume_type_details.rb +2 -0
  634. data/lib/fog/openstack/requests/volume_v1/list_snapshots.rb +2 -0
  635. data/lib/fog/openstack/requests/volume_v1/list_snapshots_detailed.rb +2 -0
  636. data/lib/fog/openstack/requests/volume_v1/list_transfers.rb +2 -0
  637. data/lib/fog/openstack/requests/volume_v1/list_transfers_detailed.rb +2 -0
  638. data/lib/fog/openstack/requests/volume_v1/list_volume_types.rb +2 -0
  639. data/lib/fog/openstack/requests/volume_v1/list_volumes.rb +46 -0
  640. data/lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb +46 -0
  641. data/lib/fog/openstack/requests/volume_v1/list_zones.rb +2 -0
  642. data/lib/fog/openstack/requests/volume_v1/real.rb +11 -0
  643. data/lib/fog/openstack/requests/volume_v1/real_mock.rb +14 -0
  644. data/lib/fog/openstack/requests/volume_v1/set_tenant.rb +2 -0
  645. data/lib/fog/openstack/requests/volume_v1/update_quota.rb +2 -0
  646. data/lib/fog/openstack/requests/volume_v2/accept_transfer.rb +2 -0
  647. data/lib/fog/openstack/requests/volume_v2/create_transfer.rb +2 -0
  648. data/lib/fog/openstack/requests/volume_v2/create_volume.rb +49 -0
  649. data/lib/fog/openstack/requests/volume_v2/create_volume_snapshot.rb +43 -0
  650. data/lib/fog/openstack/requests/volume_v2/create_volume_type.rb +2 -0
  651. data/lib/fog/openstack/requests/volume_v2/delete_snapshot.rb +2 -0
  652. data/lib/fog/openstack/requests/volume_v2/delete_transfer.rb +2 -0
  653. data/lib/fog/openstack/requests/volume_v2/delete_volume.rb +2 -0
  654. data/lib/fog/openstack/requests/volume_v2/delete_volume_type.rb +2 -0
  655. data/lib/fog/openstack/requests/volume_v2/extend_volume.rb +2 -0
  656. data/lib/fog/openstack/requests/volume_v2/get_quota.rb +2 -0
  657. data/lib/fog/openstack/requests/volume_v2/get_quota_defaults.rb +2 -0
  658. data/lib/fog/openstack/requests/volume_v2/get_quota_usage.rb +2 -0
  659. data/lib/fog/openstack/requests/volume_v2/get_snapshot_details.rb +32 -0
  660. data/lib/fog/openstack/requests/volume_v2/get_transfer_details.rb +2 -0
  661. data/lib/fog/openstack/requests/volume_v2/get_volume_details.rb +35 -0
  662. data/lib/fog/openstack/requests/volume_v2/get_volume_type_details.rb +2 -0
  663. data/lib/fog/openstack/requests/volume_v2/list_snapshots.rb +2 -0
  664. data/lib/fog/openstack/requests/volume_v2/list_snapshots_detailed.rb +2 -0
  665. data/lib/fog/openstack/requests/volume_v2/list_transfers.rb +2 -0
  666. data/lib/fog/openstack/requests/volume_v2/list_transfers_detailed.rb +2 -0
  667. data/lib/fog/openstack/requests/volume_v2/list_volume_types.rb +2 -0
  668. data/lib/fog/openstack/requests/volume_v2/list_volumes.rb +46 -0
  669. data/lib/fog/openstack/requests/volume_v2/list_volumes_detailed.rb +46 -0
  670. data/lib/fog/openstack/requests/volume_v2/list_zones.rb +2 -0
  671. data/lib/fog/openstack/requests/volume_v2/real.rb +11 -0
  672. data/lib/fog/openstack/requests/volume_v2/real_mock.rb +14 -0
  673. data/lib/fog/openstack/requests/volume_v2/set_tenant.rb +2 -0
  674. data/lib/fog/openstack/requests/volume_v2/update_quota.rb +2 -0
  675. data/lib/fog/openstack/requests/volume_v2/update_volume_type.rb +2 -0
  676. data/lib/fog/openstack/storage.rb +181 -0
  677. data/lib/fog/openstack/version.rb +5 -0
  678. data/lib/fog/openstack/volume.rb +31 -0
  679. data/lib/fog/openstack/volume_v1.rb +163 -0
  680. data/lib/fog/openstack/volume_v2.rb +164 -0
  681. data/tests/helper.rb +21 -0
  682. data/tests/helpers/collection_helper.rb +97 -0
  683. data/tests/helpers/compute/flavors_helper.rb +32 -0
  684. data/tests/helpers/compute/server_helper.rb +25 -0
  685. data/tests/helpers/compute/servers_helper.rb +10 -0
  686. data/tests/helpers/formats_helper.rb +98 -0
  687. data/tests/helpers/formats_helper_tests.rb +110 -0
  688. data/tests/helpers/mock_helper.rb +17 -0
  689. data/tests/helpers/model_helper.rb +31 -0
  690. data/tests/helpers/responds_to_helper.rb +11 -0
  691. data/tests/helpers/schema_validator_tests.rb +107 -0
  692. data/tests/helpers/succeeds_helper.rb +9 -0
  693. data/tests/openstack/authenticate_tests.rb +200 -0
  694. data/tests/openstack/models/compute/images_tests.rb +13 -0
  695. data/tests/openstack/models/compute/security_group_tests.rb +54 -0
  696. data/tests/openstack/models/compute/server_tests.rb +220 -0
  697. data/tests/openstack/models/identity/ec2_credential_tests.rb +41 -0
  698. data/tests/openstack/models/identity/ec2_credentials_tests.rb +58 -0
  699. data/tests/openstack/models/identity/role_tests.rb +26 -0
  700. data/tests/openstack/models/identity/roles_tests.rb +20 -0
  701. data/tests/openstack/models/identity/tenant_tests.rb +30 -0
  702. data/tests/openstack/models/identity/tenants_tests.rb +26 -0
  703. data/tests/openstack/models/identity/user_tests.rb +46 -0
  704. data/tests/openstack/models/identity/users_tests.rb +42 -0
  705. data/tests/openstack/models/image/image_tests.rb +36 -0
  706. data/tests/openstack/models/image/images_tests.rb +19 -0
  707. data/tests/openstack/models/network/floating_ip_tests.rb +22 -0
  708. data/tests/openstack/models/network/floating_ips_tests.rb +19 -0
  709. data/tests/openstack/models/network/lb_health_monitor_tests.rb +52 -0
  710. data/tests/openstack/models/network/lb_health_monitors_tests.rb +21 -0
  711. data/tests/openstack/models/network/lb_member_tests.rb +28 -0
  712. data/tests/openstack/models/network/lb_members_tests.rb +21 -0
  713. data/tests/openstack/models/network/lb_pool_tests.rb +53 -0
  714. data/tests/openstack/models/network/lb_pools_tests.rb +20 -0
  715. data/tests/openstack/models/network/lb_vip_tests.rb +39 -0
  716. data/tests/openstack/models/network/lb_vips_tests.rb +21 -0
  717. data/tests/openstack/models/network/network_tests.rb +61 -0
  718. data/tests/openstack/models/network/networks_tests.rb +21 -0
  719. data/tests/openstack/models/network/port_tests.rb +28 -0
  720. data/tests/openstack/models/network/ports_tests.rb +25 -0
  721. data/tests/openstack/models/network/router_tests.rb +39 -0
  722. data/tests/openstack/models/network/routers_tests.rb +21 -0
  723. data/tests/openstack/models/network/security_group_rule_tests.rb +27 -0
  724. data/tests/openstack/models/network/security_group_rules_tests.rb +25 -0
  725. data/tests/openstack/models/network/security_group_tests.rb +17 -0
  726. data/tests/openstack/models/network/security_groups_tests.rb +16 -0
  727. data/tests/openstack/models/network/subnet_tests.rb +30 -0
  728. data/tests/openstack/models/network/subnets_tests.rb +27 -0
  729. data/tests/openstack/models/planning/.gitkeep +0 -0
  730. data/tests/openstack/models/planning/plan_tests.rb +51 -0
  731. data/tests/openstack/models/planning/plans_tests.rb +18 -0
  732. data/tests/openstack/models/planning/role_tests.rb +14 -0
  733. data/tests/openstack/models/storage/file_tests.rb +251 -0
  734. data/tests/openstack/requests/baremetal/chassis_tests.rb +48 -0
  735. data/tests/openstack/requests/baremetal/driver_tests.rb +40 -0
  736. data/tests/openstack/requests/baremetal/node_tests.rb +83 -0
  737. data/tests/openstack/requests/baremetal/port_tests.rb +56 -0
  738. data/tests/openstack/requests/compute/address_tests.rb +58 -0
  739. data/tests/openstack/requests/compute/aggregate_tests.rb +59 -0
  740. data/tests/openstack/requests/compute/availability_zone_tests.rb +18 -0
  741. data/tests/openstack/requests/compute/flavor_tests.rb +95 -0
  742. data/tests/openstack/requests/compute/helper.rb +41 -0
  743. data/tests/openstack/requests/compute/image_tests.rb +58 -0
  744. data/tests/openstack/requests/compute/keypair_tests.rb +30 -0
  745. data/tests/openstack/requests/compute/limit_tests.rb +59 -0
  746. data/tests/openstack/requests/compute/quota_tests.rb +60 -0
  747. data/tests/openstack/requests/compute/security_group_tests.rb +61 -0
  748. data/tests/openstack/requests/compute/server_tests.rb +289 -0
  749. data/tests/openstack/requests/compute/service_tests.rb +33 -0
  750. data/tests/openstack/requests/compute/tenant_tests.rb +19 -0
  751. data/tests/openstack/requests/compute/volume_tests.rb +38 -0
  752. data/tests/openstack/requests/identity/ec2_credentials_tests.rb +44 -0
  753. data/tests/openstack/requests/identity/helper.rb +13 -0
  754. data/tests/openstack/requests/identity/role_tests.rb +45 -0
  755. data/tests/openstack/requests/identity/tenant_tests.rb +56 -0
  756. data/tests/openstack/requests/identity/user_tests.rb +41 -0
  757. data/tests/openstack/requests/image/image_tests.rb +134 -0
  758. data/tests/openstack/requests/metering/meter_tests.rb +52 -0
  759. data/tests/openstack/requests/metering/resource_tests.rb +19 -0
  760. data/tests/openstack/requests/network/lb_health_monitor_tests.rb +93 -0
  761. data/tests/openstack/requests/network/lb_member_tests.rb +60 -0
  762. data/tests/openstack/requests/network/lb_pool_tests.rb +80 -0
  763. data/tests/openstack/requests/network/lb_vip_tests.rb +71 -0
  764. data/tests/openstack/requests/network/network_tests.rb +107 -0
  765. data/tests/openstack/requests/network/port_tests.rb +66 -0
  766. data/tests/openstack/requests/network/quota_tests.rb +65 -0
  767. data/tests/openstack/requests/network/router_tests.rb +73 -0
  768. data/tests/openstack/requests/network/security_group_rule_tests.rb +58 -0
  769. data/tests/openstack/requests/network/security_group_tests.rb +43 -0
  770. data/tests/openstack/requests/network/subnet_tests.rb +66 -0
  771. data/tests/openstack/requests/orchestration/stack_tests.rb +64 -0
  772. data/tests/openstack/requests/planning/.gitkeep +0 -0
  773. data/tests/openstack/requests/planning/plan_tests.rb +65 -0
  774. data/tests/openstack/requests/planning/role_tests.rb +16 -0
  775. data/tests/openstack/requests/storage/container_tests.rb +64 -0
  776. data/tests/openstack/requests/storage/large_object_tests.rb +372 -0
  777. data/tests/openstack/requests/storage/object_tests.rb +208 -0
  778. data/tests/openstack/requests/volume/availability_zone_tests.rb +13 -0
  779. data/tests/openstack/requests/volume/quota_tests.rb +50 -0
  780. data/tests/openstack/requests/volume/volume_type_tests.rb +32 -0
  781. data/tests/openstack/storage_tests.rb +18 -0
  782. data/tests/openstack/version_tests.rb +55 -0
  783. data/tests/openstack/volume_tests.rb +18 -0
  784. metadata +967 -0
@@ -0,0 +1,13 @@
1
+ class OpenStack
2
+ module Identity
3
+ def self.get_tenant_id
4
+ identity = Fog::Identity[:openstack]
5
+ ENV['OPENSTACK_TENANT_NAME'] || identity.list_tenants.body['tenants'].first['id']
6
+ end
7
+
8
+ def self.get_user_id
9
+ identity = Fog::Identity[:openstack]
10
+ ENV['OPENSTACK_USER_ID'] || identity.list_users.body['users'].first['id']
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,45 @@
1
+ Shindo.tests('Fog::Identity[:openstack] | role requests', ['openstack']) do
2
+ @role_format = {
3
+ 'id' => String,
4
+ 'name' => String
5
+ }
6
+ @user = Fog::Identity[:openstack].list_users.body['users'].first
7
+ @tenant = Fog::Identity[:openstack].list_tenants.body['tenants'].first
8
+ tests('success') do
9
+
10
+ tests('#create_role("Role Name")').formats(@role_format, false) do
11
+ @role = Fog::Identity[:openstack].create_role("Role Name").body['role']
12
+ end
13
+
14
+ tests('#list_roles').formats({'roles' => [@role_format]}) do
15
+ Fog::Identity[:openstack].list_roles.body
16
+ end
17
+
18
+ tests("#get_role('#{@role['id']}')").formats(@role_format) do
19
+ Fog::Identity[:openstack].get_role(@role['id']).body['role']
20
+ end
21
+
22
+ tests('#create_user_role(@tenant["id"], @user["id"], @role["id"])').formats(@role_format) do
23
+ Fog::Identity[:openstack].create_user_role(@tenant['id'], @user['id'], @role['id']).body['role']
24
+ end
25
+
26
+ tests("#list_roles_for_user_on_tenant('#{@tenant['id']}','#{@user['id']}')").formats([@role_format]) do
27
+ Fog::Identity[:openstack].list_roles_for_user_on_tenant(@tenant['id'], @user['id']).body['roles']
28
+ end
29
+
30
+ tests("#delete_user_role with tenant").returns("") do
31
+ Fog::Identity[:openstack].delete_user_role(@tenant['id'], @user['id'], @role['id']).body
32
+ end
33
+
34
+ tests("#delete_user_role with tenant").formats(@role_format) do
35
+ # FIXME - Response (under mocks) is empty String which does not match schema
36
+ pending
37
+ Fog::Identity[:openstack].delete_user_role(@tenant['id'], @user['id'], @role['id']).body
38
+ end
39
+
40
+ tests("#delete_role('#{@role['id']}')").succeeds do
41
+ Fog::Identity[:openstack].delete_role(@role['id']).body
42
+ end
43
+
44
+ end
45
+ end
@@ -0,0 +1,56 @@
1
+ Shindo.tests('Fog::Identity[:openstack] | tenant requests', ['openstack']) do
2
+
3
+ @tenant_format = {
4
+ 'id' => String,
5
+ 'name' => String,
6
+ 'enabled' => Fog::Nullable::Boolean,
7
+ 'description' => Fog::Nullable::String
8
+ }
9
+
10
+ @role_format = {
11
+ 'id' => String,
12
+ 'name' => String
13
+ }
14
+
15
+ @tenant_name = Fog::Mock.random_hex(64)
16
+ @tenant_name_update = Fog::Mock.random_hex(64)
17
+ @tenant_name_update2 = Fog::Mock.random_hex(64)
18
+
19
+ tests('success') do
20
+ tests('#list_tenants').formats({'tenants' => [@tenant_format], 'tenants_links' => []}) do
21
+ Fog::Identity[:openstack].list_tenants.body
22
+ end
23
+
24
+ tests('#list_roles_for_user_on_tenant(0,1)').
25
+ formats({'roles' => [@role_format]}) do
26
+
27
+ openstack = Fog::Identity[:openstack]
28
+ openstack.list_roles_for_user_on_tenant(
29
+ openstack.current_tenant['id'], OpenStack::Identity.get_user_id).body
30
+ end
31
+
32
+ tests('#create_tenant').formats({'tenant' => @tenant_format}) do
33
+ @tenant = Fog::Identity[:openstack].create_tenant('name' => @tenant_name).body
34
+ end
35
+
36
+ tests('#get_tenant').formats({'tenant' => @tenant_format}) do
37
+ Fog::Identity[:openstack].get_tenant(@tenant['tenant']['id']).body
38
+ end
39
+
40
+ tests('#update_tenant check format').formats({'tenant' => @tenant_format}) do
41
+ @tenant = Fog::Identity[:openstack].update_tenant(
42
+ @tenant['tenant']['id'], 'name' => @tenant_name_update).body
43
+ end
44
+
45
+ tests('#update_tenant update name').succeeds do
46
+ @tenant = Fog::Identity[:openstack].update_tenant(
47
+ @tenant['tenant']['id'], 'name' => @tenant_name_update2).body
48
+ @tenant['tenant']['name'] == @tenant_name_update2
49
+ end
50
+
51
+ tests('#delete_tenant').succeeds do
52
+ Fog::Identity[:openstack].delete_tenant(@tenant['tenant']['id'])
53
+ end
54
+
55
+ end
56
+ end
@@ -0,0 +1,41 @@
1
+ Shindo.tests('Fog::Identity[:openstack] | user requests', ['openstack']) do
2
+
3
+ @user_format = {
4
+ 'id' => String,
5
+ 'name' => String,
6
+ 'enabled' => Fog::Boolean,
7
+ 'email' => String,
8
+ 'tenantId' => Fog::Nullable::String
9
+ }
10
+
11
+ tests('success') do
12
+
13
+ @user_name = Fog::Mock.random_hex(64)
14
+ @user_name_update = Fog::Mock.random_hex(64)
15
+
16
+ tests("#create_user('#{@user_name}', 'mypassword', 'morph@example.com', 't3n4nt1d', true)").formats(@user_format, false) do
17
+ @user = Fog::Identity[:openstack].create_user(@user_name, "mypassword", "morph@example.com", OpenStack::Identity.get_tenant_id).body['user']
18
+ end
19
+
20
+ tests('#list_users').formats({'users' => [@user_format]}) do
21
+ Fog::Identity[:openstack].list_users.body
22
+ end
23
+
24
+ tests('#get_user_by_id').formats(@user_format) do
25
+ Fog::Identity[:openstack].get_user_by_id(@user['id']).body['user']
26
+ end
27
+
28
+ tests('#get_user_by_name').formats(@user_format) do
29
+ Fog::Identity[:openstack].get_user_by_name(@user['name']).body['user']
30
+ end
31
+
32
+ tests("#update_user(#{@user['id']}, :name => 'fogupdateduser')").succeeds do
33
+ Fog::Identity[:openstack].update_user(@user['id'], :name => @user_name_update, :email => 'fog@test.com')
34
+ end
35
+
36
+ tests("#delete_user(#{@user['id']})").succeeds do
37
+ Fog::Identity[:openstack].delete_user(@user['id'])
38
+ end
39
+
40
+ end
41
+ end
@@ -0,0 +1,134 @@
1
+ Shindo.tests('Fog::Image[:openstack] | image requests', ['openstack']) do
2
+ openstack = Fog::Identity[:openstack]
3
+ @image_attributes = {
4
+ :name => 'new image',
5
+ :owner => openstack.current_tenant['id'],
6
+ :is_public => true,
7
+ :copy_from => 'http://website.com/image.iso',
8
+ :disk_format => 'iso',
9
+ :properties =>
10
+ {:user_id => openstack.current_user['id'],
11
+ :owner_id => openstack.current_tenant['id']},
12
+ :container_format => 'bare' }
13
+
14
+ @image_format = {
15
+ 'name' => String,
16
+ 'container_format' => String,
17
+ 'disk_format' => String,
18
+ 'checksum' => String,
19
+ 'id' => String,
20
+ 'size' => Integer
21
+ }
22
+
23
+ @detailed_image_format = {
24
+ 'id' => String,
25
+ 'name' => String,
26
+ 'size' => Integer,
27
+ 'disk_format' => String,
28
+ 'container_format' => String,
29
+ 'checksum' => String,
30
+ 'min_disk' => Integer,
31
+ 'created_at' => String,
32
+ 'deleted_at' => Fog::Nullable::String,
33
+ 'updated_at' => String,
34
+ 'deleted' => Fog::Boolean,
35
+ 'protected' => Fog::Boolean,
36
+ 'is_public' => Fog::Boolean,
37
+ 'status' => String,
38
+ 'min_ram' => Integer,
39
+ 'owner' => Fog::Nullable::String,
40
+ 'properties' => Hash
41
+ }
42
+
43
+ @image_meta_format ={
44
+ 'X-Image-Meta-Is_public'=>String,
45
+ 'X-Image-Meta-Min_disk'=>Fog::Nullable::String,
46
+ 'X-Image-Meta-Property-Ramdisk_id'=>Fog::Nullable::String,
47
+ 'X-Image-Meta-Disk_format'=>Fog::Nullable::String,
48
+ 'X-Image-Meta-Created_at'=>String,
49
+ 'X-Image-Meta-Container_format'=>Fog::Nullable::String,
50
+ 'Etag'=>String,
51
+ 'Location'=>String,
52
+ 'X-Image-Meta-Protected'=>String,
53
+ 'Date'=>String,
54
+ 'X-Image-Meta-Name'=>String,
55
+ 'X-Image-Meta-Min_ram'=>String,
56
+ 'Content-Type'=>String,
57
+ 'X-Image-Meta-Updated_at'=>String,
58
+ 'X-Image-Meta-Property-Kernel_id'=>Fog::Nullable::String,
59
+ 'X-Image-Meta-Size'=>String,
60
+ 'X-Image-Meta-Checksum'=>Fog::Nullable::String,
61
+ 'X-Image-Meta-Deleted'=>String,
62
+ 'Content-Length'=>String,
63
+ 'X-Image-Meta-Status'=>String,
64
+ 'X-Image-Meta-Owner'=>String,
65
+ 'X-Image-Meta-Id'=>String
66
+ }
67
+
68
+ @image_members_format =[
69
+ {'can_share'=>Fog::Nullable::Boolean,
70
+ 'member_id'=>String
71
+ }
72
+ ]
73
+
74
+ tests('success') do
75
+ tests('#list_public_images').data_matches_schema({'images' => [@image_format]}) do
76
+ Fog::Image[:openstack].list_public_images.body
77
+ end
78
+
79
+ tests('#list_public_images_detailed').data_matches_schema({'images' => [@detailed_image_format]}) do
80
+ Fog::Image[:openstack].list_public_images_detailed.body
81
+ end
82
+
83
+ tests('#create_image').data_matches_schema({'image' => @detailed_image_format}) do
84
+ begin
85
+ if Fog.mocking?
86
+ image_attributes = @image_attributes
87
+ else
88
+ require 'tempfile'
89
+ image_attributes = @image_attributes.dup
90
+ image_attributes.delete(:copy_from)
91
+ test_iso = Tempfile.new(['fog_test_iso', '.iso'])
92
+ test_iso.write Fog::Mock.random_hex(32)
93
+ test_iso.close
94
+ image_attributes[:location] = test_iso.path
95
+ end
96
+ @instance = Fog::Image[:openstack].create_image(image_attributes).body
97
+ ensure
98
+ test_iso.delete if test_iso
99
+ end
100
+ end
101
+
102
+ tests('#get_image').data_matches_schema(@image_meta_format) do
103
+ Fog::Image[:openstack].get_image(@instance['image']['id']).headers
104
+ end
105
+
106
+ tests('#update_image').data_matches_schema(@detailed_image_format) do
107
+ Fog::Image[:openstack].update_image({:id => @instance['image']['id'],
108
+ :name => 'edit image'}).body['image']
109
+ end
110
+
111
+ tests('#add_member_to_image').succeeds do
112
+ Fog::Image[:openstack].add_member_to_image(
113
+ @instance['image']['id'], @instance['image']['owner'])
114
+ end
115
+
116
+ tests('#get_image_members').succeeds do
117
+ Fog::Image[:openstack].get_image_members(@instance['image']['id'])
118
+ end
119
+
120
+ tests('#get_shared_images').succeeds do
121
+ Fog::Image[:openstack].get_shared_images(@instance['image']['owner'])
122
+ end
123
+
124
+ tests('#remove_member_from_image').succeeds do
125
+ Fog::Image[:openstack].remove_member_from_image(
126
+ @instance['image']['id'], @instance['image']['owner'])
127
+ end
128
+
129
+ tests('#delete_image').succeeds do
130
+ Fog::Image[:openstack].delete_image(@instance['image']['id'])
131
+ end
132
+
133
+ end
134
+ end
@@ -0,0 +1,52 @@
1
+ Shindo.tests('Fog::Metering[:openstack] | meter requests', ['openstack']) do
2
+
3
+ @sample_format = {
4
+ 'counter_name' => String,
5
+ 'user_id' => String,
6
+ 'resource_id' => String,
7
+ 'timestamp' => String,
8
+ 'resource_metadata' => Hash,
9
+ 'source' => String,
10
+ 'counter_unit' => String,
11
+ 'counter_volume' => Float,
12
+ 'project_id' => String,
13
+ 'message_id' => String,
14
+ 'counter_type' => String
15
+ }
16
+
17
+ @meter_format = {
18
+ 'user_id' => String,
19
+ 'name' => String,
20
+ 'resource_id' => String,
21
+ 'project_id' => String,
22
+ 'type' => String,
23
+ 'unit' => String
24
+ }
25
+
26
+ @statistics_format = {
27
+ 'count' => Integer,
28
+ 'duration_start' => String,
29
+ 'min' => Float,
30
+ 'max' => Float,
31
+ 'duration_end' => String,
32
+ 'period' => Integer,
33
+ 'period_end' => String,
34
+ 'duration' => Float,
35
+ 'period_start' => String,
36
+ 'avg' => Float,
37
+ 'sum' => Float
38
+ }
39
+ tests('success') do
40
+ tests('#list_meters').formats([@meter_format]) do
41
+ Fog::Metering[:openstack].list_meters.body
42
+ end
43
+
44
+ tests('#get_samples').formats([@sample_format]) do
45
+ Fog::Metering[:openstack].get_samples('test').body
46
+ end
47
+
48
+ tests('#get_statistics').formats([@statistics_format]) do
49
+ Fog::Metering[:openstack].get_statistics('test').body
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,19 @@
1
+ Shindo.tests('Fog::Metering[:openstack] | resource requests', ['openstack']) do
2
+
3
+ @resource_format = {
4
+ 'resource_id' => String,
5
+ 'project_id' => String,
6
+ 'user_id' => String,
7
+ 'metadata' => Hash,
8
+ }
9
+
10
+ tests('success') do
11
+ tests('#list_resource').formats([@resource_format]) do
12
+ Fog::Metering[:openstack].list_resources.body
13
+ end
14
+
15
+ tests('#get_resource').formats(@resource_format) do
16
+ Fog::Metering[:openstack].get_resource('test').body
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,93 @@
1
+ Shindo.tests('Fog::Network[:openstack] | lb_health_monitor requests', ['openstack']) do
2
+
3
+ @lb_health_monitor_format = {
4
+ 'id' => String,
5
+ 'type' => String,
6
+ 'delay' => Integer,
7
+ 'timeout' => Integer,
8
+ 'max_retries' => Integer,
9
+ 'http_method' => String,
10
+ 'url_path' => String,
11
+ 'expected_codes' => String,
12
+ 'status' => String,
13
+ 'admin_state_up' => Fog::Boolean,
14
+ 'tenant_id' => String,
15
+ }
16
+
17
+ tests('success') do
18
+ before do
19
+ @lb_pool = Fog::Network[:openstack].lb_pools.create(:subnet_id => 'subnet_id',
20
+ :protocol => 'HTTP',
21
+ :lb_method => 'ROUND_ROBIN')
22
+ end
23
+
24
+ after do
25
+ @lb_pool.destroy
26
+ end
27
+
28
+ tests('#create_lb_health_monitor').formats({'health_monitor' => @lb_health_monitor_format}) do
29
+ type = 'PING'
30
+ delay = 1
31
+ timeout = 5
32
+ max_retries = 10
33
+ attributes = {:http_method => 'GET', :url_path => '/', :expected_codes => '200, 201',
34
+ :admin_state_up => true, :tenant_id => 'tenant_id'}
35
+ Fog::Network[:openstack].create_lb_health_monitor(type, delay, timeout, max_retries, attributes).body
36
+ end
37
+
38
+ tests('#list_lb_health_monitors').formats({'health_monitors' => [@lb_health_monitor_format]}) do
39
+ Fog::Network[:openstack].list_lb_health_monitors.body
40
+ end
41
+
42
+ tests('#get_lb_health_monitor').formats({'health_monitor' => @lb_health_monitor_format}) do
43
+ lb_health_monitor_id = Fog::Network[:openstack].lb_health_monitors.all.first.id
44
+ Fog::Network[:openstack].get_lb_health_monitor(lb_health_monitor_id).body
45
+ end
46
+
47
+ tests('#update_lb_health_monitor').formats({'health_monitor' => @lb_health_monitor_format}) do
48
+ lb_health_monitor_id = Fog::Network[:openstack].lb_health_monitors.all.first.id
49
+ attributes = {:delay => 5, :timeout => 10, :max_retries => 20,
50
+ :http_method => 'POST', :url_path => '/varz', :expected_codes => '200',
51
+ :admin_state_up => false}
52
+ Fog::Network[:openstack].update_lb_health_monitor(lb_health_monitor_id, attributes).body
53
+ end
54
+
55
+ tests('#associate_lb_health_monitor').succeeds do
56
+ lb_health_monitor_id = Fog::Network[:openstack].lb_health_monitors.all.first.id
57
+ Fog::Network[:openstack].associate_lb_health_monitor(@lb_pool.id, lb_health_monitor_id)
58
+ end
59
+
60
+ tests('#disassociate_lb_health_monitor').succeeds do
61
+ lb_health_monitor_id = Fog::Network[:openstack].lb_health_monitors.all.first.id
62
+ Fog::Network[:openstack].disassociate_lb_health_monitor(@lb_pool.id, lb_health_monitor_id)
63
+ end
64
+
65
+ tests('#delete_lb_health_monitor').succeeds do
66
+ lb_health_monitor_id = Fog::Network[:openstack].lb_health_monitors.all.first.id
67
+ Fog::Network[:openstack].delete_lb_health_monitor(lb_health_monitor_id)
68
+ end
69
+ end
70
+
71
+ tests('failure') do
72
+ tests('#get_lb_health_monitor').raises(Fog::Network::OpenStack::NotFound) do
73
+ Fog::Network[:openstack].get_lb_health_monitor(0)
74
+ end
75
+
76
+ tests('#update_lb_health_monitor').raises(Fog::Network::OpenStack::NotFound) do
77
+ Fog::Network[:openstack].update_lb_health_monitor(0, {})
78
+ end
79
+
80
+ tests('#associate_lb_health_monitor').raises(Fog::Network::OpenStack::NotFound) do
81
+ Fog::Network[:openstack].associate_lb_health_monitor(0, 0)
82
+ end
83
+
84
+ tests('#disassociate_lb_health_monitor').raises(Fog::Network::OpenStack::NotFound) do
85
+ Fog::Network[:openstack].disassociate_lb_health_monitor(0, 0)
86
+ end
87
+
88
+ tests('#delete_lb_health_monitor').raises(Fog::Network::OpenStack::NotFound) do
89
+ Fog::Network[:openstack].delete_lb_health_monitor(0)
90
+ end
91
+ end
92
+
93
+ end