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,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fe5d93ccfadb4493a7a0a2c5e099c24a290fc88a
4
+ data.tar.gz: b78d16d733126e7c3e5128051b41fe834263d370
5
+ SHA512:
6
+ metadata.gz: 66e107aaaa0d4f6d67c42634a6e706e1123970a642e1e273e6c8351610e4a890e954b09ebe04e8ce7aa4bfe03fcdf3e0db8d77e4307b1836205bd7e399b940ac
7
+ data.tar.gz: 82084dce406a51d0377cd324c1ddf2d5b6d8a66a7df07ade832b5b5b9e25094b88d6766bd1549a5627d520c04960f9d8b59a5b536bbf0c1a54d3ec100660ef2b
@@ -0,0 +1,11 @@
1
+ # For more info on EditorConfig, see: http://EditorConfig.org
2
+
3
+ root = true
4
+
5
+ [*.gemspec,*.rb,Gemfile,Rakefile]
6
+ indent_style = space
7
+ indent_size = 2
8
+
9
+ [*.yml,*.yaml]
10
+ indent_style = space
11
+ indent_size = 2
@@ -0,0 +1,17 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
15
+ .ruby-version
16
+ .idea/
17
+ .DS_Store
@@ -0,0 +1,2 @@
1
+ ruby:
2
+ config_file: .rubocop.yml
@@ -0,0 +1,240 @@
1
+ # Fog custom enforced styles
2
+ Metrics/LineLength:
3
+ Enabled: false
4
+
5
+ Style/Encoding:
6
+ EnforcedStyle: when_needed
7
+
8
+ Style/FormatString:
9
+ Enabled: false
10
+
11
+ Style/HashSyntax:
12
+ EnforcedStyle: hash_rockets
13
+
14
+ # HoundCI config
15
+
16
+ AllCops:
17
+ Exclude:
18
+ - "vendor/**/*"
19
+ - "db/schema.rb"
20
+ UseCache: false
21
+ Style/CollectionMethods:
22
+ Description: Preferred collection methods.
23
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
24
+ Enabled: true
25
+ PreferredMethods:
26
+ collect: map
27
+ collect!: map!
28
+ find: detect
29
+ find_all: select
30
+ reduce: inject
31
+ Style/DotPosition:
32
+ Description: Checks the position of the dot in multi-line method calls.
33
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
34
+ Enabled: true
35
+ EnforcedStyle: trailing
36
+ SupportedStyles:
37
+ - leading
38
+ - trailing
39
+ Style/FileName:
40
+ Description: Use snake_case for source file names.
41
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
42
+ Enabled: false
43
+ Exclude: []
44
+ Style/GuardClause:
45
+ Description: Check for conditionals that can be replaced with guard clauses
46
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
47
+ Enabled: false
48
+ MinBodyLength: 1
49
+ Style/IfUnlessModifier:
50
+ Description: Favor modifier if/unless usage when you have a single-line body.
51
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
52
+ Enabled: false
53
+ MaxLineLength: 80
54
+ Style/OptionHash:
55
+ Description: Don't use option hashes when you can use keyword arguments.
56
+ Enabled: false
57
+ Style/PercentLiteralDelimiters:
58
+ Description: Use `%`-literal delimiters consistently
59
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
60
+ Enabled: false
61
+ PreferredDelimiters:
62
+ "%": "()"
63
+ "%i": "()"
64
+ "%q": "()"
65
+ "%Q": "()"
66
+ "%r": "{}"
67
+ "%s": "()"
68
+ "%w": "()"
69
+ "%W": "()"
70
+ "%x": "()"
71
+ Style/PredicateName:
72
+ Description: Check the names of predicate methods.
73
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
74
+ Enabled: true
75
+ NamePrefix:
76
+ - is_
77
+ - has_
78
+ - have_
79
+ NamePrefixBlacklist:
80
+ - is_
81
+ Exclude:
82
+ - spec/**/*
83
+ Style/RaiseArgs:
84
+ Description: Checks the arguments passed to raise/fail.
85
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
86
+ Enabled: false
87
+ EnforcedStyle: exploded
88
+ SupportedStyles:
89
+ - compact
90
+ - exploded
91
+ Style/SignalException:
92
+ Description: Checks for proper usage of fail and raise.
93
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
94
+ Enabled: false
95
+ EnforcedStyle: semantic
96
+ SupportedStyles:
97
+ - only_raise
98
+ - only_fail
99
+ - semantic
100
+ Style/SingleLineBlockParams:
101
+ Description: Enforces the names of some block params.
102
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
103
+ Enabled: false
104
+ Methods:
105
+ - reduce:
106
+ - a
107
+ - e
108
+ - inject:
109
+ - a
110
+ - e
111
+ Style/SingleLineMethods:
112
+ Description: Avoid single-line methods.
113
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
114
+ Enabled: false
115
+ AllowIfMethodIsEmpty: true
116
+ Style/StringLiterals:
117
+ Description: Checks if uses of quotes match the configured preference.
118
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
119
+ Enabled: true
120
+ EnforcedStyle: double_quotes
121
+ SupportedStyles:
122
+ - single_quotes
123
+ - double_quotes
124
+ Style/StringLiteralsInInterpolation:
125
+ Description: Checks if uses of quotes inside expressions in interpolated strings
126
+ match the configured preference.
127
+ Enabled: true
128
+ EnforcedStyle: single_quotes
129
+ SupportedStyles:
130
+ - single_quotes
131
+ - double_quotes
132
+ Metrics/AbcSize:
133
+ Description: A calculated magnitude based on number of assignments, branches, and
134
+ conditions.
135
+ Enabled: false
136
+ Max: 15
137
+ Metrics/ClassLength:
138
+ Description: Avoid classes longer than 100 lines of code.
139
+ Enabled: false
140
+ CountComments: false
141
+ Max: 100
142
+ Metrics/ModuleLength:
143
+ CountComments: false
144
+ Max: 100
145
+ Description: Avoid modules longer than 100 lines of code.
146
+ Enabled: false
147
+ Metrics/CyclomaticComplexity:
148
+ Description: A complexity metric that is strongly correlated to the number of test
149
+ cases needed to validate a method.
150
+ Enabled: false
151
+ Max: 6
152
+ Metrics/MethodLength:
153
+ Description: Avoid methods longer than 10 lines of code.
154
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
155
+ Enabled: false
156
+ CountComments: false
157
+ Max: 10
158
+ Metrics/ParameterLists:
159
+ Description: Avoid parameter lists longer than three or four parameters.
160
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
161
+ Enabled: false
162
+ Max: 5
163
+ CountKeywordArgs: true
164
+ Metrics/PerceivedComplexity:
165
+ Description: A complexity metric geared towards measuring complexity for a human
166
+ reader.
167
+ Enabled: false
168
+ Max: 7
169
+ Lint/AssignmentInCondition:
170
+ Description: Don't use assignment in conditions.
171
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
172
+ Enabled: false
173
+ AllowSafeAssignment: true
174
+ Style/InlineComment:
175
+ Description: Avoid inline comments.
176
+ Enabled: false
177
+ Style/AccessorMethodName:
178
+ Description: Check the naming of accessor methods for get_/set_.
179
+ Enabled: false
180
+ Style/Alias:
181
+ Description: Use alias_method instead of alias.
182
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
183
+ Enabled: false
184
+ Style/Documentation:
185
+ Description: Document classes and non-namespace modules.
186
+ Enabled: false
187
+ Style/DoubleNegation:
188
+ Description: Checks for uses of double negation (!!).
189
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
190
+ Enabled: false
191
+ Style/EachWithObject:
192
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
193
+ Enabled: false
194
+ Style/EmptyLiteral:
195
+ Description: Prefer literals to Array.new/Hash.new/String.new.
196
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
197
+ Enabled: false
198
+ Style/ModuleFunction:
199
+ Description: Checks for usage of `extend self` in modules.
200
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
201
+ Enabled: false
202
+ Style/OneLineConditional:
203
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
204
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
205
+ Enabled: false
206
+ Style/PerlBackrefs:
207
+ Description: Avoid Perl-style regex back references.
208
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
209
+ Enabled: false
210
+ Style/Send:
211
+ Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
212
+ may overlap with existing methods.
213
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
214
+ Enabled: false
215
+ Style/SpecialGlobalVars:
216
+ Description: Avoid Perl-style global variables.
217
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
218
+ Enabled: false
219
+ Style/VariableInterpolation:
220
+ Description: Don't interpolate global, instance and class variables directly in
221
+ strings.
222
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
223
+ Enabled: false
224
+ Style/WhenThen:
225
+ Description: Use when x then ... for one-line cases.
226
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
227
+ Enabled: false
228
+ Lint/EachWithObjectArgument:
229
+ Description: Check for immutable argument given to each_with_object.
230
+ Enabled: true
231
+ Lint/HandleExceptions:
232
+ Description: Don't suppress exception.
233
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
234
+ Enabled: false
235
+ Lint/LiteralInCondition:
236
+ Description: Checks of literals used in conditions.
237
+ Enabled: false
238
+ Lint/LiteralInInterpolation:
239
+ Description: Checks for literals used in interpolation.
240
+ Enabled: false
@@ -0,0 +1 @@
1
+ fog-vcloud-director
@@ -0,0 +1,15 @@
1
+ language: ruby
2
+ sudo: false
3
+ matrix:
4
+ fast_finish: true
5
+ include:
6
+ - rvm: 2.0
7
+ - rvm: 2.1
8
+ - rvm: 2.2
9
+ - rvm: 2.3.0
10
+ - rvm: jruby-head
11
+ allow_failures:
12
+ - rvm: jruby-head
13
+
14
+ notifications:
15
+ email: false
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in fog-vcloud-director.gemspec
4
+ gemspec
@@ -0,0 +1,20 @@
1
+ he MIT License (MIT)
2
+
3
+ Copyright (c) 2014-2016 [CONTRIBUTORS.md](https://github.com/fog/fog/blob/master/CONTRIBUTORS.md)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,962 @@
1
+ # VMware vCloud Director 5.1 API client
2
+
3
+ This is a repo has been extracted from [fog/fog](https://github.com/fog/fog)
4
+ to remove dependency on `fog/fog` and its runtime dependencies.
5
+
6
+ ## Introduction
7
+
8
+ Collection and Model representation in vcloud_director fog provider.
9
+
10
+ ```no-highlight
11
+ organizations
12
+ organization
13
+ vdcs -> vdc -> vapps -> vapp -> vms -> vm -> customizations -> script
14
+ -> network
15
+ -> disks -> disk
16
+ -> tags -> tag
17
+ -> power_on
18
+
19
+ vapp_templates -> vms -> vm
20
+ networks -> network
21
+ catalogs -> catalog -> catalog_items -> catalog_item -> instantiate_vapp
22
+ -> vapp_template -> vms -> vm
23
+ medias -> media
24
+ ```
25
+
26
+ ### Actions
27
+
28
+ Every collection supports the following methods:
29
+
30
+ Method Name | Lazy Load
31
+ ----------------- | ---------
32
+ get(id) | false
33
+ get_by_name(name) | false
34
+ all | true
35
+ all(false) | false
36
+
37
+ ### Lazy Loading
38
+
39
+ When listing a collection (eg: `vdc.vapps`), lazy load will be used by default
40
+ to improve the performance, otherwise it will make as many requests as items
41
+ are in the collection.
42
+
43
+ You can disable lazy load using the explict caller and passing a *false*
44
+ option: `vdc.vapps.all(false)`.
45
+
46
+ Attributes showing the value **NonLoaded** will be populated when accessing the
47
+ value, if there are more than one **NonLoaded** values the first time accessing
48
+ on any of those values will populate the others.
49
+
50
+ You can explicitly load those attributes with the `reload` method:
51
+
52
+ ```ruby
53
+ org = vcloud.organizations.first
54
+ org.reload
55
+ ```
56
+
57
+ Lazy load isn't used with `get` and `get_by_name` methods are used.
58
+
59
+ ## Initialization
60
+
61
+ ```ruby
62
+ vcloud = Fog::Compute::VcloudDirector.new(
63
+ :vcloud_director_username => "<username>@<org_name>",
64
+ :vcloud_director_password => "<password>",
65
+ :vcloud_director_host => 'api.example.com',
66
+ :vcloud_director_show_progress => false, # task progress bar on/off
67
+ )
68
+ ```
69
+
70
+ ## Organizations
71
+
72
+ ### List Organizations
73
+
74
+ Note that when listing, by default only the attributes `id`, `name`, `type`,
75
+ and `href` are loaded. To disable lazy loading, and load all attributes, just
76
+ specify `false`. Another option is to reload a specific item:
77
+ `vcloud.organizations.first.reload`
78
+
79
+ ```ruby
80
+ vcloud.organizations
81
+ ```
82
+ ```
83
+ <Fog::Compute::VcloudDirector::Organizations
84
+ [
85
+ <Fog::Compute::VcloudDirector::Organization
86
+ id="c6a4c623-c158-41cf-a87a-dbc1637ad55a",
87
+ name="DevOps",
88
+ type="application/vnd.vmware.vcloud.org+xml",
89
+ href="https://example.com/api/org/c6a4c623-c158-41cf-a87a-dbc1637ad55a",
90
+ description=NonLoaded
91
+ >
92
+ ]
93
+ >
94
+ ```
95
+
96
+ ### Retrieve an Organization by Id
97
+
98
+ ```ruby
99
+ org = vcloud.organizations.get("c6a4c623-c158-41cf-a87a-dbc1637ad55a")
100
+ ```
101
+
102
+ ### Retrieve an Organization by Name
103
+
104
+ ```ruby
105
+ org = vcloud.organizations.get_by_name("DevOps")
106
+ ```
107
+
108
+ ## vDCs
109
+
110
+ It shows the Organization's vDCs.
111
+
112
+ ### List vDCs
113
+
114
+ ```ruby
115
+ org = vcloud.organizations.first
116
+ org.vdcs
117
+ ```
118
+ ```ruby
119
+ <Fog::Compute::VcloudDirector::Vdcs
120
+ organization= <Fog::Compute::VcloudDirector::Organization
121
+ id="c6a4c623-c158-41cf-a87a-dbc1637ad55a",
122
+ name="DevOps",
123
+ type="application/vnd.vmware.vcloud.org+xml",
124
+ href="https://example.com/api/org/c6a4c623-c158-41cf-a87a-dbc1637ad55a",
125
+ description=NonLoaded
126
+ >
127
+ [
128
+ <Fog::Compute::VcloudDirector::Vdc
129
+ id="9a06a16b-12c6-44dc-aee1-06aa52262ea3",
130
+ name="DevOps - VDC",
131
+ type="application/vnd.vmware.vcloud.vdc+xml",
132
+ href="https://example.com/api/vdc/9a06a16b-12c6-44dc-aee1-06aa52262ea3",
133
+ description=NonLoaded,
134
+ available_networks=NonLoaded,
135
+ compute_capacity_cpu=NonLoaded,
136
+ compute_capacity_memory=NonLoaded,
137
+ storage_capacity=NonLoaded,
138
+ allocation_model=NonLoaded,
139
+ capabilities=NonLoaded,
140
+ nic_quota=NonLoaded,
141
+ network_quota=NonLoaded,
142
+ vm_quota=NonLoaded,
143
+ is_enabled=NonLoaded
144
+ >
145
+ ]
146
+ >
147
+ ```
148
+
149
+ ### Retrieve a vDC
150
+
151
+ ```ruby
152
+ org = vcloud.organizations.first
153
+ org.vdcs.get_by_name("DevOps - VDC")
154
+ ```
155
+ ```ruby
156
+ <Fog::Compute::VcloudDirector::Vdc
157
+ id="9a06a16b-12c6-44dc-aee1-06aa52262ea3",
158
+ name="DevOps - VDC",
159
+ type="application/vnd.vmware.vcloud.vdc+xml",
160
+ href="https://example.com/api/vdc/9a06a16b-12c6-44dc-aee1-06aa52262ea3",
161
+ description="",
162
+ available_networks={:type=>"application/vnd.vmware.vcloud.network+xml", :name=>"DevOps - Dev Network Connection", :href=>"https://example.com/api/network/d5f47bbf-de27-4cf5-aaaa-56772f2ccd17"},
163
+ compute_capacity_cpu=NonLoaded,
164
+ compute_capacity_memory={:Units=>"MB", :Allocated=>"0", :Limit=>"0", :Used=>"3584", :Overhead=>"65"},
165
+ storage_capacity={:Units=>"MB", :Allocated=>"1048320", :Limit=>"1048320", :Used=>"903168", :Overhead=>"0"},
166
+ allocation_model="AllocationVApp",
167
+ capabilities={:SupportedHardwareVersion=>"vmx-09"},
168
+ nic_quota=0,
169
+ network_quota=1024,
170
+ vm_quota=0,
171
+ is_enabled=true
172
+ >
173
+ ```
174
+
175
+ ## vApps
176
+
177
+ ### List vApps
178
+
179
+ ```ruby
180
+ org = vcloud.organizations.first
181
+ vdc = org.vdcs.first
182
+ vdc.vapps
183
+ ```
184
+ ```ruby
185
+ <Fog::Compute::VcloudDirector::Vapps
186
+ vdc= <Fog::Compute::VcloudDirector::Vdc
187
+ id="9a06a16b-12c6-44dc-aee1-06aa52262ea3",
188
+ name="DevOps - VDC",
189
+ type="application/vnd.vmware.vcloud.vdc+xml",
190
+ href="https://example.com/api/vdc/9a06a16b-12c6-44dc-aee1-06aa52262ea3",
191
+ description=NonLoaded,
192
+ available_networks=NonLoaded,
193
+ compute_capacity_cpu=NonLoaded,
194
+ compute_capacity_memory=NonLoaded,
195
+ storage_capacity=NonLoaded,
196
+ allocation_model=NonLoaded,
197
+ capabilities=NonLoaded,
198
+ nic_quota=NonLoaded,
199
+ network_quota=NonLoaded,
200
+ vm_quota=NonLoaded,
201
+ is_enabled=NonLoaded
202
+ >
203
+ [
204
+ <Fog::Compute::VcloudDirector::Vapp
205
+ id="vapp-11c7102f-443d-40fd-b1da-cca981fb44b6",
206
+ name="segundo",
207
+ type="application/vnd.vmware.vcloud.vApp+xml",
208
+ href="https://example.com/api/vApp/vapp-11c7102f-443d-40fd-b1da-cca981fb44b6",
209
+ description=NonLoaded,
210
+ deployed=NonLoaded,
211
+ status=NonLoaded,
212
+ deployment_lease_in_seconds=NonLoaded,
213
+ storage_lease_in_seconds=NonLoaded,
214
+ startup_section=NonLoaded,
215
+ network_section=NonLoaded,
216
+ network_config=NonLoaded,
217
+ owner=NonLoaded,
218
+ InMaintenanceMode=NonLoaded
219
+ >,
220
+ <Fog::Compute::VcloudDirector::Vapp
221
+ id="vapp-6ac43e0e-13e2-4642-a58a-6dc3a12f585b",
222
+ name="vApp_restebanez_9",
223
+ type="application/vnd.vmware.vcloud.vApp+xml",
224
+ href="https://example.com/api/vApp/vapp-6ac43e0e-13e2-4642-a58a-6dc3a12f585b",
225
+ description=NonLoaded,
226
+ deployed=NonLoaded,
227
+ status=NonLoaded,
228
+ deployment_lease_in_seconds=NonLoaded,
229
+ storage_lease_in_seconds=NonLoaded,
230
+ startup_section=NonLoaded,
231
+ network_section=NonLoaded,
232
+ network_config=NonLoaded,
233
+ owner=NonLoaded,
234
+ InMaintenanceMode=NonLoaded
235
+ >
236
+ ]
237
+ >
238
+ ```
239
+
240
+ ### Retrieve a vApp
241
+
242
+ ```ruby
243
+ org = vcloud.organizations.first
244
+ vdc = org.vdcs.first
245
+ vdc.vapps.get_by_name("segundo")
246
+ ```
247
+ ```ruby
248
+ <Fog::Compute::VcloudDirector::Vapp
249
+ id="vapp-11c7102f-443d-40fd-b1da-cca981fb44b6",
250
+ name="segundo",
251
+ type="application/vnd.vmware.vcloud.vApp+xml",
252
+ href="https://example.com/api/vApp/vapp-11c7102f-443d-40fd-b1da-cca981fb44b6",
253
+ description="",
254
+ deployed=false,
255
+ status="8",
256
+ deployment_lease_in_seconds=NonLoaded,
257
+ storage_lease_in_seconds="7776000",
258
+ startup_section={:ovf_stopDelay=>"0", :ovf_stopAction=>"powerOff", :ovf_startDelay=>"0", :ovf_startAction=>"powerOn", :ovf_order=>"0", :ovf_id=>"DEVWEB"},
259
+ network_section={:ovf_name=>"DevOps - Dev Network Connection", :"ovf:Description"=>""},
260
+ network_config={:networkName=>"DevOps - Dev Network Connection", :Link=>{:rel=>"repair", :href=>"https://example.com/api/admin/network/82a07044-4dda-4a3e-a53d-8981cf0d5baa/action/reset"}, :Description=>"", :Configuration=>{:IpScope=>{:IsInherited=>"true", :Gateway=>"10.192.0.1", :Netmask=>"255.255.252.0", :Dns1=>"10.192.0.11", :Dns2=>"10.192.0.12", :DnsSuffix=>"dev.ad.mdsol.com", :IpRanges=>{:IpRange=>{:StartAddress=>"10.192.0.100", :EndAddress=>"10.192.3.254"}}}, :ParentNetwork=>{:name=>"DevOps - Dev Network Connection", :id=>"d5f47bbf-de27-4cf5-aaaa-56772f2ccd17", :href=>"https://example.com/api/admin/network/d5f47bbf-de27-4cf5-aaaa-56772f2ccd17"}, :FenceMode=>"bridged", :RetainNetInfoAcrossDeployments=>"false"}, :IsDeployed=>"false"},
261
+ owner={:type=>"application/vnd.vmware.admin.user+xml", :name=>"restebanez", :href=>"https://example.com/api/admin/user/c3ca7b97-ddea-425f-8bdb-1fdb946f7349"},
262
+ InMaintenanceMode=false
263
+ >
264
+ ```
265
+
266
+ ## VMs
267
+
268
+ ### List VMs
269
+
270
+ ```ruby
271
+ org = vcloud.organizations.first
272
+ vdc = org.vdcs.first
273
+ vapp = vdc.vapps.get_by_name("segundo")
274
+ vapp.vms
275
+ ```
276
+ ```ruby
277
+ <Fog::Compute::VcloudDirector::Vms
278
+ vapp= <Fog::Compute::VcloudDirector::Vapp
279
+ id="vapp-11c7102f-443d-40fd-b1da-cca981fb44b6",
280
+ name="segundo",
281
+ type="application/vnd.vmware.vcloud.vApp+xml",
282
+ href="https://example.com/api/vApp/vapp-11c7102f-443d-40fd-b1da-cca981fb44b6",
283
+ description="",
284
+ deployed=false,
285
+ status="8",
286
+ deployment_lease_in_seconds=NonLoaded,
287
+ storage_lease_in_seconds="7776000",
288
+ startup_section={:ovf_stopDelay=>"0", :ovf_stopAction=>"powerOff", :ovf_startDelay=>"0", :ovf_startAction=>"powerOn", :ovf_order=>"0", :ovf_id=>"DEVWEB"},
289
+ network_section={:ovf_name=>"DevOps - Dev Network Connection", :"ovf:Description"=>""},
290
+ network_config={:networkName=>"DevOps - Dev Network Connection", :Link=>{:rel=>"repair", :href=>"https://example.com/api/admin/network/82a07044-4dda-4a3e-a53d-8981cf0d5baa/action/reset"}, :Description=>"", :Configuration=>{:IpScope=>{:IsInherited=>"true", :Gateway=>"10.192.0.1", :Netmask=>"255.255.252.0", :Dns1=>"10.192.0.11", :Dns2=>"10.192.0.12", :DnsSuffix=>"dev.ad.mdsol.com", :IpRanges=>{:IpRange=>{:StartAddress=>"10.192.0.100", :EndAddress=>"10.192.3.254"}}}, :ParentNetwork=>{:name=>"DevOps - Dev Network Connection", :id=>"d5f47bbf-de27-4cf5-aaaa-56772f2ccd17", :href=>"https://example.com/api/admin/network/d5f47bbf-de27-4cf5-aaaa-56772f2ccd17"}, :FenceMode=>"bridged", :RetainNetInfoAcrossDeployments=>"false"}, :IsDeployed=>"false"},
291
+ owner={:type=>"application/vnd.vmware.admin.user+xml", :name=>"restebanez", :href=>"https://example.com/api/admin/user/c3ca7b97-ddea-425f-8bdb-1fdb946f7349"},
292
+ InMaintenanceMode=false
293
+ >
294
+ [
295
+ <Fog::Compute::VcloudDirector::Vm
296
+ id="vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192",
297
+ vapp_id="vapp-11c7102f-443d-40fd-b1da-cca981fb44b6",
298
+ name="DEVWEB",
299
+ type="application/vnd.vmware.vcloud.vm+xml",
300
+ href="https://example.com/api/vApp/vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192",
301
+ status="off",
302
+ operating_system="Microsoft Windows Server 2008 R2 (64-bit)",
303
+ ip_address="10.192.0.144",
304
+ cpu=3,
305
+ memory=3584,
306
+ hard_disks=[{"Hard disk 1"=>163840}]
307
+ >
308
+ ]
309
+ >
310
+ ```
311
+
312
+ ### Retrieve a VM
313
+
314
+ ```ruby
315
+ org = vcloud.organizations.first
316
+ vdc = org.vdcs.first
317
+ vapp = vdc.vapps.get_by_name("segundo")
318
+ vapp.vms.get_by_name("DEVWEB")
319
+ ```
320
+ ```ruby
321
+ <Fog::Compute::VcloudDirector::Vm
322
+ id="vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192",
323
+ vapp_id="vapp-11c7102f-443d-40fd-b1da-cca981fb44b6",
324
+ name="DEVWEB",
325
+ type="application/vnd.vmware.vcloud.vm+xml",
326
+ href="https://example.com/api/vApp/vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192",
327
+ status="off",
328
+ operating_system="Microsoft Windows Server 2008 R2 (64-bit)",
329
+ ip_address="10.192.0.144",
330
+ cpu=3,
331
+ memory=3584,
332
+ hard_disks=[{"Hard disk 1"=>163840}]
333
+ >
334
+ ```
335
+
336
+ ### Modify CPU
337
+
338
+ ```ruby
339
+ org = vcloud.organizations.first
340
+ vdc = org.vdcs.first
341
+ vapp = vdc.vapps.get_by_name("segundo")
342
+ vm = vapp.vms.get_by_name("DEVWEB")
343
+ vm.cpu = 4
344
+ ```
345
+ ```no-highlight
346
+ 4
347
+ ```
348
+
349
+ ### Modify Memory
350
+
351
+ ```ruby
352
+ org = vcloud.organizations.first
353
+ vdc = org.vdcs.first
354
+ vapp = vdc.vapps.get_by_name("segundo")
355
+ vm = vapp.vms.get_by_name("DEVWEB")
356
+ vm.memory = 4096
357
+ ```
358
+ ```no-highlight
359
+ 4096
360
+ ```
361
+
362
+ ### Power On a VM
363
+
364
+ ```ruby
365
+ org = vcloud.organizations.first
366
+ vdc = org.vdcs.first
367
+ vapp = vdc.vapps.get_by_name("segundo")
368
+ vm = vapp.vms.get_by_name("DEVWEB")
369
+ vm.power_on
370
+ ```
371
+ ```no-highlight
372
+ true
373
+ ```
374
+
375
+ ## VM Customization
376
+
377
+ ### Retrieve VM Customization
378
+
379
+ ```ruby
380
+ org = vcloud.organizations.first
381
+ vdc = org.vdcs.first
382
+ vapp = vdc.vapps.get_by_name("segundo")
383
+ vm = vapp.vms.get_by_name("DEVWEB")
384
+ vm.customization
385
+ ```
386
+ ```ruby
387
+ <Fog::Compute::VcloudDirector::VmCustomization
388
+ id="vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192",
389
+ type="application/vnd.vmware.vcloud.guestCustomizationSection+xml",
390
+ href="https://example.com/api/vApp/vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192/guestCustomizationSection/",
391
+ enabled=false,
392
+ change_sid=false,
393
+ join_domain_enabled=false,
394
+ use_org_settings=false,
395
+ admin_password_auto=false,
396
+ admin_password='',
397
+ admin_password_enabled=false,
398
+ reset_password_required=false,
399
+ virtual_machine_id="2ddeea36-ac71-470f-abc5-c6e3c2aca192",
400
+ computer_name="DEVWEB-001",
401
+ has_customization_script=true
402
+ >
403
+ ```
404
+
405
+ ### Modify VM Customization
406
+
407
+ Customization attributes model requires to `save` it after setting the
408
+ attributes.
409
+
410
+ ```ruby
411
+ org = vcloud.organizations.first
412
+ vdc = org.vdcs.first
413
+ vapp = vdc.vapps.get_by_name("segundo")
414
+ vm = vapp.vms.get_by_name("DEVWEB")
415
+ customization = vm.customization
416
+ customization.compute_name = "NEWNAME"
417
+ customization.enabled = false
418
+ customization.script = "new userdata script"
419
+ customization.save
420
+ ```
421
+ ```no-highlight
422
+ true
423
+ ```
424
+
425
+ ## VM Network
426
+
427
+ ### Show VM Networks
428
+
429
+ ```ruby
430
+ org = vcloud.organizations.first
431
+ vdc = org.vdcs.first
432
+ vapp = vdc.vapps.get_by_name("segundo")
433
+ vm = vapp.vms.get_by_name("DEVWEB")
434
+ vm.network
435
+ ```
436
+ ```ruby
437
+ <Fog::Compute::VcloudDirector::VmNetwork
438
+ id="vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192",
439
+ type="application/vnd.vmware.vcloud.networkConnectionSection+xml",
440
+ href="https://example.com/api/vApp/vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192/networkConnectionSection/",
441
+ info="Specifies the available VM network connections",
442
+ primary_network_connection_index=0,
443
+ network="DevOps - Dev Network Connection",
444
+ needs_customization=true,
445
+ network_connection_index=0,
446
+ is_connected=true,
447
+ mac_address="00:50:56:01:00:ea",
448
+ ip_address_allocation_mode="POOL"
449
+ >
450
+ ```
451
+
452
+ ### Modify one or more attributes
453
+
454
+ Network attributes model requires to `save` it after setting the attributes.
455
+
456
+ ```ruby
457
+ org = vcloud.organizations.first
458
+ vdc = org.vdcs.first
459
+ vapp = vdc.vapps.get_by_name("segundo")
460
+ vm = vapp.vms.get_by_name("DEVWEB")
461
+ network = vm.network
462
+ network.is_connected = false
463
+ network.ip_address_allocation_mode = "DHCP"
464
+ network.save
465
+ ```
466
+ ```no-highlight
467
+ true
468
+ ```
469
+
470
+ ## VM Disk
471
+
472
+ ### List VM Disks
473
+
474
+ ```ruby
475
+ org = vcloud.organizations.first
476
+ vdc = org.vdcs.first
477
+ vapp = vdc.vapps.get_by_name("segundo")
478
+ vm = vapp.vms.get_by_name("DEVWEB")
479
+ vm.disks
480
+ ```
481
+ ```ruby
482
+ <Fog::Compute::VcloudDirector::Disks
483
+ vm= <Fog::Compute::VcloudDirector::Vm
484
+ id="vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192",
485
+ vapp_id="vapp-11c7102f-443d-40fd-b1da-cca981fb44b6",
486
+ name="DEVWEB",
487
+ type="application/vnd.vmware.vcloud.vm+xml",
488
+ href="https://example.com/api/vApp/vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192",
489
+ status="off",
490
+ operating_system="Microsoft Windows Server 2008 R2 (64-bit)",
491
+ ip_address="10.192.0.144",
492
+ cpu=4,
493
+ memory=4096,
494
+ hard_disks=[{"Hard disk 1"=>163840}]
495
+ >
496
+ [
497
+ <Fog::Compute::VcloudDirector::Disk
498
+ id=2,
499
+ address=0,
500
+ description="SCSI Controller",
501
+ name="SCSI Controller 0",
502
+ resource_sub_type="lsilogicsas",
503
+ resource_type=6,
504
+ address_on_parent=nil,
505
+ parent=nil,
506
+ capacity=nil,
507
+ bus_sub_type=nil,
508
+ bus_type=nil
509
+ >,
510
+ <Fog::Compute::VcloudDirector::Disk
511
+ id=2000,
512
+ address=nil,
513
+ description="Hard disk",
514
+ name="Hard disk 1",
515
+ resource_sub_type=nil,
516
+ resource_type=17,
517
+ address_on_parent=0,
518
+ parent=2,
519
+ capacity=163840,
520
+ bus_sub_type="lsilogicsas",
521
+ bus_type=6
522
+ >,
523
+ <Fog::Compute::VcloudDirector::Disk
524
+ id=3,
525
+ address=0,
526
+ description="IDE Controller",
527
+ name="IDE Controller 0",
528
+ resource_sub_type=nil,
529
+ resource_type=5,
530
+ address_on_parent=nil,
531
+ parent=nil,
532
+ capacity=nil,
533
+ bus_sub_type=nil,
534
+ bus_type=nil
535
+ >
536
+ ]
537
+ >
538
+ ```
539
+
540
+ ### Create a New Disk
541
+
542
+ ```ruby
543
+ org = vcloud.organizations.first
544
+ vdc = org.vdcs.first
545
+ vapp = vdc.vapps.get_by_name("segundo")
546
+ vm = vapp.vms.get_by_name("DEVWEB")
547
+ vm.disks.create(1024)
548
+ ```
549
+ ```no-highlight
550
+ true
551
+ ```
552
+
553
+ The new disk should show up.
554
+
555
+ ```ruby
556
+ >> vm.disks
557
+ <Fog::Compute::VcloudDirector::Disks
558
+ vm= <Fog::Compute::VcloudDirector::Vm
559
+ id="vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192",
560
+ vapp_id="vapp-11c7102f-443d-40fd-b1da-cca981fb44b6",
561
+ name="DEVWEB",
562
+ type="application/vnd.vmware.vcloud.vm+xml",
563
+ href="https://example.com/api/vApp/vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192",
564
+ status="off",
565
+ operating_system="Microsoft Windows Server 2008 R2 (64-bit)",
566
+ ip_address="10.192.0.144",
567
+ cpu=4,
568
+ memory=4096,
569
+ hard_disks=[{"Hard disk 1"=>163840}]
570
+ >
571
+ [
572
+ <Fog::Compute::VcloudDirector::Disk
573
+ id=2,
574
+ address=0,
575
+ description="SCSI Controller",
576
+ name="SCSI Controller 0",
577
+ resource_sub_type="lsilogicsas",
578
+ resource_type=6,
579
+ address_on_parent=nil,
580
+ parent=nil,
581
+ capacity=nil,
582
+ bus_sub_type=nil,
583
+ bus_type=nil
584
+ >,
585
+ <Fog::Compute::VcloudDirector::Disk
586
+ id=2000,
587
+ address=nil,
588
+ description="Hard disk",
589
+ name="Hard disk 1",
590
+ resource_sub_type=nil,
591
+ resource_type=17,
592
+ address_on_parent=0,
593
+ parent=2,
594
+ capacity=163840,
595
+ bus_sub_type="lsilogicsas",
596
+ bus_type=6
597
+ >,
598
+ <Fog::Compute::VcloudDirector::Disk
599
+ id=2001,
600
+ address=nil,
601
+ description="Hard disk",
602
+ name="Hard disk 2",
603
+ resource_sub_type=nil,
604
+ resource_type=17,
605
+ address_on_parent=1,
606
+ parent=2,
607
+ capacity=1024,
608
+ bus_sub_type="lsilogicsas",
609
+ bus_type=6
610
+ >,
611
+ <Fog::Compute::VcloudDirector::Disk
612
+ id=3,
613
+ address=0,
614
+ description="IDE Controller",
615
+ name="IDE Controller 0",
616
+ resource_sub_type=nil,
617
+ resource_type=5,
618
+ address_on_parent=nil,
619
+ parent=nil,
620
+ capacity=nil,
621
+ bus_sub_type=nil,
622
+ bus_type=nil
623
+ >
624
+ ]
625
+ >
626
+ ```
627
+
628
+ ### Modify the Hard Disk Size
629
+
630
+ ```ruby
631
+ org = vcloud.organizations.first
632
+ vdc = org.vdcs.first
633
+ vapp = vdc.vapps.get_by_name("segundo")
634
+ vm = vapp.vms.get_by_name("DEVWEB")
635
+ disk = vm.disks.get_by_name("Hard disk 2")
636
+ disk.capacity = 2048
637
+ ```
638
+ ```no-highlight
639
+ true
640
+ ```
641
+
642
+ ### Destroy a Hard Disk
643
+
644
+ ```ruby
645
+ org = vcloud.organizations.first
646
+ vdc = org.vdcs.first
647
+ vapp = vdc.vapps.get_by_name("segundo")
648
+ vm = vapp.vms.get_by_name("DEVWEB")
649
+ disk = vm.disks.get_by_name("Hard disk 2")
650
+ disk.destroy
651
+ ```
652
+ ```no-highlight
653
+ true
654
+ ```
655
+
656
+ ## VM Tags
657
+
658
+ ### List VM Tags
659
+
660
+ ```ruby
661
+ org = vcloud.organizations.first
662
+ vdc = org.vdcs.first
663
+ vapp = vdc.vapps.get_by_name("segundo")
664
+ vm = vapp.vms.get_by_name("DEVWEB")
665
+ vm.tags
666
+ ```
667
+ ```ruby
668
+ <Fog::Compute::VcloudDirector::Tags
669
+ vm= <Fog::Compute::VcloudDirector::Vm
670
+ id="vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192",
671
+ vapp_id="vapp-11c7102f-443d-40fd-b1da-cca981fb44b6",
672
+ name="DEVWEB",
673
+ type="application/vnd.vmware.vcloud.vm+xml",
674
+ href="https://example.com/api/vApp/vm-2ddeea36-ac71-470f-abc5-c6e3c2aca192",
675
+ status="off",
676
+ operating_system="Microsoft Windows Server 2008 R2 (64-bit)",
677
+ ip_address="10.192.0.144",
678
+ cpu=4,
679
+ memory=4096,
680
+ hard_disks=[{"Hard disk 1"=>163840}]
681
+ >
682
+ [
683
+ <Fog::Compute::VcloudDirector::Tag
684
+ id="environment",
685
+ value="devlab"
686
+ >,
687
+ <Fog::Compute::VcloudDirector::Tag
688
+ id="product",
689
+ value="devlabtest"
690
+ >,
691
+ <Fog::Compute::VcloudDirector::Tag
692
+ id="hello",
693
+ value="ddd"
694
+ >,
695
+ <Fog::Compute::VcloudDirector::Tag
696
+ id="uno",
697
+ value="jander"
698
+ >
699
+ ]
700
+ >
701
+ ```
702
+
703
+ ### Create a Tag
704
+
705
+ ```ruby
706
+ org = vcloud.organizations.first
707
+ vdc = org.vdcs.first
708
+ vapp = vdc.vapps.get_by_name("segundo")
709
+ vm = vapp.vms.get_by_name("DEVWEB")
710
+ vm.tags.create('this_is_a_key', 'this_is_a_value')
711
+ ```
712
+ ```no-highlight
713
+ true
714
+ ```
715
+
716
+ ### Retrieve a Tag
717
+
718
+ ```ruby
719
+ org = vcloud.organizations.first
720
+ vdc = org.vdcs.first
721
+ vapp = vdc.vapps.get_by_name("segundo")
722
+ vm = vapp.vms.get_by_name("DEVWEB")
723
+ vm.tags.get_by_name('this_is_a_key')
724
+ ```
725
+ ```ruby
726
+ <Fog::Compute::VcloudDirector::Tag
727
+ id="this_is_a_key",
728
+ value="this_is_a_value"
729
+ >
730
+ ```
731
+
732
+ ### Modify a Tag
733
+
734
+ ```ruby
735
+ org = vcloud.organizations.first
736
+ vdc = org.vdcs.first
737
+ vapp = vdc.vapps.get_by_name("segundo")
738
+ vm = vapp.vms.get_by_name("DEVWEB")
739
+ vm.tags.get_by_name('this_is_a_key').value = 'new_value'
740
+ ```
741
+ ```no-highlight
742
+ "new_value"
743
+ ```
744
+
745
+ ### Destroy a Tag
746
+
747
+ ```ruby
748
+ org = vcloud.organizations.first
749
+ vdc = org.vdcs.first
750
+ vapp = vdc.vapps.get_by_name("segundo")
751
+ vm = vapp.vms.get_by_name("DEVWEB")
752
+ vm.tags.get_by_name('this_is_a_key').destroy
753
+ ```
754
+ ```no-highlight
755
+ true
756
+ ```
757
+
758
+ ## Networks
759
+
760
+ It shows the Organization's Networks.
761
+
762
+ ### List Networks
763
+
764
+ ```ruby
765
+ org = vcloud.organizations.first
766
+ org.networks
767
+ ```
768
+ ```ruby
769
+ <Fog::Compute::VcloudDirector::Networks
770
+ organization= <Fog::Compute::VcloudDirector::Organization
771
+ id="c6a4c623-c158-41cf-a87a-dbc1637ad55a",
772
+ name="DevOps",
773
+ type="application/vnd.vmware.vcloud.org+xml",
774
+ href="https://example.com/api/org/c6a4c623-c158-41cf-a87a-dbc1637ad55a",
775
+ description=NonLoaded
776
+ >
777
+ [
778
+ <Fog::Compute::VcloudDirector::Network
779
+ id="d5f47bbf-de27-4cf5-aaaa-56772f2ccd17",
780
+ name="DevOps - Dev Network Connection",
781
+ type="application/vnd.vmware.vcloud.orgNetwork+xml",
782
+ href="https://example.com/api/network/d5f47bbf-de27-4cf5-aaaa-56772f2ccd17",
783
+ description=NonLoaded,
784
+ is_inherited=NonLoaded,
785
+ gateway=NonLoaded,
786
+ netmask=NonLoaded,
787
+ dns1=NonLoaded,
788
+ dns2=NonLoaded,
789
+ dns_suffix=NonLoaded,
790
+ ip_ranges=NonLoaded
791
+ >
792
+ ]
793
+ >
794
+ ```
795
+
796
+ ### Retrieve a Network
797
+
798
+ ```ruby
799
+ org = vcloud.organizations.first
800
+ org.networks.get_by_name("DevOps - Dev Network Connection")
801
+ ```
802
+ ```ruby
803
+ <Fog::Compute::VcloudDirector::Network
804
+ id="d5f47bbf-de27-4cf5-aaaa-56772f2ccd17",
805
+ name="DevOps - Dev Network Connection",
806
+ type="application/vnd.vmware.vcloud.orgNetwork+xml",
807
+ href="https://example.com/api/network/d5f47bbf-de27-4cf5-aaaa-56772f2ccd17",
808
+ description=nil,
809
+ is_inherited=true,
810
+ gateway="10.192.0.1",
811
+ netmask="255.255.252.0",
812
+ dns1="10.192.0.11",
813
+ dns2="10.192.0.12",
814
+ dns_suffix="dev.ad.mdsol.com",
815
+ ip_ranges=[{:start_address=>"10.192.0.100", :end_address=>"10.192.3.254"}]
816
+ >
817
+ ```
818
+
819
+ ## Catalogs
820
+
821
+ It shows the Organization's Catalogs.
822
+
823
+ ### List Catalogs
824
+
825
+ ```ruby
826
+ org = vcloud.organizations.first
827
+ org.catalogs
828
+ ```
829
+ ```ruby
830
+ <Fog::Compute::VcloudDirector::Catalogs
831
+ organization= <Fog::Compute::VcloudDirector::Organization
832
+ id="c6a4c623-c158-41cf-a87a-dbc1637ad55a",
833
+ name="DevOps",
834
+ type="application/vnd.vmware.vcloud.org+xml",
835
+ href="https://example.com/api/org/c6a4c623-c158-41cf-a87a-dbc1637ad55a",
836
+ description=NonLoaded
837
+ >
838
+ [
839
+ <Fog::Compute::VcloudDirector::Catalog
840
+ id="4ee720e5-173a-41ac-824b-6f4908bac975",
841
+ name="Public VM Templates",
842
+ type="application/vnd.vmware.vcloud.catalog+xml",
843
+ href="https://example.com/api/catalog/4ee720e5-173a-41ac-824b-6f4908bac975",
844
+ description=NonLoaded,
845
+ is_published=NonLoaded
846
+ >,
847
+ <Fog::Compute::VcloudDirector::Catalog
848
+ id="ea0c6acf-c9c0-46b7-b19f-4b2d3bf8aa33",
849
+ name="prueba",
850
+ type="application/vnd.vmware.vcloud.catalog+xml",
851
+ href="https://example.com/api/catalog/ea0c6acf-c9c0-46b7-b19f-4b2d3bf8aa33",
852
+ description=NonLoaded,
853
+ is_published=NonLoaded
854
+ >
855
+ ]
856
+ >
857
+ ```
858
+
859
+ ### Retrieve a Catalog
860
+
861
+ ```ruby
862
+ org = vcloud.organizations.first
863
+ org.catalogs.get("4ee720e5-173a-41ac-824b-6f4908bac975") # or get_by_name("Public VM Templates")
864
+ ```
865
+ ```ruby
866
+ <Fog::Compute::VcloudDirector::Catalog
867
+ id="4ee720e5-173a-41ac-824b-6f4908bac975",
868
+ name="Public VM Templates",
869
+ type="application/vnd.vmware.vcloud.catalog+xml",
870
+ href="https://example.com/api/catalog/4ee720e5-173a-41ac-824b-6f4908bac975",
871
+ description="",
872
+ is_published=true
873
+ >
874
+ ```
875
+
876
+ ## Catalog Items
877
+
878
+ ### List Catalog Items
879
+
880
+ ```ruby
881
+ org = vcloud.organizations.first
882
+ catalog = org.catalogs.first
883
+ catalog.catalog_items
884
+ ```
885
+ ```ruby
886
+ <Fog::Compute::VcloudDirector::CatalogItems
887
+ catalog= <Fog::Compute::VcloudDirector::Catalog
888
+ id="4ee720e5-173a-41ac-824b-6f4908bac975",
889
+ name="Public VM Templates",
890
+ type="application/vnd.vmware.vcloud.catalog+xml",
891
+ href="https://example.com/api/catalog/4ee720e5-173a-41ac-824b-6f4908bac975",
892
+ description=NonLoaded,
893
+ is_published=NonLoaded
894
+ >
895
+ [
896
+ <Fog::Compute::VcloudDirector::CatalogItem
897
+ id="2bd55629-2734-420c-9068-2ff06a4a8028",
898
+ name="DEVWIN",
899
+ type="application/vnd.vmware.vcloud.catalogItem+xml",
900
+ href="https://example.com/api/catalogItem/2bd55629-2734-420c-9068-2ff06a4a8028",
901
+ description=NonLoaded,
902
+ vapp_template_id=NonLoaded
903
+ >,
904
+ <Fog::Compute::VcloudDirector::CatalogItem
905
+ id="5437aa3f-e369-40b2-b985-2e63e1bc9f2e",
906
+ name="DEVRHL",
907
+ type="application/vnd.vmware.vcloud.catalogItem+xml",
908
+ href="https://example.com/api/catalogItem/5437aa3f-e369-40b2-b985-2e63e1bc9f2e",
909
+ description=NonLoaded,
910
+ vapp_template_id=NonLoaded
911
+ >,
912
+ <Fog::Compute::VcloudDirector::CatalogItem
913
+ id="54cf5deb-326f-4770-a91a-39048689b6ea",
914
+ name="DEVAPP",
915
+ type="application/vnd.vmware.vcloud.catalogItem+xml",
916
+ href="https://example.com/api/catalogItem/54cf5deb-326f-4770-a91a-39048689b6ea",
917
+ description=NonLoaded,
918
+ vapp_template_id=NonLoaded
919
+ >
920
+ ]
921
+ >
922
+ ```
923
+
924
+ ### Retrieve a Catalog Item
925
+
926
+ ```ruby
927
+ org = vcloud.organizations.first
928
+ catalog = org.catalogs.first
929
+ catalog.catalog_items.get_by_name('DEVAPP')
930
+ ```
931
+ ```ruby
932
+ <Fog::Compute::VcloudDirector::CatalogItem
933
+ id="54cf5deb-326f-4770-a91a-39048689b6ea",
934
+ name="DEVAPP",
935
+ type="application/vnd.vmware.vcloud.catalogItem+xml",
936
+ href="https://example.com/api/catalogItem/54cf5deb-326f-4770-a91a-39048689b6ea",
937
+ description="Windows Server 2008 R2 Application Server",
938
+ vapp_template_id="vappTemplate-b5902d57-7906-49c8-8af5-bbebe0a60a97"
939
+ >
940
+ ```
941
+
942
+ ### Instantiate a vApp Template
943
+
944
+ It creates a Vapp from a CatalogItem.
945
+
946
+ ```ruby
947
+ org = vcloud.organizations.first
948
+ catalog = org.catalogs.first
949
+ template = catalog.catalog_items.get_by_name('DEVAPP')
950
+ template.instantiate('webserver')
951
+ ```
952
+
953
+ It there were more than one vDC or/and network you'd have to specify it as a
954
+ second param:
955
+
956
+ ```ruby
957
+ template.instantiate('webserver', {
958
+ vdc_id: "9a06a16b-12c6-44dc-aee1-06aa52262ea3",
959
+ network_id: "d5f47bbf-de27-4cf5-aaaa-56772f2ccd17"
960
+ }
961
+ ```
962
+