Closed GoogleCodeExporter closed 8 years ago
Hi John,
It seems that this is not a pysphere's bug but a vSphere SDK's. The reason I think so is the following:
This is the SOAP response I get when requesting AcquireCIMServicesTicket on a
disconnected host:
<soapenv:Fault>
<faultcode>ServerFaultCode</faultcode>
<faultstring>vim.fault.NoHost</faultstring>
<detail>
<NoHostFault xmlns="urn:vim25" xsi:type="SystemError">
<reason>Invalid fault</reason>
</NoHostFault>
</detail>
</soapenv:Fault>
Which is a NoHostFault
(http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.wssdk.apiref.doc_
50/vim.fault.NoHost.html)
The type descriptor (xsi:type) should be either a NoHost type or a superclass
of it. The response indicates that the type is "SystemError". So ZSI attempts
to create at runtime the object representation of this fault. However
inspecting the wsdl definition and the documentation you can see that
SystemError is not a superclass of NoHost.
Here's the class tree of NoHost:
NoHostFault->HostConnectFault->VimFault->MethodFault
And this is the SystemError tree:
SystemError->RuntimeFault->MethodFault
As you can see they are in separate branches (even though they both share
MethodFault class inheritance)
Summarizing, the server is sending the wrong type in the soap response.
As you found this, do you want to report it to VMWare yourself?
For the moment I'm closing this ticket as invalid.
Thanks for your time and cooperation!
By the way, I reproduced this with a vCenter 4.1.0, 345043 (this might be fixed
already in a newer version or more up-to-date patch)
Original comment by argo...@gmail.com
on 16 Mar 2012 at 9:30
Thanks Seba. I tried it on the latest vCenter server and got the failure. I
understand the problem now and how you can't do anything about it. It doesn't
really matter - I just capture TypeError and treat it like NoHost (sadly). If I
really need to distinguish between a NoHost TypeError and a real type error, I
can just look at the error object's attributes to figure out if it's related to
the NoHost issue.
John
Original comment by john.cal...@gmail.com
on 17 Mar 2012 at 1:10
Original issue reported on code.google.com by
argo...@gmail.com
on 16 Mar 2012 at 5:38