]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/northbound_cli.c
*: remove the configuration lock from all daemons
[mirror_frr.git] / lib / northbound_cli.c
index 8ae44e72d52b0b1d800ffcdc0cab574d03d5b31e..01f577fd5bc7e55d8d4b121ccd6cf5d4665177a3 100644 (file)
@@ -492,20 +492,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. */
@@ -515,20 +502,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,