def fix_star_host(root):
star_host = None
for host in root.childs:
if host.name == "*":
LOG.debug("Detected known '*' host.")
star_host = host
break
else:
LOG.debug("Add new '*' host.")
star_host = root.add_host("*")
values = collections.defaultdict(set)
values.update(root.values)
values.update(star_host.values)
star_host.values = values
star_host.trackable = True
root.values.clear()
return root
评论列表
文章目录