fog 1.17.0 → 1.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (386) hide show
  1. data/Rakefile +19 -1
  2. data/changelog.txt +408 -0
  3. data/fog.gemspec +3 -3
  4. data/fogkeytest1.pem +27 -0
  5. data/lib/fog/aws/compute.rb +0 -1
  6. data/lib/fog/aws/data_pipeline.rb +0 -1
  7. data/lib/fog/aws/models/auto_scaling/group.rb +1 -1
  8. data/lib/fog/aws/models/compute/route_table.rb +1 -1
  9. data/lib/fog/aws/models/compute/server.rb +1 -1
  10. data/lib/fog/aws/parsers/compute/describe_internet_gateways.rb +1 -1
  11. data/lib/fog/aws/requests/compute/create_internet_gateway.rb +5 -4
  12. data/lib/fog/aws/requests/compute/create_tags.rb +2 -0
  13. data/lib/fog/aws/requests/compute/create_volume.rb +1 -1
  14. data/lib/fog/aws/requests/compute/delete_internet_gateway.rb +1 -1
  15. data/lib/fog/aws/requests/compute/describe_internet_gateways.rb +1 -1
  16. data/lib/fog/aws/requests/compute/run_instances.rb +1 -1
  17. data/lib/fog/bin/hp.rb +17 -0
  18. data/lib/fog/compute.rb +11 -0
  19. data/lib/fog/ecloud/compute.rb +8 -3
  20. data/lib/fog/ecloud/models/compute/admin_organization.rb +4 -4
  21. data/lib/fog/ecloud/models/compute/catalog_item.rb +1 -1
  22. data/lib/fog/ecloud/models/compute/compute_pool.rb +8 -8
  23. data/lib/fog/ecloud/models/compute/environment.rb +15 -15
  24. data/lib/fog/ecloud/models/compute/firewall_acl.rb +1 -1
  25. data/lib/fog/ecloud/models/compute/internet_service.rb +1 -1
  26. data/lib/fog/ecloud/models/compute/internet_services.rb +1 -1
  27. data/lib/fog/ecloud/models/compute/location.rb +1 -1
  28. data/lib/fog/ecloud/models/compute/monitor.rb +1 -1
  29. data/lib/fog/ecloud/models/compute/network.rb +1 -1
  30. data/lib/fog/ecloud/models/compute/node.rb +1 -1
  31. data/lib/fog/ecloud/models/compute/nodes.rb +1 -1
  32. data/lib/fog/ecloud/models/compute/organization.rb +10 -10
  33. data/lib/fog/ecloud/models/compute/row.rb +1 -1
  34. data/lib/fog/ecloud/models/compute/rows.rb +1 -1
  35. data/lib/fog/ecloud/models/compute/server.rb +9 -9
  36. data/lib/fog/ecloud/models/compute/templates.rb +3 -1
  37. data/lib/fog/ecloud/models/compute/user.rb +2 -2
  38. data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ip.rb +1 -1
  39. data/lib/fog/ecloud/requests/compute/get_virtual_machine_assigned_ips.rb +1 -1
  40. data/lib/fog/google/models/compute/disk.rb +5 -5
  41. data/lib/fog/google/models/compute/disks.rb +9 -2
  42. data/lib/fog/hp.rb +108 -19
  43. data/lib/fog/hp/CHANGELOG.hp +33 -0
  44. data/lib/fog/hp/block_storage.rb +5 -3
  45. data/lib/fog/hp/block_storage_v2.rb +164 -0
  46. data/lib/fog/hp/cdn.rb +3 -2
  47. data/lib/fog/hp/compute.rb +5 -4
  48. data/lib/fog/hp/compute_v2.rb +312 -0
  49. data/lib/fog/hp/dns.rb +135 -0
  50. data/lib/fog/hp/lb.rb +170 -0
  51. data/lib/fog/hp/models/block_storage_v2/snapshot.rb +76 -0
  52. data/lib/fog/hp/models/block_storage_v2/snapshots.rb +43 -0
  53. data/lib/fog/hp/models/block_storage_v2/volume.rb +139 -0
  54. data/lib/fog/hp/models/block_storage_v2/volume_backup.rb +58 -0
  55. data/lib/fog/hp/models/block_storage_v2/volume_backups.rb +42 -0
  56. data/lib/fog/hp/models/block_storage_v2/volumes.rb +42 -0
  57. data/lib/fog/hp/models/compute/image.rb +1 -1
  58. data/lib/fog/hp/models/compute/server.rb +41 -20
  59. data/lib/fog/hp/models/compute_v2/address.rb +70 -0
  60. data/lib/fog/hp/models/compute_v2/addresses.rb +29 -0
  61. data/lib/fog/hp/models/compute_v2/availability_zone.rb +22 -0
  62. data/lib/fog/hp/models/compute_v2/availability_zones.rb +29 -0
  63. data/lib/fog/hp/models/compute_v2/flavor.rb +22 -0
  64. data/lib/fog/hp/models/compute_v2/flavors.rb +42 -0
  65. data/lib/fog/hp/models/compute_v2/image.rb +87 -0
  66. data/lib/fog/hp/models/compute_v2/images.rb +43 -0
  67. data/lib/fog/hp/models/compute_v2/key_pair.rb +54 -0
  68. data/lib/fog/hp/models/compute_v2/key_pairs.rb +31 -0
  69. data/lib/fog/hp/models/compute_v2/meta.rb +29 -0
  70. data/lib/fog/hp/models/compute_v2/meta_parent.rb +33 -0
  71. data/lib/fog/hp/models/compute_v2/metadata.rb +79 -0
  72. data/lib/fog/hp/models/compute_v2/server.rb +339 -0
  73. data/lib/fog/hp/models/compute_v2/servers.rb +56 -0
  74. data/lib/fog/hp/models/compute_v2/volume_attachment.rb +42 -0
  75. data/lib/fog/hp/models/compute_v2/volume_attachments.rb +30 -0
  76. data/lib/fog/hp/models/dns/domain.rb +55 -0
  77. data/lib/fog/hp/models/dns/domains.rb +28 -0
  78. data/lib/fog/hp/models/dns/record.rb +59 -0
  79. data/lib/fog/hp/models/dns/records.rb +32 -0
  80. data/lib/fog/hp/models/lb/algorithm.rb +24 -0
  81. data/lib/fog/hp/models/lb/algorithms.rb +26 -0
  82. data/lib/fog/hp/models/lb/load_balancer.rb +83 -0
  83. data/lib/fog/hp/models/lb/load_balancers.rb +26 -0
  84. data/lib/fog/hp/models/lb/node.rb +53 -0
  85. data/lib/fog/hp/models/lb/nodes.rb +30 -0
  86. data/lib/fog/hp/models/lb/protocol.rb +25 -0
  87. data/lib/fog/hp/models/lb/protocols.rb +26 -0
  88. data/lib/fog/hp/models/lb/virtual_ip.rb +34 -0
  89. data/lib/fog/hp/models/lb/virtual_ips.rb +33 -0
  90. data/lib/fog/hp/models/network/floating_ip.rb +45 -0
  91. data/lib/fog/hp/models/network/floating_ips.rb +36 -0
  92. data/lib/fog/hp/models/network/network.rb +56 -0
  93. data/lib/fog/hp/models/network/networks.rb +36 -0
  94. data/lib/fog/hp/models/network/port.rb +54 -0
  95. data/lib/fog/hp/models/network/ports.rb +36 -0
  96. data/lib/fog/hp/models/network/router.rb +66 -0
  97. data/lib/fog/hp/models/network/routers.rb +36 -0
  98. data/lib/fog/hp/models/network/security_group.rb +30 -0
  99. data/lib/fog/hp/models/network/security_group_rule.rb +35 -0
  100. data/lib/fog/hp/models/network/security_group_rules.rb +36 -0
  101. data/lib/fog/hp/models/network/security_groups.rb +36 -0
  102. data/lib/fog/hp/models/network/subnet.rb +49 -0
  103. data/lib/fog/hp/models/network/subnets.rb +36 -0
  104. data/lib/fog/hp/models/storage/directories.rb +1 -1
  105. data/lib/fog/hp/models/storage/directory.rb +41 -8
  106. data/lib/fog/hp/models/storage/meta.rb +29 -0
  107. data/lib/fog/hp/models/storage/meta_parent.rb +23 -0
  108. data/lib/fog/hp/models/storage/metadata.rb +82 -0
  109. data/lib/fog/hp/network.rb +198 -0
  110. data/lib/fog/hp/requests/block_storage_v2/create_snapshot.rb +76 -0
  111. data/lib/fog/hp/requests/block_storage_v2/create_volume.rb +90 -0
  112. data/lib/fog/hp/requests/block_storage_v2/create_volume_backup.rb +83 -0
  113. data/lib/fog/hp/requests/block_storage_v2/delete_snapshot.rb +38 -0
  114. data/lib/fog/hp/requests/block_storage_v2/delete_volume.rb +38 -0
  115. data/lib/fog/hp/requests/block_storage_v2/delete_volume_backup.rb +38 -0
  116. data/lib/fog/hp/requests/block_storage_v2/get_snapshot_details.rb +54 -0
  117. data/lib/fog/hp/requests/block_storage_v2/get_volume_backup_details.rb +55 -0
  118. data/lib/fog/hp/requests/block_storage_v2/get_volume_details.rb +58 -0
  119. data/lib/fog/hp/requests/block_storage_v2/list_snapshots.rb +57 -0
  120. data/lib/fog/hp/requests/block_storage_v2/list_snapshots_detail.rb +54 -0
  121. data/lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb +52 -0
  122. data/lib/fog/hp/requests/block_storage_v2/list_volume_backups_detail.rb +58 -0
  123. data/lib/fog/hp/requests/block_storage_v2/list_volumes.rb +61 -0
  124. data/lib/fog/hp/requests/block_storage_v2/list_volumes_detail.rb +59 -0
  125. data/lib/fog/hp/requests/block_storage_v2/restore_volume_backup.rb +97 -0
  126. data/lib/fog/hp/requests/block_storage_v2/update_snapshot.rb +69 -0
  127. data/lib/fog/hp/requests/block_storage_v2/update_volume.rb +70 -0
  128. data/lib/fog/hp/requests/compute/get_console_output.rb +0 -2
  129. data/lib/fog/hp/requests/compute/get_vnc_console.rb +45 -0
  130. data/lib/fog/hp/requests/compute_v2/add_security_group.rb +40 -0
  131. data/lib/fog/hp/requests/compute_v2/allocate_address.rb +53 -0
  132. data/lib/fog/hp/requests/compute_v2/associate_address.rb +46 -0
  133. data/lib/fog/hp/requests/compute_v2/attach_volume.rb +80 -0
  134. data/lib/fog/hp/requests/compute_v2/create_image.rb +63 -0
  135. data/lib/fog/hp/requests/compute_v2/create_key_pair.rb +73 -0
  136. data/lib/fog/hp/requests/compute_v2/create_persistent_server.rb +183 -0
  137. data/lib/fog/hp/requests/compute_v2/create_server.rb +168 -0
  138. data/lib/fog/hp/requests/compute_v2/delete_image.rb +44 -0
  139. data/lib/fog/hp/requests/compute_v2/delete_key_pair.rb +38 -0
  140. data/lib/fog/hp/requests/compute_v2/delete_meta.rb +55 -0
  141. data/lib/fog/hp/requests/compute_v2/delete_server.rb +43 -0
  142. data/lib/fog/hp/requests/compute_v2/detach_volume.rb +47 -0
  143. data/lib/fog/hp/requests/compute_v2/disassociate_address.rb +39 -0
  144. data/lib/fog/hp/requests/compute_v2/get_address.rb +48 -0
  145. data/lib/fog/hp/requests/compute_v2/get_console_output.rb +41 -0
  146. data/lib/fog/hp/requests/compute_v2/get_flavor_details.rb +57 -0
  147. data/lib/fog/hp/requests/compute_v2/get_image_details.rb +55 -0
  148. data/lib/fog/hp/requests/compute_v2/get_key_pair.rb +44 -0
  149. data/lib/fog/hp/requests/compute_v2/get_meta.rb +57 -0
  150. data/lib/fog/hp/requests/compute_v2/get_server_details.rb +72 -0
  151. data/lib/fog/hp/requests/compute_v2/get_server_volume_details.rb +47 -0
  152. data/lib/fog/hp/requests/compute_v2/get_vnc_console.rb +45 -0
  153. data/lib/fog/hp/requests/compute_v2/get_windows_password.rb +43 -0
  154. data/lib/fog/hp/requests/compute_v2/list_addresses.rb +44 -0
  155. data/lib/fog/hp/requests/compute_v2/list_availability_zones.rb +47 -0
  156. data/lib/fog/hp/requests/compute_v2/list_flavors.rb +53 -0
  157. data/lib/fog/hp/requests/compute_v2/list_flavors_detail.rb +53 -0
  158. data/lib/fog/hp/requests/compute_v2/list_images.rb +52 -0
  159. data/lib/fog/hp/requests/compute_v2/list_images_detail.rb +66 -0
  160. data/lib/fog/hp/requests/compute_v2/list_key_pairs.rb +42 -0
  161. data/lib/fog/hp/requests/compute_v2/list_limits.rb +62 -0
  162. data/lib/fog/hp/requests/compute_v2/list_metadata.rb +56 -0
  163. data/lib/fog/hp/requests/compute_v2/list_server_addresses.rb +42 -0
  164. data/lib/fog/hp/requests/compute_v2/list_server_addresses_by_network.rb +46 -0
  165. data/lib/fog/hp/requests/compute_v2/list_server_volumes.rb +49 -0
  166. data/lib/fog/hp/requests/compute_v2/list_servers.rb +53 -0
  167. data/lib/fog/hp/requests/compute_v2/list_servers_detail.rb +80 -0
  168. data/lib/fog/hp/requests/compute_v2/reboot_server.rb +34 -0
  169. data/lib/fog/hp/requests/compute_v2/rebuild_server.rb +82 -0
  170. data/lib/fog/hp/requests/compute_v2/release_address.rb +38 -0
  171. data/lib/fog/hp/requests/compute_v2/remove_security_group.rb +37 -0
  172. data/lib/fog/hp/requests/compute_v2/server_action.rb +25 -0
  173. data/lib/fog/hp/requests/compute_v2/set_metadata.rb +60 -0
  174. data/lib/fog/hp/requests/compute_v2/update_meta.rb +61 -0
  175. data/lib/fog/hp/requests/compute_v2/update_metadata.rb +60 -0
  176. data/lib/fog/hp/requests/compute_v2/update_server.rb +73 -0
  177. data/lib/fog/hp/requests/dns/create_domain.rb +66 -0
  178. data/lib/fog/hp/requests/dns/create_record.rb +79 -0
  179. data/lib/fog/hp/requests/dns/delete_domain.rb +37 -0
  180. data/lib/fog/hp/requests/dns/delete_record.rb +36 -0
  181. data/lib/fog/hp/requests/dns/get_domain.rb +43 -0
  182. data/lib/fog/hp/requests/dns/get_record.rb +47 -0
  183. data/lib/fog/hp/requests/dns/get_servers_hosting_domain.rb +62 -0
  184. data/lib/fog/hp/requests/dns/list_domains.rb +38 -0
  185. data/lib/fog/hp/requests/dns/list_records_in_a_domain.rb +55 -0
  186. data/lib/fog/hp/requests/dns/update_domain.rb +62 -0
  187. data/lib/fog/hp/requests/dns/update_record.rb +70 -0
  188. data/lib/fog/hp/requests/lb/create_load_balancer.rb +110 -0
  189. data/lib/fog/hp/requests/lb/create_load_balancer_node.rb +72 -0
  190. data/lib/fog/hp/requests/lb/delete_load_balancer.rb +36 -0
  191. data/lib/fog/hp/requests/lb/delete_load_balancer_node.rb +47 -0
  192. data/lib/fog/hp/requests/lb/get_load_balancer.rb +60 -0
  193. data/lib/fog/hp/requests/lb/get_load_balancer_node.rb +54 -0
  194. data/lib/fog/hp/requests/lb/list_algorithms.rb +32 -0
  195. data/lib/fog/hp/requests/lb/list_limits.rb +40 -0
  196. data/lib/fog/hp/requests/lb/list_load_balancer_nodes.rb +41 -0
  197. data/lib/fog/hp/requests/lb/list_load_balancer_virtual_ips.rb +44 -0
  198. data/lib/fog/hp/requests/lb/list_load_balancers.rb +41 -0
  199. data/lib/fog/hp/requests/lb/list_protocols.rb +34 -0
  200. data/lib/fog/hp/requests/lb/list_versions.rb +27 -0
  201. data/lib/fog/hp/requests/lb/update_load_balancer.rb +47 -0
  202. data/lib/fog/hp/requests/lb/update_load_balancer_node.rb +59 -0
  203. data/lib/fog/hp/requests/network/add_router_interface.rb +75 -0
  204. data/lib/fog/hp/requests/network/associate_floating_ip.rb +71 -0
  205. data/lib/fog/hp/requests/network/create_floating_ip.rb +69 -0
  206. data/lib/fog/hp/requests/network/create_network.rb +68 -0
  207. data/lib/fog/hp/requests/network/create_port.rb +92 -0
  208. data/lib/fog/hp/requests/network/create_router.rb +64 -0
  209. data/lib/fog/hp/requests/network/create_security_group.rb +100 -0
  210. data/lib/fog/hp/requests/network/create_security_group_rule.rb +83 -0
  211. data/lib/fog/hp/requests/network/create_subnet.rb +97 -0
  212. data/lib/fog/hp/requests/network/delete_floating_ip.rb +34 -0
  213. data/lib/fog/hp/requests/network/delete_network.rb +34 -0
  214. data/lib/fog/hp/requests/network/delete_port.rb +34 -0
  215. data/lib/fog/hp/requests/network/delete_router.rb +34 -0
  216. data/lib/fog/hp/requests/network/delete_security_group.rb +36 -0
  217. data/lib/fog/hp/requests/network/delete_security_group_rule.rb +36 -0
  218. data/lib/fog/hp/requests/network/delete_subnet.rb +34 -0
  219. data/lib/fog/hp/requests/network/disassociate_floating_ip.rb +71 -0
  220. data/lib/fog/hp/requests/network/get_floating_ip.rb +47 -0
  221. data/lib/fog/hp/requests/network/get_network.rb +49 -0
  222. data/lib/fog/hp/requests/network/get_port.rb +53 -0
  223. data/lib/fog/hp/requests/network/get_router.rb +46 -0
  224. data/lib/fog/hp/requests/network/get_security_group.rb +56 -0
  225. data/lib/fog/hp/requests/network/get_security_group_rule.rb +51 -0
  226. data/lib/fog/hp/requests/network/get_subnet.rb +52 -0
  227. data/lib/fog/hp/requests/network/list_floating_ips.rb +46 -0
  228. data/lib/fog/hp/requests/network/list_networks.rb +48 -0
  229. data/lib/fog/hp/requests/network/list_ports.rb +52 -0
  230. data/lib/fog/hp/requests/network/list_routers.rb +45 -0
  231. data/lib/fog/hp/requests/network/list_security_group_rules.rb +52 -0
  232. data/lib/fog/hp/requests/network/list_security_groups.rb +57 -0
  233. data/lib/fog/hp/requests/network/list_subnets.rb +51 -0
  234. data/lib/fog/hp/requests/network/remove_router_interface.rb +67 -0
  235. data/lib/fog/hp/requests/network/update_network.rb +62 -0
  236. data/lib/fog/hp/requests/network/update_port.rb +75 -0
  237. data/lib/fog/hp/requests/network/update_router.rb +62 -0
  238. data/lib/fog/hp/requests/network/update_subnet.rb +72 -0
  239. data/lib/fog/hp/requests/storage/post_container.rb +38 -0
  240. data/lib/fog/hp/requests/storage/post_object.rb +56 -0
  241. data/lib/fog/hp/simple_http_instrumentor.rb +59 -0
  242. data/lib/fog/hp/storage.rb +6 -6
  243. data/lib/fog/internet_archive/models/storage/file.rb +1 -1
  244. data/lib/fog/internet_archive/requests/storage/head_object.rb +2 -2
  245. data/lib/fog/openstack/identity.rb +1 -1
  246. data/lib/fog/openstack/models/storage/file.rb +1 -1
  247. data/lib/fog/rackspace.rb +4 -1
  248. data/lib/fog/rackspace/docs/compute_v2.md +2 -2
  249. data/lib/fog/rackspace/docs/storage.md +1 -1
  250. data/lib/fog/rackspace/examples/compute_v2/create_image.rb +1 -1
  251. data/lib/fog/rackspace/examples/compute_v2/delete_image.rb +1 -1
  252. data/lib/fog/rackspace/examples/compute_v2/delete_server.rb +1 -1
  253. data/lib/fog/rackspace/examples/compute_v2/detach_volume.rb +2 -2
  254. data/lib/fog/rackspace/examples/compute_v2/resize_server.rb +1 -1
  255. data/lib/fog/rackspace/examples/compute_v2/server_attachments.rb +1 -1
  256. data/lib/fog/rackspace/examples/storage/create_cdn_directory.rb +1 -1
  257. data/lib/fog/rackspace/examples/storage/delete_directory.rb +1 -1
  258. data/lib/fog/rackspace/examples/storage/delete_file.rb +1 -1
  259. data/lib/fog/rackspace/examples/storage/download_file.rb +1 -1
  260. data/lib/fog/rackspace/models/compute_v2/images.rb +1 -1
  261. data/lib/fog/rackspace/models/compute_v2/metadata.rb +2 -2
  262. data/lib/fog/rackspace/models/compute_v2/server.rb +2 -2
  263. data/lib/fog/rackspace/models/compute_v2/servers.rb +1 -1
  264. data/lib/fog/rackspace/models/storage/file.rb +19 -0
  265. data/lib/fog/rackspace/models/storage/files.rb +25 -0
  266. data/lib/fog/rackspace/monitoring.rb +20 -1
  267. data/lib/fog/rackspace/requests/compute_v2/delete_image.rb +1 -1
  268. data/lib/fog/rackspace/requests/compute_v2/list_metadata.rb +1 -1
  269. data/lib/fog/rackspace/requests/compute_v2/list_servers.rb +1 -1
  270. data/lib/fog/rackspace/requests/compute_v2/resize_server.rb +1 -1
  271. data/lib/fog/rackspace/requests/compute_v2/set_metadata.rb +1 -1
  272. data/lib/fog/rackspace/requests/compute_v2/set_metadata_item.rb +1 -1
  273. data/lib/fog/rackspace/requests/compute_v2/update_metadata.rb +1 -1
  274. data/lib/fog/rackspace/requests/monitoring/get_monitoring_zone.rb +15 -0
  275. data/lib/fog/rackspace/requests/monitoring/list_monitoring_zones.rb +15 -0
  276. data/lib/fog/rackspace/requests/storage/get_object_http_url.rb +30 -0
  277. data/lib/fog/rackspace/requests/storage/get_object_https_url.rb +2 -1
  278. data/lib/fog/rackspace/storage.rb +1 -0
  279. data/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb +10 -8
  280. data/lib/fog/vcloud_director/requests/compute/get_edge_gateway.rb +2 -0
  281. data/lib/fog/vcloud_director/requests/compute/get_task.rb +10 -1
  282. data/lib/fog/version.rb +1 -1
  283. data/lib/fog/vsphere/compute.rb +1 -0
  284. data/lib/fog/vsphere/models/compute/server.rb +2 -2
  285. data/lib/fog/vsphere/models/compute/volume.rb +59 -4
  286. data/lib/fog/vsphere/models/compute/volumes.rb +22 -7
  287. data/lib/fog/vsphere/requests/compute/create_vm.rb +9 -3
  288. data/lib/fog/vsphere/requests/compute/list_vm_volumes.rb +3 -1
  289. data/lib/fog/vsphere/requests/compute/modify_vm_volume.rb +26 -0
  290. data/lib/tasks/changelog_task.rb +2 -0
  291. data/tests/aws/requests/compute/internet_gateway_tests.rb +5 -0
  292. data/tests/compute/helper.rb +6 -4
  293. data/tests/ecloud/compute/models/server_tests.rb +34 -41
  294. data/tests/hp/block_storage_tests.rb +47 -0
  295. data/tests/hp/cdn_tests.rb +23 -0
  296. data/tests/hp/compute_tests.rb +22 -0
  297. data/tests/hp/models/block_storage_v2/snapshot_tests.rb +22 -0
  298. data/tests/hp/models/block_storage_v2/snapshots_tests.rb +10 -0
  299. data/tests/hp/models/block_storage_v2/volume_backup_tests.rb +22 -0
  300. data/tests/hp/models/block_storage_v2/volume_backups_tests.rb +9 -0
  301. data/tests/hp/models/block_storage_v2/volume_tests.rb +22 -0
  302. data/tests/hp/models/block_storage_v2/volumes_tests.rb +5 -0
  303. data/tests/hp/models/compute_v2/address_tests.rb +23 -0
  304. data/tests/hp/models/compute_v2/addresses_tests.rb +7 -0
  305. data/tests/hp/models/compute_v2/availability_zone_tests.rb +13 -0
  306. data/tests/hp/models/compute_v2/availability_zones_tests.rb +13 -0
  307. data/tests/hp/models/compute_v2/key_pair_tests.rb +29 -0
  308. data/tests/hp/models/compute_v2/key_pairs_tests.rb +7 -0
  309. data/tests/hp/models/compute_v2/metadata_image_tests.rb +60 -0
  310. data/tests/hp/models/compute_v2/metadata_server_tests.rb +56 -0
  311. data/tests/hp/models/compute_v2/server_tests.rb +45 -0
  312. data/tests/hp/models/compute_v2/servers_tests.rb +9 -0
  313. data/tests/hp/models/compute_v2/volume_attachment_tests.rb +40 -0
  314. data/tests/hp/models/compute_v2/volume_attachments_tests.rb +17 -0
  315. data/tests/hp/models/dns/domain_tests.rb +25 -0
  316. data/tests/hp/models/dns/domains_tests.rb +14 -0
  317. data/tests/hp/models/dns/record_tests.rb +29 -0
  318. data/tests/hp/models/dns/records_tests.rb +9 -0
  319. data/tests/hp/models/lb/algorithms_tests.rb +15 -0
  320. data/tests/hp/models/lb/load_balancer_node_tests.rb +9 -0
  321. data/tests/hp/models/lb/load_balancer_nodes_tests.rb +27 -0
  322. data/tests/hp/models/lb/load_balancer_tests.rb +6 -0
  323. data/tests/hp/models/lb/load_balancer_virtual_ips_tests.rb +22 -0
  324. data/tests/hp/models/lb/load_balancers_tests.rb +22 -0
  325. data/tests/hp/models/lb/protocols_tests.rb +15 -0
  326. data/tests/hp/models/network/floating_ip_tests.rb +37 -0
  327. data/tests/hp/models/network/floating_ips_tests.rb +8 -0
  328. data/tests/hp/models/network/network_tests.rb +25 -0
  329. data/tests/hp/models/network/networks_tests.rb +15 -0
  330. data/tests/hp/models/network/port_tests.rb +30 -0
  331. data/tests/hp/models/network/ports_tests.rb +21 -0
  332. data/tests/hp/models/network/router_tests.rb +55 -0
  333. data/tests/hp/models/network/routers_tests.rb +19 -0
  334. data/tests/hp/models/network/security_group_rule_tests.rb +25 -0
  335. data/tests/hp/models/network/security_group_rules_tests.rb +23 -0
  336. data/tests/hp/models/network/security_group_tests.rb +20 -0
  337. data/tests/hp/models/network/security_groups_tests.rb +20 -0
  338. data/tests/hp/models/network/subnet_tests.rb +30 -0
  339. data/tests/hp/models/network/subnets_tests.rb +22 -0
  340. data/tests/hp/models/storage/directory_tests.rb +70 -0
  341. data/tests/hp/requests/block_storage_v2/snapshot_tests.rb +69 -0
  342. data/tests/hp/requests/block_storage_v2/volume_backup_tests.rb +117 -0
  343. data/tests/hp/requests/block_storage_v2/volume_tests.rb +106 -0
  344. data/tests/hp/requests/compute_v2/address_tests.rb +80 -0
  345. data/tests/hp/requests/compute_v2/availability_zone_tests.rb +19 -0
  346. data/tests/hp/requests/compute_v2/flavor_tests.rb +45 -0
  347. data/tests/hp/requests/compute_v2/image_tests.rb +86 -0
  348. data/tests/hp/requests/compute_v2/key_pair_tests.rb +66 -0
  349. data/tests/hp/requests/compute_v2/metadata_tests.rb +101 -0
  350. data/tests/hp/requests/compute_v2/persistent_server_tests.rb +67 -0
  351. data/tests/hp/requests/compute_v2/server_address_tests.rb +46 -0
  352. data/tests/hp/requests/compute_v2/server_security_group_tests.rb +43 -0
  353. data/tests/hp/requests/compute_v2/server_tests.rb +113 -0
  354. data/tests/hp/requests/compute_v2/server_volume_tests.rb +85 -0
  355. data/tests/hp/requests/dns/domain_tests.rb +72 -0
  356. data/tests/hp/requests/dns/records_tests.rb +65 -0
  357. data/tests/hp/requests/lb/algorithms_tests.rb +15 -0
  358. data/tests/hp/requests/lb/limits_tests.rb +18 -0
  359. data/tests/hp/requests/lb/load_balancer_nodes_tests.rb +47 -0
  360. data/tests/hp/requests/lb/load_balancer_tests.rb +56 -0
  361. data/tests/hp/requests/lb/protocols_tests.rb +15 -0
  362. data/tests/hp/requests/lb/versions_tests.rb +17 -0
  363. data/tests/hp/requests/lb/virtual_ips_tests.rb +34 -0
  364. data/tests/hp/requests/network/floating_ip_tests.rb +70 -0
  365. data/tests/hp/requests/network/network_tests.rb +57 -0
  366. data/tests/hp/requests/network/port_tests.rb +71 -0
  367. data/tests/hp/requests/network/router_tests.rb +108 -0
  368. data/tests/hp/requests/network/security_group_rule_tests.rb +58 -0
  369. data/tests/hp/requests/network/security_group_tests.rb +48 -0
  370. data/tests/hp/requests/network/subnet_tests.rb +71 -0
  371. data/tests/hp/requests/storage/container_tests.rb +9 -1
  372. data/tests/hp/requests/storage/object_tests.rb +15 -1
  373. data/tests/hp/storage_tests.rb +25 -0
  374. data/tests/rackspace/cdn_tests.rb +1 -1
  375. data/tests/rackspace/models/compute_v2/metadata_tests.rb +1 -1
  376. data/tests/rackspace/models/identity/service_catalog_tests.rb +1 -1
  377. data/tests/rackspace/models/storage/file_tests.rb +19 -6
  378. data/tests/rackspace/models/storage/files_tests.rb +44 -0
  379. data/tests/rackspace/requests/monitoring/helper.rb +64 -0
  380. data/tests/rackspace/requests/monitoring/list_tests.rb +14 -2
  381. data/tests/rackspace/requests/storage/large_object_tests.rb +8 -6
  382. data/tests/rackspace/requests/storage/object_tests.rb +11 -0
  383. data/tests/rackspace/storage_tests.rb +4 -4
  384. data/tests/vcloud_director/requests/compute/edge_gateway_tests.rb +48 -44
  385. data/tests/vcloud_director/requests/compute/network_tests.rb +2 -0
  386. metadata +356 -5
@@ -0,0 +1,34 @@
1
+ module Fog
2
+ module HP
3
+ class LB
4
+
5
+ # List protocols
6
+ #
7
+ # ==== Returns
8
+ # * response<~Excon::Response>:
9
+ # * body<~Hash>:
10
+ # * 'protocols'<~Array>:
11
+ # * 'name'<~String> - Name of the protocol
12
+ # * 'port'<~String> - Port of the protocol
13
+ class Real
14
+ def list_protocols
15
+ response = request(
16
+ :expects => 200,
17
+ :method => 'GET',
18
+ :path => 'protocols'
19
+ )
20
+ response
21
+ end
22
+ end
23
+ class Mock
24
+ def list_protocols
25
+ response = Excon::Response.new
26
+ protocols = self.data[:protocols].values
27
+ response.status = 200
28
+ response.body = { 'protocols' => protocols }
29
+ response
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,27 @@
1
+ module Fog
2
+ module HP
3
+ class LB
4
+ class Real
5
+
6
+ def list_versions
7
+ request(
8
+ :expects => 200,
9
+ :method => 'GET',
10
+ :path => ''
11
+ )
12
+ end
13
+ end
14
+ class Mock
15
+
16
+ def list_versions
17
+ response = Excon::Response.new
18
+ versions = self.data[:versions].values
19
+ response.status = 200
20
+ response.body = { 'versions' => versions }
21
+ response
22
+ end
23
+
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,47 @@
1
+ module Fog
2
+ module HP
3
+ class LB
4
+
5
+ # Update an existing load balancer
6
+ #
7
+ # ==== Parameters
8
+ # * 'load_balancer_id'<~String> - UUId of the load balancer to update
9
+ # * options<~Hash>:
10
+ # * 'name'<~String> - Name for the load balancer
11
+ # * 'algorithm'<~String> - Algorithm for the load balancer
12
+ class Real
13
+ def update_load_balancer(load_balancer_id, options={})
14
+ data = {}
15
+ l_options = ['name', 'algorithm']
16
+ l_options.select{|o| options[o]}.each do |key|
17
+ data[key] = options[key]
18
+ end
19
+
20
+ request(
21
+ :body => Fog::JSON.encode(data),
22
+ :expects => 202,
23
+ :method => 'PUT',
24
+ :path => "loadbalancers/#{load_balancer_id}"
25
+ )
26
+ end
27
+
28
+ end
29
+ class Mock
30
+ def update_load_balancer(load_balancer_id, options={})
31
+ response = Excon::Response.new
32
+ if lb = list_load_balancers.body['loadBalancers'].detect { |_| _['id'] == load_balancer_id }
33
+
34
+ lb['name'] = options['name'] if options['name']
35
+ lb['algorithm'] = options['algorithm'] if options['algorithm']
36
+
37
+ response.status = 202
38
+ response.body = ''
39
+ response
40
+ else
41
+ raise Fog::HP::LB::NotFound
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,59 @@
1
+ module Fog
2
+ module HP
3
+ class LB
4
+
5
+ # Update an existing load balancer node
6
+ #
7
+ # ==== Parameters
8
+ # * 'load_balancer_id'<~String> - UUId of the load balancer to update
9
+ # * 'node_id'<~String> - UUId of node to update
10
+ # * options<~Hash>:
11
+ # * 'condition'<~String> - Condition for the node. Valid values are []'ENABLED', 'DISABLED']
12
+ class Real
13
+
14
+ def update_load_balancer_node(load_balancer_id, node_id, condition)
15
+ data = {
16
+ 'condition' => condition
17
+ }
18
+ request(
19
+ :body => Fog::JSON.encode(data),
20
+ :expects => 202,
21
+ :method => 'PUT',
22
+ :path => "loadbalancers/#{load_balancer_id}/nodes/#{node_id}"
23
+ )
24
+
25
+ end
26
+ end
27
+ class Mock
28
+ def update_load_balancer_node(load_balancer_id, node_id, condition)
29
+ response = Excon::Response.new
30
+ if lb_data = get_load_balancer(load_balancer_id)
31
+ if get_load_balancer_node(load_balancer_id, node_id)
32
+ nodes = update_node(lb_data, node_id, condition)
33
+ self.data[:lbs][load_balancer_id]['nodes'] = nodes
34
+ response.status = 202
35
+ response
36
+ else
37
+ raise Fog::HP::LB::NotFound
38
+ end
39
+ else
40
+ raise Fog::HP::LB::NotFound
41
+ end
42
+ end
43
+
44
+ def update_node(lb_data, node_id, condition)
45
+ nodes = lb_data.body['nodes']
46
+ node = nodes.select {|n| n['id'] == node_id}.first
47
+ # update the node attributes
48
+ if node
49
+ node['condition'] = condition
50
+ node['status'] = condition == 'ENABLED' ? 'ONLINE' : 'OFFLINE'
51
+ end
52
+ new_nodes = nodes.reject {|n| n['id'] == node_id}
53
+ new_nodes << node
54
+ end
55
+
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,75 @@
1
+ module Fog
2
+ module HP
3
+ class Network
4
+
5
+ class Real
6
+ # Add an internal router interface, thus attaching a subnet or a port to an existing router
7
+ #
8
+ # ==== Parameters
9
+ # * 'router_id'<~String>: - UUId for the router
10
+ # * 'subnet_id'<~String>: - UUId for the subnet (Either a subnet or a port can be passed, not both)
11
+ # * 'port_id'<~String>: - UUId for the port (Either a subnet or a port can be passed, not both)
12
+ #
13
+ # ==== Returns
14
+ # * response<~Excon::Response>:
15
+ # * body<~Hash>:
16
+ # * 'subnet_id'<~String>: - UUId for the subnet
17
+ # * 'port_id'<~String>: - UUId for the port
18
+ def add_router_interface(router_id, subnet_id=nil, port_id=nil, options = {})
19
+ # Either a subnet or a port can be passed, not both
20
+ if (subnet_id && port_id) || (subnet_id.nil? && port_id.nil?)
21
+ raise ArgumentError.new('Either a subnet or a port can be passed, not both')
22
+ end
23
+ if subnet_id
24
+ data = { 'subnet_id' => subnet_id }
25
+ elsif port_id
26
+ data = { 'port_id' => port_id }
27
+ end
28
+
29
+ request(
30
+ :body => Fog::JSON.encode(data),
31
+ :expects => 200,
32
+ :method => 'PUT',
33
+ :path => "routers/#{router_id}/add_router_interface"
34
+ )
35
+ end
36
+ end
37
+
38
+ class Mock
39
+ def add_router_interface(router_id, subnet_id=nil, port_id=nil, options = {})
40
+ response = Excon::Response.new
41
+ if list_routers.body['routers'].detect {|_| _['id'] == router_id}
42
+ # Either a subnet or a port can be passed, not both
43
+ if (subnet_id && port_id) || (subnet_id.nil? && port_id.nil?)
44
+ raise ArgumentError.new('Either a subnet or a port can be passed, not both')
45
+ end
46
+
47
+ if port_id.nil?
48
+ # create a new port
49
+ resp = create_port(self.data[:networks].keys[0], {:name => "New Port #{rand(10)}"})
50
+ port_id = resp.body['port']['id']
51
+ end
52
+
53
+ data = {
54
+ 'subnet_id' => subnet_id || Fog::HP::Mock.uuid.to_s,
55
+ 'port_id' => port_id
56
+ }
57
+
58
+ # so either way if I pass a subnet or a port,
59
+ # it basically adds the router uuid to the port's device_id
60
+ # and sets device_owner to network:router_interface
61
+ self.data[:ports][port_id]['device_id'] = router_id
62
+ self.data[:ports][port_id]['device_owner'] = 'network:router_interface'
63
+
64
+ response.status = 200
65
+ response.body = data
66
+ response
67
+ else
68
+ raise Fog::HP::Network::NotFound
69
+ end
70
+ end
71
+ end
72
+
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,71 @@
1
+ module Fog
2
+ module HP
3
+ class Network
4
+
5
+ class Real
6
+ # Associate port with floating ip
7
+ #
8
+ # ==== Parameters
9
+ # * 'floating_ip_id'<~String>: - UUId of the floating IP address to associate with
10
+ # * 'port_id'<~String>: - Port to associate with the floating IP
11
+ # * options<~Hash>:
12
+ # * 'fixed_ip_address'<~String>: - Fixed IP address to associate with the floating IP. Mandatory, if the port has multiple IP addresses
13
+ #
14
+ # ==== Returns
15
+ # * response<~Excon::Response>:
16
+ # * body<~Hash>:
17
+ # * floatingip<~Array>:
18
+ # * 'id'<~String>: - UUId for the floating ip
19
+ # * 'tenant_id'<~String>: - TenantId that owns the floating ip
20
+ # * 'floating_network_id'<~String>: - UUId of the external network
21
+ # * 'router_id'<~String>: - Id of the router, null if not assigned
22
+ # * 'fixed_ip_address'<~String>: - Fixed IP address associated to the floating IP, null if not assigned
23
+ # * 'floating_ip_address'<~String>: - Floating IP address
24
+ # * 'port_id'<~String>: - Port associated to the floating IP, null if not assigned
25
+ def associate_floating_ip(floating_ip_id, port_id, options = {})
26
+ data = {
27
+ 'floatingip' => {
28
+ 'port_id' => port_id
29
+ }
30
+ }
31
+ l_options = [:fixed_ip_address]
32
+ l_options.select{|o| options[o]}.each do |key|
33
+ data['floatingip'][key] = options[key]
34
+ end
35
+
36
+ request(
37
+ :body => Fog::JSON.encode(data),
38
+ :expects => 200,
39
+ :method => 'PUT',
40
+ :path => "floatingips/#{floating_ip_id}"
41
+ )
42
+ end
43
+ end
44
+
45
+ class Mock
46
+ def associate_floating_ip(floating_ip_id, port_id, options = {})
47
+ response = Excon::Response.new
48
+ if list_floating_ips.body['floatingips'].detect {|_| _['id'] == floating_ip_id}
49
+ response.status = 201
50
+ data = {
51
+ 'id' => floating_ip_id,
52
+ 'port_id' => port_id,
53
+ 'router_id' => Fog::HP::Mock.uuid.to_s,
54
+ 'tenant_id' => Fog::Mock.random_numbers(14).to_s,
55
+ 'floating_network_id' => Fog::HP::Mock.uuid.to_s,
56
+ 'fixed_ip_address' => options[:fixed_ip_address] || Fog::HP::Mock.ip_address.to_s,
57
+ 'floating_ip_address' => Fog::HP::Mock.ip_address.to_s
58
+ }
59
+
60
+ self.data[:floating_ips][data['id']] = data
61
+ response.body = { 'floatingip' => data }
62
+ response
63
+ else
64
+ raise Fog::HP::Network::NotFound
65
+ end
66
+ end
67
+ end
68
+
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,69 @@
1
+ module Fog
2
+ module HP
3
+ class Network
4
+
5
+ class Real
6
+ # Create a new floating ip
7
+ #
8
+ # ==== Parameters
9
+ # * 'floating_network_id'<~String>: - UUId of the external network
10
+ # * options<~Hash>:
11
+ # * 'port_id'<~String>: - Port to associate with the floating IP
12
+ # * 'tenant_id'<~String>: - TenantId that owns the floating IP
13
+ # * 'fixed_ip_address'<~String>: - Fixed IP address to associate with the floating IP. Mandatory, if the port has multiple IP addresses
14
+ # * 'floating_ip_address'<~String>: - Specific floating IP address to allocate, otherwise automatically allocated
15
+ #
16
+ # ==== Returns
17
+ # * response<~Excon::Response>:
18
+ # * body<~Hash>:
19
+ # * floatingip<~Array>:
20
+ # * 'id'<~String>: - UUId for the floating ip
21
+ # * 'tenant_id'<~String>: - TenantId that owns the floating ip
22
+ # * 'floating_network_id'<~String>: - UUId of the external network
23
+ # * 'router_id'<~String>: - Id of the router, null if not assigned
24
+ # * 'fixed_ip_address'<~String>: - Fixed IP address associated to the floating IP, null if not assigned
25
+ # * 'floating_ip_address'<~String>: - Floating IP address
26
+ # * 'port_id'<~String>: - Port associated to the floating IP, null if not assigned
27
+ def create_floating_ip(floating_network_id, options = {})
28
+ data = {
29
+ 'floatingip' => {
30
+ 'floating_network_id' => floating_network_id
31
+ }
32
+ }
33
+
34
+ l_options = [:port_id, :fixed_ip_address, :floating_ip_address, :tenant_id]
35
+ l_options.select{|o| options[o]}.each do |key|
36
+ data['floatingip'][key] = options[key]
37
+ end
38
+
39
+ request(
40
+ :body => Fog::JSON.encode(data),
41
+ :expects => 201,
42
+ :method => 'POST',
43
+ :path => 'floatingips'
44
+ )
45
+ end
46
+ end
47
+
48
+ class Mock
49
+ def create_floating_ip(floating_network_id, options = {})
50
+ response = Excon::Response.new
51
+ response.status = 201
52
+ data = {
53
+ 'id' => Fog::HP::Mock.uuid.to_s,
54
+ 'floating_network_id' => floating_network_id,
55
+ 'port_id' => options[:port_id] || nil,
56
+ 'tenant_id' => options[:tenant_id] || Fog::Mock.random_numbers(14).to_s,
57
+ 'fixed_ip_address' => options[:fixed_ip_address] || nil,
58
+ 'floating_ip_address' => options[:floating_ip_address] || Fog::HP::Mock.ip_address.to_s,
59
+ 'router_id' => Fog::HP::Mock.uuid.to_s
60
+ }
61
+ self.data[:floating_ips][data['id']] = data
62
+ response.body = { 'floatingip' => data }
63
+ response
64
+ end
65
+ end
66
+
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,68 @@
1
+ module Fog
2
+ module HP
3
+ class Network
4
+
5
+ class Real
6
+
7
+ # Create a new server
8
+ #
9
+ # ==== Parameters
10
+ # * options<~Hash>:
11
+ # * 'name'<~String> - Name of the network
12
+ # * 'admin_state_up'<~Boolean> - The administrative state of the network, true or false
13
+ # * 'shared'<~Boolean> - true or false
14
+ # * 'tenant_id'<~String> - TenantId different than the current user, that should own the network. Only allowed if user has 'admin' role.
15
+ #
16
+ # ==== Returns
17
+ # * response<~Excon::Response>:
18
+ # * body<~Hash>:
19
+ # * network<~Hash>:
20
+ # * 'id'<~String>: - UUId for the network
21
+ # * 'name'<~String>: - Name of the network
22
+ # * 'tenant_id'<~String>: - TenantId that owns the network
23
+ # * 'status'<~String>: - Status of the network i.e. "ACTIVE"
24
+ # * 'subnets'<~Array>: - Subnets for the network
25
+ # * 'id'<~Integer>: - UUId for the subnet
26
+ # * 'router:external'<~Boolean>: - true or false
27
+ # * 'admin_state_up'<~Boolean>: - true or false
28
+ # * 'shared'<~Boolean>: - true or false
29
+ def create_network(options = {})
30
+ data = { 'network' => {} }
31
+
32
+ l_options = [:name, :admin_state_up, :shared, :tenant_id]
33
+ l_options.select{|o| options[o]}.each do |key|
34
+ data['network'][key] = options[key]
35
+ end
36
+
37
+ request(
38
+ :body => Fog::JSON.encode(data),
39
+ :expects => 201,
40
+ :method => 'POST',
41
+ :path => 'networks'
42
+ )
43
+ end
44
+ end
45
+
46
+ class Mock
47
+ def create_network(options = {})
48
+ response = Excon::Response.new
49
+ response.status = 201
50
+ data = {
51
+ 'id' => Fog::HP::Mock.uuid.to_s,
52
+ 'name' => options[:name] || "",
53
+ 'tenant_id' => options[:tenant_id] || Fog::Mock.random_numbers(14).to_s,
54
+ 'status' => 'ACTIVE',
55
+ 'subnets' => [],
56
+ 'router:external' => false,
57
+ 'admin_state_up' => options[:admin_state_up] || true,
58
+ 'shared' => options[:shared] || false
59
+ }
60
+ self.data[:networks][data['id']] = data
61
+ response.body = { 'network' => data }
62
+ response
63
+ end
64
+ end
65
+
66
+ end
67
+ end
68
+ end