diff options
| author | Emanuele Di Pascale <emanuele@voltanet.io> | 2018-11-14 14:35:43 +0100 |
|---|---|---|
| committer | Emanuele Di Pascale <emanuele@voltanet.io> | 2018-12-18 15:24:46 +0100 |
| commit | d082076585baa46e58d7becaabb311ea7f40ec0c (patch) | |
| tree | 3604fb86d6013dc650e1cea6c5c00c3c6e49fb82 /isisd/isis_cli.c | |
| parent | 9302fbb69303b47fbb6f8d3f8ad624494ab2cfed (diff) | |
isisd: retrofit the 'isis network' command
remove the return value and redundant validations from
isis_circuit_circ_type_set(), since they are no longer needed.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Diffstat (limited to 'isisd/isis_cli.c')
| -rw-r--r-- | isisd/isis_cli.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index 1102005d8c..4be87a791f 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -1799,6 +1799,31 @@ void cli_show_ip_isis_circ_type(struct vty *vty, struct lyd_node *dnode, } } +/* + * XPath: /frr-interface:lib/interface/frr-isisd:isis/network-type + */ +DEFPY(isis_network, isis_network_cmd, "[no] isis network point-to-point", + NO_STR + "IS-IS routing protocol\n" + "Set network type\n" + "point-to-point network type\n") +{ + nb_cli_enqueue_change(vty, "./frr-isisd:isis/network-type", + NB_OP_MODIFY, + no ? "broadcast" : "point-to-point"); + + return nb_cli_apply_changes(vty, NULL); +} + +void cli_show_ip_isis_network_type(struct vty *vty, struct lyd_node *dnode, + bool show_defaults) +{ + if (yang_dnode_get_enum(dnode, NULL) != CIRCUIT_T_P2P) + vty_out(vty, " no"); + + vty_out(vty, " isis network point-to-point\n"); +} + void isis_cli_init(void) { install_element(CONFIG_NODE, &router_isis_cmd); @@ -1879,6 +1904,8 @@ void isis_cli_init(void) install_element(INTERFACE_NODE, &isis_circuit_type_cmd); install_element(INTERFACE_NODE, &no_isis_circuit_type_cmd); + + install_element(INTERFACE_NODE, &isis_network_cmd); } #endif /* ifndef FABRICD */ |
