diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2020-08-04 15:42:05 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-08-14 12:39:08 -0400 |
commit | cc2c50ba0d42976a4e17c6f7d30bdd9a48aa3e06 (patch) | |
tree | 9cd62677f364c8aac61321b06ca3a536174251e3 /AUTHORS | |
parent | e7776f2df9fc3fc7ac07b8134c0eb3922df2241b (diff) | |
download | sos-cc2c50ba0d42976a4e17c6f7d30bdd9a48aa3e06.tar.gz |
[Plugin] Add regex matching for adding tags
For some time now, the prevailing style in sos has been to group
commands and file collections into lists, and pass those lists into
single `add_copy_spec()` or `add_cmd_output()` calls. This however
presents an issue when trying to retroactively add tags to these
commands or files individually as the `tags` argument is applied against
the whole call.
To fix this, without having to break out commands or creating confusing
for loops, add a new `add_cmd_tags()` method that takes a `dict` of
command regex keys, whose values are the tag(s) that should be added to
commands matching those regexes.
As tags are determined at collection time, and not during `setup()`,
this method may be called at any point during `setup()` regardless of
when the `add_cmd_output()` calls are made.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'AUTHORS')
0 files changed, 0 insertions, 0 deletions