const struct frr_yang_module_info frr_staticd_info = {
.name = "frr-staticd",
.nodes = {
- {
- .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd",
- .cbs = {
- .cli_show = static_cli_show,
- .cli_show_end = static_cli_show_end,
- }
- },
{
.xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list",
.cbs = {
.create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_create,
.destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_destroy,
- .cli_cmp = static_route_list_cli_cmp,
}
},
{
.cbs = {
.create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_create,
.destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_destroy,
- .cli_cmp = static_path_list_cli_cmp,
}
},
{
.create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_create,
.destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_destroy,
.pre_validate = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_pre_validate,
- .cli_show = static_nexthop_cli_show,
- .cli_cmp = static_nexthop_cli_cmp,
}
},
{
.cbs = {
.create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_create,
.destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_destroy,
- .cli_cmp = static_src_list_cli_cmp,
}
},
{
.cbs = {
.create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_create,
.destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_destroy,
- .cli_cmp = static_path_list_cli_cmp,
}
},
{
.create = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_create,
.destroy = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_destroy,
.pre_validate = routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_pre_validate,
- .cli_show = static_src_nexthop_cli_show,
- .cli_cmp = static_nexthop_cli_cmp,
}
},
{
return static_route_nb_run(vty, &args);
}
-void static_cli_show(struct vty *vty, const struct lyd_node *dnode,
- bool show_defaults)
+#ifdef INCLUDE_MGMTD_CMDDEFS_ONLY
+
+static void static_cli_show(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults)
{
const char *vrf;
vty_out(vty, "vrf %s\n", vrf);
}
-void static_cli_show_end(struct vty *vty, const struct lyd_node *dnode)
+static void static_cli_show_end(struct vty *vty, const struct lyd_node *dnode)
{
const char *vrf;
vty_out(vty, "\n");
}
-void static_nexthop_cli_show(struct vty *vty, const struct lyd_node *dnode,
- bool show_defaults)
+static void static_nexthop_cli_show(struct vty *vty,
+ const struct lyd_node *dnode,
+ bool show_defaults)
{
const struct lyd_node *path = yang_dnode_get_parent(dnode, "path-list");
const struct lyd_node *route =
nexthop_cli_show(vty, route, NULL, path, dnode, show_defaults);
}
-void static_src_nexthop_cli_show(struct vty *vty, const struct lyd_node *dnode,
- bool show_defaults)
+static void static_src_nexthop_cli_show(struct vty *vty,
+ const struct lyd_node *dnode,
+ bool show_defaults)
{
const struct lyd_node *path = yang_dnode_get_parent(dnode, "path-list");
const struct lyd_node *src = yang_dnode_get_parent(path, "src-list");
nexthop_cli_show(vty, route, src, path, dnode, show_defaults);
}
-int static_nexthop_cli_cmp(const struct lyd_node *dnode1,
- const struct lyd_node *dnode2)
+static int static_nexthop_cli_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2)
{
enum static_nh_type nh_type1, nh_type2;
struct prefix prefix1, prefix2;
return if_cmp_name_func(vrf1, vrf2);
}
-int static_route_list_cli_cmp(const struct lyd_node *dnode1,
- const struct lyd_node *dnode2)
+static int static_route_list_cli_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2)
{
const char *afi_safi1, *afi_safi2;
afi_t afi1, afi2;
return prefix_cmp(&prefix1, &prefix2);
}
-int static_src_list_cli_cmp(const struct lyd_node *dnode1,
- const struct lyd_node *dnode2)
+static int static_src_list_cli_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2)
{
struct prefix prefix1, prefix2;
return prefix_cmp(&prefix1, &prefix2);
}
-int static_path_list_cli_cmp(const struct lyd_node *dnode1,
- const struct lyd_node *dnode2)
+static int static_path_list_cli_cmp(const struct lyd_node *dnode1,
+ const struct lyd_node *dnode2)
{
uint32_t table_id1, table_id2;
uint8_t distance1, distance2;
return (int)distance1 - (int)distance2;
}
-#ifndef INCLUDE_MGMTD_CMDDEFS_ONLY
+const struct frr_yang_module_info frr_staticd_info = {
+ .name = "frr-staticd",
+ .ignore_cbs = true,
+ .nodes = {
+ {
+ .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd",
+ .cbs = {
+ .cli_show = static_cli_show,
+ .cli_show_end = static_cli_show_end,
+ }
+ },
+ {
+ .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list",
+ .cbs = {
+ .cli_cmp = static_route_list_cli_cmp,
+ }
+ },
+ {
+ .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list",
+ .cbs = {
+ .cli_cmp = static_path_list_cli_cmp,
+ }
+ },
+ {
+ .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/path-list/frr-nexthops/nexthop",
+ .cbs = {
+ .cli_show = static_nexthop_cli_show,
+ .cli_cmp = static_nexthop_cli_cmp,
+ }
+ },
+ {
+ .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list",
+ .cbs = {
+ .cli_cmp = static_src_list_cli_cmp,
+ }
+ },
+ {
+ .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list",
+ .cbs = {
+ .cli_cmp = static_path_list_cli_cmp,
+ }
+ },
+ {
+ .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-staticd:staticd/route-list/src-list/path-list/frr-nexthops/nexthop",
+ .cbs = {
+ .cli_show = static_src_nexthop_cli_show,
+ .cli_cmp = static_nexthop_cli_cmp,
+ }
+ },
+ {
+ .xpath = NULL,
+ },
+ }
+};
+
+#else /* ifdef INCLUDE_MGMTD_CMDDEFS_ONLY */
DEFPY_YANG(debug_staticd, debug_staticd_cmd,
"[no] debug static [{events$events|route$route|bfd$bfd}]",