nerdexam
Cisco

200-901 · Question #75

You are developing a YANG-based policy model to encode the type of entity that is connected to a given interface, such as partner, supplier, customer, or distributor. Which YANG statement limits any…

The correct answer is A. when. The when statement in YANG defines a condition that must be true for the data node to which it applies to be valid or even present.

Cisco Platforms and Development

Question

You are developing a YANG-based policy model to encode the type of entity that is connected to a given interface, such as partner, supplier, customer, or distributor. Which YANG statement limits any configuration action?

Options

  • Awhen
  • Bcase
  • Cenumeration
  • Dcontains

How the community answered

(39 responses)
  • A
    90% (35)
  • B
    3% (1)
  • C
    5% (2)
  • D
    3% (1)

Why each option

The `when` statement in YANG defines a condition that must be true for the data node to which it applies to be valid or even present.

AwhenCorrect

The `when` statement in YANG is used to define a condition that must be satisfied for a data node to be valid or to exist. This mechanism allows for conditional data modeling, meaning that certain configuration actions or data structures are only allowed or active if the `when` condition evaluates to true, thereby limiting configuration possibilities.

Bcase

The `case` statement is used within a `choice` statement to define alternative branches of data, not to limit configuration actions based on conditions.

Cenumeration

The `enumeration` statement defines a set of allowed named values for a leaf, restricting the possible values but not the configuration action itself based on external conditions.

Dcontains

The `contains` keyword is not a standard YANG statement; it might refer to conceptual containment but not a specific statement for limiting configuration actions.

Concept tested: YANG conditional data modeling

Source: https://datatracker.ietf.org/doc/html/rfc7950#section-7.20.1

Topics

#YANG#Data Modeling#Conditional Logic#Network Programmability

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice