Because dynamic subscriptions are created by clients (the subscriber) that connect into the publisher, they are
considered dial-in. Configured subscriptions cause the publisher to initiate connections to receivers, and as a
result, they are considered dial-out.
Sample <establish-subscription> RPC
The following is a sample <establish-subscription> RPC. The stream, xpath-filter, and period fields in the
RPC are mandatory.
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<establish-subscription
xmlns="urn:ietf:params:xml:ns:yang:ietf-event-notifications"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<stream>yp:yang-push</stream>
<yp:xpath-filter>/mdt-oper:mdt-oper-data/mdt-subscriptions</yp:xpath-filter>
<yp:period>1000</yp:period>
</establish-subscription>
</rpc>
YANG-Push
YANG-push is the subscription and push mechanism for YANG databases. YANG-push subscriptions are
defined using a data model. Using YANG-push, subscriber applications can request a continuous, customized
stream of updates from YANG databases. The YANG-push encompasses all data in the configuration and
operational databases that is described by the YANG model installed on a device. You must provide a filter
for data, as subscription to all data is not supported.
The yang-push stream must be specified.
Note
XPath Filter Support
The XML Path Language (XPath) filter specifies the information element to subscribe to. It informs the
telemetry parser where the required subscription information is located in the data model. The update-filter
grouping of the XPath filter is supported for subscriptions.
Periodic Publication
With periodic subscription, the first push-update with the subscribed information is sent immediately; but it
can be delayed if the device is busy or due to network congestion. Updates are then sent at the expiry of the
configured periodic timer. For example, if the period is configured as 10 minutes, the first update is sent
immediately after the subscription is created and every 10 minutes thereafter.
Period is time, in centiseconds (1/100 of a second), between periodic push updates. A period of 1000 will
result in getting updates to the subscribed information every 10 seconds. The minimum period interval is 100,
or one second. There is no default value. This value must be explicitly set in the <establish subscription>
RPC.
Subscriptions for data that does not currently exist are permitted and run as normal subscriptions. When
subscribed for empty data, empty update notifications are sent at the requested period.
Periodic updates contain a full copy of the subscribed data element or table.
Model-Driven Telemetry
3
Model-Driven Telemetry
Sample <establish-subscription> RPC