summaryrefslogtreecommitdiff
path: root/pathd/path_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'pathd/path_cli.c')
-rw-r--r--pathd/path_cli.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/pathd/path_cli.c b/pathd/path_cli.c
index 7a28449e4e..d517d75e47 100644
--- a/pathd/path_cli.c
+++ b/pathd/path_cli.c
@@ -351,8 +351,6 @@ static int segment_list_has_src_dst(
nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY,
"ipv6_adjacency");
node_src_id = adj_src_ipv6_str;
- } else {
- return CMD_ERR_NO_MATCH;
}
/* addresses */
snprintf(xpath, XPATH_MAXLEN, "./segment[index='%s']/nai/local-address",
@@ -421,8 +419,6 @@ int segment_list_has_prefix(
sizeof(buf_prefix));
pre_ipaddr.ipa_type = IPADDR_V6;
pre_ipaddr.ip._v6_addr = prefix_cli.u.prefix6;
- } else {
- return CMD_ERR_NO_MATCH;
}
snprintf(xpath, XPATH_MAXLEN, "./segment[index='%s']/nai/local-address",
index_str);
@@ -524,7 +520,7 @@ DEFPY(srte_segment_list_segment, srte_segment_list_segment_cmd,
if (status != CMD_SUCCESS)
return status;
} else {
- segment_list_has_prefix(
+ status = segment_list_has_prefix(
vty, xpath, index, index_str, prefix_ipv4,
prefix_ipv4_str, prefix_ipv6, prefix_ipv6_str, has_algo,
algo, algo_str, has_iface_id, iface_id, iface_id_str);
@@ -554,7 +550,7 @@ void cli_show_srte_segment_list_segment(struct vty *vty,
struct lyd_node *dnode,
bool show_defaults)
{
- vty_out(vty, " index %s ", yang_dnode_get_string(dnode, "./index"));
+ vty_out(vty, " index %s", yang_dnode_get_string(dnode, "./index"));
if (yang_dnode_exists(dnode, "./sid-value")) {
vty_out(vty, " mpls label %s",
yang_dnode_get_string(dnode, "./sid-value"));
@@ -821,9 +817,8 @@ DEFPY(srte_candidate_no_bandwidth,
return nb_cli_apply_changes(vty, NULL);
}
-DEFPY(srte_candidate_affinity_filter,
- srte_candidate_affinity_filter_cmd,
- "affinity {exclude-any|include-any|include-all}$type BITPATTERN$value",
+DEFPY(srte_candidate_affinity_filter, srte_candidate_affinity_filter_cmd,
+ "affinity <exclude-any|include-any|include-all>$type BITPATTERN$value",
"Affinity constraint\n"
"Exclude any matching link\n"
"Include any matching link\n"
@@ -846,9 +841,8 @@ DEFPY(srte_candidate_affinity_filter,
return nb_cli_apply_changes(vty, NULL);
}
-DEFPY(srte_candidate_no_affinity_filter,
- srte_candidate_no_affinity_filter_cmd,
- "no affinity {exclude-any|include-any|include-all}$type [BITPATTERN$value]",
+DEFPY(srte_candidate_no_affinity_filter, srte_candidate_no_affinity_filter_cmd,
+ "no affinity <exclude-any|include-any|include-all>$type [BITPATTERN$value]",
NO_STR
"Affinity constraint\n"
"Exclude any matching link\n"
@@ -1201,9 +1195,10 @@ void cli_show_srte_policy_candidate_path(struct vty *vty,
dnode, "./constraints/bandwidth/value");
required = yang_dnode_get_bool(
dnode, "./constraints/bandwidth/required");
- vty_out(vty, " %sbandwidth",
- required ? "required " : "");
+ vty_out(vty, " bandwidth");
config_write_float(vty, bandwidth);
+ if (required)
+ vty_out(vty, " required");
vty_out(vty, "\n");
}
if (yang_dnode_exists(dnode,