Closed cprabha closed 1 year ago
@cprabha, can you please provide a full test case to reproduce? @ANISH-GOTTAPU, do you know if IxNetwork exposes this information in BGP learned info?
@greg-dennis : sorry for the late reply, was on PTO. Yes ixNework exposes this information in BGP learned info. Attaching the screenshot for reference
@ANISH-GOTTAPU, how do you see that "IPv4 Prefixes" tab? I don't know how to see that learned info in the UI, except for navigating through the API browser to the learnedInfo tables.
I have some logic to expose the color extended community through gnmi, but I'm trying to test it with the bgp_route_reflector_capabilities_test.go
@cprabha linked to above, and I'm still seeing that color come up empty in the learned info. I wanted to poke around the UI a bit thus my question about how you see the learned info more easily as shown in the screenshot.
@greg-dennis :
BGP Peer 1
option.Actions
button located on the top panel.Actions
. Look for the Protocol Options
section within this panel.Protocol Options
section, find and click on the option labeled "Get All Learned Info," as shown in the snapshot.After following the previous steps, you will notice that the IPv4 Prefixes
tab has been created with the newly acquired information.
If you still see the Color option as empty, check if the Extended communities on the other end are advertised properly as shown in the below snapshot
@ANISH-GOTTAPU, thank you! TIL
@cprabha, the linked test did not cause IxNetwork to learn any extended color communities, but I wrote code that should work. Can you try out this change and see if it works to expose the extended communities? https://github.com/openconfig/ondatra/commit/0224f9414d07e189eff7a67b3cb051f709061948
If you see "no value present," please be sure to check that IxNetwork actually has the learned info (via Anish's instructions in the previous comment). If it does and the code is not extracting it, let me know!
@greg-dennis Please could you provide more details about how to run this. I did try to copy bgprib.go to my internal/ixgnmi/bgprib.go path and getting some errors.
@cprabha, that should be all that's needed, then rerun go test. If you're getting a build error, please chat it to me
@greg-dennis
please check these errors .
could not import github.com/openconfig/ondatra/internal/ixconfig (invalid use of internal package github.com/openconfig/ondatra/internal/ixconfig)
undeclared name: cfgClient
undeclared name: cachedNodes
undeclared name: table
undeclared name: unmarshalTable
@cprabha, yeah, it's a bit complicated to change a go project use a locally built version. Hmm, why don't we forget it, and I'll merge my change and we'll try it out.
Sure, I will try to run it once changes are in production. Thank you.
Please try the latest release v0.1.18 and see if it works
I'm going to mark this fixed to take it off my dashboard, but please reopen if it doesn't work.
@greg-dennis Sure , will verify this and update. Thank you
Hi,
RIB retrieval for extended community attributes like "color" is not working with below rib api. Please could you check if there is any additional changes needed for retrieval.
Error:
GetAll(t) on ate(10.92.196.126) at /network-instances/network-instance[name=ateSrc]/protocols/protocol[identifier=BGP][name=0]/bgp/rib/ext-communities/ext-community[index=]/state/ext-community: query "/network-instances/network-instance[name=ateSrc]/protocols/protocol[identifier=BGP][name=0]/bgp/rib/ext-communities/ext-community[index=]/state/ext-community": value not present
Code to retrieve rib:
rib := at.NetworkInstance(ateSrc.Name).Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_BGP, "0").Bgp().Rib() prefixPath := rib.AfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).Ipv4Unicast(). NeighborAny().AdjRibInPre().RouteAny().WithPathId(0).Prefix()
gotCommColor := gnmi.GetAll(t, ate, rib.ExtCommunityAny().ExtCommunity().State()) if diff := cmp.Diff(wantCommColor, gotCommColor); diff != "" { t.Errorf("obtained community color on ATE is not as expected, got %v, want %v", gotCommColor, wantCommColor) }
Thanks, Prabha