cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
863
Views
0
Helpful
0
Replies

Multiple yang subfilters treated separately

cristian.05
Level 1
Level 1

Hello,

 

I am automating a series of tests on IOS-XR devices using Netconf/Yang. As part of this, I'm currently working on a particular test involving some LDP checks. I want to get some MPLS information for a protected path in the forwarding table for a known prefix. The filter I'm using is as follows:

 

<filter>
<mpls-ldp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper">
<global>
<active>
<default-vrf>
<afs>
<af>
<forwardings>
<forwarding>
<prefix>{}</prefix>
<paths>
<routing>
<interface/>
<path-flags>ip-path-protected</path-flags>
</routing>
<mpls>
<mpls-outgoing-info>
<nexthop-peer-ldp-ident>
<lsr-id/>
</nexthop-peer-ldp-ident>
<out-label/>
</mpls-outgoing-info>
</mpls>
</paths>
</forwarding>
</forwardings>
<af-name/>
</af>
</afs>
</default-vrf>
</active>
</global>
</mpls-ldp>
</filter>

With this filter, my aim is to obtain the interface, lsr-id and out-label for only those forwarding entries that are marked as protected in the <routing> subtree. However, what I'm getting instead is:

  • For forwarding entries that are NOT protected, I get the <mpls> information, since there's no match in the <routing> subtree.
  • For forwarding entries that ARE protected, I do get the expected result: both the <interface> specified in the <routing> subtree and the mpls information (next-hop peer <lsr-id> and <out-label>) specified in the <mpls> subtree.

This basically shows that the <routing> and <mpls> subfilters are being applied separately, instead of in conjunction. Is there any way to only get the results that match both the <routing> and <mpls> subfilters at the same time, rather than only one of them?

 

Apologies if this question does not belong here. If that is the case I would appreciate being pointed in the right direction.

0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: