350-401 · Question #167
A network administrator is preparing a Python scrip to configure a Cisco IOS XE-based device on the network. The administrator is worried that colleagues will make changes to the device while the scri
The correct answer is B. m.lock (target='running'). NETCONF Manager Lock Operation Option B (m.lock(target='running')) is correct because in NETCONF (the protocol used to configure IOS XE devices via Python's ncclient library), the lock() method uses the parameter target to specify which datastore to lock - in this case, the runni
Question
A network administrator is preparing a Python scrip to configure a Cisco IOS XE-based device on the network. The administrator is worried that colleagues will make changes to the device while the script is running. Which operation of he in client manager prevent colleague making changes to the device while the scrip is running?
Options
- Am.lock (config='running')
- Bm.lock (target='running')
- Cm.freeze (target='running')
- Dm.freeze (config='running')
How the community answered
(54 responses)- A2% (1)
- B91% (49)
- C6% (3)
- D2% (1)
Explanation
NETCONF Manager Lock Operation
Option B (m.lock(target='running')) is correct because in NETCONF (the protocol used to configure IOS XE devices via Python's ncclient library), the lock() method uses the parameter target to specify which datastore to lock - in this case, the running configuration - preventing other sessions from making changes while the script executes.
Why the distractors are wrong:
- Option A (
m.lock(config='running')) uses the incorrect parameter nameconfig; thelock()method requirestarget, notconfig - Options C & D both use
m.freeze(), which is not a valid ncclient method at all - NETCONF has no "freeze" operation; the correct operation islock()
Memory Tip: Think "NETCONF locks on TARGET" - just like you target a specific datastore (running, candidate, or startup) in all NETCONF datastore operations. The word freeze doesn't exist in NETCONF vocabulary, and config is a common decoy parameter name borrowed from other contexts. If you remember that lock and target are the valid pairing, you can eliminate all three distractors quickly.
Topics
Community Discussion
No community discussion yet for this question.