we are using python script to download running config for certain node and sometimes we need to interrupt the process can you provide us with the method, below is the script we are using
from __future__ import print_function
import re
import requests
from orionsdk import SwisClient
from time import sleep
import sys
requests.packages.urllib3.disable_warnings()
npm_server = '172.21.53.103'
username = 'Admin'
password = 'Solarwinds1'
swis = SwisClient(npm_server, username, password)
ip = sys.argv[1]
query = "SELECT NodeID FROM Cirrus.Nodes WHERE AgentIP = '" + ip + "'"
data = swis.query(query)['results']
nodeIDs = []
#nodeID = data[0]["NodeID"]
for entry in data:
nodeIDs.append(entry["NodeID"])
#print(nodeID)
transferIDs = swis.invoke('Cirrus.ConfigArchive', 'DownloadConfig', nodeIDs, 'Running')
print(str(transferIDs).strip('[]').replace(" ", "").replace("'", ""))