• 2021-03-17
  • 2021-04-04
  • 0件

[350-401]Exclusive control by Python script

Question The network administrator has prepared a Python script to configure a network device running based on IOS XE. The administrator is worried that a colleague will make configuration changes to the device while the script is running. What is the Client Manager action to prevent colleagues from making changes to the device while the script is running? m.lock (config = ‘running’) m.lock (target = ‘running’) m.freeze (config = ‘running’) m.freeze (target = ‘running’) See Answer ②   Commentary Python lock() object It is a Python object used for exclusive control when performing parallel processing. Specify the specified resource in () and control (block) the process when the executed work / command matches. <reference>Python Documentation (threading) IOS NETCONF target /config/ Resources in the NETCONF configuration store <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <lock> <target> <running/> </target> </lock> </rpc> <reference> Cisco Programmability Guide