fog-vcloud-director 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (315) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +11 -0
  3. data/.gitignore +17 -0
  4. data/.hound.yml +2 -0
  5. data/.rubocop.yml +240 -0
  6. data/.ruby-gemset +1 -0
  7. data/.travis.yml +15 -0
  8. data/Gemfile +4 -0
  9. data/LICENSE.md +20 -0
  10. data/README.md +962 -0
  11. data/Rakefile +19 -0
  12. data/fog-vcloud-director.gemspec +31 -0
  13. data/lib/fog/vcloud_director.rb +1 -0
  14. data/lib/fog/vcloud_director/compute.rb +916 -0
  15. data/lib/fog/vcloud_director/core.rb +69 -0
  16. data/lib/fog/vcloud_director/generators/compute/compose_common.rb +122 -0
  17. data/lib/fog/vcloud_director/generators/compute/compose_vapp.rb +25 -0
  18. data/lib/fog/vcloud_director/generators/compute/create_snapshot.rb +25 -0
  19. data/lib/fog/vcloud_director/generators/compute/customization.rb +105 -0
  20. data/lib/fog/vcloud_director/generators/compute/disks.rb +186 -0
  21. data/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb +243 -0
  22. data/lib/fog/vcloud_director/generators/compute/instantiate_vapp_template_params.rb +30 -0
  23. data/lib/fog/vcloud_director/generators/compute/metadata.rb +104 -0
  24. data/lib/fog/vcloud_director/generators/compute/org_vdc_network.rb +88 -0
  25. data/lib/fog/vcloud_director/generators/compute/recompose_vapp.rb +34 -0
  26. data/lib/fog/vcloud_director/generators/compute/vapp.rb +28 -0
  27. data/lib/fog/vcloud_director/generators/compute/vm.rb +32 -0
  28. data/lib/fog/vcloud_director/generators/compute/vm_network.rb +119 -0
  29. data/lib/fog/vcloud_director/models/compute/catalog.rb +22 -0
  30. data/lib/fog/vcloud_director/models/compute/catalog_item.rb +30 -0
  31. data/lib/fog/vcloud_director/models/compute/catalog_items.rb +33 -0
  32. data/lib/fog/vcloud_director/models/compute/catalogs.rb +30 -0
  33. data/lib/fog/vcloud_director/models/compute/custom_field.rb +18 -0
  34. data/lib/fog/vcloud_director/models/compute/custom_fields.rb +67 -0
  35. data/lib/fog/vcloud_director/models/compute/disk.rb +53 -0
  36. data/lib/fog/vcloud_director/models/compute/disks.rb +44 -0
  37. data/lib/fog/vcloud_director/models/compute/media.rb +26 -0
  38. data/lib/fog/vcloud_director/models/compute/medias.rb +75 -0
  39. data/lib/fog/vcloud_director/models/compute/network.rb +25 -0
  40. data/lib/fog/vcloud_director/models/compute/networks.rb +62 -0
  41. data/lib/fog/vcloud_director/models/compute/organization.rb +37 -0
  42. data/lib/fog/vcloud_director/models/compute/organizations.rb +28 -0
  43. data/lib/fog/vcloud_director/models/compute/tag.rb +31 -0
  44. data/lib/fog/vcloud_director/models/compute/tags.rb +41 -0
  45. data/lib/fog/vcloud_director/models/compute/task.rb +55 -0
  46. data/lib/fog/vcloud_director/models/compute/tasks.rb +36 -0
  47. data/lib/fog/vcloud_director/models/compute/template_vm.rb +52 -0
  48. data/lib/fog/vcloud_director/models/compute/template_vms.rb +41 -0
  49. data/lib/fog/vcloud_director/models/compute/vapp.rb +144 -0
  50. data/lib/fog/vcloud_director/models/compute/vapp_template.rb +26 -0
  51. data/lib/fog/vcloud_director/models/compute/vapp_templates.rb +40 -0
  52. data/lib/fog/vcloud_director/models/compute/vapps.rb +40 -0
  53. data/lib/fog/vcloud_director/models/compute/vdc.rb +45 -0
  54. data/lib/fog/vcloud_director/models/compute/vdcs.rb +37 -0
  55. data/lib/fog/vcloud_director/models/compute/vm.rb +197 -0
  56. data/lib/fog/vcloud_director/models/compute/vm_customization.rb +40 -0
  57. data/lib/fog/vcloud_director/models/compute/vm_customizations.rb +29 -0
  58. data/lib/fog/vcloud_director/models/compute/vm_network.rb +27 -0
  59. data/lib/fog/vcloud_director/models/compute/vm_networks.rb +19 -0
  60. data/lib/fog/vcloud_director/models/compute/vms.rb +46 -0
  61. data/lib/fog/vcloud_director/parsers/compute/disks.rb +53 -0
  62. data/lib/fog/vcloud_director/parsers/compute/metadata.rb +61 -0
  63. data/lib/fog/vcloud_director/parsers/compute/network.rb +104 -0
  64. data/lib/fog/vcloud_director/parsers/compute/vm.rb +86 -0
  65. data/lib/fog/vcloud_director/parsers/compute/vm_customization.rb +55 -0
  66. data/lib/fog/vcloud_director/parsers/compute/vm_network.rb +107 -0
  67. data/lib/fog/vcloud_director/parsers/compute/vm_parser_helper.rb +62 -0
  68. data/lib/fog/vcloud_director/parsers/compute/vms.rb +68 -0
  69. data/lib/fog/vcloud_director/parsers/compute/vms_by_metadata.rb +37 -0
  70. data/lib/fog/vcloud_director/query.rb +59 -0
  71. data/lib/fog/vcloud_director/requests/compute/delete_catalog_item.rb +22 -0
  72. data/lib/fog/vcloud_director/requests/compute/delete_catalog_item_metadata_item_metadata.rb +25 -0
  73. data/lib/fog/vcloud_director/requests/compute/delete_disk.rb +60 -0
  74. data/lib/fog/vcloud_director/requests/compute/delete_disk_metadata_item_metadata.rb +25 -0
  75. data/lib/fog/vcloud_director/requests/compute/delete_logout.rb +18 -0
  76. data/lib/fog/vcloud_director/requests/compute/delete_media.rb +122 -0
  77. data/lib/fog/vcloud_director/requests/compute/delete_media_metadata_item_metadata.rb +25 -0
  78. data/lib/fog/vcloud_director/requests/compute/delete_network.rb +62 -0
  79. data/lib/fog/vcloud_director/requests/compute/delete_shadow_vm.rb +30 -0
  80. data/lib/fog/vcloud_director/requests/compute/delete_vapp.rb +59 -0
  81. data/lib/fog/vcloud_director/requests/compute/delete_vapp_metadata_item_metadata.rb +30 -0
  82. data/lib/fog/vcloud_director/requests/compute/delete_vapp_template.rb +27 -0
  83. data/lib/fog/vcloud_director/requests/compute/delete_vapp_template_metadata_item_metadata.rb +26 -0
  84. data/lib/fog/vcloud_director/requests/compute/get_allocated_ip_addresses.rb +25 -0
  85. data/lib/fog/vcloud_director/requests/compute/get_catalog.rb +63 -0
  86. data/lib/fog/vcloud_director/requests/compute/get_catalog_item.rb +48 -0
  87. data/lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata.rb +25 -0
  88. data/lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata_item_metadata.rb +26 -0
  89. data/lib/fog/vcloud_director/requests/compute/get_catalog_metadata.rb +25 -0
  90. data/lib/fog/vcloud_director/requests/compute/get_catalog_metadata_item_metadata.rb +26 -0
  91. data/lib/fog/vcloud_director/requests/compute/get_catalogs_from_query.rb +94 -0
  92. data/lib/fog/vcloud_director/requests/compute/get_control_access_params_catalog.rb +26 -0
  93. data/lib/fog/vcloud_director/requests/compute/get_control_access_params_vapp.rb +25 -0
  94. data/lib/fog/vcloud_director/requests/compute/get_cpu_rasd_item.rb +65 -0
  95. data/lib/fog/vcloud_director/requests/compute/get_current_session.rb +83 -0
  96. data/lib/fog/vcloud_director/requests/compute/get_disk.rb +123 -0
  97. data/lib/fog/vcloud_director/requests/compute/get_disk_metadata.rb +25 -0
  98. data/lib/fog/vcloud_director/requests/compute/get_disk_metadata_item_metadata.rb +26 -0
  99. data/lib/fog/vcloud_director/requests/compute/get_disk_owner.rb +70 -0
  100. data/lib/fog/vcloud_director/requests/compute/get_disks_from_query.rb +94 -0
  101. data/lib/fog/vcloud_director/requests/compute/get_disks_rasd_items_list.rb +90 -0
  102. data/lib/fog/vcloud_director/requests/compute/get_edge_gateway.rb +109 -0
  103. data/lib/fog/vcloud_director/requests/compute/get_entity.rb +38 -0
  104. data/lib/fog/vcloud_director/requests/compute/get_execute_query.rb +736 -0
  105. data/lib/fog/vcloud_director/requests/compute/get_groups_from_query.rb +95 -0
  106. data/lib/fog/vcloud_director/requests/compute/get_guest_customization_system_section_vapp.rb +69 -0
  107. data/lib/fog/vcloud_director/requests/compute/get_guest_customization_system_section_vapp_template.rb +25 -0
  108. data/lib/fog/vcloud_director/requests/compute/get_href.rb +21 -0
  109. data/lib/fog/vcloud_director/requests/compute/get_lease_settings_section_vapp.rb +59 -0
  110. data/lib/fog/vcloud_director/requests/compute/get_lease_settings_section_vapp_template.rb +25 -0
  111. data/lib/fog/vcloud_director/requests/compute/get_media.rb +111 -0
  112. data/lib/fog/vcloud_director/requests/compute/get_media_drives_rasd_items_list.rb +92 -0
  113. data/lib/fog/vcloud_director/requests/compute/get_media_metadata.rb +25 -0
  114. data/lib/fog/vcloud_director/requests/compute/get_media_metadata_item_metadata.rb +26 -0
  115. data/lib/fog/vcloud_director/requests/compute/get_media_owner.rb +70 -0
  116. data/lib/fog/vcloud_director/requests/compute/get_medias_from_query.rb +94 -0
  117. data/lib/fog/vcloud_director/requests/compute/get_memory_rasd_item.rb +64 -0
  118. data/lib/fog/vcloud_director/requests/compute/get_metadata.rb +41 -0
  119. data/lib/fog/vcloud_director/requests/compute/get_network.rb +67 -0
  120. data/lib/fog/vcloud_director/requests/compute/get_network_cards_items_list.rb +70 -0
  121. data/lib/fog/vcloud_director/requests/compute/get_network_complete.rb +78 -0
  122. data/lib/fog/vcloud_director/requests/compute/get_network_config_section_vapp.rb +61 -0
  123. data/lib/fog/vcloud_director/requests/compute/get_network_config_section_vapp_template.rb +25 -0
  124. data/lib/fog/vcloud_director/requests/compute/get_network_connection_system_section_vapp.rb +68 -0
  125. data/lib/fog/vcloud_director/requests/compute/get_network_connection_system_section_vapp_template.rb +25 -0
  126. data/lib/fog/vcloud_director/requests/compute/get_network_metadata.rb +25 -0
  127. data/lib/fog/vcloud_director/requests/compute/get_network_metadata_item_metadata.rb +26 -0
  128. data/lib/fog/vcloud_director/requests/compute/get_network_section_vapp.rb +25 -0
  129. data/lib/fog/vcloud_director/requests/compute/get_network_section_vapp_template.rb +25 -0
  130. data/lib/fog/vcloud_director/requests/compute/get_operating_system_section.rb +59 -0
  131. data/lib/fog/vcloud_director/requests/compute/get_org_settings.rb +38 -0
  132. data/lib/fog/vcloud_director/requests/compute/get_org_vdc_gateways.rb +83 -0
  133. data/lib/fog/vcloud_director/requests/compute/get_organization.rb +100 -0
  134. data/lib/fog/vcloud_director/requests/compute/get_organization_metadata.rb +25 -0
  135. data/lib/fog/vcloud_director/requests/compute/get_organization_metadata_item_metadata.rb +28 -0
  136. data/lib/fog/vcloud_director/requests/compute/get_organizations.rb +52 -0
  137. data/lib/fog/vcloud_director/requests/compute/get_organizations_from_query.rb +95 -0
  138. data/lib/fog/vcloud_director/requests/compute/get_product_sections_vapp.rb +25 -0
  139. data/lib/fog/vcloud_director/requests/compute/get_product_sections_vapp_template.rb +26 -0
  140. data/lib/fog/vcloud_director/requests/compute/get_request.rb +19 -0
  141. data/lib/fog/vcloud_director/requests/compute/get_runtime_info_section_type.rb +57 -0
  142. data/lib/fog/vcloud_director/requests/compute/get_serial_ports_items_list.rb +25 -0
  143. data/lib/fog/vcloud_director/requests/compute/get_shadow_vm.rb +24 -0
  144. data/lib/fog/vcloud_director/requests/compute/get_snapshot_section.rb +55 -0
  145. data/lib/fog/vcloud_director/requests/compute/get_startup_section.rb +64 -0
  146. data/lib/fog/vcloud_director/requests/compute/get_supported_systems_info.rb +239 -0
  147. data/lib/fog/vcloud_director/requests/compute/get_supported_versions.rb +1159 -0
  148. data/lib/fog/vcloud_director/requests/compute/get_task.rb +168 -0
  149. data/lib/fog/vcloud_director/requests/compute/get_task_list.rb +130 -0
  150. data/lib/fog/vcloud_director/requests/compute/get_template_vm.rb +74 -0
  151. data/lib/fog/vcloud_director/requests/compute/get_template_vms.rb +41 -0
  152. data/lib/fog/vcloud_director/requests/compute/get_thumbnail.rb +28 -0
  153. data/lib/fog/vcloud_director/requests/compute/get_users_from_query.rb +95 -0
  154. data/lib/fog/vcloud_director/requests/compute/get_vapp.rb +176 -0
  155. data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata.rb +84 -0
  156. data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata_item_metadata.rb +26 -0
  157. data/lib/fog/vcloud_director/requests/compute/get_vapp_ovf_descriptor.rb +24 -0
  158. data/lib/fog/vcloud_director/requests/compute/get_vapp_owner.rb +58 -0
  159. data/lib/fog/vcloud_director/requests/compute/get_vapp_template.rb +25 -0
  160. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_customization_system_section.rb +25 -0
  161. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata.rb +25 -0
  162. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata_item_metadata.rb +27 -0
  163. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_ovf_descriptor.rb +24 -0
  164. data/lib/fog/vcloud_director/requests/compute/get_vapp_template_owner.rb +25 -0
  165. data/lib/fog/vcloud_director/requests/compute/get_vapp_templates_from_query.rb +95 -0
  166. data/lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb +94 -0
  167. data/lib/fog/vcloud_director/requests/compute/get_vcloud.rb +76 -0
  168. data/lib/fog/vcloud_director/requests/compute/get_vdc.rb +174 -0
  169. data/lib/fog/vcloud_director/requests/compute/get_vdc_metadata.rb +25 -0
  170. data/lib/fog/vcloud_director/requests/compute/get_vdc_metadata_item_metadata.rb +28 -0
  171. data/lib/fog/vcloud_director/requests/compute/get_vdc_storage_class.rb +83 -0
  172. data/lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata.rb +27 -0
  173. data/lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata_item_metadata.rb +25 -0
  174. data/lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb +94 -0
  175. data/lib/fog/vcloud_director/requests/compute/get_virtual_hardware_section.rb +29 -0
  176. data/lib/fog/vcloud_director/requests/compute/get_vm.rb +74 -0
  177. data/lib/fog/vcloud_director/requests/compute/get_vm_capabilities.rb +61 -0
  178. data/lib/fog/vcloud_director/requests/compute/get_vm_compliance_results.rb +24 -0
  179. data/lib/fog/vcloud_director/requests/compute/get_vm_customization.rb +31 -0
  180. data/lib/fog/vcloud_director/requests/compute/get_vm_disks.rb +51 -0
  181. data/lib/fog/vcloud_director/requests/compute/get_vm_network.rb +56 -0
  182. data/lib/fog/vcloud_director/requests/compute/get_vm_pending_question.rb +34 -0
  183. data/lib/fog/vcloud_director/requests/compute/get_vms.rb +41 -0
  184. data/lib/fog/vcloud_director/requests/compute/get_vms_by_metadata.rb +20 -0
  185. data/lib/fog/vcloud_director/requests/compute/get_vms_disk_attached_to.rb +39 -0
  186. data/lib/fog/vcloud_director/requests/compute/get_vms_in_lease_from_query.rb +150 -0
  187. data/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb +173 -0
  188. data/lib/fog/vcloud_director/requests/compute/post_acquire_ticket.rb +27 -0
  189. data/lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb +36 -0
  190. data/lib/fog/vcloud_director/requests/compute/post_attach_disk.rb +51 -0
  191. data/lib/fog/vcloud_director/requests/compute/post_cancel_task.rb +43 -0
  192. data/lib/fog/vcloud_director/requests/compute/post_capture_vapp.rb +70 -0
  193. data/lib/fog/vcloud_director/requests/compute/post_check_vm_compliance.rb +28 -0
  194. data/lib/fog/vcloud_director/requests/compute/post_clone_media.rb +102 -0
  195. data/lib/fog/vcloud_director/requests/compute/post_clone_vapp.rb +62 -0
  196. data/lib/fog/vcloud_director/requests/compute/post_clone_vapp_template.rb +52 -0
  197. data/lib/fog/vcloud_director/requests/compute/post_compose_vapp.rb +45 -0
  198. data/lib/fog/vcloud_director/requests/compute/post_configure_edge_gateway_services.rb +73 -0
  199. data/lib/fog/vcloud_director/requests/compute/post_consolidate_vm_vapp.rb +27 -0
  200. data/lib/fog/vcloud_director/requests/compute/post_consolidate_vm_vapp_template.rb +27 -0
  201. data/lib/fog/vcloud_director/requests/compute/post_create_catalog_item.rb +56 -0
  202. data/lib/fog/vcloud_director/requests/compute/post_create_org_vdc_network.rb +171 -0
  203. data/lib/fog/vcloud_director/requests/compute/post_create_snapshot.rb +21 -0
  204. data/lib/fog/vcloud_director/requests/compute/post_deploy_vapp.rb +51 -0
  205. data/lib/fog/vcloud_director/requests/compute/post_detach_disk.rb +39 -0
  206. data/lib/fog/vcloud_director/requests/compute/post_disable_nested_hv.rb +27 -0
  207. data/lib/fog/vcloud_director/requests/compute/post_disable_vapp_template_download.rb +24 -0
  208. data/lib/fog/vcloud_director/requests/compute/post_discard_vapp_state.rb +30 -0
  209. data/lib/fog/vcloud_director/requests/compute/post_eject_cd_rom.rb +39 -0
  210. data/lib/fog/vcloud_director/requests/compute/post_enable_nested_hv.rb +27 -0
  211. data/lib/fog/vcloud_director/requests/compute/post_enable_vapp_template_download.rb +24 -0
  212. data/lib/fog/vcloud_director/requests/compute/post_enter_maintenance_mode.rb +26 -0
  213. data/lib/fog/vcloud_director/requests/compute/post_exit_maintenance_mode.rb +22 -0
  214. data/lib/fog/vcloud_director/requests/compute/post_insert_cd_rom.rb +39 -0
  215. data/lib/fog/vcloud_director/requests/compute/post_install_vmware_tools.rb +27 -0
  216. data/lib/fog/vcloud_director/requests/compute/post_instantiate_vapp_template.rb +196 -0
  217. data/lib/fog/vcloud_director/requests/compute/post_login_session.rb +39 -0
  218. data/lib/fog/vcloud_director/requests/compute/post_power_off_vapp.rb +36 -0
  219. data/lib/fog/vcloud_director/requests/compute/post_power_on_vapp.rb +71 -0
  220. data/lib/fog/vcloud_director/requests/compute/post_reboot_vapp.rb +33 -0
  221. data/lib/fog/vcloud_director/requests/compute/post_recompose_vapp.rb +21 -0
  222. data/lib/fog/vcloud_director/requests/compute/post_reconfigure_vm.rb +118 -0
  223. data/lib/fog/vcloud_director/requests/compute/post_remove_all_snapshots.rb +27 -0
  224. data/lib/fog/vcloud_director/requests/compute/post_reset_vapp.rb +33 -0
  225. data/lib/fog/vcloud_director/requests/compute/post_revert_snapshot.rb +27 -0
  226. data/lib/fog/vcloud_director/requests/compute/post_shutdown_vapp.rb +33 -0
  227. data/lib/fog/vcloud_director/requests/compute/post_suspend_vapp.rb +33 -0
  228. data/lib/fog/vcloud_director/requests/compute/post_undeploy_vapp.rb +66 -0
  229. data/lib/fog/vcloud_director/requests/compute/post_update_catalog_item_metadata.rb +52 -0
  230. data/lib/fog/vcloud_director/requests/compute/post_update_disk_metadata.rb +52 -0
  231. data/lib/fog/vcloud_director/requests/compute/post_update_media_metadata.rb +52 -0
  232. data/lib/fog/vcloud_director/requests/compute/post_update_vapp_metadata.rb +86 -0
  233. data/lib/fog/vcloud_director/requests/compute/post_update_vapp_template_metadata.rb +52 -0
  234. data/lib/fog/vcloud_director/requests/compute/post_upgrade_hw_version.rb +28 -0
  235. data/lib/fog/vcloud_director/requests/compute/post_upload_disk.rb +133 -0
  236. data/lib/fog/vcloud_director/requests/compute/post_upload_media.rb +120 -0
  237. data/lib/fog/vcloud_director/requests/compute/post_upload_vapp_template.rb +46 -0
  238. data/lib/fog/vcloud_director/requests/compute/put_catalog_item_metadata_item_metadata.rb +50 -0
  239. data/lib/fog/vcloud_director/requests/compute/put_cpu.rb +88 -0
  240. data/lib/fog/vcloud_director/requests/compute/put_disk_metadata_item_metadata.rb +46 -0
  241. data/lib/fog/vcloud_director/requests/compute/put_disks.rb +39 -0
  242. data/lib/fog/vcloud_director/requests/compute/put_guest_customization_section_vapp.rb +141 -0
  243. data/lib/fog/vcloud_director/requests/compute/put_media_metadata_item_metadata.rb +50 -0
  244. data/lib/fog/vcloud_director/requests/compute/put_memory.rb +89 -0
  245. data/lib/fog/vcloud_director/requests/compute/put_metadata_value.rb +26 -0
  246. data/lib/fog/vcloud_director/requests/compute/put_network.rb +162 -0
  247. data/lib/fog/vcloud_director/requests/compute/put_network_connection_system_section_vapp.rb +152 -0
  248. data/lib/fog/vcloud_director/requests/compute/put_product_sections.rb +46 -0
  249. data/lib/fog/vcloud_director/requests/compute/put_vapp_metadata_item_metadata.rb +85 -0
  250. data/lib/fog/vcloud_director/requests/compute/put_vapp_name_and_description.rb +36 -0
  251. data/lib/fog/vcloud_director/requests/compute/put_vapp_template_metadata_item_metadata.rb +50 -0
  252. data/lib/fog/vcloud_director/requests/compute/put_vm.rb +72 -0
  253. data/lib/fog/vcloud_director/requests/compute/put_vm_capabilities.rb +44 -0
  254. data/lib/fog/vcloud_director/version.rb +5 -0
  255. data/spec/spec_helper.rb +15 -0
  256. data/spec/vcloud_director/generators/compute/instantiate_vapp_template_params_spec.rb +68 -0
  257. data/spec/vcloud_director/requests/compute/instantiate_vapp_template_spec.rb +78 -0
  258. data/spec/vcloud_director/spec_helper.rb +11 -0
  259. data/tasks/bundler.rake +3 -0
  260. data/tasks/console.rake +12 -0
  261. data/tasks/lint.rake +3 -0
  262. data/tasks/test.rake +13 -0
  263. data/tests/helper.rb +32 -0
  264. data/tests/helpers/collection_helper.rb +97 -0
  265. data/tests/helpers/compute/flavors_helper.rb +32 -0
  266. data/tests/helpers/compute/server_helper.rb +25 -0
  267. data/tests/helpers/compute/servers_helper.rb +10 -0
  268. data/tests/helpers/formats_helper.rb +98 -0
  269. data/tests/helpers/formats_helper_tests.rb +110 -0
  270. data/tests/helpers/mock_helper.rb +95 -0
  271. data/tests/helpers/model_helper.rb +31 -0
  272. data/tests/helpers/responds_to_helper.rb +11 -0
  273. data/tests/helpers/schema_validator_tests.rb +107 -0
  274. data/tests/helpers/succeeds_helper.rb +9 -0
  275. data/tests/lorem.txt +1 -0
  276. data/tests/vcloud_director/ensure_list_tests.rb +84 -0
  277. data/tests/vcloud_director/fixtures/test.iso +1 -0
  278. data/tests/vcloud_director/fixtures/vapp.xml +532 -0
  279. data/tests/vcloud_director/fixtures/vm.xml +213 -0
  280. data/tests/vcloud_director/generators/compute/compose_vapp_tests.rb +108 -0
  281. data/tests/vcloud_director/models/compute/catalog_items_tests.rb +42 -0
  282. data/tests/vcloud_director/models/compute/catalogs_tests.rb +40 -0
  283. data/tests/vcloud_director/models/compute/helper.rb +60 -0
  284. data/tests/vcloud_director/models/compute/media_tests.rb +58 -0
  285. data/tests/vcloud_director/models/compute/network_tests.rb +108 -0
  286. data/tests/vcloud_director/models/compute/organizations_tests.rb +18 -0
  287. data/tests/vcloud_director/models/compute/tasks_tests.rb +56 -0
  288. data/tests/vcloud_director/models/compute/vapp_life_cycle_tests.rb +93 -0
  289. data/tests/vcloud_director/models/compute/vapp_template_tests.rb +29 -0
  290. data/tests/vcloud_director/models/compute/vapp_tests.rb +61 -0
  291. data/tests/vcloud_director/models/compute/vdcs_tests.rb +54 -0
  292. data/tests/vcloud_director/models/compute/vms_tests.rb +101 -0
  293. data/tests/vcloud_director/requests/compute/admin_tests.rb +16 -0
  294. data/tests/vcloud_director/requests/compute/catalog_tests.rb +42 -0
  295. data/tests/vcloud_director/requests/compute/disk_tests.rb +178 -0
  296. data/tests/vcloud_director/requests/compute/edge_gateway_tests.rb +217 -0
  297. data/tests/vcloud_director/requests/compute/groups_tests.rb +18 -0
  298. data/tests/vcloud_director/requests/compute/helper.rb +32 -0
  299. data/tests/vcloud_director/requests/compute/media_tests.rb +195 -0
  300. data/tests/vcloud_director/requests/compute/network_tests.rb +186 -0
  301. data/tests/vcloud_director/requests/compute/organization_tests.rb +37 -0
  302. data/tests/vcloud_director/requests/compute/ovf_descriptor_tests.rb +36 -0
  303. data/tests/vcloud_director/requests/compute/query_tests.rb +99 -0
  304. data/tests/vcloud_director/requests/compute/schema_helper.rb +663 -0
  305. data/tests/vcloud_director/requests/compute/session_tests.rb +14 -0
  306. data/tests/vcloud_director/requests/compute/supported_systems_tests.rb +11 -0
  307. data/tests/vcloud_director/requests/compute/task_tests.rb +35 -0
  308. data/tests/vcloud_director/requests/compute/users_tests.rb +18 -0
  309. data/tests/vcloud_director/requests/compute/vapp_tests.rb +123 -0
  310. data/tests/vcloud_director/requests/compute/vdc_storage_profile_tests.rb +27 -0
  311. data/tests/vcloud_director/requests/compute/vdc_tests.rb +36 -0
  312. data/tests/vcloud_director/requests/compute/versions_tests.rb +13 -0
  313. data/tests/vcloud_director/requests/compute/vm_tests.rb +185 -0
  314. data/tests/watchr.rb +22 -0
  315. metadata +461 -0
@@ -0,0 +1,36 @@
1
+ Shindo.tests('Compute::VcloudDirector | ovf requests', ['vclouddirector']) do
2
+
3
+ @service = Fog::Compute::VcloudDirector.new
4
+ @org = VcloudDirector::Compute::Helper.current_org(@service)
5
+
6
+ tests('Get first vDC') do
7
+ session = @service.get_current_session.body
8
+ link = @org[:Link].find do |l|
9
+ l[:type] == 'application/vnd.vmware.vcloud.vdc+xml'
10
+ end
11
+ @vdc = @service.get_vdc(link[:href].split('/').last).body
12
+ end
13
+
14
+ # 'Envelope' is the outer type of the parsed XML document.
15
+ tests('#get_vapp_ovf_descriptor').returns('Envelope') do
16
+ pending if Fog.mocking?
17
+ link = @vdc[:ResourceEntities][:ResourceEntity].find do |l|
18
+ l[:type] == 'application/vnd.vmware.vcloud.vApp+xml'
19
+ end
20
+ pending if link.nil?
21
+ body = @service.get_vapp_ovf_descriptor(link[:href].split('/').last).body
22
+ Nokogiri::XML::Document.parse(body).children.first.name
23
+ end
24
+
25
+ # 'Envelope' is the outer type of the parsed XML document.
26
+ tests('#get_vapp_template_ovf_descriptor').returns('Envelope') do
27
+ pending if Fog.mocking?
28
+ link = @vdc[:ResourceEntities][:ResourceEntity].find do |l|
29
+ l[:type] == 'application/vnd.vmware.vcloud.vAppTemplate+xml'
30
+ end
31
+ pending if link.nil?
32
+ body = @service.get_vapp_template_ovf_descriptor(link[:href].split('/').last).body
33
+ Nokogiri::XML::Document.parse(body).children.first.name
34
+ end
35
+
36
+ end
@@ -0,0 +1,99 @@
1
+ Shindo.tests('Compute::VcloudDirector | query requests', ['vclouddirector']) do
2
+
3
+ @service = Fog::Compute::VcloudDirector.new
4
+
5
+ tests('retrieve a summary list of all typed queries types') do
6
+ tests('#get_execute_query') do
7
+ @query_list = @service.get_execute_query.body
8
+ tests(':type').returns('application/vnd.vmware.vcloud.query.queryList+xml') do
9
+ @query_list[:type]
10
+ end
11
+ end
12
+ end
13
+
14
+ # for each queriable type, query and check that each available format
15
+ # returns a result that matches the base schema
16
+ #
17
+ @query_list[:Link].select do |link|
18
+ link[:rel] == 'down'
19
+ end.sort_by do |link|
20
+ [link[:name], link[:href]]
21
+ end.each do |link|
22
+
23
+ href = Nokogiri::XML.fragment(link[:href])
24
+ query = CGI.parse(URI.parse(href.text).query)
25
+ type = query['type'].first
26
+ format = query['format'].first
27
+ next if %w[right role strandedUser].include?(type)
28
+ tests("type => #{type}, format => #{format}") do
29
+
30
+ pending if Fog.mocking? && (format != 'records' || type != 'orgVdcNetwork')
31
+
32
+ tests("#get_execute_query").data_matches_schema(VcloudDirector::Compute::Schema::CONTAINER_TYPE) do
33
+ @body = @service.get_execute_query(type, :format => format).body
34
+ end
35
+ tests("resource type").returns(link[:type]) { @body[:type] }
36
+
37
+ unless ( type == 'event' || type == 'edgeGateway' )
38
+ records_key = @body.keys.find {|key| key.to_s =~ /Record|Reference$/}
39
+ if records = @body[records_key]
40
+ records.first do |record|
41
+ case format
42
+ when 'records'
43
+ tests("record is correct schema").data_matches_schema(VcloudDirector::Compute::Schema::REFERENCE_TYPE) do
44
+ record
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ end
52
+ end
53
+
54
+ if Fog.mocking?
55
+ tests('ensure Mock logic is sound') do
56
+ tests('#get_execute_query') do
57
+ tests('orgVdcNetwork') do
58
+ output = @service.get_execute_query('orgVdcNetwork').body
59
+ tests('all records').returns(@service.data[:networks].size) do
60
+ output[:OrgVdcNetworkRecords].size
61
+ end
62
+ output = @service.get_execute_query('orgVdcNetwork', :filter => 'name==vDC1 backend network').body
63
+ tests(':filter by name').returns(1) do
64
+ output[:OrgVdcNetworkRecords].size
65
+ end
66
+ tests(':page option is ok if :page == 1').returns(@service.data[:networks].size) do
67
+ output = @service.get_execute_query('orgVdcNetwork', :page => '1').body
68
+ output[:OrgVdcNetworkRecords].size
69
+ end
70
+ tests('AND expression in :filter raises MockNotImplemented').raises(Fog::Errors::MockNotImplemented) do
71
+ @service.get_execute_query('orgVdcNetwork', :filter => 'name==Default Network;thing==wibble')
72
+ end
73
+ tests('OR expression in :filter raises MockNotImplemented').raises(Fog::Errors::MockNotImplemented) do
74
+ @service.get_execute_query('orgVdcNetwork', :filter => 'name==Default Network,thing==wibble')
75
+ end
76
+ tests('sortAsc option raises MockNotImplemented').raises(Fog::Errors::MockNotImplemented) do
77
+ @service.get_execute_query('orgVdcNetwork', :sortAsc => 'name')
78
+ end
79
+ tests('sortDesc option raises MockNotImplemented').raises(Fog::Errors::MockNotImplemented) do
80
+ @service.get_execute_query('orgVdcNetwork', :sortDesc => 'name')
81
+ end
82
+ tests('page option raises MockNotImplemented').raises(Fog::Errors::MockNotImplemented) do
83
+ @service.get_execute_query('orgVdcNetwork', :page => '2')
84
+ end
85
+ tests('pageSize option raises MockNotImplemented').raises(Fog::Errors::MockNotImplemented) do
86
+ @service.get_execute_query('orgVdcNetwork', :pageSize => '50')
87
+ end
88
+ tests('offset option raises MockNotImplemented').raises(Fog::Errors::MockNotImplemented) do
89
+ @service.get_execute_query('orgVdcNetwork', :offset => '5')
90
+ end
91
+ tests('fields option raises MockNotImplemented').raises(Fog::Errors::MockNotImplemented) do
92
+ @service.get_execute_query('orgVdcNetwork', :fields => 'name,thing')
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
98
+
99
+ end
@@ -0,0 +1,663 @@
1
+ class VcloudDirector
2
+ module Compute
3
+ module Schema
4
+ # Mapping of a content media type to a xsd complex type.
5
+ MEDIA_TYPE_MAPPING_TYPE = {
6
+ :MediaType => String,
7
+ :ComplexTypeName => String,
8
+ :SchemaLocation => String
9
+ }
10
+
11
+ # Information for one version of the API.
12
+ VERSION_INFO_TYPE = {
13
+ :Version => String,
14
+ :LoginUrl => String,
15
+ :MediaTypeMapping => [MEDIA_TYPE_MAPPING_TYPE]
16
+ }
17
+
18
+ # List all supported versions.
19
+ SUPPORTED_VERSIONS_TYPE = {
20
+ :VersionInfo => [VERSION_INFO_TYPE]
21
+ }
22
+
23
+ # The standard error message type used in the vCloud REST API.
24
+ ERROR_TYPE = {
25
+ :majorErrorCode => String,
26
+ :message => String,
27
+ :minorErrorCode => String,
28
+ :stackTrace => Fog::Nullable::String,
29
+ :vendorSpecificErrorCode => Fog::Nullable::String
30
+ }
31
+
32
+ # The base type for all objects in the vCloud model. Has an optional list
33
+ # of links and href and type attributes.
34
+ REFERENCE_TYPE = {
35
+ :href => String,
36
+ :id => Fog::Nullable::String,
37
+ :name => Fog::Nullable::String,
38
+ :type => Fog::Nullable::String
39
+ }
40
+
41
+ # Extends reference type by adding relation attribute. Defines a
42
+ # hyper-link with a relationship, hyper-link reference, and an optional
43
+ # MIME type.
44
+ LINK_TYPE = REFERENCE_TYPE.merge({
45
+ :rel => String
46
+ })
47
+
48
+ # Represents a reference to a resource. Contains an href attribute, a
49
+ # resource status attribute, and optional name and type attributes.
50
+ RESOURCE_REFERENCE_TYPE = REFERENCE_TYPE.merge({
51
+ :status => Fog::Nullable::String
52
+ })
53
+
54
+ # The base type for all objects in the vCloud model. Has an optional list
55
+ # of links and href and type attributes.
56
+ RESOURCE_TYPE = {
57
+ :href => Fog::Nullable::String,
58
+ :type => Fog::Nullable::String,
59
+ # :Link => [LINK_TYPE] -- FIXME: not required
60
+ }
61
+
62
+ # The base type for all resource types which contain an id attribute.
63
+ IDENTIFIABLE_RESOURCE_TYPE = RESOURCE_TYPE.merge({
64
+ :id => Fog::Nullable::String,
65
+ :operationKey => Fog::Nullable::String,
66
+ })
67
+
68
+ # Basic entity type in the vCloud object model. Includes a name, an
69
+ # optional description, and an optional list of links.
70
+ ENTITY_TYPE = IDENTIFIABLE_RESOURCE_TYPE.merge({
71
+ :name => String
72
+ })
73
+
74
+ # Represents a file to be transferred (uploaded or downloaded).
75
+ FILE_TYPE = ENTITY_TYPE.merge({
76
+ :bytesTransfered => Fog::Nullable::String,
77
+ :checksum => Fog::Nullable::String, # normalizedString
78
+ :size => Fog::Nullable::String
79
+ })
80
+
81
+ # Represents a list of files to be transferred (uploaded or downloaded).
82
+ FILES_LIST_TYPE = {
83
+ :File => [FILE_TYPE]
84
+ }
85
+
86
+ # Container for query result sets.
87
+ CONTAINER_TYPE = RESOURCE_TYPE.merge({
88
+ :name => String,
89
+ :page => String,
90
+ :pageSize => String,
91
+ :total => String
92
+ })
93
+
94
+ # Represents an asynchronous operation in vCloud Director.
95
+ TASK_TYPE = ENTITY_TYPE.merge({
96
+ :cancelRequested => Fog::Nullable::String,
97
+ :endTime => Fog::Nullable::String,
98
+ :expiryTime => String,
99
+ :operation => Fog::Nullable::String,
100
+ :operationName => Fog::Nullable::String,
101
+ :serviceNamespace => Fog::Nullable::String,
102
+ :startTime => Fog::Nullable::String,
103
+ :status => String,
104
+ # :Tasks => TASKS_IN_PROGRESS_TYPE, # not happening!
105
+ :Owner => REFERENCE_TYPE,
106
+ # :Error => ERROR_TYPE,
107
+ :User => REFERENCE_TYPE,
108
+ :Organization => REFERENCE_TYPE,
109
+ :Progress => Fog::Nullable::String,
110
+ # :Params => anyType,
111
+ :Details => Fog::Nullable::String
112
+ })
113
+
114
+ # A list of queued, running, or recently completed tasks.
115
+ TASKS_IN_PROGRESS_TYPE = {
116
+ :Task => [TASK_TYPE]
117
+ }
118
+
119
+ # Base type that represents a resource entity such as a vApp template or
120
+ # virtual media.
121
+ RESOURCE_ENTITY_TYPE = ENTITY_TYPE.merge({
122
+ :status => Fog::Nullable::String,
123
+ :Description => Fog::Nullable::String,
124
+ # :Tasks => TASKS_IN_PROGRESS_TYPE,
125
+ # :Files => FILES_LIST_TYPE
126
+ })
127
+
128
+ # Container for references to ResourceEntity objects in this vDC.
129
+ RESOURCE_ENTITIES_TYPE = {
130
+ :ResourceEntity => [RESOURCE_REFERENCE_TYPE]
131
+ }
132
+
133
+ # Represents a supported virtual hardware version.
134
+ SUPPORTED_HARDWARE_VERSION_TYPE = String
135
+
136
+ # Contains a list of VMware virtual hardware versions supported in this
137
+ # vDC.
138
+ SUPPORTED_HARDWARE_VERSIONS_TYPE = {
139
+ :SupportedHardwareVersion => SUPPORTED_HARDWARE_VERSION_TYPE
140
+ }
141
+
142
+ # Represents a base type for VAppType and VmType.
143
+ ABSTRACT_VAPP_TYPE = RESOURCE_ENTITY_TYPE.merge({
144
+ :deployed => String,
145
+ :DateCreated => String
146
+ })
147
+
148
+ VAPP_CHILDREN_TYPE = {
149
+ #:VApp => ABSTRACT_VAPP_TYPE,
150
+ :Vm => [ABSTRACT_VAPP_TYPE]
151
+ }
152
+
153
+ # Controls access to the resource.
154
+ ACCESS_SETTING_TYPE = {
155
+ :Subject => REFERENCE_TYPE,
156
+ :AccessLevel => String
157
+ }
158
+
159
+ # A list of access settings for a resource.
160
+ ACCESS_SETTINGS_TYPE = {
161
+ :AccessSettingType => [ACCESS_SETTING_TYPE]
162
+ }
163
+
164
+ # Container for references to available organization vDC networks.
165
+ AVAILABLE_NETWORKS_TYPE = {
166
+ :Network => [REFERENCE_TYPE]
167
+ }
168
+
169
+ # Collection of supported hardware capabilities.
170
+ CAPABILITIES_TYPE = {
171
+ :SupportedHardwareVersions => SUPPORTED_HARDWARE_VERSIONS_TYPE
172
+ }
173
+
174
+ # Represents the capacity of a given resource.
175
+ CAPACITY_TYPE = {
176
+ :Units => String,
177
+ :Allocated => Fog::Nullable::String,
178
+ :Limit => String
179
+ }
180
+
181
+ # Represents a capacity and usage of a given resource.
182
+ CAPACITY_WITH_USAGE_TYPE = CAPACITY_TYPE.merge({
183
+ :Reserved => String,
184
+ :Used => Fog::Nullable::String,
185
+ :Overhead => Fog::Nullable::String
186
+ })
187
+
188
+ # Represents vDC compute capacity.
189
+ COMPUTE_CAPACITY_TYPE = {
190
+ :Cpu => CAPACITY_WITH_USAGE_TYPE,
191
+ :Memory => CAPACITY_WITH_USAGE_TYPE
192
+ }
193
+
194
+ # Represents a guest customization settings.
195
+ GUEST_CUSTOMIZATION_SECTION_TYPE = { # TODO: extends Section_Type
196
+ :Enabled => Fog::Nullable::String,
197
+ :ChangeSid => Fog::Nullable::String,
198
+ :VirtualMachineId => Fog::Nullable::String,
199
+ :JoinDomainEnabled => Fog::Nullable::String,
200
+ :UseOrgSettings => Fog::Nullable::String,
201
+ :DomainName => Fog::Nullable::String,
202
+ :DomainUserName => Fog::Nullable::String,
203
+ :DomainUserPassword => Fog::Nullable::String,
204
+ :MachineObjectOU => Fog::Nullable::String,
205
+ :AdminPasswordEnabled => Fog::Nullable::String,
206
+ :AdminPasswordAuto => Fog::Nullable::String,
207
+ :AdminPassword => Fog::Nullable::String,
208
+ :ResetPasswordRequired => Fog::Nullable::String,
209
+ :CustomizationScript => Fog::Nullable::String,
210
+ :ComputerName => String,
211
+ :Link => LINK_TYPE
212
+ }
213
+
214
+ # Represents the owner of this entity.
215
+ OWNER_TYPE = RESOURCE_TYPE.merge({
216
+ :User => REFERENCE_TYPE
217
+ })
218
+
219
+ # VMware Tools and other runtime information for this virtual machine.
220
+ RUNTIME_INFO_SECTION_TYPE = { # TODO: extends Section_Type
221
+ :VMWareTools => {
222
+ :version => Fog::Nullable::String
223
+ }
224
+ }
225
+
226
+ # Container for references to storage profiles associated with a vDC.
227
+ VDC_STORAGE_PROFILES_TYPE = {
228
+ :VdcStorageProfile => [REFERENCE_TYPE]
229
+ }
230
+
231
+ # Allows you to specify certain capabilities of this virtual machine.
232
+ VM_CAPABILITIES_TYPE = RESOURCE_TYPE.merge({
233
+ :MemoryHotAddEnabled => String,
234
+ :CpuHotAddEnabled => String
235
+ })
236
+
237
+ # Represents the user view of a Catalog object.
238
+ CATALOG_TYPE = ENTITY_TYPE.merge({
239
+ #:Owner => OWNER_TYPE,
240
+ #:CatalogItems => CATALOG_ITEMS_TYPE,
241
+ :IsPublished => String,
242
+ :DateCreated => String
243
+ })
244
+
245
+ # Specifies access controls for a resource.
246
+ CONTROL_ACCESS_PARAMS_TYPE = {
247
+ :IsSharedToEveryone => String,
248
+ :EveryoneAccessLevel => Fog::Nullable::String,
249
+ # :AccessSettings => ACCESS_SETTINGS_TYPE
250
+ }
251
+
252
+ # Represents a Media object.
253
+ MEDIA_TYPE = RESOURCE_ENTITY_TYPE.merge({
254
+ :imageType => String,
255
+ :size => String,
256
+ :Owner => OWNER_TYPE,
257
+ :VdcStorageProfile => REFERENCE_TYPE
258
+ })
259
+
260
+ METADATA_TYPE = RESOURCE_TYPE.merge({
261
+ #:MetadataEntry => METADATA_ENTRY_TYPE
262
+ })
263
+
264
+ # Represents a list of organizations.
265
+ ORG_LIST_TYPE = RESOURCE_TYPE.merge({
266
+ :Org => [REFERENCE_TYPE]
267
+ })
268
+
269
+ # Represents the user view of a vCloud Director organization.
270
+ ORG_TYPE = ENTITY_TYPE.merge({
271
+ :Description => Fog::Nullable::String,
272
+ :Tasks => TASKS_IN_PROGRESS_TYPE,
273
+ :FullName => String,
274
+ :IsEnabled => Fog::Nullable::String
275
+ })
276
+
277
+ # Represents a vCloud Session.
278
+ SESSION_TYPE = RESOURCE_TYPE.merge({
279
+ :org => String,
280
+ :user => String,
281
+ :Link => [LINK_TYPE]
282
+ })
283
+
284
+ # A list of tasks.
285
+ TASKS_LIST_TYPE = ENTITY_TYPE.merge({
286
+ #:Task => TASK_TYPE
287
+ })
288
+ # Represents a vApp.
289
+ VAPP_TYPE = ABSTRACT_VAPP_TYPE.merge({
290
+ :ovfDescriptorUploaded => String,
291
+ :Owner => OWNER_TYPE,
292
+ :InMaintenanceMode => String,
293
+ :Children => VAPP_CHILDREN_TYPE
294
+ })
295
+
296
+ # Represents the user view of an organization vDC.
297
+ VDC_TYPE = ENTITY_TYPE.merge({
298
+ :status => Fog::Nullable::String,
299
+ :AllocationModel => String,
300
+ # :StorageCapacity => CAPACITY_WITH_USAGE_TYPE,
301
+ :ComputeCapacity => COMPUTE_CAPACITY_TYPE,
302
+ :ResourceEntities => RESOURCE_ENTITIES_TYPE,
303
+ :AvailableNetworks => AVAILABLE_NETWORKS_TYPE,
304
+ :Capabilities => CAPABILITIES_TYPE,
305
+ :NicQuota => String,
306
+ :NetworkQuota => String,
307
+ :UsedNetworkCount => String,
308
+ :VmQuota => Fog::Nullable::String,
309
+ :IsEnabled => Fog::Nullable::String,
310
+ :VdcStorageProfiles => VDC_STORAGE_PROFILES_TYPE # >= 5.1
311
+ })
312
+
313
+ # Represents a storage profile in an organization vDC.
314
+ VDC_STORAGE_PROFILE_TYPE = ENTITY_TYPE.merge({
315
+ :Enabled => Fog::Nullable::String,
316
+ :Units => String,
317
+ :Limit => String,
318
+ :Default => String
319
+ })
320
+
321
+ # Information about an individual operating system.
322
+ OPERATING_SYSTEM_INFO_TYPE = {
323
+ :OperatingSystemId => String,
324
+ :DefaultHardDiskAdapterType => String,
325
+ :MinimumHardDiskSizeGigabytes => String,
326
+ :MinimumMemoryMegabytes => String,
327
+ :Name => String,
328
+ :InternalName => String,
329
+ :Supported => String,
330
+ :x64 => String,
331
+ :MaximumCpuCount => String,
332
+ :MinimumHardwareVersion => String,
333
+ :PersonalizationEnabled => String,
334
+ :PersonalizationAuto => String,
335
+ :SysprepPackagingSupported => String,
336
+ :SupportsMemHotAdd => String,
337
+ :cimOsId => String,
338
+ :CimVersion => String,
339
+ :SupportedForCreate => String
340
+ }
341
+
342
+ # Represents an operating system family.
343
+ OPERATING_SYSTEM_FAMILY_INFO_TYPE = {
344
+ :Name => String,
345
+ :OperatingSystemFamilyId => String,
346
+ :OperatingSystem => [OPERATING_SYSTEM_INFO_TYPE]
347
+ }
348
+
349
+ # Operating systems available for use on virtual machines owned by this
350
+ # organization.
351
+ SUPPORTED_OPERATING_SYSTEMS_INFO_TYPE = RESOURCE_TYPE.merge({
352
+ :OperatingSystemFamilyInfo => [OPERATING_SYSTEM_FAMILY_INFO_TYPE]
353
+ })
354
+
355
+ # Container for query results in records format.
356
+ # Combine with QUERY_RESULT_RECORD_TYPE subtypes to validate query results
357
+ QUERY_RESULT_RECORDS_TYPE = CONTAINER_TYPE
358
+
359
+ # Base type for a single record from query result in records format.
360
+ # Subtypes define more specific elements.
361
+ QUERY_RESULT_RECORD_TYPE = {
362
+ :href => String,
363
+ :id => Fog::Nullable::String,
364
+ :type => Fog::Nullable::String
365
+ }
366
+
367
+ # Type for a single edgeGateway query result in records format.
368
+ QUERY_RESULT_EDGE_GATEWAY_RECORD_TYPE = QUERY_RESULT_RECORD_TYPE.merge({
369
+ :gatewayStatus => String,
370
+ :haStatus => String,
371
+ :isBusy => String,
372
+ :name => String,
373
+ :numberOfExtNetworks => String,
374
+ :numberOfOrgNetworks=> String,
375
+ :vdc => String
376
+ })
377
+
378
+ FIREWALL_RULE_TYPE__PROTOCOLS = {
379
+ :Icmp => Fog::Nullable::String,
380
+ :Asny => Fog::Nullable::String,
381
+ :Other => Fog::Nullable::String
382
+ }
383
+
384
+ # Represents a firewall rule.
385
+ FIREWALL_RULE_TYPE = {
386
+ :Id => String,
387
+ :IsEnabled => String,
388
+ :MatchOnTranslate => Fog::Nullable::String,
389
+ :Description => Fog::Nullable::String,
390
+ :Policy => Fog::Nullable::String,
391
+ :IcmpSubType => Fog::Nullable::String,
392
+ :Port => Fog::Nullable::String,
393
+ :DestinationPortRange => String,
394
+ :SourcePort => Fog::Nullable::String,
395
+ :SourcePortRange => String,
396
+ :Direction => Fog::Nullable::String,
397
+ :EnableLogging => Fog::Nullable::String,
398
+ :Protocols => FIREWALL_RULE_TYPE__PROTOCOLS
399
+ }
400
+
401
+ # Represents a network firewall service.
402
+ FIREWALL_SERVICE_TYPE = {
403
+ :IsEnabled => String,
404
+ :DefaultAction => String,
405
+ :LogDefaultAction => String,
406
+ #:FirewallRule => [FIREWALL_RULE_TYPE] # not required
407
+ }
408
+
409
+ #Represents the SNAT and DNAT rules.
410
+ GATEWAY_NAT_RULE_TYPE = {
411
+ :Interface => REFERENCE_TYPE,
412
+ :OriginalIp => String,
413
+ :OriginalPort => Fog::Nullable::String,
414
+ :TranslatedIp => String,
415
+ :TranslatedPort => Fog::Nullable::String,
416
+ :Protocol => Fog::Nullable::String,
417
+ :IcmpSubType => Fog::Nullable::String
418
+ }
419
+
420
+ #Represents a NAT rule.
421
+ NAT_RULE_TYPE = {
422
+ :Description => Fog::Nullable::String,
423
+ :RuleType => String,
424
+ :IsEnabled => String,
425
+ :Id => String,
426
+ :GatewayNatRule => GATEWAY_NAT_RULE_TYPE
427
+ }
428
+
429
+ # Represents a NAT network service.
430
+ NAT_SERVICE_TYPE = {
431
+ :IsEnabled => String,
432
+ :NatType => Fog::Nullable::String,
433
+ :Policy => Fog::Nullable::String,
434
+ #:NatRule => [NAT_RULE_TYPE], # not required
435
+ :ExternalIp => Fog::Nullable::String
436
+ }
437
+
438
+ # Represents a service port in a load balancer pool.
439
+ LB_POOL_SERVICE_PORT_TYPE = {
440
+ :IsEnabled => Fog::Nullable::String,
441
+ :Protocol => String,
442
+ :Algorithm => Fog::Nullable::String,
443
+ :Port => String,
444
+ :HealthCheckPort => String,
445
+ #:HealthCheck => LBPoolHealthCheckType # not required
446
+ }
447
+
448
+ # Represents a member in a load balancer pool.
449
+ LB_POOL_MEMBER_TYPE = {
450
+ :IpAddress => String,
451
+ :Weight => String,
452
+ :ServicePort => [LB_POOL_SERVICE_PORT_TYPE]
453
+ }
454
+
455
+ # Represents a load balancer pool.
456
+ LOAD_BALANCER_POOL_TYPE = {
457
+ :Id => Fog::Nullable::String,
458
+ :Name => String,
459
+ :Description => Fog::Nullable::String,
460
+ :ServicePort => [LB_POOL_SERVICE_PORT_TYPE],
461
+ :Member => [LB_POOL_MEMBER_TYPE],
462
+ :Operational => String,
463
+ :ErrorDetails => Fog::Nullable::String
464
+ }
465
+
466
+ # Represents persistence type for a load balancer service profile.
467
+ LB_PERSISTENCE_TYPE = {
468
+ :Method => String,
469
+ :CookieName => Fog::Nullable::String,
470
+ :CookieMode => Fog::Nullable::String
471
+ }
472
+
473
+ # Represents service profile for a load balancing virtual server.
474
+ LB_VIRTUAL_SERVER_SERVICE_PROFILE_TYPE = {
475
+ :IsEnabled => String,
476
+ :Protocol => String,
477
+ :Port => String,
478
+ :Persistence => LB_PERSISTENCE_TYPE
479
+ }
480
+
481
+ # Information about a vendor service template. This is optional.
482
+ VENDOR_TEMPLATE_TYPE = {
483
+ :Name => String,
484
+ :Id => String
485
+ }
486
+
487
+ # Represents a load balancer virtual server.
488
+ LOAD_BALANCER_VIRTUAL_SERVER_TYPE = {
489
+ :IsEnabled => String,
490
+ :Name => String,
491
+ :Description => Fog::Nullable::String,
492
+ :Interface => REFERENCE_TYPE,
493
+ :IpAddress => String,
494
+ :ServiceProfile => [LB_VIRTUAL_SERVER_SERVICE_PROFILE_TYPE],
495
+ :Logging => String,
496
+ :Pool => String,
497
+ #:LoadBalancerTemplates => VENDOR_TEMPLATE_TYPE # not required
498
+ }
499
+
500
+ # Represents gateway load balancer service.
501
+ LOAD_BALANCER_SERVICE_TYPE = {
502
+ :Pool => LOAD_BALANCER_POOL_TYPE,
503
+ :VirtualServer => LOAD_BALANCER_VIRTUAL_SERVER_TYPE,
504
+ :IsEnabled => Fog::Nullable::String
505
+ }
506
+
507
+ # Represents Gateway DHCP service.
508
+ GATEWAY_DHCP_SERVICE_TYPE = {
509
+ :IsEnabled => String,
510
+ #:Pool => DHCP_POOL_SERVICE_TYPE # not required
511
+ }
512
+
513
+ # Represents edge gateway services.
514
+ GATEWAY_FEATURES_TYPE = {
515
+ #:StaticRoutingService => STATIC_ROUTING_SERVICE_TYPE, #not required
516
+ #:GatewayIpsecVpnService => GATEWAY_IPSEC_VPN_SERVICE_TYPE, #not required
517
+ #:GatewayDhcpService => GATEWAY_DHCP_SERVICE_TYPE, #not required
518
+ #:LoadBalancerService => LOAD_BALANCER_SERVICE_TYPE, #not required
519
+ #:NatService => NAT_SERVICE_TYPE, #not required
520
+ :FirewallService => FIREWALL_SERVICE_TYPE
521
+ }
522
+
523
+ # Represents a range of IP addresses, start and end inclusive.
524
+ IP_RANGE_TYPE = {
525
+ :StartAddress => String,
526
+ :EndAddress => String
527
+ }
528
+
529
+ # Represents a list of IP ranges.
530
+ IP_RANGES_TYPE = {
531
+ :IpRange => [IP_RANGE_TYPE]
532
+ }
533
+
534
+ # Allows to chose which subnets a gateway can be part of
535
+ SUBNET_PARTICIPATION_TYPE = {
536
+ :Gateway => String,
537
+ :Netmask => String,
538
+ :IpAddress => String,
539
+ :IpRanges => IP_RANGES_TYPE
540
+ }
541
+
542
+ # Gateway Interface configuration.
543
+ GATEWAY_INTERFACE_TYPE = {
544
+ :Name => String,
545
+ :DisplayName => String,
546
+ :Network => REFERENCE_TYPE,
547
+ :InterfaceType => String,
548
+ #:SubnetParticipation => [SUBNET_PARTICIPATION_TYPE], #bug in parser means list or hash
549
+ :ApplyRateLimit => String,
550
+ :InRateLimit => Fog::Nullable::String,
551
+ :OutRateLimit => Fog::Nullable::String,
552
+ :UseForDefaultRoute => String,
553
+ }
554
+
555
+ # A list of Gateway Interfaces.
556
+ GATEWAY_INTERFACES_TYPE = {
557
+ :GatewayInterface => [GATEWAY_INTERFACE_TYPE]
558
+ }
559
+
560
+ # Gateway Configuration.
561
+ GATEWAY_CONFIGURATION_TYPE = {
562
+ :BackwardCompatibilityMode => Fog::Nullable::String,
563
+ :GatewayBackingConfig => String,
564
+ :GatewayInterfaces => GATEWAY_INTERFACES_TYPE,
565
+ :EdgeGatewayServiceConfiguration => GATEWAY_FEATURES_TYPE,
566
+ :HaEnabled => Fog::Nullable::String,
567
+ :UseDefaultRouteForDnsRelay => Fog::Nullable::String
568
+ }
569
+
570
+ # Represents a gateway.
571
+ GATEWAY_TYPE = {
572
+ :href => String,
573
+ :type => String,
574
+ :id => String,
575
+ :operationKey => Fog::Nullable::String,
576
+ :name => String,
577
+ :status => Fog::Nullable::String,
578
+ #:Link => LINK_TYPE, # not required
579
+ :Description => Fog::Nullable::String,
580
+ #:Tasks => TASKS_IN_PROGRESS_TYPE, # not required
581
+ :Configuration => GATEWAY_CONFIGURATION_TYPE
582
+ }
583
+
584
+ ORGANIZATION_REFERENCE_TYPE = REFERENCE_TYPE
585
+ PROVIDER_VDC_REFERENCE_TYPE = REFERENCE_TYPE
586
+ RIGHT_REFERENCE_TYPE = REFERENCE_TYPE
587
+ ROLE_REFERENCE_TYPE = REFERENCE_TYPE
588
+
589
+ # Represents the admin view of this cloud.
590
+ ORGANIZATION_REFERENCES_TYPE = {
591
+ :OrganizationReference => [REFERENCE_TYPE]
592
+ }
593
+
594
+ # Container for references to Provider vDCs.
595
+ PROVIDER_VDC_REFERENCES_TYPE = {
596
+ :ProviderVdcReference => [PROVIDER_VDC_REFERENCE_TYPE]
597
+ }
598
+
599
+ # Container for references to rights.
600
+ RIGHT_REFERENCES_TYPE = {
601
+ :RightReference => [RIGHT_REFERENCE_TYPE]
602
+ }
603
+
604
+ # Container for references to roles.
605
+ ROLE_REFERENCES_TYPE = {
606
+ :RoleReference => [ROLE_REFERENCE_TYPE]
607
+ }
608
+
609
+ # Container for references to ExternalNetwork objects.
610
+ NETWORKS_TYPE = {
611
+ :Network => [REFERENCE_TYPE]
612
+ }
613
+
614
+ NETWORK_CONFIGURATION_TYPE = {
615
+ :IpScopes => {
616
+ :IpScope => {
617
+ :IsInherited => String,
618
+ :Gateway => Fog::Nullable::String,
619
+ :Netmask => String,
620
+ :Dns1 => String,
621
+ :Dns2 => String,
622
+ :DnsSuffix => String,
623
+ :IsEnabled=> String,
624
+ :IpRanges=> IP_RANGES_TYPE,
625
+ }
626
+ },
627
+ :FenceMode => Fog::Nullable::String,
628
+ :RetainNetInfoAcrossDeployments => String,
629
+ }
630
+
631
+ NETWORK_TYPE = {
632
+ :name => String,
633
+ :href => String,
634
+ :type => String,
635
+ :id => String,
636
+ :Description => String,
637
+ :Configuration => NETWORK_CONFIGURATION_TYPE,
638
+ :IsShared => String,
639
+ }
640
+
641
+ VCLOUD_TYPE = ENTITY_TYPE.merge({
642
+ :OrganizationReferences => ORGANIZATION_REFERENCES_TYPE,
643
+ :ProviderVdcReferences => PROVIDER_VDC_REFERENCES_TYPE,
644
+ :RightReferences => RIGHT_REFERENCES_TYPE,
645
+ :RoleReferences => ROLE_REFERENCES_TYPE,
646
+ :Networks => NETWORKS_TYPE
647
+ })
648
+
649
+ # Represents a named disk.
650
+ DISK_TYPE = RESOURCE_ENTITY_TYPE.merge({
651
+ :busSubType => Fog::Nullable::String,
652
+ :busType => Fog::Nullable::String,
653
+ :size => String,
654
+ :StorageProfile => REFERENCE_TYPE,
655
+ :Owner => OWNER_TYPE
656
+ })
657
+
658
+ VMS_TYPE = RESOURCE_TYPE.merge({
659
+ :VmReference => [REFERENCE_TYPE]
660
+ })
661
+ end
662
+ end
663
+ end