Class: SNMP::Open::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/snmp/open/options.rb

Constant Summary collapse

MAP =

see snmpcmd(1) for explanation of options

{
  version: '-v',
  auth_password: '-A',
  auth_protocol: '-a',
  community: '-c',
  context: '-n',
  no_check_increasing: {
    'snmpbulkwalk' => '-Cc',
    'snmpwalk' => '-Cc'
  },
  no_mib_name: '-Os',
  no_units: '-OU',
  non_symbolic: '-Oe',
  non_symbolic_table_indexes: '-Ob',
  numeric: '-On',
  priv_password: '-X', # not recommended, see snmp.conf(5)
  priv_protocol: '-x',
  sec_level: '-l',
  sec_user: '-u',
  retries: '-r',
  timeout: '-t',
  host: nil
}.freeze
REQUIRED_BY_PARSER =

On some systems, SNMP command outputs will include symbolic values, table indexes, and/or value units. The parser doesn’t support these, so disable them.

{
  '-Ob' => nil,
  '-Oe' => nil,
  '-OU' => nil
}.freeze
VALUES =
{
  no_check_increasing: {
    true => ''
  }.freeze
}.freeze