200-901 Question 26
Single answerYou are working on a Python script that interacts with a network device using the NETCONF protocol. After editing the device's configuration using an 'edit-config' operation, which step is necessary to save the changes and ensure they persist on the device?
- A
Execute a 'commit' operation
- B
Send a 'discard-changes' operation
- C
Perform a 'get-config' operation
- D
Restart the network device
Show answer and explanation
Correct answer: A
Explanation
In the NETCONF protocol, after editing the configuration using an 'edit-config' operation, the changes are initially stored in a candidate datastore. To apply these changes to the running configuration and ensure they persist, a 'commit' operation must be executed. This step finalizes the configuration modifications on the device.
- A. Correct.
Executing a 'commit' operation is required to apply the edited configuration and make it persistent on the network device. Without this step, the changes remain in the candidate configuration and are not applied.
- B. Incorrect.
Sending a 'discard-changes' operation would undo the changes made to the candidate configuration, effectively canceling any edits rather than saving them.
- C. Incorrect.
Performing a 'get-config' operation is used to retrieve the configuration from the device but does not apply or save changes to the configuration.
- D. Incorrect.
Restarting the network device is not a valid step for saving configuration changes in the NETCONF workflow. It may disrupt the network but would not commit the changes.