Just want to drop this note, so no one else gets bother with my query. I was able to find the reason and its fixed. It seems one of the ENUMs deep inside one of the structures was not defined. I am not sure if single step is the only way to solve such issues, as ESX_VI_ERROR never provided any useful information.
 
Thanks!
Ata
 
Sent: Monday, July 16, 2012 2:59 PM
To: LIbvirt
Subject: [libvirt] ESX: failure while performing "CastFromAnyType"
 
Hi All,
 
I am trying to extend “iscsi” support for iSCSI driver, currently am stuck at getting iSCSI target list from the hypervisor. I am using hostSystem object (propertyNameList is set to “config.storageDevice.hostBusAdapter”) to retrieve list of “HostHostBusAdapter” from ESX, but the call fails to perform “CastFromAnyType”  from ObjectContent –> HostHostBusAdapter. The esx_vi_generator.input object definition looks like this:
 
object HostHostBusAdapter
    String                                   key                            o   
    String                                   device                         r   
    Int                                      bus                            r   
    String                                   status                         r   
    String                                   model                          r   
    String                                   driver                         o   
    String                                   pci                            o   
end
 
esx_vi_generaor.py is modified as follows:
 
"HostHostBusAdapter"         : Object.FEATURE__ANY_TYPE |
                               Object.FEATURE__LIST,
 
Using gdb, I see the failure occurs at: esx/esx_vi.c:esxVI_List_CastFromAnyType(..) line 1631:
 
..
if (esxVI_AnyType_Deserialize(childNode, &childAnyType) < 0 ||
    castFromAnyTypeFunc(childAnyType, &item) < 0 ||
    esxVI_List_Append(list, item) < 0) {
    goto cleanup;
}
..
 
In one of my earlier patches (subject: Add routines to interface driver) I patched esx_vi_generator.py to deserialize “string list”; as the patch is still under review I manually applied the branch to this branch but no change (did not expect change as structure does not contain any list object). I am wondering what else is missing to make it work.
 
Any suggestion how to debug/fix this issue is highly appreciated.
 
Thanks!
Ata


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list