From a15014f317409f20207644a6ae524fd86b295333 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Wed, 1 Jun 2022 15:37:49 +0200 Subject: isisd: replace ipv4-unicast with standard in config and oper contexts Only the multi-topology command can use 'ipv4-unicast' keyword to configure standard topology. The remaining code: dump from show commands, and yang definition, uses 'standard' keyword instead. The test have not been modified. The change would consists in modifying test_fuzz_isis_tlv_tests.h.gz: - replacing ipv4-unicast occurences with standard \x69\x70\x76\x34\x2d\x75\x6e\x69\x63\x61\x73\x74 with \x73\x74\x61\x6e\x64\x61\x72\x64 - align the buffer length by removing 4 bytes per occurence Instead, a specific isis_mtid2str_fake() routing has been put in place in isis_tlvs.c file. Signed-off-by: Philippe Guibert --- isisd/isis_cli.c | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) (limited to 'isisd/isis_cli.c') diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index c23b0f0dc1..2bf9eadaba 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -1348,26 +1348,30 @@ void cli_show_isis_redistribute_ipv6(struct vty *vty, /* * XPath: /frr-isisd:isis/instance/multi-topology */ -DEFPY_YANG(isis_topology, isis_topology_cmd, - "[no] topology $topology [overload]$overload", - NO_STR - "Configure IS-IS topologies\n" - "IPv4 unicast topology\n" - "IPv4 management topology\n" - "IPv6 unicast topology\n" - "IPv4 multicast topology\n" - "IPv6 multicast topology\n" - "IPv6 management topology\n" - "IPv6 dst-src topology\n" - "Set overload bit for topology\n") +DEFPY_YANG( + isis_topology, isis_topology_cmd, + "[no] topology $topology [overload]$overload", + NO_STR + "Configure IS-IS topologies\n" + "standard topology\n" + "IPv4 unicast topology\n" + "IPv4 management topology\n" + "IPv6 unicast topology\n" + "IPv4 multicast topology\n" + "IPv6 multicast topology\n" + "IPv6 management topology\n" + "IPv6 dst-src topology\n" + "Set overload bit for topology\n") { char base_xpath[XPATH_MAXLEN]; - /* Since IPv4-unicast is not configurable it is not present in the + /* Since standard is not configurable it is not present in the * YANG model, so we need to validate it here */ - if (strmatch(topology, "ipv4-unicast")) { - vty_out(vty, "Cannot configure IPv4 unicast topology\n"); + if (strmatch(topology, "standard") || + strmatch(topology, "ipv4-unicast")) { + vty_out(vty, + "Cannot configure IPv4 unicast (Standard) topology\n"); return CMD_WARNING_CONFIG_FAILED; } @@ -2333,10 +2337,11 @@ void cli_show_ip_isis_psnp_interval(struct vty *vty, * XPath: /frr-interface:lib/interface/frr-isisd:isis/multi-topology */ DEFPY_YANG(circuit_topology, circuit_topology_cmd, - "[no] isis topology$topology", + "[no] isis topology$topology", NO_STR "IS-IS routing protocol\n" "Configure interface IS-IS topologies\n" + "Standard topology\n" "IPv4 unicast topology\n" "IPv4 management topology\n" "IPv6 unicast topology\n" @@ -2353,18 +2358,20 @@ DEFPY_YANG(circuit_topology, circuit_topology_cmd, else if (strmatch(topology, "ipv6-mgmt")) return nb_cli_apply_changes( vty, "./frr-isisd:isis/multi-topology/ipv6-management"); + if (strmatch(topology, "ipv4-unicast")) + return nb_cli_apply_changes( + vty, "./frr-isisd:isis/multi-topology/standard"); else return nb_cli_apply_changes( vty, "./frr-isisd:isis/multi-topology/%s", topology); } -void cli_show_ip_isis_mt_ipv4_unicast(struct vty *vty, - const struct lyd_node *dnode, - bool show_defaults) +void cli_show_ip_isis_mt_standard(struct vty *vty, const struct lyd_node *dnode, + bool show_defaults) { if (!yang_dnode_get_bool(dnode, NULL)) vty_out(vty, " no"); - vty_out(vty, " isis topology ipv4-unicast\n"); + vty_out(vty, " isis topology standard\n"); } void cli_show_ip_isis_mt_ipv4_multicast(struct vty *vty, -- cgit v1.2.3