Add netns support check
Change-Id: I03d0a6bebaeddddcbcf49c376ff1c9d03ff1bdec Fixes: rhbz#966560
This commit is contained in:
@@ -143,3 +143,20 @@ def validate_puppet_logfile(logfile):
|
||||
logging.error("Error during remote puppet apply of " + manifestfile)
|
||||
logging.error(data)
|
||||
raise PackStackError(message)
|
||||
|
||||
|
||||
def scan_puppet_logfile(logfile):
|
||||
"""
|
||||
Returns list of packstack_info/packstack_warn notices parsed from
|
||||
given puppet log file.
|
||||
"""
|
||||
output = []
|
||||
notice = re.compile(r"notice: .*Notify\[packstack_info\]"
|
||||
"\/message: defined \'message\' as "
|
||||
"\'(?P<message>.*)\'")
|
||||
with open(logfile) as content:
|
||||
for line in content:
|
||||
match = notice.search(line)
|
||||
if match:
|
||||
output.append(match.group('message'))
|
||||
return output
|
||||
|
||||
Reference in New Issue
Block a user