Implement support for more attributes and handle data type collisions when merging monitor group definitions

This commit is contained in:
2018-07-28 21:33:50 +01:00
parent edea19222d
commit 00985d29c5
4 changed files with 74 additions and 37 deletions

View File

@@ -1,4 +1,5 @@
import main
from yaml import dump
class List:
def __init__(self, register):
@@ -6,13 +7,7 @@ class List:
def list(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
if authed:
poolMap = []
for i in main.pool.keys():
poolMap.append("Server: %s" % i)
for x in main.pool[i].keys():
poolMap.append(" %s: %s" % (x, main.pool[i][x]))
poolMap.append("\n")
info("\n".join(poolMap))
info(dump(main.pool))
return
else:
incUsage(None)