300-435 exam dumps

300-435 practice question 52 of 322

Automating Cisco Enterprise Solutions. Professional level, Cisco. Free question with the correct answer and a full explanation.

300-435 Question 52

Single answer

You are analyzing a YANG module tree generated per RFC8340. The tree includes the following structure:

module: example-module
  +--rw devices
     +--rw device* [name]
        +--rw name          string
        +--rw ip-address    inet:ipv4-address
        +--rw config
           +--rw hostname   string

Based on this structure, which statement is true about the device list and its attributes?

  1. A

    The device list is keyed using the name attribute, which must be unique.

  2. B

    The ip-address under device is used as the unique key for the list.

  3. C

    The hostname attribute is mandatory for all devices in the list.

  4. D

    The config container within device is a read-only element.

Show answer and explanation

Correct answer: A

Explanation

The YANG module tree indicates that the device list uses the name attribute as its key, as denoted by * [name]. Keys in YANG lists must be unique to differentiate entries. Other elements, such as ip-address and hostname, are data nodes or part of containers but do not serve as keys. Furthermore, the config container is explicitly marked as read-write (rw), confirming it is not read-only.

  • A. Correct.

    Correct: The device list is keyed using the name attribute, as indicated by the * [name] notation in the YANG module tree. This means that each device entry must have a unique name value.

  • B. Incorrect.

    Incorrect: The ip-address is not a key for the device list. It is simply a data node within the list and does not determine uniqueness.

  • C. Incorrect.

    Incorrect: The hostname attribute is part of the config container and is not mandatory unless explicitly enforced by additional constraints, which are not shown in the provided tree.

  • D. Incorrect.

    Incorrect: The config container is marked as read-write (rw), meaning it is writable and not read-only.

Timed practice exam

Take a 300-435 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam