Skip to content

Commit

Permalink
Adding test case
Browse files Browse the repository at this point in the history
  • Loading branch information
malanovo committed Jan 5, 2021
1 parent 50f52e2 commit f048043
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"1.0.4.0/24": [{"current_active": true, "last_active": true, "age": 0, "next_hop": "169.254.123.2", "protocol": "eBGP", "outgoing_interface": "Vlan123", "preference": 200, "inactive_reason": "noReason", "routing_table": "default", "selected_next_hop": true, "protocol_attributes": {"metric": 0, "as_path": "65003", "local_preference": 100, "local_as": 65002, "remote_as": 65003, "remote_address": "169.254.123.2", "preference2": 0, "communities": []}}, {"current_active": true, "last_active": true, "age": 0, "next_hop": "169.254.123.2", "protocol": "eBGP", "outgoing_interface": "Vlan123", "preference": 200, "inactive_reason": "noReason", "routing_table": "default", "selected_next_hop": true, "protocol_attributes": {"metric": 0, "as_path": "65003", "local_preference": 100, "local_as": 65002, "remote_as": 65003, "remote_address": "169.254.123.2", "preference2": 0, "communities": []}}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"vrfs": {
"default": {
"routerId": "2.2.2.2",
"vrf": "default",
"bgpRouteEntries": {
"1.0.4.0/24": {
"totalPaths": 1,
"bgpAdvertisedPeerGroups": {},
"totalAdvertisedPeers": 0,
"maskLength": 24,
"bgpRoutePaths": [
{
"asPathEntry": {
"asPathType": "External",
"asPath": "65003"
},
"med": 0,
"localPreference": 100,
"weight": 0,
"peerEntry": {
"peerRouterId": "3.3.3.3",
"peerAddr": "169.254.123.2"
},
"reasonNotBestpath": "noReason",
"timestamp": 1609809646,
"nextHop": "169.254.123.2",
"routeType": {
"atomicAggregator": false,
"origin": "Igp",
"suppressed": false,
"queued": false,
"valid": true,
"ecmpContributor": false,
"luRoute": false,
"active": true,
"stale": false,
"ecmp": false,
"backup": false,
"ecmpHead": false,
"ucmp": false
},
"routeDetail": {
"origin": "Igp",
"labelStack": [],
"isLeaked": false,
"tunnelRibEligible": false,
"extCommunityList": [],
"communityList": [],
"rxSafi": "Unicast",
"bgpContributors": [],
"recvdFromRRClient": false,
"igpMetric": 1,
"largeCommunityList": [],
"domainPath": []
}
}
],
"address": "1.0.4.0"
}
},
"asn": "65002"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"vrfs": {
"default": {
"routes": {
"1.0.4.0/24": {
"kernelProgrammed": true,
"directlyConnected": false,
"routeAction": "forward",
"routeLeaked": false,
"vias": [
{
"interface": "Vlan123",
"nexthopAddr": "169.254.123.2"
}
],
"metric": 0,
"hardwareProgrammed": true,
"routeType": "eBGP",
"preference": 200
}
},
"allRoutesProgrammedKernel": true,
"routingDisabled": false,
"allRoutesProgrammedHardware": true,
"defaultRouteState": "notSet"
}
}
}
8 changes: 8 additions & 0 deletions test/eos/mocked_data/test_get_route_to/iss_1069/show_vrf.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Maximum number of vrfs allowed: 14
VRF RD Protocols State Interfaces
---------- ------------ ------------- ----------------- -----------------------
default <not set> ipv4,ipv6 v4:routing, Ethernet1, Ethernet2,
v6:no routing Loopback1, Management1,
Vlan123


0 comments on commit f048043

Please sign in to comment.