Hello,
Has anyone discovered a way to change the owner of a VM thru vCO?
I can update the IaaS record with the new owner:
//Find the vCAC Owner Object var modelName = 'ManagementModelEntities.svc'; var entitySetName = 'Users'; var filter = "indexof(UserName,'" + Owner + "') gt -1"; var orderBy = ''; var top = 1; var skip = 0; var headers = null; var select = null; var entity = vCACEntityManager.readModelEntitiesBySystemQuery(vCACHost.id, modelName, entitySetName, filter, orderBy, select, top, skip, headers); System.log("User Name - " + entity[0].properties.get("UserName")); //Setup new links var links = { Owner: entity[0] } //Update VM with new Owner Link var updateProperties = new Properties(); System.getModule("com ibrary.vcac").updateVCACEntity(vCACHost.id, modelName, "VirtualMachines", vCACEntity.keyString, updateProperties, links, null);
Is there anyway to update this information in the CAFE database as well? The owner field on the custom resource object is read-only, and there is no method for setting the owner.
Thanks,
James