DevNet Associate (DEVASC) v1.0Infrastructure and AutomationMedium
A network automation script is designed to retrieve operational state data, such as interface statistics and routing table entries, from a Cisco IOS XE device. The script needs to use a standards-based, XML-encoded protocol for this purpose, and the data should be retrieved from the device's current operational state without modifying its configuration. Which NETCONF operation is most appropriate?
- A<get>
- B<edit-config>
- C<get-config>
- D<copy-config>
Show answer & explanationAnswer & explanation
Correct answer: A. <get>
The NETCONF <get> operation is used to retrieve both configuration data and operational state data. It queries the device's current state and configuration, without modifying anything. In contrast, <get-config> is specifically for configuration data from a named datastore.
Why the other options are wrong
- B. <edit-config> is for modifying configuration, not retrieving operational state.
- C. <get-config> retrieves only configuration data from a specific datastore, not general operational state.
- D. <copy-config> copies configuration between datastores, not for retrieving operational state.
NETCONF <get> Operation
The NETCONF <get> operation is used to retrieve configuration data and/or operational state data from a network device. It queries the device's current state and configuration, typically from the running datastore, without making any changes.
- Retrieves config and operational state.
- Non-modifying operation.
- Queries current device state.
- Uses XPath for filtering.
Memory trick: GET 'GLOBAL' data: config AND state.