diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2022-06-01 15:37:49 +0200 | 
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2022-06-02 21:20:45 +0200 | 
| commit | a15014f317409f20207644a6ae524fd86b295333 (patch) | |
| tree | cf0716e4a18a414401bc059e536205ac167196dd /isisd/isis_cli.c | |
| parent | 6d07d1af1137a5943f21c7c35163e4b43e34e28c (diff) | |
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 <philippe.guibert@6wind.com>
Diffstat (limited to 'isisd/isis_cli.c')
| -rw-r--r-- | isisd/isis_cli.c | 47 | 
1 files changed, 27 insertions, 20 deletions
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 <ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$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 <standard|ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$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<ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$topology", +      "[no] isis topology<standard|ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$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,  | 
