Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var vmEntity = System.getModule("com.vmware.library.vcac").getVirtualMachineEntity(host,virtualMachine);
- var requestId = getVmEntityPropertyValue(host, vmEntity, "__Cafe.Root.Request.Id");
- return requestId;
- function getVmEntityPropertyValue(host, vmEntity, propertyName) {
- var virtualMachinePropertiesEntities = vmEntity.getLink(host, "VirtualMachineProperties");
- for each (var virtualMachinePropertiesEntity in virtualMachinePropertiesEntities) {
- if (virtualMachinePropertiesEntity.getProperty("PropertyName") == propertyName) {
- return virtualMachinePropertiesEntity.getProperty("PropertyValue");
- }
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement