diff -r 2db1a5323f92 -r 1b72f1e0cdbe bin/pvl.hosts-import --- a/bin/pvl.hosts-import Mon Dec 16 20:21:30 2013 +0200 +++ b/bin/pvl.hosts-import Mon Dec 16 20:25:32 2013 +0200 @@ -91,7 +91,10 @@ Yield host info from zonefile records. """ - for rr in pvl.dns.zone.ZoneRecord.load(file) : + for rr in pvl.dns.zone.ZoneRecord.load(file, + # generated hosts need to imported by hand... + expand_generate = False, + ) : if options.zone_unused and rr.name == options.zone_unused : log.debug("%s: skip %s", rr.name, rr) continue @@ -221,10 +224,12 @@ if match : matches = match.groupdict() + + log.info("%s: matched comment: %s", hostname, comment) break else : if options.zone_comments_default : - log.warn("%s: default comment: %s", hostname, comment) + log.info("%s: default comment: %s", hostname, comment) matches = { options.zone_comments_default: comment } else : log.warn("%s: unknown comment: %s", hostname, comment) @@ -327,7 +332,7 @@ yield 'comment-owner', comment yield 'owner', owner, - else : + elif 'group' in info or 'owner' in info : log.warn("%s: unknown owner: %s", host, info) yield 'comment-owner', "{group} / {owner}".format( group = info.get('group', ''),