cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
448
Views
0
Helpful
0
Replies
Cisco Employee

Automating SNMP trap testing (78 sample apps)

We all hope to leave SNMP behind, but for the time being, we'll have to deal with it.  Now, if we want to test SNMP traps, IOS XR defines 33 RPCs in the model Cisco-IOS-XR-snmp-test-trap-act.yang.  You will find 78 sample apps for entity, infra, interface, platform, routing and snmp traps.  You can review the commit for details.  This is the list of sample apps:

SNMP Agent

nc-execute-xr-snmp-test-trap-act-200-ydk.py - SNMPv2-MIB::coldStart

nc-execute-xr-snmp-test-trap-act-201-ydk.py - SNMPv2-MIB::warmStart

Infra

nc-execute-xr-snmp-test-trap-act-210-ydk.py - infra-syslog-message-generated

nc-execute-xr-snmp-test-trap-act-211-ydk.py - infra-flash-device-inserted

nc-execute-xr-snmp-test-trap-act-212-ydk.py - infra-flash-device-removed

nc-execute-xr-snmp-test-trap-act-213-ydk.py - infra-redundancy-progression

nc-execute-xr-snmp-test-trap-act-214-ydk.py - infra-redundancy-switch

nc-execute-xr-snmp-test-trap-act-215-ydk.py - infra-bridge-new-root

nc-execute-xr-snmp-test-trap-act-216-ydk.py - infra-bridge-topology-change

nc-execute-xr-snmp-test-trap-act-217-ydk.py - infra-config-event

Interface

nc-execute-xr-snmp-test-trap-act-112-ydk.py - boilerplate link-up

nc-execute-xr-snmp-test-trap-act-113-ydk.py - boilerplate link-down

nc-execute-xr-snmp-test-trap-act-114-ydk.py - boilerplate session status

nc-execute-xr-snmp-test-trap-act-115-ydk.py - boilerplate line status

nc-execute-xr-snmp-test-trap-act-116-ydk.py - boilerplate path status

nc-execute-xr-snmp-test-trap-act-300-ydk.py - link-up (default)

nc-execute-xr-snmp-test-trap-act-302-ydk.py - link-up with ifindex

nc-execute-xr-snmp-test-trap-act-304-ydk.py - link-down (default)

nc-execute-xr-snmp-test-trap-act-306-ydk.py - link-down with ifindex

nc-execute-xr-snmp-test-trap-act-308-ydk.py - sonet session status

nc-execute-xr-snmp-test-trap-act-310-ydk.py - sonet session status ifidx

nc-execute-xr-snmp-test-trap-act-312-ydk.py - sonet line status

nc-execute-xr-snmp-test-trap-act-314-ydk.py - sonet line status ifindex

nc-execute-xr-snmp-test-trap-act-316-ydk.py - sonet path status

nc-execute-xr-snmp-test-trap-act-318-ydk.py - sonet path status ifindex

Entity

nc-execute-xr-snmp-test-trap-act-125-ydk.py - boilerplate sensor thld

nc-execute-xr-snmp-test-trap-act-126-ydk.py - boilerplate FRU power

nc-execute-xr-snmp-test-trap-act-127-ydk.py - boilerplate FRU mod st up

nc-execute-xr-snmp-test-trap-act-128-ydk.py - boilerplate FRU mod st dn

nc-execute-xr-snmp-test-trap-act-129-ydk.py - boilerplate FRU fan st up

nc-execute-xr-snmp-test-trap-act-130-ydk.py - boilerplate FRU fan insert

nc-execute-xr-snmp-test-trap-act-131-ydk.py - boilerplate FRU fan remove

nc-execute-xr-snmp-test-trap-act-400-ydk.py - sensor threshold (default)

nc-execute-xr-snmp-test-trap-act-402-ydk.py - sensor thld with entindex

nc-execute-xr-snmp-test-trap-act-404-ydk.py - FRU power change (default)

nc-execute-xr-snmp-test-trap-act-406-ydk.py - FRU power chg w/ entindex

nc-execute-xr-snmp-test-trap-act-408-ydk.py - FRU mod status up (dflt)

nc-execute-xr-snmp-test-trap-act-410-ydk.py - FRU mod st up w/ entindex

nc-execute-xr-snmp-test-trap-act-412-ydk.py - FRU mod status dn (dflt)

nc-execute-xr-snmp-test-trap-act-414-ydk.py - FRU mod st dn w/ entindex

nc-execute-xr-snmp-test-trap-act-416-ydk.py - FRU fan status up (dflt)

nc-execute-xr-snmp-test-trap-act-418-ydk.py - FRU fan st up w/ entindex

nc-execute-xr-snmp-test-trap-act-420-ydk.py - FRU fan insert (default)

nc-execute-xr-snmp-test-trap-act-422-ydk.py - FRU fan insert w/ entindex

nc-execute-xr-snmp-test-trap-act-424-ydk.py - FRU fan remove (default)

nc-execute-xr-snmp-test-trap-act-426-ydk.py - FRU fan remove w/ entindex

Platform

nc-execute-xr-snmp-test-trap-act-132-ydk.py - boilerplate bundle downed

nc-execute-xr-snmp-test-trap-act-133-ydk.py - boilerplate bundle state

nc-execute-xr-snmp-test-trap-act-134-ydk.py - boilerplate plane state

nc-execute-xr-snmp-test-trap-act-440-ydk.py - bundle downed link (dflt)

nc-execute-xr-snmp-test-trap-act-442-ydk.py - bundle downed link w/ name

nc-execute-xr-snmp-test-trap-act-444-ydk.py - bundle state (default)

nc-execute-xr-snmp-test-trap-act-446-ydk.py - bundle state with name

nc-execute-xr-snmp-test-trap-act-448-ydk.py - plane state (default)

nc-execute-xr-snmp-test-trap-act-450-ydk.py - plane state with id

BGP

nc-execute-xr-snmp-test-trap-act-135-ydk.py - boilerplate BGP est

nc-execute-xr-snmp-test-trap-act-136-ydk.py - boilerplate BGP state ch

nc-execute-xr-snmp-test-trap-act-500-ydk.py - BGP est peer (default)

nc-execute-xr-snmp-test-trap-act-502-ydk.py - BGP est peer w/ address

nc-execute-xr-snmp-test-trap-act-504-ydk.py - BGP state ch (default)

nc-execute-xr-snmp-test-trap-act-506-ydk.py - BGP state ch w/ address

OSPF

nc-execute-xr-snmp-test-trap-act-137-ydk.py - boilerplate OSPF nbr state

nc-execute-xr-snmp-test-trap-act-510-ydk.py - OSFP nbr state (default)

nc-execute-xr-snmp-test-trap-act-512-ydk.py - OSPF nbr state w/ address

nc-execute-xr-snmp-test-trap-act-514-ydk.py - OSFP nbr state w/ ifindex

MPLS

nc-execute-xr-snmp-test-trap-act-138-ydk.py - boilerplate LDP session dn

nc-execute-xr-snmp-test-trap-act-139-ydk.py - boilerplate tun re-rerouted

nc-execute-xr-snmp-test-trap-act-140-ydk.py - boilerplate tun re-opt

nc-execute-xr-snmp-test-trap-act-141-ydk.py - boilerplate tunnel down

nc-execute-xr-snmp-test-trap-act-520-ydk.py - LDP session down (default)

nc-execute-xr-snmp-test-trap-act-522-ydk.py - LDP session dn entity/peer

nc-execute-xr-snmp-test-trap-act-530-ydk.py - tunnel re-routed (default)

nc-execute-xr-snmp-test-trap-act-532-ydk.py - tunnel re-routed w/src-dst

nc-execute-xr-snmp-test-trap-act-540-ydk.py - tunnel re-opt (default)

nc-execute-xr-snmp-test-trap-act-542-ydk.py - tunnel re-opt w/src-dst

nc-execute-xr-snmp-test-trap-act-550-ydk.py - tunnel down (default)

nc-execute-xr-snmp-test-trap-act-552-ydk.py - tunnel down w/src-dst

All traps

nc-execute-xr-snmp-test-trap-act-900-ydk.py - all traps

Give them a try!

Everyone's tags (6)