300-435 · Question #107
Refer to the exhibit. The exhibit displays part of a Python script that must create a streaming telemetry subscription on a Cisco IOS XE device. The script fails. Which change enables the script to…
The correct answer is D. The xmlns attribute must be set for the model. To successfully create a streaming telemetry subscription, the xmlns (XML Namespace) attribute must be correctly defined within the subscription request body to link XML elements to their respective YANG model definitions.
Question
Options
- AChange the yang-push stream to a supported type.
- BThe source-vrf must be added to the body.
- CThe xpath attribute must be removed from the body.
- DThe xmlns attribute must be set for the model.
How the community answered
(50 responses)- A6% (3)
- B12% (6)
- C2% (1)
- D80% (40)
Why each option
To successfully create a streaming telemetry subscription, the `xmlns` (XML Namespace) attribute must be correctly defined within the subscription request body to link XML elements to their respective YANG model definitions.
While `yang-push` is a common and supported streaming telemetry stream type, the issue described by a failing script in this context points to a structural or syntax error in the request body, not an unsupported stream type.
The `source-vrf` is an optional parameter for some telemetry subscriptions, and its absence alone would not necessarily cause a script to fail if it's not a mandatory field for the specific subscription being attempted.
The `xpath` attribute is a fundamental component of many telemetry subscriptions, defining the specific data path to be streamed; removing it would likely make the subscription invalid or too broad, not fix a script failure due to incorrect syntax.
When working with YANG models and XML, which is commonly used for NETCONF-based streaming telemetry subscriptions, it is crucial to define the `xmlns` (XML Namespace) attribute. This attribute explicitly links the XML elements in the request to the specific YANG model they belong to, allowing the device to correctly parse and apply the subscription, and its absence causes script failure.
Concept tested: YANG model XML namespace (xmlns) in telemetry
Source: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/xe-16-10/b_16-10_programmability_cfg/configuring_model_driven_telemetry.html
Topics
Community Discussion
No community discussion yet for this question.