cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
646
Views
5
Helpful
2
Replies

subtree-filter support with yang-push subscription

aurelien.fasolo
Level 1
Level 1

Hello,

I have been trying to get the following rpc command to work without success:

 

<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <establish-subscription xmlns="urn:ietf:params:xml:ns:yang:ietf-event-notifications">
    <stream xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">yp:yang-push</stream>
    <subtree-filter xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push">
      <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <interface>
          <name/>
          <description/>
        </interface>
      </interfaces>
      <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <interface>
            <name/>
            <admin-status/>
            <oper-status/>
            <statistics>
                <in-octets/>
                <out-octets/>
            </statistics>
        </interface>
      </interfaces-state>
    </subtree-filter>
    <period xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push">1000</period>
  </establish-subscription>
</rpc>

 

It seems subscription fails because of the subtree filter:
<rpc-error>
  <error-type>protocol</error-type>
  <error-tag>operation-failed</error-tag>
  <error-severity>error</error-severity>
  <error-path xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">/yp:subtree-filter</error-path>
  <error-message xml:lang="en">unknown element: interfaces in /notif-bis:establish-subscription/yp:subtree-filter/if:interfaces</error-message>
  <error-info>
    <bad-element>subtree-filter</bad-element>
  </error-info>
</rpc-error>
 
I am running a C8000v (Cisco IOS XE Software, Version 17.09.01a).
To be noted that subscriptions with xpath-filter work just fine but xpath feels less natural as it does not match the netconf/yang configuration syntax. 
 
Kindly help me understand how to perform ietf-subscriptions with subtree filters.
 
Regards,
Aurélien
1 Accepted Solution

Accepted Solutions

Marcel Zehnder
Spotlight
Spotlight

Hi Aurelien

As this results in MDT sessions, my best guess is, that subtree-filtering is just not supported. 
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/173/b_173_programmability_cg/model_driven_telemetry.html

Restrictions for Model-Driven Telemetry

  • Automatic hierarchy in selections is not supported for on-change subscriptions when using the yang-push stream. This means that when selecting a list, child lists of the list are not automatically included. For example, the subscriber must manually create a subscription for each child list.

  • Checking the authorization of data access is not supported. All the data requested by a subscriber is sent.

  • Subtree filters are not supported. If subtree filters are specified, the subscription is marked as invalid.

  • Defining multiple receivers within subscription parameters is not supported; only the first receiver destination is attempted. Other defined receivers are ignored.

Marcel

View solution in original post

2 Replies 2

Marcel Zehnder
Spotlight
Spotlight

Hi Aurelien

As this results in MDT sessions, my best guess is, that subtree-filtering is just not supported. 
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/173/b_173_programmability_cg/model_driven_telemetry.html

Restrictions for Model-Driven Telemetry

  • Automatic hierarchy in selections is not supported for on-change subscriptions when using the yang-push stream. This means that when selecting a list, child lists of the list are not automatically included. For example, the subscriber must manually create a subscription for each child list.

  • Checking the authorization of data access is not supported. All the data requested by a subscriber is sent.

  • Subtree filters are not supported. If subtree filters are specified, the subscription is marked as invalid.

  • Defining multiple receivers within subscription parameters is not supported; only the first receiver destination is attempted. Other defined receivers are ignored.

Marcel

aurelien.fasolo
Level 1
Level 1

Thank you @Marcel Zehnder for the quick reply. It is actually kind of a shame that a major vendor such as Cisco does not fully implement RFC.