cisco Model-Driven Telemetry — Deleting Dynamic Subscriptions

Creating Dynamic Subscriptions for NETCONF Dial-In Dynamic subscriptions are created by subscribers who connect to the publisher and call for subscription creation using a mechanism within that connection, usually, an RPC. The lifetime of the subscription is limited to the lifetime of the connection between the subscriber and the publisher, and telemetry data is sent only to that subscriber. These subscriptions do not persist if either the publisher or the subscriber is rebooted. You can create dynamic subscriptions by using the in-band RPC. The RPC is sent from an IETF telemetry subscriber to the network device. The stream, xpath-filter, and period fields in the RPC are mandatory.

RPCs that are used to create and delete dynamic subscriptions using NETCONF are defined in Custom Subscription to Event Notifications draft-ietf-netconf-subscribed-notifications-03 and Subscribing to YANG datastore push updates draft-ietf-netconf-yang-push-07 . Periodic Dynamic Subscriptions The following is a sample periodic subscription for NETCONF Dial-In:

message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> xmlns="urn:ietf:params:xml:ns:yang:ietf-event-notifications" xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"> yp:yang-push /mdt-oper:mdt-oper-data/mdt-subscriptions 1000 On-Change Dynamic Subscription The following is a sample on-change dynamic subscription over NETCONF:

xmlns="urn:ietf:params:xml:ns:yang:ietf-event-notifications" xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"> yp:yang-push /cdp-ios-xe-oper:cdp-neighbor-details/cdp-neighbor-detail 0 Deleting Dynamic Subscriptions You can delete dynamic subscriptions by using the in-band RPC, the clear telemetry ietf subscription command, and the RPC along with disconnecting the transport session. For gNMI each subscription in the SubscribeRequest.subscribe.subscription a separate dynamic subscription ID is generated. Killing any of these subscription IDs, either through the RPC or clear CLI, will cause all subscriptions specified in the subscribe request to be killed.

Introduced in Cisco IOS XE Gibraltar 16.10.1, the RPC can be issued only by a subscriber, and it deletes only the subscriptions owned by that subscriber. In Cisco IOS XE Gibraltar 16.11.1 and later releases, you can use the clear telemetry ietf subscription command to delete a dynamic subscription. Introduced in Cisco IOS XE Gibraltar 16.11.1, the Model-Driven Telemetry Creating Dynamic Subscriptions for NETCONF Dial-In Model-Driven Telemetry 13