nerdexam
Cisco

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

Submitted by tarun92· Mar 6, 2026Automation

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)
  • A
    2% (1)
  • B
    91% (49)
  • C
    6% (3)
  • D
    2% (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 name config; the lock() method requires target, not config
  • Options C & D both use m.freeze(), which is not a valid ncclient method at all - NETCONF has no "freeze" operation; the correct operation is lock()

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

#Python scripting#NETCONF#Device configuration lock#ncclient

Community Discussion

No community discussion yet for this question.

Full 350-401 Practice