Git Product home page Git Product logo

Comments (5)

greg-dennis avatar greg-dennis commented on July 17, 2024

@cprabha, what do you mean by RouteAnyPrefix(0).Prefix()? The Route list has three keys: path-id, endpoint, and color. Is the 0 meant to be a path-id and you want to a wildcard for the endpoint and color? If so, that would be available as AdjRibInPre().RouteAny().WithPathId(0).Prefix()

Also, you won't see AsPath() because it is an enclosing container for the as-segment list, and ygnmi always elides enclosing container for lists. If you want all the segments of the as-path use AttrSetAny().AsSegmentAny()

from ondatra.

cprabha avatar cprabha commented on July 17, 2024

Thanks Greg,
It worked fine with AdjRibInPre().RouteAny().WithPathId(0).Prefix() and AttrSetAny().AsSegmentAny().

from ondatra.

cprabha avatar cprabha commented on July 17, 2024

@greg-dennis ,
asPath := gnmi.GetAll(t, ate, rib.AttrSetAny().AsSegmentAny().State()) ==> this is returning pointer instead of value .
Can you please check ?

Output

asPath
[]github.com/openconfig/ondatra/gnmi/oc.NetworkInstance_Protocol_Bgp_Rib_AttrSet_AsSegment len: 200, cap: 200, [{Index: 0, Member: []uint32 len: 5, cap: 8, [64500,64500,64500,64500,64502], Type: RibBgp_AsPathSegmentType_AS_SEQ (1)},{Index: *0, Member: ...
[0..99]:
[0]: *github.com/openconfig/ondatra/gnmi/oc.NetworkInstance_Protocol_Bgp_Rib_AttrSet_AsSegment {Index: *0, Member: []uint32 len: 5, cap: 8, [64500,64500,64500,64500,64502], Type: RibBgp_AsPathSegmentType_AS_SEQ (1)}
[1]: *github.com/openconfig/ondatra/gnmi/oc.NetworkInstance_Protocol_Bgp_Rib_AttrSet_AsSegment {Index: *0, Member: []uint32 len: 5, cap: 8, [64500,64500,64500,64500,64502], Type: RibBgp_AsPathSegmentType_AS_SEQ (1)}

Thanks,
Prabha

from ondatra.

greg-dennis avatar greg-dennis commented on July 17, 2024

@cprabha, GetAll is returning a list of all the segments, which should be expected. Does that make sense?

from ondatra.

cprabha avatar cprabha commented on July 17, 2024

got it, Thanks Greg.

from ondatra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.