OcNOS-SP : System Management Guide : System Management Command Reference : Common Management Layer Commands : cml lock config-datastore
cml lock config-datastore
Use this command to lock the entire configuration datastore of a device. Such locks are intended to be short-lived and allow you to make a change without fear of interaction with other users.
When the lock is acquired, the server prevents any changes to the locked resource other than those requested by this session.
The duration of the lock is defined as beginning when the lock is acquired and lasting until either the lock is released or the user session closes. The session closure can be explicitly performed by the user, or implicitly performed by the server based on criteria such as failure of the underlying transport, simple inactivity timeout, or detection of abusive behavior on the part of the client.
A lock will not be granted if any of the following conditions is true:
A lock is already held by any user session or another entity.
The target configuration is candidate, it has already been modified, and these changes have not been committed or rolled back.
The target configuration is running, and another user session has an ongoing confirmed commit.
Command Syntax
cml lock config-datastore (running|startup|candidate)
Parameters
running
Lock on this datastore will not allow other sessions to perform operations with the target as running like commit, copy candidate to running and so on.
startup
Lock on this datastore will not allow other sessions to perform operations like copy-config and delete-config with the target startup
candidate
Lock on this datastore will not allow other sessions to perform operations with the target as candidate like edit-config, copy file candidate and so on. (Not supported in OcNOS version 5.1.)
Default
All three datastores are in the unlocked state.
Mode
Exec mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
#cml lock config-datastore running
#
#show users
Current user : (*). Lock acquired by user : (#).
CLI user : [C]. Netconf users : [N].
Location : Applicable to CLI users.
Session : Applicable to NETCONF users.
 
Line User Idle Location/Session PID TYPE Role
 
(#)(*) 130 vty 0 [C]ocnos 0d00h00m pts/0 10732 Local network-admin
Last modified date: 08/28/2023