From f07572c3c748f5ee5a0277ad4210d76001423512 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Mon, 26 Apr 2021 22:01:43 +0300 Subject: isisd: move ldp-sync checks from cli to nb callbacks Signed-off-by: Igor Ryzhov --- isisd/isis_cli.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'isisd/isis_cli.c') diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index f29d6e341..3e719df4b 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -3057,7 +3057,6 @@ DEFPY(isis_mpls_if_ldp_sync, isis_mpls_if_ldp_sync_cmd, NO_STR "IS-IS routing protocol\n" MPLS_STR MPLS_LDP_SYNC_STR) { const struct lyd_node *dnode; - struct interface *ifp; dnode = yang_dnode_get(vty->candidate_config->dnode, "%s/frr-isisd:isis", VTY_CURR_XPATH); @@ -3066,17 +3065,6 @@ DEFPY(isis_mpls_if_ldp_sync, isis_mpls_if_ldp_sync_cmd, return CMD_SUCCESS; } - ifp = nb_running_get_entry(NULL, VTY_CURR_XPATH, false); - if (if_is_loopback(ifp)) { - vty_out(vty, "ldp-sync does not run on loopback interface\n"); - return CMD_SUCCESS; - } - - if (ifp->vrf_id != VRF_DEFAULT) { - vty_out(vty, "ldp-sync only runs on DEFAULT VRF\n"); - return CMD_SUCCESS; - } - nb_cli_enqueue_change(vty, "./frr-isisd:isis/mpls/ldp-sync", NB_OP_MODIFY, no ? "false" : "true"); @@ -3100,7 +3088,6 @@ DEFPY(isis_mpls_if_ldp_sync_holddown, isis_mpls_if_ldp_sync_holddown_cmd, "Time in seconds\n") { const struct lyd_node *dnode; - struct interface *ifp; dnode = yang_dnode_get(vty->candidate_config->dnode, "%s/frr-isisd:isis", VTY_CURR_XPATH); @@ -3109,17 +3096,6 @@ DEFPY(isis_mpls_if_ldp_sync_holddown, isis_mpls_if_ldp_sync_holddown_cmd, return CMD_SUCCESS; } - ifp = nb_running_get_entry(NULL, VTY_CURR_XPATH, false); - if (if_is_loopback(ifp)) { - vty_out(vty, "ldp-sync does not run on loopback interface\n"); - return CMD_SUCCESS; - } - - if (ifp->vrf_id != VRF_DEFAULT) { - vty_out(vty, "ldp-sync only runs on DEFAULT VRF\n"); - return CMD_SUCCESS; - } - nb_cli_enqueue_change(vty, "./frr-isisd:isis/mpls/holddown", NB_OP_MODIFY, holddown_str); @@ -3132,7 +3108,6 @@ DEFPY(no_isis_mpls_if_ldp_sync_holddown, no_isis_mpls_if_ldp_sync_holddown_cmd, NO_MPLS_LDP_SYNC_HOLDDOWN_STR "Time in seconds\n") { const struct lyd_node *dnode; - struct interface *ifp; dnode = yang_dnode_get(vty->candidate_config->dnode, "%s/frr-isisd:isis", VTY_CURR_XPATH); @@ -3141,17 +3116,6 @@ DEFPY(no_isis_mpls_if_ldp_sync_holddown, no_isis_mpls_if_ldp_sync_holddown_cmd, return CMD_SUCCESS; } - ifp = nb_running_get_entry(NULL, VTY_CURR_XPATH, false); - if (if_is_loopback(ifp)) { - vty_out(vty, "ldp-sync does not run on loopback interface\n"); - return CMD_SUCCESS; - } - - if (ifp->vrf_id != VRF_DEFAULT) { - vty_out(vty, "ldp-sync only runs on DEFAULT VRF\n"); - return CMD_SUCCESS; - } - nb_cli_enqueue_change(vty, "./frr-isisd:isis/mpls/holddown", NB_OP_DESTROY, NULL); -- cgit v1.2.3