300-435 exam dumps

300-435 practice question 77 of 322

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

300-435 Question 77

Select 3

You are tasked with creating a Python script using ncclient to retrieve the interface configuration of a Cisco device via NETCONF. Which of the following steps are necessary to accomplish this task?

  1. A

    Establish a NETCONF session to the device using ncclient's manager.connect() method

  2. B

    Use the get_config() method to retrieve the running configuration of the device

  3. C

    Import the requests library to handle NETCONF communication with the device

  4. D

    Specify the desired XML filter to retrieve only interface-related data

  5. E

    Install the NETCONF agent on the Cisco device before executing the script

Show answer and explanation

Correct answers: A, B, D

Explanation

To retrieve the interface configuration of a Cisco device using ncclient, you need to establish a NETCONF session, use the get_config() method to query the running configuration, and apply an XML filter to limit the output to interface-related details. The requests library is not applicable for NETCONF, and Cisco devices come with a built-in NETCONF agent, so no additional installation is required.

  • A. Correct.

    Correct: Establishing a NETCONF session is a fundamental step to communicate with the device using ncclient.

  • B. Correct.

    Correct: The get_config() method is used in ncclient to retrieve configuration data, including the running configuration.

  • C. Incorrect.

    Incorrect: The requests library is not used for NETCONF communication. The ncclient library handles this functionality.

  • D. Correct.

    Correct: Specifying an XML filter is required to limit the data returned to only the interface-related information.

  • E. Incorrect.

    Incorrect: Cisco devices already have a built-in NETCONF agent. There is no need to install a separate NETCONF agent.

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