7 Replies Latest reply on Nov 21, 2018 4:19 AM by daphnissov

    vRA 7 - update an IaaS catalog item request after the IaaS form has been submitted by the user, but before it's submitted to the system?

    jhturver Novice

      Might be a little ambitious, but does anyone know if there is way in vRA 7 / vRO to trap and update the IaaS Catalog Item request object after it is submitted by the user in the GUI, but before it's submitted to the system?

       

      This post shows how the request object can be modified in vRO when the IaaS request is made via code (i.e. run code to make, modify, and submit the request) rather than request it through the vRA IaaS GUI:

      http://www.virtualvcp.com/vmware-vrealize-automation-vcac/220-vro-vra7-catalog-item-provisioning-requests-json-and-referencing-properties#kmt-79

       

      But I'm trying to determine if there's a way to do something similar by getting a handle to the request object via an Event Subscription trigger, after the IaaS form has been submitted to the user, but before it's submitted to the system.

      This will enable properties such as the _deploymentName (parent level), or __reservationpolicyID and others that cannot normally be modified after the Catalog Item request has been submitted, to be dynamically updated in vRO code.

       

      I've tried various code run at different state phases (e.g. MachineRequested - PRE, POST, and EVENT) but any changes made to properties seem to be ignored in terms of the resulting values of the Deployment/machines.

      e.g. this does not log an error at any of those phases listed above, but has no effect on the deployed configurations values:

      requestIdBase = virtualMachineProperties.get("__Cafe.Root.Request.Id");

      var myCatalogItemRequest = vCACCAFEEntitiesFinder.getCatalogItemRequest(vraHost,requestIdBase);

      System.log("Catalog Item Request object: " + myCatalogItemRequest);

      myCatalogItemRequest.setDescription("TESTDESC");

       

      I don't want to revert to using an XaaS blueprint/Catalog Item and doing something similar to the author above, because of the extra functionality and richness the IaaS request form provides at this stage.

       

      Appreciate any thoughts/ideas ....

       

      Many thanks

      Justin