I am trying to find a way from VCO to figure out the VM or Requester email, first name, last name. I can currently get the owner from the code below, but I have not been able to figure out a simple method of getting email, first name, last name. I was thinking of going an hitting AD but that really becomes complicated based on multiple AD servers with multiple tenants. I know VCAC has this information, it can send emails, it shows your First Name Last Name in the top right corner. Currently I am using vCAC 6.1 and vCO 5.5.2.
Any idea on how I can get email, first name, and last name of the owner? Any help or pointers is appreciated.
var ownerEntity = virtualMachineEntity.getLink(vCACHost, "Owner")[0];
vmProperties.ownerName = ownerEntity.getProperty("UserName").toString();
System.log("OWNER: " + ownerEntity.toSource());
---- Output----
[2014-10-22 15:14:56.281] [I] OWNER: ({, entityKey:{UserID:"2"}, entitySetName:"Users", hostId:"a6574542-3b3a-4362-b8f0-b466cc011a56", internalId:"%282%29%40a6574542-3b3a-4362-b8f0-b466cc011a56%40ManagementModelEntities.svc%40Users", keyString:"(2)", modelName:"ManagementModelEntities.svc", pluginFactory:class com.vmware.o11n.plugin.dynamicops.VcacPluginFactory @364aeeff-31a6-4efd-8fd2-b2a69008eeb8; Wed Oct 22 19:14:55 UTC 2014, properties:{UserName:"xxxx@xxx.local", UserID:2}, type:"VCAC:Entity", wrappedEntity:OEntity[OProperty[UserID,EdmSimpleType[Edm.Int32],2],OProperty[UserName,EdmSimpleType[Edm.String],xxxx@xxx.local],OProperty[UserNameDescription,EdmSimpleType[Edm.String],null]]})
Thanks,
Tim
It always seems that the simple things take longer than the complex things....