java - How to search the ManagedEntity by regular expression in ViJava -


i'm using vijava 5.5-beta. example want find vms names contains "sql". search managedentities of "virtalmachine" type , iterate them. can tell me, there fast search method that?

serviceinstance = new serviceinstance(new url(vcenter), constants.username, constants.password, true);             folder rootfolder = serviceinstance.getrootfolder();             managedentity[] mes = new inventorynavigator(rootfolder).searchmanagedentities("virtualmachine");             (managedentity me : mes) { // ....if (name.contains("sql"))...... } 

what doing going best way it. there no way pass filter in server filtering happens server side, , method using property collector , gets "name" property efficient.

just suggestion: yavijava open source drop in replacement vijava full support vsphere 6.0 have active community , many enhanced features vijava lacking.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -