Implementing and Operating Cisco Enterprise Network Core Technologies (ENCOR) — Question 84

A network administrator is preparing a Python script 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 the ncclient manager prevents colleagues from making changes to the devices while the script is running?

Answer options

Correct answer: B

Explanation

The correct answer is B, as the m.lock(target='running') command locks the running configuration, preventing any changes during the execution of the script. Option A is incorrect because it uses 'config' instead of 'target', which is not the correct syntax. Options C and D are also incorrect because 'freeze' does not provide the same locking mechanism as 'lock' for the running configuration.