SearchIndex - What am I doing wrong

47 views
Skip to first unread message

rhyselsmore

unread,
Oct 16, 2012, 12:11:25 AM10/16/12
to psp...@googlegroups.com
Hi all,

First of all thanks for this great library, it makes things really easy.

Second of all, I was wondering if you can tell me what I may be doing wrong here:

from psphere.client import Client
from psphere.managedobjects import SearchIndex
client = Client()
client.invoke('FindAllByUuid',SearchIndex,uuid='421a7b64-b9aa-331b-1bc4-bb6816580c19',vmSearch=True,instanceUuid=True)

It appears to be throwing an error during debug which is:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="urn:vim25" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <ns1:Body>
      <ns0:FindAllByUuid>
         <ns0:uuid>421a7b64-b9aa-331b-1bc4-bb6816580c19</ns0:uuid>
         <ns0:vmSearch>true</ns0:vmSearch>
         <ns0:instanceUuid>true</ns0:instanceUuid>
      </ns0:FindAllByUuid>
   </ns1:Body>
</SOAP-ENV:Envelope>
http failed:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
<soapenv:Body>
<soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring></faultstring><detail><InvalidRequestFault xmlns="urn:vim25" xsi:type="InvalidRequest"></InvalidRequestFault></detail></soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

From what I can see, it isn't sending through the _type of searchindex. I am not too sure if this would be the problem.

Thanks in advance for your help, I have dug through the code but I can't see how I can fix this.

Cheers,
Rhys

Alan Sparks

unread,
Jul 19, 2013, 3:28:46 PM7/19/13
to psp...@googlegroups.com
Am having similar issues trying to find out how to do this... did you figure it out?
-Alan

Alan Sparks

unread,
Jul 19, 2013, 4:35:50 PM7/19/13
to psp...@googlegroups.com
I just found that doing the following seems to be working:

client.si.content.searchIndex.FindAllByUuid(uuid='4218e139-a0a2-dfc6-c311-090c098453ce',vmSearch=True)


Reply all
Reply to author
Forward
0 new messages