diff --git a/test/unit/mocked_data/test_get_lldp_neighbors/one_neigh_per_int/_show__lldp__neighbors_all__neighbors___lldp___show_.xml b/test/unit/mocked_data/test_get_lldp_neighbors/one_neigh_per_int/_show__lldp__neighbors_all__neighbors___lldp___show_.xml new file mode 100644 index 0000000..e960cf0 --- /dev/null +++ b/test/unit/mocked_data/test_get_lldp_neighbors/one_neigh_per_int/_show__lldp__neighbors_all__neighbors___lldp___show_.xml @@ -0,0 +1,124 @@ + + + + + 30 + 15 + + + + MAC address + 00:6c:bc:00:00:00 + Interface name + Gi1/0/2 + GigabitEthernet1/0/2 + 116 + peer00.lab.demo + mock system description + B, R, + + B, R, + + + + ipv4 + 0 + System Port Number + + + + + + + + 31 + 16 + + + + MAC address + 00:6c:bc:00:00:00 + Interface name + Gi2/0/2 + GigabitEthernet2/0/2 + 107 + peer01.lab.demo + mock system description + B, R, + + B, R, + + + + ipv4 + 0 + System Port Number + + + + + + + + 28 + 13 + + + + MAC address + 44:f4:77:00:00:00 + Locally assigned + 518 + mockdescription + 92 + peer01.lab.demo + mock system description + + B, R, + + B, R, + + + + ipv4 + 1 + Ifindex + 0.1.3.6.1.2.1.31.1.1.1.1.1. + + + + + + + + 29 + 14 + + + + MAC address + 44:f4:77:00:00:01 + Locally assigned + 518 + mockdescription + 110 + border2.private.lon2.mozilla.net + mock system description + + B, R, + + B, R, + + + + ipv4 + 1 + Ifindex + 0.1.3.6.1.2.1.31.1.1.1.1.1. + + + + + + + diff --git a/test/unit/mocked_data/test_get_lldp_neighbors/one_neigh_per_int/expected_result.json b/test/unit/mocked_data/test_get_lldp_neighbors/one_neigh_per_int/expected_result.json new file mode 100644 index 0000000..5456a6a --- /dev/null +++ b/test/unit/mocked_data/test_get_lldp_neighbors/one_neigh_per_int/expected_result.json @@ -0,0 +1 @@ +{u'ethernet1/13': [{u'hostname': u'peer01.lab.demo', u'port': u'518'}], u'ethernet1/16': [{u'hostname': u'peer00.lab.demo', u'port': u'Gi2/0/2'}], u'ethernet1/14': [{u'hostname': u'peer02.lab.demo', u'port': u'518'}], u'ethernet1/15': [{u'hostname': u'peer00.lab.demo', u'port': u'Gi1/0/2'}]} diff --git a/test/unit/mocked_data/test_get_route_to/one_route/_show__routing__route__destination_10.22.0.0_16__destination___route___routing___show.xml b/test/unit/mocked_data/test_get_route_to/one_route/_show__routing__route__destination_10.22.0.0_16__destination___route___routing___show.xml new file mode 100644 index 0000000..a6391b8 --- /dev/null +++ b/test/unit/mocked_data/test_get_route_to/one_route/_show__routing__route__destination_10.22.0.0_16__destination___route___routing___show.xml @@ -0,0 +1,14 @@ + + + flags: A:active, ?:loose, C:connect, H:host, S:static, ~:internal, R:rip, O:ospf, B:bgp, Oi:ospf intra-area, Oo:ospf inter-area, O1:ospf ext-type-1, O2:ospf ext-type-2, E:ecmp + + default + 10.22.0.0/16 + 10.0.0.1 + + A?B + + 2832970 + + + diff --git a/test/unit/mocked_data/test_get_route_to/one_route/expected_result.json b/test/unit/mocked_data/test_get_route_to/one_route/expected_result.json new file mode 100644 index 0000000..5631391 --- /dev/null +++ b/test/unit/mocked_data/test_get_route_to/one_route/expected_result.json @@ -0,0 +1 @@ +{u'10.22.0.0/16': [{u'protocol': u'bgp', u'current_active': True, u'age': u'2832970', u'routing_table': u'default', u'next_hop': u'10.0.0.1', u'outgoing_interface': None, u'preference': None}]} diff --git a/test/unit/mocked_data/test_get_route_to/several_routes/_show__routing__route__type_connect__type___route___routing___show.xml b/test/unit/mocked_data/test_get_route_to/several_routes/_show__routing__route__type_connect__type___route___routing___show.xml new file mode 100644 index 0000000..7ca33f9 --- /dev/null +++ b/test/unit/mocked_data/test_get_route_to/several_routes/_show__routing__route__type_connect__type___route___routing___show.xml @@ -0,0 +1,34 @@ + + + flags: A:active, ?:loose, C:connect, H:host, S:static, ~:internal, R:rip, O:ospf, B:bgp, Oi:ospf intra-area, Oo:ospf inter-area, O1:ospf ext-type-1, O2:ospf ext-type-2, E:ecmp + + default + 10.0.0.128/30 + 10.0.0.1 + 0 + A C + + + tunnel.34 + + + default + 10.0.0.132/30 + 10.0.0.2 + 0 + A C + + + tunnel.35 + + + default + 192.168.1.1/32 + 0.0.0.0 + 0 + A H + + + + + \ No newline at end of file diff --git a/test/unit/mocked_data/test_get_route_to/several_routes/expected_result.json b/test/unit/mocked_data/test_get_route_to/several_routes/expected_result.json new file mode 100644 index 0000000..082f887 --- /dev/null +++ b/test/unit/mocked_data/test_get_route_to/several_routes/expected_result.json @@ -0,0 +1 @@ +{u '10.0.0.128/30': [{u 'protocol': u 'connect',u 'current_active': True,u 'age': None,u 'routing_table': u 'default',u 'next_hop': u '10.0.0.1',u 'outgoing_interface': u 'tunnel.34',u 'preference': u '0'}], u '192.168.1.1/32': [{u 'current_active': True,u 'age': None,u 'routing_table': u 'default',u 'next_hop': u '0.0.0.0',u 'outgoing_interface': None,u 'preference': u '0'}], u '10.0.0.132/30': [{u 'protocol': u 'connect',u 'current_active': True,u 'age': None,u 'routing_table': u 'default',u 'next_hop': u '10.0.0.2',u 'outgoing_interface': u 'tunnel.35',u 'preference': u '0'}]}