Hello
Trying to invoke the verb 'Cirrus.Nodes.AddConnectionProfile' using the Python SDK and unable to do so!
I normally end up with this error: 400 Client Error: Verb Cirrus.Nodes.AddConnectionProfile cannot unpackage parameter 0 with type SolarWinds.NCM.Contracts.InformationService.ConnectionProfile
Can anyone provide a working example, please?
Thanks
EDIT: Current code which produces above error:
#!/usr/bin/env python
import orionsdk
import urllib3
import xml.etree.cElementTree as ET
urllib3.disable_warnings()
npm_server = '1.1.1.1.'
username = 'user'
password = 'pass'
swis = orionsdk.SwisClient(npm_server, username, password)
test2 = '<ConnectionProfile xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.solarwinds.com/2007/08/informationservice/propertybag"><EnableLevel></EnableLevel><EnablePassword></EnablePassword><ExecuteScriptProtocol>SSH2</ExecuteScriptProtocol><ID>0</ID><Name>000-testvrf-switch</Name><Password>testpassword</Password><RequestConfigProtocol>SSH2</RequestConfigProtocol><SSHPort>22</SSHPort><TelnetPort>23</TelnetPort><TransferConfigProtocol>SSH2</TransferConfigProtocol><UseForAutoDetect>false</UseForAutoDetect><UserName>test-user</UserName></ConnectionProfile>'
xml = ET.ElementTree(test2)
root = xml.getroot()
print (root)
swis.invoke('Cirrus.Nodes', 'AddConnectionProfile', root)