350-401 Question 308
Single answerA network engineer has been tasked with automating the configuration of multiple VLANs across a large enterprise network. The engineer decides to use Python and NETCONF to achieve this. During the implementation, the engineer wants to retrieve the current VLAN configuration to ensure it matches the desired state before making changes. Which NETCONF operation should the engineer use for this purpose?
- A
edit-config
- B
get-config
- C
copy-config
- D
lock
Show answer and explanation
Correct answer: B
Explanation
The get-config operation in NETCONF is specifically designed to retrieve the current configuration data from a specified datastore (such as the running datastore). This allows the network engineer to validate the current VLAN configuration against the desired state before making any changes. Using the appropriate NETCONF operation ensures the automation process is both efficient and accurate.
- A. Incorrect.
The edit-config operation is used to modify the configuration of a target datastore, not to retrieve the current configuration.
- B. Correct.
The get-config operation is used to retrieve configuration data from a datastore, making it the correct choice for verifying the current VLAN configuration.
- C. Incorrect.
The copy-config operation is used to copy configuration data from one datastore to another, not for retrieving the existing configuration.
- D. Incorrect.
The lock operation is used to lock a datastore to prevent other changes during an operation, but it does not retrieve configuration data.