diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-07-12 17:24:17 -0300 |
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-07-12 17:24:17 -0300 |
| commit | 8222b997c7e6c04ec35a3f00d1f9aeeb76003eb7 (patch) | |
| tree | 64011ad68fa7d50323a9bcd5c7851b678e3a5109 /isisd/isis_cli.c | |
| parent | 98ec2b3e402d5fae7955aa1cb53b5c7756ab65d4 (diff) | |
isisd: improvements based on feedback
* Remove sanity checks that are already done by northbound;
* Show error message on circuit absence;
* Use a better idiom for the configuration display code;
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_cli.c')
| -rw-r--r-- | isisd/isis_cli.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index 7ca4c8795c..4b43260773 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -346,8 +346,10 @@ DEFPY(isis_bfd, dnode = yang_dnode_get(vty->candidate_config->dnode, "%s/frr-isisd:isis", VTY_CURR_XPATH); - if (dnode == NULL) + if (dnode == NULL) { + vty_out(vty, "ISIS is not enabled on this circuit\n"); return CMD_SUCCESS; + } nb_cli_enqueue_change(vty, "./frr-isisd:isis/bfd-monitoring", NB_OP_MODIFY, no ? "false" : "true"); @@ -358,11 +360,10 @@ DEFPY(isis_bfd, void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode, bool show_defaults) { - if (show_defaults == false) - vty_out(vty, " %s" PROTO_NAME " bfd\n", - yang_dnode_get_bool(dnode, NULL) ? "" : "no "); - else - vty_out(vty, " no " PROTO_NAME " bfd\n"); + if (!yang_dnode_get_bool(dnode, NULL)) + vty_out(vty, " no"); + + vty_out(vty, "isis bfd\n"); } /* |
