Archived
1
0

Added short cli opts. (@HariSekhon)

This commit is contained in:
Markus Birth 2016-12-13 17:26:49 +01:00
parent 6125297674
commit f61586a9a3

View File

@ -392,12 +392,12 @@ def main():
tester = YumTester()
parser = OptionParser()
parser.add_option("--all-updates",
parser.add_option("-A", "--all-updates",
action="store_true",
dest="all_updates",
help="Does not distinguish between security and non-security updates, but returns critical for any available update. This may be used if the YUM security plugin is absent or you want to maintain every single package at the latest version. You may want to use --warn-on-any-update instead of this option.")
parser.add_option("--warn-on-any-update",
parser.add_option("-W", "--warn-on-any-update",
action="store_true",
dest="warn_on_any_update",
help="Warns if there are any (non-security) package updates available. By default only warns when security related updates are available. If --all-updates is used, then this option is redundant as --all-updates will return a critical result on any available update, whereas using this switch still allows you to differentiate between the severity of updates.")
@ -407,21 +407,21 @@ def main():
dest="no_cache_update",
help="Run entirely from cache and do not update the cache when running YUM. Useful if you have 'yum makecache' cronned so that the nagios check itself doesn't have to do it, possibly speeding up execution (by 1-2 seconds in tests).")
parser.add_option("--no-warn-on-lock",
parser.add_option("-N", "--no-warn-on-lock",
action="store_true",
dest="no_warn_on_lock",
help="Return OK instead of WARNING when YUM is locked and fails to check for updates due to another instance running. This is not recommended from the security standpoint, but may be wanted to reduce the number of alerts that may intermittently pop up when someone is running YUM interactively for package management.")
help="Return OK instead of WARNING when YUM is locked and fails to check for updates due to another instance running. This is not recommended from the security standpoint, but may be wanted to reduce the number of alerts that may intermittently pop up when someone is running YUM for package management.")
parser.add_option("--no-warn-on-updates",
action="store_true",
dest="no_warn_on_updates",
help="Return OK instead of WARNING even when updates are available. This is not recommended from the security standpoint, but may be wanted to disable alerts while the plugin output still shows the number of available updates.")
parser.add_option("--enablerepo",
parser.add_option("-e", "--enablerepo",
dest="repository_to_enable",
help="Explicitly enables a reposity when calling YUM. Can take a comma separated list of repositories. Note that enabling repositories can lead to unexpected results, for example when protected repositories are enabled.")
parser.add_option("--disablerepo",
parser.add_option("-d", "--disablerepo",
dest="repository_to_disable",
help="Explicitly disables a repository when calling YUM. Can take a comma separated list of repositories. Note that disabling repositories can lead to unexpected results, for example when protected repositories are disabled.")