diff --git a/tests/test_firewall_proxy.py b/tests/test_firewall_proxy.py index 32c1bff..ceee52f 100644 --- a/tests/test_firewall_proxy.py +++ b/tests/test_firewall_proxy.py @@ -1676,3 +1676,73 @@ def test_get_device_software_version(self, fw_proxy_mock): assert fw_proxy_mock.get_device_software_version() < version.parse("9.1.12.4") assert fw_proxy_mock.get_device_software_version() < version.parse("10.1.1") assert fw_proxy_mock.get_device_software_version() > version.parse("9.0.4.2") + + def test_get_fib_routes(self, fw_proxy_mock): + xml_text = """ + + + dp0 + 16 + + + 2 + VR-MAIN + 32768 + 0 + 0 + + + 19 + 0.0.0.0/0 + ethernet1/1 + 0 + ug + 10.10.11.1 + 1500 + + + 1 + 1.1.1.1/32 + loopback.10 + 3 + uh + 0.0.0.0 + 1500 + + + 16 + + + 3 + VR-MAIN + 32768 + 1 + 0 + + 0 + + + + + """ + raw_response = ET.fromstring(xml_text) + fw_proxy_mock.op.return_value = raw_response + + assert fw_proxy_mock.get_fib() == { + '0.0.0.0/0_ethernet1/1': { + 'Destination': '0.0.0.0/0', + 'Interface': 'ethernet1/1', + 'Next Hop Type': '0', + 'Flags': 'ug', + 'Next Hop': '10.10.11.1', + 'MTU': '1500' + }, + '1.1.1.1/32_loopback.10': { + 'Destination': '1.1.1.1/32', + 'Interface': 'loopback.10', + 'Next Hop Type': '3', + 'Flags': 'uh', + 'Next Hop': '0.0.0.0', + 'MTU': '1500' + } + } \ No newline at end of file