def main_roagen(args, config, database): if args.protocol == 4: routes = (database.get(*spec) for spec in database.list() if spec[0] == "route") elif args.protocol == 6: routes = (database.get(*spec) for spec in database.list() if spec[0] == "route6") if args.flush: print("flush roa table {table}".format(table=args.table)) print("\n".join(lglass.generators.roa.roa_table(routes, args.table)))
def main_list_objects(args, config, database): for spec in database.list(): if args.types and spec[0] not in args.types: continue print("\t".join(spec))