300-435 exam dumps

300-435 practice question 40 of 322

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

300-435 Question 40

Single answer

You are using Cisco YANG Suite to interact with a network device configured with a YANG model. You need to retrieve interface details in JSON format. Which JSON instance below correctly represents the data based on the YANG model for an interface configuration?

  1. A

    { "interfaces": { "interface": [ { "name": "GigabitEthernet1", "description": "Uplink", "enabled": true } ] } }

  2. B

    { "interfaces": { "interface": { "name": "GigabitEthernet1", "description": "Uplink", "status": "enabled" } } }

  3. C

    { "interface": [ { "name": "GigabitEthernet1", "description": "Uplink", "enabled": true } ] }

  4. D

    { "interface": { "name": "GigabitEthernet1", "description": "Uplink" } }

Show answer and explanation

Correct answer: A

Explanation

The correct JSON instance must adhere to the hierarchy and structure defined by the YANG model. In this case, the parent container 'interfaces' and the array 'interface' are mandated by the YANG model for representing interface configurations. Furthermore, all required keys, such as 'name', 'description', and 'enabled', must be included.

  • A. Correct.

    This is the correct JSON instance as it properly adheres to the YANG model structure, including the correct hierarchy and naming conventions for the interface configuration.

  • B. Incorrect.

    This JSON instance is incorrect because the 'status' key is not valid according to the YANG model, and the 'interface' key should be an array, not an object.

  • C. Incorrect.

    This JSON instance is incorrect because it lacks the parent 'interfaces' container, which is required by the YANG model.

  • D. Incorrect.

    This JSON instance is incorrect because it is missing the required 'enabled' key and does not follow the YANG model hierarchy.

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