Quantcast
Channel: VMware Communities : All Content - vSphere Management SDK
Viewing all articles
Browse latest Browse all 1860

C# vSphere SDK: advanced search with VimClient.FindEntityViews()

$
0
0

Hi,

 

i'd like to do some advanced search with VimClient.FindEntityViews(Type viewType, ManagedObjectReference beginEntity, NameValueCollection filter, string[] properties). Actually i get some VMs based on the Name property of a VM like this:

 

VimClient client = getVimClient();

NameValueCollection nvc = new NameValueCollection();

nvc.Add("name", "some-Name");

List results = client.FindEntityViews(typeof(VirtualMachine), null, nvc, null);

/code

 

Then i have to sort out all VMs with special further properties manually in my C# program.

Is there a possibility to do searches like in SQL? I thought about something like

"Select all VMs where Name is not 'some-Name' "

 

Any suggestions?

Thanks and regards


Viewing all articles
Browse latest Browse all 1860

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>