Method: Rbeapi::Netdev::Snmp#snmp_notification_receivers

Defined in:
lib/rbeapi/netdev/snmp.rb

#snmp_notification_receiversArray<Hash<Symbol,Object>>

snmp_notification_receivers obtains a list of all the snmp notification receivers and returns them as an Array of resource hashes suitable for the provider’s new class method. This command maps the ‘show snmp host` command to an array of resource hashes.

Returns:

  • Array of resource hashes.

API:

  • public



55
56
57
58
59
60
# File 'lib/rbeapi/netdev/snmp.rb', line 55

def snmp_notification_receivers
  cmd = 'show snmp host'
  result = node.enable(cmd)
  text = result.first[:result]['output']
  parse_snmp_hosts(text)
end