This commit is contained in:
Sean Corrigan 2021-09-09 20:29:59 -04:00
parent fc3d3bcc6e
commit 3a35af3dbb

View File

@ -6,18 +6,21 @@ import os
# hostList = os.environ["hosts"] # hostList = os.environ["hosts"]
# hostList = hostList.split(",") # hostList = hostList.split(",")
# dev
# host
hostList = ['10.0.5.2', '10.0.5.181'] hostList = ['10.0.5.2', '10.0.5.181']
test = [] test = []
## pull all the UPSes froom each host ## pull all the UPSes froom each host
for host in hostList: for host in hostList:
input(host)
client = PyNUTClient(host, '3493') client = PyNUTClient(host, '3493')
for UPS in client.list_ups(): for UPS in client.list_ups():
test.append(str(UPS)) test.append(str(UPS))
print(test) print(test)
# client = PyNUTClient('10.0.5.2', '3493') # client = PyNUTClient('10.0.5.2', '3493')
# print(client.list_ups()) # print(client.list_ups())