summaryrefslogtreecommitdiffstats
path: root/isisd/isis_cli.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-04-26 21:01:43 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2021-04-29 16:05:21 +0200
commitf07572c3c748f5ee5a0277ad4210d76001423512 (patch)
tree7727819e6151c9ceaaa7adcce4026bff914014a1 /isisd/isis_cli.c
parentisisd: don't use operational data in "no isis circuit-type" (diff)
downloadfrr-f07572c3c748f5ee5a0277ad4210d76001423512.tar.xz
frr-f07572c3c748f5ee5a0277ad4210d76001423512.zip
isisd: move ldp-sync checks from cli to nb callbacks
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'isisd/isis_cli.c')
-rw-r--r--isisd/isis_cli.c36
1 files changed, 0 insertions, 36 deletions
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);