home

Supported platforms

Vyatta NOS documentation

Learn how to install, configure, and operate Vyatta Network Operating System (Vyatta NOS), which helps to drive our virtual networking and physical platforms portfolio.

Lock a session — <lock>

An example of how to use the <lock> RPC to lock a session.

Vyatta NOS supports a single NETCONF session. Multiple users may connect to this session simultaneously, so it is important to terminate sessions cleanly by use of <close-session>. This will clear any locks that are on the session.

However, if you wish to lock the candidate configuration so that no non-NETCONF users can modify it during your session, use <lock>:

Use the <lock> RPC.
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <lock>
    <target>
      <candidate/>
    </target>
  </lock>
</rpc>
]]>]]>
Note: Unlock

To unlock the session, you would simply replace lock with unlock in this code example.

The unlock operation happens automatically when you use <close-session>.