300-435 exam dumps

300-435 practice question 43 of 322

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

300-435 Question 43

Single answer

You are tasked with automating network configurations using Cisco YANG Suite. You are provided with a YANG model describing interface configurations and need to generate a JSON instance for configuring an interface with the following details:

Interface: GigabitEthernet1 Description: 'Uplink Interface' Admin Status: 'Enabled' MTU: 1500

Which JSON instance correctly represents this configuration based on the YANG model?

  1. A

    { "interface": { "name": "GigabitEthernet1", "description": "Uplink Interface", "admin-status": "enabled", "mtu": 1500 } }

  2. B

    { "interfaces": { "interface": { "name": "GigabitEthernet1", "description": "Uplink Interface", "admin-status": "up", "mtu": 1500 } } }

  3. C

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

  4. D

    { "interfaces": { "interface": { "name": "GigabitEthernet1", "description": "Uplink Interface", "admin-status": "enabled", "mtu": "1500" } } }

Show answer and explanation

Correct answer: C

Explanation

The correct JSON instance must align with the structure outlined in the YANG model. Typically, interfaces are represented as arrays under the 'interfaces' key, and certain fields like 'enabled' are represented as booleans rather than strings. Option 3 correctly adheres to these conventions, making it the accurate representation.

  • A. Incorrect.

    This JSON structure does not align with the YANG model conventions. The key 'interface' should be part of an array under 'interfaces', and 'admin-status' should be 'enabled' as a boolean, not a string.

  • B. Incorrect.

    Although this JSON structure has some correct elements, it does not follow the correct YANG model representation. The 'interface' key should be an array, and 'admin-status' should be represented as a boolean (true/false), not 'up'.

  • C. Correct.

    This is the correct JSON instance as it complies with the YANG model conventions. The 'interface' key is an array, 'enabled' is used as a boolean (true), and all other fields are correctly formatted.

  • D. Incorrect.

    This JSON instance incorrectly uses 'admin-status' as a string ('enabled') and 'mtu' as a string ('1500'), which does not comply with the YANG model conventions.

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