ruby_vcloud_sdk 0.4.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (319) hide show
  1. data/README +1 -0
  2. data/Rakefile +50 -0
  3. data/lib/ruby_vcloud_sdk.rb +19 -0
  4. data/lib/ruby_vcloud_sdk/client.rb +899 -0
  5. data/lib/ruby_vcloud_sdk/config.rb +17 -0
  6. data/lib/ruby_vcloud_sdk/connection/connection.rb +163 -0
  7. data/lib/ruby_vcloud_sdk/connection/file_uploader.rb +43 -0
  8. data/lib/ruby_vcloud_sdk/errors.rb +21 -0
  9. data/lib/ruby_vcloud_sdk/ovf_directory.rb +45 -0
  10. data/lib/ruby_vcloud_sdk/util.rb +21 -0
  11. data/lib/ruby_vcloud_sdk/version.rb +3 -0
  12. data/lib/ruby_vcloud_sdk/xml/constants.rb +427 -0
  13. data/lib/ruby_vcloud_sdk/xml/wrapper.rb +242 -0
  14. data/lib/ruby_vcloud_sdk/xml/wrapper_classes.rb +3 -0
  15. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/admin_catalog.rb +20 -0
  16. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/admin_org.rb +15 -0
  17. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/catalog_item.rb +27 -0
  18. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/disk.rb +40 -0
  19. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/disk_attach_or_detach_params.rb +12 -0
  20. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/disk_create_params.rb +47 -0
  21. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/entity.rb +11 -0
  22. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/file.rb +11 -0
  23. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb +50 -0
  24. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/instantiate_vapp_template_params.rb +71 -0
  25. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/ip_scope.rb +55 -0
  26. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/item.rb +32 -0
  27. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/media.rb +53 -0
  28. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/media_insert_or_eject_params.rb +17 -0
  29. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/metadata_value.rb +15 -0
  30. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/network.rb +15 -0
  31. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/network_config.rb +27 -0
  32. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/network_config_section.rb +25 -0
  33. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/network_connection.rb +71 -0
  34. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/network_connection_section.rb +67 -0
  35. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/nic_item_wrapper.rb +91 -0
  36. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/org_network.rb +19 -0
  37. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/org_vdc_network.rb +11 -0
  38. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/session.rb +17 -0
  39. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/task.rb +32 -0
  40. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/upload_vapp_template_params.rb +11 -0
  41. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/vapp.rb +55 -0
  42. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/vapp_template.rb +19 -0
  43. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/vcloud.rb +15 -0
  44. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/vdc.rb +54 -0
  45. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/vdc_storage_profile.rb +15 -0
  46. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/virtual_hardware_section.rb +68 -0
  47. data/lib/ruby_vcloud_sdk/xml/wrapper_classes/vm.rb +179 -0
  48. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminAllocatedExtIpRecord.xml +1 -0
  49. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminCatalog.xml +1 -0
  50. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminCatalogItemRecord.xml +1 -0
  51. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminCatalogRecord.xml +1 -0
  52. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminGroupRecord.xml +1 -0
  53. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminMediaRecord.xml +1 -0
  54. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminOrg.xml +1 -0
  55. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminOrgNetworkRecord.xml +1 -0
  56. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminShadowVmRecord.xml +1 -0
  57. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminTaskRecord.xml +1 -0
  58. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminUserRecord.xml +1 -0
  59. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminVAppNetworkRecord.xml +1 -0
  60. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminVAppRecord.xml +1 -0
  61. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminVAppReference.xml +1 -0
  62. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminVAppReferences.xml +1 -0
  63. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminVAppTemplateRecord.xml +1 -0
  64. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminVdc.xml +1 -0
  65. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminVdcRecord.xml +1 -0
  66. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminVdcReference.xml +1 -0
  67. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminVdcReferences.xml +1 -0
  68. data/lib/ruby_vcloud_sdk/xml/xml_templates/AdminVmRecord.xml +1 -0
  69. data/lib/ruby_vcloud_sdk/xml/xml_templates/AllEULAsAccepted.xml +1 -0
  70. data/lib/ruby_vcloud_sdk/xml/xml_templates/AllocatedExtIpRecord.xml +1 -0
  71. data/lib/ruby_vcloud_sdk/xml/xml_templates/BlockingTaskRecord.xml +1 -0
  72. data/lib/ruby_vcloud_sdk/xml/xml_templates/BlockingTaskReference.xml +1 -0
  73. data/lib/ruby_vcloud_sdk/xml/xml_templates/BlockingTaskReferences.xml +1 -0
  74. data/lib/ruby_vcloud_sdk/xml/xml_templates/CaptureVAppParams.xml +1 -0
  75. data/lib/ruby_vcloud_sdk/xml/xml_templates/Catalog.xml +1 -0
  76. data/lib/ruby_vcloud_sdk/xml/xml_templates/CatalogItem.xml +1 -0
  77. data/lib/ruby_vcloud_sdk/xml/xml_templates/CatalogItemRecord.xml +1 -0
  78. data/lib/ruby_vcloud_sdk/xml/xml_templates/CatalogItemReference.xml +1 -0
  79. data/lib/ruby_vcloud_sdk/xml/xml_templates/CatalogItemReferences.xml +1 -0
  80. data/lib/ruby_vcloud_sdk/xml/xml_templates/CatalogRecord.xml +1 -0
  81. data/lib/ruby_vcloud_sdk/xml/xml_templates/CatalogReference.xml +1 -0
  82. data/lib/ruby_vcloud_sdk/xml/xml_templates/CatalogReferences.xml +1 -0
  83. data/lib/ruby_vcloud_sdk/xml/xml_templates/CellRecord.xml +1 -0
  84. data/lib/ruby_vcloud_sdk/xml/xml_templates/CloneMediaParams.xml +1 -0
  85. data/lib/ruby_vcloud_sdk/xml/xml_templates/CloneVAppParams.xml +1 -0
  86. data/lib/ruby_vcloud_sdk/xml/xml_templates/CloneVAppTemplateParams.xml +1 -0
  87. data/lib/ruby_vcloud_sdk/xml/xml_templates/ComposeVAppParams.xml +1 -0
  88. data/lib/ruby_vcloud_sdk/xml/xml_templates/ControlAccessParams.xml +1 -0
  89. data/lib/ruby_vcloud_sdk/xml/xml_templates/CustomizationSection.xml +1 -0
  90. data/lib/ruby_vcloud_sdk/xml/xml_templates/DatastoreProviderVdcRelationRecord.xml +1 -0
  91. data/lib/ruby_vcloud_sdk/xml/xml_templates/DatastoreRecord.xml +1 -0
  92. data/lib/ruby_vcloud_sdk/xml/xml_templates/DatastoreReference.xml +1 -0
  93. data/lib/ruby_vcloud_sdk/xml/xml_templates/DatastoreReferences.xml +1 -0
  94. data/lib/ruby_vcloud_sdk/xml/xml_templates/DeployVAppParams.xml +1 -0
  95. data/lib/ruby_vcloud_sdk/xml/xml_templates/DhcpService.xml +1 -0
  96. data/lib/ruby_vcloud_sdk/xml/xml_templates/DiskAttachOrDetachParams.xml +5 -0
  97. data/lib/ruby_vcloud_sdk/xml/xml_templates/DiskCreateParams.xml +9 -0
  98. data/lib/ruby_vcloud_sdk/xml/xml_templates/DvSwitchRecord.xml +1 -0
  99. data/lib/ruby_vcloud_sdk/xml/xml_templates/Entity.xml +1 -0
  100. data/lib/ruby_vcloud_sdk/xml/xml_templates/Error.xml +1 -0
  101. data/lib/ruby_vcloud_sdk/xml/xml_templates/EventRecord.xml +1 -0
  102. data/lib/ruby_vcloud_sdk/xml/xml_templates/ExternalNetwork.xml +1 -0
  103. data/lib/ruby_vcloud_sdk/xml/xml_templates/File.xml +1 -0
  104. data/lib/ruby_vcloud_sdk/xml/xml_templates/FirewallService.xml +1 -0
  105. data/lib/ruby_vcloud_sdk/xml/xml_templates/GeneralOrgSettings.xml +1 -0
  106. data/lib/ruby_vcloud_sdk/xml/xml_templates/Group.xml +1 -0
  107. data/lib/ruby_vcloud_sdk/xml/xml_templates/GroupRecord.xml +1 -0
  108. data/lib/ruby_vcloud_sdk/xml/xml_templates/GroupReference.xml +1 -0
  109. data/lib/ruby_vcloud_sdk/xml/xml_templates/GroupReferences.xml +1 -0
  110. data/lib/ruby_vcloud_sdk/xml/xml_templates/GuestCustomizationSection.xml +1 -0
  111. data/lib/ruby_vcloud_sdk/xml/xml_templates/HostRecord.xml +1 -0
  112. data/lib/ruby_vcloud_sdk/xml/xml_templates/HostReference.xml +1 -0
  113. data/lib/ruby_vcloud_sdk/xml/xml_templates/HostReferences.xml +1 -0
  114. data/lib/ruby_vcloud_sdk/xml/xml_templates/InstantiateOvfParams.xml +1 -0
  115. data/lib/ruby_vcloud_sdk/xml/xml_templates/InstantiateVAppTemplateParams.xml +1 -0
  116. data/lib/ruby_vcloud_sdk/xml/xml_templates/IpScope.xml +12 -0
  117. data/lib/ruby_vcloud_sdk/xml/xml_templates/IpsecVpnLocalPeer.xml +1 -0
  118. data/lib/ruby_vcloud_sdk/xml/xml_templates/IpsecVpnPeer.xml +1 -0
  119. data/lib/ruby_vcloud_sdk/xml/xml_templates/IpsecVpnRemotePeer.xml +1 -0
  120. data/lib/ruby_vcloud_sdk/xml/xml_templates/IpsecVpnService.xml +1 -0
  121. data/lib/ruby_vcloud_sdk/xml/xml_templates/IpsecVpnThirdPartyPeer.xml +1 -0
  122. data/lib/ruby_vcloud_sdk/xml/xml_templates/Item.xml +3 -0
  123. data/lib/ruby_vcloud_sdk/xml/xml_templates/ItemVcd.xml +5 -0
  124. data/lib/ruby_vcloud_sdk/xml/xml_templates/LeaseSettingsSection.xml +1 -0
  125. data/lib/ruby_vcloud_sdk/xml/xml_templates/Link.xml +1 -0
  126. data/lib/ruby_vcloud_sdk/xml/xml_templates/Media.xml +6 -0
  127. data/lib/ruby_vcloud_sdk/xml/xml_templates/MediaInsertOrEjectParams.xml +4 -0
  128. data/lib/ruby_vcloud_sdk/xml/xml_templates/MediaRecord.xml +1 -0
  129. data/lib/ruby_vcloud_sdk/xml/xml_templates/MediaReference.xml +1 -0
  130. data/lib/ruby_vcloud_sdk/xml/xml_templates/MediaReferences.xml +1 -0
  131. data/lib/ruby_vcloud_sdk/xml/xml_templates/Metadata.xml +5 -0
  132. data/lib/ruby_vcloud_sdk/xml/xml_templates/MetadataEntry.xml +7 -0
  133. data/lib/ruby_vcloud_sdk/xml/xml_templates/MetadataValue.xml +8 -0
  134. data/lib/ruby_vcloud_sdk/xml/xml_templates/NatService.xml +1 -0
  135. data/lib/ruby_vcloud_sdk/xml/xml_templates/Network.xml +4 -0
  136. data/lib/ruby_vcloud_sdk/xml/xml_templates/NetworkAssignment.xml +1 -0
  137. data/lib/ruby_vcloud_sdk/xml/xml_templates/NetworkConfig.xml +21 -0
  138. data/lib/ruby_vcloud_sdk/xml/xml_templates/NetworkConfigSection.xml +1 -0
  139. data/lib/ruby_vcloud_sdk/xml/xml_templates/NetworkConnection.xml +11 -0
  140. data/lib/ruby_vcloud_sdk/xml/xml_templates/NetworkConnectionSection.xml +1 -0
  141. data/lib/ruby_vcloud_sdk/xml/xml_templates/NetworkPoolRecord.xml +1 -0
  142. data/lib/ruby_vcloud_sdk/xml/xml_templates/NetworkPoolReference.xml +1 -0
  143. data/lib/ruby_vcloud_sdk/xml/xml_templates/NetworkPoolReferences.xml +1 -0
  144. data/lib/ruby_vcloud_sdk/xml/xml_templates/NetworkRecord.xml +1 -0
  145. data/lib/ruby_vcloud_sdk/xml/xml_templates/NetworkReference.xml +1 -0
  146. data/lib/ruby_vcloud_sdk/xml/xml_templates/NetworkReferences.xml +1 -0
  147. data/lib/ruby_vcloud_sdk/xml/xml_templates/NetworkService.xml +1 -0
  148. data/lib/ruby_vcloud_sdk/xml/xml_templates/Org.xml +1 -0
  149. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgEmailSettings.xml +1 -0
  150. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgList.xml +1 -0
  151. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgNetwork.xml +1 -0
  152. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgNetworkRecord.xml +1 -0
  153. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgNetworkReference.xml +1 -0
  154. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgNetworkReferences.xml +1 -0
  155. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgPasswordPolicySettings.xml +1 -0
  156. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgRecord.xml +1 -0
  157. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgReference.xml +1 -0
  158. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgReferences.xml +1 -0
  159. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgSettings.xml +1 -0
  160. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgVAppTemplateLeaseSettings.xml +1 -0
  161. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgVdcNetwork.xml +1 -0
  162. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgVdcRecord.xml +1 -0
  163. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgVdcReference.xml +1 -0
  164. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgVdcReferences.xml +1 -0
  165. data/lib/ruby_vcloud_sdk/xml/xml_templates/OrgVdcResourcePoolRelationRecord.xml +1 -0
  166. data/lib/ruby_vcloud_sdk/xml/xml_templates/Owner.xml +1 -0
  167. data/lib/ruby_vcloud_sdk/xml/xml_templates/PortgroupRecord.xml +1 -0
  168. data/lib/ruby_vcloud_sdk/xml/xml_templates/ProductSectionList.xml +1 -0
  169. data/lib/ruby_vcloud_sdk/xml/xml_templates/ProviderVdc.xml +1 -0
  170. data/lib/ruby_vcloud_sdk/xml/xml_templates/ProviderVdcResourcePoolRelationRecord.xml +1 -0
  171. data/lib/ruby_vcloud_sdk/xml/xml_templates/PublishCatalogParams.xml +1 -0
  172. data/lib/ruby_vcloud_sdk/xml/xml_templates/QueryList.xml +1 -0
  173. data/lib/ruby_vcloud_sdk/xml/xml_templates/QueryResultRecords.xml +1 -0
  174. data/lib/ruby_vcloud_sdk/xml/xml_templates/RasdItemsList.xml +1 -0
  175. data/lib/ruby_vcloud_sdk/xml/xml_templates/RecomposeVAppParams.xml +1 -0
  176. data/lib/ruby_vcloud_sdk/xml/xml_templates/Record.xml +1 -0
  177. data/lib/ruby_vcloud_sdk/xml/xml_templates/Reference.xml +1 -0
  178. data/lib/ruby_vcloud_sdk/xml/xml_templates/References.xml +1 -0
  179. data/lib/ruby_vcloud_sdk/xml/xml_templates/RelocateParams.xml +1 -0
  180. data/lib/ruby_vcloud_sdk/xml/xml_templates/ResourceEntity.xml +1 -0
  181. data/lib/ruby_vcloud_sdk/xml/xml_templates/ResourcePoolRecord.xml +1 -0
  182. data/lib/ruby_vcloud_sdk/xml/xml_templates/Right.xml +1 -0
  183. data/lib/ruby_vcloud_sdk/xml/xml_templates/RightRecord.xml +1 -0
  184. data/lib/ruby_vcloud_sdk/xml/xml_templates/RightReference.xml +1 -0
  185. data/lib/ruby_vcloud_sdk/xml/xml_templates/RightReferences.xml +1 -0
  186. data/lib/ruby_vcloud_sdk/xml/xml_templates/Role.xml +1 -0
  187. data/lib/ruby_vcloud_sdk/xml/xml_templates/RoleRecord.xml +1 -0
  188. data/lib/ruby_vcloud_sdk/xml/xml_templates/RoleReference.xml +1 -0
  189. data/lib/ruby_vcloud_sdk/xml/xml_templates/RoleReferences.xml +1 -0
  190. data/lib/ruby_vcloud_sdk/xml/xml_templates/RuntimeInfoSection.xml +1 -0
  191. data/lib/ruby_vcloud_sdk/xml/xml_templates/ScreenTicket.xml +1 -0
  192. data/lib/ruby_vcloud_sdk/xml/xml_templates/Session.xml +1 -0
  193. data/lib/ruby_vcloud_sdk/xml/xml_templates/ShadowVMReferences.xml +1 -0
  194. data/lib/ruby_vcloud_sdk/xml/xml_templates/StaticRoutingService.xml +1 -0
  195. data/lib/ruby_vcloud_sdk/xml/xml_templates/StrandedUserRecord.xml +1 -0
  196. data/lib/ruby_vcloud_sdk/xml/xml_templates/Task.xml +0 -0
  197. data/lib/ruby_vcloud_sdk/xml/xml_templates/TaskRecord.xml +1 -0
  198. data/lib/ruby_vcloud_sdk/xml/xml_templates/TaskReference.xml +1 -0
  199. data/lib/ruby_vcloud_sdk/xml/xml_templates/TaskReferences.xml +1 -0
  200. data/lib/ruby_vcloud_sdk/xml/xml_templates/TasksList.xml +1 -0
  201. data/lib/ruby_vcloud_sdk/xml/xml_templates/UndeployVAppParams.xml +1 -0
  202. data/lib/ruby_vcloud_sdk/xml/xml_templates/UploadVAppTemplateParams.xml +1 -0
  203. data/lib/ruby_vcloud_sdk/xml/xml_templates/User.xml +1 -0
  204. data/lib/ruby_vcloud_sdk/xml/xml_templates/UserRecord.xml +1 -0
  205. data/lib/ruby_vcloud_sdk/xml/xml_templates/UserReference.xml +1 -0
  206. data/lib/ruby_vcloud_sdk/xml/xml_templates/UserReferences.xml +1 -0
  207. data/lib/ruby_vcloud_sdk/xml/xml_templates/VApp.xml +1 -0
  208. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppLeaseSettings.xml +1 -0
  209. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppNetwork.xml +1 -0
  210. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppNetworkRecord.xml +1 -0
  211. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppNetworkReference.xml +1 -0
  212. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppNetworkReferences.xml +1 -0
  213. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppOrgNetworkRelationRecord.xml +1 -0
  214. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppOrgNetworkRelationReference.xml +1 -0
  215. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppOrgNetworkRelationReferences.xml +1 -0
  216. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppRecord.xml +1 -0
  217. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppReference.xml +1 -0
  218. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppReferences.xml +1 -0
  219. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppTemplate.xml +1 -0
  220. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppTemplateRecord.xml +1 -0
  221. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppTemplateReference.xml +1 -0
  222. data/lib/ruby_vcloud_sdk/xml/xml_templates/VAppTemplateReferences.xml +1 -0
  223. data/lib/ruby_vcloud_sdk/xml/xml_templates/VCloud.xml +1 -0
  224. data/lib/ruby_vcloud_sdk/xml/xml_templates/VMRecord.xml +1 -0
  225. data/lib/ruby_vcloud_sdk/xml/xml_templates/VMReference.xml +1 -0
  226. data/lib/ruby_vcloud_sdk/xml/xml_templates/VMReferences.xml +1 -0
  227. data/lib/ruby_vcloud_sdk/xml/xml_templates/VMWProviderVdcRecord.xml +1 -0
  228. data/lib/ruby_vcloud_sdk/xml/xml_templates/VMWProviderVdcReference.xml +1 -0
  229. data/lib/ruby_vcloud_sdk/xml/xml_templates/VMWProviderVdcReferences.xml +1 -0
  230. data/lib/ruby_vcloud_sdk/xml/xml_templates/Vdc.xml +1 -0
  231. data/lib/ruby_vcloud_sdk/xml/xml_templates/VdcReferences.xml +1 -0
  232. data/lib/ruby_vcloud_sdk/xml/xml_templates/VdcStorageProfile.xml +1 -0
  233. data/lib/ruby_vcloud_sdk/xml/xml_templates/VirtualCenterRecord.xml +1 -0
  234. data/lib/ruby_vcloud_sdk/xml/xml_templates/VirtualCenterReference.xml +1 -0
  235. data/lib/ruby_vcloud_sdk/xml/xml_templates/VirtualCenterReferences.xml +1 -0
  236. data/lib/ruby_vcloud_sdk/xml/xml_templates/Vm.xml +1 -0
  237. data/lib/ruby_vcloud_sdk/xml/xml_templates/VmPendingQuestion.xml +1 -0
  238. data/lib/ruby_vcloud_sdk/xml/xml_templates/VmQuestionAnswer.xml +1 -0
  239. data/lib/ruby_vcloud_sdk/xml/xml_templates/generate_dictionary.rb +8 -0
  240. data/spec/assets/admin_org_response.xml +75 -0
  241. data/spec/assets/catalog_add_item_response.xml +8 -0
  242. data/spec/assets/catalog_add_vapp_request.xml +5 -0
  243. data/spec/assets/catalog_item_added_response.xml +19 -0
  244. data/spec/assets/catalog_response.xml +19 -0
  245. data/spec/assets/existing_media_busy_response.xml +19 -0
  246. data/spec/assets/existing_media_catalog_item.xml +8 -0
  247. data/spec/assets/existing_media_delete_task_done.xml +6 -0
  248. data/spec/assets/existing_media_done_response.xml +11 -0
  249. data/spec/assets/existing_vapp_resolver_response.xml +3 -0
  250. data/spec/assets/existing_vapp_template_catalog_resolver_response.xml +3 -0
  251. data/spec/assets/existing_vapp_template_instantiate_response.xml +20 -0
  252. data/spec/assets/existing_vapp_template_instantiate_task_error_response.xml +7 -0
  253. data/spec/assets/existing_vapp_template_instantiate_task_start_response.xml +7 -0
  254. data/spec/assets/existing_vapp_template_instantiate_task_success_response.xml +7 -0
  255. data/spec/assets/existing_vapp_template_item_response.xml +8 -0
  256. data/spec/assets/existing_vapp_template_ready_response.xml +79 -0
  257. data/spec/assets/finalize_upload_task_done_response.xml +7 -0
  258. data/spec/assets/finalize_upload_task_response.xml +7 -0
  259. data/spec/assets/indy_disk_attach_request.xml +3 -0
  260. data/spec/assets/indy_disk_attach_task.xml +6 -0
  261. data/spec/assets/indy_disk_attach_task_error.xml +6 -0
  262. data/spec/assets/indy_disk_create_error.xml +1 -0
  263. data/spec/assets/indy_disk_create_request.xml +4 -0
  264. data/spec/assets/indy_disk_create_response.xml +19 -0
  265. data/spec/assets/indy_disk_delete_task.xml +6 -0
  266. data/spec/assets/indy_disk_detach_request.xml +3 -0
  267. data/spec/assets/indy_disk_detach_task.xml +6 -0
  268. data/spec/assets/indy_disk_response.xml +11 -0
  269. data/spec/assets/instantiated_suspended_vapp_response.xml +209 -0
  270. data/spec/assets/instantiated_vapp_delelete_done_task.xml +5 -0
  271. data/spec/assets/instantiated_vapp_delelete_running_task.xml +6 -0
  272. data/spec/assets/instantiated_vapp_network_config_add_network_request.xml +36 -0
  273. data/spec/assets/instantiated_vapp_network_config_modify_network_task_success.xml +6 -0
  274. data/spec/assets/instantiated_vapp_network_config_remove_network_request.xml +6 -0
  275. data/spec/assets/instantiated_vapp_network_config_section_response.xml +17 -0
  276. data/spec/assets/instantiated_vapp_off_response.xml +206 -0
  277. data/spec/assets/instantiated_vapp_on_response.xml +205 -0
  278. data/spec/assets/instantiated_vapp_power_task_running.xml +6 -0
  279. data/spec/assets/instantiated_vapp_power_task_success.xml +6 -0
  280. data/spec/assets/instantiated_vapp_response.xml +205 -0
  281. data/spec/assets/instantiated_vm_change_task_running.xml +6 -0
  282. data/spec/assets/instantiated_vm_change_task_success.xml +6 -0
  283. data/spec/assets/instantiated_vm_cpu_response.xml +11 -0
  284. data/spec/assets/instantiated_vm_insert_media_task_done.xml +6 -0
  285. data/spec/assets/instantiated_vm_memory_response.xml +11 -0
  286. data/spec/assets/instantiated_vm_modify_task_running.xml +6 -0
  287. data/spec/assets/instantiated_vm_modify_task_success.xml +5 -0
  288. data/spec/assets/instantiated_vm_network_section_response.xml +11 -0
  289. data/spec/assets/instantiated_vm_response.xml +149 -0
  290. data/spec/assets/media_add_to_catalog_request.xml +5 -0
  291. data/spec/assets/media_add_to_catalog_response.xml +8 -0
  292. data/spec/assets/media_delete_task_done.xml +6 -0
  293. data/spec/assets/media_upload_pending_response.xml +13 -0
  294. data/spec/assets/media_upload_request.xml +2 -0
  295. data/spec/assets/metadata_set_request.xml +3 -0
  296. data/spec/assets/metadata_set_task_done.xml +6 -0
  297. data/spec/assets/org_network_response.xml +22 -0
  298. data/spec/assets/reconfigure_vm_request.xml +133 -0
  299. data/spec/assets/reconfigure_vm_task.xml +8 -0
  300. data/spec/assets/session.xml +7 -0
  301. data/spec/assets/test-config.yml +38 -0
  302. data/spec/assets/undeploy_params.xml +1 -0
  303. data/spec/assets/vapp_template_catalog_resolver_response.xml +3 -0
  304. data/spec/assets/vapp_template_delelete_done_task.xml +5 -0
  305. data/spec/assets/vapp_template_delelete_running_task.xml +6 -0
  306. data/spec/assets/vapp_template_instantiate_request.xml +8 -0
  307. data/spec/assets/vapp_template_instantiate_with_locality_request.xml +14 -0
  308. data/spec/assets/vapp_template_no_disk_response.xml +27 -0
  309. data/spec/assets/vapp_template_ready_response.xml +79 -0
  310. data/spec/assets/vapp_template_upload_complete.xml +28 -0
  311. data/spec/assets/vapp_template_upload_failed.xml +28 -0
  312. data/spec/assets/vapp_template_upload_request.xml +4 -0
  313. data/spec/assets/vapp_template_upload_response.xml +25 -0
  314. data/spec/assets/vcloud_response.xml +56 -0
  315. data/spec/assets/vdc_response.xml +57 -0
  316. data/spec/spec_helper.rb +107 -0
  317. data/spec/unit/client_response.rb +700 -0
  318. data/spec/unit/client_spec.rb +1152 -0
  319. metadata +498 -0
@@ -0,0 +1,28 @@
1
+ <VAppTemplate xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" ovfDescriptorUploaded="true" goldMaster="false" status="0" name="%s" id="urn:vcloud:vapptemplate:%s" type="application/vnd.vmware.vcloud.vAppTemplate+xml" href="%s/api/vAppTemplate/vappTemplate-%s" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.dmtf.org/ovf/envelope/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsd http://www.vmware.com/vcloud/v1.5 %s/api/v1.5/schema/master.xsd">
2
+ <Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml" href="%s/api/vdc/%s"/>
3
+ <Link rel="remove" href="%s/api/vAppTemplate/vappTemplate-%s"/>
4
+ <Description/>
5
+ <Tasks>
6
+ <Task status="error" startTime="2011-08-08T11:13:07.757-07:00" operationName="vdcUploadOvfContents" operation="Finalizing upload of Virtual Application Template %s(%s)" expiryTime="2011-11-06T11:13:07.757-08:00" name="task" id="urn:vcloud:task:91bd4b57-598e-4753-8274-1172c7195468" type="application/vnd.vmware.vcloud.task+xml" href="%s/api/task/91bd4b57-598e-4753-8274-1172c7195468">
7
+ <Link rel="task:cancel" href="%s/api/task/91bd4b57-598e-4753-8274-1172c7195468/action/cancel"/>
8
+ <Owner type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="%s" href="%s/api/vAppTemplate/vappTemplate-%s"/>
9
+ <User type="application/vnd.vmware.admin.user+xml" name="%s" href="%s/api/admin/user/42cbe98d-48da-4f5d-944e-596843a9fcb5"/>
10
+ <Organization type="application/vnd.vmware.vcloud.org+xml" name="%s" href="%s/api/org/b689c06e-1de0-4fd1-a5a3-050c479546ac"/>
11
+ <Progress>1</Progress>
12
+ </Task>
13
+ </Tasks>
14
+ <Owner type="application/vnd.vmware.vcloud.owner+xml">
15
+ <User type="application/vnd.vmware.admin.user+xml" name="%s" href="%s/api/admin/user/42cbe98d-48da-4f5d-944e-596843a9fcb5"/>
16
+ </Owner>
17
+ <Children/>
18
+ <LeaseSettingsSection type="application/vnd.vmware.vcloud.leaseSettingsSection+xml" href="%s/api/vAppTemplate/vappTemplate-%s/leaseSettingsSection/" ovf:required="false">
19
+ <ovf:Info>Lease settings section</ovf:Info>
20
+ <Link rel="edit" type="application/vnd.vmware.vcloud.leaseSettingsSection+xml" href="%s/api/vAppTemplate/vappTemplate-%s/leaseSettingsSection/"/>
21
+ <StorageLeaseInSeconds>7776000</StorageLeaseInSeconds>
22
+ <StorageLeaseExpiration>2011-11-06T10:12:46.547-08:00</StorageLeaseExpiration>
23
+ </LeaseSettingsSection>
24
+ <CustomizationSection type="application/vnd.vmware.vcloud.customizationSection+xml" href="%s/api/vAppTemplate/vappTemplate-%s/customizationSection/" ovf:required="false">
25
+ <ovf:Info>VApp template customization section</ovf:Info>
26
+ <CustomizeOnInstantiate>true</CustomizeOnInstantiate>
27
+ </CustomizationSection>
28
+ </VAppTemplate>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <ns7:UploadVAppTemplateParams xmlns="http://www.vmware.com/vcloud/extension/v1" xmlns:ns2="http://www.vmware.com/vcloud/v1" xmlns:ns3="http://schemas.dmtf.org/ovf/envelope/1" xmlns:ns4="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:ns5="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:ns6="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ns7="http://www.vmware.com/vcloud/v1.5" xmlns:ns8="http://schemas.dmtf.org/ovf/environment/1" xmlns:ns9="http://www.vmware.com/vcloud/extension/v1.5" xmlns:ns10="http://www.vmware.com/vcloud/versions" transferFormat="" manifestRequired="false" name="%s">
3
+ <ns7:Description/>
4
+ </ns7:UploadVAppTemplateParams>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <VAppTemplate xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" ovfDescriptorUploaded="false" goldMaster="false" status="0" name="%s" id="urn:vcloud:vapptemplate:c032c1a3-21a2-4ac2-8e98-0cc29229e10c" type="application/vnd.vmware.vcloud.vAppTemplate+xml" href="%s/api/vAppTemplate/vappTemplate-c032c1a3-21a2-4ac2-8e98-0cc29229e10c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.dmtf.org/ovf/envelope/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsd http://www.vmware.com/vcloud/v1.5 %s/api/v1.5/schema/master.xsd">
3
+ <Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml" href="%s/api/vdc/%s"/>
4
+ <Link rel="remove" href="%s/api/vAppTemplate/vappTemplate-c032c1a3-21a2-4ac2-8e98-0cc29229e10c"/>
5
+ <Description/>
6
+ <Files>
7
+ <File size="-1" bytesTransferred="0" name="descriptor.ovf">
8
+ <Link rel="upload:default" href="%s/transfer/22467867-7ada-4a55-a9cb-e05aa30a4f96/descriptor.ovf"/>
9
+ </File>
10
+ </Files>
11
+ <Owner type="application/vnd.vmware.vcloud.owner+xml">
12
+ <User type="application/vnd.vmware.admin.user+xml" name="%s" href="%s/api/admin/user/42cbe98d-48da-4f5d-944e-596843a9fcb5"/>
13
+ </Owner>
14
+ <Children/>
15
+ <LeaseSettingsSection type="application/vnd.vmware.vcloud.leaseSettingsSection+xml" href="%s/api/vAppTemplate/vappTemplate-c032c1a3-21a2-4ac2-8e98-0cc29229e10c/leaseSettingsSection/" ovf:required="false">
16
+ <ovf:Info>Lease settings section</ovf:Info>
17
+ <Link rel="edit" type="application/vnd.vmware.vcloud.leaseSettingsSection+xml" href="%s/api/vAppTemplate/vappTemplate-c032c1a3-21a2-4ac2-8e98-0cc29229e10c/leaseSettingsSection/"/>
18
+ <StorageLeaseInSeconds>7776000</StorageLeaseInSeconds>
19
+ <StorageLeaseExpiration>2011-11-03T13:39:00.977-07:00</StorageLeaseExpiration>
20
+ </LeaseSettingsSection>
21
+ <CustomizationSection type="application/vnd.vmware.vcloud.customizationSection+xml" href="%s/api/vAppTemplate/vappTemplate-c032c1a3-21a2-4ac2-8e98-0cc29229e10c/customizationSection/" ovf:required="false">
22
+ <ovf:Info>VApp template customization section</ovf:Info>
23
+ <CustomizeOnInstantiate>false</CustomizeOnInstantiate>
24
+ </CustomizationSection>
25
+ </VAppTemplate>
@@ -0,0 +1,56 @@
1
+ <VCloud xmlns="http://www.vmware.com/vcloud/v1.5" name="VMware vCloud Director" type="application/vnd.vmware.admin.vcloud+xml" href="%s/api/admin/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 %s/api/v1.5/schema/master.xsd">
2
+ <Description>0.0.1.123456 Fri Jan 08 12:15:16 PST 2010</Description>
3
+ <OrganizationReferences>
4
+ <OrganizationReference type="application/vnd.vmware.admin.organization+xml" name="%s" href="%s/api/admin/org/b689c06e-1de0-4fd1-a5a3-050c479546ac"/>
5
+ </OrganizationReferences>
6
+ <RightReferences>
7
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Create / Reconfigure" href="%s/api/admin/right/11"/>
8
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Delete" href="%s/api/admin/right/12"/>
9
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Edit Properties" href="%s/api/admin/right/13"/>
10
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Power Operations" href="%s/api/admin/right/18"/>
11
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Sharing" href="%s/api/admin/right/20"/>
12
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Copy" href="%s/api/admin/right/21"/>
13
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Use Console" href="%s/api/admin/right/22"/>
14
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Change Owner" href="%s/api/admin/right/24"/>
15
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Edit VM Properties" href="%s/api/admin/right/31"/>
16
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Edit VM Memory" href="%s/api/admin/right/32"/>
17
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Edit VM CPU" href="%s/api/admin/right/33"/>
18
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Edit VM Network" href="%s/api/admin/right/34"/>
19
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Edit VM Hard Disk" href="%s/api/admin/right/35"/>
20
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: Manage VM Password Settings" href="%s/api/admin/right/36"/>
21
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Catalog: Create / Delete a Catalog" href="%s/api/admin/right/71"/>
22
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Catalog: Edit Properties" href="%s/api/admin/right/73"/>
23
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Catalog: Add vApp from My Cloud" href="%s/api/admin/right/74"/>
24
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Catalog: Publish" href="%s/api/admin/right/76"/>
25
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Catalog: Sharing" href="%s/api/admin/right/77"/>
26
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Catalog: View Private and Shared Catalogs" href="%s/api/admin/right/78"/>
27
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Catalog: View Published Catalogs" href="%s/api/admin/right/79"/>
28
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Catalog: Change Owner" href="%s/api/admin/right/80"/>
29
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp Template / Media: Edit" href="%s/api/admin/right/102"/>
30
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp Template / Media: Create / Upload" href="%s/api/admin/right/103"/>
31
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp Template: Download" href="%s/api/admin/right/104"/>
32
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp Template / Media: Copy" href="%s/api/admin/right/105"/>
33
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp Template / Media: View" href="%s/api/admin/right/106"/>
34
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="vApp Template: Checkout" href="%s/api/admin/right/107"/>
35
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Organization: Edit Properties" href="%s/api/admin/right/201"/>
36
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Organization: Edit SMTP Settings" href="%s/api/admin/right/202"/>
37
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Organization: Edit Quotas Policy" href="%s/api/admin/right/203"/>
38
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Organization: View" href="%s/api/admin/right/204"/>
39
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Organization Network: Edit Properties" href="%s/api/admin/right/207"/>
40
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Organization Network: View" href="%s/api/admin/right/208"/>
41
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Organization: Edit Leases Policy" href="%s/api/admin/right/209"/>
42
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Organization: Edit Password Policy" href="%s/api/admin/right/210"/>
43
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Organization vDC: View" href="%s/api/admin/right/254"/>
44
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="Group / User: View" href="%s/api/admin/right/304"/>
45
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="General: Send Notification" href="%s/api/admin/right/382"/>
46
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="General: Administrator Control" href="%s/api/admin/right/383"/>
47
+ <RightReference type="application/vnd.vmware.admin.right+xml" name="General: Administrator View" href="%s/api/admin/right/384"/>
48
+ </RightReferences>
49
+ <RoleReferences>
50
+ <RoleReference type="application/vnd.vmware.admin.role+xml" name="Organization Administrator" href="%s/api/admin/role/a08a8798-7d9b-34d6-8dad-48c7182c5f66"/>
51
+ <RoleReference type="application/vnd.vmware.admin.role+xml" name="Catalog Author" href="%s/api/admin/role/9de271ec-be55-31e8-8d56-2a097e4e3856"/>
52
+ <RoleReference type="application/vnd.vmware.admin.role+xml" name="vApp Author" href="%s/api/admin/role/1bf4457f-a253-3cf1-b163-f319f1a31802"/>
53
+ <RoleReference type="application/vnd.vmware.admin.role+xml" name="vApp User" href="%s/api/admin/role/ff1e0c91-1288-3664-82b7-a6fa303af4d1"/>
54
+ <RoleReference type="application/vnd.vmware.admin.role+xml" name="Console Access Only" href="%s/api/admin/role/ae910740-cbde-34ae-9d84-ef5c53880afe"/>
55
+ </RoleReferences>
56
+ </VCloud>
@@ -0,0 +1,57 @@
1
+ <Vdc xmlns="http://www.vmware.com/vcloud/v1.5" status="1" name="%s" id="urn:vcloud:vdc:%s" type="application/vnd.vmware.vcloud.vdc+xml" href="%s/api/vdc/%s" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 %s/api/v1.5/schema/master.xsd">
2
+ <Link rel="up" type="application/vnd.vmware.vcloud.org+xml" href="%s/api/org/b689c06e-1de0-4fd1-a5a3-050c479546ac"/>
3
+ <Link rel="down" type="application/vnd.vmware.vcloud.metadata+xml" href="%s/api/vdc/%s/metadata"/>
4
+ <Link rel="add" type="application/vnd.vmware.vcloud.uploadVAppTemplateParams+xml" href="%s/api/vdc/%s/action/uploadVAppTemplate"/>
5
+ <Link rel="add" type="application/vnd.vmware.vcloud.media+xml" href="%s"/>
6
+ <Link rel="add" type="application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml" href="%s/api/vdc/%s/action/instantiateVAppTemplate"/>
7
+ <Link rel="add" type="application/vnd.vmware.vcloud.cloneVAppParams+xml" href="%s/api/vdc/%s/action/cloneVApp"/>
8
+ <Link rel="add" type="application/vnd.vmware.vcloud.cloneVAppTemplateParams+xml" href="%s/api/vdc/%s/action/cloneVAppTemplate"/>
9
+ <Link rel="add" type="application/vnd.vmware.vcloud.cloneMediaParams+xml" href="%s/api/vdc/%s/action/cloneMedia"/>
10
+ <Link rel="add" type="application/vnd.vmware.vcloud.captureVAppParams+xml" href="%s/api/vdc/%s/action/captureVApp"/>
11
+ <Link rel="add" type="application/vnd.vmware.vcloud.composeVAppParams+xml" href="%s/api/vdc/%s/action/composeVApp"/>
12
+ <Link rel="add" type="application/vnd.vmware.vcloud.diskCreateParams+xml" href="%s"/>
13
+ <Description/>
14
+ <AllocationModel>AllocationVApp</AllocationModel>
15
+ <StorageCapacity>
16
+ <Units>MB</Units>
17
+ <Allocated>0</Allocated>
18
+ <Limit>0</Limit>
19
+ <Used>4800</Used>
20
+ <Overhead>0</Overhead>
21
+ </StorageCapacity>
22
+ <ComputeCapacity>
23
+ <Cpu>
24
+ <Units>MHz</Units>
25
+ <Allocated>0</Allocated>
26
+ <Limit>0</Limit>
27
+ <Used>0</Used>
28
+ <Overhead>0</Overhead>
29
+ </Cpu>
30
+ <Memory>
31
+ <Units>MB</Units>
32
+ <Allocated>0</Allocated>
33
+ <Limit>0</Limit>
34
+ <Used>0</Used>
35
+ <Overhead>0</Overhead>
36
+ </Memory>
37
+ </ComputeCapacity>
38
+ <ResourceEntities>
39
+ <ResourceEntity type="application/vnd.vmware.vcloud.vApp+xml" name="%s" href="%s/api/vApp/vapp-%s"/>
40
+ <ResourceEntity type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="%s" href="%s/api/vAppTemplate/vappTemplate-%s"/>
41
+ <ResourceEntity type="application/vnd.vmware.vcloud.media+xml" name="%s" href="%s/api/vApp/vapp-%s"/>
42
+ <ResourceEntity type="application/vnd.vmware.vcloud.disk+xml" name="%s" href="%s"/>
43
+ </ResourceEntities>
44
+ <AvailableNetworks>
45
+ <Network type="application/vnd.vmware.vcloud.network+xml" name="%s" href="%s"/>
46
+ </AvailableNetworks>
47
+ <Capabilities>
48
+ <SupportedHardwareVersions>
49
+ <SupportedHardwareVersion>vmx-04</SupportedHardwareVersion>
50
+ <SupportedHardwareVersion>vmx-07</SupportedHardwareVersion>
51
+ </SupportedHardwareVersions>
52
+ </Capabilities>
53
+ <NicQuota>0</NicQuota>
54
+ <NetworkQuota>1024</NetworkQuota>
55
+ <VmQuota>100</VmQuota>
56
+ <IsEnabled>true</IsEnabled>
57
+ </Vdc>
@@ -0,0 +1,107 @@
1
+ $:.unshift(File.expand_path("..", __FILE__))
2
+ $:.unshift(File.join(File.dirname(__FILE__), "."))
3
+ $:.unshift(File.join(File.dirname(__FILE__), "unit"))
4
+
5
+ require "yaml"
6
+ require "ruby_vcloud_sdk"
7
+
8
+
9
+ module VCloudSdk
10
+ module Test
11
+
12
+ class << self
13
+ def spec_asset(filename)
14
+ File.expand_path(File.join(File.dirname(__FILE__), "assets", filename))
15
+ end
16
+
17
+ def test_configuration
18
+ @@test_config ||= YAML.load_file(spec_asset("test-config.yml"))
19
+ end
20
+
21
+ def properties
22
+ test_configuration["properties"]
23
+ end
24
+
25
+ def get_vcd_settings
26
+ vcds = properties["vcds"]
27
+ raise "Invalid number of VCDs" unless vcds.size == 1
28
+ vcds[0]
29
+ end
30
+
31
+ def vcd_settings
32
+ @@settings ||= get_vcd_settings
33
+ end
34
+
35
+ def generate_unique_name
36
+ UUIDTools::UUID.random_create.to_s
37
+ end
38
+
39
+ def compare_xml(a, b)
40
+ a.diff(b) do |change, node|
41
+ # " " Means no difference. "+" means addition and "-" means deletion.
42
+ return false if change != " " && node.to_s.strip().length != 0
43
+ end
44
+ true
45
+ end
46
+
47
+ def rest_logger(logger)
48
+ rest_log_filename = File.join(File.dirname(
49
+ logger.instance_eval { @logdev }.dev.path), "rest")
50
+ log_file = File.open(rest_log_filename, "w")
51
+ log_file.sync = true
52
+ rest_logger = Logger.new(log_file || STDOUT)
53
+ rest_logger.level = logger.level
54
+ rest_logger.formatter = logger.formatter
55
+ def rest_logger.<<(str)
56
+ self.debug(str.chomp)
57
+ end
58
+ rest_logger
59
+ end
60
+ end
61
+
62
+ end
63
+
64
+ module Xml
65
+
66
+ class Wrapper
67
+ def ==(other)
68
+ @root.diff(other.node) do |change, node|
69
+ # " " Means no difference, "+" means addition and "-" means deletion
70
+ return false if change != " " && node.to_s.strip().length != 0
71
+ end
72
+ true
73
+ end
74
+ end
75
+
76
+ end
77
+
78
+ class Config
79
+ class << self
80
+ def logger()
81
+ logger = Logger.new(VCloudSdk::Test::properties["log_file"])
82
+ logger.level = Logger::DEBUG
83
+ logger
84
+ end
85
+ end
86
+ end
87
+
88
+ end
89
+
90
+
91
+
92
+ module Kernel
93
+
94
+ def with_thread_name(name)
95
+ old_name = Thread.current[:name]
96
+ Thread.current[:name] = name
97
+ yield
98
+ ensure
99
+ Thread.current[:name] = old_name
100
+ end
101
+
102
+ end
103
+
104
+ RSpec.configure do |c|
105
+ c.treat_symbols_as_metadata_keys_with_true_values = true # for RSpec-3
106
+ c.filter_run :all
107
+ end
@@ -0,0 +1,700 @@
1
+ module VCloudSdk
2
+ module Test
3
+ module Response
4
+ vcd = VCloudSdk::Test::vcd_settings
5
+
6
+ USERNAME = vcd["user"]
7
+ ORGANIZATION = vcd["entities"]["organization"]
8
+ OVDC = vcd["entities"]["virtual_datacenter"]
9
+ VAPP_CATALOG_NAME = vcd["entities"]["vapp_catalog"]
10
+ CATALOG_ID = "cfab326c-ab71-445c-bc0b-abf15239de8b"
11
+ VDC_ID = "a974dae0-d10c-4f7c-9f4f-4bdaf7826a3a"
12
+ URL = vcd["url"]
13
+ URLN = URI.parse(vcd["url"]).normalize.to_s
14
+ VAPP_TEMPLATE_NAME = "test_vapp_template"
15
+ EXISTING_VAPP_TEMPLATE_NAME = "existing_template"
16
+ EXISTING_VAPP_TEMPLATE_ID = "085f0844-9feb-43bd-b1df-3260218f5cb6"
17
+ EXISTING_VAPP_NAME = "existing_vapp"
18
+ EXISTING_VAPP_ID = "085f0844-9feb-43bd-b1df-3260218f5cb2"
19
+ EXISTING_VAPP_URN = "urn:vcloud:vapp:085f0844-9feb-43bd-b1df-3260218f5cb2"
20
+ EXISTING_VAPP_RESOLVER_URL = "#{URL}/api/entity/#{EXISTING_VAPP_URN}"
21
+ EXISTING_VAPP_TEMPLATE_CATALOG_ITEM_ID = "521f9fc3-410f-433c-b877-1d072478c3c5"
22
+ INSTANTIATED_VM_ID = "048e8cd8-adc8-49c6-80ee-a430ecf8f246"
23
+ CPU = "2"
24
+ MEMORY = "128"
25
+ VM_NAME = "vm1"
26
+ VAPP_TEMPLATE_VM_URL = "#{URL}/api/vAppTemplate/vm-49acc996-0ee4-4b36-a5b5-822f3042e26c"
27
+ CHANGED_VM_NAME = "changed_vm1"
28
+ CHANGED_VM_DESCRIPTION = "changed_description"
29
+ CHANGED_VM_CPU = "3"
30
+ CHANGED_VM_MEMORY = "712"
31
+ CHANGED_VM_DISK = "3072"
32
+ MEDIA_NAME = "test_media"
33
+
34
+ EXISTING_MEDIA_NAME = "existing_test_media"
35
+ EXISTING_MEDIA_ID = "abcf0844-9feb-43bd-b1df-3262218f5cb2"
36
+ EXISTING_MEDIA_CATALOG_ID = "cacef844-9feb-43bd-b1df-3262218f5cb2"
37
+
38
+ VAPP_ID = "c032c1a3-21a2-4ac2-8e98-0cc29229e10c"
39
+ VM1_ID = "49acc996-0ee4-4b36-a5b5-822f3042e26c"
40
+ LOGIN_LINK = "#{URL}/api/sessions"
41
+ VAPP_NAME = "test_vapp"
42
+
43
+ ORG_NETWORK_NAME = "vcap_net"
44
+ ORG_NETWORK_ID = "0ae50dfd-a5eb-44e9-9c26-5c1a00a3e1a4"
45
+ VAPP_NETWORK_NAME = "vcap_net"
46
+
47
+ INDY_DISK_NAME = "indy_disk_1"
48
+ INDY_DISK_ID = "447e14ee-52a7-45ef-93ba-666f7879490d"
49
+ INDY_DISK_URL = "#{URL}/api/disk/#{INDY_DISK_ID}"
50
+ INDY_DISK_SIZE = 200
51
+ SCSI_CONTROLLER_ID = "2"
52
+
53
+
54
+ SESSION = (File.read(Test.spec_asset("session.xml")) %
55
+ [USERNAME, ORGANIZATION, URL, URL, URL, URL, URL]).strip
56
+
57
+ ADMIN_VCLOUD_LINK = "#{URL}/api/admin/"
58
+
59
+ VCLOUD_RESPONSE = (File.read(Test.spec_asset("vcloud_response.xml")) %
60
+ [URL, URL, ORGANIZATION, URL, URL, URL, URL, URL, URL, URL,
61
+ URL, URL, URL, URL, URL, URL, URL, URL, URL, URL,
62
+ URL, URL, URL, URL, URL, URL, URL, URL, URL, URL,
63
+ URL, URL, URL, URL, URL, URL, URL, URL, URL, URL,
64
+ URL, URL, URL, URL, URL, URL, URL, URL, URL, URL]).strip
65
+
66
+ ADMIN_ORG_LINK = "#{URL}/api/admin/org/b689c06e-1de0-4fd1-a5a3-050c479546ac"
67
+
68
+ ADMIN_ORG_RESPONSE = (File.read(Test.spec_asset("admin_org_response.xml")) %
69
+ [ORGANIZATION, URL, URL, URL, URL, URL, URL, URL, URL, URL, URL, URL,
70
+ ORGANIZATION, URL, URL, URL, URL, URL, URL, URL, URL, URL, URL, URL,
71
+ URL, URL, URL, URL, URL, URL, URL, URL, URL, VAPP_CATALOG_NAME, URL,
72
+ CATALOG_ID, OVDC, URL, VDC_ID]).strip
73
+
74
+ ORG_NETWORK_LINK = "#{URL}/api/network/#{ORG_NETWORK_ID}"
75
+
76
+ VDC_LINK = "#{URL}/api/vdc/#{VDC_ID}"
77
+
78
+ MEDIA_UPLOAD_LINK = "#{URL}/api/vdc/#{VDC_ID}/media"
79
+
80
+ VDC_INDY_DISKS_LINK = "#{URL}/api/vdc/#{VDC_ID}/disk"
81
+
82
+ VDC_RESPONSE = (File.read(Test.spec_asset("vdc_response.xml")) %
83
+ [OVDC, VDC_ID, URL, VDC_ID, URL, URL, URL, VDC_ID, URL, VDC_ID,
84
+ MEDIA_UPLOAD_LINK, URL, VDC_ID, URL, VDC_ID, URL, VDC_ID, URL, VDC_ID,
85
+ URL, VDC_ID, URL, VDC_ID, VDC_INDY_DISKS_LINK, EXISTING_VAPP_NAME,
86
+ URL, EXISTING_VAPP_ID, EXISTING_VAPP_TEMPLATE_NAME, URL,
87
+ EXISTING_VAPP_TEMPLATE_ID, EXISTING_MEDIA_NAME, URL, EXISTING_MEDIA_ID,
88
+ INDY_DISK_NAME, INDY_DISK_URL, ORG_NETWORK_NAME, ORG_NETWORK_LINK]).strip
89
+
90
+ VDC_VAPP_UPLOAD_LINK = "#{URL}/api/vdc/#{VDC_ID}/action/uploadVAppTemplate"
91
+
92
+
93
+ VAPP_TEMPLATE_UPLOAD_REQUEST = (File.read(Test.spec_asset(
94
+ "vapp_template_upload_request.xml")) % [VAPP_TEMPLATE_NAME]).strip
95
+
96
+ VAPP_TEMPLATE_UPLOAD_OVF_WAITING_RESPONSE = (File.read(Test.spec_asset(
97
+ "vapp_template_upload_response.xml")) % [VAPP_TEMPLATE_NAME, URL,
98
+ URL, URL, VDC_ID, URL, URL, USERNAME, URL, URL, URL, URL]).strip
99
+
100
+ VAPP_TEMPLATE_LINK = "#{URL}/api/vAppTemplate/vappTemplate-c032c1a3-21a2-4ac2-8e98-0cc29229e10c"
101
+
102
+ VAPP_TEMPLATE_UPLOAD_OVF_LINK = "#{URL}/transfer/22467867-7ada-4a55-a9cb-e05aa30a4f96/descriptor.ovf"
103
+
104
+ VAPP_TEMPLATE_NO_DISKS_RESPONSE = (File.read(Test.spec_asset(
105
+ "vapp_template_no_disk_response.xml")) % [VAPP_TEMPLATE_NAME, URL,
106
+ URL, URL, VDC_ID, URL, URL, URL, USERNAME, URL, URL, URL, URL]).strip
107
+
108
+ VAPP_TEMPLATE_DISK_UPLOAD_1 = "#{URL}/transfer/62137697-8d51-4df6-9689-0b7f84ccc096/haoUnOS2VMs-disk1.vmdk"
109
+
110
+ VAPP_TEMPLATE_UPLOAD_COMPLETE = (File.read(Test.spec_asset(
111
+ "vapp_template_upload_complete.xml")) % [VAPP_TEMPLATE_NAME, VAPP_ID,
112
+ URL, VAPP_ID, URL, URL, VDC_ID, URL, VAPP_ID, VAPP_TEMPLATE_NAME,
113
+ VAPP_ID, URL, URL, VAPP_TEMPLATE_NAME, URL, VAPP_ID, USERNAME, URL,
114
+ USERNAME, URL, VAPP_TEMPLATE_NAME, URL, URL, VAPP_ID, URL, VAPP_ID,
115
+ URL, VAPP_ID]).strip
116
+
117
+ VAPP_TEMPLATE_UPLOAD_FAILED = (File.read(Test.spec_asset(
118
+ "vapp_template_upload_failed.xml")) % [VAPP_TEMPLATE_NAME, VAPP_ID,
119
+ URL, VAPP_ID, URL, URL, VDC_ID, URL, VAPP_ID, VAPP_TEMPLATE_NAME,
120
+ VAPP_ID, URL, URL, VAPP_TEMPLATE_NAME, URL, VAPP_ID, USERNAME, URL,
121
+ USERNAME, URL, VAPP_TEMPLATE_NAME, URL, URL, VAPP_ID, URL, VAPP_ID,
122
+ URL, VAPP_ID]).strip
123
+
124
+ CATALOG_LINK = "#{URL}/api/admin/catalog/#{CATALOG_ID}"
125
+
126
+ CATALOG_ADD_ITEM_LINK = "#{URL}/api/catalog/#{CATALOG_ID}/catalogItems"
127
+
128
+ EXISTING_MEDIA_LINK = "#{URL}/api/media/#{EXISTING_MEDIA_ID}"
129
+
130
+ EXISTING_MEDIA_BUSY_RESPONSE = (File.read(Test.spec_asset(
131
+ "existing_media_busy_response.xml")) % [EXISTING_MEDIA_NAME,
132
+ EXISTING_MEDIA_ID, EXISTING_MEDIA_LINK, URL, EXISTING_MEDIA_NAME,
133
+ EXISTING_MEDIA_ID, URL, URL, EXISTING_MEDIA_NAME, URL,
134
+ EXISTING_MEDIA_ID, URL, URL, URL, USERNAME, URL]).strip
135
+
136
+ EXISTING_MEDIA_DONE_RESPONSE = (File.read(Test.spec_asset(
137
+ "existing_media_done_response.xml")) % [EXISTING_MEDIA_NAME,
138
+ EXISTING_MEDIA_ID, EXISTING_MEDIA_LINK, URL, URL, EXISTING_MEDIA_LINK,
139
+ URL, EXISTING_MEDIA_ID, URL, EXISTING_MEDIA_ID, URL,
140
+ EXISTING_MEDIA_ID, USERNAME, URL]).strip
141
+
142
+ EXISTING_MEDIA_CATALOG_ITEM_LINK = "#{URL}/api/catalogItem/#{EXISTING_MEDIA_CATALOG_ID}"
143
+
144
+ EXISTING_MEDIA_CATALOG_ITEM = (File.read(Test.spec_asset(
145
+ "existing_media_catalog_item.xml")) % [EXISTING_MEDIA_NAME,
146
+ EXISTING_MEDIA_CATALOG_ID, EXISTING_MEDIA_CATALOG_ITEM_LINK, URL, URL,
147
+ EXISTING_MEDIA_CATALOG_ID, URL, EXISTING_MEDIA_CATALOG_ID, URL,
148
+ EXISTING_MEDIA_CATALOG_ID, EXISTING_MEDIA_NAME,
149
+ EXISTING_MEDIA_LINK]).strip
150
+
151
+ EXISTING_MEDIA_DELETE_TASK_ID = "e0491c4a-d9e9-4b86-8c46-2d7736b8f82a"
152
+
153
+ EXISTING_MEDIA_DELETE_TASK_LINK = "#{URL}/api/task/#{EXISTING_MEDIA_DELETE_TASK_ID}"
154
+
155
+ EXISTING_MEDIA_DELETE_TASK_DONE = (File.read(Test.spec_asset(
156
+ "existing_media_delete_task_done.xml")) %
157
+ [EXISTING_MEDIA_DELETE_TASK_ID, EXISTING_MEDIA_DELETE_TASK_LINK, URL,
158
+ EXISTING_MEDIA_DELETE_TASK_ID, EXISTING_MEDIA_LINK, USERNAME, URL,
159
+ URL]).strip
160
+
161
+ CATALOG_RESPONSE = (File.read(Test.spec_asset("catalog_response.xml")) %
162
+ [VAPP_CATALOG_NAME, CATALOG_ID, URL, CATALOG_ID, URL, URL, URL,
163
+ CATALOG_ID, URL, CATALOG_ID, CATALOG_ADD_ITEM_LINK, URL, CATALOG_ID,
164
+ URL, CATALOG_ID, URL, CATALOG_ID, URL, EXISTING_VAPP_TEMPLATE_NAME,
165
+ URL, EXISTING_VAPP_TEMPLATE_CATALOG_ITEM_ID, EXISTING_MEDIA_NAME,
166
+ EXISTING_MEDIA_CATALOG_ITEM_LINK]).strip
167
+
168
+ CATALOG_ADD_VAPP_REQUEST = (File.read(Test.spec_asset(
169
+ "catalog_add_vapp_request.xml")) % [VAPP_TEMPLATE_NAME,
170
+ VAPP_TEMPLATE_NAME, VAPP_ID, URL, VAPP_ID]).strip
171
+
172
+ CATALOG_ADD_ITEM_RESPONSE = (File.read(Test.spec_asset(
173
+ "catalog_add_item_response.xml")) % [VAPP_TEMPLATE_NAME, URL, URL, URL,
174
+ CATALOG_ID, URL, URL, URL, VAPP_TEMPLATE_NAME, URL, VAPP_ID]).strip
175
+
176
+ CATALOG_ITEM_ADDED_RESPONSE = (File.read(Test.spec_asset(
177
+ "catalog_item_added_response.xml")) % [VAPP_CATALOG_NAME, CATALOG_ID,
178
+ URL, CATALOG_ID, URL, URL, URL, CATALOG_ID, URL, CATALOG_ID, URL,
179
+ CATALOG_ID, URL, CATALOG_ID, URL, CATALOG_ID, URL, CATALOG_ID, URL,
180
+ EXISTING_VAPP_TEMPLATE_NAME, URL, EXISTING_VAPP_TEMPLATE_CATALOG_ITEM_ID,
181
+ VAPP_TEMPLATE_NAME, URL]).strip
182
+
183
+ CATALOG_ITEM_VAPP_LINK = "#{URL}/api/catalogItem/39a8f899-0f8e-40c4-ac68-66b2688833bc"
184
+
185
+ FINALIZE_UPLOAD_TASK_ID = "91bd4b57-598e-4753-8274-1172c7195468"
186
+
187
+ FINALIZE_UPLOAD_TASK_LINK = "#{URL}/api/task/#{FINALIZE_UPLOAD_TASK_ID}"
188
+
189
+ FINALIZE_UPLOAD_TASK_RESPONSE = (File.read(Test.spec_asset(
190
+ "finalize_upload_task_response.xml")) % [VAPP_TEMPLATE_NAME, VAPP_ID,
191
+ FINALIZE_UPLOAD_TASK_ID, URL, FINALIZE_UPLOAD_TASK_ID, URL, URL,
192
+ FINALIZE_UPLOAD_TASK_ID, VAPP_TEMPLATE_NAME, URL, VAPP_ID, URL,
193
+ URL]).strip()
194
+
195
+ FINALIZE_UPLOAD_TASK_DONE_RESPONSE = (File.read(Test.spec_asset(
196
+ "finalize_upload_task_done_response.xml")) % [VAPP_TEMPLATE_NAME,
197
+ VAPP_ID, FINALIZE_UPLOAD_TASK_ID, URL, FINALIZE_UPLOAD_TASK_ID, URL,
198
+ URL, FINALIZE_UPLOAD_TASK_ID, VAPP_TEMPLATE_NAME, URL, VAPP_ID, URL,
199
+ URL]).strip
200
+
201
+ VAPP_TEMPLATE_READY_RESPONSE = (File.read(Test.spec_asset(
202
+ "vapp_template_ready_response.xml")) % [VAPP_TEMPLATE_NAME, VAPP_ID,
203
+ URL, VAPP_ID, URL, URL, VDC_ID, URL, VAPP_ID, URL, VAPP_ID, URL,
204
+ VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, URL, URL, VAPP_ID, URL, URL,
205
+ URL, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL,
206
+ VAPP_ID, URL, VAPP_ID]).strip
207
+
208
+ VAPP_TEMPLATE_DELETE_TASK_ID = "909835c2-b4c4-4bce-b3da-d33650e25de2"
209
+
210
+ VAPP_TEMPLATE_DELETE_TASK_LINK = "#{URL}/api/task/#{VAPP_TEMPLATE_DELETE_TASK_ID}"
211
+
212
+ VAPP_TEMPLATE_DELETE_RUNNING_TASK = (File.read(Test.spec_asset(
213
+ "vapp_template_delelete_running_task.xml")) % [VAPP_ID,
214
+ VAPP_TEMPLATE_DELETE_TASK_ID, URL, VAPP_TEMPLATE_DELETE_TASK_ID, URL,
215
+ URL, VAPP_TEMPLATE_DELETE_TASK_ID, URL, URL, URL]).strip
216
+
217
+ VAPP_TEMPLATE_DELETE_DONE_TASK = (File.read(Test.spec_asset(
218
+ "vapp_template_delelete_done_task.xml")) % [VAPP_ID,
219
+ VAPP_TEMPLATE_DELETE_TASK_ID, URL, VAPP_TEMPLATE_DELETE_TASK_ID, URL,
220
+ URL, URL, URL]).strip
221
+
222
+ DELETED_VAPP_NAME = "already_deleted"
223
+
224
+ EXISTING_VAPP_LINK = "#{URL}/api/vApp/vapp-#{EXISTING_VAPP_ID}"
225
+
226
+ VAPP_TEMPLATE_INSTANTIATE_LINK = "#{URL}/api/vdc/#{VDC_ID}/action/instantiateVAppTemplate"
227
+
228
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_REQUEST = (File.read(Test.spec_asset(
229
+ "vapp_template_instantiate_request.xml")) % [VAPP_NAME, URL,
230
+ EXISTING_VAPP_TEMPLATE_ID, EXISTING_VAPP_TEMPLATE_ID]).strip
231
+
232
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_WITH_LOCALITY_REQUEST = (File.read(
233
+ Test.spec_asset("vapp_template_instantiate_with_locality_request.xml")) %
234
+ [VAPP_NAME, URL, EXISTING_VAPP_TEMPLATE_ID, EXISTING_VAPP_TEMPLATE_ID,
235
+ VM_NAME, VAPP_TEMPLATE_VM_URL, INDY_DISK_NAME, INDY_DISK_URL]).strip
236
+
237
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID = "37be6f4c-69a8-4f80-ba94-271175967a68"
238
+
239
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_LINK = "#{URL}/api/task/#{EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID}"
240
+
241
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_START_RESPONSE = (File.read(Test.spec_asset(
242
+ "existing_vapp_template_instantiate_task_start_response.xml")) % [
243
+ VAPP_NAME, VAPP_ID, EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID, URL,
244
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID, URL,
245
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID, VAPP_NAME, URL, VAPP_ID,
246
+ USERNAME, URL, ORGANIZATION, URL]).strip
247
+
248
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_SUCCESS_RESPONSE = (File.read(
249
+ Test.spec_asset("existing_vapp_template_instantiate_task_success_response.xml")) %
250
+ [VAPP_NAME, VAPP_ID, EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID, URL,
251
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID, URL,
252
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID, VAPP_NAME, URL, VAPP_ID,
253
+ USERNAME, URL, ORGANIZATION, URL]).strip
254
+
255
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ERROR_RESPONSE = (File.read(Test.spec_asset(
256
+ "existing_vapp_template_instantiate_task_error_response.xml")) %
257
+ [VAPP_NAME, VAPP_ID, EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID, URL,
258
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID, URL,
259
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID, VAPP_NAME, URL, VAPP_ID,
260
+ USERNAME, URL, ORGANIZATION, URL]).strip
261
+
262
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_RESPONSE = (File.read(Test.spec_asset(
263
+ "existing_vapp_template_instantiate_response.xml")) % [VAPP_NAME,
264
+ VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VDC_ID, URL, VAPP_ID, URL,
265
+ VAPP_ID, VAPP_NAME, VAPP_ID, EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID,
266
+ URL, EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID, URL,
267
+ EXISTING_VAPP_TEMPLATE_INSTANTIATE_TASK_ID, VAPP_NAME, URL, VAPP_ID,
268
+ URL, ORGANIZATION, URL, URL]).strip
269
+
270
+ EXISTING_VAPP_TEMPLATE_CATALOG_URN = "urn:vcloud:catalogitem:#{EXISTING_VAPP_TEMPLATE_CATALOG_ITEM_ID}"
271
+ EXISTING_VAPP_TEMPLATE_CATALOG_RESOLVER_URL = "#{URL}/api/entity/#{EXISTING_VAPP_TEMPLATE_CATALOG_URN}"
272
+ EXISTING_VAPP_TEMPLATE_CATALOG_ITEM_LINK = "#{URL}/api/catalogItem/#{EXISTING_VAPP_TEMPLATE_CATALOG_ITEM_ID}"
273
+
274
+ EXISTING_VAPP_TEMPLATE_CATALOG_ITEM_RESPONSE = (File.read(Test.spec_asset(
275
+ "existing_vapp_template_item_response.xml")) %
276
+ [EXISTING_VAPP_TEMPLATE_NAME, URL, URL, URL, CATALOG_ID, URL,
277
+ EXISTING_VAPP_TEMPLATE_CATALOG_ITEM_ID, URL,
278
+ EXISTING_VAPP_TEMPLATE_CATALOG_ITEM_ID, URL,
279
+ EXISTING_VAPP_TEMPLATE_CATALOG_ITEM_ID, EXISTING_VAPP_TEMPLATE_NAME,
280
+ URL, EXISTING_VAPP_TEMPLATE_ID]).strip
281
+
282
+ VAPP_TEMPLATE_CATALOG_URN = "urn:vcloud:catalogitem:39a8f899-0f8e-40c4-ac68-66b2688833bc"
283
+ VAPP_TEMPLATE_CATALOG_RESOLVER_URL = "#{URL}/api/entity/#{VAPP_TEMPLATE_CATALOG_URN}"
284
+ VAPP_TEMPLATE_CATALOG_ITEM_LINK = "#{URL}/api/catalogItem/39a8f899-0f8e-40c4-ac68-66b2688833bc"
285
+
286
+ EXISTING_VAPP_TEMPLATE_LINK = "#{URL}/api/vAppTemplate/vappTemplate-#{EXISTING_VAPP_TEMPLATE_ID}"
287
+
288
+ EXISTING_VAPP_TEMPLATE_READY_RESPONSE = (File.read(Test.spec_asset(
289
+ "existing_vapp_template_ready_response.xml")) % [VAPP_TEMPLATE_NAME,
290
+ EXISTING_VAPP_TEMPLATE_ID, URL, EXISTING_VAPP_TEMPLATE_ID, URL, URL,
291
+ VDC_ID, URL, EXISTING_VAPP_TEMPLATE_ID, URL, EXISTING_VAPP_TEMPLATE_ID,
292
+ URL, EXISTING_VAPP_TEMPLATE_ID, URL, EXISTING_VAPP_TEMPLATE_ID, URL,
293
+ EXISTING_VAPP_TEMPLATE_ID, URL, VM1_ID, URL, VM1_ID, URL,
294
+ EXISTING_VAPP_TEMPLATE_ID, URL, VM1_ID, URL, VM1_ID, URL, VM1_ID,
295
+ VM1_ID, URL, EXISTING_VAPP_TEMPLATE_ID, URL, EXISTING_VAPP_TEMPLATE_ID,
296
+ URL, EXISTING_VAPP_TEMPLATE_ID, URL, EXISTING_VAPP_TEMPLATE_ID, URL,
297
+ EXISTING_VAPP_TEMPLATE_ID, URL, EXISTING_VAPP_TEMPLATE_ID]).strip
298
+
299
+ INSTANTIATED_VAPP_LINK = "#{URL}/api/vApp/vapp-#{VAPP_ID}"
300
+
301
+ INSTANTIATED_VM_LINK = "#{URL}/api/vApp/vm-#{INSTANTIATED_VM_ID}"
302
+
303
+ INSTANTIATED_VM_NETWORK_SECTION_LINK = "#{URL}/api/vApp/vm-#{INSTANTIATED_VM_ID}/networkConnectionSection/"
304
+
305
+ INSTANTIATED_VAPP_POWER_ON_LINK = "#{URL}/api/vApp/vapp-#{VAPP_ID}/power/action/powerOn"
306
+
307
+ INSTANTIATED_VAPP_POWER_OFF_LINK = "#{URL}/api/vApp/vapp-#{VAPP_ID}/power/action/powerOff"
308
+
309
+ INSTANTIATED_VAPP_POWER_REBOOT_LINK = "#{URL}/api/vApp/vapp-#{VAPP_ID}/power/action/reboot"
310
+
311
+ INSTANTIATED_VAPP_UNDEPLOY_LINK = "#{URL}/api/vApp/vapp-#{VAPP_ID}/action/undeploy"
312
+
313
+ INSTANTIATED_VAPP_DISCARD_STATE_LINK = "#{URL}/api/vApp/vapp-#{VAPP_ID}/action/discardSuspendedState"
314
+
315
+ INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK = "#{URL}/api/vApp/vapp-#{VAPP_ID}/networkConfigSection/"
316
+
317
+ INSTANTIATED_VM_INSERT_MEDIA_LINK = "#{URL}/api/vApp/vm-#{INSTANTIATED_VM_ID}/media/action/insertMedia"
318
+
319
+ INSTANTIATED_VM_INSERT_MEDIA_TASK_ID = "dd3a1c3c-6e4a-4783-9e18-d95e65dd260c"
320
+
321
+ INSTANTIATED_VM_INSERT_MEDIA_TASK_LINK = "#{URL}/api/task/#{INSTANTIATED_VM_INSERT_MEDIA_TASK_ID}"
322
+
323
+ INSTANTIATED_VM_INSERT_MEDIA_TASK_DONE = (File.read(Test.spec_asset(
324
+ "instantiated_vm_insert_media_task_done.xml")) %
325
+ [INSTANTIATED_VM_INSERT_MEDIA_TASK_ID,
326
+ INSTANTIATED_VM_INSERT_MEDIA_TASK_LINK, URL,
327
+ INSTANTIATED_VM_INSERT_MEDIA_TASK_ID, URL, URL, URL]).strip
328
+
329
+ INSTANTIATED_VM_ATTACH_DISK_LINK = "#{URL}/api/vApp/vm-#{INSTANTIATED_VM_ID}/disk/action/attach"
330
+
331
+ INSTANTIATED_VM_DETACH_DISK_LINK = "#{URL}/api/vApp/vm-#{INSTANTIATED_VM_ID}/disk/action/detach"
332
+
333
+ INSTANTIAED_VAPP_RESPONSE = (File.read(Test.spec_asset(
334
+ "instantiated_vapp_response.xml")) % [VAPP_ID, URL, VAPP_ID,
335
+ INSTANTIATED_VAPP_POWER_ON_LINK, URL, VAPP_ID, URL, VAPP_ID, URL,
336
+ VAPP_ID, URL, VAPP_ID, URL, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID,
337
+ URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID,
338
+ URL, VAPP_ID, INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK,
339
+ INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK, URL, INSTANTIATED_VM_ID,
340
+ INSTANTIATED_VM_LINK, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
341
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
342
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
343
+ INSTANTIATED_VM_INSERT_MEDIA_LINK, URL, INSTANTIATED_VM_ID,
344
+ INSTANTIATED_VM_ATTACH_DISK_LINK, INSTANTIATED_VM_DETACH_DISK_LINK, URL,
345
+ INSTANTIATED_VM_ID, URL, VAPP_ID, URL, INSTANTIATED_VM_ID,
346
+ SCSI_CONTROLLER_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
347
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
348
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
349
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
350
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
351
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
352
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
353
+ URL, INSTANTIATED_VM_ID, INSTANTIATED_VM_NETWORK_SECTION_LINK,
354
+ INSTANTIATED_VM_NETWORK_SECTION_LINK, URL, INSTANTIATED_VM_ID,
355
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID]).strip
356
+
357
+ INSTANTIAED_VAPP_ON_RESPONSE = (File.read(Test.spec_asset(
358
+ "instantiated_vapp_on_response.xml")) % [VAPP_ID, URL, VAPP_ID,
359
+ INSTANTIATED_VAPP_POWER_OFF_LINK, INSTANTIATED_VAPP_POWER_REBOOT_LINK,
360
+ INSTANTIATED_VAPP_UNDEPLOY_LINK, URL, VAPP_ID, URL, VAPP_ID, URL,
361
+ VAPP_ID, URL, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID,
362
+ URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID,
363
+ INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK,
364
+ INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK, URL, INSTANTIATED_VM_ID,
365
+ INSTANTIATED_VM_LINK, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
366
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
367
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
368
+ INSTANTIATED_VM_INSERT_MEDIA_LINK, URL, INSTANTIATED_VM_ID,
369
+ INSTANTIATED_VM_ATTACH_DISK_LINK, INSTANTIATED_VM_DETACH_DISK_LINK,
370
+ URL, INSTANTIATED_VM_ID, URL, VAPP_ID, URL, INSTANTIATED_VM_ID,
371
+ SCSI_CONTROLLER_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
372
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
373
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
374
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
375
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
376
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
377
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
378
+ URL, INSTANTIATED_VM_ID, INSTANTIATED_VM_NETWORK_SECTION_LINK,
379
+ INSTANTIATED_VM_NETWORK_SECTION_LINK, URL, INSTANTIATED_VM_ID,
380
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID]).strip
381
+
382
+
383
+ INSTANTIAED_VAPP_POWERED_OFF_RESPONSE = (File.read(Test.spec_asset(
384
+ "instantiated_vapp_off_response.xml")) % [VAPP_NAME, VAPP_ID, URL,
385
+ VAPP_ID, INSTANTIATED_VAPP_POWER_ON_LINK, INSTANTIATED_VAPP_POWER_OFF_LINK,
386
+ INSTANTIATED_VAPP_UNDEPLOY_LINK, URL, VAPP_ID, URL, VAPP_ID, URL,
387
+ VAPP_ID, URL, VAPP_ID, URL, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID,
388
+ URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID,
389
+ URL, VAPP_ID, INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK,
390
+ INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK, URL, INSTANTIATED_VM_ID,
391
+ INSTANTIATED_VM_LINK, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
392
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
393
+ URL, INSTANTIATED_VM_ID, INSTANTIATED_VM_INSERT_MEDIA_LINK, URL,
394
+ INSTANTIATED_VM_ID, INSTANTIATED_VM_ATTACH_DISK_LINK,
395
+ INSTANTIATED_VM_DETACH_DISK_LINK, URL, INSTANTIATED_VM_ID, URL, VAPP_ID,
396
+ URL, INSTANTIATED_VM_ID, SCSI_CONTROLLER_ID, URL, INSTANTIATED_VM_ID,
397
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
398
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
399
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
400
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
401
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
402
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, INSTANTIATED_VM_NETWORK_SECTION_LINK,
403
+ INSTANTIATED_VM_NETWORK_SECTION_LINK, URL, INSTANTIATED_VM_ID,
404
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID]).strip
405
+
406
+
407
+ INSTANTIATED_SUSPENDED_VAPP_RESPONSE = (File.read(Test.spec_asset(
408
+ "instantiated_suspended_vapp_response.xml")) % [VAPP_ID, URL, VAPP_ID,
409
+ INSTANTIATED_VAPP_POWER_ON_LINK, URL, VAPP_ID, URL, VAPP_ID, URL,
410
+ VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL,
411
+ URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID,
412
+ URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID, URL, VAPP_ID,
413
+ INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK,
414
+ INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK, URL, INSTANTIATED_VM_ID,
415
+ INSTANTIATED_VM_LINK, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
416
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
417
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
418
+ URL, INSTANTIATED_VM_ID, INSTANTIATED_VM_INSERT_MEDIA_LINK, URL,
419
+ INSTANTIATED_VM_ID, INSTANTIATED_VM_ATTACH_DISK_LINK,
420
+ INSTANTIATED_VM_DETACH_DISK_LINK, URL, INSTANTIATED_VM_ID, URL, VAPP_ID,
421
+ URL, INSTANTIATED_VM_ID, SCSI_CONTROLLER_ID, URL, INSTANTIATED_VM_ID,
422
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
423
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
424
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
425
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
426
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
427
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
428
+ URL, INSTANTIATED_VM_ID, INSTANTIATED_VM_NETWORK_SECTION_LINK,
429
+ INSTANTIATED_VM_NETWORK_SECTION_LINK, URL, INSTANTIATED_VM_ID,
430
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID]).strip
431
+
432
+ INSTANTIATED_VAPP_DELETE_TASK_ID = "2637f9de-4a68-4829-9515-469788a4e36a"
433
+
434
+ INSTANTIATED_VAPP_DELETE_TASK_LINK = "#{URL}/api/task/#{INSTANTIATED_VAPP_DELETE_TASK_ID}"
435
+
436
+ INSTANTIATED_VAPP_DELETE_RUNNING_TASK = (File.read(Test.spec_asset(
437
+ "instantiated_vapp_delelete_running_task.xml")) %
438
+ [VAPP_ID, INSTANTIATED_VAPP_DELETE_TASK_ID, URL,
439
+ INSTANTIATED_VAPP_DELETE_TASK_ID, URL, URL,
440
+ INSTANTIATED_VAPP_DELETE_TASK_ID, URL, URL, URL]).strip
441
+
442
+ INSTANTIATED_VAPP_DELETE_DONE_TASK = (File.read(Test.spec_asset(
443
+ "instantiated_vapp_delelete_done_task.xml")) % [VAPP_ID,
444
+ INSTANTIATED_VAPP_DELETE_TASK_ID, URL,
445
+ INSTANTIATED_VAPP_DELETE_TASK_ID, URL, URL, URL, URL]).strip
446
+
447
+ INSTANTIATED_VAPP_POWER_ON_TASK_ID = "d202bc01-3a7e-4683-adac-bfc76fdf1293"
448
+
449
+ INSTANTIATED_VAPP_POWER_ON_TASK_LINK = "#{URL}/api/task/#{INSTANTIATED_VAPP_POWER_ON_TASK_ID}"
450
+
451
+ INSTANTED_VAPP_POWER_TASK_RUNNING = (File.read(Test.spec_asset(
452
+ "instantiated_vapp_power_task_running.xml")) %
453
+ [INSTANTIATED_VAPP_POWER_ON_TASK_ID,
454
+ INSTANTIATED_VAPP_POWER_ON_TASK_LINK, URL,
455
+ INSTANTIATED_VAPP_POWER_ON_TASK_ID, VAPP_NAME, URL, USERNAME, URL,
456
+ ORGANIZATION, URL]).strip
457
+
458
+ INSTANTED_VAPP_POWER_TASK_SUCCESS = (File.read(Test.spec_asset(
459
+ "instantiated_vapp_power_task_success.xml")) %
460
+ [INSTANTIATED_VAPP_POWER_ON_TASK_ID, INSTANTIATED_VAPP_POWER_ON_TASK_LINK,
461
+ URL, INSTANTIATED_VAPP_POWER_ON_TASK_ID, VAPP_NAME, URL, USERNAME,
462
+ URL, ORGANIZATION, URL]).strip
463
+
464
+ INSTANTIATED_VM_CPU_LINK = "#{URL}/api/vApp/vm-#{INSTANTIATED_VM_ID}/virtualHardwareSection/cpu"
465
+
466
+ INSTANTIATED_VM_CPU_RESPONSE = (File.read(Test.spec_asset(
467
+ "instantiated_vm_cpu_response.xml")) % [URL, INSTANTIATED_VM_ID, URL,
468
+ INSTANTIATED_VM_ID]).strip
469
+
470
+ INSTANTIATED_VM_MEMORY_LINK = "#{URL}/api/vApp/vm-#{INSTANTIATED_VM_ID}/virtualHardwareSection/memory"
471
+
472
+ INSTANTIATED_VM_MEMORY_RESPONSE = (File.read(Test.spec_asset(
473
+ "instantiated_vm_memory_response.xml")) % [URL, INSTANTIATED_VM_ID,
474
+ URL, INSTANTIATED_VM_ID]).strip
475
+
476
+ INSTANTIATED_VM_RESPONSE = (File.read(Test.spec_asset(
477
+ "instantiated_vm_response.xml")) % [INSTANTIATED_VM_ID, URL,
478
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
479
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
480
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
481
+ INSTANTIATED_VM_INSERT_MEDIA_LINK, URL, INSTANTIATED_VM_ID,
482
+ INSTANTIATED_VM_ATTACH_DISK_LINK, INSTANTIATED_VM_DETACH_DISK_LINK,
483
+ URL, INSTANTIATED_VM_ID, URL, URL, INSTANTIATED_VM_ID,
484
+ SCSI_CONTROLLER_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
485
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
486
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
487
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
488
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
489
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
490
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
491
+ URL, INSTANTIATED_VM_ID, INSTANTIATED_VM_NETWORK_SECTION_LINK,
492
+ INSTANTIATED_VM_NETWORK_SECTION_LINK, URL, INSTANTIATED_VM_ID,
493
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID]).strip
494
+
495
+ INSTANTIATED_VM_MODIFY_TASK_LINK = "#{URL}/api/task/16edd9b8-ae1f-4d2f-b3a3-cc27348b37f7"
496
+
497
+ INSTANTIATED_VM_MODIFY_TASK_RUNNING = (File.read(Test.spec_asset(
498
+ "instantiated_vm_modify_task_running.xml")) % [VM_NAME,
499
+ INSTANTIATED_VM_ID, URL, URL, VM_NAME, URL, INSTANTIATED_VM_ID, URL,
500
+ URL]).strip
501
+
502
+ INSTANTIATED_VM_MODIFY_TASK_SUCCESS = (File.read(Test.spec_asset(
503
+ "instantiated_vm_modify_task_success.xml")) % [VM_NAME,
504
+ INSTANTIATED_VM_ID, URL, VM_NAME, URL, INSTANTIATED_VM_ID, URL,
505
+ URL]).strip
506
+
507
+ INSTANTED_VM_CHANGE_TASK_LINK = "#{URL}/api/task/2eea2897-d189-4cf7-9739-758dbfd225d6"
508
+
509
+ INSTANTED_VM_CHANGE_TASK_RUNNING = (File.read(Test.spec_asset(
510
+ "instantiated_vm_change_task_running.xml")) % [VM1_ID,
511
+ INSTANTED_VM_CHANGE_TASK_LINK, URL, URL, URL, URL]).strip
512
+
513
+ INSTANTED_VM_CHANGE_TASK_SUCCESS = (File.read(Test.spec_asset(
514
+ "instantiated_vm_change_task_success.xml")) % [VM1_ID,
515
+ INSTANTED_VM_CHANGE_TASK_LINK, URL, URL, URL, URL]).strip
516
+
517
+ INSTANTIATED_VM_HARDWARE_SECTION_LINK = "#{URL}/api/vApp/vm-#{INSTANTIATED_VM_ID}/virtualHardwareSection/"
518
+
519
+ CHANGED_VM_NEW_DISK_SIZE = 350
520
+
521
+ RECONFIGURE_VM_LINK = "#{URL}/api/vApp/vm-#{INSTANTIATED_VM_ID}/reconfigureVm"
522
+
523
+ RECONFIGURE_VM_REQUEST = (File.read(Test.spec_asset(
524
+ "reconfigure_vm_request.xml")) % [CHANGED_VM_NAME, INSTANTIATED_VM_ID,
525
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
526
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
527
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
528
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
529
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
530
+ INSTANTIATED_VM_ID, URL, CHANGED_VM_DESCRIPTION, URL,
531
+ INSTANTIATED_VM_ID, CHANGED_VM_DISK, URL, INSTANTIATED_VM_ID,
532
+ CHANGED_VM_CPU, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
533
+ CHANGED_VM_MEMORY, URL, INSTANTIATED_VM_ID, URL,
534
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
535
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
536
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
537
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
538
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL,
539
+ INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID,
540
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID, INSTANTIATED_VM_ID,
541
+ URL, INSTANTIATED_VM_ID, URL, INSTANTIATED_VM_ID]).strip
542
+
543
+ RECONFIGURE_VM_TASK = (File.read(Test.spec_asset(
544
+ "reconfigure_vm_task.xml")) % [INSTANTIATED_VM_ID, URL, URL, VM1_ID,
545
+ URL, URL]).strip
546
+
547
+ UNDEPLOY_PARAMS = File.read(Test.spec_asset( "undeploy_params.xml")).strip
548
+
549
+ ORG_NETWORK_RESPONSE = (File.read(Test.spec_asset(
550
+ "org_network_response.xml")) % [ORG_NETWORK_NAME, ORG_NETWORK_ID,
551
+ ORG_NETWORK_LINK, ORG_NETWORK_ID]).strip
552
+
553
+ INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_RESPONSE = (File.read(Test.spec_asset(
554
+ "instantiated_vapp_network_config_section_response.xml")) %
555
+ [INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK,
556
+ INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK]).strip
557
+
558
+ INSTANTIATED_VAPP_NETWORK_CONFIG_ADD_NETWORK_REQUEST = (File.read(
559
+ Test.spec_asset("instantiated_vapp_network_config_add_network_request.xml")) %
560
+ [INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK,
561
+ INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK, VAPP_NETWORK_NAME,
562
+ ORG_NETWORK_NAME, ORG_NETWORK_LINK]).strip
563
+
564
+ INSTANTIATED_VAPP_NETWORK_CONFIG_REMOVE_NETWORK_REQUEST = (File.read(Test.spec_asset(
565
+ "instantiated_vapp_network_config_remove_network_request.xml")) %
566
+ [INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK,
567
+ INSTANTIATED_VAPP_NETWORK_CONFIG_SECTION_LINK]).strip
568
+
569
+ INSTANTIATED_VAPP_NETWORK_CONFIG_ADD_NETWORK_TASK_LINK = "#{URL}/api/task/23e5280c-2a91-4a8c-a136-9822ba33f34f"
570
+
571
+ INSTANTIATED_VAPP_NETWORK_CONFIG_MODIFY_NETWORK_TASK_SUCCESS = (File.read(Test.spec_asset(
572
+ "instantiated_vapp_network_config_modify_network_task_success.xml")) %
573
+ [VAPP_NAME, VAPP_ID, INSTANTIATED_VAPP_NETWORK_CONFIG_ADD_NETWORK_TASK_LINK,
574
+ URL, URL, URL, ORGANIZATION, URL]).strip
575
+
576
+ NEW_NIC_INDEX = "1"
577
+
578
+ NEW_NIC_ADDRESSING_MODE = "POOL"
579
+
580
+ INSTANTIATED_VM_NETWORK_SECTION_RESPONSE = (File.read(Test.spec_asset(
581
+ "instantiated_vm_network_section_response.xml")) %
582
+ [INSTANTIATED_VM_NETWORK_SECTION_LINK,
583
+ INSTANTIATED_VM_NETWORK_SECTION_LINK]).strip
584
+
585
+ MEDIA_ID = "35aa7d6c-0794-456b-bbd1-021bb75e2af7"
586
+
587
+ # bogus content
588
+ MEDIA_CONTENT = "35aa7d6c-0794-456b-bbd1-021bb75e2af7"
589
+
590
+ MEDIA_LINK = "#{URL}/api/media/#{MEDIA_ID}"
591
+
592
+ MEDIA_DELETE_TASK_ID = "ddaa7d6c-0794-456b-bbd1-021bb75e2abc"
593
+
594
+ MEDIA_DELETE_TASK_LINK = "#{URL}/api/task/#{EXISTING_MEDIA_DELETE_TASK_ID}"
595
+
596
+ MEDIA_DELETE_TASK_DONE = (File.read(Test.spec_asset(
597
+ "media_delete_task_done.xml")) % [MEDIA_DELETE_TASK_ID,
598
+ MEDIA_DELETE_TASK_LINK, URL, MEDIA_DELETE_TASK_ID, MEDIA_LINK,
599
+ USERNAME, URL, ORGANIZATION, URL]).strip
600
+
601
+ MEDIA_ISO_LINK = "#{URL}/transfer/1ff5509a-4cd8-4005-aa14-f009578651e9/file"
602
+
603
+ MEDIA_UPLOAD_REQUEST = (File.read(Test.spec_asset(
604
+ "media_upload_request.xml")) % [MEDIA_NAME]).strip
605
+
606
+ MEDIA_UPLOAD_PENDING_RESPONSE = (File.read(Test.spec_asset(
607
+ "media_upload_pending_response.xml")) % [MEDIA_NAME, MEDIA_ID,
608
+ MEDIA_LINK, VDC_LINK, URL, MEDIA_ID, MEDIA_ISO_LINK, USERNAME,
609
+ URL]).strip
610
+
611
+ MEDIA_ADD_TO_CATALOG_REQUEST = (File.read(Test.spec_asset(
612
+ "media_add_to_catalog_request.xml")) % [MEDIA_NAME, MEDIA_NAME,
613
+ MEDIA_ID, URL, MEDIA_ID]).strip
614
+
615
+ MEDIA_CATALOG_ITEM_ID = "a0185003-1a65-4fe4-9fe1-08e81ce26ef6"
616
+
617
+ MEDIA_CATALOG_ITEM_DELETE_LINK = "#{URL}/api/catalogItem/#{MEDIA_CATALOG_ITEM_ID}"
618
+
619
+ MEDIA_ADD_TO_CATALOG_RESPONSE = (File.read(Test.spec_asset(
620
+ "media_add_to_catalog_response.xml")) % [MEDIA_NAME,
621
+ MEDIA_CATALOG_ITEM_ID, URL, MEDIA_CATALOG_ITEM_ID, URL, URL,
622
+ MEDIA_CATALOG_ITEM_ID, URL, MEDIA_CATALOG_ITEM_ID,
623
+ MEDIA_CATALOG_ITEM_DELETE_LINK, MEDIA_NAME, MEDIA_LINK]).strip
624
+
625
+ METADATA_VALUE = "test123"
626
+
627
+ METADATA_KEY = "test_key"
628
+
629
+ METADATA_SET_LINK = "#{URL}/api/vApp/vm-#{INSTANTIATED_VM_ID}/metadata/#{METADATA_KEY}"
630
+
631
+ METADATA_SET_REQUEST = (File.read(Test.spec_asset(
632
+ "metadata_set_request.xml")) % [METADATA_VALUE]).strip
633
+
634
+ METADATA_SET_TASK_DONE = (File.read(Test.spec_asset(
635
+ "metadata_set_task_done.xml")) % [INSTANTIATED_VM_ID, URL, URL, URL,
636
+ USERNAME, URL, ORGANIZATION, URL]).strip
637
+
638
+ INDY_DISK_CREATE_REQUEST = (File.read(Test.spec_asset(
639
+ "indy_disk_create_request.xml")) %
640
+ [INDY_DISK_NAME, INDY_DISK_SIZE * 1024 * 1024]).strip
641
+
642
+ INDY_DISK_CREATE_RESPONSE = (File.read(Test.spec_asset(
643
+ "indy_disk_create_response.xml")) % [INDY_DISK_ID, URL, INDY_DISK_ID,
644
+ URL, INDY_DISK_URL, URL, INDY_DISK_ID, URL, INDY_DISK_ID, URL,
645
+ INDY_DISK_ID, INDY_DISK_ID, URL, URL, URL, INDY_DISK_ID, URL, URL,
646
+ URL, URL]).strip
647
+
648
+ INDY_DISK_CREATE_ERROR = File.read(Test.spec_asset(
649
+ "indy_disk_create_error.xml")).strip
650
+
651
+ INDY_DISK_RESPONSE = (File.read(Test.spec_asset(
652
+ "indy_disk_response.xml")) % [INDY_DISK_NAME, INDY_DISK_ID,
653
+ INDY_DISK_URL, URL, URL, INDY_DISK_ID, URL, INDY_DISK_ID, URL,
654
+ INDY_DISK_ID, URL, INDY_DISK_ID, URL, URL]).strip
655
+
656
+ INDY_DISK_ADDRESS_ON_PARENT = "1"
657
+
658
+ INDY_DISK_ATTACH_REQUEST = (File.read(Test.spec_asset(
659
+ "indy_disk_attach_request.xml")) % [INDY_DISK_URL]).strip
660
+
661
+ INDY_DISK_ATTACH_TASK = (File.read(Test.spec_asset(
662
+ "indy_disk_attach_task.xml")) % [URL, URL, VM_NAME, URL, VM1_ID,
663
+ USERNAME, URL, ORGANIZATION, URL]).strip
664
+
665
+ INDY_DISK_ATTACH_TASK_ERROR = (File.read(Test.spec_asset(
666
+ "indy_disk_attach_task_error.xml")) % [URL, URL, VM_NAME, URL, VM1_ID,
667
+ USERNAME, URL, ORGANIZATION, URL]).strip
668
+
669
+ INDY_DISK_DETACH_REQUEST = (File.read(Test.spec_asset(
670
+ "indy_disk_detach_request.xml")) % [INDY_DISK_URL]).strip
671
+
672
+ INDY_DISK_DETACH_TASK = (File.read(Test.spec_asset(
673
+ "indy_disk_detach_task.xml")) % [URL, URL, VM_NAME, URL, USERNAME,
674
+ URL, ORGANIZATION, URL]).strip
675
+
676
+ INDY_DISK_DELETE_TASK = (File.read(Test.spec_asset(
677
+ "indy_disk_delete_task.xml")) % [INDY_DISK_ID, URL, URL,
678
+ INDY_DISK_URL, USERNAME, URL, ORGANIZATION, URL]).strip
679
+
680
+ EXISTING_VAPP_RESOLVER_RESPONSE = (File.read(Test.spec_asset(
681
+ "existing_vapp_resolver_response.xml")) % [EXISTING_VAPP_URN,
682
+ EXISTING_VAPP_URN, EXISTING_VAPP_RESOLVER_URL,
683
+ EXISTING_VAPP_LINK]).strip
684
+
685
+ EXISTING_VAPP_TEMPLATE_CATALOG_RESOLVER_RESPONSE = (File.read(Test.spec_asset(
686
+ "existing_vapp_template_catalog_resolver_response.xml")) %
687
+ [EXISTING_VAPP_TEMPLATE_CATALOG_URN,
688
+ EXISTING_VAPP_TEMPLATE_CATALOG_URN,
689
+ EXISTING_VAPP_TEMPLATE_CATALOG_RESOLVER_URL,
690
+ EXISTING_VAPP_TEMPLATE_CATALOG_ITEM_LINK]).strip
691
+
692
+ VAPP_TEMPLATE_CATALOG_RESOLVER_RESPONSE = (File.read(Test.spec_asset(
693
+ "vapp_template_catalog_resolver_response.xml")) %
694
+ [VAPP_TEMPLATE_CATALOG_URN, VAPP_TEMPLATE_CATALOG_URN,
695
+ VAPP_TEMPLATE_CATALOG_RESOLVER_URL,
696
+ VAPP_TEMPLATE_CATALOG_ITEM_LINK]).strip
697
+
698
+ end
699
+ end
700
+ end