* A warning message means the rule input and output of nft mismatches.
* An error message means the nft-tool shows an error when we add it or
the listing is broken after the rule is added.
+* An info message means something that is not necessarily related to any test
+ case and does not indicate faulty behaviour.
F) Acknowledgements
def print_warning(reason, filename=None, lineno=None):
print_msg(reason, "WARNING:", filename, lineno, Colors.YELLOW)
+def print_info(reason, filename=None, lineno=None):
+ print_msg(reason, "INFO:", filename, lineno, Colors.GREEN)
def color_differences(rule, other, color):
rlen = len(rule)
global log_file
try:
log_file = open(LOGFILE, 'w')
+ print_info("Log will be available at %s" % LOGFILE)
except IOError:
- print "Cannot open log file %s" % LOGFILE
+ print_error("Cannot open log file %s" % LOGFILE)
return
file_list = []