From 6a57f346d0015f0ed3a8bac586f55271337ebfc6 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Sun, 3 Jan 2021 00:09:20 -0700 Subject: [PATCH] replace temporary fake output with "real" fake output --- hyperglass/api/fake_output.py | 250 ++++++++++++++++++---------------- 1 file changed, 130 insertions(+), 120 deletions(-) diff --git a/hyperglass/api/fake_output.py b/hyperglass/api/fake_output.py index 167c042..1c7ffed 100644 --- a/hyperglass/api/fake_output.py +++ b/hyperglass/api/fake_output.py @@ -4,145 +4,155 @@ from typing import Dict, Union PLAIN = r""" - _ _ -| |__ _ _ _ __ ___ _ __ __ _ | | __ _ ___ ___ -| '_ \ | | | || '_ \ / _ \| '__|/ _` || | / _` |/ __|/ __| -| | | || |_| || |_) || __/| | | (_| || || (_| |\__ \\__ \ -|_| |_| \__, || .__/ \___||_| \__, ||_| \__,_||___/|___/ - |___/ |_| |___/ - -""" # noqa: W291 +BGP routing table entry for 4.0.0.0/9, version 1017877672 +BGP Bestpath: deterministic-med +Paths: (10 available, best #9, table default) + Advertised to update-groups: + 50 + 1299 3356, (aggregated by 3356 4.69.130.24) + 216.250.230.1 (metric 2000) from 216.250.230.1 (216.250.230.1) + Origin IGP, metric 0, localpref 100, weight 100, valid, internal, atomic-aggregate + Community: 1299:25000 14525:0 14525:40 14525:601 14525:1021 14525:2840 14525:3003 14525:4002 14525:9003 + 1299 3356, (aggregated by 3356 4.69.130.24), (received-only) + 216.250.230.1 (metric 2000) from 216.250.230.1 (216.250.230.1) + Origin IGP, metric 0, localpref 150, valid, internal, atomic-aggregate + Community: 1299:25000 14525:0 14525:40 14525:601 14525:1021 14525:2840 14525:3003 14525:4002 14525:9003 + 1299 3356, (aggregated by 3356 4.69.130.184) + 199.34.92.9 (metric 1000) from 199.34.92.9 (199.34.92.9) + Origin IGP, metric 0, localpref 100, weight 100, valid, internal, atomic-aggregate + Community: 1299:25000 14525:0 14525:40 14525:601 14525:1021 14525:2840 14525:3001 14525:4001 14525:9003 + 1299 3356, (aggregated by 3356 4.69.130.184), (received-only) + 199.34.92.9 (metric 1000) from 199.34.92.9 (199.34.92.9) + Origin IGP, metric 0, localpref 150, valid, internal, atomic-aggregate + Community: 1299:25000 14525:0 14525:40 14525:601 14525:1021 14525:2840 14525:3001 14525:4001 14525:9003 + 174 3356, (aggregated by 3356 4.69.130.4) + 199.34.92.10 (metric 1000) from 199.34.92.10 (199.34.92.10) + Origin IGP, metric 0, localpref 100, weight 100, valid, internal, atomic-aggregate + Community: 174:21000 174:22013 14525:0 14525:40 14525:601 14525:1021 14525:2840 14525:3001 14525:4001 14525:9001 + 174 3356, (aggregated by 3356 4.69.130.4), (received-only) + 199.34.92.10 (metric 1000) from 199.34.92.10 (199.34.92.10) + Origin IGP, metric 0, localpref 150, valid, internal, atomic-aggregate + Community: 174:21000 174:22013 14525:0 14525:40 14525:601 14525:1021 14525:2840 14525:3001 14525:4001 14525:9001 + 209 3356, (aggregated by 3356 4.69.130.2) + 199.34.92.5 (metric 101) from 199.34.92.5 (199.34.92.5) + Origin IGP, metric 8006570, localpref 150, weight 200, valid, internal, atomic-aggregate + Community: 209:88 209:888 3356:0 3356:3 3356:100 3356:123 3356:575 3356:2011 14525:0 14525:40 14525:1021 14525:2840 14525:3002 14525:4003 14525:9005 + 209 3356, (aggregated by 3356 4.69.130.2), (received-only) + 199.34.92.5 (metric 101) from 199.34.92.5 (199.34.92.5) + Origin IGP, metric 8006570, localpref 150, valid, internal, atomic-aggregate + Community: 209:88 209:888 3356:0 3356:3 3356:100 3356:123 3356:575 3356:2011 14525:0 14525:40 14525:1021 14525:2840 14525:3002 14525:4003 14525:9005 + 6939 3356, (aggregated by 3356 4.69.130.4) + 184.105.247.177 from 184.105.247.177 (216.218.252.234) + Origin IGP, localpref 150, weight 200, valid, external, atomic-aggregate, best + Community: 6939:7016 6939:8840 6939:9001 14525:0 14525:40 14525:1021 14525:2840 14525:3002 14525:4003 14525:9002 + 6939 3356, (aggregated by 3356 4.69.130.4), (received-only) + 184.105.247.177 from 184.105.247.177 (216.218.252.234) + Origin IGP, localpref 100, valid, external, atomic-aggregate + Community: 6939:7016 6939:8840 6939:9001 +""" # noqa: W291,E501 ROUTES = [ { - "prefix": "198.18.1.0/24", + "prefix": "1.1.1.0/24", "active": True, - "age": 240, + "age": 1025337, "weight": 170, - "med": 1, - "local_preference": 100, - "as_path": [1299, 174, 7018, 7922], - "communities": ["65000:1", "65000:101", "65000:102", "65000:103"], - "next_hop": "198.18.0.1", - "source_as": 7922, - "source_rid": "198.18.0.1", - "peer_rid": "198.18.0.1", + "med": 0, + "local_preference": 175, + "as_path": [1299, 13335], + "communities": [ + "1299:35000", + "14525:0", + "14525:41", + "14525:600", + "14525:1021", + "14525:2840", + "14525:3001", + "14525:4001", + "14525:9003", + ], + "next_hop": "62.115.189.136", + "source_as": 13335, + "source_rid": "141.101.72.1", + "peer_rid": "2.255.254.43", "rpki_state": 1, }, { - "prefix": "2001:db8:1::/64", - "active": True, - "age": 240, - "weight": 170, - "med": 1, - "local_preference": 100, - "as_path": [1299, 174, 7018, 7922], - "communities": ["65000:1", "65000:101", "65000:102", "65000:103"], - "next_hop": "2001:db8::1", - "source_as": 7922, - "source_rid": "198.18.0.1", - "peer_rid": "198.18.0.1", - "rpki_state": 1, - }, - { - "prefix": "198.18.2.0/24", + "prefix": "1.1.1.0/24", "active": False, - "age": 480, - "weight": 170, - "med": 2, - "local_preference": 100, - "as_path": [6939, 20115, 20115], + "age": 1584622, + "weight": 200, + "med": 0, + "local_preference": 250, + "as_path": [13335], "communities": [ - "65000:2", - "65000:201", - "198.18.0.2:65000", - "198.18.0.2:650201", + "14525:0", + "14525:20", + "14525:600", + "14525:1021", + "14525:2840", + "14525:3002", + "14525:4003", + "14525:9009", ], - "next_hop": "198.18.0.2", - "source_as": 20115, - "source_rid": "198.18.0.2", - "peer_rid": "198.18.0.2", - "rpki_state": 2, - }, - { - "prefix": "2001:db8:2::/64", - "active": False, - "age": 480, - "weight": 170, - "med": 2, - "local_preference": 100, - "as_path": [6939, 20115, 20115], - "communities": [ - "65000:2", - "65000:201", - "198.18.0.2:65000", - "198.18.0.2:650201", - ], - "next_hop": "2001:db8::2", - "source_as": 20115, - "source_rid": "198.18.0.2", - "peer_rid": "198.18.0.2", - "rpki_state": 2, - }, - { - "prefix": "198.18.3.0/24", - "active": False, - "age": 480, - "weight": 170, - "med": 3, - "local_preference": 100, - "as_path": [22773], - "communities": ["65000:3"], - "next_hop": "198.18.0.3", - "source_as": 22773, - "source_rid": "198.18.0.3", - "peer_rid": "198.18.0.3", + "next_hop": "", + "source_as": 13335, + "source_rid": "172.68.129.1", + "peer_rid": "199.34.92.5", "rpki_state": 3, }, { - "prefix": "2001:db8:3::/64", + "prefix": "1.1.1.0/24", "active": False, - "age": 480, - "weight": 170, - "med": 3, - "local_preference": 100, - "as_path": [22773], - "communities": ["65000:3"], - "next_hop": "2001:db8::3", - "source_as": 22773, - "source_rid": "198.18.0.3", - "peer_rid": "198.18.0.3", + "age": 982517, + "weight": 200, + "med": 0, + "local_preference": 250, + "as_path": [13335], + "communities": [ + "14525:0", + "14525:20", + "14525:600", + "14525:1021", + "14525:2840", + "14525:3002", + "14525:4003", + "14525:9009", + ], + "next_hop": "", + "source_as": 13335, + "source_rid": "172.68.129.1", + "peer_rid": "199.34.92.6", "rpki_state": 3, }, { - "prefix": "198.18.4.0/24", + "prefix": "1.1.1.0/24", "active": False, - "age": 480, - "weight": 170, - "med": 4, - "local_preference": 100, - "as_path": [], - "communities": ["65000:4"], - "next_hop": "198.18.0.4", - "source_as": 209, - "source_rid": "198.18.0.4", - "peer_rid": "198.18.0.4", - "rpki_state": 0, - }, - { - "prefix": "2001:db8:4::/64", - "active": False, - "age": 480, - "weight": 170, - "med": 4, - "local_preference": 100, - "as_path": [], - "communities": ["65000:4"], - "next_hop": "2001:db8::4", - "source_as": 209, - "source_rid": "198.18.0.4", - "peer_rid": "198.18.0.4", - "rpki_state": 0, + "age": 1000101, + "weight": 200, + "med": 0, + "local_preference": 250, + "as_path": [13335], + "communities": [ + "13335:10014", + "13335:19000", + "13335:20050", + "13335:20500", + "13335:20530", + "14525:0", + "14525:20", + "14525:600", + "14525:1021", + "14525:2840", + "14525:3003", + "14525:4002", + "14525:9009", + ], + "next_hop": "", + "source_as": 13335, + "source_rid": "141.101.73.1", + "peer_rid": "216.250.230.2", + "rpki_state": 3, }, ]