Hi<br><br>I am writing a small python script to get the name of all the VMs that matches a string.<br><br>==========<br>import sys<br>import getopt<br>import optparse<br>import os<br>import time<br>from ovirtsdk.api import API<br>

from ovirtsdk.xml import params<br><br>URL=&#39;<a href="https://192.168.1.1:8443/api">https://192.168.1.1:8443/api</a>&#39; #RHEVM API ACCESS URL<br>USERNAME=&#39;admin@internal&#39;<br>PASSWORD=&#39;ovirt&#39;<br><br><br>

api=API(url=URL, username=USERNAME, password=PASSWORD)<br><br>vmnames = api.vms.list(query = &#39;name=a&#39;)<br>print vmnames<br>==========<br><br>Print output is,<br><br>&lt;ovirtsdk.infrastructure.brokers.VM object at 0x1d4e790&gt;<br clear="all">

<br>I was expecting a list of VMs which contains &quot;a&quot; in their names.<br><br>Am I doing it correct? Can someone guide me with a small example?<br>My reference is <a href="http://www.ovirt.org/wiki/SDK#Querying_collection_with_oVirt_search_engine_query_.26_custom_constraint">http://www.ovirt.org/wiki/SDK#Querying_collection_with_oVirt_search_engine_query_.26_custom_constraint</a><br>

<br>Thanks,<br>Anil<br>