Quantcast
Channel: VMware Communities : All Content - vRealize Automation Tools
Viewing all articles
Browse latest Browse all 9859

Request vRA 7.0.1 Catalog Item from vRO

$
0
0

This post was a godsend for me when trying to call vRA catalog items from vRO.

https://communities.vmware.com/blogs/sergioatvmware/2014/06/13/how-to-use-and-extend-the-workflow-request-a-catalog-item…

 

Unforutnately (or fortunately depending on how you look at it) VMware has updated the process for requesting catalog items.

 

It appears as though you now want to use the "Request a catalog item with provisioning request" workflow in the 7.0.1 vRA plug-in. You need to duplicate the workflow, uncomment the "customize request data" section of the workflow and add your custom properties. Its all JSON so you just want to add it just like you see in the output from the jsonData variable.

 

I walked through it in two steps:

 

1.

////Uncomment to customize request data
var jsonData = vCACCAFERequestsHelper.getProvisioningRequestData(provisioningRequest);
System.log(jsonData);

 

This will log out the full property set in a JSON format. You can paste this into a JSON viewer like Online JSON Viewer and browse it.

request.PNG

 

In my test case i had a blueprint with one vSphere machine named "vSphere_Machine_1". In this case i want to set the CPU count to 2 and memory to 2048.

 

2.

////Uncomment to customize request data
var jsonData = vCACCAFERequestsHelper.getProvisioningRequestData(provisioningRequest);
//System.log(jsonData);
var json = JSON.parse(jsonData);

////Change cpu example
json.vSphere_Machine_1.data.cpu = 2;
json.vSphere_Machine_1.data.memory = 2048;
//System.log(JSON.stringify(json));

vCACCAFERequestsHelper.setProvisioningRequestData(provisioningRequest, JSON.stringify(json));

 

 

Hit submit and its off.


Viewing all articles
Browse latest Browse all 9859

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>