Hello guys,
I'm a beginner in vRO and i came on this forum for having some helps :
I'm working on vRA/vRO 7.3 and i cannot retriieve the minimum and maximum CPU in Machine Resources of Blueprints on my vRO workflow.
I already tried to check all properties for all blueprint class and all catalogItem class but when i retrieve their attributes / properties, i cannot find these informations.
My question : Is it possible to retrieve minimum and maximum CPU in Machine Resources of Blueprints on a workflow ? If yes, do you have any clue to do that ?
Thanks a lot,
jonathan
Had to try it out just to confirm I was correct
You can see the unique IDs in the highlights here
Once you have the ID you just do client.get("/blueprints/" + id) and then handle the JSON processing to get the values you want
I am not sure, but can see only one option.
You can get information about blueprint is you are creating VM from payload. And then you can ask vRA API for that blueprint and there you should be able to find min and max.
I hope someone confirm or deny my idea because as I said, I am not 100% sure
What is payload:
https://vmguru.com/2016/03/how-to-transfer-vrealize-automation-payload-to-orchestrator/
Since CompositeBlueprints were introduced you need to access those Min/Max/Default values on the Component within the blueprint. Sadly while the top-level CompositeBlueprint has a handling class the internal component objects do not.
However, you CAN use the vRA REST API to get the details of a Blueprint in a single request by using this API
This will return JSON which contains the details you want
You can access a REST client in two ways in vRO
1. Add the vRA node as a HTTP REST Host and go through the Auth process to get a Bearer token (plenty of blogs for this some using PowerShell or curl but the principles are the same)
OR
2. Use the vCACCAFEHost to get a CompositionClient and use that to request the Blueprint by ID
e.g.,
var compClient = cafeHost.getCompositionClient();
var blueprintResponse = compClient.get("/blueprint/" + blueprintId); // returns vCACCAFEServiceResponse
var bpJson = blueprintResponse.getBodyAsJson();
HTH
Had to try it out just to confirm I was correct
You can see the unique IDs in the highlights here
Once you have the ID you just do client.get("/blueprints/" + id) and then handle the JSON processing to get the values you want
Hello eoinbyrne,
Thanks for these informations, it's works fine.
Here a part of my code to retrieve minimum CPU and maximum CPU of blueprint with JSON parsing (i'll just need to change 'Machine' by a blueprint component name) :
I'll take a look on Rest API in the future
Jonathan