]> git.puffer.fish Git - mirror/frr.git/commitdiff
Revert "bgpd: forbid modification of bgp instance type"
authorIgor Ryzhov <iryzhov@nfware.com>
Thu, 13 May 2021 22:37:27 +0000 (01:37 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 3 Aug 2021 19:14:06 +0000 (22:14 +0300)
This reverts commit d3e3677096e5cf30116ca63879caf44e25b080ad.

bgpd/bgp_nb_config.c
bgpd/bgp_vty.c

index ab22aee1ca5de26d4a758c21bd95ad8b99a4f497..7573c40cfa422c348ca2ae8ce7e5f166b1a6e0f8 100644 (file)
@@ -1508,27 +1508,12 @@ int bgp_global_global_config_timers_keepalive_modify(
  */
 int bgp_global_instance_type_view_modify(struct nb_cb_modify_args *args)
 {
-       struct bgp *bgp;
-
        switch (args->event) {
        case NB_EV_VALIDATE:
-               /*
-                * Changing instance type is not allowed, but we must allow it
-                * once, when the BGP instance is created the first time.
-                * If the instance already exists - return the validation
-                * error.
-                */
-               bgp = nb_running_get_entry_non_rec(
-                       lyd_parent(lyd_parent(args->dnode)), NULL, false);
-               if (bgp) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Changing instance type is not allowed");
-                       return NB_ERR_VALIDATION;
-               }
-               break;
        case NB_EV_PREPARE:
        case NB_EV_ABORT:
        case NB_EV_APPLY:
+               /* TODO: implement me. */
                break;
        }
 
index 909815a133c5f61c86c052c741206e920034aec3..fb01d16b97d2b14ba7138f54bcc3480fd558af02 100644 (file)
@@ -1452,10 +1452,6 @@ DEFUN_YANG_NOSH(router_bgp,
                        nb_cli_enqueue_change(vty,
                                              "./global/instance-type-view",
                                              NB_OP_MODIFY, "true");
-               } else {
-                       nb_cli_enqueue_change(vty,
-                                             "./global/instance-type-view",
-                                             NB_OP_MODIFY, "false");
                }
 
                ret = nb_cli_apply_changes_clear_pending(vty, base_xpath);