salt.states.netsnmp

Network SNMP

Manage the SNMP configuration on network devices.

codeauthor:

Mircea Ulinic <ping@mirceaulinic.net>

maturity:

new

depends:

napalm

platform:

unix

Dependencies

New in version 2016.11.0.

salt.states.netsnmp.managed(name, config=None, defaults=None)

Configures the SNMP on the device as specified in the SLS file.

SLS Example:

snmp_example:
    netsnmp.managed:
         - config:
            location: Honolulu, HI, US
         - defaults:
            contact: noc@cloudflare.com

Output example (for the SLS above, e.g. called snmp.sls under /router/):

$ sudo salt edge01.hnl01 state.sls router.snmp test=True
edge01.hnl01:
----------
          ID: snmp_example
    Function: snmp.managed
      Result: None
     Comment: Testing mode: configuration was not changed!
     Started: 13:29:06.872363
    Duration: 920.466 ms
     Changes:
              ----------
              added:
                  ----------
                  chassis_id:
                      None
                  contact:
                      noc@cloudflare.com
                  location:
                      Honolulu, HI, US

Summary for edge01.hnl01
------------
Succeeded: 1 (unchanged=1, changed=1)
Failed:    0
------------
Total states run:     1
Total run time: 920.466 ms