cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1119
Views
2
Helpful
1
Replies

ConvertToPython() not generating python APIs

nchekuri
Level 1
Level 1

Hi,

I'm using powershell with python SDK to get the APIs from the GUI and it looks like for some operations like creating IPMI access policy, create service profile etc..,  it bails out with the following error. Are these operations supported by power shell ? Do we have python APIs for these operations ? Do we have python API reference guide just as the XML guide for B series ?

### Please review the generated cmdlets before deployment.

### Script Output is in file < C:\Users\Administrator\Desktop\generation.txt >

Traceback (most recent call last):

  File "script.py", line 6, in <module>

    ConvertToPython(dumpToFile=True, dumpFilePath=outpath)

  File "C:\Python27\lib\site-packages\UcsSdk\WatchUcsGui.py", line 1227, in Conv                                                               ertToPython

    FindXmlRequestsInFile_test(fileStream, True)

  File "C:\Python27\lib\site-packages\UcsSdk\WatchUcsGui.py", line 1126, in Find                                                               XmlRequestsInFile_test

    ExtractXML(fileStream, line)

  File "C:\Python27\lib\site-packages\UcsSdk\WatchUcsGui.py", line 1109, in Extr                                                               actXML

    GenerateCmdlets(requestString)

  File "C:\Python27\lib\site-packages\UcsSdk\WatchUcsGui.py", line 1064, in Gene                                                               rateCmdlets

    cmdlet = GenerateConfigConfCmdlets(xmlString)

  File "C:\Python27\lib\site-packages\UcsSdk\WatchUcsGui.py", line 524, in Gener                                                               ateConfigConfCmdlets

    node = topNode.getElementsByTagName("inConfig")[0]

IndexError: list index out of range

Thanks,

Naveen

1 Reply 1

Geevarghese Cheria
Cisco Employee
Cisco Employee


Hi Naveen,

I would request you to refer the following url  for related information.

https://developer.cisco.com/site/data-center/ucs-system-mgmt/ucs-dev-center/documentation/

   Did you had chance to browse this url- Cisco UCS Python SDK

Thanks and Regards,

Geevarghese

Review Cisco Networking products for a $25 gift card