fog-ifeel 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1035) hide show
  1. checksums.yaml +7 -0
  2. data/.document +3 -0
  3. data/.github/stale.yml +17 -0
  4. data/.gitignore +30 -0
  5. data/.irbrc +82 -0
  6. data/.rubocop.yml +20 -0
  7. data/.rubocop_todo.yml +606 -0
  8. data/.travis.yml +41 -0
  9. data/.yardopts +1 -0
  10. data/CHANGELOG.md +10369 -0
  11. data/CONTRIBUTING.md +276 -0
  12. data/CONTRIBUTORS.md +898 -0
  13. data/Gemfile +10 -0
  14. data/LICENSE.md +20 -0
  15. data/README.md +187 -0
  16. data/RELEASE.md +40 -0
  17. data/Rakefile +228 -0
  18. data/benchs/each_provider.sh +6 -0
  19. data/benchs/each_service.sh +6 -0
  20. data/benchs/fog_vs.rb +106 -0
  21. data/benchs/load_times.rb +37 -0
  22. data/benchs/params.rb +43 -0
  23. data/benchs/parse_vs_push.rb +67 -0
  24. data/bin/fog +78 -0
  25. data/fog.gemspec +124 -0
  26. data/gemfiles/Gemfile-2.0 +11 -0
  27. data/gemfiles/Gemfile-edge +14 -0
  28. data/gemfiles/Gemfile-edge-2.0 +16 -0
  29. data/lib/fog.rb +63 -0
  30. data/lib/fog/aws/service_mapper.rb +129 -0
  31. data/lib/fog/bare_metal_cloud.rb +1 -0
  32. data/lib/fog/bare_metal_cloud/compute.rb +93 -0
  33. data/lib/fog/bare_metal_cloud/core.rb +10 -0
  34. data/lib/fog/bare_metal_cloud/requests/compute/add_server.rb +31 -0
  35. data/lib/fog/bare_metal_cloud/requests/compute/add_server_by_configuration.rb +31 -0
  36. data/lib/fog/bare_metal_cloud/requests/compute/cancel_server.rb +28 -0
  37. data/lib/fog/bare_metal_cloud/requests/compute/get_server.rb +39 -0
  38. data/lib/fog/bare_metal_cloud/requests/compute/list_configurations.rb +25 -0
  39. data/lib/fog/bare_metal_cloud/requests/compute/list_images.rb +25 -0
  40. data/lib/fog/bare_metal_cloud/requests/compute/list_plans.rb +28 -0
  41. data/lib/fog/bare_metal_cloud/requests/compute/list_servers.rb +34 -0
  42. data/lib/fog/bare_metal_cloud/requests/compute/reboot_server.rb +22 -0
  43. data/lib/fog/bin.rb +95 -0
  44. data/lib/fog/bin/aws.rb +15 -0
  45. data/lib/fog/bin/bare_metal_cloud.rb +29 -0
  46. data/lib/fog/bin/brightbox.rb +35 -0
  47. data/lib/fog/bin/clodo.rb +29 -0
  48. data/lib/fog/bin/cloudsigma.rb +28 -0
  49. data/lib/fog/bin/dnsmadeeasy.rb +29 -0
  50. data/lib/fog/bin/dreamhost.rb +29 -0
  51. data/lib/fog/bin/fogdocker.rb +28 -0
  52. data/lib/fog/bin/glesys.rb +29 -0
  53. data/lib/fog/bin/go_grid.rb +29 -0
  54. data/lib/fog/bin/ibm.rb +32 -0
  55. data/lib/fog/bin/linode.rb +34 -0
  56. data/lib/fog/bin/opennebula.rb +60 -0
  57. data/lib/fog/bin/openstack.rb +71 -0
  58. data/lib/fog/bin/openvz.rb +29 -0
  59. data/lib/fog/bin/rackspace.rb +89 -0
  60. data/lib/fog/bin/rage4.rb +29 -0
  61. data/lib/fog/bin/softlayer.rb +53 -0
  62. data/lib/fog/bin/vcloud.rb +28 -0
  63. data/lib/fog/bin/vcloud_director.rb +28 -0
  64. data/lib/fog/clodo.rb +1 -0
  65. data/lib/fog/clodo/compute.rb +147 -0
  66. data/lib/fog/clodo/core.rb +33 -0
  67. data/lib/fog/clodo/models/compute/image.rb +27 -0
  68. data/lib/fog/clodo/models/compute/images.rb +24 -0
  69. data/lib/fog/clodo/models/compute/server.rb +121 -0
  70. data/lib/fog/clodo/models/compute/servers.rb +32 -0
  71. data/lib/fog/clodo/requests/compute/add_ip_address.rb +47 -0
  72. data/lib/fog/clodo/requests/compute/create_server.rb +109 -0
  73. data/lib/fog/clodo/requests/compute/delete_ip_address.rb +45 -0
  74. data/lib/fog/clodo/requests/compute/delete_server.rb +40 -0
  75. data/lib/fog/clodo/requests/compute/get_image_details.rb +20 -0
  76. data/lib/fog/clodo/requests/compute/get_server_details.rb +45 -0
  77. data/lib/fog/clodo/requests/compute/list_images.rb +44 -0
  78. data/lib/fog/clodo/requests/compute/list_images_detail.rb +57 -0
  79. data/lib/fog/clodo/requests/compute/list_servers.rb +46 -0
  80. data/lib/fog/clodo/requests/compute/list_servers_detail.rb +47 -0
  81. data/lib/fog/clodo/requests/compute/move_ip_address.rb +33 -0
  82. data/lib/fog/clodo/requests/compute/reboot_server.rb +19 -0
  83. data/lib/fog/clodo/requests/compute/rebuild_server.rb +21 -0
  84. data/lib/fog/clodo/requests/compute/server_action.rb +24 -0
  85. data/lib/fog/clodo/requests/compute/start_server.rb +19 -0
  86. data/lib/fog/clodo/requests/compute/stop_server.rb +19 -0
  87. data/lib/fog/cloudsigma.rb +1 -0
  88. data/lib/fog/cloudsigma/compute.rb +228 -0
  89. data/lib/fog/cloudsigma/connection.rb +192 -0
  90. data/lib/fog/cloudsigma/core.rb +10 -0
  91. data/lib/fog/cloudsigma/docs/getting_started.md +59 -0
  92. data/lib/fog/cloudsigma/error.rb +39 -0
  93. data/lib/fog/cloudsigma/mock_data.rb +49 -0
  94. data/lib/fog/cloudsigma/models/balance.rb +12 -0
  95. data/lib/fog/cloudsigma/models/current_usage.rb +19 -0
  96. data/lib/fog/cloudsigma/models/fwpolicies.rb +18 -0
  97. data/lib/fog/cloudsigma/models/fwpolicy.rb +19 -0
  98. data/lib/fog/cloudsigma/models/ip.rb +20 -0
  99. data/lib/fog/cloudsigma/models/ipconf.rb +12 -0
  100. data/lib/fog/cloudsigma/models/ips.rb +26 -0
  101. data/lib/fog/cloudsigma/models/lib_volume.rb +48 -0
  102. data/lib/fog/cloudsigma/models/lib_volumes.rb +26 -0
  103. data/lib/fog/cloudsigma/models/mountpoint.rb +25 -0
  104. data/lib/fog/cloudsigma/models/nic.rb +19 -0
  105. data/lib/fog/cloudsigma/models/obj_ref.rb +12 -0
  106. data/lib/fog/cloudsigma/models/price_calculation.rb +13 -0
  107. data/lib/fog/cloudsigma/models/price_record.rb +37 -0
  108. data/lib/fog/cloudsigma/models/pricing.rb +19 -0
  109. data/lib/fog/cloudsigma/models/profile.rb +48 -0
  110. data/lib/fog/cloudsigma/models/rule.rb +18 -0
  111. data/lib/fog/cloudsigma/models/server.rb +212 -0
  112. data/lib/fog/cloudsigma/models/servers.rb +26 -0
  113. data/lib/fog/cloudsigma/models/snapshot.rb +77 -0
  114. data/lib/fog/cloudsigma/models/snapshots.rb +26 -0
  115. data/lib/fog/cloudsigma/models/subscription.rb +52 -0
  116. data/lib/fog/cloudsigma/models/subscriptions.rb +41 -0
  117. data/lib/fog/cloudsigma/models/usage_record.rb +13 -0
  118. data/lib/fog/cloudsigma/models/vlan.rb +29 -0
  119. data/lib/fog/cloudsigma/models/vlans.rb +26 -0
  120. data/lib/fog/cloudsigma/models/volume.rb +84 -0
  121. data/lib/fog/cloudsigma/models/volumes.rb +26 -0
  122. data/lib/fog/cloudsigma/nested_model.rb +60 -0
  123. data/lib/fog/cloudsigma/requests/calculate_subscription_price.rb +16 -0
  124. data/lib/fog/cloudsigma/requests/clone_libvolume.rb +31 -0
  125. data/lib/fog/cloudsigma/requests/clone_server.rb +31 -0
  126. data/lib/fog/cloudsigma/requests/clone_snapshot.rb +31 -0
  127. data/lib/fog/cloudsigma/requests/clone_volume.rb +31 -0
  128. data/lib/fog/cloudsigma/requests/close_vnc.rb +29 -0
  129. data/lib/fog/cloudsigma/requests/create_server.rb +31 -0
  130. data/lib/fog/cloudsigma/requests/create_snapshot.rb +27 -0
  131. data/lib/fog/cloudsigma/requests/create_subscription.rb +38 -0
  132. data/lib/fog/cloudsigma/requests/create_volume.rb +29 -0
  133. data/lib/fog/cloudsigma/requests/delete_server.rb +17 -0
  134. data/lib/fog/cloudsigma/requests/delete_snapshot.rb +17 -0
  135. data/lib/fog/cloudsigma/requests/delete_volume.rb +17 -0
  136. data/lib/fog/cloudsigma/requests/extend_subscription.rb +20 -0
  137. data/lib/fog/cloudsigma/requests/get_balance.rb +17 -0
  138. data/lib/fog/cloudsigma/requests/get_current_usage.rb +16 -0
  139. data/lib/fog/cloudsigma/requests/get_ip.rb +17 -0
  140. data/lib/fog/cloudsigma/requests/get_lib_volume.rb +17 -0
  141. data/lib/fog/cloudsigma/requests/get_pricing.rb +27 -0
  142. data/lib/fog/cloudsigma/requests/get_profile.rb +17 -0
  143. data/lib/fog/cloudsigma/requests/get_server.rb +17 -0
  144. data/lib/fog/cloudsigma/requests/get_snapshot.rb +17 -0
  145. data/lib/fog/cloudsigma/requests/get_subscription.rb +17 -0
  146. data/lib/fog/cloudsigma/requests/get_vlan.rb +17 -0
  147. data/lib/fog/cloudsigma/requests/get_volume.rb +17 -0
  148. data/lib/fog/cloudsigma/requests/list_fwpolicies.rb +17 -0
  149. data/lib/fog/cloudsigma/requests/list_ips.rb +17 -0
  150. data/lib/fog/cloudsigma/requests/list_lib_volumes.rb +17 -0
  151. data/lib/fog/cloudsigma/requests/list_servers.rb +17 -0
  152. data/lib/fog/cloudsigma/requests/list_snapshots.rb +17 -0
  153. data/lib/fog/cloudsigma/requests/list_subscriptions.rb +17 -0
  154. data/lib/fog/cloudsigma/requests/list_vlans.rb +17 -0
  155. data/lib/fog/cloudsigma/requests/list_volumes.rb +17 -0
  156. data/lib/fog/cloudsigma/requests/open_vnc.rb +33 -0
  157. data/lib/fog/cloudsigma/requests/start_server.rb +31 -0
  158. data/lib/fog/cloudsigma/requests/stop_server.rb +32 -0
  159. data/lib/fog/cloudsigma/requests/update_profile.rb +17 -0
  160. data/lib/fog/cloudsigma/requests/update_server.rb +39 -0
  161. data/lib/fog/cloudsigma/requests/update_snapshot.rb +17 -0
  162. data/lib/fog/cloudsigma/requests/update_vlan.rb +19 -0
  163. data/lib/fog/cloudsigma/requests/update_volume.rb +17 -0
  164. data/lib/fog/core/deprecated/connection.rb +24 -0
  165. data/lib/fog/core/parser.rb +2 -0
  166. data/lib/fog/dnsmadeeasy.rb +1 -0
  167. data/lib/fog/dnsmadeeasy/core.rb +10 -0
  168. data/lib/fog/dnsmadeeasy/dns.rb +130 -0
  169. data/lib/fog/dnsmadeeasy/models/dns/record.rb +77 -0
  170. data/lib/fog/dnsmadeeasy/models/dns/records.rb +32 -0
  171. data/lib/fog/dnsmadeeasy/models/dns/zone.rb +38 -0
  172. data/lib/fog/dnsmadeeasy/models/dns/zones.rb +26 -0
  173. data/lib/fog/dnsmadeeasy/requests/dns/create_domain.rb +27 -0
  174. data/lib/fog/dnsmadeeasy/requests/dns/create_record.rb +59 -0
  175. data/lib/fog/dnsmadeeasy/requests/dns/create_secondary.rb +33 -0
  176. data/lib/fog/dnsmadeeasy/requests/dns/delete_all_domains.rb +21 -0
  177. data/lib/fog/dnsmadeeasy/requests/dns/delete_all_secondary.rb +20 -0
  178. data/lib/fog/dnsmadeeasy/requests/dns/delete_domain.rb +23 -0
  179. data/lib/fog/dnsmadeeasy/requests/dns/delete_record.rb +24 -0
  180. data/lib/fog/dnsmadeeasy/requests/dns/delete_secondary.rb +23 -0
  181. data/lib/fog/dnsmadeeasy/requests/dns/get_domain.rb +27 -0
  182. data/lib/fog/dnsmadeeasy/requests/dns/get_record.rb +36 -0
  183. data/lib/fog/dnsmadeeasy/requests/dns/get_secondary.rb +27 -0
  184. data/lib/fog/dnsmadeeasy/requests/dns/list_domains.rb +22 -0
  185. data/lib/fog/dnsmadeeasy/requests/dns/list_records.rb +40 -0
  186. data/lib/fog/dnsmadeeasy/requests/dns/list_secondary.rb +22 -0
  187. data/lib/fog/dnsmadeeasy/requests/dns/update_record.rb +54 -0
  188. data/lib/fog/dnsmadeeasy/requests/dns/update_secondary.rb +33 -0
  189. data/lib/fog/dreamhost.rb +1 -0
  190. data/lib/fog/dreamhost/CHANGELOG.md +8 -0
  191. data/lib/fog/dreamhost/core.rb +10 -0
  192. data/lib/fog/dreamhost/dns.rb +79 -0
  193. data/lib/fog/dreamhost/examples/dns/getting_started.md +105 -0
  194. data/lib/fog/dreamhost/models/dns/record.rb +31 -0
  195. data/lib/fog/dreamhost/models/dns/records.rb +34 -0
  196. data/lib/fog/dreamhost/models/dns/zone.rb +55 -0
  197. data/lib/fog/dreamhost/models/dns/zones.rb +37 -0
  198. data/lib/fog/dreamhost/requests/dns/create_record.rb +27 -0
  199. data/lib/fog/dreamhost/requests/dns/delete_record.rb +26 -0
  200. data/lib/fog/dreamhost/requests/dns/list_records.rb +20 -0
  201. data/lib/fog/fogdocker.rb +1 -0
  202. data/lib/fog/fogdocker/compute.rb +61 -0
  203. data/lib/fog/fogdocker/core.rb +9 -0
  204. data/lib/fog/fogdocker/errors.rb +9 -0
  205. data/lib/fog/fogdocker/models/compute/image.rb +37 -0
  206. data/lib/fog/fogdocker/models/compute/images.rb +24 -0
  207. data/lib/fog/fogdocker/models/compute/server.rb +154 -0
  208. data/lib/fog/fogdocker/models/compute/servers.rb +25 -0
  209. data/lib/fog/fogdocker/requests/compute/api_version.rb +16 -0
  210. data/lib/fog/fogdocker/requests/compute/container_action.rb +72 -0
  211. data/lib/fog/fogdocker/requests/compute/container_all.rb +37 -0
  212. data/lib/fog/fogdocker/requests/compute/container_commit.rb +22 -0
  213. data/lib/fog/fogdocker/requests/compute/container_create.rb +52 -0
  214. data/lib/fog/fogdocker/requests/compute/container_delete.rb +21 -0
  215. data/lib/fog/fogdocker/requests/compute/container_get.rb +50 -0
  216. data/lib/fog/fogdocker/requests/compute/image_all.rb +27 -0
  217. data/lib/fog/fogdocker/requests/compute/image_create.rb +17 -0
  218. data/lib/fog/fogdocker/requests/compute/image_delete.rb +20 -0
  219. data/lib/fog/fogdocker/requests/compute/image_get.rb +19 -0
  220. data/lib/fog/fogdocker/requests/compute/image_search.rb +29 -0
  221. data/lib/fog/glesys.rb +1 -0
  222. data/lib/fog/glesys/compute.rb +136 -0
  223. data/lib/fog/glesys/core.rb +10 -0
  224. data/lib/fog/glesys/models/compute/ip.rb +73 -0
  225. data/lib/fog/glesys/models/compute/ips.rb +117 -0
  226. data/lib/fog/glesys/models/compute/server.rb +150 -0
  227. data/lib/fog/glesys/models/compute/servers.rb +42 -0
  228. data/lib/fog/glesys/models/compute/ssh_key.rb +28 -0
  229. data/lib/fog/glesys/models/compute/ssh_keys.rb +21 -0
  230. data/lib/fog/glesys/models/compute/template.rb +17 -0
  231. data/lib/fog/glesys/models/compute/templates.rb +38 -0
  232. data/lib/fog/glesys/requests/compute/create.rb +11 -0
  233. data/lib/fog/glesys/requests/compute/destroy.rb +15 -0
  234. data/lib/fog/glesys/requests/compute/edit.rb +11 -0
  235. data/lib/fog/glesys/requests/compute/ip_add.rb +11 -0
  236. data/lib/fog/glesys/requests/compute/ip_details.rb +11 -0
  237. data/lib/fog/glesys/requests/compute/ip_list_free.rb +11 -0
  238. data/lib/fog/glesys/requests/compute/ip_list_own.rb +11 -0
  239. data/lib/fog/glesys/requests/compute/ip_release.rb +11 -0
  240. data/lib/fog/glesys/requests/compute/ip_remove.rb +11 -0
  241. data/lib/fog/glesys/requests/compute/ip_take.rb +11 -0
  242. data/lib/fog/glesys/requests/compute/list_servers.rb +15 -0
  243. data/lib/fog/glesys/requests/compute/reboot.rb +11 -0
  244. data/lib/fog/glesys/requests/compute/server_details.rb +11 -0
  245. data/lib/fog/glesys/requests/compute/server_status.rb +11 -0
  246. data/lib/fog/glesys/requests/compute/ssh_key_add.rb +11 -0
  247. data/lib/fog/glesys/requests/compute/ssh_key_list.rb +11 -0
  248. data/lib/fog/glesys/requests/compute/ssh_key_remove.rb +11 -0
  249. data/lib/fog/glesys/requests/compute/start.rb +11 -0
  250. data/lib/fog/glesys/requests/compute/stop.rb +11 -0
  251. data/lib/fog/glesys/requests/compute/template_list.rb +11 -0
  252. data/lib/fog/go_grid.rb +1 -0
  253. data/lib/fog/go_grid/compute.rb +110 -0
  254. data/lib/fog/go_grid/core.rb +10 -0
  255. data/lib/fog/go_grid/models/compute/image.rb +55 -0
  256. data/lib/fog/go_grid/models/compute/images.rb +29 -0
  257. data/lib/fog/go_grid/models/compute/password.rb +45 -0
  258. data/lib/fog/go_grid/models/compute/passwords.rb +32 -0
  259. data/lib/fog/go_grid/models/compute/server.rb +94 -0
  260. data/lib/fog/go_grid/models/compute/servers.rb +32 -0
  261. data/lib/fog/go_grid/requests/compute/common_lookup_list.rb +26 -0
  262. data/lib/fog/go_grid/requests/compute/grid_image_get.rb +37 -0
  263. data/lib/fog/go_grid/requests/compute/grid_image_list.rb +40 -0
  264. data/lib/fog/go_grid/requests/compute/grid_ip_list.rb +28 -0
  265. data/lib/fog/go_grid/requests/compute/grid_loadbalancer_list.rb +26 -0
  266. data/lib/fog/go_grid/requests/compute/grid_server_add.rb +34 -0
  267. data/lib/fog/go_grid/requests/compute/grid_server_delete.rb +23 -0
  268. data/lib/fog/go_grid/requests/compute/grid_server_get.rb +23 -0
  269. data/lib/fog/go_grid/requests/compute/grid_server_list.rb +28 -0
  270. data/lib/fog/go_grid/requests/compute/grid_server_power.rb +24 -0
  271. data/lib/fog/go_grid/requests/compute/support_password_get.rb +26 -0
  272. data/lib/fog/go_grid/requests/compute/support_password_list.rb +28 -0
  273. data/lib/fog/ibm.rb +2 -0
  274. data/lib/fog/ibm/compute.rb +230 -0
  275. data/lib/fog/ibm/core.rb +172 -0
  276. data/lib/fog/ibm/models/compute/address.rb +61 -0
  277. data/lib/fog/ibm/models/compute/addresses.rb +25 -0
  278. data/lib/fog/ibm/models/compute/image.rb +68 -0
  279. data/lib/fog/ibm/models/compute/images.rb +24 -0
  280. data/lib/fog/ibm/models/compute/instance-type.rb +14 -0
  281. data/lib/fog/ibm/models/compute/instance-types.rb +12 -0
  282. data/lib/fog/ibm/models/compute/key.rb +35 -0
  283. data/lib/fog/ibm/models/compute/keys.rb +32 -0
  284. data/lib/fog/ibm/models/compute/location.rb +15 -0
  285. data/lib/fog/ibm/models/compute/locations.rb +24 -0
  286. data/lib/fog/ibm/models/compute/server.rb +189 -0
  287. data/lib/fog/ibm/models/compute/servers.rb +24 -0
  288. data/lib/fog/ibm/models/compute/vlan.rb +13 -0
  289. data/lib/fog/ibm/models/compute/vlans.rb +25 -0
  290. data/lib/fog/ibm/models/storage/offering.rb +18 -0
  291. data/lib/fog/ibm/models/storage/offerings.rb +16 -0
  292. data/lib/fog/ibm/models/storage/volume.rb +96 -0
  293. data/lib/fog/ibm/models/storage/volumes.rb +24 -0
  294. data/lib/fog/ibm/requests/compute/clone_image.rb +44 -0
  295. data/lib/fog/ibm/requests/compute/create_address.rb +46 -0
  296. data/lib/fog/ibm/requests/compute/create_image.rb +52 -0
  297. data/lib/fog/ibm/requests/compute/create_instance.rb +81 -0
  298. data/lib/fog/ibm/requests/compute/create_key.rb +57 -0
  299. data/lib/fog/ibm/requests/compute/delete_address.rb +42 -0
  300. data/lib/fog/ibm/requests/compute/delete_image.rb +39 -0
  301. data/lib/fog/ibm/requests/compute/delete_instance.rb +48 -0
  302. data/lib/fog/ibm/requests/compute/delete_key.rb +37 -0
  303. data/lib/fog/ibm/requests/compute/get_image.rb +63 -0
  304. data/lib/fog/ibm/requests/compute/get_image_agreement.rb +62 -0
  305. data/lib/fog/ibm/requests/compute/get_image_manifest.rb +35 -0
  306. data/lib/fog/ibm/requests/compute/get_instance.rb +72 -0
  307. data/lib/fog/ibm/requests/compute/get_instance_logs.rb +23 -0
  308. data/lib/fog/ibm/requests/compute/get_key.rb +45 -0
  309. data/lib/fog/ibm/requests/compute/get_location.rb +51 -0
  310. data/lib/fog/ibm/requests/compute/get_request.rb +74 -0
  311. data/lib/fog/ibm/requests/compute/list_address_offerings.rb +54 -0
  312. data/lib/fog/ibm/requests/compute/list_addresses.rb +49 -0
  313. data/lib/fog/ibm/requests/compute/list_images.rb +54 -0
  314. data/lib/fog/ibm/requests/compute/list_instances.rb +53 -0
  315. data/lib/fog/ibm/requests/compute/list_keys.rb +53 -0
  316. data/lib/fog/ibm/requests/compute/list_locations.rb +33 -0
  317. data/lib/fog/ibm/requests/compute/list_vlans.rb +43 -0
  318. data/lib/fog/ibm/requests/compute/modify_instance.rb +68 -0
  319. data/lib/fog/ibm/requests/compute/modify_key.rb +48 -0
  320. data/lib/fog/ibm/requests/storage/create_volume.rb +63 -0
  321. data/lib/fog/ibm/requests/storage/delete_volume.rb +38 -0
  322. data/lib/fog/ibm/requests/storage/get_volume.rb +68 -0
  323. data/lib/fog/ibm/requests/storage/list_offerings.rb +72 -0
  324. data/lib/fog/ibm/requests/storage/list_volumes.rb +43 -0
  325. data/lib/fog/ibm/storage.rb +76 -0
  326. data/lib/fog/linode.rb +2 -0
  327. data/lib/fog/linode/compute.rb +124 -0
  328. data/lib/fog/linode/core.rb +10 -0
  329. data/lib/fog/linode/dns.rb +87 -0
  330. data/lib/fog/linode/models/compute/data_center.rb +13 -0
  331. data/lib/fog/linode/models/compute/data_centers.rb +26 -0
  332. data/lib/fog/linode/models/compute/disk.rb +62 -0
  333. data/lib/fog/linode/models/compute/disks.rb +40 -0
  334. data/lib/fog/linode/models/compute/flavor.rb +23 -0
  335. data/lib/fog/linode/models/compute/flavors.rb +39 -0
  336. data/lib/fog/linode/models/compute/image.rb +16 -0
  337. data/lib/fog/linode/models/compute/images.rb +34 -0
  338. data/lib/fog/linode/models/compute/ip.rb +30 -0
  339. data/lib/fog/linode/models/compute/ips.rb +40 -0
  340. data/lib/fog/linode/models/compute/kernel.rb +15 -0
  341. data/lib/fog/linode/models/compute/kernels.rb +38 -0
  342. data/lib/fog/linode/models/compute/node_balancer_flavor.rb +13 -0
  343. data/lib/fog/linode/models/compute/node_balancer_flavors.rb +27 -0
  344. data/lib/fog/linode/models/compute/server.rb +101 -0
  345. data/lib/fog/linode/models/compute/servers.rb +32 -0
  346. data/lib/fog/linode/models/compute/stack_script.rb +13 -0
  347. data/lib/fog/linode/models/compute/stack_scripts.rb +32 -0
  348. data/lib/fog/linode/models/dns/record.rb +68 -0
  349. data/lib/fog/linode/models/dns/records.rb +33 -0
  350. data/lib/fog/linode/models/dns/zone.rb +79 -0
  351. data/lib/fog/linode/models/dns/zones.rb +25 -0
  352. data/lib/fog/linode/requests/compute/avail_datacenters.rb +44 -0
  353. data/lib/fog/linode/requests/compute/avail_distributions.rb +65 -0
  354. data/lib/fog/linode/requests/compute/avail_kernels.rb +62 -0
  355. data/lib/fog/linode/requests/compute/avail_linodeplans.rb +68 -0
  356. data/lib/fog/linode/requests/compute/avail_nodebalancers.rb +42 -0
  357. data/lib/fog/linode/requests/compute/avail_stackscripts.rb +56 -0
  358. data/lib/fog/linode/requests/compute/image_delete.rb +42 -0
  359. data/lib/fog/linode/requests/compute/image_list.rb +64 -0
  360. data/lib/fog/linode/requests/compute/linode_boot.rb +28 -0
  361. data/lib/fog/linode/requests/compute/linode_config_create.rb +34 -0
  362. data/lib/fog/linode/requests/compute/linode_config_delete.rb +32 -0
  363. data/lib/fog/linode/requests/compute/linode_config_list.rb +69 -0
  364. data/lib/fog/linode/requests/compute/linode_config_update.rb +33 -0
  365. data/lib/fog/linode/requests/compute/linode_create.rb +44 -0
  366. data/lib/fog/linode/requests/compute/linode_delete.rb +39 -0
  367. data/lib/fog/linode/requests/compute/linode_disk_create.rb +35 -0
  368. data/lib/fog/linode/requests/compute/linode_disk_createfromdistribution.rb +36 -0
  369. data/lib/fog/linode/requests/compute/linode_disk_createfromimage.rb +37 -0
  370. data/lib/fog/linode/requests/compute/linode_disk_createfromstackscript.rb +24 -0
  371. data/lib/fog/linode/requests/compute/linode_disk_delete.rb +33 -0
  372. data/lib/fog/linode/requests/compute/linode_disk_duplicate.rb +33 -0
  373. data/lib/fog/linode/requests/compute/linode_disk_imagize.rb +37 -0
  374. data/lib/fog/linode/requests/compute/linode_disk_list.rb +58 -0
  375. data/lib/fog/linode/requests/compute/linode_disk_resize.rb +36 -0
  376. data/lib/fog/linode/requests/compute/linode_disk_update.rb +34 -0
  377. data/lib/fog/linode/requests/compute/linode_ip_addprivate.rb +15 -0
  378. data/lib/fog/linode/requests/compute/linode_ip_list.rb +57 -0
  379. data/lib/fog/linode/requests/compute/linode_list.rb +81 -0
  380. data/lib/fog/linode/requests/compute/linode_reboot.rb +39 -0
  381. data/lib/fog/linode/requests/compute/linode_shutdown.rb +28 -0
  382. data/lib/fog/linode/requests/compute/linode_update.rb +28 -0
  383. data/lib/fog/linode/requests/compute/stackscript_list.rb +30 -0
  384. data/lib/fog/linode/requests/dns/domain_create.rb +41 -0
  385. data/lib/fog/linode/requests/dns/domain_delete.rb +25 -0
  386. data/lib/fog/linode/requests/dns/domain_list.rb +40 -0
  387. data/lib/fog/linode/requests/dns/domain_resource_create.rb +42 -0
  388. data/lib/fog/linode/requests/dns/domain_resource_delete.rb +26 -0
  389. data/lib/fog/linode/requests/dns/domain_resource_list.rb +41 -0
  390. data/lib/fog/linode/requests/dns/domain_resource_update.rb +43 -0
  391. data/lib/fog/linode/requests/dns/domain_update.rb +36 -0
  392. data/lib/fog/opennebula.rb +1 -0
  393. data/lib/fog/opennebula/README.md +113 -0
  394. data/lib/fog/opennebula/compute.rb +136 -0
  395. data/lib/fog/opennebula/core.rb +8 -0
  396. data/lib/fog/opennebula/models/compute/flavor.rb +175 -0
  397. data/lib/fog/opennebula/models/compute/flavors.rb +42 -0
  398. data/lib/fog/opennebula/models/compute/group.rb +22 -0
  399. data/lib/fog/opennebula/models/compute/groups.rb +34 -0
  400. data/lib/fog/opennebula/models/compute/interface.rb +33 -0
  401. data/lib/fog/opennebula/models/compute/interfaces.rb +12 -0
  402. data/lib/fog/opennebula/models/compute/network.rb +42 -0
  403. data/lib/fog/opennebula/models/compute/networks.rb +35 -0
  404. data/lib/fog/opennebula/models/compute/server.rb +100 -0
  405. data/lib/fog/opennebula/models/compute/servers.rb +30 -0
  406. data/lib/fog/opennebula/requests/compute/OpenNebulaVNC.rb +340 -0
  407. data/lib/fog/opennebula/requests/compute/get_vnc_console.rb +47 -0
  408. data/lib/fog/opennebula/requests/compute/image_pool.rb +26 -0
  409. data/lib/fog/opennebula/requests/compute/list_groups.rb +79 -0
  410. data/lib/fog/opennebula/requests/compute/list_networks.rb +72 -0
  411. data/lib/fog/opennebula/requests/compute/list_vms.rb +69 -0
  412. data/lib/fog/opennebula/requests/compute/template_pool.rb +136 -0
  413. data/lib/fog/opennebula/requests/compute/vm_allocate.rb +99 -0
  414. data/lib/fog/opennebula/requests/compute/vm_destroy.rb +31 -0
  415. data/lib/fog/opennebula/requests/compute/vm_disk_snapshot.rb +28 -0
  416. data/lib/fog/opennebula/requests/compute/vm_resume.rb +27 -0
  417. data/lib/fog/opennebula/requests/compute/vm_shutdown.rb +18 -0
  418. data/lib/fog/opennebula/requests/compute/vm_stop.rb +15 -0
  419. data/lib/fog/opennebula/requests/compute/vm_suspend.rb +31 -0
  420. data/lib/fog/openvz.rb +1 -0
  421. data/lib/fog/openvz/README.md +188 -0
  422. data/lib/fog/openvz/compute.rb +168 -0
  423. data/lib/fog/openvz/core.rb +8 -0
  424. data/lib/fog/openvz/models/compute/server.rb +189 -0
  425. data/lib/fog/openvz/models/compute/servers.rb +24 -0
  426. data/lib/fog/openvz/requests/compute/compact_server.rb +17 -0
  427. data/lib/fog/openvz/requests/compute/convert_server.rb +17 -0
  428. data/lib/fog/openvz/requests/compute/create_server.rb +19 -0
  429. data/lib/fog/openvz/requests/compute/destroy_server.rb +17 -0
  430. data/lib/fog/openvz/requests/compute/exec2_server.rb +17 -0
  431. data/lib/fog/openvz/requests/compute/exec_server.rb +17 -0
  432. data/lib/fog/openvz/requests/compute/get_server_details.rb +17 -0
  433. data/lib/fog/openvz/requests/compute/list_servers.rb +17 -0
  434. data/lib/fog/openvz/requests/compute/mount_server.rb +17 -0
  435. data/lib/fog/openvz/requests/compute/quotainit_server.rb +17 -0
  436. data/lib/fog/openvz/requests/compute/quotaoff_server.rb +17 -0
  437. data/lib/fog/openvz/requests/compute/quotaon_server.rb +17 -0
  438. data/lib/fog/openvz/requests/compute/restart_server.rb +20 -0
  439. data/lib/fog/openvz/requests/compute/resume_server.rb +17 -0
  440. data/lib/fog/openvz/requests/compute/runscript_server.rb +17 -0
  441. data/lib/fog/openvz/requests/compute/set_server.rb +22 -0
  442. data/lib/fog/openvz/requests/compute/snapshot_delete_server.rb +17 -0
  443. data/lib/fog/openvz/requests/compute/snapshot_list_server.rb +17 -0
  444. data/lib/fog/openvz/requests/compute/snapshot_mount_server.rb +17 -0
  445. data/lib/fog/openvz/requests/compute/snapshot_server.rb +17 -0
  446. data/lib/fog/openvz/requests/compute/snapshot_switch_server.rb +17 -0
  447. data/lib/fog/openvz/requests/compute/snapshot_umount_server.rb +17 -0
  448. data/lib/fog/openvz/requests/compute/start_server.rb +20 -0
  449. data/lib/fog/openvz/requests/compute/status_server.rb +17 -0
  450. data/lib/fog/openvz/requests/compute/stop_server.rb +20 -0
  451. data/lib/fog/openvz/requests/compute/suspend_server.rb +17 -0
  452. data/lib/fog/openvz/requests/compute/umount_server.rb +17 -0
  453. data/lib/fog/rage4.rb +1 -0
  454. data/lib/fog/rage4/core.rb +10 -0
  455. data/lib/fog/rage4/dns.rb +72 -0
  456. data/lib/fog/rage4/models/dns/record.rb +73 -0
  457. data/lib/fog/rage4/models/dns/records.rb +38 -0
  458. data/lib/fog/rage4/models/dns/zone.rb +42 -0
  459. data/lib/fog/rage4/models/dns/zones.rb +30 -0
  460. data/lib/fog/rage4/requests/dns/bulk_update_records.rb +38 -0
  461. data/lib/fog/rage4/requests/dns/create_domain.rb +29 -0
  462. data/lib/fog/rage4/requests/dns/create_domain_vanity.rb +30 -0
  463. data/lib/fog/rage4/requests/dns/create_record.rb +59 -0
  464. data/lib/fog/rage4/requests/dns/create_reverse_domain_4.rb +28 -0
  465. data/lib/fog/rage4/requests/dns/delete_domain.rb +24 -0
  466. data/lib/fog/rage4/requests/dns/delete_record.rb +24 -0
  467. data/lib/fog/rage4/requests/dns/get_domain.rb +26 -0
  468. data/lib/fog/rage4/requests/dns/get_domain_by_name.rb +26 -0
  469. data/lib/fog/rage4/requests/dns/list_domains.rb +36 -0
  470. data/lib/fog/rage4/requests/dns/list_geo_regions.rb +25 -0
  471. data/lib/fog/rage4/requests/dns/list_record_types.rb +24 -0
  472. data/lib/fog/rage4/requests/dns/list_records.rb +28 -0
  473. data/lib/fog/rage4/requests/dns/set_record_failover.rb +25 -0
  474. data/lib/fog/rage4/requests/dns/show_current_usage.rb +21 -0
  475. data/lib/fog/rage4/requests/dns/show_global_usage.rb +21 -0
  476. data/lib/fog/rage4/requests/dns/update_domain.rb +39 -0
  477. data/lib/fog/rage4/requests/dns/update_record.rb +59 -0
  478. data/lib/fog/vcloud.rb +1 -0
  479. data/lib/fog/vcloud/compute.rb +366 -0
  480. data/lib/fog/vcloud/core.rb +10 -0
  481. data/lib/fog/vcloud/examples/README.md +54 -0
  482. data/lib/fog/vcloud/examples/creating_a_connection.md +20 -0
  483. data/lib/fog/vcloud/examples/creating_a_vapp.md +17 -0
  484. data/lib/fog/vcloud/examples/get_network_information.md +10 -0
  485. data/lib/fog/vcloud/examples/get_vapp_information.md +10 -0
  486. data/lib/fog/vcloud/examples/more_on_vapps.md +23 -0
  487. data/lib/fog/vcloud/models/compute/catalog.rb +20 -0
  488. data/lib/fog/vcloud/models/compute/catalog_item.rb +36 -0
  489. data/lib/fog/vcloud/models/compute/catalog_items.rb +34 -0
  490. data/lib/fog/vcloud/models/compute/catalogs.rb +36 -0
  491. data/lib/fog/vcloud/models/compute/helpers/status.rb +37 -0
  492. data/lib/fog/vcloud/models/compute/ip.rb +40 -0
  493. data/lib/fog/vcloud/models/compute/ips.rb +31 -0
  494. data/lib/fog/vcloud/models/compute/network.rb +22 -0
  495. data/lib/fog/vcloud/models/compute/networks.rb +46 -0
  496. data/lib/fog/vcloud/models/compute/organization.rb +41 -0
  497. data/lib/fog/vcloud/models/compute/organizations.rb +29 -0
  498. data/lib/fog/vcloud/models/compute/server.rb +343 -0
  499. data/lib/fog/vcloud/models/compute/servers.rb +49 -0
  500. data/lib/fog/vcloud/models/compute/tag.rb +18 -0
  501. data/lib/fog/vcloud/models/compute/tags.rb +30 -0
  502. data/lib/fog/vcloud/models/compute/task.rb +19 -0
  503. data/lib/fog/vcloud/models/compute/tasks.rb +27 -0
  504. data/lib/fog/vcloud/models/compute/vapp.rb +53 -0
  505. data/lib/fog/vcloud/models/compute/vapps.rb +25 -0
  506. data/lib/fog/vcloud/models/compute/vdc.rb +39 -0
  507. data/lib/fog/vcloud/models/compute/vdcs.rb +33 -0
  508. data/lib/fog/vcloud/requests/compute/clone_vapp.rb +39 -0
  509. data/lib/fog/vcloud/requests/compute/configure_metadata.rb +34 -0
  510. data/lib/fog/vcloud/requests/compute/configure_network.rb +41 -0
  511. data/lib/fog/vcloud/requests/compute/configure_network_ip.rb +46 -0
  512. data/lib/fog/vcloud/requests/compute/configure_node.rb +36 -0
  513. data/lib/fog/vcloud/requests/compute/configure_org_network.rb +139 -0
  514. data/lib/fog/vcloud/requests/compute/configure_vapp.rb +111 -0
  515. data/lib/fog/vcloud/requests/compute/configure_vm.rb +106 -0
  516. data/lib/fog/vcloud/requests/compute/configure_vm_cpus.rb +35 -0
  517. data/lib/fog/vcloud/requests/compute/configure_vm_customization_script.rb +30 -0
  518. data/lib/fog/vcloud/requests/compute/configure_vm_disks.rb +93 -0
  519. data/lib/fog/vcloud/requests/compute/configure_vm_memory.rb +36 -0
  520. data/lib/fog/vcloud/requests/compute/configure_vm_name_description.rb +26 -0
  521. data/lib/fog/vcloud/requests/compute/configure_vm_network.rb +33 -0
  522. data/lib/fog/vcloud/requests/compute/configure_vm_password.rb +36 -0
  523. data/lib/fog/vcloud/requests/compute/delete_metadata.rb +9 -0
  524. data/lib/fog/vcloud/requests/compute/delete_node.rb +9 -0
  525. data/lib/fog/vcloud/requests/compute/delete_vapp.rb +9 -0
  526. data/lib/fog/vcloud/requests/compute/get_catalog.rb +9 -0
  527. data/lib/fog/vcloud/requests/compute/get_catalog_item.rb +9 -0
  528. data/lib/fog/vcloud/requests/compute/get_customization_options.rb +9 -0
  529. data/lib/fog/vcloud/requests/compute/get_metadata.rb +9 -0
  530. data/lib/fog/vcloud/requests/compute/get_network.rb +9 -0
  531. data/lib/fog/vcloud/requests/compute/get_network_extensions.rb +9 -0
  532. data/lib/fog/vcloud/requests/compute/get_network_ip.rb +13 -0
  533. data/lib/fog/vcloud/requests/compute/get_network_ips.rb +13 -0
  534. data/lib/fog/vcloud/requests/compute/get_organization.rb +9 -0
  535. data/lib/fog/vcloud/requests/compute/get_server.rb +9 -0
  536. data/lib/fog/vcloud/requests/compute/get_task.rb +9 -0
  537. data/lib/fog/vcloud/requests/compute/get_task_list.rb +9 -0
  538. data/lib/fog/vcloud/requests/compute/get_vapp.rb +9 -0
  539. data/lib/fog/vcloud/requests/compute/get_vapp_template.rb +9 -0
  540. data/lib/fog/vcloud/requests/compute/get_vdc.rb +9 -0
  541. data/lib/fog/vcloud/requests/compute/get_vm_disks.rb +15 -0
  542. data/lib/fog/vcloud/requests/compute/get_vm_memory.rb +15 -0
  543. data/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb +87 -0
  544. data/lib/fog/vcloud/requests/compute/login.rb +23 -0
  545. data/lib/fog/vcloud/requests/compute/power_off.rb +9 -0
  546. data/lib/fog/vcloud/requests/compute/power_on.rb +9 -0
  547. data/lib/fog/vcloud/requests/compute/power_reset.rb +9 -0
  548. data/lib/fog/vcloud/requests/compute/power_shutdown.rb +9 -0
  549. data/lib/fog/vcloud/requests/compute/undeploy.rb +31 -0
  550. data/lib/fog/vcloud_director.rb +1 -0
  551. data/lib/fog/vcloud_director/README.md +959 -0
  552. data/lib/fog/vcloud_director/compute.rb +917 -0
  553. data/lib/fog/vcloud_director/core.rb +69 -0
  554. data/lib/fog/vcloud_director/generators/compute/compose_common.rb +122 -0
  555. data/lib/fog/vcloud_director/generators/compute/compose_vapp.rb +25 -0
  556. data/lib/fog/vcloud_director/generators/compute/create_snapshot.rb +25 -0
  557. data/lib/fog/vcloud_director/generators/compute/customization.rb +105 -0
  558. data/lib/fog/vcloud_director/generators/compute/disks.rb +186 -0
  559. data/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb +243 -0
  560. data/lib/fog/vcloud_director/generators/compute/instantiate_vapp_template_params.rb +30 -0
  561. data/lib/fog/vcloud_director/generators/compute/metadata.rb +104 -0
  562. data/lib/fog/vcloud_director/generators/compute/network_config_section.rb +68 -0
  563. data/lib/fog/vcloud_director/generators/compute/org_vdc_network.rb +88 -0
  564. data/lib/fog/vcloud_director/generators/compute/recompose_vapp.rb +34 -0
  565. data/lib/fog/vcloud_director/generators/compute/vapp.rb +28 -0
  566. data/lib/fog/vcloud_director/generators/compute/vm.rb +32 -0
  567. data/lib/fog/vcloud_director/generators/compute/vm_network.rb +119 -0
  568. data/lib/fog/vcloud_director/models/compute/catalog.rb +22 -0
  569. data/lib/fog/vcloud_director/models/compute/catalog_item.rb +30 -0
  570. data/lib/fog/vcloud_director/models/compute/catalog_items.rb +33 -0
  571. data/lib/fog/vcloud_director/models/compute/catalogs.rb +30 -0
  572. data/lib/fog/vcloud_director/models/compute/custom_field.rb +18 -0
  573. data/lib/fog/vcloud_director/models/compute/custom_fields.rb +67 -0
  574. data/lib/fog/vcloud_director/models/compute/disk.rb +48 -0
  575. data/lib/fog/vcloud_director/models/compute/disks.rb +44 -0
  576. data/lib/fog/vcloud_director/models/compute/media.rb +26 -0
  577. data/lib/fog/vcloud_director/models/compute/medias.rb +75 -0
  578. data/lib/fog/vcloud_director/models/compute/network.rb +25 -0
  579. data/lib/fog/vcloud_director/models/compute/networks.rb +62 -0
  580. data/lib/fog/vcloud_director/models/compute/organization.rb +37 -0
  581. data/lib/fog/vcloud_director/models/compute/organizations.rb +28 -0
  582. data/lib/fog/vcloud_director/models/compute/tag.rb +31 -0
  583. data/lib/fog/vcloud_director/models/compute/tags.rb +41 -0
  584. data/lib/fog/vcloud_director/models/compute/task.rb +55 -0
  585. data/lib/fog/vcloud_director/models/compute/tasks.rb +36 -0
  586. data/lib/fog/vcloud_director/models/compute/template_vm.rb +52 -0
  587. data/lib/fog/vcloud_director/models/compute/template_vms.rb +41 -0
  588. data/lib/fog/vcloud_director/models/compute/vapp.rb +144 -0
  589. data/lib/fog/vcloud_director/models/compute/vapp_template.rb +26 -0
  590. data/lib/fog/vcloud_director/models/compute/vapp_templates.rb +40 -0
  591. data/lib/fog/vcloud_director/models/compute/vapps.rb +40 -0
  592. data/lib/fog/vcloud_director/models/compute/vdc.rb +45 -0
  593. data/lib/fog/vcloud_director/models/compute/vdcs.rb +37 -0
  594. data/lib/fog/vcloud_director/models/compute/vm.rb +197 -0
  595. data/lib/fog/vcloud_director/models/compute/vm_customization.rb +40 -0
  596. data/lib/fog/vcloud_director/models/compute/vm_customizations.rb +29 -0
  597. data/lib/fog/vcloud_director/models/compute/vm_network.rb +27 -0
  598. data/lib/fog/vcloud_director/models/compute/vm_networks.rb +19 -0
  599. data/lib/fog/vcloud_director/models/compute/vms.rb +46 -0
  600. data/lib/fog/vcloud_director/parsers/compute/disks.rb +53 -0
  601. data/lib/fog/vcloud_director/parsers/compute/metadata.rb +61 -0
  602. data/lib/fog/vcloud_director/parsers/compute/network.rb +104 -0
  603. data/lib/fog/vcloud_director/parsers/compute/vm.rb +86 -0
  604. data/lib/fog/vcloud_director/parsers/compute/vm_customization.rb +55 -0
  605. data/lib/fog/vcloud_director/parsers/compute/vm_network.rb +107 -0
  606. data/lib/fog/vcloud_director/parsers/compute/vm_parser_helper.rb +62 -0
  607. data/lib/fog/vcloud_director/parsers/compute/vms.rb +68 -0
  608. data/lib/fog/vcloud_director/parsers/compute/vms_by_metadata.rb +37 -0
  609. data/lib/fog/vcloud_director/query.rb +59 -0
  610. data/lib/fog/vcloud_director/requests/compute/delete_catalog_item.rb +22 -0
  611. data/lib/fog/vcloud_director/requests/compute/delete_catalog_item_metadata_item_metadata.rb +25 -0
  612. data/lib/fog/vcloud_director/requests/compute/delete_disk.rb +60 -0
  613. data/lib/fog/vcloud_director/requests/compute/delete_disk_metadata_item_metadata.rb +25 -0
  614. data/lib/fog/vcloud_director/requests/compute/delete_logout.rb +18 -0
  615. data/lib/fog/vcloud_director/requests/compute/delete_media.rb +122 -0
  616. data/lib/fog/vcloud_director/requests/compute/delete_media_metadata_item_metadata.rb +25 -0
  617. data/lib/fog/vcloud_director/requests/compute/delete_network.rb +62 -0
  618. data/lib/fog/vcloud_director/requests/compute/delete_shadow_vm.rb +30 -0
  619. data/lib/fog/vcloud_director/requests/compute/delete_vapp.rb +59 -0
  620. data/lib/fog/vcloud_director/requests/compute/delete_vapp_metadata_item_metadata.rb +30 -0
  621. data/lib/fog/vcloud_director/requests/compute/delete_vapp_template.rb +27 -0
  622. data/lib/fog/vcloud_director/requests/compute/delete_vapp_template_metadata_item_metadata.rb +26 -0
  623. data/lib/fog/vcloud_director/requests/compute/get_allocated_ip_addresses.rb +25 -0
  624. data/lib/fog/vcloud_director/requests/compute/get_catalog.rb +63 -0
  625. data/lib/fog/vcloud_director/requests/compute/get_catalog_item.rb +48 -0
  626. data/lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata.rb +25 -0
  627. data/lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata_item_metadata.rb +26 -0
  628. data/lib/fog/vcloud_director/requests/compute/get_catalog_metadata.rb +25 -0
  629. data/lib/fog/vcloud_director/requests/compute/get_catalog_metadata_item_metadata.rb +26 -0
  630. data/lib/fog/vcloud_director/requests/compute/get_catalogs_from_query.rb +94 -0
  631. data/lib/fog/vcloud_director/requests/compute/get_control_access_params_catalog.rb +26 -0
  632. data/lib/fog/vcloud_director/requests/compute/get_control_access_params_vapp.rb +25 -0
  633. data/lib/fog/vcloud_director/requests/compute/get_cpu_rasd_item.rb +65 -0
  634. data/lib/fog/vcloud_director/requests/compute/get_current_session.rb +83 -0
  635. data/lib/fog/vcloud_director/requests/compute/get_disk.rb +123 -0
  636. data/lib/fog/vcloud_director/requests/compute/get_disk_metadata.rb +25 -0
  637. data/lib/fog/vcloud_director/requests/compute/get_disk_metadata_item_metadata.rb +26 -0
  638. data/lib/fog/vcloud_director/requests/compute/get_disk_owner.rb +70 -0
  639. data/lib/fog/vcloud_director/requests/compute/get_disks_from_query.rb +94 -0
  640. data/lib/fog/vcloud_director/requests/compute/get_disks_rasd_items_list.rb +90 -0
  641. data/lib/fog/vcloud_director/requests/compute/get_edge_gateway.rb +109 -0
  642. data/lib/fog/vcloud_director/requests/compute/get_entity.rb +38 -0
  643. data/lib/fog/vcloud_director/requests/compute/get_execute_query.rb +736 -0
  644. data/lib/fog/vcloud_director/requests/compute/get_groups_from_query.rb +95 -0
  645. data/lib/fog/vcloud_director/requests/compute/get_guest_customization_system_section_vapp.rb +69 -0
  646. data/lib/fog/vcloud_director/requests/compute/get_guest_customization_system_section_vapp_template.rb +25 -0
  647. data/lib/fog/vcloud_director/requests/compute/get_href.rb +21 -0
  648. data/lib/fog/vcloud_director/requests/compute/get_lease_settings_section_vapp.rb +59 -0
  649. data/lib/fog/vcloud_director/requests/compute/get_lease_settings_section_vapp_template.rb +25 -0
  650. data/lib/fog/vcloud_director/requests/compute/get_media.rb +111 -0
  651. data/lib/fog/vcloud_director/requests/compute/get_media_drives_rasd_items_list.rb +92 -0
  652. data/lib/fog/vcloud_director/requests/compute/get_media_metadata.rb +25 -0
  653. data/lib/fog/vcloud_director/requests/compute/get_media_metadata_item_metadata.rb +26 -0
  654. data/lib/fog/vcloud_director/requests/compute/get_media_owner.rb +70 -0
  655. data/lib/fog/vcloud_director/requests/compute/get_medias_from_query.rb +94 -0
  656. data/lib/fog/vcloud_director/requests/compute/get_memory_rasd_item.rb +64 -0
  657. data/lib/fog/vcloud_director/requests/compute/get_metadata.rb +41 -0
  658. data/lib/fog/vcloud_director/requests/compute/get_network.rb +67 -0
  659. data/lib/fog/vcloud_director/requests/compute/get_network_cards_items_list.rb +70 -0
  660. data/lib/fog/vcloud_director/requests/compute/get_network_complete.rb +78 -0
  661. data/lib/fog/vcloud_director/requests/compute/get_network_config_section_vapp.rb +61 -0
  662. data/lib/fog/vcloud_director/requests/compute/get_network_config_section_vapp_template.rb +25 -0
  663. data/lib/fog/vcloud_director/requests/compute/get_network_connection_system_section_vapp.rb +68 -0
  664. data/lib/fog/vcloud_director/requests/compute/get_network_connection_system_section_vapp_template.rb +25 -0
  665. data/lib/fog/vcloud_director/requests/compute/get_network_metadata.rb +25 -0
  666. data/lib/fog/vcloud_director/requests/compute/get_network_metadata_item_metadata.rb +26 -0
  667. data/lib/fog/vcloud_director/requests/compute/get_network_section_vapp.rb +25 -0
  668. data/lib/fog/vcloud_director/requests/compute/get_network_section_vapp_template.rb +25 -0
  669. data/lib/fog/vcloud_director/requests/compute/get_operating_system_section.rb +59 -0
  670. data/lib/fog/vcloud_director/requests/compute/get_org_settings.rb +38 -0
  671. data/lib/fog/vcloud_director/requests/compute/get_org_vdc_gateways.rb +83 -0
  672. data/lib/fog/vcloud_director/requests/compute/get_organization.rb +100 -0
  673. data/lib/fog/vcloud_director/requests/compute/get_organization_metadata.rb +25 -0
  674. data/lib/fog/vcloud_director/requests/compute/get_organization_metadata_item_metadata.rb +28 -0
  675. data/lib/fog/vcloud_director/requests/compute/get_organizations.rb +52 -0
  676. data/lib/fog/vcloud_director/requests/compute/get_organizations_from_query.rb +95 -0
  677. data/lib/fog/vcloud_director/requests/compute/get_product_sections_vapp.rb +25 -0
  678. data/lib/fog/vcloud_director/requests/compute/get_product_sections_vapp_template.rb +26 -0
  679. data/lib/fog/vcloud_director/requests/compute/get_request.rb +19 -0
  680. data/lib/fog/vcloud_director/requests/compute/get_runtime_info_section_type.rb +57 -0
  681. data/lib/fog/vcloud_director/requests/compute/get_serial_ports_items_list.rb +25 -0
  682. data/lib/fog/vcloud_director/requests/compute/get_shadow_vm.rb +24 -0
  683. data/lib/fog/vcloud_director/requests/compute/get_snapshot_section.rb +55 -0
  684. data/lib/fog/vcloud_director/requests/compute/get_startup_section.rb +64 -0
  685. data/lib/fog/vcloud_director/requests/compute/get_supported_systems_info.rb +239 -0
  686. data/lib/fog/vcloud_director/requests/compute/get_supported_versions.rb +1159 -0
  687. data/lib/fog/vcloud_director/requests/compute/get_task.rb +168 -0
  688. data/lib/fog/vcloud_director/requests/compute/get_task_list.rb +130 -0
  689. data/lib/fog/vcloud_director/requests/compute/get_template_vm.rb +74 -0
  690. data/lib/fog/vcloud_director/requests/compute/get_template_vms.rb +41 -0
  691. data/lib/fog/vcloud_director/requests/compute/get_thumbnail.rb +28 -0
  692. data/lib/fog/vcloud_director/requests/compute/get_users_from_query.rb +95 -0
  693. data/lib/fog/vcloud_director/requests/compute/get_vapp.rb +172 -0
  694. data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata.rb +84 -0
  695. data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata_item_metadata.rb +26 -0
  696. data/lib/fog/vcloud_director/requests/compute/get_vapp_ovf_descriptor.rb +24 -0
  697. data/lib/fog/vcloud_director/requests/compute/get_vapp_owner.rb +58 -0
  698. data/lib/fog/vcloud_director/requests/compute/get_vapp_template.rb +25 -0
  699. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_customization_system_section.rb +25 -0
  700. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata.rb +25 -0
  701. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata_item_metadata.rb +27 -0
  702. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_ovf_descriptor.rb +24 -0
  703. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_owner.rb +25 -0
  704. data/lib/fog/vcloud_director/requests/compute/get_vapp_templates_from_query.rb +95 -0
  705. data/lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb +94 -0
  706. data/lib/fog/vcloud_director/requests/compute/get_vcloud.rb +76 -0
  707. data/lib/fog/vcloud_director/requests/compute/get_vdc.rb +174 -0
  708. data/lib/fog/vcloud_director/requests/compute/get_vdc_metadata.rb +25 -0
  709. data/lib/fog/vcloud_director/requests/compute/get_vdc_metadata_item_metadata.rb +28 -0
  710. data/lib/fog/vcloud_director/requests/compute/get_vdc_storage_class.rb +83 -0
  711. data/lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata.rb +27 -0
  712. data/lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata_item_metadata.rb +25 -0
  713. data/lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb +94 -0
  714. data/lib/fog/vcloud_director/requests/compute/get_virtual_hardware_section.rb +29 -0
  715. data/lib/fog/vcloud_director/requests/compute/get_vm.rb +74 -0
  716. data/lib/fog/vcloud_director/requests/compute/get_vm_capabilities.rb +61 -0
  717. data/lib/fog/vcloud_director/requests/compute/get_vm_compliance_results.rb +24 -0
  718. data/lib/fog/vcloud_director/requests/compute/get_vm_customization.rb +31 -0
  719. data/lib/fog/vcloud_director/requests/compute/get_vm_disks.rb +51 -0
  720. data/lib/fog/vcloud_director/requests/compute/get_vm_network.rb +56 -0
  721. data/lib/fog/vcloud_director/requests/compute/get_vm_pending_question.rb +34 -0
  722. data/lib/fog/vcloud_director/requests/compute/get_vms.rb +41 -0
  723. data/lib/fog/vcloud_director/requests/compute/get_vms_by_metadata.rb +20 -0
  724. data/lib/fog/vcloud_director/requests/compute/get_vms_disk_attached_to.rb +39 -0
  725. data/lib/fog/vcloud_director/requests/compute/get_vms_in_lease_from_query.rb +150 -0
  726. data/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb +173 -0
  727. data/lib/fog/vcloud_director/requests/compute/post_acquire_ticket.rb +27 -0
  728. data/lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb +36 -0
  729. data/lib/fog/vcloud_director/requests/compute/post_attach_disk.rb +51 -0
  730. data/lib/fog/vcloud_director/requests/compute/post_cancel_task.rb +43 -0
  731. data/lib/fog/vcloud_director/requests/compute/post_capture_vapp.rb +70 -0
  732. data/lib/fog/vcloud_director/requests/compute/post_check_vm_compliance.rb +28 -0
  733. data/lib/fog/vcloud_director/requests/compute/post_clone_media.rb +102 -0
  734. data/lib/fog/vcloud_director/requests/compute/post_clone_vapp.rb +62 -0
  735. data/lib/fog/vcloud_director/requests/compute/post_clone_vapp_template.rb +52 -0
  736. data/lib/fog/vcloud_director/requests/compute/post_compose_vapp.rb +45 -0
  737. data/lib/fog/vcloud_director/requests/compute/post_configure_edge_gateway_services.rb +73 -0
  738. data/lib/fog/vcloud_director/requests/compute/post_consolidate_vm_vapp.rb +27 -0
  739. data/lib/fog/vcloud_director/requests/compute/post_consolidate_vm_vapp_template.rb +27 -0
  740. data/lib/fog/vcloud_director/requests/compute/post_create_catalog_item.rb +56 -0
  741. data/lib/fog/vcloud_director/requests/compute/post_create_org_vdc_network.rb +171 -0
  742. data/lib/fog/vcloud_director/requests/compute/post_create_snapshot.rb +21 -0
  743. data/lib/fog/vcloud_director/requests/compute/post_deploy_vapp.rb +51 -0
  744. data/lib/fog/vcloud_director/requests/compute/post_detach_disk.rb +39 -0
  745. data/lib/fog/vcloud_director/requests/compute/post_disable_nested_hv.rb +27 -0
  746. data/lib/fog/vcloud_director/requests/compute/post_disable_vapp_template_download.rb +24 -0
  747. data/lib/fog/vcloud_director/requests/compute/post_discard_vapp_state.rb +30 -0
  748. data/lib/fog/vcloud_director/requests/compute/post_eject_cd_rom.rb +39 -0
  749. data/lib/fog/vcloud_director/requests/compute/post_enable_nested_hv.rb +27 -0
  750. data/lib/fog/vcloud_director/requests/compute/post_enable_vapp_template_download.rb +24 -0
  751. data/lib/fog/vcloud_director/requests/compute/post_enter_maintenance_mode.rb +26 -0
  752. data/lib/fog/vcloud_director/requests/compute/post_exit_maintenance_mode.rb +22 -0
  753. data/lib/fog/vcloud_director/requests/compute/post_insert_cd_rom.rb +39 -0
  754. data/lib/fog/vcloud_director/requests/compute/post_install_vmware_tools.rb +27 -0
  755. data/lib/fog/vcloud_director/requests/compute/post_instantiate_vapp_template.rb +196 -0
  756. data/lib/fog/vcloud_director/requests/compute/post_login_session.rb +39 -0
  757. data/lib/fog/vcloud_director/requests/compute/post_power_off_vapp.rb +36 -0
  758. data/lib/fog/vcloud_director/requests/compute/post_power_on_vapp.rb +71 -0
  759. data/lib/fog/vcloud_director/requests/compute/post_reboot_vapp.rb +33 -0
  760. data/lib/fog/vcloud_director/requests/compute/post_recompose_vapp.rb +21 -0
  761. data/lib/fog/vcloud_director/requests/compute/post_reconfigure_vm.rb +118 -0
  762. data/lib/fog/vcloud_director/requests/compute/post_remove_all_snapshots.rb +27 -0
  763. data/lib/fog/vcloud_director/requests/compute/post_reset_vapp.rb +33 -0
  764. data/lib/fog/vcloud_director/requests/compute/post_revert_snapshot.rb +27 -0
  765. data/lib/fog/vcloud_director/requests/compute/post_shutdown_vapp.rb +33 -0
  766. data/lib/fog/vcloud_director/requests/compute/post_suspend_vapp.rb +33 -0
  767. data/lib/fog/vcloud_director/requests/compute/post_undeploy_vapp.rb +66 -0
  768. data/lib/fog/vcloud_director/requests/compute/post_update_catalog_item_metadata.rb +52 -0
  769. data/lib/fog/vcloud_director/requests/compute/post_update_disk_metadata.rb +52 -0
  770. data/lib/fog/vcloud_director/requests/compute/post_update_media_metadata.rb +52 -0
  771. data/lib/fog/vcloud_director/requests/compute/post_update_vapp_metadata.rb +86 -0
  772. data/lib/fog/vcloud_director/requests/compute/post_update_vapp_template_metadata.rb +52 -0
  773. data/lib/fog/vcloud_director/requests/compute/post_upgrade_hw_version.rb +28 -0
  774. data/lib/fog/vcloud_director/requests/compute/post_upload_disk.rb +133 -0
  775. data/lib/fog/vcloud_director/requests/compute/post_upload_media.rb +120 -0
  776. data/lib/fog/vcloud_director/requests/compute/post_upload_vapp_template.rb +46 -0
  777. data/lib/fog/vcloud_director/requests/compute/put_catalog_item_metadata_item_metadata.rb +50 -0
  778. data/lib/fog/vcloud_director/requests/compute/put_config_network_section_vapp.rb +26 -0
  779. data/lib/fog/vcloud_director/requests/compute/put_cpu.rb +88 -0
  780. data/lib/fog/vcloud_director/requests/compute/put_disk_metadata_item_metadata.rb +46 -0
  781. data/lib/fog/vcloud_director/requests/compute/put_disks.rb +39 -0
  782. data/lib/fog/vcloud_director/requests/compute/put_guest_customization_section_vapp.rb +141 -0
  783. data/lib/fog/vcloud_director/requests/compute/put_media_metadata_item_metadata.rb +50 -0
  784. data/lib/fog/vcloud_director/requests/compute/put_memory.rb +89 -0
  785. data/lib/fog/vcloud_director/requests/compute/put_metadata_value.rb +26 -0
  786. data/lib/fog/vcloud_director/requests/compute/put_network.rb +162 -0
  787. data/lib/fog/vcloud_director/requests/compute/put_network_connection_system_section_vapp.rb +152 -0
  788. data/lib/fog/vcloud_director/requests/compute/put_product_sections.rb +46 -0
  789. data/lib/fog/vcloud_director/requests/compute/put_vapp_metadata_item_metadata.rb +85 -0
  790. data/lib/fog/vcloud_director/requests/compute/put_vapp_name_and_description.rb +36 -0
  791. data/lib/fog/vcloud_director/requests/compute/put_vapp_template_metadata_item_metadata.rb +50 -0
  792. data/lib/fog/vcloud_director/requests/compute/put_vm.rb +72 -0
  793. data/lib/fog/vcloud_director/requests/compute/put_vm_capabilities.rb +44 -0
  794. data/lib/fog/version.rb +3 -0
  795. data/lib/tasks/changelog_task.rb +231 -0
  796. data/lib/tasks/github_release_task.rb +66 -0
  797. data/spec/fog/account_spec.rb +14 -0
  798. data/spec/fog/billing_spec.rb +14 -0
  799. data/spec/fog/bin/atmos_spec.rb +23 -0
  800. data/spec/fog/bin/aws_spec.rb +80 -0
  801. data/spec/fog/bin/baremetalcloud_spec.rb +23 -0
  802. data/spec/fog/bin/brightbox_spec.rb +30 -0
  803. data/spec/fog/bin/clodo_spec.rb +9 -0
  804. data/spec/fog/bin/cloudsigma_spec.rb +9 -0
  805. data/spec/fog/bin/dnsimple_spec.rb +9 -0
  806. data/spec/fog/bin/dnsmadeeasy_spec.rb +9 -0
  807. data/spec/fog/bin/dreamhost_spec.rb +9 -0
  808. data/spec/fog/bin/dynect_spec.rb +9 -0
  809. data/spec/fog/bin/ecloud_spec.rb +10 -0
  810. data/spec/fog/bin/fogdocker_spec.rb +10 -0
  811. data/spec/fog/bin/glesys_spec.rb +10 -0
  812. data/spec/fog/bin/gogrid_spec.rb +10 -0
  813. data/spec/fog/bin/google_spec.rb +10 -0
  814. data/spec/fog/bin/ibm_spec.rb +10 -0
  815. data/spec/fog/bin/linode_spec.rb +10 -0
  816. data/spec/fog/bin/local_spec.rb +10 -0
  817. data/spec/fog/bin/opennebula_spec.rb +10 -0
  818. data/spec/fog/bin/openstack_spec.rb +10 -0
  819. data/spec/fog/bin/openvz_spec.rb +10 -0
  820. data/spec/fog/bin/powerdns_spec.rb +9 -0
  821. data/spec/fog/bin/profitbricks_spec.rb +10 -0
  822. data/spec/fog/bin/rackspace_spec.rb +10 -0
  823. data/spec/fog/bin/rage4_spec.rb +10 -0
  824. data/spec/fog/bin/riakcs_spec.rb +10 -0
  825. data/spec/fog/bin/sakuracloud_spec.rb +10 -0
  826. data/spec/fog/bin/serverlove_spec.rb +10 -0
  827. data/spec/fog/bin/softlayer_spec.rb +10 -0
  828. data/spec/fog/bin/stormondemand_spec.rb +10 -0
  829. data/spec/fog/bin/vcloud_spec.rb +10 -0
  830. data/spec/fog/bin/vclouddirector_spec.rb +10 -0
  831. data/spec/fog/bin/vmfusion_spec.rb +10 -0
  832. data/spec/fog/bin/voxel_spec.rb +10 -0
  833. data/spec/fog/bin/vsphere_spec.rb +10 -0
  834. data/spec/fog/bin/xenserver_spec.rb +10 -0
  835. data/spec/fog/bin_spec.rb +149 -0
  836. data/spec/fog/cdn_spec.rb +14 -0
  837. data/spec/fog/identity_spec.rb +14 -0
  838. data/spec/fog/image_spec.rb +14 -0
  839. data/spec/fog/metering_spec.rb +14 -0
  840. data/spec/fog/monitoring_spec.rb +14 -0
  841. data/spec/fog/network_spec.rb +14 -0
  842. data/spec/fog/orchestration_spec.rb +14 -0
  843. data/spec/fog/storage_spec.rb +14 -0
  844. data/spec/fog/support_spec.rb +14 -0
  845. data/spec/fog/volume_spec.rb +14 -0
  846. data/spec/fog/vpn_spec.rb +14 -0
  847. data/spec/fog/xml/connection_spec.rb +33 -0
  848. data/spec/helpers/bin.rb +34 -0
  849. data/spec/spec_helper.rb +15 -0
  850. data/spec/vcloud_director/generators/compute/instantiate_vapp_template_params_spec.rb +68 -0
  851. data/spec/vcloud_director/requests/compute/instantiate_vapp_template_spec.rb +78 -0
  852. data/spec/vcloud_director/spec_helper.rb +11 -0
  853. data/tests/clodo/requests/compute/image_tests.rb +36 -0
  854. data/tests/clodo/requests/compute/server_tests.rb +152 -0
  855. data/tests/cloudsigma/models/server_tests.rb +72 -0
  856. data/tests/cloudsigma/models/servers_tests.rb +9 -0
  857. data/tests/cloudsigma/models/snapshot_tests.rb +25 -0
  858. data/tests/cloudsigma/models/snapshots_tests.rb +16 -0
  859. data/tests/cloudsigma/models/volume_tests.rb +21 -0
  860. data/tests/cloudsigma/models/volumes_tests.rb +9 -0
  861. data/tests/cloudsigma/requests/server_tests.rb +77 -0
  862. data/tests/cloudsigma/requests/snapshots_tests.rb +84 -0
  863. data/tests/cloudsigma/requests/volumes_tests.rb +56 -0
  864. data/tests/compute/helper.rb +83 -0
  865. data/tests/compute/models/flavors_tests.rb +13 -0
  866. data/tests/compute/models/server_tests.rb +39 -0
  867. data/tests/compute/models/servers_tests.rb +10 -0
  868. data/tests/core/attribute_tests.rb +83 -0
  869. data/tests/core/credential_tests.rb +93 -0
  870. data/tests/core/current_machine_tests.rb +32 -0
  871. data/tests/core/mocking_tests.rb +75 -0
  872. data/tests/core/parser_tests.rb +92 -0
  873. data/tests/core/service_tests.rb +26 -0
  874. data/tests/core/timeout_tests.rb +10 -0
  875. data/tests/core/uuid_tests.rb +10 -0
  876. data/tests/core/wait_for_tests.rb +13 -0
  877. data/tests/dns/helper.rb +46 -0
  878. data/tests/dns/models/record_tests.rb +44 -0
  879. data/tests/dns/models/records_tests.rb +30 -0
  880. data/tests/dns/models/zone_tests.rb +18 -0
  881. data/tests/dns/models/zones_tests.rb +18 -0
  882. data/tests/dnsmadeeasy/requests/dns/dns_tests.rb +138 -0
  883. data/tests/dreamhost/README.md +56 -0
  884. data/tests/dreamhost/dns_tests.rb +19 -0
  885. data/tests/dreamhost/helper.rb +19 -0
  886. data/tests/dreamhost/models/dns/record_tests.rb +72 -0
  887. data/tests/dreamhost/models/dns/records_tests.rb +28 -0
  888. data/tests/dreamhost/models/dns/zone_tests.rb +61 -0
  889. data/tests/dreamhost/models/dns/zones_tests.rb +28 -0
  890. data/tests/dreamhost/requests/dns/create_record_tests.rb +39 -0
  891. data/tests/dreamhost/requests/dns/delete_record_tests.rb +26 -0
  892. data/tests/dreamhost/requests/dns/list_records_tests.rb +31 -0
  893. data/tests/fogdocker/compute_tests.rb +17 -0
  894. data/tests/fogdocker/models/compute/image_tests.rb +31 -0
  895. data/tests/fogdocker/models/compute/images_tests.rb +9 -0
  896. data/tests/fogdocker/models/compute/server_tests.rb +57 -0
  897. data/tests/fogdocker/models/compute/servers_tests.rb +14 -0
  898. data/tests/fogdocker/requests/compute/api_version_tests.rb +10 -0
  899. data/tests/fogdocker/requests/compute/container_action_tests.rb +35 -0
  900. data/tests/fogdocker/requests/compute/container_commit_tests.rb +18 -0
  901. data/tests/fogdocker/requests/compute/container_create_tests.rb +21 -0
  902. data/tests/fogdocker/requests/compute/container_delete_tests.rb +16 -0
  903. data/tests/fogdocker/requests/compute/image_create_tests.rb +21 -0
  904. data/tests/fogdocker/requests/compute/image_delete_tests.rb +20 -0
  905. data/tests/fogdocker/requests/compute/image_search_tests.rb +11 -0
  906. data/tests/glesys/requests/compute/helper.rb +326 -0
  907. data/tests/glesys/requests/compute/ip_tests.rb +66 -0
  908. data/tests/glesys/requests/compute/server_tests.rb +142 -0
  909. data/tests/glesys/requests/compute/ssh_key_tests.rb +47 -0
  910. data/tests/glesys/requests/compute/template_tests.rb +12 -0
  911. data/tests/go_grid/requests/compute/image_tests.rb +0 -0
  912. data/tests/helper.rb +52 -0
  913. data/tests/helpers/collection_helper.rb +91 -0
  914. data/tests/helpers/compute/flavors_helper.rb +32 -0
  915. data/tests/helpers/compute/server_helper.rb +25 -0
  916. data/tests/helpers/compute/servers_helper.rb +10 -0
  917. data/tests/helpers/formats_helper.rb +98 -0
  918. data/tests/helpers/formats_helper_tests.rb +110 -0
  919. data/tests/helpers/mock_helper.rb +82 -0
  920. data/tests/helpers/model_helper.rb +31 -0
  921. data/tests/helpers/responds_to_helper.rb +11 -0
  922. data/tests/helpers/schema_validator_tests.rb +107 -0
  923. data/tests/helpers/succeeds_helper.rb +9 -0
  924. data/tests/ibm/models/compute/image_tests.rb +25 -0
  925. data/tests/ibm/models/compute/key_tests.rb +23 -0
  926. data/tests/ibm/models/compute/keys_tests.rb +35 -0
  927. data/tests/ibm/models/compute/locations_tests.rb +18 -0
  928. data/tests/ibm/models/compute/server_tests.rb +88 -0
  929. data/tests/ibm/models/compute/servers_tests.rb +37 -0
  930. data/tests/ibm/models/storage/volume_tests.rb +60 -0
  931. data/tests/ibm/requests/compute/address_tests.rb +44 -0
  932. data/tests/ibm/requests/compute/image_tests.rb +110 -0
  933. data/tests/ibm/requests/compute/instance_tests.rb +102 -0
  934. data/tests/ibm/requests/compute/key_tests.rb +50 -0
  935. data/tests/ibm/requests/compute/location_tests.rb +28 -0
  936. data/tests/ibm/requests/compute/vlan_tests.rb +21 -0
  937. data/tests/ibm/requests/storage/volume_tests.rb +100 -0
  938. data/tests/linode/requests/compute/datacenter_tests.rb +20 -0
  939. data/tests/linode/requests/compute/distribution_tests.rb +32 -0
  940. data/tests/linode/requests/compute/helper.rb +10 -0
  941. data/tests/linode/requests/compute/kernel_tests.rb +19 -0
  942. data/tests/linode/requests/compute/linode_tests.rb +216 -0
  943. data/tests/linode/requests/compute/linodeplans_tests.rb +44 -0
  944. data/tests/linode/requests/compute/nodebalancers_tests.rb +20 -0
  945. data/tests/linode/requests/compute/stackscripts_tests.rb +36 -0
  946. data/tests/linode/requests/dns/dns_tests.rb +250 -0
  947. data/tests/lorem.txt +1 -0
  948. data/tests/opennebula/compute_tests.rb +19 -0
  949. data/tests/opennebula/models/compute/flavor_tests.rb +40 -0
  950. data/tests/opennebula/models/compute/flavors_tests.rb +19 -0
  951. data/tests/opennebula/models/compute/group_tests.rb +30 -0
  952. data/tests/opennebula/models/compute/groups_tests.rb +19 -0
  953. data/tests/opennebula/models/compute/network_tests.rb +30 -0
  954. data/tests/opennebula/models/compute/networks_tests.rb +19 -0
  955. data/tests/opennebula/requests/compute/vm_allocate_tests.rb +80 -0
  956. data/tests/opennebula/requests/compute/vm_disk_snapshot_test.rb +49 -0
  957. data/tests/opennebula/requests/compute/vm_suspend_resume_tests.rb +55 -0
  958. data/tests/openvz/helper.rb +47 -0
  959. data/tests/openvz/models/compute/server_tests.rb +55 -0
  960. data/tests/openvz/models/compute/servers_tests.rb +35 -0
  961. data/tests/rage4/requests/dns/dns_tests.rb +282 -0
  962. data/tests/storage/helper.rb +13 -0
  963. data/tests/storage/models/directories_tests.rb +17 -0
  964. data/tests/storage/models/directory_test.rb +29 -0
  965. data/tests/storage/models/file_tests.rb +41 -0
  966. data/tests/storage/models/files_tests.rb +26 -0
  967. data/tests/vcloud/data/api_+_admin_+_network_+_2 +110 -0
  968. data/tests/vcloud/data/api_+_network_+_1 +44 -0
  969. data/tests/vcloud/data/api_+_org_+_ +5 -0
  970. data/tests/vcloud/data/api_+_org_+_1 +17 -0
  971. data/tests/vcloud/data/api_+_sessions +8 -0
  972. data/tests/vcloud/data/api_+_v1.0_+_admin_+_network_+_2 +110 -0
  973. data/tests/vcloud/data/api_+_v1.0_+_login +5 -0
  974. data/tests/vcloud/data/api_+_v1.0_+_network_+_1 +44 -0
  975. data/tests/vcloud/data/api_+_v1.0_+_network_+_2 +31 -0
  976. data/tests/vcloud/data/api_+_v1.0_+_org_+_1 +17 -0
  977. data/tests/vcloud/data/api_+_v1.0_+_vApp_+_vapp-1 +369 -0
  978. data/tests/vcloud/data/api_+_v1.0_+_vApp_+_vm-1 +139 -0
  979. data/tests/vcloud/data/api_+_v1.0_+_vApp_+_vm-2 +155 -0
  980. data/tests/vcloud/data/api_+_v1.0_+_vdc_+_1 +61 -0
  981. data/tests/vcloud/data/api_+_vApp_+_vapp-1 +369 -0
  982. data/tests/vcloud/data/api_+_vApp_+_vm-2 +155 -0
  983. data/tests/vcloud/data/api_+_vdc_+_1 +62 -0
  984. data/tests/vcloud/models/compute/helper.rb +22 -0
  985. data/tests/vcloud/models/compute/network_tests.rb +67 -0
  986. data/tests/vcloud/models/compute/networks_tests.rb +61 -0
  987. data/tests/vcloud/models/compute/organization_tests.rb +20 -0
  988. data/tests/vcloud/models/compute/organizations_tests.rb +16 -0
  989. data/tests/vcloud/models/compute/server_tests.rb +142 -0
  990. data/tests/vcloud/models/compute/servers_tests.rb +23 -0
  991. data/tests/vcloud/models/compute/vapp_tests.rb +32 -0
  992. data/tests/vcloud/models/compute/vapps_tests.rb +19 -0
  993. data/tests/vcloud/models/compute/vdc_tests.rb +48 -0
  994. data/tests/vcloud/models/compute/vdcs_tests.rb +24 -0
  995. data/tests/vcloud/requests/compute/disk_configure_tests.rb +111 -0
  996. data/tests/vcloud_director/ensure_list_tests.rb +84 -0
  997. data/tests/vcloud_director/fixtures/test.iso +1 -0
  998. data/tests/vcloud_director/fixtures/vapp.xml +532 -0
  999. data/tests/vcloud_director/fixtures/vm.xml +213 -0
  1000. data/tests/vcloud_director/generators/compute/compose_vapp_tests.rb +108 -0
  1001. data/tests/vcloud_director/models/compute/catalog_items_tests.rb +42 -0
  1002. data/tests/vcloud_director/models/compute/catalogs_tests.rb +40 -0
  1003. data/tests/vcloud_director/models/compute/helper.rb +60 -0
  1004. data/tests/vcloud_director/models/compute/media_tests.rb +58 -0
  1005. data/tests/vcloud_director/models/compute/network_tests.rb +108 -0
  1006. data/tests/vcloud_director/models/compute/organizations_tests.rb +18 -0
  1007. data/tests/vcloud_director/models/compute/tasks_tests.rb +56 -0
  1008. data/tests/vcloud_director/models/compute/vapp_life_cycle_tests.rb +93 -0
  1009. data/tests/vcloud_director/models/compute/vapp_template_tests.rb +29 -0
  1010. data/tests/vcloud_director/models/compute/vapp_tests.rb +61 -0
  1011. data/tests/vcloud_director/models/compute/vdcs_tests.rb +54 -0
  1012. data/tests/vcloud_director/models/compute/vms_tests.rb +101 -0
  1013. data/tests/vcloud_director/requests/compute/admin_tests.rb +16 -0
  1014. data/tests/vcloud_director/requests/compute/catalog_tests.rb +42 -0
  1015. data/tests/vcloud_director/requests/compute/disk_tests.rb +178 -0
  1016. data/tests/vcloud_director/requests/compute/edge_gateway_tests.rb +217 -0
  1017. data/tests/vcloud_director/requests/compute/groups_tests.rb +18 -0
  1018. data/tests/vcloud_director/requests/compute/helper.rb +32 -0
  1019. data/tests/vcloud_director/requests/compute/media_tests.rb +195 -0
  1020. data/tests/vcloud_director/requests/compute/network_tests.rb +186 -0
  1021. data/tests/vcloud_director/requests/compute/organization_tests.rb +37 -0
  1022. data/tests/vcloud_director/requests/compute/ovf_descriptor_tests.rb +36 -0
  1023. data/tests/vcloud_director/requests/compute/query_tests.rb +99 -0
  1024. data/tests/vcloud_director/requests/compute/schema_helper.rb +663 -0
  1025. data/tests/vcloud_director/requests/compute/session_tests.rb +14 -0
  1026. data/tests/vcloud_director/requests/compute/supported_systems_tests.rb +11 -0
  1027. data/tests/vcloud_director/requests/compute/task_tests.rb +35 -0
  1028. data/tests/vcloud_director/requests/compute/users_tests.rb +18 -0
  1029. data/tests/vcloud_director/requests/compute/vapp_tests.rb +123 -0
  1030. data/tests/vcloud_director/requests/compute/vdc_storage_profile_tests.rb +27 -0
  1031. data/tests/vcloud_director/requests/compute/vdc_tests.rb +36 -0
  1032. data/tests/vcloud_director/requests/compute/versions_tests.rb +13 -0
  1033. data/tests/vcloud_director/requests/compute/vm_tests.rb +185 -0
  1034. data/tests/watchr.rb +22 -0
  1035. metadata +1819 -0
@@ -0,0 +1,42 @@
1
+ require 'fog/core/collection'
2
+ require 'fog/opennebula/models/compute/flavor'
3
+
4
+ module Fog
5
+ module Compute
6
+ class OpenNebula
7
+
8
+ class Flavors < Fog::Collection
9
+
10
+ model Fog::Compute::OpenNebula::Flavor
11
+
12
+ def all
13
+ data = service.template_pool
14
+ load(data)
15
+ end
16
+
17
+ def get(flavor_id)
18
+ data = service.template_pool({:id => flavor_id})
19
+ load(data).first
20
+ rescue Fog::Compute::OpenNebula::NotFound
21
+ nil
22
+ end
23
+
24
+ def get_by_name(flavor_name)
25
+ data = service.template_pool({:name => flavor_name})
26
+ load(data)
27
+ rescue Fog::Compute::OpenNebula::NotFound
28
+ nil
29
+ end
30
+
31
+ def get_by_filter(flavor_filter)
32
+ data = service.template_pool(flavor_filter)
33
+ load(data)
34
+ rescue Fog::Compute::OpenNebula::NotFound
35
+ nil
36
+ end
37
+
38
+ end
39
+
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,22 @@
1
+ require 'fog/core/model'
2
+
3
+ module Fog
4
+ module Compute
5
+ class OpenNebula
6
+ class Group < Fog::Model
7
+
8
+ identity :id
9
+ attribute :name
10
+
11
+ def save
12
+ raise Fog::Errors::Error.new('Creating a new group is not yet implemented. Contributions welcome!')
13
+ end
14
+
15
+ def to_label
16
+ name
17
+ end
18
+
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,34 @@
1
+ require 'fog/core/collection'
2
+ require 'fog/opennebula/models/compute/group'
3
+
4
+ module Fog
5
+ module Compute
6
+ class OpenNebula
7
+
8
+ class Groups < Fog::Collection
9
+
10
+ model Fog::Compute::OpenNebula::Group
11
+
12
+ def all(filter={})
13
+ load(service.list_groups(filter))
14
+ end
15
+
16
+ def get(id)
17
+ group = self.all({:id => id})
18
+
19
+ if group.length > 1
20
+ raise Fog::Errors::Error.new("groups.get should return only one group, not #{group.length}!")
21
+ end
22
+
23
+ group.first
24
+ end
25
+
26
+ def get_by_name(str)
27
+ self.all({:name => str})
28
+ end
29
+
30
+ end
31
+
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,33 @@
1
+ require 'fog/core/model'
2
+
3
+ module Fog
4
+ module Compute
5
+ class OpenNebula
6
+ class Interface < Fog::Model
7
+
8
+ identity :id
9
+ attribute :vnet
10
+ attribute :model
11
+ attribute :name
12
+ attribute :mac
13
+
14
+ def save
15
+ raise Fog::Errors::Error.new('Creating a new interface is not yet implemented. Contributions welcome!')
16
+ end
17
+
18
+ def vnetid
19
+ return vnet
20
+ end
21
+
22
+ def persisted?
23
+ mac
24
+ end
25
+
26
+ def destroy
27
+ raise Fog::Errors::Error.new('Destroying an interface is not yet implemented. Contributions welcome!')
28
+ end
29
+
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,12 @@
1
+ require 'fog/core/collection'
2
+ require 'fog/opennebula/models/compute/interface'
3
+
4
+ module Fog
5
+ module Compute
6
+ class OpenNebula
7
+ class Interfaces < Fog::Collection
8
+ model Fog::Compute::OpenNebula::Interface
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,42 @@
1
+ require 'fog/core/model'
2
+
3
+ module Fog
4
+ module Compute
5
+ class OpenNebula
6
+ class Network < Fog::Model
7
+
8
+ identity :id
9
+ attribute :name
10
+ attribute :uname
11
+ attribute :uid
12
+ attribute :gid
13
+ attribute :description
14
+ attribute :vlan
15
+
16
+ def description
17
+ attributes[:description] || ""
18
+ end
19
+
20
+ def vlan
21
+ attributes[:vlan] || ""
22
+ end
23
+
24
+ def save
25
+ raise Fog::Errors::Error.new('Creating a new network is not yet implemented. Contributions welcome!')
26
+ end
27
+
28
+ def shutdown
29
+ raise Fog::Errors::Error.new('Shutting down a new network is not yet implemented. Contributions welcome!')
30
+ end
31
+
32
+ def to_label
33
+ ret = ""
34
+ ret += "#{description} - " unless description.empty?
35
+ ret += "VLAN #{vlan} - " unless vlan.empty?
36
+ ret += "#{name}"
37
+ end
38
+
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,35 @@
1
+ require 'fog/core/collection'
2
+ require 'fog/opennebula/models/compute/network'
3
+
4
+ module Fog
5
+ module Compute
6
+ class OpenNebula
7
+ class Networks < Fog::Collection
8
+ model Fog::Compute::OpenNebula::Network
9
+
10
+ def all(filter={})
11
+ self.get_by_filter(filter)
12
+ end
13
+
14
+ def get(id)
15
+ data = service.list_networks({:id => id})
16
+ load(data).first
17
+ rescue Fog::Compute::OpenNebula::NotFound
18
+ nil
19
+ end
20
+
21
+ def get_by_name(network)
22
+ data = service.list_networks({:network => network})
23
+ load(data).first
24
+ rescue Fog::Compute::OpenNebula::NotFound
25
+ nil
26
+ end
27
+
28
+ def get_by_filter(filter)
29
+ load(service.list_networks(filter))
30
+ end
31
+
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,100 @@
1
+ require 'fog/compute/models/server'
2
+
3
+ module Fog
4
+ module Compute
5
+ class OpenNebula
6
+ class Server < Fog::Compute::Server
7
+ identity :id
8
+ attribute :template_str
9
+ attribute :name
10
+ attribute :uuid
11
+ attribute :state
12
+ attribute :status
13
+ attribute :ip
14
+ attribute :mac
15
+ attribute :vcpu
16
+ attribute :cpu
17
+ attribute :memory
18
+ attribute :user
19
+ attribute :gid
20
+ attribute :group
21
+ attribute :onevm_object
22
+ attribute :flavor
23
+
24
+ def save
25
+ merge_attributes(service.vm_allocate(attributes))
26
+ end
27
+
28
+ # only for integration in foreman
29
+ # needed by formbuilder
30
+ # should be handled by foreman and not by fog
31
+ def vminterfaces
32
+ []
33
+ end
34
+
35
+ # only for integration in foreman
36
+ # needed by formbuilder
37
+ # should be handled by foreman and not from by fog
38
+ def vminterfaces_attributes=(attributes)
39
+ true
40
+ end
41
+
42
+ def vm_ip_address
43
+ ip
44
+ end
45
+
46
+ def private_ip_address
47
+ ip
48
+ end
49
+
50
+ def public_ip_address
51
+ ip
52
+ end
53
+
54
+ def vm_mac_address
55
+ mac
56
+ end
57
+
58
+ def start
59
+ if status == 4
60
+ service.vm_resume(id)
61
+ end
62
+ true
63
+ end
64
+
65
+ def stop
66
+ Fog::Logger.warning("stop VM: ID:#{id}")
67
+ service.vm_stop(id)
68
+ end
69
+
70
+ def suspend
71
+ service.vm_suspend(id)
72
+ end
73
+
74
+ def resume
75
+ service.vm_resume(id)
76
+ end
77
+
78
+ def destroy
79
+ service.vm_destroy(id)
80
+ end
81
+
82
+ def ready?
83
+ (status == 3)
84
+ end
85
+
86
+ # only for integration in foreman
87
+ # needed by formbuilder
88
+ # should be handled by foreman and not by fog
89
+ def template_id
90
+ ""
91
+ end
92
+
93
+ def console_output
94
+ requires :id
95
+ service.get_vnc_console(id, "vnc", onevm_object)
96
+ end
97
+ end
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,30 @@
1
+ require 'fog/core/collection'
2
+ require 'fog/opennebula/models/compute/server'
3
+
4
+
5
+ module Fog
6
+ module Compute
7
+ class OpenNebula
8
+
9
+ class Servers < Fog::Collection
10
+
11
+ model Fog::Compute::OpenNebula::Server
12
+
13
+ def all(filter={})
14
+ load(service.list_vms(filter))
15
+ end
16
+
17
+ def get(id)
18
+ data = service.list_vms({:id => id})
19
+ new data.first unless data.empty?
20
+ end
21
+
22
+ def shutdown(id)
23
+ service.vm_shutdown(id)
24
+ end
25
+
26
+ end
27
+ end
28
+ end
29
+ end
30
+
@@ -0,0 +1,340 @@
1
+ # -------------------------------------------------------------------------- #
2
+ # Copyright 2002-2014, OpenNebula Project (OpenNebula.org), C12G Labs #
3
+ # #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
+ # not use this file except in compliance with the License. You may obtain #
6
+ # a copy of the License at #
7
+ # #
8
+ # http://www.apache.org/licenses/LICENSE-2.0 #
9
+ # #
10
+ # Unless required by applicable law or agreed to in writing, software #
11
+ # distributed under the License is distributed on an "AS IS" BASIS, #
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
13
+ # See the License for the specific language governing permissions and #
14
+ # limitations under the License. #
15
+ #--------------------------------------------------------------------------- #
16
+
17
+ #
18
+ # This class provides support for launching and stopping a websockify proxy
19
+ #
20
+
21
+ require 'rubygems'
22
+ require 'json'
23
+ begin
24
+ require "opennebula"
25
+ rescue LoadError
26
+ raise Fog::Errors::LoadError, "To use OpenNebula provider, you must load 'opennebula' gem"
27
+ end
28
+
29
+
30
+ #if !ONE_LOCATION
31
+ NOVNC_LOCK_FILE = "/var/lock/.novnc.lock"
32
+ #else
33
+ # NOVNC_LOCK_FILE= ONE_LOCATION + "/var/.novnc.lock"
34
+ #end
35
+
36
+ TOKEN_EXPIRE_SECONDS = 4
37
+
38
+ VNC_STATES = [
39
+ #0, #LCM_INIT
40
+ #1, #PROLOG
41
+ #2, #BOOT
42
+ "3", #RUNNING
43
+ "4", #MIGRATE
44
+ #5, #SAVE_STOP
45
+ #6, #SAVE_SUSPEND
46
+ #7, #SAVE_MIGRATE
47
+ #8, #PROLOG_MIGRATE
48
+ #9, #PROLOG_RESUME
49
+ #10, #EPILOG_STOP
50
+ #11, #EPILOG
51
+ "12", #SHUTDOWN
52
+ "13", #CANCEL
53
+ #14, #FAILURE
54
+ #15, #CLEANUP_RESUBMIT
55
+ "16", #UNKNOWN
56
+ "17", #HOTPLUG
57
+ "18", #SHUTDOWN_POWEROFF
58
+ #19, #BOOT_UNKNOWN
59
+ #20, #BOOT_POWEROFF
60
+ #21, #BOOT_SUSPENDED
61
+ #22, #BOOT_STOPPED
62
+ #23, #CLEANUP_DELETE
63
+ "24", #HOTPLUG_SNAPSHOT
64
+ "25", #HOTPLUG_NIC
65
+ "26", #HOTPLUG_SAVEAS
66
+ "27", #HOTPLUG_SAVEAS_POWEROFF
67
+ "28", #HOTPLUG_SAVEAS_SUSPENDED
68
+ "29" #SHUTDOWN_UNDEPLOY
69
+ #30, #EPILOG_UNDEPLOY
70
+ #31, #PROLOG_UNDEPLOY
71
+ #32 #BOOT_UNDEPLOY
72
+ ]
73
+
74
+ VAR_LOCATION = Dir.pwd + "/extras/noVNC"
75
+ SHARE_LOCATION = Dir.pwd + "/extras/noVNC"
76
+ class OpenNebulaVNC
77
+
78
+ attr_reader :proxy_port
79
+
80
+ def initialize(config, logger, options = {})
81
+ opts={ :json_errors => true,
82
+ :token_folder_name => 'sunstone_vnc_tokens'}.merge(options)
83
+
84
+ @pipe = nil
85
+ @token_folder = File.join(VAR_LOCATION, opts[:token_folder_name])
86
+ @proxy_path = File.join(SHARE_LOCATION, "websockify/websocketproxy.py")
87
+ @proxy_port = config[:vnc_proxy_port]
88
+
89
+ @proxy_ipv6 = config[:vnc_proxy_ipv6]
90
+
91
+ @wss = config[:vnc_proxy_support_wss]
92
+
93
+ @lock_file = NOVNC_LOCK_FILE
94
+
95
+ if (@wss == "yes") || (@wss == "only") || (@wss == true)
96
+ @enable_wss = true
97
+ @cert = config[:vnc_proxy_cert]
98
+ @key = config[:vnc_proxy_key]
99
+ else
100
+ @enable_wss = false
101
+ end
102
+ @options = opts
103
+ @logger = logger
104
+ end
105
+
106
+ def start
107
+ if is_running?
108
+ message="VNC server already running"
109
+ STDERR.puts message
110
+ @logger.info message
111
+ return false
112
+ end
113
+
114
+ create_token_dir
115
+
116
+ proxy_options = "--target-config=#{@token_folder} "
117
+
118
+ if @enable_wss
119
+ proxy_options << " --cert #{@cert}"
120
+ proxy_options << " --key #{@key}" if @key && @key.size > 0
121
+ proxy_options << " --ssl-only" if @wss == "only"
122
+ end
123
+
124
+ if @proxy_ipv6
125
+ proxy_options << " -6"
126
+ end
127
+
128
+ cmd ="python #{@proxy_path} #{proxy_options} #{@proxy_port}"
129
+
130
+ begin
131
+ @logger.info { "Starting VNC proxy: #{cmd}" }
132
+ pid=start_daemon(cmd, VNC_LOG)
133
+ rescue Exception => e
134
+ @logger.error e.message
135
+ return false
136
+ end
137
+
138
+ File.open(@lock_file, "w") do |f|
139
+ f.write(pid.to_s)
140
+ end
141
+
142
+ sleep 1
143
+
144
+ if !is_running?
145
+ message="Error starting VNC proxy"
146
+ STDERR.puts message
147
+ @logger.error message
148
+ File.delete(@lock_file) if File.exist?(@lock_file)
149
+
150
+ return false
151
+ end
152
+
153
+ STDOUT.puts "VNC proxy started"
154
+
155
+ true
156
+ end
157
+
158
+ def proxy(vm_resource)
159
+ # Check configurations and VM attributes
160
+ #if !is_running?
161
+ # return error(400, "VNC Proxy is not running")
162
+ #end
163
+
164
+ if !VNC_STATES.include?(vm_resource['LCM_STATE'])
165
+ return error(400,"Wrong state (#{vm_resource['LCM_STATE']}) to open a VNC session")
166
+ end
167
+
168
+ if vm_resource['TEMPLATE/GRAPHICS/TYPE'].nil? ||
169
+ vm_resource['TEMPLATE/GRAPHICS/TYPE'].downcase != "vnc"
170
+ return error(400,"VM has no VNC configured")
171
+ end
172
+
173
+ # Proxy data
174
+ host = vm_resource['HISTORY_RECORDS/HISTORY[last()]/HOSTNAME']
175
+ vnc_port = vm_resource['TEMPLATE/GRAPHICS/PORT']
176
+ vnc_pw = vm_resource['TEMPLATE/GRAPHICS/PASSWD']
177
+
178
+ # Generate token random_str: host:port
179
+ random_str = rand(36**20).to_s(36) #random string a-z0-9 length 20
180
+ token = "#{random_str}: #{host}:#{vnc_port}"
181
+ token_file = 'one-'+vm_resource['ID']
182
+
183
+ # Create token file
184
+
185
+ begin
186
+ f = File.open(File.join(@token_folder, token_file), 'w')
187
+ f.write(token)
188
+ f.close
189
+ rescue Exception => e
190
+ # @logger.error e.message
191
+ return error(500, "Cannot create VNC proxy token")
192
+ end
193
+
194
+ info = {
195
+ :proxy_port => "29876",
196
+ :password => vnc_pw,
197
+ :token => random_str,
198
+ :vm_name => vm_resource['NAME']
199
+ }
200
+
201
+ return [200, info]
202
+ end
203
+
204
+ # Delete proxy token file
205
+ def delete_token(filename)
206
+ begin
207
+ File.delete(File.join(@token_folder, filename))
208
+ rescue => e
209
+ @logger.error "Error deleting token file for VM #{vm_id}"
210
+ @logger.error e.message
211
+ end
212
+ end
213
+
214
+ def stop(force=false)
215
+ pid=get_pid
216
+
217
+ if pid
218
+ @logger.info "Killing VNC proxy"
219
+
220
+ signal=(force ? 'KILL' : 'TERM')
221
+ Process.kill(signal ,pid)
222
+
223
+ sleep 1
224
+
225
+ begin
226
+ Process.getpgid(pid)
227
+
228
+ Process.kill('KILL', pid)
229
+ rescue
230
+ end
231
+
232
+ if is_running?
233
+ message="VNC server is still running"
234
+ STDERR.puts message
235
+ logger.error message
236
+ return false
237
+ end
238
+
239
+ delete_token_dir
240
+ else
241
+ message="VNC server is not running"
242
+ @logger.info message
243
+ STDERR.puts message
244
+ end
245
+ true
246
+ end
247
+
248
+ def status
249
+ if is_running?
250
+ STDOUT.puts "VNC is running"
251
+ true
252
+ else
253
+ STDOUT.puts "VNC is NOT running"
254
+ false
255
+ end
256
+ end
257
+
258
+ private
259
+
260
+ def error(code, msg)
261
+ if @options[:json_errors]
262
+ return [code,OpenNebula::Error.new(msg).to_json]
263
+ else
264
+ return [code,msg]
265
+ end
266
+ end
267
+
268
+ def create_token_dir
269
+ delete_token_dir
270
+ begin
271
+ Dir.mkdir(@token_folder) if !File.exist?(@token_folder)
272
+ rescue Exception => e
273
+ @logger.error "Cannot create token folder"
274
+ @logger.error e.message
275
+ end
276
+ end
277
+
278
+ def delete_token_dir
279
+ if File.exist?(@token_folder)
280
+ begin
281
+ Dir.glob("#{@token_folder}/*").each do |file|
282
+ File.delete(file)
283
+ end
284
+ rescue => e
285
+ @logger.error "Error deleting token folder"
286
+ @logger.error e.message
287
+ end
288
+ end
289
+ end
290
+
291
+ def is_running?
292
+ if File.exist?(@lock_file)
293
+ pid=File.read(@lock_file).strip
294
+
295
+ if system("ps #{pid} 1> /dev/null")
296
+ return pid.to_i
297
+ end
298
+
299
+ @logger.info "Deleting stale lock file"
300
+ File.delete(@lock_file)
301
+ end
302
+
303
+ false
304
+ end
305
+ alias_method :get_pid, :is_running?
306
+
307
+ if RUBY_VERSION<'1.9'
308
+ def spawn(*args)
309
+ fork {
310
+ command=args[0..-2]
311
+
312
+ # Close stdin and point out and err to log file
313
+ $stdin.close
314
+ $stdout.reopen(VNC_LOG, "a")
315
+ $stderr.reopen(VNC_LOG, "a")
316
+
317
+ # Detach process from the parent
318
+ Process.setsid
319
+
320
+ exec(*command)
321
+ }
322
+ end
323
+ end
324
+
325
+ def start_daemon(cmd, log)
326
+ options={
327
+ :pgroup => true,
328
+ :in => :close,
329
+ [:out, :err] => [log, "a"],
330
+ :close_others => true }
331
+
332
+ params=cmd.split(" ")+[options]
333
+ pid=spawn( *params )
334
+
335
+ Process.detach(pid)
336
+
337
+ pid
338
+ end
339
+ end
340
+