300-435 Question 74
Select 4You are tasked with creating a Python script to manage and monitor an interface on a Cisco device using NETCONF. Which steps should be included in your Python script when using the ncclient library?
- A
Establish a NETCONF session using the manager.connect() method.
- B
Use the manager.get_config() method to retrieve the running configuration.
- C
Send HTTP requests to the device to fetch operational data.
- D
Apply an XML filter to the manager.get() method for specific data retrieval.
- E
Use the manager.edit_config() method to modify the device configuration.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
To manage and monitor a Cisco device using NETCONF with the ncclient library, you must establish a NETCONF session using manager.connect(), retrieve configurations using manager.get_config(), and apply XML filters for specific data retrieval using manager.get(). Additionally, manager.edit_config() is used for configuration changes. NETCONF does not involve HTTP requests, as it operates over SSH with XML-based RPCs.
- A. Correct.
Correct. The manager.connect() method is essential to establish a NETCONF session with the device.
- B. Correct.
Correct. The manager.get_config() method is commonly used to retrieve the current running configuration of a device.
- C. Incorrect.
Incorrect. NETCONF does not use HTTP protocols to fetch data; it relies on XML-based RPCs over SSH.
- D. Correct.
Correct. Applying an XML filter to the manager.get() method allows specific data to be retrieved efficiently.
- E. Correct.
Correct. The manager.edit_config() method is used to modify or apply configuration changes on the device.