diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2018-05-26 13:24:38 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-06-20 18:01:21 +0100 |
commit | 1e33fadeb225bfa14cbbe30e4606d3d79c323abf (patch) | |
tree | a607d86253dc519845ee916bf4c425b4ce3f57e1 | |
parent | 8c6d69af0b552fab3c371947c694a7f1187054f7 (diff) | |
download | sos-1e33fadeb225bfa14cbbe30e4606d3d79c323abf.tar.gz |
[sos,sosreport] add new SoSOptions.preset / --preset option
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/__init__.py | 7 | ||||
-rw-r--r-- | sos/sosreport.py | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sos/__init__.py b/sos/__init__.py index 9ec9166a..315d6777 100644 --- a/sos/__init__.py +++ b/sos/__init__.py @@ -46,8 +46,8 @@ _arg_names = [ 'all_logs', 'batch', 'build', 'case_id', 'chroot', 'compression_type', 'config_file', 'debug', 'enableplugins', 'experimental', 'label', 'list_plugins', 'list_profiles', 'log_size', 'noplugins', 'noreport', - 'onlyplugins', 'plugopts', 'profiles', 'quiet', 'sysroot', 'tmp_dir', - 'usealloptions', 'verbosity', 'verify' + 'onlyplugins', 'plugopts', 'preset', 'profiles', 'quiet', 'sysroot', + 'tmp_dir', 'usealloptions', 'verbosity', 'verify' ] #: Arguments with non-zero default values @@ -77,6 +77,7 @@ class SoSOptions(object): noreport = False onlyplugins = [] plugopts = [] + preset = "" profiles = [] quiet = False sysroot = None @@ -114,7 +115,7 @@ class SoSOptions(object): self.debug, self.enableplugins, self.experimental, self.label, self.list_plugins, self.list_profiles, self.log_size, self.noplugins, self.noreport, - self.onlyplugins, self.plugopts, self.product, + self.onlyplugins, self.plugopts, self.preset, self.profiles, self.quiet, self.sysroot, self.tmp_dir, self.usealloptions, self.verbosity, self.verify) diff --git a/sos/sosreport.py b/sos/sosreport.py index 2f4625d9..21884ace 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -273,6 +273,8 @@ def _parse_args(args): parser.add_argument("-o", "--only-plugins", action="extend", dest="onlyplugins", type=str, help="enable these plugins only", default=deque()) + parser.add_argument("--preset", action="store", type=str, + help="A preset identifier") parser.add_argument("-p", "--profile", action="extend", dest="profiles", type=str, default=deque(), help="enable plugins used by the given profiles") |