コード例 #1
0
    help_crit = """\
    Minimum and maximum number of allowable result, outside of which a
    critical will be generated.
    """
    help_crit = textwrap.dedent(help_crit)

    help_result = """\
    Specify the result on the command line rather than generating a
    random number. For testing.
    """
    help_result = textwrap.dedent(help_result)

    plugin.add_arg(
            '-w', '--warning',
            type = NagiosRange,
            metavar = 'RANGE',
            dest = 'warning',
            required = True,
            help = help_warn,
    )

    plugin.add_arg(
            '-c', '--critical',
            type = NagiosRange,
            metavar = 'RANGE',
            dest = 'critical',
            required = True,
            help = help_crit,
    )

    plugin.add_arg(
            '-r', '--result',