300-435 exam dumps

300-435 practice question 42 of 322

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

300-435 Question 42

Single answer

You are automating a network configuration using a YANG model for an interface configuration. The YANG model defines the following structure:

module: interface
  +--rw interface
     +--rw name           string
     +--rw description?   string
     +--rw enabled?       boolean

You need to create a JSON instance to configure an interface named 'GigabitEthernet0/1' with the description 'Uplink Interface' and enable it. Which JSON instance correctly reflects this configuration?

  1. A

    { "interface": { "name": "GigabitEthernet0/1", "description": "Uplink Interface", "enabled": true } }

  2. B

    { "interface": { "name": "GigabitEthernet0/1", "desc": "Uplink Interface", "enabled": true } }

  3. C

    { "interface": { "name": "GigabitEthernet0/1", "description": "Uplink Interface", "enabled": "true" } }

  4. D

    { "name": "GigabitEthernet0/1", "description": "Uplink Interface", "enabled": true }

Show answer and explanation

Correct answer: A

Explanation

The correct JSON instance must adhere to the YANG model structure, including proper field names, data types, and hierarchy. The 'interface' container must encapsulate the 'name', 'description', and 'enabled' fields, with 'enabled' being a boolean and the field names matching exactly as defined in the YANG model.

  • A. Correct.

    This option correctly follows the YANG model structure, using the exact field names ('name', 'description', 'enabled') and correct data types (string for 'name' and 'description', boolean for 'enabled').

  • B. Incorrect.

    This option incorrectly uses 'desc' instead of 'description', which does not align with the YANG model structure.

  • C. Incorrect.

    This option uses a string ('"true"') instead of a boolean (true) for the 'enabled' field, which does not conform to the YANG model.

  • D. Incorrect.

    This option does not encapsulate the fields within the 'interface' container, which violates the YANG model's 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