summaryrefslogtreecommitdiff
path: root/lib/northbound_cli.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-11-30 18:50:49 -0500
committerGitHub <noreply@github.com>2018-11-30 18:50:49 -0500
commit0ee78eafbd65268d0ccda1aa04eecff9664a6420 (patch)
tree22b65585ede915baa416f4274e8e7d13c1e662e5 /lib/northbound_cli.c
parent1b982ea43031fbbdab45faf0c132590144c28f6d (diff)
parentf344c66ea358c151a218e986173e60bb0295e003 (diff)
Merge pull request #3378 from opensourcerouting/remove-config-lock
*: remove the configuration lock from all daemons
Diffstat (limited to 'lib/northbound_cli.c')
-rw-r--r--lib/northbound_cli.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c
index a3006264f1..2cacc6b1dc 100644
--- a/lib/northbound_cli.c
+++ b/lib/northbound_cli.c
@@ -519,20 +519,7 @@ DEFUN (config_exclusive,
"Configuration from vty interface\n"
"Configure exclusively from this terminal\n")
{
- if (vty_config_exclusive_lock(vty))
- vty->node = CONFIG_NODE;
- else {
- vty_out(vty, "VTY configuration is locked by other VTY\n");
- return CMD_WARNING_CONFIG_FAILED;
- }
-
- vty->private_config = true;
- vty->candidate_config = nb_config_dup(running_config);
- vty->candidate_config_base = nb_config_dup(running_config);
- vty_out(vty,
- "Warning: uncommitted changes will be discarded on exit.\n\n");
-
- return CMD_SUCCESS;
+ return vty_config_enter(vty, true, true);
}
/* Configure using a private candidate configuration. */
@@ -542,20 +529,7 @@ DEFUN (config_private,
"Configuration from vty interface\n"
"Configure using a private candidate configuration\n")
{
- if (vty_config_lock(vty))
- vty->node = CONFIG_NODE;
- else {
- vty_out(vty, "VTY configuration is locked by other VTY\n");
- return CMD_WARNING_CONFIG_FAILED;
- }
-
- vty->private_config = true;
- vty->candidate_config = nb_config_dup(running_config);
- vty->candidate_config_base = nb_config_dup(running_config);
- vty_out(vty,
- "Warning: uncommitted changes will be discarded on exit.\n\n");
-
- return CMD_SUCCESS;
+ return vty_config_enter(vty, true, false);
}
DEFPY (config_commit,