I've been working on an ansible module for vRA to use internally in a reasonably flexible way. Since the REST API utilizes a payload approach I can setup the flow to work well with vRA so far following the lifecycle of a request. The challenge I run into is the (this could be the wrong terminology) blueprint ID name does not match the service name and I see no way via the API today to find this relationship.
The example code here is a good example:
https://gist.github.com/55a18615fac6c659e3e7524090efe605 (Basically the question is where does vSphere_Machine_1 come from and how can I get it programmatically?)
Efffectively:
1. Login and get a Bearer Token
2. Get the catalog views for an ODATA query based on the name of the request (this is the name you see in the UI in the portal)
3. Get that request template using the ID from the previous request
Then everything I"ve seen before to navigate down into the JSON for this request, it has something that is effectively the blueprint ID (which is not the GUID of the request). This can look something like this:
---
...[some header json]
"data": {
"CENTOS_7_POSIX": {
"componentTypeId": "com.vmware.csp.component.cafe.composition",
... [lots more json]
}
---
Then to update and use this request I need to be able to reference the "CENTOS_7_POSIX".
ie. $Form.data.CENTOS_7_POSIX.data.cpu = 12
How do I find the translation table in the API from the name of the service request to what CENTOS_7_POSIX equivalent is?