Hi all,
when we want to create from vRO a new reservation it's necessary (not mandatory) to push a ResourcePool ID....
{
"key" : "resourcePool",
"value" : {
"type" : "entityRef",
"componentId" : null,
"classId" : "ResourcePools",
"id" : "79e1f291-1001-4ec3-b0b2-c094f8fc865e",
"label" : "Resources
}
Resource pool in a reservation :
This ID is available in a IaaS DB :
We try to retrieve this ID from vRO VCPlugIn but without success. We can only find the ResourcePoolUniqueID from vRO VCPlugIn.......
How we can FIND this ResourcePoolID linked to a vCenter Cluster from vRO ?
Where vRA stores this information :
Thx for your help.
My workaround was. I've just retrieved the whole list of my reservations(which have been already created through the UI).
GET /reservation-service/api/reservations/ HTTP/1.1
Host:
Accept: application/json
Authorization: Bearer
and reuse date from this json subtenantId reservationPoliceId and etc
"tenantId": "sqa",
"subTenantId": "d528afd1-e3a9-40da-b1be-a6959190519c",
"enabled": true,
"priority": 1,
"reservationPolicyId": "53960127-0697-4fe6-b38d-097989f17c87",
So it is easer way to retrieve all data
1.Create through UI reservation
2. Retrieve through the API
3. Reuse all ids
Hopefully, It will work for you
Thx for your feedback.... @lrafikova
This workaround is not possible for us.
So, when we create the reservation we leave resourcePool blank.
The workaround for assigne a resourcePool is :
- When we call the IaaS blueprint from the XaaS blueprint to create a new Virtual Machine we have create a SWITCH section to push NEW CUSTOM PROPERTY : Infrastructure.ResourcePool.Name
INPUT workflow = network
// Assign resourcePool on vCenter based on Network Input
switch (true) {
case (network.indexOf('ADMIN') >= 0):
jsonPRProperties["Infrastructure.ResourcePool.Name"] = "Production_ADMN_R1";
break;
case (network.indexOf('IBE1') >= 0):
jsonPRProperties["Infrastructure.ResourcePool.Name"] = "Production_IBE1_R1";
break;
case (network.indexOf('IBE2') >= 0):
jsonPRProperties["Infrastructure.ResourcePool.Name"] = "Production_IBE2_R1";
break;
case (network.indexOf('HBE1') >= 0):
jsonPRProperties["Infrastructure.ResourcePool.Name"] = "Production_HBE1_R1";
break;
case (network.indexOf('HBE2') >= 0):
jsonPRProperties["Infrastructure.ResourcePool.Name"] = "Production_HBE2_R1";
break;
case (network.indexOf('HBE3') >= 0):
jsonPRProperties["Infrastructure.ResourcePool.Name"] = "Production_HBE3_R1";
break;
case (network.indexOf('SHARED') >= 0):
jsonPRProperties["Infrastructure.ResourcePool.Name"] = "Production_SHAR_R1";
break;
case (network.indexOf('IWT1') >= 0):
jsonPRProperties["Infrastructure.ResourcePool.Name"] = "Production_IWT1_R1";
break;
case (network.indexOf('HWT1') >= 0):
jsonPRProperties["Infrastructure.ResourcePool.Name"] = "Production_HWT1_R1";
break;
}