From 389ac8bd97cd179f3356b7bc19bc0400e333d304 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 20 May 2015 20:07:06 +0200 Subject: [PATCH] tests: provide a complete test file for lldpcli Unfortunately, to be fully automated, we should be able to run lldpd as root and run the test as root as well. --- tests/lldpcli.conf | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/lldpcli.conf diff --git a/tests/lldpcli.conf b/tests/lldpcli.conf new file mode 100644 index 00000000..77038f1c --- /dev/null +++ b/tests/lldpcli.conf @@ -0,0 +1,52 @@ +# Try all commands. +# Keep those commands in the same order as the one in the manual page. + +show neighbors details hidden +show neighbors summary +show neighbors ports eth0 details +show configuration +show statistics +show statistics summary +show statistics ports eth0 +configure system hostname Batman +unconfigure system hostname +configure system description Batman +unconfigure system description +configure system platform Batman +unconfigure system platform +configure system interface pattern * +unconfigure system interface pattern +configure system interface description +unconfigure system interface description +configure system interface promiscuous +unconfigure system interface promiscuous +configure system ip management pattern * +unconfigure system ip management pattern +configure lldp portidsubtype ifname +configure lldp portidsubtype macaddress +configure lldp portidsubtype local Batman +configure lldp portidsubtype local Batman description Batman +configure lldp tx-interval 30 +configure lldp tx-hold 4 +configure lldp custom-tlv oui 33,44,55 subtype 44 +configure lldp custom-tlv oui 33,44,55 subtype 44 oui-info 45,45,45,45,45 +unconfigure lldp custom-tlv +configure system bond-slave-src-mac-type fixed +configure system bond-slave-src-mac-type local +configure med fast-start enable +configure med fast-start tx-interval 3 +unconfigure med fast-start +configure med location coordinate latitude 48.58667N longitude 2.2014E altitude 117.47 m datum WGS84 +configure med location address country US street "Commercial Road" city "Roseville" +configure med location elin 911 +configure ports eth0 med location elin 911 +configure med policy application voice vlan 500 priority voice dscp 46 +configure ports eth0 med policy application voice vlan 500 priority voice dscp 46 +configure med power pd source pse priority high value 5000 +configure ports eth0 med power pd source pse priority high value 5000 +configure dot3 power pse supported enabled paircontrol powerpairs spare class class-3 +configure ports eth0 dot3 power pse supported enabled paircontrol powerpairs spare class class-3 +configure dot3 power pd supported enabled powerpairs spare class class-3 type 1 source pse priority low requested 10000 allocated 15000 + +# A convenient way to "test" lldpcli and liblldpctl is to load those commands in lldpcli with valgrind: +# libtool execute valgrind --leak-check=full src/client/lldpcli -c ../src/client/lldpcli.conf -- 2.39.5