Hello team,
I get the errormessage:
Traceback (most recent call last):
File "orion_api2.py", line 17, in
configSearch = swis.invoke('Cirrus.ConfigArchive', 'ConfigSearch', ' ', 'Running', cirrus_nodelist, 'true', 'true')
File "C:\Users\isemenov\AppData\Local\Programs\Python\Python38\lib\site-packages\orionsdk\swisclient.py", line 29, in invoke
return self._req(
File "C:\Users\isemenov\AppData\Local\Programs\Python\Python38\lib\site-packages\orionsdk\swisclient.py", line 63, in _req
resp.raise_for_status()
File "C:\Users\isemenov\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\models.py", line 941, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Verb Cirrus.ConfigArchive.ConfigSearch cannot unpackage parameter 2 with type System.String for url: https://solarwinds:17778/SolarWinds/InformationService/v3/Json/Invoke/Cirrus.ConfigArchive/ConfigSearch
during the following script execution:
import os
from getpass import getpass
from orionsdk import SwisClient
import pprint
os.system('clear')
server = 'solarwinds'
cirrus_nodelist = [1156]
#Enter credentials uname and pwd and keep it in creds dictionary
print('Enter credentials for solarwinds')
user = input("username:")
pwd = getpass()
swis = SwisClient(server, user, pwd)
configSearch = swis.invoke('Cirrus.ConfigArchive', 'ConfigSearch', ' ', 'Running', cirrus_nodelist, 'true', 'true')
pprint.pprint(configSearch)
#print(type(configSearch))
Using the script I would like to read device configs string by string to save them locally as files (more code is needed - I understand ). But at the moment I can't even read config from Solarinds via the "NCM Config Search".
Please, share your thoughts, what causes the error I get? Many thanks in advance!
Ilya