diff options
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/vtysh.c | 26 | ||||
-rw-r--r-- | vtysh/vtysh.h | 1 | ||||
-rw-r--r-- | vtysh/vtysh_config.c | 20 |
3 files changed, 39 insertions, 8 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); diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h index 1de4ab017..e551f4e9f 100644 --- a/vtysh/vtysh.h +++ b/vtysh/vtysh.h @@ -59,6 +59,7 @@ extern struct thread_master *master; * things like prefix lists are not even initialised) */ #define VTYSH_ALL VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_LDPD|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD|VTYSH_PIM6D|VTYSH_NHRPD|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_SHARPD|VTYSH_PBRD|VTYSH_STATICD|VTYSH_BFDD|VTYSH_FABRICD|VTYSH_VRRPD|VTYSH_PATHD #define VTYSH_ACL VTYSH_BFDD|VTYSH_BABELD|VTYSH_BGPD|VTYSH_EIGRPD|VTYSH_ISISD|VTYSH_FABRICD|VTYSH_LDPD|VTYSH_NHRPD|VTYSH_OSPF6D|VTYSH_OSPFD|VTYSH_PBRD|VTYSH_PIMD|VTYSH_PIM6D|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_VRRPD|VTYSH_ZEBRA +#define VTYSH_AFFMAP VTYSH_ZEBRA #define VTYSH_RMAP VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD|VTYSH_EIGRPD|VTYSH_FABRICD #define VTYSH_INTERFACE_SUBSET \ VTYSH_ZEBRA | VTYSH_RIPD | VTYSH_RIPNGD | VTYSH_OSPFD | VTYSH_OSPF6D | \ diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index ac32f0a77..6dce99a57 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -395,6 +395,9 @@ void vtysh_config_parse_line(void *arg, const char *line) else if (strncmp(line, "router openfabric", strlen("router openfabric")) == 0) config = config_get(OPENFABRIC_NODE, line); + else if (strncmp(line, "affinity-map", + strlen("affinity-map")) == 0) + config = config_get(AFFMAP_NODE, line); else if (strncmp(line, "route-map", strlen("route-map")) == 0) config = config_get(RMAP_NODE, line); else if (strncmp(line, "no route-map", strlen("no route-map")) @@ -526,14 +529,15 @@ void vtysh_config_parse_line(void *arg, const char *line) /* Macro to check delimiter is needed between each configuration line * or not. */ #define NO_DELIMITER(I) \ - ((I) == ACCESS_NODE || (I) == PREFIX_NODE || (I) == IP_NODE \ - || (I) == AS_LIST_NODE || (I) == COMMUNITY_LIST_NODE \ - || (I) == COMMUNITY_ALIAS_NODE || (I) == ACCESS_IPV6_NODE \ - || (I) == ACCESS_MAC_NODE || (I) == PREFIX_IPV6_NODE \ - || (I) == FORWARDING_NODE || (I) == DEBUG_NODE || (I) == AAA_NODE \ - || (I) == VRF_DEBUG_NODE || (I) == NORTHBOUND_DEBUG_NODE \ - || (I) == RMAP_DEBUG_NODE || (I) == RESOLVER_DEBUG_NODE \ - || (I) == MPLS_NODE || (I) == KEYCHAIN_KEY_NODE) + ((I) == AFFMAP_NODE || (I) == ACCESS_NODE || (I) == PREFIX_NODE || \ + (I) == IP_NODE || (I) == AS_LIST_NODE || \ + (I) == COMMUNITY_LIST_NODE || (I) == COMMUNITY_ALIAS_NODE || \ + (I) == ACCESS_IPV6_NODE || (I) == ACCESS_MAC_NODE || \ + (I) == PREFIX_IPV6_NODE || (I) == FORWARDING_NODE || \ + (I) == DEBUG_NODE || (I) == AAA_NODE || (I) == VRF_DEBUG_NODE || \ + (I) == NORTHBOUND_DEBUG_NODE || (I) == RMAP_DEBUG_NODE || \ + (I) == RESOLVER_DEBUG_NODE || (I) == MPLS_NODE || \ + (I) == KEYCHAIN_KEY_NODE) static void configvec_dump(vector vec, bool nested) { |