nerdexam
Cisco

350-901 · Question #41

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. To limit configuration actions in a YANG model based on specific conditions, the 'when' statement is used to define a constraint that must be true for a data node to be valid and configurable.

Network Automation

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

(26 responses)
  • A
    92% (24)
  • B
    4% (1)
  • D
    4% (1)

Why each option

To limit configuration actions in a YANG model based on specific conditions, the 'when' statement is used to define a constraint that must be true for a data node to be valid and configurable.

AwhenCorrect

The 'when' statement in YANG defines a dependency for a data node or statement on the existence or value of another node in the data tree, making the configuration action for that node conditional. If the 'when' condition evaluates to false, the node is effectively not allowed to be present in the configuration.

Bcase

The 'case' statement is used within a 'choice' statement to define mutually exclusive options, not to limit configuration based on arbitrary conditions.

Cenumeration

The 'enumeration' statement defines a specific set of allowed string values for a leaf, which limits the data values but not the configuration action itself based on other data.

Dcontains

'contains' is not a standard YANG keyword that limits configuration actions; it describes a conceptual relationship or part of module structure but not a constraint mechanism.

Concept tested: YANG conditional configuration and constraints

Source: https://www.rfc-editor.org/rfc/rfc7950#section-7.16

Topics

#YANG#Data Modeling#Network Automation#Policy Modeling

Community Discussion

No community discussion yet for this question.

Full 350-901 Practice