Commit a0e64482 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Cover roles with --check option

parent 897d6611
......@@ -275,6 +275,7 @@ if __name__ == '__main__':
hostinfo.dhcpd.generate(tree, options)
hostinfo.dhcpd_ipv6.generate(tree, options)
hostinfo.automount.generate(tree, None)
hostinfo.role.generate(tree, None, None)
if options.dfs:
......@@ -2,6 +2,9 @@ import hostinfo.util as util
def generate(tree, host, roles):
by_role = get_all(tree)
if host == None and roles == None:
# Just doing sanity check of hostinfo.xml file
return None
for r in roles:
if not r in by_role:
raise Exception("Role '%s' not found in %s" %
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment