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.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/pathd/path_cli.c b/pathd/path_cli.c
index 45f4ac7ab8..0d9d3bca6d 100644
--- a/pathd/path_cli.c
+++ b/pathd/path_cli.c
@@ -287,7 +287,7 @@ void cli_show_srte_segment_list(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " segment-list %s\n",
- yang_dnode_get_string(dnode, "./name"));
+ yang_dnode_get_string(dnode, "name"));
}
void cli_show_srte_segment_list_end(struct vty *vty,
@@ -546,37 +546,37 @@ void cli_show_srte_segment_list_segment(struct vty *vty,
const struct lyd_node *dnode,
bool show_defaults)
{
- vty_out(vty, " index %s", yang_dnode_get_string(dnode, "./index"));
- if (yang_dnode_exists(dnode, "./sid-value")) {
+ 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"));
+ yang_dnode_get_string(dnode, "sid-value"));
}
- if (yang_dnode_exists(dnode, "./nai")) {
+ if (yang_dnode_exists(dnode, "nai")) {
struct ipaddr addr;
struct ipaddr addr_rmt;
- switch (yang_dnode_get_enum(dnode, "./nai/type")) {
+ switch (yang_dnode_get_enum(dnode, "nai/type")) {
case SRTE_SEGMENT_NAI_TYPE_IPV4_NODE:
case SRTE_SEGMENT_NAI_TYPE_IPV4_LOCAL_IFACE:
case SRTE_SEGMENT_NAI_TYPE_IPV4_ALGORITHM:
- yang_dnode_get_ip(&addr, dnode, "./nai/local-address");
+ yang_dnode_get_ip(&addr, dnode, "nai/local-address");
vty_out(vty, " nai prefix %pI4", &addr.ipaddr_v4);
break;
case SRTE_SEGMENT_NAI_TYPE_IPV6_NODE:
case SRTE_SEGMENT_NAI_TYPE_IPV6_LOCAL_IFACE:
case SRTE_SEGMENT_NAI_TYPE_IPV6_ALGORITHM:
- yang_dnode_get_ip(&addr, dnode, "./nai/local-address");
+ yang_dnode_get_ip(&addr, dnode, "nai/local-address");
vty_out(vty, " nai prefix %pI6", &addr.ipaddr_v6);
break;
case SRTE_SEGMENT_NAI_TYPE_IPV4_ADJACENCY:
- yang_dnode_get_ip(&addr, dnode, "./nai/local-address");
+ yang_dnode_get_ip(&addr, dnode, "nai/local-address");
yang_dnode_get_ip(&addr_rmt, dnode,
"./nai/remote-address");
vty_out(vty, " nai adjacency %pI4", &addr.ipaddr_v4);
vty_out(vty, " %pI4", &addr_rmt.ipaddr_v4);
break;
case SRTE_SEGMENT_NAI_TYPE_IPV6_ADJACENCY:
- yang_dnode_get_ip(&addr, dnode, "./nai/local-address");
+ yang_dnode_get_ip(&addr, dnode, "nai/local-address");
yang_dnode_get_ip(&addr_rmt, dnode,
"./nai/remote-address");
vty_out(vty, " nai adjacency %pI6", &addr.ipaddr_v6);
@@ -585,17 +585,17 @@ void cli_show_srte_segment_list_segment(struct vty *vty,
default:
break;
}
- if (yang_dnode_exists(dnode, "./nai/local-prefix-len")) {
+ if (yang_dnode_exists(dnode, "nai/local-prefix-len")) {
vty_out(vty, "/%s",
yang_dnode_get_string(
dnode, "./nai/local-prefix-len"));
}
- if (yang_dnode_exists(dnode, "./nai/local-interface")) {
+ if (yang_dnode_exists(dnode, "nai/local-interface")) {
vty_out(vty, " iface %s",
yang_dnode_get_string(dnode,
"./nai/local-interface"));
}
- if (yang_dnode_exists(dnode, "./nai/algorithm")) {
+ if (yang_dnode_exists(dnode, "nai/algorithm")) {
vty_out(vty, " algorithm %s",
yang_dnode_get_string(dnode,
"./nai/algorithm"));
@@ -658,8 +658,8 @@ void cli_show_srte_policy(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " policy color %s endpoint %s\n",
- yang_dnode_get_string(dnode, "./color"),
- yang_dnode_get_string(dnode, "./endpoint"));
+ yang_dnode_get_string(dnode, "color"),
+ yang_dnode_get_string(dnode, "endpoint"));
}
void cli_show_srte_policy_end(struct vty *vty, const struct lyd_node *dnode)
@@ -1183,11 +1183,11 @@ static int config_write_metric_cb(const struct lyd_node *dnode, void *arg)
bool required, is_bound = false;
float value;
- type = yang_dnode_get_enum(dnode, "./type");
- value = (float)yang_dnode_get_dec64(dnode, "./value");
- required = yang_dnode_get_bool(dnode, "./required");
- if (yang_dnode_exists(dnode, "./is-bound"))
- is_bound = yang_dnode_get_bool(dnode, "./is-bound");
+ type = yang_dnode_get_enum(dnode, "type");
+ value = (float)yang_dnode_get_dec64(dnode, "value");
+ required = yang_dnode_get_bool(dnode, "required");
+ if (yang_dnode_exists(dnode, "is-bound"))
+ is_bound = yang_dnode_get_bool(dnode, "is-bound");
config_write_metric(vty, type, value, required, is_bound);
return YANG_ITER_CONTINUE;
@@ -1201,18 +1201,18 @@ void cli_show_srte_policy_candidate_path(struct vty *vty,
uint32_t affinity;
bool required;
enum objfun_type objfun_type;
- const char *type = yang_dnode_get_string(dnode, "./type");
+ const char *type = yang_dnode_get_string(dnode, "type");
vty_out(vty, " candidate-path preference %s name %s %s",
- yang_dnode_get_string(dnode, "./preference"),
- yang_dnode_get_string(dnode, "./name"), type);
+ yang_dnode_get_string(dnode, "preference"),
+ yang_dnode_get_string(dnode, "name"), type);
if (strmatch(type, "explicit"))
vty_out(vty, " segment-list %s",
- yang_dnode_get_string(dnode, "./segment-list-name"));
+ yang_dnode_get_string(dnode, "segment-list-name"));
vty_out(vty, "\n");
if (strmatch(type, "dynamic")) {
- if (yang_dnode_exists(dnode, "./constraints/bandwidth")) {
+ if (yang_dnode_exists(dnode, "constraints/bandwidth")) {
bandwidth = (float)yang_dnode_get_dec64(
dnode, "./constraints/bandwidth/value");
required = yang_dnode_get_bool(
@@ -1262,7 +1262,7 @@ void cli_show_srte_policy_candidate_path(struct vty *vty,
void cli_show_srte_policy_candidate_path_end(struct vty *vty,
const struct lyd_node *dnode)
{
- const char *type = yang_dnode_get_string(dnode, "./type");
+ const char *type = yang_dnode_get_string(dnode, "type");
if (strmatch(type, "dynamic"))
vty_out(vty, " exit\n");