DevNet Associate (DEVASC) v1.0Infrastructure and AutomationHard
A network engineer is using a Python script with the 'ncclient' library to modify the running configuration of a Cisco IOS XE device via NETCONF. To ensure that the configuration change is atomic and either fully committed or fully rolled back in case of an error, which NETCONF operation should the engineer use after sending the configuration data?
- A<commit>
- B<get-config>
- C<discard-changes>
- D<edit-config> with 'test-option' set to 'test-only'
Show answer & explanationAnswer & explanation
Correct answer: A. <commit>
After sending configuration data using <edit-config> to a candidate datastore, the <commit> operation is essential to apply those changes atomically to the running configuration. This ensures that all changes are applied together or none are, providing transactional integrity.
Why the other options are wrong
- B. <get-config> is used to retrieve configuration, not apply it.
- C. <discard-changes> discards pending changes in the candidate datastore, rolling them back, but doesn't apply them.
- D. <edit-config> with 'test-only' validates changes but does not apply them. A subsequent <commit> is still needed.
NETCONF <commit> Operation
The NETCONF <commit> operation is used to atomically apply the changes from the candidate configuration datastore to the running configuration datastore on a network device. This ensures transactional integrity, meaning all changes are applied or none are.
- Applies candidate config to running config.
- Ensures atomicity (all or nothing).
- Crucial for transactional integrity.
- Typically follows an <edit-config> operation.
Memory trick: COMMIT 'COMPLETES' the configuration change transaction.