From b5a5ce2ae48ce4f60b90ba773ec0a75748418ebb Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Thu, 18 Aug 2022 01:01:31 +0000 Subject: [PATCH 1/5] ospfd: remove disallowed newlines in zlog messages --- ospfd/ospf_nb_config.c | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/ospfd/ospf_nb_config.c b/ospfd/ospf_nb_config.c index f7f90a3fc253..cc5bde40f28c 100644 --- a/ospfd/ospf_nb_config.c +++ b/ospfd/ospf_nb_config.c @@ -92,7 +92,8 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_explicit_router_ for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) if (area->full_nbrs) { - zlog_warn("For this router-id change to take effect, use \"clear ip ospf process\" command\n"); + zlog_warn( + "For this router-id change to take effect, use \"clear ip ospf process\" command"); return NB_OK; } @@ -116,7 +117,8 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_explicit_router_ for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) if (area->full_nbrs) { - zlog_warn("For this router-id change to take effect, use \"clear ip ospf process\" command\n"); + zlog_warn( + "For this router-id change to take effect, use \"clear ip ospf process\" command"); return NB_OK; } @@ -1948,7 +1950,8 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_netw /* XXX Doesn't check for automatically assigned router ID's */ if (ospf_id.s_addr) { - zlog_err("The network command is not supported in multi-instance ospf\n"); + zlog_err( + "The network command is not supported in multi-instance ospf"); return NB_ERR_VALIDATION; } @@ -1958,7 +1961,8 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_netw "/frr-interface:lib/interface/frr-ospfd:ospf/interface-address/area"); if (net_exists) { - zlog_warn("Please remove all ip ospf area x.x.x.x commands first.\n"); + zlog_warn( + "Please remove all ip ospf area x.x.x.x commands first."); return NB_ERR_VALIDATION; } @@ -1975,7 +1979,7 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_netw ret = ospf_network_set(ospf, &prefix, area_id, format); if (ret == 0) { - zlog_err("There is already same network statement.\n"); + zlog_err("There is already same network statement."); return NB_ERR; } @@ -2000,7 +2004,8 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_netw /* XXX Doesn't check for automatically assigned router ID's */ if (ospf_id.s_addr) { - zlog_err("The network command is not supported in multi-instance ospf\n"); + zlog_err( + "The network command is not supported in multi-instance ospf"); return NB_ERR_VALIDATION; } @@ -2017,7 +2022,8 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_netw ret = ospf_network_unset(ospf, &prefix, area_id); if (ret == 0) { - zlog_err("Can't find specific network area configuration to delete.\n"); + zlog_err( + "Can't find specific network area configuration to delete."); return NB_ERR; } @@ -2061,7 +2067,8 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_netw yang_dnode_get_ipv4(&area, args->dnode, NULL); if (!IPV4_ADDR_SAME(&network->area_id, &area)) { - zlog_err("Directly changing network area is not supported\n"); + zlog_err( + "Directly changing network area is not supported"); return NB_ERR_VALIDATION; } } @@ -2852,14 +2859,15 @@ int lib_interface_ospf_area_modify(struct nb_cb_modify_args *args) params = IF_DEF_PARAMS(ifp); if (memcmp(ifp->name, "VLINK", 5) == 0) { - zlog_err("Cannot enable OSPF on a virtual link.\n"); + zlog_err("Cannot enable OSPF on a virtual link."); return NB_ERR_VALIDATION; } if (ospf) { for (rn = route_top(ospf->networks); rn; rn = route_next(rn)) { if (rn->info != NULL) { - zlog_err("Please remove all network commands first.\n"); + zlog_err( + "Please remove all network commands first."); return NB_ERR_VALIDATION; } } @@ -2867,7 +2875,8 @@ int lib_interface_ospf_area_modify(struct nb_cb_modify_args *args) if (OSPF_IF_PARAM_CONFIGURED(params, if_area) && !IPV4_ADDR_SAME(¶ms->if_area, &area_id)) { - zlog_err("Must remove previous area config before changing ospf area \n"); + zlog_err( + "Must remove previous area config before changing ospf area."); return NB_ERR_VALIDATION; } @@ -3442,14 +3451,15 @@ int lib_interface_ospf_interface_address_area_modify(struct nb_cb_modify_args *a params = IF_DEF_PARAMS(ifp); if (memcmp(ifp->name, "VLINK", 5) == 0) { - zlog_err("Cannot enable OSPF on a virtual link.\n"); + zlog_err("Cannot enable OSPF on a virtual link."); return NB_ERR_VALIDATION; } if (ospf) { for (rn = route_top(ospf->networks); rn; rn = route_next(rn)) { if (rn->info != NULL) { - zlog_err("Please remove all network commands first.\n"); + zlog_err( + "Please remove all network commands first."); return NB_ERR_VALIDATION; } } @@ -3457,7 +3467,8 @@ int lib_interface_ospf_interface_address_area_modify(struct nb_cb_modify_args *a if (OSPF_IF_PARAM_CONFIGURED(params, if_area) && !IPV4_ADDR_SAME(¶ms->if_area, &area_id)) { - zlog_err("Must remove previous area config before changing ospf area \n"); + zlog_err( + "Must remove previous area config before changing ospf area."); return NB_ERR_VALIDATION; } @@ -3465,7 +3476,8 @@ int lib_interface_ospf_interface_address_area_modify(struct nb_cb_modify_args *a params = ospf_get_if_params((ifp), (addr)); if (OSPF_IF_PARAM_CONFIGURED(params, if_area) && !IPV4_ADDR_SAME(¶ms->if_area, &area_id)) { - zlog_err("Must remove previous area/address config before changing ospf area\n"); + zlog_err( + "Must remove previous area/address config before changing ospf area."); return NB_ERR_VALIDATION; } From 61cd6be703afe07b46e92c48171e3ad1acf90bbe Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Thu, 18 Aug 2022 11:15:01 +0000 Subject: [PATCH 2/5] ospfd: rename node ip-networks to networks --- ospfd/ospf_nb.c | 10 +++++----- ospfd/ospf_nb.h | 9 ++++++--- ospfd/ospf_nb_config.c | 15 ++++++++++----- yang/frr-ospfd.yang | 4 +++- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/ospfd/ospf_nb.c b/ospfd/ospf_nb.c index 98dd414d63d2..453ce4eaccab 100644 --- a/ospfd/ospf_nb.c +++ b/ospfd/ospf_nb.c @@ -2078,16 +2078,16 @@ const struct frr_yang_module_info frr_ospfd_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-ospfd:ospf/ip-networks/network", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-ospfd:ospf/networks/network", .cbs = { - .create = routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_network_create, - .destroy = routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_network_destroy, + .create = routing_control_plane_protocols_control_plane_protocol_ospf_networks_network_create, + .destroy = routing_control_plane_protocols_control_plane_protocol_ospf_networks_network_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-ospfd:ospf/ip-networks/network/area", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-ospfd:ospf/networks/network/area", .cbs = { - .modify = routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_network_area_modify, + .modify = routing_control_plane_protocols_control_plane_protocol_ospf_networks_network_area_modify, } }, { diff --git a/ospfd/ospf_nb.h b/ospfd/ospf_nb.h index f56c75a84974..636da06b294b 100644 --- a/ospfd/ospf_nb.h +++ b/ospfd/ospf_nb.h @@ -422,9 +422,12 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_nbma_neighbors_n int routing_control_plane_protocols_control_plane_protocol_ospf_nbma_neighbors_neighbor_destroy(struct nb_cb_destroy_args *args); int routing_control_plane_protocols_control_plane_protocol_ospf_nbma_neighbors_neighbor_priority_modify(struct nb_cb_modify_args *args); int routing_control_plane_protocols_control_plane_protocol_ospf_nbma_neighbors_neighbor_poll_interval_modify(struct nb_cb_modify_args *args); -int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_network_create(struct nb_cb_create_args *args); -int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_network_destroy(struct nb_cb_destroy_args *args); -int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_network_area_modify(struct nb_cb_modify_args *args); +int routing_control_plane_protocols_control_plane_protocol_ospf_networks_network_create( + struct nb_cb_create_args *args); +int routing_control_plane_protocols_control_plane_protocol_ospf_networks_network_destroy( + struct nb_cb_destroy_args *args); +int routing_control_plane_protocols_control_plane_protocol_ospf_networks_network_area_modify( + struct nb_cb_modify_args *args); struct yang_data *routing_control_plane_protocols_control_plane_protocol_ospf_state_router_flags_router_flag_get_elem(struct nb_cb_get_elem_args *args); const void *routing_control_plane_protocols_control_plane_protocol_ospf_state_router_flags_router_flag_get_next(struct nb_cb_get_next_args *args); struct yang_data *routing_control_plane_protocols_control_plane_protocol_ospf_state_threads_abr_task_get_elem(struct nb_cb_get_elem_args *args); diff --git a/ospfd/ospf_nb_config.c b/ospfd/ospf_nb_config.c index cc5bde40f28c..dc78f256f755 100644 --- a/ospfd/ospf_nb_config.c +++ b/ospfd/ospf_nb_config.c @@ -1933,9 +1933,11 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_nbma_neighbors_n } /* - * XPath: /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-ospfd:ospf/ip-networks/network + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-ospfd:ospf/networks/network */ -int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_network_create(struct nb_cb_create_args *args) +int routing_control_plane_protocols_control_plane_protocol_ospf_networks_network_create( + struct nb_cb_create_args *args) { struct ospf *ospf; struct prefix_ipv4 prefix; @@ -1989,7 +1991,8 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_netw return NB_OK; } -int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_network_destroy(struct nb_cb_destroy_args *args) +int routing_control_plane_protocols_control_plane_protocol_ospf_networks_network_destroy( + struct nb_cb_destroy_args *args) { struct ospf *ospf; struct prefix_ipv4 prefix; @@ -2034,9 +2037,11 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_netw } /* - * XPath: /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-ospfd:ospf/ip-networks/network/area + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-ospfd:ospf/networks/network/area */ -int routing_control_plane_protocols_control_plane_protocol_ospf_ip_networks_network_area_modify(struct nb_cb_modify_args *args) +int routing_control_plane_protocols_control_plane_protocol_ospf_networks_network_area_modify( + struct nb_cb_modify_args *args) { struct ospf *ospf; struct prefix_ipv4 prefix; diff --git a/yang/frr-ospfd.yang b/yang/frr-ospfd.yang index 1f88500b9200..6485c8c2019d 100644 --- a/yang/frr-ospfd.yang +++ b/yang/frr-ospfd.yang @@ -3997,7 +3997,9 @@ module frr-ospfd { } } } - container ip-networks { + container networks { + description + "Enable OSPF routing on list of IPv4 network."; list network { key "prefix"; description From c917f529695d4b0188d63e7e0fc820201653a94f Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Thu, 18 Aug 2022 11:53:46 +0000 Subject: [PATCH 3/5] ospfd: various model fixes - add missing config false's - convert mandatory choice to use default - add some required functions - comment out SR stuff for now --- lib/routing_nb.c | 5 ++++- lib/routing_nb.h | 6 ++++++ lib/routing_nb_config.c | 18 ++++++++++++++++++ ospfd/ospf_nb.c | 2 ++ yang/frr-ospfd.yang | 17 ++++++++++++----- 5 files changed, 42 insertions(+), 6 deletions(-) diff --git a/lib/routing_nb.c b/lib/routing_nb.c index 6238fb055d5e..bb8282e31296 100644 --- a/lib/routing_nb.c +++ b/lib/routing_nb.c @@ -33,7 +33,10 @@ const struct frr_yang_module_info frr_routing_info = { .cbs = { .create = routing_control_plane_protocols_control_plane_protocol_create, .destroy = routing_control_plane_protocols_control_plane_protocol_destroy, - } + .get_next = routing_control_plane_protocols_control_plane_protocol_get_next, + .get_keys = routing_control_plane_protocols_control_plane_protocol_get_keys, + .lookup_entry = routing_control_plane_protocols_control_plane_protocol_lookup_entry, + }, }, { .xpath = NULL, diff --git a/lib/routing_nb.h b/lib/routing_nb.h index c185091a4bce..660e6a99c9a7 100644 --- a/lib/routing_nb.h +++ b/lib/routing_nb.h @@ -12,6 +12,12 @@ int routing_control_plane_protocols_control_plane_protocol_create( struct nb_cb_create_args *args); int routing_control_plane_protocols_control_plane_protocol_destroy( struct nb_cb_destroy_args *args); +const void *routing_control_plane_protocols_control_plane_protocol_get_next( + struct nb_cb_get_next_args *args); +int routing_control_plane_protocols_control_plane_protocol_get_keys( + struct nb_cb_get_keys_args *args); +const void *routing_control_plane_protocols_control_plane_protocol_lookup_entry( + struct nb_cb_lookup_entry_args *args); #define FRR_ROUTING_XPATH \ "/frr-routing:routing/control-plane-protocols/control-plane-protocol" diff --git a/lib/routing_nb_config.c b/lib/routing_nb_config.c index 594ad6c9e816..bb222ad616db 100644 --- a/lib/routing_nb_config.c +++ b/lib/routing_nb_config.c @@ -84,6 +84,24 @@ int routing_control_plane_protocols_control_plane_protocol_destroy( return NB_OK; } +const void *routing_control_plane_protocols_control_plane_protocol_get_next( + struct nb_cb_get_next_args *args) +{ + return NULL; +} + +int routing_control_plane_protocols_control_plane_protocol_get_keys( + struct nb_cb_get_keys_args *args) +{ + return NB_OK; +} + +const void *routing_control_plane_protocols_control_plane_protocol_lookup_entry( + struct nb_cb_lookup_entry_args *args) +{ + return NULL; +} + static void vrf_to_control_plane_protocol(const struct lyd_node *dnode, char *xpath) { diff --git a/ospfd/ospf_nb.c b/ospfd/ospf_nb.c index 453ce4eaccab..93e50b352a1a 100644 --- a/ospfd/ospf_nb.c +++ b/ospfd/ospf_nb.c @@ -1996,6 +1996,7 @@ const struct frr_yang_module_info frr_ospfd_info = { .modify = routing_control_plane_protocols_control_plane_protocol_ospf_timers_lsa_min_interval_modify, } }, +#if 0 { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-ospfd:ospf/sr-mpls/srgb/lower-bound", .cbs = { @@ -2058,6 +2059,7 @@ const struct frr_yang_module_info frr_ospfd_info = { .modify = routing_control_plane_protocols_control_plane_protocol_ospf_sr_mpls_bindings_connected_prefix_sid_map_connected_prefix_sid_last_hop_behavior_modify, } }, +#endif { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-ospfd:ospf/nbma-neighbors/neighbor", .cbs = { diff --git a/yang/frr-ospfd.yang b/yang/frr-ospfd.yang index 6485c8c2019d..c3d317dcfff2 100644 --- a/yang/frr-ospfd.yang +++ b/yang/frr-ospfd.yang @@ -3227,10 +3227,10 @@ module frr-ospfd { */ presence "Router info is enabled on this router"; choice type { - mandatory true; case as { leaf as { type boolean; + default true; description "Enable the Router Information functionality with AS flooding scope."; } @@ -3849,6 +3849,7 @@ module frr-ospfd { } } + /* grouping segment-routing-group { container sr-mpls { container srgb { @@ -3965,7 +3966,7 @@ module frr-ospfd { } } } - + */ grouping ospf-list-group { /* XXX NBMA neighbors are stored on an interface level is the IETF model */ container nbma-neighbors { @@ -4027,7 +4028,7 @@ module frr-ospfd { leaf ospf-id { /* frr specific model */ type ospf-instance-ref; - mandatory true; + default "0"; description "ID of OSPF routing instance that is associated with this interface."; } @@ -4780,6 +4781,7 @@ module frr-ospfd { "Additional frr statistics for the OSPF router operational state."; container router-flags { + config false; description "ASR/ASBR internal flags."; leaf-list router-flag { @@ -4789,6 +4791,7 @@ module frr-ospfd { } } container threads { + config false; description "All router-scope threads run in frr"; container abr-task { @@ -4919,6 +4922,7 @@ module frr-ospfd { } } container graceful-restart { + config false; description "Operational graceful restart information."; leaf active-restarter-count { @@ -5690,13 +5694,16 @@ module frr-ospfd { } augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol" { + description "Adds OSPF to routing model"; container ospf { when "../frr-rt:type = 'frr-ospfd:ospf'" { description "This container is only valid for the 'OSPF' routing protocol."; } - presence "Present if OSPF is running on this router."; + presence "Present if this instance of OSPF is running"; + description + "Global ospf configuration and operational state."; uses route-ospf-attributes; uses graceful-restart-group; uses auto-cost-group; @@ -5710,7 +5717,7 @@ module frr-ospfd { uses fast-reroute-group; uses spf-group; uses timer-group; - uses segment-routing-group; + // uses segment-routing-group; uses ospf-list-group; container state { config false; From 02df2a874969ef47c0d4d32fc0efc88ca8e4c4e9 Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Thu, 18 Aug 2022 11:53:29 +0000 Subject: [PATCH 4/5] ospfd: some fixes for `[no] router ospf` - fix xpath for `[no] router ospf`, which needed a scoped "frr-rt:type" value, and a non-duplicated final node. - validate the instance ID if any in YANG create - shift around order of things in vty create function --- ospfd/ospf_nb_config.c | 17 +++++++++++++---- ospfd/ospf_vty.c | 26 ++++++++++++++++++-------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/ospfd/ospf_nb_config.c b/ospfd/ospf_nb_config.c index dc78f256f755..f83b36d03e18 100644 --- a/ospfd/ospf_nb_config.c +++ b/ospfd/ospf_nb_config.c @@ -21,15 +21,24 @@ int routing_control_plane_protocols_control_plane_protocol_ospf_create(struct nb { struct ospf *ospf; unsigned short instance; - const char *vrf_name; + const char *istr, *vrf_name; + char *eistr; bool created = false; + vrf_name = yang_dnode_get_string(args->dnode, "../vrf"); + istr = yang_dnode_get_string(args->dnode, "../name"); + instance = strtoul(istr, &eistr, 10); + + if (args->event == NB_EV_VALIDATE) { + if (eistr == istr) { + return NB_ERR_VALIDATION; + } + } + assert(eistr != istr); + if (args->event != NB_EV_APPLY) return NB_OK; - vrf_name = yang_dnode_get_string(args->dnode, "./../vrf"); - instance = yang_dnode_get_uint8(args->dnode, "./../name"); - ospf = ospf_get(instance, vrf_name, &created); if (IS_DEBUG_OSPF_EVENT) diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 45bd28d1d0d0..207e1f841016 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -56,6 +56,7 @@ #include "ospfd/ospf_dump.h" #include "ospfd/ospf_bfd.h" #include "ospfd/ospf_ldp_sync.h" +#include "lib/routing_nb.h" FRR_CFG_DEFAULT_BOOL(OSPF_LOG_ADJACENCY_CHANGES, @@ -195,8 +196,18 @@ DEFPY_YANG_NOSH (router_ospf, return CMD_NOT_MY_INSTANCE; } - snprintf(xpath, XPATH_MAXLEN, "/frr-routing:routing/control-plane-protocols/control-plane-protocol[type='ospf'][name='%ld'][vrf='%s']/frr-ospfd:ospf", instance, vrf); - nb_cli_enqueue_change(vty, "./frr-ospfd:ospf", NB_OP_CREATE, NULL); + snprintf(xpath, XPATH_MAXLEN, + FRR_ROUTING_XPATH + "[type='frr-ospfd:ospf'][name='%ld'][vrf='%s']/frr-ospfd:ospf", + instance, vrf); + + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); + + ret = nb_cli_apply_changes(vty, xpath); + if (ret != CMD_SUCCESS) + return ret; + + VTY_PUSH_XPATH(OSPF_NODE, xpath); /* * XXX Old vty clicmd checks if OSPF instance successfully created, @@ -206,10 +217,6 @@ DEFPY_YANG_NOSH (router_ospf, if (DFLT_OSPF_LOG_ADJACENCY_CHANGES) nb_cli_enqueue_change(vty, "./frr-ospfd:ospf/log-adjacency-changes", NB_OP_CREATE, "true"); - ret = nb_cli_apply_changes(vty, xpath); - - VTY_PUSH_XPATH(OSPF_NODE, xpath); - return ret; } @@ -244,8 +251,11 @@ DEFPY_YANG (no_router_ospf, if (instance != ospf_instance) return CMD_NOT_MY_INSTANCE; - snprintf(xpath, XPATH_MAXLEN, "/frr-routing:routing/control-plane-protocols/control-plane-protocol[type='ospf'][name='%ld'][vrf='%s']/frr-ospfd:ospf", instance, vrf); - nb_cli_enqueue_change(vty, "./frr-ospfd:ospf", NB_OP_DESTROY, NULL); + snprintf(xpath, XPATH_MAXLEN, + FRR_ROUTING_XPATH + "[type='frr-ospfd:ospf'][name='%ld'][vrf='%s']/frr-ospfd:ospf", + instance, vrf); + nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL); return nb_cli_apply_changes(vty, xpath); } From bf0a59e77b8b8f5ada6d957184e8987ef8c4a5d1 Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Thu, 18 Aug 2022 11:55:51 +0000 Subject: [PATCH 5/5] ospfd: fix log-adjacency-changes xpaths --- ospfd/ospf_vty.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 207e1f841016..5a2f7f43712a 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -215,7 +215,7 @@ DEFPY_YANG_NOSH (router_ospf, * the asumption that duplicate instances cannot be created under nb */ if (DFLT_OSPF_LOG_ADJACENCY_CHANGES) - nb_cli_enqueue_change(vty, "./frr-ospfd:ospf/log-adjacency-changes", NB_OP_CREATE, "true"); + nb_cli_enqueue_change(vty, "log-adjacency-changes", NB_OP_CREATE, NULL); return ret; } @@ -2018,8 +2018,9 @@ DEFPY_YANG (ospf_log_adjacency_changes, "log-adjacency-changes", "Log changes in adjacency state\n") { - nb_cli_enqueue_change(vty, "./frr-ospfd:ospf/log-adjacency-changes", NB_OP_CREATE, NULL); - nb_cli_enqueue_change(vty, "./frr-ospfd:ospf/log-adjacency-changes/detail", NB_OP_MODIFY, "false"); + nb_cli_enqueue_change(vty, "log-adjacency-changes", NB_OP_CREATE, NULL); + nb_cli_enqueue_change(vty, "log-adjacency-changes/detail", NB_OP_MODIFY, + "false"); return nb_cli_apply_changes(vty, NULL); } @@ -2029,8 +2030,9 @@ DEFPY_YANG (ospf_log_adjacency_changes_detail, "Log changes in adjacency state\n" "Log all state changes\n") { - nb_cli_enqueue_change(vty, "./frr-ospfd:ospf/log-adjacency-changes", NB_OP_CREATE, NULL); - nb_cli_enqueue_change(vty, "./frr-ospfd:ospf/log-adjacency-changes/detail", NB_OP_MODIFY, "true"); + nb_cli_enqueue_change(vty, "log-adjacency-changes", NB_OP_CREATE, NULL); + nb_cli_enqueue_change(vty, "log-adjacency-changes/detail", NB_OP_MODIFY, + "true"); return nb_cli_apply_changes(vty, NULL); } @@ -2040,7 +2042,8 @@ DEFPY_YANG (no_ospf_log_adjacency_changes, NO_STR "Log changes in adjacency state\n") { - nb_cli_enqueue_change(vty, "./frr-ospfd:ospf/log-adjacency-changes", NB_OP_DESTROY, NULL); + nb_cli_enqueue_change(vty, "log-adjacency-changes", NB_OP_DESTROY, + NULL); return nb_cli_apply_changes(vty, NULL); } @@ -2051,7 +2054,8 @@ DEFPY_YANG (no_ospf_log_adjacency_changes_detail, "Log changes in adjacency state\n" "Log all state changes\n") { - nb_cli_enqueue_change(vty, "./frr-ospfd:ospf/log-adjacency-changes/detail", NB_OP_MODIFY, "false"); + nb_cli_enqueue_change(vty, "log-adjacency-changes/detail", NB_OP_MODIFY, + "false"); return nb_cli_apply_changes(vty, NULL); }