01-08-2023 12:26 PM
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>
<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>
Solved! Go to Solution.
01-09-2023 12:37 AM
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
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
01-09-2023 12:37 AM
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
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
01-09-2023 04:26 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide