summaryrefslogtreecommitdiffstats
path: root/vtysh/vtysh.c
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2022-11-03 14:30:23 +0100
committerLouis Scalbert <louis.scalbert@6wind.com>2023-02-09 15:48:21 +0100
commit05a12619dd6eca2feabebb987239c5a133754fef (patch)
tree826c0a9155d94f36b21c8f71919da18d4a3d22ad /vtysh/vtysh.c
parentMerge pull request #12730 from louis-6wind/fix-ext-te-metrics (diff)
downloadfrr-05a12619dd6eca2feabebb987239c5a133754fef.tar.xz
frr-05a12619dd6eca2feabebb987239c5a133754fef.zip
lib,yang,zebra: add affinity-map support
Add the affinity-map global command to zebra. The syntax is: > affinity-map NAME bit-position (0-1023) Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'vtysh/vtysh.c')
-rw-r--r--vtysh/vtysh.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index acc984ced..2538d2073 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -2216,6 +2216,29 @@ DEFUNSH(VTYSH_PATHD, pcep_cli_pcep_pce_config, pcep_cli_pcep_pce_config_cmd,
#endif /* HAVE_PATHD */
+/* max value is EXT_ADMIN_GROUP_MAX_POSITIONS - 1 */
+DEFUNSH(VTYSH_AFFMAP, affinity_map, vtysh_affinity_map_cmd,
+ "affinity-map NAME bit-position (0-1023)",
+ "Affinity map configuration\n"
+ "Affinity attribute name\n"
+ "Bit position for affinity attribute value\n"
+ "Bit position\n")
+{
+ return CMD_SUCCESS;
+}
+
+/* max value is EXT_ADMIN_GROUP_MAX_POSITIONS - 1 */
+DEFUNSH(VTYSH_AFFMAP, no_affinity_map, vtysh_no_affinity_map_cmd,
+ "no affinity-map NAME$name [bit-position (0-1023)$position]",
+ NO_STR
+ "Affinity map configuration\n"
+ "Affinity attribute name\n"
+ "Bit position for affinity attribute value\n"
+ "Bit position\n")
+{
+ return CMD_SUCCESS;
+}
+
DEFUNSH(VTYSH_RMAP, vtysh_route_map, vtysh_route_map_cmd,
"route-map RMAP_NAME <deny|permit> (1-65535)",
"Create route-map or enter route-map command mode\n"
@@ -4850,6 +4873,9 @@ void vtysh_init_vty(void)
install_element(VRF_NODE, &vtysh_exit_vrf_cmd);
install_element(VRF_NODE, &vtysh_quit_vrf_cmd);
+ install_element(CONFIG_NODE, &vtysh_affinity_map_cmd);
+ install_element(CONFIG_NODE, &vtysh_no_affinity_map_cmd);
+
install_node(&rmap_node);
install_element(CONFIG_NODE, &vtysh_route_map_cmd);
install_element(RMAP_NODE, &vtysh_exit_rmap_cmd);