diff --git a/pepper/cli.py b/pepper/cli.py index 68901d9..2048203 100644 --- a/pepper/cli.py +++ b/pepper/cli.py @@ -108,6 +108,21 @@ def parse(self): ''') ) + self.parser.add_option( + '--state-output', dest='state_output', default="full", type="choice", + choices = [ "full", "terse", "mixed", "changes", "filter" ], + help=textwrap.dedent(''' + Output mode for highstate formatter + ''') + ) + + self.parser.add_option( + '--state-verbose', dest='state_verbose', default=None, + help=textwrap.dedent(''' + Set to false to hide results with no changes + ''') + ) + self.parser.add_option( '--output-file', dest='output_file', default=None, help=textwrap.dedent(''' diff --git a/pepper/script.py b/pepper/script.py index 21afe63..a261f19 100755 --- a/pepper/script.py +++ b/pepper/script.py @@ -36,6 +36,11 @@ def __init__(self): self.opts = {} if self.cli.options.output_file is not None: self.opts['output_file'] = self.cli.options.output_file + if self.cli.options.state_output is not None: + self.opts['state_output'] = self.cli.options.state_output + if self.cli.options.state_verbose is not None: + self.opts['state_verbose'] = self.cli.options.state_verbose in [ "true", "True", "1" ] + @property def output(self):