Sha256: 35089a18e3cec7a4a1a2fabaee961f295aff18ef28b77f53bc18115b4909c09e

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

module SNMP
  class Open
    class Options
      # see snmpcmd(1) for explanation of options
      MAP = {
        version: '-v',
        auth_password: '-A',
        auth_protocol: '-a',
        community: '-c',
        context: '-n',
        no_check_increasing: {
          'snmpbulkwalk' => '-Cc',
          'snmpwalk' => '-Cc'
        },
        no_units: '-OU',
        non_symbolic: '-Oe',
        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

      # On some systems, SNMP command outputs will include symbolic values
      # and/or value units. The parser doesn't support these, so disable them.
      REQUIRED_BY_PARSER = {
        '-Oe' => nil,
        '-OU' => nil
      }.freeze

      VALUES = {
        no_check_increasing: {
          true => ''
        }.freeze
      }.freeze
    end # class Options
  end # class Open
end # module SNMP

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
snmp-open-0.6.1 lib/snmp/open/options.rb
snmp-open-0.6.0 lib/snmp/open/options.rb