java - how to get vm permissions in vijava -
i'm trying permissions of virtual machine using vijava this:
managedentity me = new inventorynavigator(rootfolder).searchmanagedentity("virtualmachine", vmname); virtualmachine vm = (virtualmachine) me; (permission permission : vm.getpermission()) { system.out.println(permission.getprincipal()); }
with permissions applied vm.
how can total permissions on virtual machine including inherited?
i'm not sure if that's possible, because each list of permissions associated specific entity (i.e. virtualmachine, hostsystem, etc..).
the way i'd i'd underlying entities virtual machine , permissions well. example, since have virtualmachine object, underlying hostsystem , retrieve it's permissions, , on.
managedentity me = new inventorynavigator(rootfolder).searchmanagedentity("virtualmachine", vmname); virtualmachine vm = (virtualmachine) me; // assuming have serviceinstance object si. hostsystem host = (hostsystem)morutil.createexactmanagedentity(si .getserverconnection(),vm.getruntime().host); permission[] hostpermissions = host.getpermission();
i hope helps.
Comments
Post a Comment