nerdexam
Cisco

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.

Device-Level Network Automation

Question

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 run successfully?

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)
  • A
    6% (3)
  • B
    12% (6)
  • C
    2% (1)
  • D
    80% (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.

AChange the yang-push stream to a supported type.

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.

BThe source-vrf must be added to the body.

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.

CThe xpath attribute must be removed from the body.

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.

DThe xmlns attribute must be set for the model.Correct

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

#Streaming Telemetry#Python Scripting#YANG Data Models#XML Namespaces

Community Discussion

No community discussion yet for this question.

Full 300-435 Practice