VMware Cloud Community
YestoVI
VMware Employee
VMware Employee

Basic Question about getting Business Group name from the payload

How can I get the business group name from in vRO for a virtual machine? I looked at the payload, but that did not contain the business group name. Would appreciate some guidance. Thanks!
0 Kudos
2 Replies
daphnissov
Immortal
Immortal

It's known as subTenant and you can get it if you've exposed system level custom properties for the given phase of the EBS.

0 Kudos
KThorlund
Enthusiast
Enthusiast

It is not a part of the payload, but you can press it down on the blueprint/deployment/vm in a property when you make your request. Use the tenant/sub tenant in the form. Notice there is a bug in the BG group name, thou, but you can easily look it up via the group ID.

var vRAHost = Server.findAllForType("vCAC:vCACHost")[0];

entity = vCACEntityManager.readModelEntitiesBySystemQuery(vRAHost.id, "ManagementModelEntities.svc", "HostReservations", "ProvisioningGroup/GroupID eq guid'" + groupID + "'");

for each (groupEntities in entity)

{

     groupLabel = groupEntities.getProperty("HostReservationName");

     return groupLabel;

}

0 Kudos