<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Times New Roman'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>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. 
</DIV>
<DIV> </DIV>
<DIV>Thanks!</DIV>
<DIV>Ata</DIV>
<DIV 
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=ata.husain@hotmail.com 
href="mailto:ata.husain@hotmail.com">Ata E Husain Bohra</A> </DIV>
<DIV><B>Sent:</B> Monday, July 16, 2012 2:59 PM</DIV>
<DIV><B>To:</B> <A title=libvir-list@redhat.com 
href="mailto:libvir-list@redhat.com">LIbvirt</A> </DIV>
<DIV><B>Subject:</B> [libvirt] ESX: failure while performing 
"CastFromAnyType"</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV 
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Times New Roman'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Hi All, </DIV>
<DIV> </DIV>
<DIV>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:</DIV>
<DIV> </DIV>
<DIV>object HostHostBusAdapter</DIV>
<DIV>    
String                                   
key                            
o    </DIV>
<DIV>    
String                                   
device                         
r    </DIV>
<DIV>    
Int                                      
bus                            
r    </DIV>
<DIV>    
String                                   
status                         
r    </DIV>
<DIV>    
String                                   
model                          
r    </DIV>
<DIV>    
String                                   
driver                         
o    </DIV>
<DIV>    
String                                   
pci                            
o    </DIV>
<DIV>end</DIV>
<DIV> </DIV>
<DIV>esx_vi_generaor.py is modified as follows:</DIV>
<DIV> </DIV>
<DIV>"HostHostBusAdapter"         : 
Object.FEATURE__ANY_TYPE |</DIV>
<DIV>                               
Object.FEATURE__LIST,</DIV>
<DIV> </DIV>
<DIV>Using gdb, I see the failure occurs at: 
esx/esx_vi.c:esxVI_List_CastFromAnyType(..) line 1631:</DIV>
<DIV> </DIV>
<DIV>..</DIV>
<DIV>if (esxVI_AnyType_Deserialize(childNode, &childAnyType) < 0 || 
</DIV>
<DIV>    castFromAnyTypeFunc(childAnyType, &item) < 0 || 
</DIV>
<DIV>    esxVI_List_Append(list, item) < 0) { </DIV>
<DIV>    goto cleanup;</DIV>
<DIV>}</DIV>
<DIV>..</DIV>
<DIV> </DIV>
<DIV>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.</DIV>
<DIV> </DIV>
<DIV>Any suggestion how to debug/fix this issue is highly appreciated.</DIV>
<DIV> </DIV>
<DIV>Thanks!</DIV>
<DIV>Ata</DIV></DIV></DIV>
<P>
<HR>
--<BR>libvir-list mailing 
list<BR>libvir-list@redhat.com<BR>https://www.redhat.com/mailman/listinfo/libvir-list</DIV></DIV></DIV></BODY></HTML>