<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Multiple yang subfilters treated separately in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/multiple-yang-subfilters-treated-separately/m-p/4036027#M2013</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;filter&amp;gt;&lt;BR /&gt;  &amp;lt;mpls-ldp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper"&amp;gt;&lt;BR /&gt;    &amp;lt;global&amp;gt;&lt;BR /&gt;      &amp;lt;active&amp;gt;&lt;BR /&gt;        &amp;lt;default-vrf&amp;gt;&lt;BR /&gt;          &amp;lt;afs&amp;gt;&lt;BR /&gt;            &amp;lt;af&amp;gt;&lt;BR /&gt;              &amp;lt;forwardings&amp;gt;&lt;BR /&gt;                &amp;lt;forwarding&amp;gt;&lt;BR /&gt;                  &amp;lt;prefix&amp;gt;{}&amp;lt;/prefix&amp;gt;&lt;BR /&gt;                  &amp;lt;paths&amp;gt;&lt;BR /&gt;                    &amp;lt;routing&amp;gt;&lt;BR /&gt;                      &amp;lt;interface/&amp;gt;&lt;BR /&gt;                      &amp;lt;path-flags&amp;gt;ip-path-protected&amp;lt;/path-flags&amp;gt;&lt;BR /&gt;                    &amp;lt;/routing&amp;gt;&lt;BR /&gt;                    &amp;lt;mpls&amp;gt;&lt;BR /&gt;                      &amp;lt;mpls-outgoing-info&amp;gt;&lt;BR /&gt;                        &amp;lt;nexthop-peer-ldp-ident&amp;gt;&lt;BR /&gt;                          &amp;lt;lsr-id/&amp;gt;&lt;BR /&gt;                        &amp;lt;/nexthop-peer-ldp-ident&amp;gt;&lt;BR /&gt;                        &amp;lt;out-label/&amp;gt;&lt;BR /&gt;                      &amp;lt;/mpls-outgoing-info&amp;gt;&lt;BR /&gt;                    &amp;lt;/mpls&amp;gt;&lt;BR /&gt;                  &amp;lt;/paths&amp;gt;&lt;BR /&gt;                &amp;lt;/forwarding&amp;gt;&lt;BR /&gt;              &amp;lt;/forwardings&amp;gt;&lt;BR /&gt;              &amp;lt;af-name/&amp;gt;&lt;BR /&gt;            &amp;lt;/af&amp;gt;&lt;BR /&gt;          &amp;lt;/afs&amp;gt;&lt;BR /&gt;        &amp;lt;/default-vrf&amp;gt;&lt;BR /&gt;      &amp;lt;/active&amp;gt;&lt;BR /&gt;    &amp;lt;/global&amp;gt;&lt;BR /&gt;  &amp;lt;/mpls-ldp&amp;gt;&lt;BR /&gt;&amp;lt;/filter&amp;gt;&lt;/PRE&gt;&lt;P&gt;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 &amp;lt;routing&amp;gt; subtree. However, what I'm getting instead is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For forwarding entries that are NOT protected, I get the &amp;lt;mpls&amp;gt; information, since there's no match in the &amp;lt;routing&amp;gt; subtree.&lt;/LI&gt;&lt;LI&gt;For forwarding entries that ARE protected, I do get the expected result: both the &amp;lt;interface&amp;gt; specified in the &amp;lt;routing&amp;gt; subtree and the mpls information (next-hop peer &amp;lt;lsr-id&amp;gt; and &amp;lt;out-label&amp;gt;) specified in the &amp;lt;mpls&amp;gt; subtree.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This basically shows that the &amp;lt;routing&amp;gt; and &amp;lt;mpls&amp;gt; subfilters are being applied separately, instead of in conjunction. Is there any way to only get the results that match both the &amp;lt;routing&amp;gt; and &amp;lt;mpls&amp;gt; subfilters at the same time, rather than only one of them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies if this question does not belong here. If that is the case I would appreciate being pointed in the right direction.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2020 11:15:16 GMT</pubDate>
    <dc:creator>cristian.05</dc:creator>
    <dc:date>2020-02-26T11:15:16Z</dc:date>
    <item>
      <title>Multiple yang subfilters treated separately</title>
      <link>https://community.cisco.com/t5/controllers/multiple-yang-subfilters-treated-separately/m-p/4036027#M2013</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;filter&amp;gt;&lt;BR /&gt;  &amp;lt;mpls-ldp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper"&amp;gt;&lt;BR /&gt;    &amp;lt;global&amp;gt;&lt;BR /&gt;      &amp;lt;active&amp;gt;&lt;BR /&gt;        &amp;lt;default-vrf&amp;gt;&lt;BR /&gt;          &amp;lt;afs&amp;gt;&lt;BR /&gt;            &amp;lt;af&amp;gt;&lt;BR /&gt;              &amp;lt;forwardings&amp;gt;&lt;BR /&gt;                &amp;lt;forwarding&amp;gt;&lt;BR /&gt;                  &amp;lt;prefix&amp;gt;{}&amp;lt;/prefix&amp;gt;&lt;BR /&gt;                  &amp;lt;paths&amp;gt;&lt;BR /&gt;                    &amp;lt;routing&amp;gt;&lt;BR /&gt;                      &amp;lt;interface/&amp;gt;&lt;BR /&gt;                      &amp;lt;path-flags&amp;gt;ip-path-protected&amp;lt;/path-flags&amp;gt;&lt;BR /&gt;                    &amp;lt;/routing&amp;gt;&lt;BR /&gt;                    &amp;lt;mpls&amp;gt;&lt;BR /&gt;                      &amp;lt;mpls-outgoing-info&amp;gt;&lt;BR /&gt;                        &amp;lt;nexthop-peer-ldp-ident&amp;gt;&lt;BR /&gt;                          &amp;lt;lsr-id/&amp;gt;&lt;BR /&gt;                        &amp;lt;/nexthop-peer-ldp-ident&amp;gt;&lt;BR /&gt;                        &amp;lt;out-label/&amp;gt;&lt;BR /&gt;                      &amp;lt;/mpls-outgoing-info&amp;gt;&lt;BR /&gt;                    &amp;lt;/mpls&amp;gt;&lt;BR /&gt;                  &amp;lt;/paths&amp;gt;&lt;BR /&gt;                &amp;lt;/forwarding&amp;gt;&lt;BR /&gt;              &amp;lt;/forwardings&amp;gt;&lt;BR /&gt;              &amp;lt;af-name/&amp;gt;&lt;BR /&gt;            &amp;lt;/af&amp;gt;&lt;BR /&gt;          &amp;lt;/afs&amp;gt;&lt;BR /&gt;        &amp;lt;/default-vrf&amp;gt;&lt;BR /&gt;      &amp;lt;/active&amp;gt;&lt;BR /&gt;    &amp;lt;/global&amp;gt;&lt;BR /&gt;  &amp;lt;/mpls-ldp&amp;gt;&lt;BR /&gt;&amp;lt;/filter&amp;gt;&lt;/PRE&gt;&lt;P&gt;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 &amp;lt;routing&amp;gt; subtree. However, what I'm getting instead is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For forwarding entries that are NOT protected, I get the &amp;lt;mpls&amp;gt; information, since there's no match in the &amp;lt;routing&amp;gt; subtree.&lt;/LI&gt;&lt;LI&gt;For forwarding entries that ARE protected, I do get the expected result: both the &amp;lt;interface&amp;gt; specified in the &amp;lt;routing&amp;gt; subtree and the mpls information (next-hop peer &amp;lt;lsr-id&amp;gt; and &amp;lt;out-label&amp;gt;) specified in the &amp;lt;mpls&amp;gt; subtree.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This basically shows that the &amp;lt;routing&amp;gt; and &amp;lt;mpls&amp;gt; subfilters are being applied separately, instead of in conjunction. Is there any way to only get the results that match both the &amp;lt;routing&amp;gt; and &amp;lt;mpls&amp;gt; subfilters at the same time, rather than only one of them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies if this question does not belong here. If that is the case I would appreciate being pointed in the right direction.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 11:15:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/multiple-yang-subfilters-treated-separately/m-p/4036027#M2013</guid>
      <dc:creator>cristian.05</dc:creator>
      <dc:date>2020-02-26T11:15:16Z</dc:date>
    </item>
  </channel>
</rss>

