All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RemoveUserFromServiceConfig.py
Go to the documentation of this file.
1 #!/usr/bin/env python2
2 
3 import sys, re
4 
5 import SerialSubstitution
6 from SerialSubstitution import AddProcessor, RunSubstitutor
7 
8 
9 ################################################################################
10 if __name__ == "__main__":
11 
12  #############################################################################
13  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
14  # All files (no file selection)
15  #
17 
18  Subst.AddRegExRemoveLine(r"\s*user\s*:\s*\{\s*\}\s*")
19  Subst.AddRegExPattern (r"user:(\s+)@local::", r" \1@table::")
20  Subst.AddRegExPattern (r"user:(\s+)\{\s*(.*)\s*\}\s*", r"\2")
21  Subst.AddSimplePattern ("services.user.", "services.")
22 
23  Subst.AddWarningPattern (r"user\s*:", "Manual intervention may be required")
24 
25 
26  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
27  #############################################################################
28 
29  sys.exit(RunSubstitutor())
30 #