yang, isisd: add LFA nodes, NB skeleton callbacks and CLI commands

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
Renato Westphal 2020-11-05 23:55:35 -03:00
parent 2866b11911
commit d20b14bcd7
5 changed files with 1118 additions and 39 deletions

View file

@ -1127,6 +1127,54 @@ void cli_show_isis_spf_ietf_backoff(struct vty *vty, struct lyd_node *dnode,
yang_dnode_get_string(dnode, "./time-to-learn"));
}
/*
* XPath: /frr-isisd:isis/instance/spf/prefix-priorities/medium/access-list-name
*/
DEFPY_YANG(spf_prefix_priority, spf_prefix_priority_cmd,
"spf prefix-priority <critical|high|medium>$priority WORD$acl_name",
"SPF configuration\n"
"Configure a prefix priority list\n"
"Specify critical priority prefixes\n"
"Specify high priority prefixes\n"
"Specify medium priority prefixes\n"
"Access-list name\n")
{
char xpath[XPATH_MAXLEN];
snprintf(xpath, XPATH_MAXLEN,
"./spf/prefix-priorities/%s/access-list-name", priority);
nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, acl_name);
return nb_cli_apply_changes(vty, NULL);
}
DEFPY_YANG(no_spf_prefix_priority, no_spf_prefix_priority_cmd,
"no spf prefix-priority <critical|high|medium>$priority [WORD]",
NO_STR
"SPF configuration\n"
"Configure a prefix priority list\n"
"Specify critical priority prefixes\n"
"Specify high priority prefixes\n"
"Specify medium priority prefixes\n"
"Access-list name\n")
{
char xpath[XPATH_MAXLEN];
snprintf(xpath, XPATH_MAXLEN,
"./spf/prefix-priorities/%s/access-list-name", priority);
nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL);
return nb_cli_apply_changes(vty, NULL);
}
void cli_show_isis_spf_prefix_priority(struct vty *vty, struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " spf prefix-priority %s %s\n",
dnode->parent->schema->name,
yang_dnode_get_string(dnode, NULL));
}
/*
* XPath: /frr-isisd:isis/instance/purge-originator
*/
@ -1720,6 +1768,176 @@ void cli_show_isis_prefix_sid(struct vty *vty, struct lyd_node *dnode,
vty_out(vty, "\n");
}
/*
* XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/lfa/priority-limit
*/
DEFPY_YANG (isis_frr_lfa_priority_limit,
isis_frr_lfa_priority_limit_cmd,
"[no] fast-reroute priority-limit <critical|high|medium>$priority [<level-1|level-2>$level]",
NO_STR
"Configure Fast ReRoute\n"
"Limit backup computation up to the prefix priority\n"
"Compute for critical priority prefixes only\n"
"Compute for critical & high priority prefixes\n"
"Compute for critical, high & medium priority prefixes\n"
"Set priority-limit for level-1 only\n"
"Set priority-limit for level-2 only\n")
{
if (!level || strmatch(level, "level-1")) {
if (no) {
nb_cli_enqueue_change(
vty,
"./fast-reroute/level-1/lfa/priority-limit",
NB_OP_DESTROY, NULL);
} else {
nb_cli_enqueue_change(
vty,
"./fast-reroute/level-1/lfa/priority-limit",
NB_OP_CREATE, priority);
}
}
if (!level || strmatch(level, "level-2")) {
if (no) {
nb_cli_enqueue_change(
vty,
"./fast-reroute/level-2/lfa/priority-limit",
NB_OP_DESTROY, NULL);
} else {
nb_cli_enqueue_change(
vty,
"./fast-reroute/level-2/lfa/priority-limit",
NB_OP_CREATE, priority);
}
}
return nb_cli_apply_changes(vty, NULL);
}
void cli_show_isis_frr_lfa_priority_limit(struct vty *vty,
struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " fast-reroute priority-limit %s %s\n",
yang_dnode_get_string(dnode, NULL),
dnode->parent->parent->schema->name);
}
/*
* XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/lfa/tiebreaker
*/
DEFPY_YANG (isis_frr_lfa_tiebreaker,
isis_frr_lfa_tiebreaker_cmd,
"[no] fast-reroute lfa\
tiebreaker <downstream|lowest-backup-metric|node-protecting>$type\
index (1-255)$index\
[<level-1|level-2>$level]",
NO_STR
"Configure Fast ReRoute\n"
"LFA configuration\n"
"Configure tiebreaker for multiple backups\n"
"Prefer backup path via downstream node\n"
"Prefer backup path with lowest total metric\n"
"Prefer node protecting backup path\n"
"Set preference order among tiebreakers\n"
"Index\n"
"Configure tiebreaker for level-1 only\n"
"Configure tiebreaker for level-2 only\n")
{
char xpath[XPATH_MAXLEN];
if (!level || strmatch(level, "level-1")) {
if (no) {
snprintf(
xpath, XPATH_MAXLEN,
"./fast-reroute/level-1/lfa/tiebreaker[index='%s']",
index_str);
nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL);
} else {
snprintf(
xpath, XPATH_MAXLEN,
"./fast-reroute/level-1/lfa/tiebreaker[index='%s']/type",
index_str);
nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, type);
}
}
if (!level || strmatch(level, "level-2")) {
if (no) {
snprintf(
xpath, XPATH_MAXLEN,
"./fast-reroute/level-2/lfa/tiebreaker[index='%s']",
index_str);
nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL);
} else {
snprintf(
xpath, XPATH_MAXLEN,
"./fast-reroute/level-2/lfa/tiebreaker[index='%s']/type",
index_str);
nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, type);
}
}
return nb_cli_apply_changes(vty, NULL);
}
void cli_show_isis_frr_lfa_tiebreaker(struct vty *vty, struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " fast-reroute lfa tiebreaker %s index %s %s\n",
yang_dnode_get_string(dnode, "./type"),
yang_dnode_get_string(dnode, "./index"),
dnode->parent->parent->schema->name);
}
/*
* XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/lfa/load-sharing
*/
DEFPY_YANG (isis_frr_lfa_load_sharing,
isis_frr_lfa_load_sharing_cmd,
"[no] fast-reroute load-sharing disable [<level-1|level-2>$level]",
NO_STR
"Configure Fast ReRoute\n"
"Load share prefixes across multiple backups\n"
"Disable load sharing\n"
"Disable load sharing for level-1 only\n"
"Disable load sharing for level-2 only\n")
{
if (!level || strmatch(level, "level-1")) {
if (no) {
nb_cli_enqueue_change(
vty, "./fast-reroute/level-1/lfa/load-sharing",
NB_OP_DESTROY, "true");
} else {
nb_cli_enqueue_change(
vty, "./fast-reroute/level-1/lfa/load-sharing",
NB_OP_CREATE, "false");
}
}
if (!level || strmatch(level, "level-2")) {
if (no) {
nb_cli_enqueue_change(
vty, "./fast-reroute/level-2/lfa/load-sharing",
NB_OP_DESTROY, "true");
} else {
nb_cli_enqueue_change(
vty, "./fast-reroute/level-2/lfa/load-sharing",
NB_OP_CREATE, "false");
}
}
return nb_cli_apply_changes(vty, NULL);
}
void cli_show_isis_frr_lfa_load_sharing(struct vty *vty, struct lyd_node *dnode,
bool show_defaults)
{
if (!yang_dnode_get_bool(dnode, NULL))
vty_out(vty, " no");
vty_out(vty, " fast-reroute load-sharing disable %s\n",
dnode->parent->parent->schema->name);
}
/*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/passive
*/
@ -2377,7 +2595,164 @@ void cli_show_ip_isis_priority(struct vty *vty, struct lyd_node *dnode,
}
/*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/ti-lfa/enable
* XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute
*/
void cli_show_ip_isis_frr(struct vty *vty, struct lyd_node *dnode,
bool show_defaults)
{
bool l1_enabled, l2_enabled;
bool l1_node_protection, l2_node_protection;
/* Classic LFA */
l1_enabled = yang_dnode_get_bool(dnode, "./level-1/lfa/enable");
l2_enabled = yang_dnode_get_bool(dnode, "./level-2/lfa/enable");
if (l1_enabled || l2_enabled) {
if (l1_enabled == l2_enabled) {
vty_out(vty, " isis fast-reroute lfa\n");
vty_out(vty, "\n");
} else {
if (l1_enabled)
vty_out(vty,
" isis fast-reroute lfa level-1\n");
if (l2_enabled)
vty_out(vty,
" isis fast-reroute lfa level-2\n");
}
}
/* TI-LFA */
l1_enabled = yang_dnode_get_bool(dnode, "./level-1/ti-lfa/enable");
l2_enabled = yang_dnode_get_bool(dnode, "./level-2/ti-lfa/enable");
l1_node_protection =
yang_dnode_get_bool(dnode, "./level-1/ti-lfa/node-protection");
l2_node_protection =
yang_dnode_get_bool(dnode, "./level-2/ti-lfa/node-protection");
if (l1_enabled || l2_enabled) {
if (l1_enabled == l2_enabled
&& l1_node_protection == l2_node_protection) {
vty_out(vty, " isis fast-reroute ti-lfa");
if (l1_node_protection)
vty_out(vty, " node-protection");
vty_out(vty, "\n");
} else {
if (l1_enabled) {
vty_out(vty,
" isis fast-reroute ti-lfa level-1");
if (l1_node_protection)
vty_out(vty, " node-protection");
vty_out(vty, "\n");
}
if (l2_enabled) {
vty_out(vty,
" isis fast-reroute ti-lfa level-2");
if (l2_node_protection)
vty_out(vty, " node-protection");
vty_out(vty, "\n");
}
}
}
}
/*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/lfa/enable
*/
DEFPY(isis_lfa, isis_lfa_cmd,
"[no] isis fast-reroute lfa [level-1|level-2]$level",
NO_STR
"IS-IS routing protocol\n"
"Interface IP Fast-reroute configuration\n"
"Enable LFA computation\n"
"Enable LFA computation for Level 1 only\n"
"Enable LFA computation for Level 2 only\n")
{
if (!level || strmatch(level, "level-1")) {
if (no) {
nb_cli_enqueue_change(
vty,
"./frr-isisd:isis/fast-reroute/level-1/lfa/enable",
NB_OP_MODIFY, "false");
} else {
nb_cli_enqueue_change(
vty,
"./frr-isisd:isis/fast-reroute/level-1/lfa/enable",
NB_OP_MODIFY, "true");
}
}
if (!level || strmatch(level, "level-2")) {
if (no) {
nb_cli_enqueue_change(
vty,
"./frr-isisd:isis/fast-reroute/level-2/lfa/enable",
NB_OP_MODIFY, "false");
} else {
nb_cli_enqueue_change(
vty,
"./frr-isisd:isis/fast-reroute/level-2/lfa/enable",
NB_OP_MODIFY, "true");
}
}
return nb_cli_apply_changes(vty, NULL);
}
/*
* XPath:
* /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/lfa/exclude-interface
*/
DEFPY(isis_lfa_exclude_interface, isis_lfa_exclude_interface_cmd,
"[no] isis fast-reroute lfa [level-1|level-2]$level exclude interface IFNAME$ifname",
NO_STR
"IS-IS routing protocol\n"
"Interface IP Fast-reroute configuration\n"
"Enable LFA computation\n"
"Enable LFA computation for Level 1 only\n"
"Enable LFA computation for Level 2 only\n"
"FRR exclusion information\n"
"Exclude an interface from computation\n"
"Interface name\n")
{
if (!level || strmatch(level, "level-1")) {
if (no) {
nb_cli_enqueue_change(
vty,
"./frr-isisd:isis/fast-reroute/level-1/lfa/exclude-interface",
NB_OP_DESTROY, ifname);
} else {
nb_cli_enqueue_change(
vty,
"./frr-isisd:isis/fast-reroute/level-1/lfa/exclude-interface",
NB_OP_CREATE, ifname);
}
}
if (!level || strmatch(level, "level-2")) {
if (no) {
nb_cli_enqueue_change(
vty,
"./frr-isisd:isis/fast-reroute/level-2/lfa/exclude-interface",
NB_OP_DESTROY, ifname);
} else {
nb_cli_enqueue_change(
vty,
"./frr-isisd:isis/fast-reroute/level-2/lfa/exclude-interface",
NB_OP_CREATE, ifname);
}
}
return nb_cli_apply_changes(vty, NULL);
}
void cli_show_frr_lfa_exclude_interface(struct vty *vty, struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " isis fast-reroute lfa %s exclude interface %s\n",
dnode->parent->parent->schema->name,
yang_dnode_get_string(dnode, NULL));
}
/*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/ti-lfa/enable
*/
DEFPY(isis_ti_lfa, isis_ti_lfa_cmd,
"[no] isis fast-reroute ti-lfa [level-1|level-2]$level [node-protection$node_protection]",
@ -2437,41 +2812,6 @@ DEFPY(isis_ti_lfa, isis_ti_lfa_cmd,
return nb_cli_apply_changes(vty, NULL);
}
void cli_show_ip_isis_ti_lfa(struct vty *vty, struct lyd_node *dnode,
bool show_defaults)
{
bool l1_enabled, l2_enabled;
bool l1_node_protection, l2_node_protection;
l1_enabled = yang_dnode_get_bool(dnode, "./level-1/ti-lfa/enable");
l2_enabled = yang_dnode_get_bool(dnode, "./level-2/ti-lfa/enable");
l1_node_protection =
yang_dnode_get_bool(dnode, "./level-1/ti-lfa/node-protection");
l2_node_protection =
yang_dnode_get_bool(dnode, "./level-2/ti-lfa/node-protection");
if (l1_enabled == l2_enabled
&& l1_node_protection == l2_node_protection) {
vty_out(vty, " isis fast-reroute ti-lfa");
if (l1_node_protection)
vty_out(vty, " node-protection");
vty_out(vty, "\n");
} else {
if (l1_enabled) {
vty_out(vty, " isis fast-reroute ti-lfa level-1");
if (l1_node_protection)
vty_out(vty, " node-protection");
vty_out(vty, "\n");
}
if (l2_enabled) {
vty_out(vty, " isis fast-reroute ti-lfa level-2");
if (l2_node_protection)
vty_out(vty, " node-protection");
vty_out(vty, "\n");
}
}
}
/*
* XPath: /frr-isisd:isis/instance/log-adjacency-changes
*/
@ -2705,6 +3045,8 @@ void isis_cli_init(void)
install_element(ISIS_NODE, &spf_interval_cmd);
install_element(ISIS_NODE, &no_spf_interval_cmd);
install_element(ISIS_NODE, &spf_prefix_priority_cmd);
install_element(ISIS_NODE, &no_spf_prefix_priority_cmd);
install_element(ISIS_NODE, &spf_delay_ietf_cmd);
install_element(ISIS_NODE, &no_spf_delay_ietf_cmd);
@ -2731,6 +3073,9 @@ void isis_cli_init(void)
install_element(ISIS_NODE, &no_isis_sr_node_msd_cmd);
install_element(ISIS_NODE, &isis_sr_prefix_sid_cmd);
install_element(ISIS_NODE, &no_isis_sr_prefix_sid_cmd);
install_element(ISIS_NODE, &isis_frr_lfa_priority_limit_cmd);
install_element(ISIS_NODE, &isis_frr_lfa_tiebreaker_cmd);
install_element(ISIS_NODE, &isis_frr_lfa_load_sharing_cmd);
install_element(INTERFACE_NODE, &isis_passive_cmd);
@ -2766,6 +3111,8 @@ void isis_cli_init(void)
install_element(INTERFACE_NODE, &isis_priority_cmd);
install_element(INTERFACE_NODE, &no_isis_priority_cmd);
install_element(INTERFACE_NODE, &isis_lfa_cmd);
install_element(INTERFACE_NODE, &isis_lfa_exclude_interface_cmd);
install_element(INTERFACE_NODE, &isis_ti_lfa_cmd);
install_element(ISIS_NODE, &log_adj_changes_cmd);

View file

@ -193,6 +193,30 @@ const struct frr_yang_module_info frr_isisd_info = {
.modify = isis_instance_spf_minimum_interval_level_2_modify,
},
},
{
.xpath = "/frr-isisd:isis/instance/spf/prefix-priorities/critical/access-list-name",
.cbs = {
.cli_show = cli_show_isis_spf_prefix_priority,
.modify = isis_instance_spf_prefix_priorities_critical_access_list_name_modify,
.destroy = isis_instance_spf_prefix_priorities_critical_access_list_name_destroy,
}
},
{
.xpath = "/frr-isisd:isis/instance/spf/prefix-priorities/high/access-list-name",
.cbs = {
.cli_show = cli_show_isis_spf_prefix_priority,
.modify = isis_instance_spf_prefix_priorities_high_access_list_name_modify,
.destroy = isis_instance_spf_prefix_priorities_high_access_list_name_destroy,
}
},
{
.xpath = "/frr-isisd:isis/instance/spf/prefix-priorities/medium/access-list-name",
.cbs = {
.cli_show = cli_show_isis_spf_prefix_priority,
.modify = isis_instance_spf_prefix_priorities_medium_access_list_name_modify,
.destroy = isis_instance_spf_prefix_priorities_medium_access_list_name_destroy,
}
},
{
.xpath = "/frr-isisd:isis/instance/area-password",
.cbs = {
@ -431,6 +455,64 @@ const struct frr_yang_module_info frr_isisd_info = {
.modify = isis_instance_multi_topology_ipv6_dstsrc_overload_modify,
},
},
{
.xpath = "/frr-isisd:isis/instance/fast-reroute/level-1/lfa/load-sharing",
.cbs = {
.cli_show = cli_show_isis_frr_lfa_load_sharing,
.modify = isis_instance_fast_reroute_level_1_lfa_load_sharing_modify,
}
},
{
.xpath = "/frr-isisd:isis/instance/fast-reroute/level-1/lfa/priority-limit",
.cbs = {
.cli_show = cli_show_isis_frr_lfa_priority_limit,
.modify = isis_instance_fast_reroute_level_1_lfa_priority_limit_modify,
.destroy = isis_instance_fast_reroute_level_1_lfa_priority_limit_destroy,
}
},
{
.xpath = "/frr-isisd:isis/instance/fast-reroute/level-1/lfa/tiebreaker",
.cbs = {
.cli_show = cli_show_isis_frr_lfa_tiebreaker,
.create = isis_instance_fast_reroute_level_1_lfa_tiebreaker_create,
.destroy = isis_instance_fast_reroute_level_1_lfa_tiebreaker_destroy,
}
},
{
.xpath = "/frr-isisd:isis/instance/fast-reroute/level-1/lfa/tiebreaker/type",
.cbs = {
.modify = isis_instance_fast_reroute_level_1_lfa_tiebreaker_type_modify,
}
},
{
.xpath = "/frr-isisd:isis/instance/fast-reroute/level-2/lfa/load-sharing",
.cbs = {
.cli_show = cli_show_isis_frr_lfa_load_sharing,
.modify = isis_instance_fast_reroute_level_2_lfa_load_sharing_modify,
}
},
{
.xpath = "/frr-isisd:isis/instance/fast-reroute/level-2/lfa/priority-limit",
.cbs = {
.cli_show = cli_show_isis_frr_lfa_priority_limit,
.modify = isis_instance_fast_reroute_level_2_lfa_priority_limit_modify,
.destroy = isis_instance_fast_reroute_level_2_lfa_priority_limit_destroy,
}
},
{
.xpath = "/frr-isisd:isis/instance/fast-reroute/level-2/lfa/tiebreaker",
.cbs = {
.cli_show = cli_show_isis_frr_lfa_tiebreaker,
.create = isis_instance_fast_reroute_level_2_lfa_tiebreaker_create,
.destroy = isis_instance_fast_reroute_level_2_lfa_tiebreaker_destroy,
}
},
{
.xpath = "/frr-isisd:isis/instance/fast-reroute/level-2/lfa/tiebreaker/type",
.cbs = {
.modify = isis_instance_fast_reroute_level_2_lfa_tiebreaker_type_modify,
}
},
{
.xpath = "/frr-isisd:isis/instance/log-adjacency-changes",
.cbs = {
@ -827,7 +909,21 @@ const struct frr_yang_module_info frr_isisd_info = {
{
.xpath = "/frr-interface:lib/interface/frr-isisd:isis/fast-reroute",
.cbs = {
.cli_show = cli_show_ip_isis_ti_lfa,
.cli_show = cli_show_ip_isis_frr,
}
},
{
.xpath = "/frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-1/lfa/enable",
.cbs = {
.modify = lib_interface_isis_fast_reroute_level_1_lfa_enable_modify,
}
},
{
.xpath = "/frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-1/lfa/exclude-interface",
.cbs = {
.cli_show = cli_show_frr_lfa_exclude_interface,
.create = lib_interface_isis_fast_reroute_level_1_lfa_exclude_interface_create,
.destroy = lib_interface_isis_fast_reroute_level_1_lfa_exclude_interface_destroy,
}
},
{
@ -842,6 +938,20 @@ const struct frr_yang_module_info frr_isisd_info = {
.modify = lib_interface_isis_fast_reroute_level_1_ti_lfa_node_protection_modify,
}
},
{
.xpath = "/frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-2/lfa/enable",
.cbs = {
.modify = lib_interface_isis_fast_reroute_level_2_lfa_enable_modify,
}
},
{
.xpath = "/frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-2/lfa/exclude-interface",
.cbs = {
.cli_show = cli_show_frr_lfa_exclude_interface,
.create = lib_interface_isis_fast_reroute_level_2_lfa_exclude_interface_create,
.destroy = lib_interface_isis_fast_reroute_level_2_lfa_exclude_interface_destroy,
}
},
{
.xpath = "/frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-2/ti-lfa/enable",
.cbs = {

View file

@ -68,6 +68,18 @@ int isis_instance_spf_minimum_interval_level_1_modify(
struct nb_cb_modify_args *args);
int isis_instance_spf_minimum_interval_level_2_modify(
struct nb_cb_modify_args *args);
int isis_instance_spf_prefix_priorities_critical_access_list_name_modify(
struct nb_cb_modify_args *args);
int isis_instance_spf_prefix_priorities_critical_access_list_name_destroy(
struct nb_cb_destroy_args *args);
int isis_instance_spf_prefix_priorities_high_access_list_name_modify(
struct nb_cb_modify_args *args);
int isis_instance_spf_prefix_priorities_high_access_list_name_destroy(
struct nb_cb_destroy_args *args);
int isis_instance_spf_prefix_priorities_medium_access_list_name_modify(
struct nb_cb_modify_args *args);
int isis_instance_spf_prefix_priorities_medium_access_list_name_destroy(
struct nb_cb_destroy_args *args);
int isis_instance_area_password_create(struct nb_cb_create_args *args);
int isis_instance_area_password_destroy(struct nb_cb_destroy_args *args);
int isis_instance_area_password_password_modify(struct nb_cb_modify_args *args);
@ -159,6 +171,30 @@ int isis_instance_multi_topology_ipv6_dstsrc_destroy(
struct nb_cb_destroy_args *args);
int isis_instance_multi_topology_ipv6_dstsrc_overload_modify(
struct nb_cb_modify_args *args);
int isis_instance_fast_reroute_level_1_lfa_load_sharing_modify(
struct nb_cb_modify_args *args);
int isis_instance_fast_reroute_level_1_lfa_priority_limit_modify(
struct nb_cb_modify_args *args);
int isis_instance_fast_reroute_level_1_lfa_priority_limit_destroy(
struct nb_cb_destroy_args *args);
int isis_instance_fast_reroute_level_1_lfa_tiebreaker_create(
struct nb_cb_create_args *args);
int isis_instance_fast_reroute_level_1_lfa_tiebreaker_destroy(
struct nb_cb_destroy_args *args);
int isis_instance_fast_reroute_level_1_lfa_tiebreaker_type_modify(
struct nb_cb_modify_args *args);
int isis_instance_fast_reroute_level_2_lfa_load_sharing_modify(
struct nb_cb_modify_args *args);
int isis_instance_fast_reroute_level_2_lfa_priority_limit_modify(
struct nb_cb_modify_args *args);
int isis_instance_fast_reroute_level_2_lfa_priority_limit_destroy(
struct nb_cb_destroy_args *args);
int isis_instance_fast_reroute_level_2_lfa_tiebreaker_create(
struct nb_cb_create_args *args);
int isis_instance_fast_reroute_level_2_lfa_tiebreaker_destroy(
struct nb_cb_destroy_args *args);
int isis_instance_fast_reroute_level_2_lfa_tiebreaker_type_modify(
struct nb_cb_modify_args *args);
int isis_instance_log_adjacency_changes_modify(struct nb_cb_modify_args *args);
int isis_instance_mpls_te_create(struct nb_cb_create_args *args);
int isis_instance_mpls_te_destroy(struct nb_cb_destroy_args *args);
@ -258,10 +294,22 @@ int lib_interface_isis_multi_topology_ipv6_dstsrc_modify(
int lib_interface_isis_mpls_ldp_sync_modify(struct nb_cb_modify_args *args);
int lib_interface_isis_mpls_holddown_modify(struct nb_cb_modify_args *args);
int lib_interface_isis_mpls_holddown_destroy(struct nb_cb_destroy_args *args);
int lib_interface_isis_fast_reroute_level_1_lfa_enable_modify(
struct nb_cb_modify_args *args);
int lib_interface_isis_fast_reroute_level_1_lfa_exclude_interface_create(
struct nb_cb_create_args *args);
int lib_interface_isis_fast_reroute_level_1_lfa_exclude_interface_destroy(
struct nb_cb_destroy_args *args);
int lib_interface_isis_fast_reroute_level_1_ti_lfa_enable_modify(
struct nb_cb_modify_args *args);
int lib_interface_isis_fast_reroute_level_1_ti_lfa_node_protection_modify(
struct nb_cb_modify_args *args);
int lib_interface_isis_fast_reroute_level_2_lfa_enable_modify(
struct nb_cb_modify_args *args);
int lib_interface_isis_fast_reroute_level_2_lfa_exclude_interface_create(
struct nb_cb_create_args *args);
int lib_interface_isis_fast_reroute_level_2_lfa_exclude_interface_destroy(
struct nb_cb_destroy_args *args);
int lib_interface_isis_fast_reroute_level_2_ti_lfa_enable_modify(
struct nb_cb_modify_args *args);
int lib_interface_isis_fast_reroute_level_2_ti_lfa_node_protection_modify(
@ -374,6 +422,8 @@ void cli_show_isis_spf_min_interval(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_spf_ietf_backoff(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_spf_prefix_priority(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_purge_origin(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_mpls_te(struct vty *vty, struct lyd_node *dnode,
@ -410,6 +460,13 @@ void cli_show_isis_node_msd(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_prefix_sid(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_frr_lfa_priority_limit(struct vty *vty,
struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_frr_lfa_tiebreaker(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_frr_lfa_load_sharing(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_ip_isis_passive(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_ip_isis_password(struct vty *vty, struct lyd_node *dnode,
@ -442,7 +499,9 @@ void cli_show_ip_isis_mt_ipv6_mgmt(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_ip_isis_mt_ipv6_dstsrc(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_ip_isis_ti_lfa(struct vty *vty, struct lyd_node *dnode,
void cli_show_ip_isis_frr(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_frr_lfa_exclude_interface(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_ip_isis_circ_type(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);

View file

@ -625,6 +625,106 @@ int isis_instance_spf_minimum_interval_level_2_modify(
return NB_OK;
}
/*
* XPath:
* /frr-isisd:isis/instance/spf/prefix-priorities/critical/access-list-name
*/
int isis_instance_spf_prefix_priorities_critical_access_list_name_modify(
struct nb_cb_modify_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
int isis_instance_spf_prefix_priorities_critical_access_list_name_destroy(
struct nb_cb_destroy_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath: /frr-isisd:isis/instance/spf/prefix-priorities/high/access-list-name
*/
int isis_instance_spf_prefix_priorities_high_access_list_name_modify(
struct nb_cb_modify_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
int isis_instance_spf_prefix_priorities_high_access_list_name_destroy(
struct nb_cb_destroy_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath: /frr-isisd:isis/instance/spf/prefix-priorities/medium/access-list-name
*/
int isis_instance_spf_prefix_priorities_medium_access_list_name_modify(
struct nb_cb_modify_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
int isis_instance_spf_prefix_priorities_medium_access_list_name_destroy(
struct nb_cb_destroy_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath: /frr-isisd:isis/instance/area-password
*/
@ -1289,6 +1389,210 @@ int isis_instance_multi_topology_ipv6_dstsrc_overload_modify(
"ipv6-dstsrc");
}
/*
* XPath: /frr-isisd:isis/instance/fast-reroute/level-1/lfa/load-sharing
*/
int isis_instance_fast_reroute_level_1_lfa_load_sharing_modify(
struct nb_cb_modify_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath: /frr-isisd:isis/instance/fast-reroute/level-1/lfa/priority-limit
*/
int isis_instance_fast_reroute_level_1_lfa_priority_limit_modify(
struct nb_cb_modify_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
int isis_instance_fast_reroute_level_1_lfa_priority_limit_destroy(
struct nb_cb_destroy_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath: /frr-isisd:isis/instance/fast-reroute/level-1/lfa/tiebreaker
*/
int isis_instance_fast_reroute_level_1_lfa_tiebreaker_create(
struct nb_cb_create_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
int isis_instance_fast_reroute_level_1_lfa_tiebreaker_destroy(
struct nb_cb_destroy_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath: /frr-isisd:isis/instance/fast-reroute/level-1/lfa/tiebreaker/type
*/
int isis_instance_fast_reroute_level_1_lfa_tiebreaker_type_modify(
struct nb_cb_modify_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath: /frr-isisd:isis/instance/fast-reroute/level-2/lfa/load-sharing
*/
int isis_instance_fast_reroute_level_2_lfa_load_sharing_modify(
struct nb_cb_modify_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath: /frr-isisd:isis/instance/fast-reroute/level-2/lfa/priority-limit
*/
int isis_instance_fast_reroute_level_2_lfa_priority_limit_modify(
struct nb_cb_modify_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
int isis_instance_fast_reroute_level_2_lfa_priority_limit_destroy(
struct nb_cb_destroy_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath: /frr-isisd:isis/instance/fast-reroute/level-2/lfa/tiebreaker
*/
int isis_instance_fast_reroute_level_2_lfa_tiebreaker_create(
struct nb_cb_create_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
int isis_instance_fast_reroute_level_2_lfa_tiebreaker_destroy(
struct nb_cb_destroy_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath: /frr-isisd:isis/instance/fast-reroute/level-2/lfa/tiebreaker/type
*/
int isis_instance_fast_reroute_level_2_lfa_tiebreaker_type_modify(
struct nb_cb_modify_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath: /frr-isisd:isis/instance/log-adjacency-changes
*/
@ -3003,6 +3307,59 @@ int lib_interface_isis_mpls_holddown_destroy(struct nb_cb_destroy_args *args)
return NB_OK;
}
/*
* XPath:
* /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-1/lfa/enable
*/
int lib_interface_isis_fast_reroute_level_1_lfa_enable_modify(
struct nb_cb_modify_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath:
* /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-1/lfa/exclude-interface
*/
int lib_interface_isis_fast_reroute_level_1_lfa_exclude_interface_create(
struct nb_cb_create_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
int lib_interface_isis_fast_reroute_level_1_lfa_exclude_interface_destroy(
struct nb_cb_destroy_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath:
* /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-1/ti-lfa/enable
@ -3054,6 +3411,59 @@ int lib_interface_isis_fast_reroute_level_1_ti_lfa_node_protection_modify(
return NB_OK;
}
/*
* XPath:
* /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-2/lfa/enable
*/
int lib_interface_isis_fast_reroute_level_2_lfa_enable_modify(
struct nb_cb_modify_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath:
* /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-2/lfa/exclude-interface
*/
int lib_interface_isis_fast_reroute_level_2_lfa_exclude_interface_create(
struct nb_cb_create_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
int lib_interface_isis_fast_reroute_level_2_lfa_exclude_interface_destroy(
struct nb_cb_destroy_args *args)
{
switch (args->event) {
case NB_EV_VALIDATE:
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
/* TODO: implement me. */
break;
}
return NB_OK;
}
/*
* XPath:
* /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-2/ti-lfa/enable

View file

@ -244,6 +244,10 @@ module frr-isisd {
}
}
typedef access-list-ref {
type string;
}
grouping redistribute-attributes {
description
"Common optional attributes of any redistribute entry.";
@ -336,6 +340,94 @@ module frr-isisd {
}
}
grouping global-config-lfa {
container lfa {
description
"LFA configuration.";
leaf load-sharing {
type boolean;
default "true";
description
"Load share prefixes across multiple backups.";
}
leaf priority-limit {
type enumeration {
enum "critical" {
value 0;
description
"Compute for critical priority prefixes only.";
}
enum "high" {
value 1;
description
"Compute for critical & high priority prefixes.";
}
enum "medium" {
value 2;
description
"Compute for critical, high & medium priority prefixes.";
}
}
description
"Limit backup computation up to the prefix priority.";
}
list tiebreaker {
key "index";
unique "type";
description
"Configure tiebreaker for multiple backups.";
leaf index {
type uint8 {
range "1..255";
}
description
"Preference order among tiebreakers.";
}
leaf type {
type enumeration {
enum "downstream" {
value 0;
description
"Prefer backup path via downstream node.";
}
enum "lowest-backup-metric" {
value 1;
description
"Prefer backup path with lowest total metric.";
}
enum "node-protecting" {
value 2;
description
"Prefer node protecting backup path.";
}
}
mandatory true;
description
"Tiebreaker type.";
}
}
}
}
grouping interface-config-lfa {
container lfa {
description
"LFA configuration.";
leaf enable {
type boolean;
default false;
description
"Enables LFA computation.";
}
leaf-list exclude-interface {
type frr-interface:interface-ref;
description
"Exclude an interface from computation.";
}
}
}
grouping interface-config-ti-lfa {
container ti-lfa {
description
@ -664,11 +756,21 @@ module frr-isisd {
container level-1 {
description
"Level-1 IP Fast-reroute configuration.";
must "./lfa/enable = 'false' or ./ti-lfa/enable = 'false'" {
error-message
"Can't enable both classic LFA and TI-LFA in the same interface.";
}
uses interface-config-lfa;
uses interface-config-ti-lfa;
}
container level-2 {
description
"Level-2 IP Fast-reroute configuration.";
must "./lfa/enable = 'false' or ./ti-lfa/enable = 'false'" {
error-message
"Can't enable both classic LFA and TI-LFA in the same interface.";
}
uses interface-config-lfa;
uses interface-config-ti-lfa;
}
}
@ -1095,6 +1197,42 @@ module frr-isisd {
"Minimum time between consecutive level-2 SPFs.";
}
}
container prefix-priorities {
description
"SPF Prefix Priority configuration";
container critical {
description
"Critical prefix priority";
leaf access-list-name {
type access-list-ref;
description
"Access List to determine prefixes for
this priority";
}
}
container high {
description
"High prefix priority";
leaf access-list-name {
type access-list-ref;
description
"Access List to determine prefixes for
this priority";
}
}
container medium {
description
"Medium prefix priority";
leaf access-list-name {
type access-list-ref;
description
"Access List to determine prefixes for
this priority";
}
}
}
}
container area-password {
@ -1249,6 +1387,21 @@ module frr-isisd {
}
}
container fast-reroute {
description
"IP Fast-reroute configuration.";
container level-1 {
description
"Level-1 IP Fast-reroute configuration.";
uses global-config-lfa;
}
container level-2 {
description
"Level-2 IP Fast-reroute configuration.";
uses global-config-lfa;
}
}
leaf log-adjacency-changes {
type boolean;
default "false";