Add a CLI output emitter (either to stdout or to filename), based on plan --output/-o flag
This commit is contained in:
4
vppcfg
4
vppcfg
@ -50,6 +50,8 @@ def main():
|
||||
if args.quiet:
|
||||
level = logging.WARNING
|
||||
logging.basicConfig(format='[%(levelname)-8s] %(name)s.%(funcName)s: %(message)s', level=level)
|
||||
if not args.command:
|
||||
args.command="check" ## Default check-only
|
||||
|
||||
try:
|
||||
with open(args.config, "r") as f:
|
||||
@ -106,6 +108,8 @@ def main():
|
||||
failed = True
|
||||
logging.warning("Planning sync failure, continuing due to --force")
|
||||
|
||||
r.write(args.outfile, ok=not failed)
|
||||
|
||||
if failed:
|
||||
logging.error("Planning failed")
|
||||
sys.exit(-40)
|
||||
|
Reference in New Issue
Block a user