diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-14 01:37:27 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-08-03 22:14:06 +0300 |
| commit | cfb37710bc3b1ee3fee5f0d13496546080c5e70b (patch) | |
| tree | 0861c4499ee5ef2da9c34ef99185419b40171466 | |
| parent | 9c605264e9170117b1a71661a697bd53ee29a2e9 (diff) | |
Revert "bgpd: forbid modification of bgp instance type"
This reverts commit d3e3677096e5cf30116ca63879caf44e25b080ad.
| -rw-r--r-- | bgpd/bgp_nb_config.c | 17 | ||||
| -rw-r--r-- | bgpd/bgp_vty.c | 4 |
2 files changed, 1 insertions, 20 deletions
diff --git a/bgpd/bgp_nb_config.c b/bgpd/bgp_nb_config.c index ab22aee1ca..7573c40cfa 100644 --- a/bgpd/bgp_nb_config.c +++ b/bgpd/bgp_nb_config.c @@ -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; } diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 909815a133..fb01d16b97 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -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); |
