2.27. test_cdp module

CDP tests

class test_cdp.CustomTLV(*args: Any, **kwargs: Any)

Bases: scapy.packet.Packet

Custom TLV protocol layer for scapy

fields_desc = [scapy.all.ShortField, scapy.all.ShortField, scapy.all.StrField]
class test_cdp.TestCDP(methodName='runTest')

Bases: framework.VppTestCase

CDP Test Case

cdp_ptr = re.compile('^([-\\.\\w]+)\\s+([-\\.\\w]+)\\s+([-\\.\\w]+)\\s+([-\\.\\w]+)$')
create_bad_packet(tl=4, tv='')
create_base_packet()
create_packet()
property device_id
err_ptr = re.compile('^([\\d]+)\\s+([-\\w]+)\\s+([ -\\.\\w)(]+)$')
nen_ptr = re.compile('not enabled')
property platform
property port_id
process_cli(exp, ptr)
send_bad_packet(l, v)
send_packet(packet)
classmethod setUpClass()

Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api

show_cdp()
show_errors()
classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_cdp_overflow_tlv()
test_cdp_underflow_tlv()
test_enable_cdp()
test_send_cdp_packet()
property version