nerdexam
Cisco

300-435 · Question #126

Refer to the exhibit. Drag and drop the code from the bottom onto the box where the code is missing to complete the XML instance of this YANG module. Options may be used more than once. Not all…

This question tests the ability to translate a YANG data model into a valid XML instance document, which is the format used by NETCONF to carry configuration or state data. The candidate must understand how each YANG statement type maps to a corresponding XML element structure.

Device-Level Network Automation

Question

Refer to the exhibit. Drag and drop the code from the bottom onto the box where the code is missing to complete the XML instance of this YANG module. Options may be used more than once. Not all options are used.

Exhibit

300-435 question #126 exhibit

Explanation

This question tests the ability to translate a YANG data model into a valid XML instance document, which is the format used by NETCONF to carry configuration or state data. The candidate must understand how each YANG statement type maps to a corresponding XML element structure.

Approach. To complete the XML instance correctly, map each YANG construct to its XML equivalent: a 'container' becomes a wrapping XML element with no text value; a 'list' becomes a repeating XML element whose 'key' leaf is always included first; a 'leaf' becomes a self-contained XML element whose text content is the value; and a 'leaf-list' produces multiple same-named elements each holding one value. The root element of the XML instance must carry the module's XML namespace (xmlns), typically in the form 'urn:ietf:params:xml:ns:yang:' or a vendor-specific URI declared in the YANG module header. Nesting in the XML must exactly mirror the hierarchy in the YANG model-a leaf defined inside a container must be nested inside that container's XML element. When a list has a key statement (e.g., 'key name;'), the key leaf must appear as a child element of each list entry in the XML instance.

Concept tested. YANG-to-XML instance mapping for NETCONF - specifically how YANG containers, lists (with keys), and leaves translate into XML element hierarchy and how namespace attributes are applied in a conforming XML instance document.

Reference. RFC 7950 (YANG 1.1 Data Modeling Language), RFC 6241 (NETCONF Protocol), Cisco DevNet Associate (DEVASC 200-901) exam topic: 'Explain the principles of YANG data models' and 'Construct a NETCONF XML payload given a YANG model.'

Topics

#YANG#XML#Data Modeling

Community Discussion

No community discussion yet for this question.

Full 300-435 Practice