]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_nb_config.c
bgpd: add peer description for each afi/safi line in show summary
[mirror_frr.git] / bgpd / bgp_nb_config.c
1 /*
2 * Bgp northbound config callbacks
3 * Copyright (C) 2020 Nvidia
4 * Chirag Shah
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #include "northbound.h"
22 #include "libfrr.h"
23 #include "log.h"
24 #include "bgpd/bgp_nb.h"
25 #include "bgpd/bgp_nb.h"
26 #include "bgpd/bgpd.h"
27 #include "bgpd/bgp_vty.h"
28 #include "bgpd/bgp_mplsvpn.h"
29 #include "bgpd/bgp_fsm.h"
30 #include "bgpd/bgp_addpath.h"
31 #include "bgpd/bgp_updgrp.h"
32 #include "bgpd/bgp_io.h"
33 #include "bgpd/bgp_damp.h"
34
35 FRR_CFG_DEFAULT_ULONG(BGP_CONNECT_RETRY,
36 { .val_ulong = 10, .match_profile = "datacenter", },
37 { .val_ulong = 120 },
38 )
39 FRR_CFG_DEFAULT_ULONG(BGP_HOLDTIME,
40 { .val_ulong = 9, .match_profile = "datacenter", },
41 { .val_ulong = 180 },
42 )
43 FRR_CFG_DEFAULT_ULONG(BGP_KEEPALIVE,
44 { .val_ulong = 3, .match_profile = "datacenter", },
45 { .val_ulong = 60 },
46 )
47
48 int routing_control_plane_protocols_name_validate(
49 struct nb_cb_create_args *args)
50 {
51 const char *name;
52
53 name = yang_dnode_get_string(args->dnode, "./name");
54 if (!strmatch(name, "bgp")) {
55 snprintf(args->errmsg, args->errmsg_len,
56 "per vrf only one bgp instance is supported.");
57 return NB_ERR_VALIDATION;
58 }
59 return NB_OK;
60 }
61
62 /*
63 * XPath:
64 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp
65 */
66 int bgp_router_create(struct nb_cb_create_args *args)
67 {
68 const struct lyd_node *vrf_dnode;
69 struct bgp *bgp;
70 struct vrf *vrf;
71 const char *name = NULL;
72 as_t as;
73 enum bgp_instance_type inst_type;
74 bool is_view_inst = false;
75 int ret;
76 int is_new_bgp = 0;
77
78 inst_type = BGP_INSTANCE_TYPE_DEFAULT;
79
80 switch (args->event) {
81 case NB_EV_VALIDATE:
82 case NB_EV_PREPARE:
83 case NB_EV_ABORT:
84 return NB_OK;
85 case NB_EV_APPLY:
86 vrf_dnode = yang_dnode_get_parent(args->dnode,
87 "control-plane-protocol");
88 vrf = nb_running_get_entry(vrf_dnode, NULL, true);
89
90 if (strmatch(vrf->name, VRF_DEFAULT_NAME)) {
91 name = NULL;
92 } else {
93 name = vrf->name;
94 inst_type = BGP_INSTANCE_TYPE_VRF;
95 }
96
97 as = yang_dnode_get_uint32(args->dnode, "./global/local-as");
98
99 is_view_inst = yang_dnode_get_bool(
100 args->dnode, "./global/instance-type-view");
101 if (is_view_inst)
102 inst_type = BGP_INSTANCE_TYPE_VIEW;
103
104 if (inst_type == BGP_INSTANCE_TYPE_DEFAULT)
105 is_new_bgp = (bgp_lookup(as, name) == NULL);
106
107 ret = bgp_get_vty(&bgp, &as, name, inst_type);
108 if (ret == BGP_ERR_INSTANCE_MISMATCH) {
109 snprintf(
110 args->errmsg, args->errmsg_len,
111 "BGP instance name and AS number mismatch\nBGP instance is already running; AS is %u, input-as %u",
112 bgp->as, as);
113
114 return NB_ERR_INCONSISTENCY;
115 }
116 /*
117 * If we just instantiated the default instance, complete
118 * any pending VRF-VPN leaking that was configured via
119 * earlier "router bgp X vrf FOO" blocks.
120 */
121 if (is_new_bgp && inst_type == BGP_INSTANCE_TYPE_DEFAULT)
122 vpn_leak_postchange_all();
123
124 if (inst_type == BGP_INSTANCE_TYPE_VRF)
125 bgp_vpn_leak_export(bgp);
126
127 UNSET_FLAG(bgp->vrf_flags, BGP_VRF_AUTO);
128
129 nb_running_set_entry(args->dnode, bgp);
130 break;
131 }
132
133 return NB_OK;
134 }
135
136 int bgp_router_destroy(struct nb_cb_destroy_args *args)
137 {
138 struct bgp *bgp;
139
140 switch (args->event) {
141 case NB_EV_VALIDATE:
142 bgp = nb_running_get_entry(args->dnode, NULL, false);
143
144 if (!bgp)
145 return NB_OK;
146
147 if (bgp->l3vni) {
148 snprintf(args->errmsg, args->errmsg_len,
149 "Please unconfigure l3vni %u", bgp->l3vni);
150 return NB_ERR_VALIDATION;
151 }
152
153 /* Cannot delete default instance if vrf instances exist */
154 if (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) {
155 struct listnode *node;
156 struct bgp *tmp_bgp;
157
158 for (ALL_LIST_ELEMENTS_RO(bm->bgp, node, tmp_bgp)) {
159 if (tmp_bgp->inst_type
160 == BGP_INSTANCE_TYPE_VRF) {
161 snprintf(
162 args->errmsg, args->errmsg_len,
163 "Cannot delete default BGP instance. Dependent VRF instances exist\n");
164 return NB_ERR_VALIDATION;
165 }
166 }
167 }
168
169 break;
170 case NB_EV_PREPARE:
171 case NB_EV_ABORT:
172 return NB_OK;
173 case NB_EV_APPLY:
174 bgp = nb_running_unset_entry(args->dnode);
175
176 bgp_delete(bgp);
177
178 break;
179 }
180
181 return NB_OK;
182 }
183
184 /*
185 * XPath:
186 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/local-as
187 */
188 int bgp_global_local_as_modify(struct nb_cb_modify_args *args)
189 {
190 struct bgp *bgp;
191 as_t as;
192 const struct lyd_node *vrf_dnode;
193 const char *vrf_name;
194 const char *name = NULL;
195 enum bgp_instance_type inst_type;
196 int ret;
197 bool is_view_inst = false;
198
199 switch (args->event) {
200 case NB_EV_VALIDATE:
201 as = yang_dnode_get_uint32(args->dnode, NULL);
202
203 inst_type = BGP_INSTANCE_TYPE_DEFAULT;
204
205 vrf_dnode = yang_dnode_get_parent(args->dnode,
206 "control-plane-protocol");
207 vrf_name = yang_dnode_get_string(vrf_dnode, "./vrf");
208
209 if (strmatch(vrf_name, VRF_DEFAULT_NAME)) {
210 name = NULL;
211 } else {
212 name = vrf_name;
213 inst_type = BGP_INSTANCE_TYPE_VRF;
214 }
215
216 is_view_inst = yang_dnode_get_bool(args->dnode,
217 "../instance-type-view");
218 if (is_view_inst)
219 inst_type = BGP_INSTANCE_TYPE_VIEW;
220
221 ret = bgp_lookup_by_as_name_type(&bgp, &as, name, inst_type);
222 if (ret == BGP_ERR_INSTANCE_MISMATCH) {
223 snprintf(
224 args->errmsg, args->errmsg_len,
225 "BGP instance name and AS number mismatch\nBGP instance is already running; input-as %u",
226 as);
227
228 return NB_ERR_VALIDATION;
229 }
230
231 break;
232 case NB_EV_PREPARE:
233 case NB_EV_ABORT:
234 return NB_OK;
235 case NB_EV_APPLY:
236 /* NOTE: handled in bgp_global_create callback, the as change
237 * will be rejected in validate phase.
238 */
239 as = yang_dnode_get_uint32(args->dnode, NULL);
240 bgp = nb_running_get_entry(args->dnode, NULL, true);
241 if (bgp->as != as) {
242 snprintf(args->errmsg, args->errmsg_len,
243 "BGP instance is already running; AS is %u",
244 bgp->as);
245 return NB_ERR_INCONSISTENCY;
246 }
247 break;
248 }
249
250 return NB_OK;
251 }
252
253 /*
254 * XPath:
255 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/router-id
256 */
257 int bgp_global_router_id_modify(struct nb_cb_modify_args *args)
258 {
259 if (args->event != NB_EV_APPLY)
260 return NB_OK;
261
262 struct bgp *bgp;
263 struct in_addr router_id;
264
265 bgp = nb_running_get_entry(args->dnode, NULL, true);
266 yang_dnode_get_ipv4(&router_id, args->dnode, NULL);
267 bgp_router_id_static_set(bgp, router_id);
268
269 return NB_OK;
270 }
271
272 int bgp_global_router_id_destroy(struct nb_cb_destroy_args *args)
273 {
274 if (args->event != NB_EV_APPLY)
275 return NB_OK;
276
277 struct bgp *bgp;
278 struct in_addr router_id;
279
280 bgp = nb_running_get_entry(args->dnode, NULL, true);
281
282 router_id.s_addr = 0;
283 bgp_router_id_static_set(bgp, router_id);
284
285 return NB_OK;
286 }
287
288 /*
289 * XPath:
290 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/confederation/identifier
291 */
292 int bgp_global_confederation_identifier_modify(struct nb_cb_modify_args *args)
293 {
294 struct bgp *bgp;
295 as_t as;
296
297 switch (args->event) {
298 case NB_EV_VALIDATE:
299 as = yang_dnode_get_uint32(args->dnode, NULL);
300 if (!as) {
301 snprintf(args->errmsg, args->errmsg_len, "Invalid AS.");
302 return NB_ERR_VALIDATION;
303 }
304
305 break;
306 case NB_EV_PREPARE:
307 case NB_EV_ABORT:
308 return NB_OK;
309 case NB_EV_APPLY:
310 bgp = nb_running_get_entry(args->dnode, NULL, true);
311
312 as = yang_dnode_get_uint32(args->dnode, NULL);
313
314 bgp_confederation_id_set(bgp, as);
315
316 break;
317 }
318
319 return NB_OK;
320 }
321
322 int bgp_global_confederation_identifier_destroy(struct nb_cb_destroy_args *args)
323 {
324 if (args->event != NB_EV_APPLY)
325 return NB_OK;
326
327 struct bgp *bgp;
328
329 bgp = nb_running_get_entry(args->dnode, NULL, true);
330
331 bgp_confederation_id_unset(bgp);
332
333 return NB_OK;
334 }
335
336 /*
337 * XPath:
338 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/confederation/member-as
339 */
340 int bgp_global_confederation_member_as_create(struct nb_cb_create_args *args)
341 {
342 as_t my_as, as;
343 struct bgp *bgp;
344 int ret;
345
346 switch (args->event) {
347 case NB_EV_VALIDATE:
348 my_as = yang_dnode_get_uint32(args->dnode,
349 "../../../global/local-as");
350 as = yang_dnode_get_uint32(args->dnode, NULL);
351 if (my_as == as) {
352 snprintf(
353 args->errmsg, args->errmsg_len,
354 "Local member-AS %u not allowed in confed peer list",
355 my_as);
356 return NB_ERR_VALIDATION;
357 }
358
359 break;
360 case NB_EV_PREPARE:
361 case NB_EV_ABORT:
362 return NB_OK;
363 case NB_EV_APPLY:
364 bgp = nb_running_get_entry(args->dnode, NULL, true);
365 as = yang_dnode_get_uint32(args->dnode, NULL);
366
367 ret = bgp_confederation_peers_add(bgp, as);
368 if (ret == BGP_ERR_INVALID_AS) {
369 snprintf(
370 args->errmsg, args->errmsg_len,
371 "Local member-AS not alloed in confed peer list");
372 return NB_ERR_INCONSISTENCY;
373 }
374
375 break;
376 }
377
378 return NB_OK;
379 }
380
381 int bgp_global_confederation_member_as_destroy(struct nb_cb_destroy_args *args)
382 {
383 if (args->event != NB_EV_APPLY)
384 return NB_OK;
385
386 as_t as;
387 struct bgp *bgp;
388
389 bgp = nb_running_get_entry(args->dnode, NULL, true);
390 as = yang_dnode_get_uint32(args->dnode, NULL);
391
392 bgp_confederation_peers_remove(bgp, as);
393
394 return NB_OK;
395 }
396
397 /*
398 * XPath:
399 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config
400 */
401 void bgp_global_med_config_apply_finish(struct nb_cb_apply_finish_args *args)
402 {
403 struct bgp *bgp;
404
405 bgp = nb_running_get_entry(args->dnode, NULL, true);
406
407 bgp_maxmed_update(bgp);
408 }
409
410 /*
411 * XPath:
412 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config/enable-med-admin
413 */
414 int bgp_global_med_config_enable_med_admin_modify(
415 struct nb_cb_modify_args *args)
416 {
417 if (args->event != NB_EV_APPLY)
418 return NB_OK;
419
420 struct bgp *bgp;
421
422 bgp = nb_running_get_entry(args->dnode, NULL, true);
423
424 bgp->v_maxmed_admin = yang_dnode_get_bool(args->dnode, NULL);
425
426 return NB_OK;
427 }
428
429 /*
430 * XPath:
431 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config/max-med-admin
432 */
433 int bgp_global_med_config_max_med_admin_modify(struct nb_cb_modify_args *args)
434 {
435 struct bgp *bgp;
436 uint32_t med_admin_val;
437
438 switch (args->event) {
439 case NB_EV_VALIDATE:
440 med_admin_val = yang_dnode_get_uint32(args->dnode, NULL);
441
442 /* enable_med_admin is required to be enabled for max-med-admin
443 * non default value.
444 */
445 if (med_admin_val != BGP_MAXMED_VALUE_DEFAULT
446 && !yang_dnode_get_bool(args->dnode,
447 "../enable-med-admin")) {
448 snprintf(args->errmsg, args->errmsg_len,
449 "enable med admin is not set");
450 return NB_ERR_VALIDATION;
451 }
452
453 break;
454 case NB_EV_PREPARE:
455 case NB_EV_ABORT:
456 return NB_OK;
457 case NB_EV_APPLY:
458 bgp = nb_running_get_entry(args->dnode, NULL, true);
459
460 med_admin_val = yang_dnode_get_uint32(args->dnode, NULL);
461
462 bgp->maxmed_admin_value = med_admin_val;
463
464 break;
465 }
466
467 return NB_OK;
468 }
469
470 /*
471 * XPath:
472 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config/max-med-onstart-up-time
473 */
474 int bgp_global_med_config_max_med_onstart_up_time_modify(
475 struct nb_cb_modify_args *args)
476 {
477 struct bgp *bgp;
478
479 switch (args->event) {
480 case NB_EV_VALIDATE:
481 case NB_EV_PREPARE:
482 case NB_EV_ABORT:
483 return NB_OK;
484 case NB_EV_APPLY:
485 bgp = nb_running_get_entry(args->dnode, NULL, true);
486
487 bgp->v_maxmed_onstartup =
488 yang_dnode_get_uint32(args->dnode, NULL);
489
490 break;
491 }
492
493 return NB_OK;
494 }
495
496 int bgp_global_med_config_max_med_onstart_up_time_destroy(
497 struct nb_cb_destroy_args *args)
498 {
499 struct bgp *bgp;
500
501 switch (args->event) {
502 case NB_EV_VALIDATE:
503 case NB_EV_PREPARE:
504 case NB_EV_ABORT:
505 return NB_OK;
506 case NB_EV_APPLY:
507 bgp = nb_running_get_entry(args->dnode, NULL, true);
508
509 /* Cancel max-med onstartup if its on */
510 if (bgp->t_maxmed_onstartup) {
511 THREAD_OFF(bgp->t_maxmed_onstartup);
512 bgp->maxmed_onstartup_over = 1;
513 }
514
515 bgp->v_maxmed_onstartup = BGP_MAXMED_ONSTARTUP_UNCONFIGURED;
516 /* Resetting onstartup value as part of dependent node is
517 * detroyed.
518 */
519 bgp->maxmed_onstartup_value = BGP_MAXMED_VALUE_DEFAULT;
520
521 break;
522 }
523
524 return NB_OK;
525 }
526
527 /*
528 * XPath:
529 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config/max-med-onstart-up-value
530 */
531 int bgp_global_med_config_max_med_onstart_up_value_modify(
532 struct nb_cb_modify_args *args)
533 {
534 struct bgp *bgp;
535 uint32_t onstartup_val;
536
537 switch (args->event) {
538 case NB_EV_VALIDATE:
539 onstartup_val = yang_dnode_get_uint32(args->dnode, NULL);
540
541 if (!yang_dnode_exists(args->dnode,
542 "../max-med-onstart-up-time")
543 && onstartup_val != BGP_MAXMED_VALUE_DEFAULT) {
544 snprintf(args->errmsg, args->errmsg_len,
545 "max-med-onstart-up-time is not set.");
546 return NB_ERR_VALIDATION;
547 }
548
549 break;
550 case NB_EV_PREPARE:
551 case NB_EV_ABORT:
552 return NB_OK;
553 case NB_EV_APPLY:
554 bgp = nb_running_get_entry(args->dnode, NULL, true);
555
556 bgp->maxmed_onstartup_value =
557 yang_dnode_get_uint32(args->dnode, NULL);
558
559 break;
560 }
561
562 return NB_OK;
563 }
564
565 /*
566 * XPath:
567 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-reflector/route-reflector-cluster-id
568 */
569 int bgp_global_route_reflector_route_reflector_cluster_id_modify(
570 struct nb_cb_modify_args *args)
571 {
572 if (args->event != NB_EV_APPLY)
573 return NB_OK;
574
575 struct bgp *bgp;
576 struct in_addr cluster_id;
577 const struct lyd_node_leaf_list *dleaf;
578
579 bgp = nb_running_get_entry(args->dnode, NULL, true);
580
581 dleaf = (const struct lyd_node_leaf_list *)args->dnode;
582 if (dleaf->value_type == LY_TYPE_STRING)
583 yang_dnode_get_ipv4(&cluster_id, args->dnode, NULL);
584 else
585 (void)inet_aton(dleaf->value_str, &cluster_id);
586
587 bgp_cluster_id_set(bgp, &cluster_id);
588
589 if (bgp_clear_star_soft_out(bgp->name, args->errmsg, args->errmsg_len))
590 return NB_ERR_INCONSISTENCY;
591
592 return NB_OK;
593 }
594
595 int bgp_global_route_reflector_route_reflector_cluster_id_destroy(
596 struct nb_cb_destroy_args *args)
597 {
598 if (args->event != NB_EV_APPLY)
599 return NB_OK;
600
601 struct bgp *bgp;
602
603 bgp = nb_running_get_entry(args->dnode, NULL, true);
604
605 bgp_cluster_id_unset(bgp);
606
607 if (bgp_clear_star_soft_out(bgp->name, args->errmsg, args->errmsg_len))
608 return NB_ERR_INCONSISTENCY;
609
610 return NB_OK;
611 }
612
613 /*
614 * XPath:
615 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-reflector/no-client-reflect
616 */
617 int bgp_global_route_reflector_no_client_reflect_modify(
618 struct nb_cb_modify_args *args)
619 {
620 if (args->event != NB_EV_APPLY)
621 return NB_OK;
622
623 struct bgp *bgp;
624
625 bgp = nb_running_get_entry(args->dnode, NULL, true);
626
627 if (yang_dnode_get_bool(args->dnode, NULL))
628 SET_FLAG(bgp->flags, BGP_FLAG_NO_CLIENT_TO_CLIENT);
629 else
630 UNSET_FLAG(bgp->flags, BGP_FLAG_NO_CLIENT_TO_CLIENT);
631
632 if (bgp_clear_star_soft_out(bgp->name, args->errmsg, args->errmsg_len))
633 return NB_ERR_INCONSISTENCY;
634
635 return NB_OK;
636 }
637
638 /*
639 * XPath:
640 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-reflector/allow-outbound-policy
641 */
642 int bgp_global_route_reflector_allow_outbound_policy_modify(
643 struct nb_cb_modify_args *args)
644 {
645 if (args->event != NB_EV_APPLY)
646 return NB_OK;
647
648 struct bgp *bgp;
649
650 bgp = nb_running_get_entry(args->dnode, NULL, true);
651
652 if (yang_dnode_get_bool(args->dnode, NULL))
653 SET_FLAG(bgp->flags, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY);
654 else
655 UNSET_FLAG(bgp->flags, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY);
656
657 update_group_announce_rrclients(bgp);
658
659 if (bgp_clear_star_soft_out(bgp->name, args->errmsg, args->errmsg_len))
660 return NB_ERR_INCONSISTENCY;
661
662 return NB_OK;
663 }
664
665 /*
666 * XPath:
667 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options
668 */
669 void bgp_global_route_selection_options_apply_finish(
670 struct nb_cb_apply_finish_args *args)
671 {
672 struct bgp *bgp;
673
674 bgp = nb_running_get_entry(args->dnode, NULL, true);
675
676 bgp_recalculate_all_bestpaths(bgp);
677 }
678
679 /*
680 * XPath:
681 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/always-compare-med
682 */
683 int bgp_global_route_selection_options_always_compare_med_modify(
684 struct nb_cb_modify_args *args)
685 {
686 if (args->event != NB_EV_APPLY)
687 return NB_OK;
688
689 struct bgp *bgp;
690
691 bgp = nb_running_get_entry(args->dnode, NULL, true);
692
693 if (yang_dnode_get_bool(args->dnode, NULL))
694 SET_FLAG(bgp->flags, BGP_FLAG_ALWAYS_COMPARE_MED);
695 else
696 UNSET_FLAG(bgp->flags, BGP_FLAG_ALWAYS_COMPARE_MED);
697
698
699 return NB_OK;
700 }
701
702 /*
703 * XPath:
704 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/deterministic-med
705 */
706 int bgp_global_route_selection_options_deterministic_med_modify(
707 struct nb_cb_modify_args *args)
708 {
709 struct bgp *bgp;
710 int bestpath_per_as_used;
711 afi_t afi;
712 safi_t safi;
713 struct peer *peer;
714 struct listnode *node;
715
716 switch (args->event) {
717 case NB_EV_VALIDATE:
718 bgp = nb_running_get_entry(args->dnode, NULL, false);
719
720 if (!bgp)
721 return NB_OK;
722
723 /* for deconfiguring deterministic-med case */
724 if (!yang_dnode_get_bool(args->dnode, NULL)
725 && CHECK_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED)) {
726 bestpath_per_as_used = 0;
727
728 for (ALL_LIST_ELEMENTS_RO(bgp->peer, node, peer)) {
729 FOREACH_AFI_SAFI (afi, safi)
730 if (bgp_addpath_dmed_required(
731 peer->addpath_type[afi]
732 [safi])) {
733 bestpath_per_as_used = 1;
734 break;
735 }
736
737 if (bestpath_per_as_used)
738 break;
739 }
740
741 if (bestpath_per_as_used) {
742 snprintf(
743 args->errmsg, args->errmsg_len,
744 "bgp deterministic-med cannot be disabled while addpath-tx-bestpath-per-AS is in use");
745 return NB_ERR_VALIDATION;
746 }
747 }
748
749 break;
750 case NB_EV_PREPARE:
751 case NB_EV_ABORT:
752 return NB_OK;
753 case NB_EV_APPLY:
754 bgp = nb_running_get_entry(args->dnode, NULL, true);
755
756 if (yang_dnode_get_bool(args->dnode, NULL))
757 SET_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED);
758 else
759 UNSET_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED);
760
761 break;
762 }
763
764 return NB_OK;
765 }
766
767 /*
768 * XPath:
769 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/confed-med
770 */
771 int bgp_global_route_selection_options_confed_med_modify(
772 struct nb_cb_modify_args *args)
773 {
774 if (args->event != NB_EV_APPLY)
775 return NB_OK;
776
777 struct bgp *bgp;
778
779 bgp = nb_running_get_entry(args->dnode, NULL, true);
780
781 if (yang_dnode_get_bool(args->dnode, NULL))
782 SET_FLAG(bgp->flags, BGP_FLAG_MED_CONFED);
783 else
784 UNSET_FLAG(bgp->flags, BGP_FLAG_MED_CONFED);
785
786 return NB_OK;
787 }
788
789 /*
790 * XPath:
791 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/missing-as-worst-med
792 */
793 int bgp_global_route_selection_options_missing_as_worst_med_modify(
794 struct nb_cb_modify_args *args)
795 {
796 if (args->event != NB_EV_APPLY)
797 return NB_OK;
798
799 struct bgp *bgp;
800
801 bgp = nb_running_get_entry(args->dnode, NULL, true);
802
803 if (yang_dnode_get_bool(args->dnode, NULL))
804 SET_FLAG(bgp->flags, BGP_FLAG_MED_MISSING_AS_WORST);
805 else
806 UNSET_FLAG(bgp->flags, BGP_FLAG_MED_MISSING_AS_WORST);
807
808 return NB_OK;
809 }
810
811 /*
812 * XPath:
813 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/aspath-confed
814 */
815 int bgp_global_route_selection_options_aspath_confed_modify(
816 struct nb_cb_modify_args *args)
817 {
818 switch (args->event) {
819 case NB_EV_VALIDATE:
820 case NB_EV_PREPARE:
821 case NB_EV_ABORT:
822 case NB_EV_APPLY:
823 /* TODO: implement me. */
824 break;
825 }
826
827 return NB_OK;
828 }
829
830 /*
831 * XPath:
832 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/ignore-as-path-length
833 */
834 int bgp_global_route_selection_options_ignore_as_path_length_modify(
835 struct nb_cb_modify_args *args)
836 {
837 if (args->event != NB_EV_APPLY)
838 return NB_OK;
839
840 struct bgp *bgp;
841
842 bgp = nb_running_get_entry(args->dnode, NULL, true);
843
844 if (yang_dnode_get_bool(args->dnode, NULL))
845 SET_FLAG(bgp->flags, BGP_FLAG_ASPATH_IGNORE);
846 else
847 UNSET_FLAG(bgp->flags, BGP_FLAG_ASPATH_IGNORE);
848
849 return NB_OK;
850 }
851
852 /*
853 * XPath:
854 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/external-compare-router-id
855 */
856 int bgp_global_route_selection_options_external_compare_router_id_modify(
857 struct nb_cb_modify_args *args)
858 {
859 if (args->event != NB_EV_APPLY)
860 return NB_OK;
861
862 struct bgp *bgp;
863
864 bgp = nb_running_get_entry(args->dnode, NULL, true);
865
866 if (yang_dnode_get_bool(args->dnode, NULL))
867 SET_FLAG(bgp->flags, BGP_FLAG_COMPARE_ROUTER_ID);
868 else
869 UNSET_FLAG(bgp->flags, BGP_FLAG_COMPARE_ROUTER_ID);
870
871 return NB_OK;
872 }
873
874 /*
875 * XPath:
876 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/allow-multiple-as
877 */
878 int bgp_global_route_selection_options_allow_multiple_as_modify(
879 struct nb_cb_modify_args *args)
880 {
881 struct bgp *bgp;
882
883 switch (args->event) {
884 case NB_EV_VALIDATE:
885 case NB_EV_PREPARE:
886 case NB_EV_ABORT:
887 return NB_OK;
888 case NB_EV_APPLY:
889 bgp = nb_running_get_entry(args->dnode, NULL, true);
890
891 if (yang_dnode_get_bool(args->dnode, NULL)) {
892 SET_FLAG(bgp->flags, BGP_FLAG_ASPATH_MULTIPATH_RELAX);
893 if (yang_dnode_get_bool(args->dnode,
894 "../multi-path-as-set")) {
895 SET_FLAG(bgp->flags,
896 BGP_FLAG_MULTIPATH_RELAX_AS_SET);
897 }
898 } else {
899 UNSET_FLAG(bgp->flags, BGP_FLAG_ASPATH_MULTIPATH_RELAX);
900 /* unset as-set */
901 UNSET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET);
902 }
903
904 break;
905 }
906
907 return NB_OK;
908 }
909
910 /*
911 * XPath:
912 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/multi-path-as-set
913 */
914 int bgp_global_route_selection_options_multi_path_as_set_modify(
915 struct nb_cb_modify_args *args)
916 {
917 struct bgp *bgp;
918
919 switch (args->event) {
920 case NB_EV_VALIDATE:
921 case NB_EV_PREPARE:
922 case NB_EV_ABORT:
923 return NB_OK;
924 case NB_EV_APPLY:
925 bgp = nb_running_get_entry(args->dnode, NULL, true);
926
927 if (!CHECK_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET)) {
928 SET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET);
929
930 } else
931 zlog_debug(
932 "%s multi-path-as-set as part of allow-multiple-as modify cb.",
933 __func__);
934
935 break;
936 }
937
938 return NB_OK;
939 }
940
941 int bgp_global_route_selection_options_multi_path_as_set_destroy(
942 struct nb_cb_destroy_args *args)
943 {
944 struct bgp *bgp;
945
946 switch (args->event) {
947 case NB_EV_VALIDATE:
948 case NB_EV_PREPARE:
949 case NB_EV_ABORT:
950 return NB_OK;
951 case NB_EV_APPLY:
952 bgp = nb_running_get_entry(args->dnode, NULL, true);
953 /* Only unset if it set, it is possible allow_multiple_as_modify
954 * unset this.
955 */
956 if (CHECK_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET)) {
957 UNSET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET);
958
959 bgp_recalculate_all_bestpaths(bgp);
960 }
961
962 break;
963 }
964
965 return NB_OK;
966 }
967
968 /*
969 * XPath:
970 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config/dynamic-neighbors-limit
971 */
972 int bgp_global_global_neighbor_config_dynamic_neighbors_limit_modify(
973 struct nb_cb_modify_args *args)
974 {
975 if (args->event != NB_EV_APPLY)
976 return NB_OK;
977
978 struct bgp *bgp;
979 uint32_t listen_limit;
980
981 bgp = nb_running_get_entry(args->dnode, NULL, true);
982
983 listen_limit = yang_dnode_get_uint32(args->dnode, NULL);
984
985 bgp_listen_limit_set(bgp, listen_limit);
986
987 return NB_OK;
988 }
989
990 int bgp_global_global_neighbor_config_dynamic_neighbors_limit_destroy(
991 struct nb_cb_destroy_args *args)
992 {
993 if (args->event != NB_EV_APPLY)
994 return NB_OK;
995
996 struct bgp *bgp;
997
998 bgp = nb_running_get_entry(args->dnode, NULL, true);
999
1000 bgp_listen_limit_unset(bgp);
1001
1002 return NB_OK;
1003 }
1004
1005 /*
1006 * XPath:
1007 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config/log-neighbor-changes
1008 */
1009 int bgp_global_global_neighbor_config_log_neighbor_changes_modify(
1010 struct nb_cb_modify_args *args)
1011 {
1012 if (args->event != NB_EV_APPLY)
1013 return NB_OK;
1014
1015 struct bgp *bgp;
1016
1017 bgp = nb_running_get_entry(args->dnode, NULL, true);
1018
1019 if (yang_dnode_get_bool(args->dnode, NULL))
1020 SET_FLAG(bgp->flags, BGP_FLAG_LOG_NEIGHBOR_CHANGES);
1021 else
1022 UNSET_FLAG(bgp->flags, BGP_FLAG_LOG_NEIGHBOR_CHANGES);
1023
1024 return NB_OK;
1025 }
1026
1027 /*
1028 * XPath:
1029 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config/packet-quanta-config/wpkt-quanta
1030 */
1031 int bgp_global_global_neighbor_config_packet_quanta_config_wpkt_quanta_modify(
1032 struct nb_cb_modify_args *args)
1033 {
1034 if (args->event != NB_EV_APPLY)
1035 return NB_OK;
1036
1037 struct bgp *bgp;
1038 uint32_t quanta;
1039
1040 bgp = nb_running_get_entry(args->dnode, NULL, true);
1041
1042 quanta = yang_dnode_get_uint32(args->dnode, NULL);
1043
1044 if (atomic_load_explicit(&bgp->wpkt_quanta, memory_order_relaxed)
1045 == BGP_WRITE_PACKET_MAX)
1046 bgp_wpkt_quanta_config_vty(bgp, quanta, true);
1047 else
1048 bgp_wpkt_quanta_config_vty(bgp, quanta, false);
1049
1050 return NB_OK;
1051 }
1052
1053 /*
1054 * XPath:
1055 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config/packet-quanta-config/rpkt-quanta
1056 */
1057 int bgp_global_global_neighbor_config_packet_quanta_config_rpkt_quanta_modify(
1058 struct nb_cb_modify_args *args)
1059 {
1060 if (args->event != NB_EV_APPLY)
1061 return NB_OK;
1062
1063 struct bgp *bgp;
1064 uint32_t quanta;
1065
1066 bgp = nb_running_get_entry(args->dnode, NULL, true);
1067
1068 quanta = yang_dnode_get_uint32(args->dnode, NULL);
1069
1070 if (atomic_load_explicit(&bgp->rpkt_quanta, memory_order_relaxed)
1071 == BGP_READ_PACKET_MAX)
1072 bgp_rpkt_quanta_config_vty(bgp, quanta, true);
1073 else
1074 bgp_rpkt_quanta_config_vty(bgp, quanta, false);
1075
1076 return NB_OK;
1077 }
1078
1079 /*
1080 * XPath:
1081 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/enabled
1082 */
1083 int bgp_global_graceful_restart_enabled_modify(struct nb_cb_modify_args *args)
1084 {
1085 switch (args->event) {
1086 case NB_EV_VALIDATE:
1087 case NB_EV_PREPARE:
1088 case NB_EV_ABORT:
1089 case NB_EV_APPLY:
1090 /* TODO: implement me. */
1091 break;
1092 }
1093
1094 return NB_OK;
1095 }
1096
1097 int bgp_global_graceful_restart_enabled_destroy(struct nb_cb_destroy_args *args)
1098 {
1099 switch (args->event) {
1100 case NB_EV_VALIDATE:
1101 case NB_EV_PREPARE:
1102 case NB_EV_ABORT:
1103 case NB_EV_APPLY:
1104 /* TODO: implement me. */
1105 break;
1106 }
1107
1108 return NB_OK;
1109 }
1110
1111 /*
1112 * XPath:
1113 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/graceful-restart-disable
1114 */
1115 int bgp_global_graceful_restart_graceful_restart_disable_modify(
1116 struct nb_cb_modify_args *args)
1117 {
1118 switch (args->event) {
1119 case NB_EV_VALIDATE:
1120 case NB_EV_PREPARE:
1121 case NB_EV_ABORT:
1122 case NB_EV_APPLY:
1123 /* TODO: implement me. */
1124 break;
1125 }
1126
1127 return NB_OK;
1128 }
1129
1130 int bgp_global_graceful_restart_graceful_restart_disable_destroy(
1131 struct nb_cb_destroy_args *args)
1132 {
1133 switch (args->event) {
1134 case NB_EV_VALIDATE:
1135 case NB_EV_PREPARE:
1136 case NB_EV_ABORT:
1137 case NB_EV_APPLY:
1138 /* TODO: implement me. */
1139 break;
1140 }
1141
1142 return NB_OK;
1143 }
1144
1145 /*
1146 * XPath:
1147 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/preserve-fw-entry
1148 */
1149 int bgp_global_graceful_restart_preserve_fw_entry_modify(
1150 struct nb_cb_modify_args *args)
1151 {
1152 switch (args->event) {
1153 case NB_EV_VALIDATE:
1154 case NB_EV_PREPARE:
1155 case NB_EV_ABORT:
1156 case NB_EV_APPLY:
1157 /* TODO: implement me. */
1158 break;
1159 }
1160
1161 return NB_OK;
1162 }
1163
1164 /*
1165 * XPath:
1166 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/restart-time
1167 */
1168 int bgp_global_graceful_restart_restart_time_modify(
1169 struct nb_cb_modify_args *args)
1170 {
1171 switch (args->event) {
1172 case NB_EV_VALIDATE:
1173 case NB_EV_PREPARE:
1174 case NB_EV_ABORT:
1175 case NB_EV_APPLY:
1176 /* TODO: implement me. */
1177 break;
1178 }
1179
1180 return NB_OK;
1181 }
1182
1183 /*
1184 * XPath:
1185 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/stale-routes-time
1186 */
1187 int bgp_global_graceful_restart_stale_routes_time_modify(
1188 struct nb_cb_modify_args *args)
1189 {
1190 switch (args->event) {
1191 case NB_EV_VALIDATE:
1192 case NB_EV_PREPARE:
1193 case NB_EV_ABORT:
1194 case NB_EV_APPLY:
1195 /* TODO: implement me. */
1196 break;
1197 }
1198
1199 return NB_OK;
1200 }
1201
1202 /*
1203 * XPath:
1204 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/selection-deferral-time
1205 */
1206 int bgp_global_graceful_restart_selection_deferral_time_modify(
1207 struct nb_cb_modify_args *args)
1208 {
1209 switch (args->event) {
1210 case NB_EV_VALIDATE:
1211 case NB_EV_PREPARE:
1212 case NB_EV_ABORT:
1213 case NB_EV_APPLY:
1214 /* TODO: implement me. */
1215 break;
1216 }
1217
1218 return NB_OK;
1219 }
1220
1221 /*
1222 * XPath:
1223 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/rib-stale-time
1224 */
1225 int bgp_global_graceful_restart_rib_stale_time_modify(
1226 struct nb_cb_modify_args *args)
1227 {
1228 switch (args->event) {
1229 case NB_EV_VALIDATE:
1230 case NB_EV_PREPARE:
1231 case NB_EV_ABORT:
1232 case NB_EV_APPLY:
1233 /* TODO: implement me. */
1234 break;
1235 }
1236
1237 return NB_OK;
1238 }
1239
1240 /*
1241 * XPath:
1242 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-update-group-config/subgroup-pkt-queue-size
1243 */
1244 int bgp_global_global_update_group_config_subgroup_pkt_queue_size_modify(
1245 struct nb_cb_modify_args *args)
1246 {
1247 if (args->event != NB_EV_APPLY)
1248 return NB_OK;
1249
1250 struct bgp *bgp;
1251 uint32_t max_size;
1252
1253 bgp = nb_running_get_entry(args->dnode, NULL, true);
1254
1255 max_size = yang_dnode_get_uint32(args->dnode, NULL);
1256
1257 bgp_default_subgroup_pkt_queue_max_set(bgp, max_size);
1258
1259 return NB_OK;
1260 }
1261
1262 /*
1263 * XPath:
1264 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-update-group-config/coalesce-time
1265 */
1266 int bgp_global_global_update_group_config_coalesce_time_modify(
1267 struct nb_cb_modify_args *args)
1268 {
1269 if (args->event != NB_EV_APPLY)
1270 return NB_OK;
1271
1272 struct bgp *bgp;
1273 uint32_t coalesce_time;
1274
1275 bgp = nb_running_get_entry(args->dnode, NULL, true);
1276
1277 coalesce_time = yang_dnode_get_uint32(args->dnode, NULL);
1278
1279 if (coalesce_time != BGP_DEFAULT_SUBGROUP_COALESCE_TIME) {
1280 bgp->heuristic_coalesce = false;
1281 bgp->coalesce_time = coalesce_time;
1282 } else {
1283 bgp->heuristic_coalesce = true;
1284 bgp->coalesce_time = BGP_DEFAULT_SUBGROUP_COALESCE_TIME;
1285 }
1286
1287 return NB_OK;
1288 }
1289
1290 /*
1291 * XPath:
1292 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/rmap-delay-time
1293 */
1294 int bgp_global_global_config_timers_rmap_delay_time_modify(
1295 struct nb_cb_modify_args *args)
1296 {
1297 switch (args->event) {
1298 case NB_EV_VALIDATE:
1299 case NB_EV_PREPARE:
1300 case NB_EV_ABORT:
1301 case NB_EV_APPLY:
1302 /* TODO: implement me. */
1303 break;
1304 }
1305
1306 return NB_OK;
1307 }
1308
1309 /*
1310 * XPath:
1311 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/update-delay-time
1312 */
1313 int bgp_global_global_config_timers_update_delay_time_modify(
1314 struct nb_cb_modify_args *args)
1315 {
1316 switch (args->event) {
1317 case NB_EV_VALIDATE:
1318 case NB_EV_PREPARE:
1319 case NB_EV_ABORT:
1320 case NB_EV_APPLY:
1321 /* TODO: implement me. */
1322 break;
1323 }
1324
1325 return NB_OK;
1326 }
1327
1328 int bgp_global_global_config_timers_update_delay_time_destroy(
1329 struct nb_cb_destroy_args *args)
1330 {
1331 switch (args->event) {
1332 case NB_EV_VALIDATE:
1333 case NB_EV_PREPARE:
1334 case NB_EV_ABORT:
1335 case NB_EV_APPLY:
1336 /* TODO: implement me. */
1337 break;
1338 }
1339
1340 return NB_OK;
1341 }
1342
1343 /*
1344 * XPath:
1345 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/establish-wait-time
1346 */
1347 int bgp_global_global_config_timers_establish_wait_time_modify(
1348 struct nb_cb_modify_args *args)
1349 {
1350 switch (args->event) {
1351 case NB_EV_VALIDATE:
1352 case NB_EV_PREPARE:
1353 case NB_EV_ABORT:
1354 case NB_EV_APPLY:
1355 /* TODO: implement me. */
1356 break;
1357 }
1358
1359 return NB_OK;
1360 }
1361
1362 int bgp_global_global_config_timers_establish_wait_time_destroy(
1363 struct nb_cb_destroy_args *args)
1364 {
1365 switch (args->event) {
1366 case NB_EV_VALIDATE:
1367 case NB_EV_PREPARE:
1368 case NB_EV_ABORT:
1369 case NB_EV_APPLY:
1370 /* TODO: implement me. */
1371 break;
1372 }
1373
1374 return NB_OK;
1375 }
1376
1377 /*
1378 * XPath:
1379 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/connect-retry-interval
1380 */
1381 int bgp_global_global_config_timers_connect_retry_interval_modify(
1382 struct nb_cb_modify_args *args)
1383 {
1384 switch (args->event) {
1385 case NB_EV_VALIDATE:
1386 case NB_EV_PREPARE:
1387 case NB_EV_ABORT:
1388 case NB_EV_APPLY:
1389 /* TODO: implement me. */
1390 break;
1391 }
1392
1393 return NB_OK;
1394 }
1395
1396 /*
1397 * XPath:
1398 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/hold-time
1399 */
1400 int bgp_global_global_config_timers_hold_time_modify(
1401 struct nb_cb_modify_args *args)
1402 {
1403 struct bgp *bgp;
1404 unsigned long keepalive = 0;
1405 unsigned long holdtime = 0;
1406
1407 switch (args->event) {
1408 case NB_EV_VALIDATE:
1409 holdtime = yang_dnode_get_uint16(args->dnode, NULL);
1410 /* Holdtime value check. */
1411 if (holdtime < 3 && holdtime != 0) {
1412 snprintf(
1413 args->errmsg, args->errmsg_len,
1414 "hold time value must be either 0 or greater than 3");
1415 return NB_ERR_VALIDATION;
1416 }
1417
1418 break;
1419 case NB_EV_PREPARE:
1420 case NB_EV_ABORT:
1421 return NB_OK;
1422 case NB_EV_APPLY:
1423 bgp = nb_running_get_entry(args->dnode, NULL, true);
1424
1425 keepalive = yang_dnode_get_uint16(args->dnode, "../keepalive");
1426 holdtime = yang_dnode_get_uint16(args->dnode, NULL);
1427
1428 bgp_timers_set(bgp, keepalive, holdtime,
1429 DFLT_BGP_CONNECT_RETRY);
1430
1431 break;
1432 }
1433
1434 return NB_OK;
1435 }
1436
1437 /*
1438 * XPath:
1439 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/keepalive
1440 */
1441 int bgp_global_global_config_timers_keepalive_modify(
1442 struct nb_cb_modify_args *args)
1443 {
1444 struct bgp *bgp;
1445 unsigned long keepalive = 0;
1446 unsigned long holdtime = 0;
1447
1448 switch (args->event) {
1449 case NB_EV_VALIDATE:
1450 holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time");
1451 /* Holdtime value check. */
1452 if (holdtime < 3 && holdtime != 0) {
1453 snprintf(
1454 args->errmsg, args->errmsg_len,
1455 "hold time value must be either 0 or greater than 3");
1456 return NB_ERR_VALIDATION;
1457 }
1458
1459 break;
1460 case NB_EV_PREPARE:
1461 case NB_EV_ABORT:
1462 return NB_OK;
1463 case NB_EV_APPLY:
1464 bgp = nb_running_get_entry(args->dnode, NULL, true);
1465
1466 keepalive = yang_dnode_get_uint16(args->dnode, NULL);
1467 holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time");
1468
1469 bgp_timers_set(bgp, keepalive, holdtime,
1470 DFLT_BGP_CONNECT_RETRY);
1471
1472 break;
1473 }
1474
1475 return NB_OK;
1476 }
1477
1478 /*
1479 * XPath:
1480 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/instance-type-view
1481 */
1482 int bgp_global_instance_type_view_modify(struct nb_cb_modify_args *args)
1483 {
1484 switch (args->event) {
1485 case NB_EV_VALIDATE:
1486 case NB_EV_PREPARE:
1487 case NB_EV_ABORT:
1488 case NB_EV_APPLY:
1489 /* TODO: implement me. */
1490 break;
1491 }
1492
1493 return NB_OK;
1494 }
1495
1496 /*
1497 * XPath:
1498 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/ebgp-multihop-connected-route-check
1499 */
1500 int bgp_global_ebgp_multihop_connected_route_check_modify(
1501 struct nb_cb_modify_args *args)
1502 {
1503 if (args->event != NB_EV_APPLY)
1504 return NB_OK;
1505
1506 struct bgp *bgp;
1507
1508 bgp = nb_running_get_entry(args->dnode, NULL, true);
1509
1510 if (yang_dnode_get_bool(args->dnode, NULL))
1511 SET_FLAG(bgp->flags, BGP_FLAG_DISABLE_NH_CONNECTED_CHK);
1512 else
1513 UNSET_FLAG(bgp->flags, BGP_FLAG_DISABLE_NH_CONNECTED_CHK);
1514
1515 if (bgp_clear_star_soft_in(bgp->name, args->errmsg, args->errmsg_len))
1516 return NB_ERR_INCONSISTENCY;
1517
1518 return NB_OK;
1519 }
1520
1521 /*
1522 * XPath:
1523 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/fast-external-failover
1524 */
1525 int bgp_global_fast_external_failover_modify(struct nb_cb_modify_args *args)
1526 {
1527 if (args->event != NB_EV_APPLY)
1528 return NB_OK;
1529 struct bgp *bgp;
1530
1531 bgp = nb_running_get_entry(args->dnode, NULL, true);
1532 if (!yang_dnode_get_bool(args->dnode, NULL)) {
1533 SET_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER);
1534 } else
1535 UNSET_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER);
1536
1537 return NB_OK;
1538 }
1539
1540 /*
1541 * XPath:
1542 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/local-pref
1543 */
1544 int bgp_global_local_pref_modify(struct nb_cb_modify_args *args)
1545 {
1546 if (args->event != NB_EV_APPLY)
1547 return NB_OK;
1548 struct bgp *bgp;
1549 uint32_t local_pref;
1550
1551 bgp = nb_running_get_entry(args->dnode, NULL, true);
1552 local_pref = yang_dnode_get_uint32(args->dnode, NULL);
1553
1554 bgp_default_local_preference_set(bgp, local_pref);
1555
1556 if (bgp_clear_star_soft_in(bgp->name, args->errmsg, args->errmsg_len))
1557 return NB_ERR_INCONSISTENCY;
1558
1559 return NB_OK;
1560 }
1561
1562 /*
1563 * XPath:
1564 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/default-shutdown
1565 */
1566 int bgp_global_default_shutdown_modify(struct nb_cb_modify_args *args)
1567 {
1568 if (args->event != NB_EV_APPLY)
1569 return NB_OK;
1570
1571 struct bgp *bgp;
1572
1573 bgp = nb_running_get_entry(args->dnode, NULL, true);
1574 bgp->autoshutdown = yang_dnode_get_bool(args->dnode, NULL);
1575
1576 return NB_OK;
1577 }
1578
1579 /*
1580 * XPath:
1581 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/ebgp-requires-policy
1582 */
1583 int bgp_global_ebgp_requires_policy_modify(struct nb_cb_modify_args *args)
1584 {
1585 if (args->event != NB_EV_APPLY)
1586 return NB_OK;
1587
1588 struct bgp *bgp;
1589
1590 bgp = nb_running_get_entry(args->dnode, NULL, true);
1591
1592 if (yang_dnode_get_bool(args->dnode, NULL))
1593 SET_FLAG(bgp->flags, BGP_FLAG_EBGP_REQUIRES_POLICY);
1594 else
1595 UNSET_FLAG(bgp->flags, BGP_FLAG_EBGP_REQUIRES_POLICY);
1596
1597 return NB_OK;
1598 }
1599
1600 /*
1601 * XPath:
1602 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/show-hostname
1603 */
1604 int bgp_global_show_hostname_modify(struct nb_cb_modify_args *args)
1605 {
1606 if (args->event != NB_EV_APPLY)
1607 return NB_OK;
1608
1609 struct bgp *bgp;
1610
1611 bgp = nb_running_get_entry(args->dnode, NULL, true);
1612
1613 if (yang_dnode_get_bool(args->dnode, NULL))
1614 SET_FLAG(bgp->flags, BGP_FLAG_SHOW_HOSTNAME);
1615 else
1616 UNSET_FLAG(bgp->flags, BGP_FLAG_SHOW_HOSTNAME);
1617
1618 return NB_OK;
1619 }
1620
1621 /*
1622 * XPath:
1623 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/show-nexthop-hostname
1624 */
1625 int bgp_global_show_nexthop_hostname_modify(struct nb_cb_modify_args *args)
1626 {
1627 if (args->event != NB_EV_APPLY)
1628 return NB_OK;
1629
1630 struct bgp *bgp;
1631
1632 bgp = nb_running_get_entry(args->dnode, NULL, true);
1633
1634 if (yang_dnode_get_bool(args->dnode, NULL))
1635 SET_FLAG(bgp->flags, BGP_FLAG_SHOW_NEXTHOP_HOSTNAME);
1636 else
1637 UNSET_FLAG(bgp->flags, BGP_FLAG_SHOW_NEXTHOP_HOSTNAME);
1638
1639 return NB_OK;
1640 }
1641
1642 /*
1643 * XPath:
1644 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/import-check
1645 */
1646 int bgp_global_import_check_modify(struct nb_cb_modify_args *args)
1647 {
1648 if (args->event != NB_EV_APPLY)
1649 return NB_OK;
1650
1651 struct bgp *bgp;
1652
1653 bgp = nb_running_get_entry(args->dnode, NULL, true);
1654
1655 if (yang_dnode_get_bool(args->dnode, NULL))
1656 SET_FLAG(bgp->flags, BGP_FLAG_IMPORT_CHECK);
1657 else
1658 UNSET_FLAG(bgp->flags, BGP_FLAG_IMPORT_CHECK);
1659
1660 bgp_static_redo_import_check(bgp);
1661
1662 return NB_OK;
1663 }
1664
1665 /*
1666 * XPath:
1667 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-shutdown/enable
1668 */
1669 int bgp_global_graceful_shutdown_enable_modify(struct nb_cb_modify_args *args)
1670 {
1671 struct bgp *bgp;
1672
1673 switch (args->event) {
1674 case NB_EV_VALIDATE:
1675 if (CHECK_FLAG(bm->flags, BM_FLAG_GRACEFUL_SHUTDOWN)) {
1676 snprintf(
1677 args->errmsg, args->errmsg_len,
1678 "%%Failed: per-vrf graceful-shutdown config not permitted with global graceful-shutdown");
1679 return NB_ERR_VALIDATION;
1680 }
1681
1682 break;
1683 case NB_EV_PREPARE:
1684 case NB_EV_ABORT:
1685 return NB_OK;
1686 case NB_EV_APPLY:
1687 bgp = nb_running_get_entry(args->dnode, NULL, true);
1688
1689 if (yang_dnode_get_bool(args->dnode, NULL))
1690 SET_FLAG(bgp->flags, BGP_FLAG_GRACEFUL_SHUTDOWN);
1691 else
1692 UNSET_FLAG(bgp->flags, BGP_FLAG_GRACEFUL_SHUTDOWN);
1693
1694 bgp_static_redo_import_check(bgp);
1695 bgp_redistribute_redo(bgp);
1696
1697 if (bgp_clear_star_soft_out(bgp->name, args->errmsg,
1698 args->errmsg_len))
1699 return NB_ERR_INCONSISTENCY;
1700
1701 if (bgp_clear_star_soft_in(bgp->name, args->errmsg,
1702 args->errmsg_len))
1703 return NB_ERR_INCONSISTENCY;
1704
1705 break;
1706 }
1707
1708 return NB_OK;
1709 }
1710
1711 /*
1712 * XPath:
1713 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list
1714 */
1715 int bgp_global_bmp_config_target_list_create(struct nb_cb_create_args *args)
1716 {
1717 switch (args->event) {
1718 case NB_EV_VALIDATE:
1719 case NB_EV_PREPARE:
1720 case NB_EV_ABORT:
1721 case NB_EV_APPLY:
1722 /* TODO: implement me. */
1723 break;
1724 }
1725
1726 return NB_OK;
1727 }
1728
1729 int bgp_global_bmp_config_target_list_destroy(struct nb_cb_destroy_args *args)
1730 {
1731 switch (args->event) {
1732 case NB_EV_VALIDATE:
1733 case NB_EV_PREPARE:
1734 case NB_EV_ABORT:
1735 case NB_EV_APPLY:
1736 /* TODO: implement me. */
1737 break;
1738 }
1739
1740 return NB_OK;
1741 }
1742
1743 /*
1744 * XPath:
1745 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/incoming-session/session-list
1746 */
1747 int bgp_global_bmp_config_target_list_incoming_session_session_list_create(
1748 struct nb_cb_create_args *args)
1749 {
1750 switch (args->event) {
1751 case NB_EV_VALIDATE:
1752 case NB_EV_PREPARE:
1753 case NB_EV_ABORT:
1754 case NB_EV_APPLY:
1755 /* TODO: implement me. */
1756 break;
1757 }
1758
1759 return NB_OK;
1760 }
1761
1762 int bgp_global_bmp_config_target_list_incoming_session_session_list_destroy(
1763 struct nb_cb_destroy_args *args)
1764 {
1765 switch (args->event) {
1766 case NB_EV_VALIDATE:
1767 case NB_EV_PREPARE:
1768 case NB_EV_ABORT:
1769 case NB_EV_APPLY:
1770 /* TODO: implement me. */
1771 break;
1772 }
1773
1774 return NB_OK;
1775 }
1776
1777 /*
1778 * XPath:
1779 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/outgoing-session/session-list
1780 */
1781 int bgp_global_bmp_config_target_list_outgoing_session_session_list_create(
1782 struct nb_cb_create_args *args)
1783 {
1784 switch (args->event) {
1785 case NB_EV_VALIDATE:
1786 case NB_EV_PREPARE:
1787 case NB_EV_ABORT:
1788 case NB_EV_APPLY:
1789 /* TODO: implement me. */
1790 break;
1791 }
1792
1793 return NB_OK;
1794 }
1795
1796 int bgp_global_bmp_config_target_list_outgoing_session_session_list_destroy(
1797 struct nb_cb_destroy_args *args)
1798 {
1799 switch (args->event) {
1800 case NB_EV_VALIDATE:
1801 case NB_EV_PREPARE:
1802 case NB_EV_ABORT:
1803 case NB_EV_APPLY:
1804 /* TODO: implement me. */
1805 break;
1806 }
1807
1808 return NB_OK;
1809 }
1810
1811 /*
1812 * XPath:
1813 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/outgoing-session/session-list/min-retry-time
1814 */
1815 int bgp_global_bmp_config_target_list_outgoing_session_session_list_min_retry_time_modify(
1816 struct nb_cb_modify_args *args)
1817 {
1818 switch (args->event) {
1819 case NB_EV_VALIDATE:
1820 case NB_EV_PREPARE:
1821 case NB_EV_ABORT:
1822 case NB_EV_APPLY:
1823 /* TODO: implement me. */
1824 break;
1825 }
1826
1827 return NB_OK;
1828 }
1829
1830 /*
1831 * XPath:
1832 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/outgoing-session/session-list/max-retry-time
1833 */
1834 int bgp_global_bmp_config_target_list_outgoing_session_session_list_max_retry_time_modify(
1835 struct nb_cb_modify_args *args)
1836 {
1837 switch (args->event) {
1838 case NB_EV_VALIDATE:
1839 case NB_EV_PREPARE:
1840 case NB_EV_ABORT:
1841 case NB_EV_APPLY:
1842 /* TODO: implement me. */
1843 break;
1844 }
1845
1846 return NB_OK;
1847 }
1848
1849 /*
1850 * XPath:
1851 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/mirror
1852 */
1853 int bgp_global_bmp_config_target_list_mirror_modify(
1854 struct nb_cb_modify_args *args)
1855 {
1856 switch (args->event) {
1857 case NB_EV_VALIDATE:
1858 case NB_EV_PREPARE:
1859 case NB_EV_ABORT:
1860 case NB_EV_APPLY:
1861 /* TODO: implement me. */
1862 break;
1863 }
1864
1865 return NB_OK;
1866 }
1867
1868 /*
1869 * XPath:
1870 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/stats-time
1871 */
1872 int bgp_global_bmp_config_target_list_stats_time_modify(
1873 struct nb_cb_modify_args *args)
1874 {
1875 switch (args->event) {
1876 case NB_EV_VALIDATE:
1877 case NB_EV_PREPARE:
1878 case NB_EV_ABORT:
1879 case NB_EV_APPLY:
1880 /* TODO: implement me. */
1881 break;
1882 }
1883
1884 return NB_OK;
1885 }
1886
1887 int bgp_global_bmp_config_target_list_stats_time_destroy(
1888 struct nb_cb_destroy_args *args)
1889 {
1890 switch (args->event) {
1891 case NB_EV_VALIDATE:
1892 case NB_EV_PREPARE:
1893 case NB_EV_ABORT:
1894 case NB_EV_APPLY:
1895 /* TODO: implement me. */
1896 break;
1897 }
1898
1899 return NB_OK;
1900 }
1901
1902 /*
1903 * XPath:
1904 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/ipv4-access-list
1905 */
1906 int bgp_global_bmp_config_target_list_ipv4_access_list_modify(
1907 struct nb_cb_modify_args *args)
1908 {
1909 switch (args->event) {
1910 case NB_EV_VALIDATE:
1911 case NB_EV_PREPARE:
1912 case NB_EV_ABORT:
1913 case NB_EV_APPLY:
1914 /* TODO: implement me. */
1915 break;
1916 }
1917
1918 return NB_OK;
1919 }
1920
1921 int bgp_global_bmp_config_target_list_ipv4_access_list_destroy(
1922 struct nb_cb_destroy_args *args)
1923 {
1924 switch (args->event) {
1925 case NB_EV_VALIDATE:
1926 case NB_EV_PREPARE:
1927 case NB_EV_ABORT:
1928 case NB_EV_APPLY:
1929 /* TODO: implement me. */
1930 break;
1931 }
1932
1933 return NB_OK;
1934 }
1935
1936 /*
1937 * XPath:
1938 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/ipv6-access-list
1939 */
1940 int bgp_global_bmp_config_target_list_ipv6_access_list_modify(
1941 struct nb_cb_modify_args *args)
1942 {
1943 switch (args->event) {
1944 case NB_EV_VALIDATE:
1945 case NB_EV_PREPARE:
1946 case NB_EV_ABORT:
1947 case NB_EV_APPLY:
1948 /* TODO: implement me. */
1949 break;
1950 }
1951
1952 return NB_OK;
1953 }
1954
1955 int bgp_global_bmp_config_target_list_ipv6_access_list_destroy(
1956 struct nb_cb_destroy_args *args)
1957 {
1958 switch (args->event) {
1959 case NB_EV_VALIDATE:
1960 case NB_EV_PREPARE:
1961 case NB_EV_ABORT:
1962 case NB_EV_APPLY:
1963 /* TODO: implement me. */
1964 break;
1965 }
1966
1967 return NB_OK;
1968 }
1969
1970 /*
1971 * XPath:
1972 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi
1973 */
1974 int bgp_global_bmp_config_target_list_afi_safis_afi_safi_create(
1975 struct nb_cb_create_args *args)
1976 {
1977 switch (args->event) {
1978 case NB_EV_VALIDATE:
1979 case NB_EV_PREPARE:
1980 case NB_EV_ABORT:
1981 case NB_EV_APPLY:
1982 /* TODO: implement me. */
1983 break;
1984 }
1985
1986 return NB_OK;
1987 }
1988
1989 int bgp_global_bmp_config_target_list_afi_safis_afi_safi_destroy(
1990 struct nb_cb_destroy_args *args)
1991 {
1992 switch (args->event) {
1993 case NB_EV_VALIDATE:
1994 case NB_EV_PREPARE:
1995 case NB_EV_ABORT:
1996 case NB_EV_APPLY:
1997 /* TODO: implement me. */
1998 break;
1999 }
2000
2001 return NB_OK;
2002 }
2003
2004 /*
2005 * XPath:
2006 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/mirror-buffer-limit
2007 */
2008 int bgp_global_bmp_config_mirror_buffer_limit_modify(
2009 struct nb_cb_modify_args *args)
2010 {
2011 switch (args->event) {
2012 case NB_EV_VALIDATE:
2013 case NB_EV_PREPARE:
2014 case NB_EV_ABORT:
2015 case NB_EV_APPLY:
2016 /* TODO: implement me. */
2017 break;
2018 }
2019
2020 return NB_OK;
2021 }
2022
2023 int bgp_global_bmp_config_mirror_buffer_limit_destroy(
2024 struct nb_cb_destroy_args *args)
2025 {
2026 switch (args->event) {
2027 case NB_EV_VALIDATE:
2028 case NB_EV_PREPARE:
2029 case NB_EV_ABORT:
2030 case NB_EV_APPLY:
2031 /* TODO: implement me. */
2032 break;
2033 }
2034
2035 return NB_OK;
2036 }
2037
2038 /*
2039 * XPath:
2040 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi
2041 */
2042 int bgp_global_afi_safis_afi_safi_create(struct nb_cb_create_args *args)
2043 {
2044 const struct lyd_node *vrf_dnode;
2045 const char *vrf_name;
2046 const char *af_name;
2047 afi_t afi;
2048 safi_t safi;
2049
2050 switch (args->event) {
2051 case NB_EV_VALIDATE:
2052 vrf_dnode = yang_dnode_get_parent(args->dnode,
2053 "control-plane-protocol");
2054 vrf_name = yang_dnode_get_string(vrf_dnode, "./vrf");
2055 af_name = yang_dnode_get_string(args->dnode, "./afi-safi-name");
2056 yang_afi_safi_identity2value(af_name, &afi, &safi);
2057
2058 if ((!strmatch(vrf_name, VRF_DEFAULT_NAME))
2059 && safi != SAFI_UNICAST && safi != SAFI_MULTICAST
2060 && safi != SAFI_EVPN) {
2061 snprintf(
2062 args->errmsg, args->errmsg_len,
2063 "Only Unicast/Multicast/EVPN SAFIs supported in non-core instances.");
2064 return NB_ERR_VALIDATION;
2065 }
2066
2067 break;
2068 case NB_EV_PREPARE:
2069 case NB_EV_ABORT:
2070 case NB_EV_APPLY:
2071 /* TODO: implement me. */
2072 break;
2073 }
2074
2075 return NB_OK;
2076 }
2077
2078 int bgp_global_afi_safis_afi_safi_destroy(struct nb_cb_destroy_args *args)
2079 {
2080 switch (args->event) {
2081 case NB_EV_VALIDATE:
2082 case NB_EV_PREPARE:
2083 case NB_EV_ABORT:
2084 case NB_EV_APPLY:
2085 /* TODO: implement me. */
2086 break;
2087 }
2088
2089 return NB_OK;
2090 }
2091
2092 static struct peer *bgp_neighbor_peer_lookup(struct bgp *bgp,
2093 const char *peer_str, char *errmsg,
2094 size_t errmsg_len)
2095 {
2096 struct peer *peer = NULL;
2097 union sockunion su;
2098
2099 str2sockunion(peer_str, &su);
2100 peer = peer_lookup(bgp, &su);
2101 if (!peer) {
2102 snprintf(errmsg, errmsg_len,
2103 "Specify remote-as or peer-group commands first");
2104 return NULL;
2105 }
2106 if (peer_dynamic_neighbor(peer)) {
2107 snprintf(errmsg, errmsg_len,
2108 "Operation not allowed on a dynamic neighbor\n");
2109 return NULL;
2110 }
2111 return peer;
2112 }
2113
2114 /*
2115 * XPath:
2116 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor
2117 */
2118 int bgp_neighbors_neighbor_create(struct nb_cb_create_args *args)
2119 {
2120 struct bgp *bgp;
2121 const char *peer_str;
2122 union sockunion su;
2123
2124 switch (args->event) {
2125 case NB_EV_VALIDATE:
2126
2127 peer_str =
2128 yang_dnode_get_string(args->dnode, "./remote-address");
2129
2130 bgp = nb_running_get_entry(args->dnode, NULL, false);
2131 if (!bgp)
2132 return NB_OK;
2133
2134 str2sockunion(peer_str, &su);
2135 if (peer_address_self_check(bgp, &su)) {
2136 snprintf(
2137 args->errmsg, args->errmsg_len,
2138 "Can not configure the local system as neighbor");
2139 return NB_ERR_VALIDATION;
2140 }
2141
2142 break;
2143 case NB_EV_PREPARE:
2144 case NB_EV_ABORT:
2145 return NB_OK;
2146 case NB_EV_APPLY:
2147 /* Once bgp instance available check self peer addr */
2148 bgp = nb_running_get_entry(args->dnode, NULL, true);
2149
2150 peer_str =
2151 yang_dnode_get_string(args->dnode, "./remote-address");
2152 str2sockunion(peer_str, &su);
2153 if (peer_address_self_check(bgp, &su)) {
2154 snprintf(
2155 args->errmsg, args->errmsg_len,
2156 "Can not configure the local system as neighbor");
2157 return NB_ERR_INCONSISTENCY;
2158 }
2159 break;
2160 }
2161
2162 return NB_OK;
2163 }
2164
2165 int bgp_neighbors_neighbor_destroy(struct nb_cb_destroy_args *args)
2166 {
2167
2168 struct bgp *bgp;
2169 const char *peer_str;
2170 union sockunion su;
2171 struct peer *peer = NULL;
2172 struct peer *other;
2173
2174 switch (args->event) {
2175 case NB_EV_VALIDATE:
2176 bgp = nb_running_get_entry(args->dnode, NULL, false);
2177 if (!bgp)
2178 return NB_OK;
2179 peer_str =
2180 yang_dnode_get_string(args->dnode, "./remote-address");
2181 str2sockunion(peer_str, &su);
2182
2183 peer = peer_lookup(bgp, &su);
2184 if (peer) {
2185 if (peer_dynamic_neighbor(peer)) {
2186 snprintf(
2187 args->errmsg, args->errmsg_len,
2188 "Operation not allowed on a dynamic neighbor");
2189 return NB_ERR_VALIDATION;
2190 }
2191 }
2192 break;
2193 case NB_EV_PREPARE:
2194 case NB_EV_ABORT:
2195 return NB_OK;
2196 case NB_EV_APPLY:
2197
2198 bgp = nb_running_get_entry(args->dnode, NULL, true);
2199
2200 peer_str =
2201 yang_dnode_get_string(args->dnode, "./remote-address");
2202 str2sockunion(peer_str, &su);
2203
2204 peer = peer_lookup(bgp, &su);
2205 if (peer) {
2206 if (peer_dynamic_neighbor(peer)) {
2207 snprintf(
2208 args->errmsg, args->errmsg_len,
2209 "Operation not allowed on a dynamic neighbor");
2210 return NB_ERR_INCONSISTENCY;
2211 }
2212
2213 other = peer->doppelganger;
2214
2215 if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE))
2216 bgp_zebra_terminate_radv(peer->bgp, peer);
2217
2218 peer_notify_unconfig(peer);
2219 peer_delete(peer);
2220 if (other && other->status != Deleted) {
2221 peer_notify_unconfig(other);
2222 peer_delete(other);
2223 }
2224 }
2225
2226 break;
2227 }
2228
2229 return NB_OK;
2230 }
2231
2232 /*
2233 * XPath:
2234 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-interface
2235 */
2236 int bgp_neighbors_neighbor_local_interface_modify(
2237 struct nb_cb_modify_args *args)
2238 {
2239 struct bgp *bgp;
2240 const char *peer_str;
2241 const char *intf_str;
2242 struct peer *peer;
2243
2244 switch (args->event) {
2245 case NB_EV_VALIDATE:
2246 case NB_EV_PREPARE:
2247 case NB_EV_ABORT:
2248 return NB_OK;
2249 case NB_EV_APPLY:
2250 bgp = nb_running_get_entry(args->dnode, NULL, true);
2251 peer_str =
2252 yang_dnode_get_string(args->dnode, "../remote-address");
2253 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2254 args->errmsg_len);
2255 if (!peer) {
2256 snprintf(args->errmsg, args->errmsg_len,
2257 "BGP invalid peer %s", peer_str);
2258 return NB_ERR_INCONSISTENCY;
2259 }
2260
2261 if (peer->conf_if) {
2262 snprintf(args->errmsg, args->errmsg_len,
2263 "BGP invalid peer %s", peer_str);
2264 return NB_ERR_INCONSISTENCY;
2265 }
2266
2267 intf_str = yang_dnode_get_string(args->dnode, NULL);
2268
2269 peer_interface_set(peer, intf_str);
2270
2271 break;
2272 }
2273
2274 return NB_OK;
2275 }
2276
2277 int bgp_neighbors_neighbor_local_interface_destroy(
2278 struct nb_cb_destroy_args *args)
2279 {
2280 struct bgp *bgp;
2281 const char *peer_str;
2282 struct peer *peer;
2283
2284 switch (args->event) {
2285 case NB_EV_VALIDATE:
2286 case NB_EV_PREPARE:
2287 case NB_EV_ABORT:
2288 return NB_OK;
2289 case NB_EV_APPLY:
2290 bgp = nb_running_get_entry(args->dnode, NULL, true);
2291 peer_str =
2292 yang_dnode_get_string(args->dnode, "../remote-address");
2293 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2294 args->errmsg_len);
2295 if (!peer) {
2296 snprintf(args->errmsg, args->errmsg_len,
2297 "BGP invalid peer %s", peer_str);
2298 return NB_ERR_INCONSISTENCY;
2299 }
2300
2301 if (peer->conf_if) {
2302 snprintf(args->errmsg, args->errmsg_len,
2303 "BGP invalid peer %s", peer_str);
2304 return NB_ERR_INCONSISTENCY;
2305 }
2306
2307 peer_interface_unset(peer);
2308
2309 break;
2310 }
2311
2312 return NB_OK;
2313 }
2314
2315 /*
2316 * XPath:
2317 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-port
2318 */
2319 int bgp_neighbors_neighbor_local_port_modify(struct nb_cb_modify_args *args)
2320 {
2321 struct bgp *bgp;
2322 const char *peer_str;
2323 struct peer *peer;
2324 uint16_t port;
2325
2326 switch (args->event) {
2327 case NB_EV_VALIDATE:
2328 case NB_EV_PREPARE:
2329 case NB_EV_ABORT:
2330 return NB_OK;
2331 case NB_EV_APPLY:
2332 bgp = nb_running_get_entry(args->dnode, NULL, true);
2333 peer_str =
2334 yang_dnode_get_string(args->dnode, "../remote-address");
2335 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2336 args->errmsg_len);
2337 if (!peer) {
2338 snprintf(args->errmsg, args->errmsg_len,
2339 "BGP invalid peer %s", peer_str);
2340 return NB_ERR_INCONSISTENCY;
2341 }
2342
2343 port = yang_dnode_get_uint16(args->dnode, NULL);
2344 peer_port_set(peer, port);
2345
2346 break;
2347 }
2348
2349 return NB_OK;
2350 }
2351
2352 int bgp_neighbors_neighbor_local_port_destroy(struct nb_cb_destroy_args *args)
2353 {
2354 struct bgp *bgp;
2355 const char *peer_str;
2356 struct peer *peer;
2357 uint16_t port;
2358 struct servent *sp;
2359
2360 switch (args->event) {
2361 case NB_EV_VALIDATE:
2362 case NB_EV_PREPARE:
2363 case NB_EV_ABORT:
2364 return NB_OK;
2365 case NB_EV_APPLY:
2366 bgp = nb_running_get_entry(args->dnode, NULL, true);
2367 peer_str =
2368 yang_dnode_get_string(args->dnode, "../remote-address");
2369 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2370 args->errmsg_len);
2371 if (!peer) {
2372 snprintf(args->errmsg, args->errmsg_len,
2373 "BGP invalid peer %s", peer_str);
2374 return NB_ERR_INCONSISTENCY;
2375 }
2376
2377 sp = getservbyname("bgp", "tcp");
2378 port = (sp == NULL) ? BGP_PORT_DEFAULT : ntohs(sp->s_port);
2379 peer_port_set(peer, port);
2380
2381 break;
2382 }
2383
2384 return NB_OK;
2385 }
2386
2387 /*
2388 * XPath:
2389 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/peer-group
2390 */
2391 int bgp_neighbors_neighbor_peer_group_modify(struct nb_cb_modify_args *args)
2392 {
2393 struct bgp *bgp;
2394 const char *peer_str;
2395 const char *peer_grp_str;
2396 struct peer *peer;
2397 struct peer_group *group;
2398 union sockunion su;
2399 as_t as;
2400 int ret = 0;
2401 char prgrp_xpath[XPATH_MAXLEN];
2402 const struct lyd_node *bgp_dnode;
2403
2404 switch (args->event) {
2405 case NB_EV_VALIDATE:
2406 peer_grp_str = yang_dnode_get_string(args->dnode, NULL);
2407 bgp_dnode = yang_dnode_get_parent(args->dnode, "bgp");
2408 snprintf(prgrp_xpath, sizeof(prgrp_xpath),
2409 FRR_BGP_PEER_GROUP_XPATH, peer_grp_str, "");
2410
2411 if (!yang_dnode_exists(bgp_dnode, prgrp_xpath)) {
2412 snprintf(args->errmsg, args->errmsg_len,
2413 "Configure the peer-group first %s",
2414 peer_grp_str);
2415 return NB_ERR_VALIDATION;
2416 }
2417
2418 break;
2419 case NB_EV_PREPARE:
2420 case NB_EV_ABORT:
2421 return NB_OK;
2422 case NB_EV_APPLY:
2423 bgp = nb_running_get_entry(args->dnode, NULL, true);
2424 peer_str =
2425 yang_dnode_get_string(args->dnode, "../remote-address");
2426 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2427 args->errmsg_len);
2428
2429 str2sockunion(peer_str, &su);
2430
2431 peer_grp_str = yang_dnode_get_string(args->dnode, NULL);
2432 group = peer_group_lookup(bgp, peer_grp_str);
2433 if (!group) {
2434 snprintf(args->errmsg, args->errmsg_len,
2435 "Configure the peer-group first %s",
2436 peer_grp_str);
2437 return NB_ERR_INCONSISTENCY;
2438 }
2439
2440 ret = peer_group_bind(bgp, &su, peer, group, &as);
2441
2442 if (ret == BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT) {
2443 snprintf(
2444 args->errmsg, args->errmsg_len,
2445 "Peer with AS %u cannot be in this peer-group, members must be all internal or all external\n",
2446 as);
2447 return NB_ERR_INCONSISTENCY;
2448 }
2449
2450 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
2451 < 0)
2452 return NB_ERR_INCONSISTENCY;
2453
2454 break;
2455 }
2456
2457 return NB_OK;
2458 }
2459
2460 int bgp_neighbors_neighbor_peer_group_destroy(struct nb_cb_destroy_args *args)
2461 {
2462 struct bgp *bgp;
2463 const char *peer_str;
2464 struct peer *peer;
2465 int ret;
2466
2467 switch (args->event) {
2468 case NB_EV_VALIDATE:
2469 case NB_EV_PREPARE:
2470 case NB_EV_ABORT:
2471 return NB_OK;
2472 case NB_EV_APPLY:
2473 bgp = nb_running_get_entry(args->dnode, NULL, true);
2474 peer_str =
2475 yang_dnode_get_string(args->dnode, "../remote-address");
2476 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2477 args->errmsg_len);
2478
2479 if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE))
2480 bgp_zebra_terminate_radv(peer->bgp, peer);
2481
2482 peer_notify_unconfig(peer);
2483 ret = peer_delete(peer);
2484
2485 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
2486 < 0)
2487 return NB_ERR_INCONSISTENCY;
2488
2489 break;
2490 }
2491
2492 return NB_OK;
2493 }
2494
2495 /*
2496 * XPath:
2497 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/password
2498 */
2499 int bgp_neighbors_neighbor_password_modify(struct nb_cb_modify_args *args)
2500 {
2501 struct bgp *bgp;
2502 const char *peer_str;
2503 const char *passwrd_str;
2504 struct peer *peer;
2505
2506 switch (args->event) {
2507 case NB_EV_VALIDATE:
2508 case NB_EV_PREPARE:
2509 case NB_EV_ABORT:
2510 return NB_OK;
2511 case NB_EV_APPLY:
2512 bgp = nb_running_get_entry(args->dnode, NULL, true);
2513 peer_str =
2514 yang_dnode_get_string(args->dnode, "../remote-address");
2515 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2516 args->errmsg_len);
2517 if (!peer)
2518 return NB_ERR_INCONSISTENCY;
2519
2520 passwrd_str = yang_dnode_get_string(args->dnode, NULL);
2521
2522 peer_password_set(peer, passwrd_str);
2523
2524 break;
2525 }
2526
2527 return NB_OK;
2528 }
2529
2530 int bgp_neighbors_neighbor_password_destroy(struct nb_cb_destroy_args *args)
2531 {
2532 struct bgp *bgp;
2533 const char *peer_str;
2534 struct peer *peer;
2535
2536 switch (args->event) {
2537 case NB_EV_VALIDATE:
2538 case NB_EV_PREPARE:
2539 case NB_EV_ABORT:
2540 return NB_OK;
2541 case NB_EV_APPLY:
2542 bgp = nb_running_get_entry(args->dnode, NULL, true);
2543 peer_str =
2544 yang_dnode_get_string(args->dnode, "../remote-address");
2545 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2546 args->errmsg_len);
2547 if (!peer)
2548 return NB_ERR_INCONSISTENCY;
2549
2550 peer_password_unset(peer);
2551
2552 break;
2553 }
2554
2555 return NB_OK;
2556 }
2557
2558 /*
2559 * XPath:
2560 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/ttl-security
2561 */
2562 int bgp_neighbors_neighbor_ttl_security_modify(struct nb_cb_modify_args *args)
2563 {
2564 struct bgp *bgp;
2565 const char *peer_str;
2566 struct peer *peer;
2567 int ret;
2568 uint8_t gtsm_hops;
2569
2570 switch (args->event) {
2571 case NB_EV_VALIDATE:
2572 case NB_EV_PREPARE:
2573 case NB_EV_ABORT:
2574 return NB_OK;
2575 case NB_EV_APPLY:
2576 bgp = nb_running_get_entry(args->dnode, NULL, true);
2577 peer_str =
2578 yang_dnode_get_string(args->dnode, "../remote-address");
2579 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2580 args->errmsg_len);
2581 if (!peer)
2582 return NB_ERR_INCONSISTENCY;
2583
2584 gtsm_hops = yang_dnode_get_uint8(args->dnode, NULL);
2585 /*
2586 * If 'neighbor swpX', then this is for directly connected
2587 * peers, we should not accept a ttl-security hops value greater
2588 * than 1.
2589 */
2590 if (peer->conf_if && (gtsm_hops > BGP_GTSM_HOPS_CONNECTED)) {
2591 snprintf(
2592 args->errmsg, args->errmsg_len,
2593 "%d is directly connected peer, hops cannot exceed 1\n",
2594 gtsm_hops);
2595 return NB_ERR_INCONSISTENCY;
2596 }
2597
2598 ret = peer_ttl_security_hops_set(peer, gtsm_hops);
2599 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret))
2600 return NB_ERR_INCONSISTENCY;
2601
2602 break;
2603 }
2604
2605 return NB_OK;
2606 }
2607
2608 int bgp_neighbors_neighbor_ttl_security_destroy(struct nb_cb_destroy_args *args)
2609 {
2610 struct bgp *bgp;
2611 const char *peer_str;
2612 struct peer *peer;
2613 int ret;
2614
2615 switch (args->event) {
2616 case NB_EV_VALIDATE:
2617 case NB_EV_PREPARE:
2618 case NB_EV_ABORT:
2619 return NB_OK;
2620 case NB_EV_APPLY:
2621 bgp = nb_running_get_entry(args->dnode, NULL, true);
2622 peer_str =
2623 yang_dnode_get_string(args->dnode, "../remote-address");
2624 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2625 args->errmsg_len);
2626 if (!peer)
2627 return NB_ERR_INCONSISTENCY;
2628
2629 ret = peer_ttl_security_hops_unset(peer);
2630 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
2631 < 0)
2632 return NB_ERR_INCONSISTENCY;
2633
2634
2635 break;
2636 }
2637
2638 return NB_OK;
2639 }
2640
2641 /*
2642 * XPath:
2643 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/solo
2644 */
2645 int bgp_neighbors_neighbor_solo_modify(struct nb_cb_modify_args *args)
2646 {
2647 switch (args->event) {
2648 case NB_EV_VALIDATE:
2649 case NB_EV_PREPARE:
2650 case NB_EV_ABORT:
2651 case NB_EV_APPLY:
2652 /* TODO: implement me. */
2653 break;
2654 }
2655
2656 return NB_OK;
2657 }
2658
2659 /*
2660 * XPath:
2661 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/enforce-first-as
2662 */
2663 int bgp_neighbors_neighbor_enforce_first_as_modify(
2664 struct nb_cb_modify_args *args)
2665 {
2666 struct bgp *bgp;
2667 const char *peer_str;
2668 struct peer *peer;
2669 bool enable = false;
2670
2671 switch (args->event) {
2672 case NB_EV_VALIDATE:
2673 case NB_EV_PREPARE:
2674 case NB_EV_ABORT:
2675 return NB_OK;
2676 case NB_EV_APPLY:
2677 bgp = nb_running_get_entry(args->dnode, NULL, true);
2678 peer_str =
2679 yang_dnode_get_string(args->dnode, "../remote-address");
2680 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2681 args->errmsg_len);
2682
2683 enable = yang_dnode_get_bool(args->dnode, NULL);
2684
2685 peer_flag_modify_nb(bgp, peer_str, peer,
2686 PEER_FLAG_ENFORCE_FIRST_AS, enable,
2687 args->errmsg, args->errmsg_len);
2688 break;
2689 }
2690
2691 return NB_OK;
2692 }
2693
2694 /*
2695 * XPath:
2696 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/description
2697 */
2698 int bgp_neighbors_neighbor_description_modify(struct nb_cb_modify_args *args)
2699 {
2700 struct bgp *bgp;
2701 const char *peer_str;
2702 const char *desc_str;
2703 struct peer *peer;
2704
2705 switch (args->event) {
2706 case NB_EV_VALIDATE:
2707 case NB_EV_PREPARE:
2708 case NB_EV_ABORT:
2709 return NB_OK;
2710 case NB_EV_APPLY:
2711 bgp = nb_running_get_entry(args->dnode, NULL, true);
2712 peer_str =
2713 yang_dnode_get_string(args->dnode, "../remote-address");
2714
2715 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2716 args->errmsg_len);
2717 if (!peer)
2718 return NB_ERR_INCONSISTENCY;
2719
2720 desc_str = yang_dnode_get_string(args->dnode, NULL);
2721
2722 peer_description_set(peer, desc_str);
2723
2724 break;
2725 }
2726
2727 return NB_OK;
2728 }
2729
2730 int bgp_neighbors_neighbor_description_destroy(struct nb_cb_destroy_args *args)
2731 {
2732 struct bgp *bgp;
2733 const char *peer_str;
2734 struct peer *peer;
2735
2736 switch (args->event) {
2737 case NB_EV_VALIDATE:
2738 case NB_EV_PREPARE:
2739 case NB_EV_ABORT:
2740 return NB_OK;
2741 case NB_EV_APPLY:
2742 bgp = nb_running_get_entry(args->dnode, NULL, true);
2743 peer_str =
2744 yang_dnode_get_string(args->dnode, "../remote-address");
2745 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2746 args->errmsg_len);
2747 if (!peer)
2748 return NB_ERR_INCONSISTENCY;
2749
2750 peer_description_unset(peer);
2751
2752 break;
2753 }
2754
2755 return NB_OK;
2756 }
2757
2758 /*
2759 * XPath:
2760 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/passive-mode
2761 */
2762 int bgp_neighbors_neighbor_passive_mode_modify(struct nb_cb_modify_args *args)
2763 {
2764 struct bgp *bgp;
2765 const char *peer_str;
2766 struct peer *peer;
2767 bool set = false;
2768
2769 switch (args->event) {
2770 case NB_EV_VALIDATE:
2771 case NB_EV_PREPARE:
2772 case NB_EV_ABORT:
2773 return NB_OK;
2774 case NB_EV_APPLY:
2775 bgp = nb_running_get_entry(args->dnode, NULL, true);
2776 peer_str =
2777 yang_dnode_get_string(args->dnode, "../remote-address");
2778 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2779 args->errmsg_len);
2780 if (!peer)
2781 return NB_ERR_INCONSISTENCY;
2782
2783 set = yang_dnode_get_bool(args->dnode, NULL);
2784
2785 if (peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_PASSIVE,
2786 set, args->errmsg, args->errmsg_len)
2787 < 0)
2788 return NB_ERR_INCONSISTENCY;
2789
2790 break;
2791 }
2792
2793 return NB_OK;
2794 }
2795
2796 /*
2797 * XPath:
2798 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/dynamic-capability
2799 */
2800 int bgp_neighbors_neighbor_capability_options_dynamic_capability_modify(
2801 struct nb_cb_modify_args *args)
2802 {
2803 struct bgp *bgp;
2804 const char *peer_str;
2805 struct peer *peer;
2806 bool enable = false;
2807
2808 switch (args->event) {
2809 case NB_EV_VALIDATE:
2810 case NB_EV_PREPARE:
2811 case NB_EV_ABORT:
2812 return NB_OK;
2813 case NB_EV_APPLY:
2814 bgp = nb_running_get_entry(args->dnode, NULL, true);
2815 peer_str = yang_dnode_get_string(args->dnode,
2816 "../../remote-address");
2817 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2818 args->errmsg_len);
2819
2820 enable = yang_dnode_get_bool(args->dnode, NULL);
2821
2822 peer_flag_modify_nb(bgp, peer_str, peer,
2823 PEER_FLAG_DYNAMIC_CAPABILITY, enable,
2824 args->errmsg, args->errmsg_len);
2825
2826 break;
2827 }
2828
2829 return NB_OK;
2830 }
2831
2832 /*
2833 * XPath:
2834 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/strict-capability
2835 */
2836 int bgp_neighbors_neighbor_capability_options_strict_capability_modify(
2837 struct nb_cb_modify_args *args)
2838 {
2839 struct bgp *bgp;
2840 const char *peer_str;
2841 struct peer *peer;
2842 bool enable = false;
2843
2844 switch (args->event) {
2845 case NB_EV_VALIDATE:
2846 case NB_EV_PREPARE:
2847 case NB_EV_ABORT:
2848 return NB_OK;
2849 case NB_EV_APPLY:
2850 bgp = nb_running_get_entry(args->dnode, NULL, true);
2851 peer_str = yang_dnode_get_string(args->dnode,
2852 "../../remote-address");
2853 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2854 args->errmsg_len);
2855
2856 enable = yang_dnode_get_bool(args->dnode, NULL);
2857
2858 peer_flag_modify_nb(bgp, peer_str, peer,
2859 PEER_FLAG_STRICT_CAP_MATCH, enable,
2860 args->errmsg, args->errmsg_len);
2861
2862 break;
2863 }
2864
2865 return NB_OK;
2866 }
2867
2868 /*
2869 * XPath:
2870 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/extended-nexthop-capability
2871 */
2872 int bgp_neighbors_neighbor_capability_options_extended_nexthop_capability_modify(
2873 struct nb_cb_modify_args *args)
2874 {
2875 struct bgp *bgp;
2876 const char *peer_str;
2877 struct peer *peer;
2878 bool enable = false;
2879
2880 switch (args->event) {
2881 case NB_EV_VALIDATE:
2882 case NB_EV_PREPARE:
2883 case NB_EV_ABORT:
2884 return NB_OK;
2885 case NB_EV_APPLY:
2886 bgp = nb_running_get_entry(args->dnode, NULL, true);
2887 peer_str = yang_dnode_get_string(args->dnode,
2888 "../../remote-address");
2889 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2890 args->errmsg_len);
2891
2892 enable = yang_dnode_get_bool(args->dnode, NULL);
2893
2894 peer_flag_modify_nb(bgp, peer_str, peer,
2895 PEER_FLAG_CAPABILITY_ENHE, enable,
2896 args->errmsg, args->errmsg_len);
2897
2898 break;
2899 }
2900
2901 return NB_OK;
2902 }
2903
2904 /*
2905 * XPath:
2906 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/capability-negotiate
2907 */
2908 int bgp_neighbors_neighbor_capability_options_capability_negotiate_modify(
2909 struct nb_cb_modify_args *args)
2910 {
2911 switch (args->event) {
2912 case NB_EV_VALIDATE:
2913 case NB_EV_PREPARE:
2914 case NB_EV_ABORT:
2915 case NB_EV_APPLY:
2916 /* TODO: implement me. */
2917 break;
2918 }
2919
2920 return NB_OK;
2921 }
2922
2923 /*
2924 * XPath:
2925 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/override-capability
2926 */
2927 int bgp_neighbors_neighbor_capability_options_override_capability_modify(
2928 struct nb_cb_modify_args *args)
2929 {
2930 struct bgp *bgp;
2931 const char *peer_str;
2932 struct peer *peer;
2933 bool enable = false;
2934
2935 switch (args->event) {
2936 case NB_EV_VALIDATE:
2937 case NB_EV_PREPARE:
2938 case NB_EV_ABORT:
2939 return NB_OK;
2940 case NB_EV_APPLY:
2941 bgp = nb_running_get_entry(args->dnode, NULL, true);
2942 peer_str = yang_dnode_get_string(args->dnode,
2943 "../../remote-address");
2944 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2945 args->errmsg_len);
2946
2947 enable = yang_dnode_get_bool(args->dnode, NULL);
2948
2949 peer_flag_modify_nb(bgp, peer_str, peer,
2950 PEER_FLAG_OVERRIDE_CAPABILITY, enable,
2951 args->errmsg, args->errmsg_len);
2952
2953 break;
2954 }
2955
2956 return NB_OK;
2957 }
2958
2959 /*
2960 * XPath:
2961 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/update-source/ip
2962 */
2963 int bgp_neighbors_neighbor_update_source_ip_modify(
2964 struct nb_cb_modify_args *args)
2965 {
2966 struct bgp *bgp;
2967 const char *peer_str, *source_str;
2968 struct peer *peer;
2969 union sockunion su;
2970
2971 switch (args->event) {
2972 case NB_EV_VALIDATE:
2973 case NB_EV_PREPARE:
2974 case NB_EV_ABORT:
2975 return NB_OK;
2976 case NB_EV_APPLY:
2977 bgp = nb_running_get_entry(args->dnode, NULL, true);
2978 peer_str = yang_dnode_get_string(args->dnode,
2979 "../../remote-address");
2980 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
2981 args->errmsg_len);
2982 if (!peer)
2983 return NB_ERR_INCONSISTENCY;
2984
2985 source_str = yang_dnode_get_string(args->dnode, NULL);
2986
2987 str2sockunion(source_str, &su);
2988 peer_update_source_addr_set(peer, &su);
2989
2990 break;
2991 }
2992
2993 return NB_OK;
2994 }
2995
2996 int bgp_neighbors_neighbor_update_source_ip_destroy(
2997 struct nb_cb_destroy_args *args)
2998 {
2999 struct bgp *bgp;
3000 const char *peer_str;
3001 struct peer *peer;
3002
3003 switch (args->event) {
3004 case NB_EV_VALIDATE:
3005 case NB_EV_PREPARE:
3006 case NB_EV_ABORT:
3007 return NB_OK;
3008 case NB_EV_APPLY:
3009 bgp = nb_running_get_entry(args->dnode, NULL, true);
3010 peer_str = yang_dnode_get_string(args->dnode,
3011 "../../remote-address");
3012 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
3013 args->errmsg_len);
3014 if (!peer)
3015 return NB_ERR_INCONSISTENCY;
3016
3017 peer_update_source_unset(peer);
3018
3019 break;
3020 }
3021
3022 return NB_OK;
3023 }
3024
3025 /*
3026 * XPath:
3027 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/update-source/interface
3028 */
3029 int bgp_neighbors_neighbor_update_source_interface_modify(
3030 struct nb_cb_modify_args *args)
3031 {
3032 struct bgp *bgp;
3033 const char *peer_str, *source_str;
3034 struct peer *peer;
3035 struct prefix p;
3036
3037 switch (args->event) {
3038 case NB_EV_VALIDATE:
3039 source_str = yang_dnode_get_string(args->dnode, NULL);
3040 if (str2prefix(source_str, &p)) {
3041 snprintf(args->errmsg, args->errmsg_len,
3042 "Invalid update-source, remove prefix length");
3043 return NB_ERR_VALIDATION;
3044 }
3045 break;
3046 case NB_EV_PREPARE:
3047 case NB_EV_ABORT:
3048 return NB_OK;
3049 case NB_EV_APPLY:
3050 bgp = nb_running_get_entry(args->dnode, NULL, true);
3051 peer_str = yang_dnode_get_string(args->dnode,
3052 "../../remote-address");
3053 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
3054 args->errmsg_len);
3055 if (!peer)
3056 return NB_ERR_INCONSISTENCY;
3057
3058 source_str = yang_dnode_get_string(args->dnode, NULL);
3059
3060 peer_update_source_if_set(peer, source_str);
3061
3062 break;
3063 }
3064
3065 return NB_OK;
3066 }
3067
3068 int bgp_neighbors_neighbor_update_source_interface_destroy(
3069 struct nb_cb_destroy_args *args)
3070 {
3071 struct bgp *bgp;
3072 const char *peer_str;
3073 struct peer *peer;
3074
3075 switch (args->event) {
3076 case NB_EV_VALIDATE:
3077 case NB_EV_PREPARE:
3078 case NB_EV_ABORT:
3079 return NB_OK;
3080 case NB_EV_APPLY:
3081 bgp = nb_running_get_entry(args->dnode, NULL, true);
3082 peer_str = yang_dnode_get_string(args->dnode,
3083 "../../remote-address");
3084 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
3085 args->errmsg_len);
3086 if (!peer)
3087 return NB_ERR_INCONSISTENCY;
3088
3089 peer_update_source_unset(peer);
3090
3091 break;
3092 }
3093
3094 return NB_OK;
3095 }
3096
3097 /*
3098 * XPath:
3099 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/neighbor-remote-as/remote-as-type
3100 */
3101 int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_type_modify(
3102 struct nb_cb_modify_args *args)
3103 {
3104 struct bgp *bgp;
3105 const char *peer_str;
3106 int as_type = AS_SPECIFIED;
3107 union sockunion su;
3108 int ret;
3109 as_t as = 0;
3110
3111 switch (args->event) {
3112 case NB_EV_VALIDATE:
3113 case NB_EV_PREPARE:
3114 case NB_EV_ABORT:
3115 return NB_OK;
3116 case NB_EV_APPLY:
3117 bgp = nb_running_get_entry(args->dnode, NULL, true);
3118
3119 peer_str = yang_dnode_get_string(args->dnode,
3120 "../../remote-address");
3121 as_type = yang_dnode_get_enum(args->dnode, "../remote-as-type");
3122 /* When remote-as-type is as-specified, the peer will be
3123 * created in remote_as_modify callback */
3124 if (yang_dnode_exists(args->dnode, "../remote-as"))
3125 return NB_OK;
3126
3127 str2sockunion(peer_str, &su);
3128 ret = peer_remote_as(bgp, &su, NULL, &as, as_type, AFI_IP,
3129 SAFI_UNICAST);
3130 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
3131 < 0)
3132 return NB_ERR_INCONSISTENCY;
3133
3134
3135 break;
3136 }
3137
3138 return NB_OK;
3139 }
3140
3141 int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_type_destroy(
3142 struct nb_cb_destroy_args *args)
3143 {
3144 switch (args->event) {
3145 case NB_EV_VALIDATE:
3146 case NB_EV_PREPARE:
3147 case NB_EV_ABORT:
3148 case NB_EV_APPLY:
3149 /* TODO: implement me. */
3150 break;
3151 }
3152
3153 return NB_OK;
3154 }
3155
3156 /*
3157 * XPath:
3158 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/neighbor-remote-as/remote-as
3159 */
3160 int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_modify(
3161 struct nb_cb_modify_args *args)
3162 {
3163 struct bgp *bgp;
3164 const char *peer_str;
3165 int as_type = AS_SPECIFIED;
3166 union sockunion su;
3167 int ret;
3168 as_t as = 0;
3169
3170 switch (args->event) {
3171 case NB_EV_VALIDATE:
3172 case NB_EV_PREPARE:
3173 case NB_EV_ABORT:
3174 return NB_OK;
3175 case NB_EV_APPLY:
3176 bgp = nb_running_get_entry(args->dnode, NULL, true);
3177
3178 peer_str = yang_dnode_get_string(args->dnode,
3179 "../../remote-address");
3180 as_type = yang_dnode_get_enum(args->dnode, "../remote-as-type");
3181 as = yang_dnode_get_uint32(args->dnode, NULL);
3182
3183 str2sockunion(peer_str, &su);
3184 ret = peer_remote_as(bgp, &su, NULL, &as, as_type, AFI_IP,
3185 SAFI_UNICAST);
3186 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
3187 < 0)
3188 return NB_ERR_INCONSISTENCY;
3189
3190
3191 break;
3192 }
3193
3194 return NB_OK;
3195 }
3196
3197 int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_destroy(
3198 struct nb_cb_destroy_args *args)
3199 {
3200 switch (args->event) {
3201 case NB_EV_VALIDATE:
3202 case NB_EV_PREPARE:
3203 case NB_EV_ABORT:
3204 case NB_EV_APPLY:
3205 /* TODO: implement me. */
3206 break;
3207 }
3208
3209 return NB_OK;
3210 }
3211
3212 /*
3213 * XPath:
3214 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/ebgp-multihop/enabled
3215 */
3216 int bgp_neighbors_neighbor_ebgp_multihop_enabled_modify(
3217 struct nb_cb_modify_args *args)
3218 {
3219 struct bgp *bgp;
3220 const char *peer_str;
3221 struct peer *peer;
3222 bool set = false;
3223 int ret = 0;
3224 uint8_t ttl = MAXTTL;
3225
3226 switch (args->event) {
3227 case NB_EV_VALIDATE:
3228 case NB_EV_PREPARE:
3229 case NB_EV_ABORT:
3230 return NB_OK;
3231 case NB_EV_APPLY:
3232 bgp = nb_running_get_entry(args->dnode, NULL, true);
3233 peer_str = yang_dnode_get_string(args->dnode,
3234 "../../remote-address");
3235 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
3236 args->errmsg_len);
3237 if (!peer)
3238 return NB_ERR_INCONSISTENCY;
3239
3240 if (peer->conf_if) {
3241 ret = BGP_ERR_INVALID_FOR_DIRECT_PEER;
3242 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len,
3243 ret);
3244 return NB_ERR_INCONSISTENCY;
3245 }
3246
3247 set = yang_dnode_get_bool(args->dnode, NULL);
3248
3249 if (set)
3250 ret = peer_ebgp_multihop_set(peer, ttl);
3251 else
3252 ret = peer_ebgp_multihop_unset(peer);
3253
3254 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
3255 < 0)
3256 return NB_ERR_INCONSISTENCY;
3257
3258
3259 break;
3260 }
3261
3262 return NB_OK;
3263 }
3264
3265 int bgp_neighbors_neighbor_ebgp_multihop_enabled_destroy(
3266 struct nb_cb_destroy_args *args)
3267 {
3268 struct bgp *bgp;
3269 const char *peer_str;
3270 struct peer *peer;
3271 int ret = 0;
3272
3273 switch (args->event) {
3274 case NB_EV_VALIDATE:
3275 case NB_EV_PREPARE:
3276 case NB_EV_ABORT:
3277 return NB_OK;
3278 case NB_EV_APPLY:
3279 bgp = nb_running_get_entry(args->dnode, NULL, true);
3280 peer_str = yang_dnode_get_string(args->dnode,
3281 "../../remote-address");
3282 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
3283 args->errmsg_len);
3284 if (!peer)
3285 return NB_ERR_INCONSISTENCY;
3286
3287 ret = peer_ebgp_multihop_unset(peer);
3288
3289 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
3290 < 0)
3291 return NB_ERR_INCONSISTENCY;
3292
3293
3294 break;
3295 }
3296
3297 return NB_OK;
3298 }
3299
3300 /*
3301 * XPath:
3302 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/ebgp-multihop/multihop-ttl
3303 */
3304 int bgp_neighbors_neighbor_ebgp_multihop_multihop_ttl_modify(
3305 struct nb_cb_modify_args *args)
3306 {
3307 struct bgp *bgp;
3308 const char *peer_str;
3309 struct peer *peer;
3310 int ret = 0;
3311 uint8_t ttl = MAXTTL;
3312
3313 switch (args->event) {
3314 case NB_EV_VALIDATE:
3315 case NB_EV_PREPARE:
3316 case NB_EV_ABORT:
3317 return NB_OK;
3318 case NB_EV_APPLY:
3319 bgp = nb_running_get_entry(args->dnode, NULL, true);
3320 peer_str = yang_dnode_get_string(args->dnode,
3321 "../../remote-address");
3322 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
3323 args->errmsg_len);
3324 if (!peer)
3325 return NB_ERR_INCONSISTENCY;
3326
3327 if (peer->conf_if) {
3328 ret = BGP_ERR_INVALID_FOR_DIRECT_PEER;
3329 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len,
3330 ret);
3331 return NB_ERR_INCONSISTENCY;
3332 }
3333
3334 ttl = yang_dnode_get_uint8(args->dnode, NULL);
3335
3336 ret = peer_ebgp_multihop_set(peer, ttl);
3337
3338 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
3339
3340 break;
3341 }
3342
3343 return NB_OK;
3344 }
3345
3346 int bgp_neighbors_neighbor_ebgp_multihop_multihop_ttl_destroy(
3347 struct nb_cb_destroy_args *args)
3348 {
3349 struct bgp *bgp;
3350 const char *peer_str;
3351 struct peer *peer;
3352 int ret = 0;
3353
3354 switch (args->event) {
3355 case NB_EV_VALIDATE:
3356 case NB_EV_PREPARE:
3357 case NB_EV_ABORT:
3358 return NB_OK;
3359 case NB_EV_APPLY:
3360 bgp = nb_running_get_entry(args->dnode, NULL, true);
3361 peer_str = yang_dnode_get_string(args->dnode,
3362 "../../remote-address");
3363 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
3364 args->errmsg_len);
3365 if (!peer)
3366 return NB_ERR_INCONSISTENCY;
3367
3368 ret = peer_ebgp_multihop_unset(peer);
3369
3370 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
3371
3372 break;
3373 }
3374
3375 return NB_OK;
3376 }
3377
3378 /*
3379 * XPath:
3380 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/ebgp-multihop/disable-connected-check
3381 */
3382 int bgp_neighbors_neighbor_ebgp_multihop_disable_connected_check_modify(
3383 struct nb_cb_modify_args *args)
3384 {
3385 struct bgp *bgp;
3386 const char *peer_str;
3387 struct peer *peer;
3388 bool set = false;
3389
3390 switch (args->event) {
3391 case NB_EV_VALIDATE:
3392 case NB_EV_PREPARE:
3393 case NB_EV_ABORT:
3394 return NB_OK;
3395 case NB_EV_APPLY:
3396 bgp = nb_running_get_entry(args->dnode, NULL, true);
3397 peer_str = yang_dnode_get_string(args->dnode,
3398 "../../remote-address");
3399 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
3400 args->errmsg_len);
3401 if (!peer)
3402 return NB_ERR_INCONSISTENCY;
3403
3404 set = yang_dnode_get_bool(args->dnode, NULL);
3405
3406 if (peer_flag_modify_nb(bgp, peer_str, peer,
3407 PEER_FLAG_DISABLE_CONNECTED_CHECK, set,
3408 args->errmsg, args->errmsg_len)
3409 < 0)
3410 return NB_ERR_INCONSISTENCY;
3411
3412 break;
3413 }
3414
3415 return NB_OK;
3416 }
3417
3418 /*
3419 * XPath:
3420 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as
3421 */
3422 void bgp_neighbors_neighbor_local_as_apply_finish(
3423 struct nb_cb_apply_finish_args *args)
3424 {
3425 struct bgp *bgp;
3426 int ret;
3427 as_t as = 0;
3428 const char *peer_str;
3429 struct peer *peer = NULL;
3430 bool no_prepend = 0;
3431 bool replace_as = 0;
3432
3433 bgp = nb_running_get_entry(args->dnode, NULL, true);
3434 peer_str = yang_dnode_get_string(args->dnode, "../remote-address");
3435 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
3436 args->errmsg_len);
3437
3438 if (yang_dnode_exists(args->dnode, "./local-as"))
3439 as = yang_dnode_get_uint32(args->dnode, "./local-as");
3440 if (yang_dnode_exists(args->dnode, "./no-prepend"))
3441 no_prepend = yang_dnode_get_bool(args->dnode, "./no-prepend");
3442 if (yang_dnode_exists(args->dnode, "./no-replace-as"))
3443 replace_as =
3444 yang_dnode_get_bool(args->dnode, "./no-replace-as");
3445
3446 if (!as && !no_prepend && !replace_as)
3447 ret = peer_local_as_unset(peer);
3448 else
3449 ret = peer_local_as_set(peer, as, no_prepend, replace_as);
3450 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
3451 }
3452
3453 /*
3454 * XPath:
3455 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as/local-as
3456 */
3457 int bgp_neighbors_neighbor_local_as_local_as_modify(
3458 struct nb_cb_modify_args *args)
3459 {
3460 switch (args->event) {
3461 case NB_EV_VALIDATE:
3462 case NB_EV_PREPARE:
3463 case NB_EV_ABORT:
3464 case NB_EV_APPLY:
3465 /* TODO: implement me. */
3466 break;
3467 }
3468
3469 return NB_OK;
3470 }
3471
3472 int bgp_neighbors_neighbor_local_as_local_as_destroy(
3473 struct nb_cb_destroy_args *args)
3474 {
3475 struct bgp *bgp;
3476 int ret;
3477 const char *peer_str;
3478 struct peer *peer;
3479
3480 switch (args->event) {
3481 case NB_EV_VALIDATE:
3482 case NB_EV_PREPARE:
3483 case NB_EV_ABORT:
3484 return NB_OK;
3485 case NB_EV_APPLY:
3486 bgp = nb_running_get_entry(args->dnode, NULL, true);
3487 peer_str = yang_dnode_get_string(args->dnode,
3488 "../../remote-address");
3489
3490
3491 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
3492 args->errmsg_len);
3493
3494 ret = peer_local_as_unset(peer);
3495 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
3496 < 0)
3497 return NB_ERR_INCONSISTENCY;
3498
3499
3500 break;
3501 }
3502
3503 return NB_OK;
3504 }
3505
3506 /*
3507 * XPath:
3508 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as/no-prepend
3509 */
3510 int bgp_neighbors_neighbor_local_as_no_prepend_modify(
3511 struct nb_cb_modify_args *args)
3512 {
3513 switch (args->event) {
3514 case NB_EV_VALIDATE:
3515 case NB_EV_PREPARE:
3516 case NB_EV_ABORT:
3517 case NB_EV_APPLY:
3518 /* TODO: implement me. */
3519 break;
3520 }
3521
3522 return NB_OK;
3523 }
3524
3525 int bgp_neighbors_neighbor_local_as_no_prepend_destroy(
3526 struct nb_cb_destroy_args *args)
3527 {
3528 switch (args->event) {
3529 case NB_EV_VALIDATE:
3530 case NB_EV_PREPARE:
3531 case NB_EV_ABORT:
3532 case NB_EV_APPLY:
3533 /* TODO: implement me. */
3534 break;
3535 }
3536
3537 return NB_OK;
3538 }
3539
3540 /*
3541 * XPath:
3542 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as/no-replace-as
3543 */
3544 int bgp_neighbors_neighbor_local_as_no_replace_as_modify(
3545 struct nb_cb_modify_args *args)
3546 {
3547 switch (args->event) {
3548 case NB_EV_VALIDATE:
3549 case NB_EV_PREPARE:
3550 case NB_EV_ABORT:
3551 case NB_EV_APPLY:
3552 /* TODO: implement me. */
3553 break;
3554 }
3555
3556 return NB_OK;
3557 }
3558
3559 /*
3560 * XPath:
3561 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/enable
3562 */
3563 int bgp_neighbors_neighbor_bfd_options_enable_modify(
3564 struct nb_cb_modify_args *args)
3565 {
3566 switch (args->event) {
3567 case NB_EV_VALIDATE:
3568 case NB_EV_PREPARE:
3569 case NB_EV_ABORT:
3570 case NB_EV_APPLY:
3571 /* TODO: implement me. */
3572 break;
3573 }
3574
3575 return NB_OK;
3576 }
3577
3578 /*
3579 * XPath:
3580 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/detect-multiplier
3581 */
3582 int bgp_neighbors_neighbor_bfd_options_detect_multiplier_modify(
3583 struct nb_cb_modify_args *args)
3584 {
3585 switch (args->event) {
3586 case NB_EV_VALIDATE:
3587 case NB_EV_PREPARE:
3588 case NB_EV_ABORT:
3589 case NB_EV_APPLY:
3590 /* TODO: implement me. */
3591 break;
3592 }
3593
3594 return NB_OK;
3595 }
3596
3597 int bgp_neighbors_neighbor_bfd_options_detect_multiplier_destroy(
3598 struct nb_cb_destroy_args *args)
3599 {
3600 switch (args->event) {
3601 case NB_EV_VALIDATE:
3602 case NB_EV_PREPARE:
3603 case NB_EV_ABORT:
3604 case NB_EV_APPLY:
3605 /* TODO: implement me. */
3606 break;
3607 }
3608
3609 return NB_OK;
3610 }
3611
3612 /*
3613 * XPath:
3614 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/required-min-rx
3615 */
3616 int bgp_neighbors_neighbor_bfd_options_required_min_rx_modify(
3617 struct nb_cb_modify_args *args)
3618 {
3619 switch (args->event) {
3620 case NB_EV_VALIDATE:
3621 case NB_EV_PREPARE:
3622 case NB_EV_ABORT:
3623 case NB_EV_APPLY:
3624 /* TODO: implement me. */
3625 break;
3626 }
3627
3628 return NB_OK;
3629 }
3630
3631 int bgp_neighbors_neighbor_bfd_options_required_min_rx_destroy(
3632 struct nb_cb_destroy_args *args)
3633 {
3634 switch (args->event) {
3635 case NB_EV_VALIDATE:
3636 case NB_EV_PREPARE:
3637 case NB_EV_ABORT:
3638 case NB_EV_APPLY:
3639 /* TODO: implement me. */
3640 break;
3641 }
3642
3643 return NB_OK;
3644 }
3645
3646 /*
3647 * XPath:
3648 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/desired-min-tx
3649 */
3650 int bgp_neighbors_neighbor_bfd_options_desired_min_tx_modify(
3651 struct nb_cb_modify_args *args)
3652 {
3653 switch (args->event) {
3654 case NB_EV_VALIDATE:
3655 case NB_EV_PREPARE:
3656 case NB_EV_ABORT:
3657 case NB_EV_APPLY:
3658 /* TODO: implement me. */
3659 break;
3660 }
3661
3662 return NB_OK;
3663 }
3664
3665 int bgp_neighbors_neighbor_bfd_options_desired_min_tx_destroy(
3666 struct nb_cb_destroy_args *args)
3667 {
3668 switch (args->event) {
3669 case NB_EV_VALIDATE:
3670 case NB_EV_PREPARE:
3671 case NB_EV_ABORT:
3672 case NB_EV_APPLY:
3673 /* TODO: implement me. */
3674 break;
3675 }
3676
3677 return NB_OK;
3678 }
3679
3680 /*
3681 * XPath:
3682 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/session-type
3683 */
3684 int bgp_neighbors_neighbor_bfd_options_session_type_modify(
3685 struct nb_cb_modify_args *args)
3686 {
3687 switch (args->event) {
3688 case NB_EV_VALIDATE:
3689 case NB_EV_PREPARE:
3690 case NB_EV_ABORT:
3691 case NB_EV_APPLY:
3692 /* TODO: implement me. */
3693 break;
3694 }
3695
3696 return NB_OK;
3697 }
3698
3699 int bgp_neighbors_neighbor_bfd_options_session_type_destroy(
3700 struct nb_cb_destroy_args *args)
3701 {
3702 switch (args->event) {
3703 case NB_EV_VALIDATE:
3704 case NB_EV_PREPARE:
3705 case NB_EV_ABORT:
3706 case NB_EV_APPLY:
3707 /* TODO: implement me. */
3708 break;
3709 }
3710
3711 return NB_OK;
3712 }
3713
3714 /*
3715 * XPath:
3716 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/check-cp-failure
3717 */
3718 int bgp_neighbors_neighbor_bfd_options_check_cp_failure_modify(
3719 struct nb_cb_modify_args *args)
3720 {
3721 switch (args->event) {
3722 case NB_EV_VALIDATE:
3723 case NB_EV_PREPARE:
3724 case NB_EV_ABORT:
3725 case NB_EV_APPLY:
3726 /* TODO: implement me. */
3727 break;
3728 }
3729
3730 return NB_OK;
3731 }
3732
3733 int bgp_neighbors_neighbor_bfd_options_check_cp_failure_destroy(
3734 struct nb_cb_destroy_args *args)
3735 {
3736 switch (args->event) {
3737 case NB_EV_VALIDATE:
3738 case NB_EV_PREPARE:
3739 case NB_EV_ABORT:
3740 case NB_EV_APPLY:
3741 /* TODO: implement me. */
3742 break;
3743 }
3744
3745 return NB_OK;
3746 }
3747
3748 /*
3749 * XPath:
3750 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown
3751 */
3752 void bgp_neighbors_neighbor_admin_shutdown_apply_finish(
3753 struct nb_cb_apply_finish_args *args)
3754 {
3755 struct bgp *bgp;
3756 const char *peer_str;
3757 struct peer *peer;
3758 bool enable = false;
3759 const char *message;
3760
3761 bgp = nb_running_get_entry(args->dnode, NULL, true);
3762 peer_str = yang_dnode_get_string(args->dnode, "../remote-address");
3763 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
3764 args->errmsg_len);
3765
3766 if (yang_dnode_exists(args->dnode, "./message")) {
3767 message = yang_dnode_get_string(args->dnode, "./message");
3768 peer_tx_shutdown_message_set(peer, message);
3769 }
3770 enable = yang_dnode_get_bool(args->dnode, "./enable");
3771
3772 peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_SHUTDOWN, enable,
3773 args->errmsg, args->errmsg_len);
3774 }
3775
3776 /*
3777 * XPath:
3778 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown/enable
3779 */
3780 int bgp_neighbors_neighbor_admin_shutdown_enable_modify(
3781 struct nb_cb_modify_args *args)
3782 {
3783 switch (args->event) {
3784 case NB_EV_VALIDATE:
3785 case NB_EV_PREPARE:
3786 case NB_EV_ABORT:
3787 case NB_EV_APPLY:
3788 /* TODO: implement me. */
3789 break;
3790 }
3791
3792 return NB_OK;
3793 }
3794
3795 int bgp_neighbors_neighbor_admin_shutdown_enable_destroy(
3796 struct nb_cb_destroy_args *args)
3797 {
3798 switch (args->event) {
3799 case NB_EV_VALIDATE:
3800 case NB_EV_PREPARE:
3801 case NB_EV_ABORT:
3802 case NB_EV_APPLY:
3803 /* TODO: implement me. */
3804 break;
3805 }
3806
3807 return NB_OK;
3808 }
3809
3810 /*
3811 * XPath:
3812 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown/message
3813 */
3814 int bgp_neighbors_neighbor_admin_shutdown_message_modify(
3815 struct nb_cb_modify_args *args)
3816 {
3817 switch (args->event) {
3818 case NB_EV_VALIDATE:
3819 case NB_EV_PREPARE:
3820 case NB_EV_ABORT:
3821 case NB_EV_APPLY:
3822 /* TODO: implement me. */
3823 break;
3824 }
3825
3826 return NB_OK;
3827 }
3828
3829 int bgp_neighbors_neighbor_admin_shutdown_message_destroy(
3830 struct nb_cb_destroy_args *args)
3831 {
3832 switch (args->event) {
3833 case NB_EV_VALIDATE:
3834 case NB_EV_PREPARE:
3835 case NB_EV_ABORT:
3836 case NB_EV_APPLY:
3837 /* TODO: implement me. */
3838 break;
3839 }
3840
3841 return NB_OK;
3842 }
3843
3844 /*
3845 * XPath:
3846 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/graceful-restart/enable
3847 */
3848 int bgp_neighbors_neighbor_graceful_restart_enable_modify(
3849 struct nb_cb_modify_args *args)
3850 {
3851 switch (args->event) {
3852 case NB_EV_VALIDATE:
3853 case NB_EV_PREPARE:
3854 case NB_EV_ABORT:
3855 case NB_EV_APPLY:
3856 /* TODO: implement me. */
3857 break;
3858 }
3859
3860 return NB_OK;
3861 }
3862
3863 int bgp_neighbors_neighbor_graceful_restart_enable_destroy(
3864 struct nb_cb_destroy_args *args)
3865 {
3866 switch (args->event) {
3867 case NB_EV_VALIDATE:
3868 case NB_EV_PREPARE:
3869 case NB_EV_ABORT:
3870 case NB_EV_APPLY:
3871 /* TODO: implement me. */
3872 break;
3873 }
3874
3875 return NB_OK;
3876 }
3877
3878 /*
3879 * XPath:
3880 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/graceful-restart/graceful-restart-helper
3881 */
3882 int bgp_neighbors_neighbor_graceful_restart_graceful_restart_helper_modify(
3883 struct nb_cb_modify_args *args)
3884 {
3885 switch (args->event) {
3886 case NB_EV_VALIDATE:
3887 case NB_EV_PREPARE:
3888 case NB_EV_ABORT:
3889 case NB_EV_APPLY:
3890 /* TODO: implement me. */
3891 break;
3892 }
3893
3894 return NB_OK;
3895 }
3896
3897 int bgp_neighbors_neighbor_graceful_restart_graceful_restart_helper_destroy(
3898 struct nb_cb_destroy_args *args)
3899 {
3900 switch (args->event) {
3901 case NB_EV_VALIDATE:
3902 case NB_EV_PREPARE:
3903 case NB_EV_ABORT:
3904 case NB_EV_APPLY:
3905 /* TODO: implement me. */
3906 break;
3907 }
3908
3909 return NB_OK;
3910 }
3911
3912 /*
3913 * XPath:
3914 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/graceful-restart/graceful-restart-disable
3915 */
3916 int bgp_neighbors_neighbor_graceful_restart_graceful_restart_disable_modify(
3917 struct nb_cb_modify_args *args)
3918 {
3919 switch (args->event) {
3920 case NB_EV_VALIDATE:
3921 case NB_EV_PREPARE:
3922 case NB_EV_ABORT:
3923 case NB_EV_APPLY:
3924 /* TODO: implement me. */
3925 break;
3926 }
3927
3928 return NB_OK;
3929 }
3930
3931 int bgp_neighbors_neighbor_graceful_restart_graceful_restart_disable_destroy(
3932 struct nb_cb_destroy_args *args)
3933 {
3934 switch (args->event) {
3935 case NB_EV_VALIDATE:
3936 case NB_EV_PREPARE:
3937 case NB_EV_ABORT:
3938 case NB_EV_APPLY:
3939 /* TODO: implement me. */
3940 break;
3941 }
3942
3943 return NB_OK;
3944 }
3945
3946 /*
3947 * XPath:
3948 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/timers/advertise-interval
3949 */
3950 int bgp_neighbors_neighbor_timers_advertise_interval_modify(
3951 struct nb_cb_modify_args *args)
3952 {
3953 struct bgp *bgp;
3954 const char *peer_str;
3955 struct peer *peer;
3956 uint16_t routeadv;
3957 int ret;
3958
3959 switch (args->event) {
3960 case NB_EV_VALIDATE:
3961 case NB_EV_PREPARE:
3962 case NB_EV_ABORT:
3963 return NB_OK;
3964 case NB_EV_APPLY:
3965 bgp = nb_running_get_entry(args->dnode, NULL, true);
3966 peer_str = yang_dnode_get_string(args->dnode,
3967 "../../remote-address");
3968 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
3969 args->errmsg_len);
3970 routeadv = yang_dnode_get_uint16(args->dnode, NULL);
3971
3972 ret = peer_advertise_interval_set(peer, routeadv);
3973 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
3974 < 0)
3975 return NB_ERR_INCONSISTENCY;
3976
3977 break;
3978 }
3979
3980 return NB_OK;
3981 }
3982
3983 int bgp_neighbors_neighbor_timers_advertise_interval_destroy(
3984 struct nb_cb_destroy_args *args)
3985 {
3986 struct bgp *bgp;
3987 const char *peer_str;
3988 struct peer *peer;
3989 int ret;
3990
3991 switch (args->event) {
3992 case NB_EV_VALIDATE:
3993 case NB_EV_PREPARE:
3994 case NB_EV_ABORT:
3995 return NB_OK;
3996 case NB_EV_APPLY:
3997 bgp = nb_running_get_entry(args->dnode, NULL, true);
3998 peer_str = yang_dnode_get_string(args->dnode,
3999 "../../remote-address");
4000 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
4001 args->errmsg_len);
4002
4003 ret = peer_advertise_interval_unset(peer);
4004 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
4005 < 0)
4006 return NB_ERR_INCONSISTENCY;
4007
4008 break;
4009 }
4010
4011 return NB_OK;
4012 }
4013
4014 /*
4015 * XPath:
4016 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/timers/connect-time
4017 */
4018 int bgp_neighbors_neighbor_timers_connect_time_modify(
4019 struct nb_cb_modify_args *args)
4020 {
4021 struct bgp *bgp;
4022 const char *peer_str;
4023 struct peer *peer;
4024 uint16_t connect;
4025 int ret;
4026
4027 switch (args->event) {
4028 case NB_EV_VALIDATE:
4029 case NB_EV_PREPARE:
4030 case NB_EV_ABORT:
4031 return NB_OK;
4032 case NB_EV_APPLY:
4033 bgp = nb_running_get_entry(args->dnode, NULL, true);
4034 peer_str = yang_dnode_get_string(args->dnode,
4035 "../../remote-address");
4036 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
4037 args->errmsg_len);
4038 connect = yang_dnode_get_uint16(args->dnode, NULL);
4039
4040 ret = peer_timers_connect_set(peer, connect);
4041 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
4042 < 0)
4043 return NB_ERR_INCONSISTENCY;
4044
4045 break;
4046 }
4047
4048 return NB_OK;
4049 }
4050
4051 int bgp_neighbors_neighbor_timers_connect_time_destroy(
4052 struct nb_cb_destroy_args *args)
4053 {
4054 struct bgp *bgp;
4055 const char *peer_str;
4056 struct peer *peer;
4057 int ret;
4058
4059 switch (args->event) {
4060 case NB_EV_VALIDATE:
4061 case NB_EV_PREPARE:
4062 case NB_EV_ABORT:
4063 return NB_OK;
4064 case NB_EV_APPLY:
4065 bgp = nb_running_get_entry(args->dnode, NULL, true);
4066 peer_str = yang_dnode_get_string(args->dnode,
4067 "../../remote-address");
4068 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
4069 args->errmsg_len);
4070
4071 ret = peer_timers_connect_unset(peer);
4072 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
4073 < 0)
4074 return NB_ERR_INCONSISTENCY;
4075
4076 break;
4077 }
4078
4079 return NB_OK;
4080 }
4081
4082 /*
4083 * XPath:
4084 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/timers/hold-time
4085 */
4086 int bgp_neighbors_neighbor_timers_hold_time_modify(
4087 struct nb_cb_modify_args *args)
4088 {
4089 struct bgp *bgp;
4090 const char *peer_str;
4091 struct peer *peer;
4092 uint16_t keepalive = 0;
4093 uint16_t holdtime = 0;
4094 int ret = 0;
4095
4096 switch (args->event) {
4097 case NB_EV_VALIDATE:
4098 case NB_EV_PREPARE:
4099 case NB_EV_ABORT:
4100 return NB_OK;
4101 case NB_EV_APPLY:
4102 bgp = nb_running_get_entry(args->dnode, NULL, true);
4103 peer_str = yang_dnode_get_string(args->dnode,
4104 "../../remote-address");
4105 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
4106 args->errmsg_len);
4107 keepalive = yang_dnode_get_uint16(args->dnode, "../keepalive");
4108 holdtime = yang_dnode_get_uint16(args->dnode, NULL);
4109
4110 if (keepalive != BGP_DEFAULT_KEEPALIVE
4111 && holdtime != BGP_DEFAULT_HOLDTIME) {
4112 ret = peer_timers_set(peer, keepalive, holdtime);
4113 } else
4114 ret = peer_timers_unset(peer);
4115
4116 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
4117 < 0)
4118 return NB_ERR_INCONSISTENCY;
4119
4120 break;
4121 }
4122
4123 return NB_OK;
4124 }
4125
4126 /*
4127 * XPath:
4128 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/timers/keepalive
4129 */
4130 int bgp_neighbors_neighbor_timers_keepalive_modify(
4131 struct nb_cb_modify_args *args)
4132 {
4133 struct bgp *bgp;
4134 const char *peer_str;
4135 struct peer *peer;
4136 uint16_t keepalive = 0, curr_keep = 0;
4137 uint16_t holdtime = 0;
4138 int ret = 0;
4139
4140 switch (args->event) {
4141 case NB_EV_VALIDATE:
4142 case NB_EV_PREPARE:
4143 case NB_EV_ABORT:
4144 return NB_OK;
4145 case NB_EV_APPLY:
4146 bgp = nb_running_get_entry(args->dnode, NULL, true);
4147 peer_str = yang_dnode_get_string(args->dnode,
4148 "../../remote-address");
4149 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
4150 args->errmsg_len);
4151 keepalive = yang_dnode_get_uint16(args->dnode, NULL);
4152 holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time");
4153
4154 if (keepalive != BGP_DEFAULT_KEEPALIVE
4155 && holdtime != BGP_DEFAULT_HOLDTIME) {
4156 if (peer->holdtime == holdtime) {
4157 curr_keep = (keepalive < holdtime / 3
4158 ? keepalive
4159 : holdtime / 3);
4160 if (curr_keep == keepalive)
4161 return NB_OK;
4162 }
4163 ret = peer_timers_set(peer, keepalive, holdtime);
4164 } else
4165 ret = peer_timers_unset(peer);
4166
4167 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
4168 < 0)
4169 return NB_ERR_INCONSISTENCY;
4170
4171 break;
4172 }
4173
4174 return NB_OK;
4175 }
4176
4177 /*
4178 * XPath:
4179 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi
4180 */
4181 int bgp_neighbors_neighbor_afi_safis_afi_safi_create(
4182 struct nb_cb_create_args *args)
4183 {
4184 switch (args->event) {
4185 case NB_EV_VALIDATE:
4186 case NB_EV_PREPARE:
4187 case NB_EV_ABORT:
4188 case NB_EV_APPLY:
4189 /* TODO: implement me. */
4190 break;
4191 }
4192
4193 return NB_OK;
4194 }
4195
4196 int bgp_neighbors_neighbor_afi_safis_afi_safi_destroy(
4197 struct nb_cb_destroy_args *args)
4198 {
4199 switch (args->event) {
4200 case NB_EV_VALIDATE:
4201 case NB_EV_PREPARE:
4202 case NB_EV_ABORT:
4203 case NB_EV_APPLY:
4204 /* TODO: implement me. */
4205 break;
4206 }
4207
4208 return NB_OK;
4209 }
4210
4211 /*
4212 * XPath:
4213 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/enabled
4214 */
4215 int bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_modify(
4216 struct nb_cb_modify_args *args)
4217 {
4218 struct bgp *bgp;
4219 const char *peer_str;
4220 const char *af_name;
4221 afi_t afi;
4222 safi_t safi;
4223 bool activate = false;
4224 int ret = 0;
4225 union sockunion su;
4226 struct peer *peer;
4227
4228 switch (args->event) {
4229 case NB_EV_VALIDATE:
4230 case NB_EV_PREPARE:
4231 case NB_EV_ABORT:
4232 return NB_OK;
4233 case NB_EV_APPLY:
4234 bgp = nb_running_get_entry(args->dnode, NULL, true);
4235 af_name =
4236 yang_dnode_get_string(args->dnode, "../afi-safi-name");
4237 yang_afi_safi_identity2value(af_name, &afi, &safi);
4238 peer_str = yang_dnode_get_string(args->dnode,
4239 "../../../remote-address");
4240 str2sockunion(peer_str, &su);
4241 peer = peer_lookup(bgp, &su);
4242
4243 activate = yang_dnode_get_bool(args->dnode, NULL);
4244
4245 if (activate)
4246 ret = peer_activate(peer, afi, safi);
4247 else
4248 ret = peer_deactivate(peer, afi, safi);
4249
4250 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
4251
4252 break;
4253 }
4254
4255 return NB_OK;
4256 }
4257
4258 int bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_destroy(
4259 struct nb_cb_destroy_args *args)
4260 {
4261 switch (args->event) {
4262 case NB_EV_VALIDATE:
4263 case NB_EV_PREPARE:
4264 case NB_EV_ABORT:
4265 case NB_EV_APPLY:
4266 /* TODO: implement me. */
4267 break;
4268 }
4269
4270 return NB_OK;
4271 }
4272
4273 static struct peer *bgp_unnumbered_neighbor_peer_lookup(struct bgp *bgp,
4274 const char *peer_str,
4275 char *errmsg,
4276 size_t errmsg_len)
4277 {
4278 struct peer *peer = NULL;
4279
4280 /* Not IP, could match either peer configured on interface or a
4281 * group. */
4282 peer = peer_lookup_by_conf_if(bgp, peer_str);
4283 if (!peer) {
4284 snprintf(errmsg, errmsg_len,
4285 "Specify remote-as or peer-group commands first");
4286 return NULL;
4287 }
4288 if (peer_dynamic_neighbor(peer)) {
4289 snprintf(errmsg, errmsg_len,
4290 "Operation not allowed on a dynamic neighbor\n");
4291 return NULL;
4292 }
4293
4294 return peer;
4295 }
4296
4297 /*
4298 * XPath:
4299 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor
4300 */
4301 int bgp_neighbors_unnumbered_neighbor_create(struct nb_cb_create_args *args)
4302 {
4303 struct bgp *bgp;
4304 const char *peer_str;
4305 const char *peer_grp_str = NULL;
4306 bool v6_only = false;
4307 int as_type = AS_UNSPECIFIED;
4308 as_t as = 0;
4309 char prgrp_xpath[XPATH_MAXLEN];
4310 const struct lyd_node *bgp_dnode;
4311
4312 switch (args->event) {
4313 case NB_EV_VALIDATE:
4314 peer_str = yang_dnode_get_string(args->dnode, "./interface");
4315 bgp_dnode = yang_dnode_get_parent(args->dnode, "bgp");
4316 snprintf(prgrp_xpath, sizeof(prgrp_xpath),
4317 FRR_BGP_PEER_GROUP_XPATH, peer_str, "");
4318
4319 if (yang_dnode_exists(bgp_dnode, prgrp_xpath)) {
4320 snprintf(args->errmsg, args->errmsg_len,
4321 "Name conflict with peer-group: %s", peer_str);
4322 return NB_ERR_VALIDATION;
4323 }
4324
4325 break;
4326 case NB_EV_PREPARE:
4327 case NB_EV_ABORT:
4328 return NB_OK;
4329 case NB_EV_APPLY:
4330 bgp = nb_running_get_entry(args->dnode, NULL, true);
4331 peer_str = yang_dnode_get_string(args->dnode, "./interface");
4332
4333 if (yang_dnode_exists(args->dnode, "./peer-group"))
4334 peer_grp_str = yang_dnode_get_string(args->dnode,
4335 "./peer-group");
4336
4337 if (yang_dnode_exists(args->dnode, "./v6-only"))
4338 v6_only = yang_dnode_get_bool(args->dnode, "./v6-only");
4339
4340 if (yang_dnode_exists(args->dnode,
4341 "./neighbor-remote-as/remote-as-type")) {
4342 as_type = yang_dnode_get_enum(
4343 args->dnode,
4344 "./neighbor-remote-as/remote-as-type");
4345 if (yang_dnode_exists(args->dnode,
4346 "./neighbor-remote-as/remote-as"))
4347 as = yang_dnode_get_uint32(
4348 args->dnode,
4349 "./neighbor-remote-as/remote-as");
4350 }
4351
4352 if (peer_conf_interface_create(bgp, peer_str, AFI_IP,
4353 SAFI_UNICAST, v6_only,
4354 peer_grp_str, as_type, as,
4355 args->errmsg, args->errmsg_len))
4356 return NB_ERR_INCONSISTENCY;
4357
4358 break;
4359 }
4360
4361 return NB_OK;
4362 }
4363
4364 int bgp_neighbors_unnumbered_neighbor_destroy(struct nb_cb_destroy_args *args)
4365 {
4366 struct bgp *bgp;
4367 const char *peer_str;
4368 struct peer *peer;
4369
4370 switch (args->event) {
4371 case NB_EV_VALIDATE:
4372 case NB_EV_PREPARE:
4373 case NB_EV_ABORT:
4374 return NB_OK;
4375 case NB_EV_APPLY:
4376 bgp = nb_running_get_entry(args->dnode, NULL, true);
4377
4378 peer_str = yang_dnode_get_string(args->dnode, "./interface");
4379 /* look up for neighbor by interface name config. */
4380 peer = peer_lookup_by_conf_if(bgp, peer_str);
4381 if (peer) {
4382 /* Request zebra to terminate IPv6 RAs on this
4383 * interface. */
4384 if (peer->ifp)
4385 bgp_zebra_terminate_radv(peer->bgp, peer);
4386 peer_notify_unconfig(peer);
4387 peer_delete(peer);
4388 } else {
4389 snprintf(args->errmsg, args->errmsg_len,
4390 "Create the peer-group first");
4391 return NB_ERR_INCONSISTENCY;
4392 }
4393
4394 break;
4395 }
4396
4397 return NB_OK;
4398 }
4399
4400 /*
4401 * XPath:
4402 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/v6only
4403 */
4404 int bgp_neighbors_unnumbered_neighbor_v6only_modify(
4405 struct nb_cb_modify_args *args)
4406 {
4407 struct bgp *bgp;
4408 const char *peer_str;
4409 bool v6_only = false;
4410
4411 switch (args->event) {
4412 case NB_EV_VALIDATE:
4413 case NB_EV_PREPARE:
4414 case NB_EV_ABORT:
4415 return NB_OK;
4416 case NB_EV_APPLY:
4417 bgp = nb_running_get_entry(args->dnode, NULL, true);
4418 peer_str = yang_dnode_get_string(args->dnode, "../interface");
4419
4420 v6_only = yang_dnode_get_bool(args->dnode, NULL);
4421
4422 if (peer_conf_interface_create(
4423 bgp, peer_str, AFI_IP, SAFI_UNICAST, v6_only, NULL,
4424 AS_UNSPECIFIED, 0, args->errmsg, args->errmsg_len))
4425 return NB_ERR_INCONSISTENCY;
4426
4427 break;
4428 }
4429
4430 return NB_OK;
4431 }
4432
4433 /*
4434 * XPath:
4435 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/peer-group
4436 */
4437 int bgp_neighbors_unnumbered_neighbor_peer_group_modify(
4438 struct nb_cb_modify_args *args)
4439 {
4440 struct bgp *bgp;
4441 const char *peer_str;
4442 const char *peer_grp_str;
4443 struct peer *peer;
4444 struct peer_group *group;
4445 union sockunion su;
4446 as_t as;
4447 int ret = 0;
4448 char prgrp_xpath[XPATH_MAXLEN];
4449 const struct lyd_node *bgp_dnode;
4450
4451 switch (args->event) {
4452 case NB_EV_VALIDATE:
4453 peer_grp_str = yang_dnode_get_string(args->dnode, NULL);
4454 bgp_dnode = yang_dnode_get_parent(args->dnode, "bgp");
4455 snprintf(prgrp_xpath, sizeof(prgrp_xpath),
4456 FRR_BGP_PEER_GROUP_XPATH, peer_grp_str, "");
4457
4458 if (!yang_dnode_exists(bgp_dnode, prgrp_xpath)) {
4459 snprintf(args->errmsg, args->errmsg_len,
4460 "Configure the peer-group first %s",
4461 peer_grp_str);
4462 return NB_ERR_VALIDATION;
4463 }
4464
4465 break;
4466 case NB_EV_PREPARE:
4467 case NB_EV_ABORT:
4468 return NB_OK;
4469 case NB_EV_APPLY:
4470 bgp = nb_running_get_entry(args->dnode, NULL, true);
4471 peer_str = yang_dnode_get_string(args->dnode, "../interface");
4472 peer = bgp_unnumbered_neighbor_peer_lookup(
4473 bgp, peer_str, args->errmsg, args->errmsg_len);
4474
4475 peer_grp_str = yang_dnode_get_string(args->dnode, NULL);
4476 group = peer_group_lookup(bgp, peer_grp_str);
4477 if (!group) {
4478 snprintf(args->errmsg, args->errmsg_len,
4479 "Configure the peer-group first\n");
4480 return NB_ERR_INCONSISTENCY;
4481 }
4482
4483 ret = peer_group_bind(bgp, &su, peer, group, &as);
4484 if (ret == BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT) {
4485 snprintf(
4486 args->errmsg, args->errmsg_len,
4487 "Peer with AS %u cannot be in this peer-group, members must be all internal or all external\n",
4488 as);
4489 return NB_ERR_INCONSISTENCY;
4490 }
4491
4492 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
4493
4494 break;
4495 }
4496
4497 return NB_OK;
4498 }
4499
4500 int bgp_neighbors_unnumbered_neighbor_peer_group_destroy(
4501 struct nb_cb_destroy_args *args)
4502 {
4503 struct bgp *bgp;
4504 const char *peer_str;
4505 struct peer *peer;
4506 int ret;
4507
4508 switch (args->event) {
4509 case NB_EV_VALIDATE:
4510 case NB_EV_PREPARE:
4511 case NB_EV_ABORT:
4512 return NB_OK;
4513 case NB_EV_APPLY:
4514 bgp = nb_running_get_entry(args->dnode, NULL, true);
4515 peer_str =
4516 yang_dnode_get_string(args->dnode, "../remote-address");
4517 peer = bgp_unnumbered_neighbor_peer_lookup(
4518 bgp, peer_str, args->errmsg, args->errmsg_len);
4519
4520 if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE))
4521 bgp_zebra_terminate_radv(peer->bgp, peer);
4522
4523 peer_notify_unconfig(peer);
4524 ret = peer_delete(peer);
4525
4526 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
4527 < 0)
4528 return NB_ERR_INCONSISTENCY;
4529
4530 break;
4531 }
4532
4533 return NB_OK;
4534 }
4535
4536 /*
4537 * XPath:
4538 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/password
4539 */
4540 int bgp_neighbors_unnumbered_neighbor_password_modify(
4541 struct nb_cb_modify_args *args)
4542 {
4543 struct bgp *bgp;
4544 const char *peer_str;
4545 const char *passwrd_str;
4546 struct peer *peer = NULL;
4547
4548 switch (args->event) {
4549 case NB_EV_VALIDATE:
4550 case NB_EV_PREPARE:
4551 case NB_EV_ABORT:
4552 return NB_OK;
4553 case NB_EV_APPLY:
4554 bgp = nb_running_get_entry(args->dnode, NULL, true);
4555 peer_str = yang_dnode_get_string(args->dnode, "../interface");
4556 peer = bgp_unnumbered_neighbor_peer_lookup(
4557 bgp, peer_str, args->errmsg, args->errmsg_len);
4558 if (!peer)
4559 return NB_ERR_INCONSISTENCY;
4560
4561 passwrd_str = yang_dnode_get_string(args->dnode, NULL);
4562 peer_password_set(peer, passwrd_str);
4563
4564 break;
4565 }
4566
4567 return NB_OK;
4568 }
4569
4570 int bgp_neighbors_unnumbered_neighbor_password_destroy(
4571 struct nb_cb_destroy_args *args)
4572 {
4573 struct bgp *bgp;
4574 const char *peer_str;
4575 struct peer *peer = NULL;
4576
4577 switch (args->event) {
4578 case NB_EV_VALIDATE:
4579 case NB_EV_PREPARE:
4580 case NB_EV_ABORT:
4581 return NB_OK;
4582 case NB_EV_APPLY:
4583 bgp = nb_running_get_entry(args->dnode, NULL, true);
4584 peer_str = yang_dnode_get_string(args->dnode, "../interface");
4585 peer = bgp_unnumbered_neighbor_peer_lookup(
4586 bgp, peer_str, args->errmsg, args->errmsg_len);
4587 if (!peer)
4588 return NB_ERR_INCONSISTENCY;
4589
4590 peer_password_unset(peer);
4591
4592 break;
4593 }
4594
4595 return NB_OK;
4596 }
4597
4598 /*
4599 * XPath:
4600 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/ttl-security
4601 */
4602 int bgp_neighbors_unnumbered_neighbor_ttl_security_modify(
4603 struct nb_cb_modify_args *args)
4604 {
4605 struct bgp *bgp;
4606 const char *peer_str;
4607 struct peer *peer;
4608 int ret;
4609 uint8_t gtsm_hops;
4610
4611 switch (args->event) {
4612 case NB_EV_VALIDATE:
4613 case NB_EV_PREPARE:
4614 case NB_EV_ABORT:
4615 return NB_OK;
4616 case NB_EV_APPLY:
4617 bgp = nb_running_get_entry(args->dnode, NULL, true);
4618 peer_str = yang_dnode_get_string(args->dnode, "../interface");
4619 peer = bgp_unnumbered_neighbor_peer_lookup(
4620 bgp, peer_str, args->errmsg, args->errmsg_len);
4621 if (!peer)
4622 return NB_ERR_INCONSISTENCY;
4623
4624 gtsm_hops = yang_dnode_get_uint8(args->dnode, NULL);
4625 /*
4626 * If 'neighbor swpX', then this is for directly connected
4627 * peers, we should not accept a ttl-security hops value greater
4628 * than 1.
4629 */
4630 if (peer->conf_if && (gtsm_hops > BGP_GTSM_HOPS_CONNECTED)) {
4631 snprintf(
4632 args->errmsg, args->errmsg_len,
4633 "%d is directly connected peer, hops cannot exceed 1\n",
4634 gtsm_hops);
4635 return NB_ERR_INCONSISTENCY;
4636 }
4637
4638 ret = peer_ttl_security_hops_set(peer, gtsm_hops);
4639 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
4640 < 0)
4641 return NB_ERR_INCONSISTENCY;
4642
4643 break;
4644 }
4645
4646 return NB_OK;
4647 }
4648
4649 int bgp_neighbors_unnumbered_neighbor_ttl_security_destroy(
4650 struct nb_cb_destroy_args *args)
4651 {
4652 struct bgp *bgp;
4653 const char *peer_str;
4654 struct peer *peer;
4655 int ret;
4656
4657 switch (args->event) {
4658 case NB_EV_VALIDATE:
4659 case NB_EV_PREPARE:
4660 case NB_EV_ABORT:
4661 return NB_OK;
4662 case NB_EV_APPLY:
4663 bgp = nb_running_get_entry(args->dnode, NULL, true);
4664 peer_str = yang_dnode_get_string(args->dnode, "../interface");
4665 peer = bgp_unnumbered_neighbor_peer_lookup(
4666 bgp, peer_str, args->errmsg, args->errmsg_len);
4667 if (!peer)
4668 return NB_ERR_INCONSISTENCY;
4669
4670 ret = peer_ttl_security_hops_unset(peer);
4671 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
4672
4673 break;
4674 }
4675
4676 return NB_OK;
4677 }
4678
4679 /*
4680 * XPath:
4681 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/solo
4682 */
4683 int bgp_neighbors_unnumbered_neighbor_solo_modify(
4684 struct nb_cb_modify_args *args)
4685 {
4686 switch (args->event) {
4687 case NB_EV_VALIDATE:
4688 case NB_EV_PREPARE:
4689 case NB_EV_ABORT:
4690 case NB_EV_APPLY:
4691 /* TODO: implement me. */
4692 break;
4693 }
4694
4695 return NB_OK;
4696 }
4697
4698 /*
4699 * XPath:
4700 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/enforce-first-as
4701 */
4702 int bgp_neighbors_unnumbered_neighbor_enforce_first_as_modify(
4703 struct nb_cb_modify_args *args)
4704 {
4705 struct bgp *bgp;
4706 const char *peer_str;
4707 struct peer *peer;
4708 bool enable = false;
4709
4710 switch (args->event) {
4711 case NB_EV_VALIDATE:
4712 case NB_EV_PREPARE:
4713 case NB_EV_ABORT:
4714 return NB_OK;
4715 case NB_EV_APPLY:
4716 bgp = nb_running_get_entry(args->dnode, NULL, true);
4717 peer_str = yang_dnode_get_string(args->dnode, "../interface");
4718 peer = bgp_unnumbered_neighbor_peer_lookup(
4719 bgp, peer_str, args->errmsg, args->errmsg_len);
4720
4721 enable = yang_dnode_get_bool(args->dnode, NULL);
4722
4723 peer_flag_modify_nb(bgp, peer_str, peer,
4724 PEER_FLAG_ENFORCE_FIRST_AS, enable,
4725 args->errmsg, args->errmsg_len);
4726
4727 break;
4728 }
4729
4730 return NB_OK;
4731 }
4732
4733 /*
4734 * XPath:
4735 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/description
4736 */
4737 int bgp_neighbors_unnumbered_neighbor_description_modify(
4738 struct nb_cb_modify_args *args)
4739 {
4740 struct bgp *bgp;
4741 const char *peer_str;
4742 const char *desc_str;
4743 struct peer *peer = NULL;
4744
4745 switch (args->event) {
4746 case NB_EV_VALIDATE:
4747 case NB_EV_PREPARE:
4748 case NB_EV_ABORT:
4749 return NB_OK;
4750 case NB_EV_APPLY:
4751 bgp = nb_running_get_entry(args->dnode, NULL, true);
4752 peer_str = yang_dnode_get_string(args->dnode, "../interface");
4753
4754 peer = bgp_unnumbered_neighbor_peer_lookup(
4755 bgp, peer_str, args->errmsg, args->errmsg_len);
4756 if (!peer)
4757 return NB_ERR_INCONSISTENCY;
4758
4759 desc_str = yang_dnode_get_string(args->dnode, NULL);
4760
4761 peer_description_set(peer, desc_str);
4762
4763 break;
4764 }
4765
4766 return NB_OK;
4767 }
4768
4769 int bgp_neighbors_unnumbered_neighbor_description_destroy(
4770 struct nb_cb_destroy_args *args)
4771 {
4772 struct bgp *bgp;
4773 const char *peer_str;
4774 struct peer *peer = NULL;
4775
4776 switch (args->event) {
4777 case NB_EV_VALIDATE:
4778 case NB_EV_PREPARE:
4779 case NB_EV_ABORT:
4780 return NB_OK;
4781 case NB_EV_APPLY:
4782 bgp = nb_running_get_entry(args->dnode, NULL, true);
4783 peer_str = yang_dnode_get_string(args->dnode, "../interface");
4784
4785 peer = bgp_unnumbered_neighbor_peer_lookup(
4786 bgp, peer_str, args->errmsg, args->errmsg_len);
4787 if (!peer)
4788 return NB_ERR_INCONSISTENCY;
4789
4790 peer_description_unset(peer);
4791
4792 break;
4793 }
4794
4795 return NB_OK;
4796 }
4797
4798 /*
4799 * XPath:
4800 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/passive-mode
4801 */
4802 int bgp_neighbors_unnumbered_neighbor_passive_mode_modify(
4803 struct nb_cb_modify_args *args)
4804 {
4805 struct bgp *bgp;
4806 const char *peer_str;
4807 struct peer *peer;
4808 bool set = false;
4809
4810 switch (args->event) {
4811 case NB_EV_VALIDATE:
4812 case NB_EV_PREPARE:
4813 case NB_EV_ABORT:
4814 return NB_OK;
4815 case NB_EV_APPLY:
4816 bgp = nb_running_get_entry(args->dnode, NULL, true);
4817 peer_str = yang_dnode_get_string(args->dnode, "../interface");
4818 peer = bgp_unnumbered_neighbor_peer_lookup(
4819 bgp, peer_str, args->errmsg, args->errmsg_len);
4820 if (!peer)
4821 return NB_ERR_INCONSISTENCY;
4822
4823 set = yang_dnode_get_bool(args->dnode, NULL);
4824
4825 if (peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_PASSIVE,
4826 set, args->errmsg, args->errmsg_len)
4827 < 0)
4828 return NB_ERR_INCONSISTENCY;
4829
4830 break;
4831 }
4832
4833 return NB_OK;
4834 }
4835
4836 /*
4837 * XPath:
4838 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/dynamic-capability
4839 */
4840 int bgp_neighbors_unnumbered_neighbor_capability_options_dynamic_capability_modify(
4841 struct nb_cb_modify_args *args)
4842 {
4843 struct bgp *bgp;
4844 const char *peer_str;
4845 struct peer *peer;
4846 bool enable = false;
4847
4848 switch (args->event) {
4849 case NB_EV_VALIDATE:
4850 case NB_EV_PREPARE:
4851 case NB_EV_ABORT:
4852 return NB_OK;
4853 case NB_EV_APPLY:
4854 bgp = nb_running_get_entry(args->dnode, NULL, true);
4855 peer_str =
4856 yang_dnode_get_string(args->dnode, "../../interface");
4857 peer = bgp_unnumbered_neighbor_peer_lookup(
4858 bgp, peer_str, args->errmsg, args->errmsg_len);
4859 if (!peer)
4860 return NB_ERR_INCONSISTENCY;
4861
4862 enable = yang_dnode_get_bool(args->dnode, NULL);
4863
4864 peer_flag_modify_nb(bgp, peer_str, peer,
4865 PEER_FLAG_DYNAMIC_CAPABILITY, enable,
4866 args->errmsg, args->errmsg_len);
4867
4868 break;
4869 }
4870
4871 return NB_OK;
4872 }
4873
4874 /*
4875 * XPath:
4876 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/strict-capability
4877 */
4878 int bgp_neighbors_unnumbered_neighbor_capability_options_strict_capability_modify(
4879 struct nb_cb_modify_args *args)
4880 {
4881 struct bgp *bgp;
4882 const char *peer_str;
4883 struct peer *peer;
4884 bool enable = false;
4885
4886 switch (args->event) {
4887 case NB_EV_VALIDATE:
4888 case NB_EV_PREPARE:
4889 case NB_EV_ABORT:
4890 return NB_OK;
4891 case NB_EV_APPLY:
4892 bgp = nb_running_get_entry(args->dnode, NULL, true);
4893 peer_str =
4894 yang_dnode_get_string(args->dnode, "../../interface");
4895 peer = bgp_unnumbered_neighbor_peer_lookup(
4896 bgp, peer_str, args->errmsg, args->errmsg_len);
4897 if (!peer)
4898 return NB_ERR_INCONSISTENCY;
4899
4900 enable = yang_dnode_get_bool(args->dnode, NULL);
4901
4902 peer_flag_modify_nb(bgp, peer_str, peer,
4903 PEER_FLAG_STRICT_CAP_MATCH, enable,
4904 args->errmsg, args->errmsg_len);
4905
4906 break;
4907 }
4908
4909 return NB_OK;
4910 }
4911
4912 /*
4913 * XPath:
4914 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/extended-nexthop-capability
4915 */
4916 int bgp_neighbors_unnumbered_neighbor_capability_options_extended_nexthop_capability_modify(
4917 struct nb_cb_modify_args *args)
4918 {
4919 struct bgp *bgp;
4920 const char *peer_str;
4921 struct peer *peer;
4922 bool enable = false;
4923
4924 switch (args->event) {
4925 case NB_EV_VALIDATE:
4926 case NB_EV_PREPARE:
4927 case NB_EV_ABORT:
4928 return NB_OK;
4929 case NB_EV_APPLY:
4930 bgp = nb_running_get_entry(args->dnode, NULL, true);
4931 peer_str =
4932 yang_dnode_get_string(args->dnode, "../../interface");
4933 peer = bgp_unnumbered_neighbor_peer_lookup(
4934 bgp, peer_str, args->errmsg, args->errmsg_len);
4935 if (!peer)
4936 return NB_ERR_INCONSISTENCY;
4937
4938 enable = yang_dnode_get_bool(args->dnode, NULL);
4939
4940 peer_flag_modify_nb(bgp, peer_str, peer,
4941 PEER_FLAG_CAPABILITY_ENHE, enable,
4942 args->errmsg, args->errmsg_len);
4943
4944 break;
4945 }
4946
4947 return NB_OK;
4948 }
4949
4950 /*
4951 * XPath:
4952 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/capability-negotiate
4953 */
4954 int bgp_neighbors_unnumbered_neighbor_capability_options_capability_negotiate_modify(
4955 struct nb_cb_modify_args *args)
4956 {
4957 switch (args->event) {
4958 case NB_EV_VALIDATE:
4959 case NB_EV_PREPARE:
4960 case NB_EV_ABORT:
4961 case NB_EV_APPLY:
4962 /* TODO: implement me. */
4963 break;
4964 }
4965
4966 return NB_OK;
4967 }
4968
4969 /*
4970 * XPath:
4971 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/override-capability
4972 */
4973 int bgp_neighbors_unnumbered_neighbor_capability_options_override_capability_modify(
4974 struct nb_cb_modify_args *args)
4975 {
4976 struct bgp *bgp;
4977 const char *peer_str;
4978 struct peer *peer;
4979 bool enable = false;
4980
4981 switch (args->event) {
4982 case NB_EV_VALIDATE:
4983 case NB_EV_PREPARE:
4984 case NB_EV_ABORT:
4985 return NB_OK;
4986 case NB_EV_APPLY:
4987 bgp = nb_running_get_entry(args->dnode, NULL, true);
4988 peer_str =
4989 yang_dnode_get_string(args->dnode, "../../interface");
4990 peer = bgp_unnumbered_neighbor_peer_lookup(
4991 bgp, peer_str, args->errmsg, args->errmsg_len);
4992
4993 enable = yang_dnode_get_bool(args->dnode, NULL);
4994
4995 peer_flag_modify_nb(bgp, peer_str, peer,
4996 PEER_FLAG_OVERRIDE_CAPABILITY, enable,
4997 args->errmsg, args->errmsg_len);
4998
4999 break;
5000 }
5001
5002 return NB_OK;
5003 }
5004
5005 /*
5006 * XPath:
5007 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/update-source/ip
5008 */
5009 int bgp_neighbors_unnumbered_neighbor_update_source_ip_modify(
5010 struct nb_cb_modify_args *args)
5011 {
5012 struct bgp *bgp;
5013 const char *peer_str, *source_str;
5014 struct peer *peer;
5015 union sockunion su;
5016
5017 switch (args->event) {
5018 case NB_EV_VALIDATE:
5019 case NB_EV_PREPARE:
5020 case NB_EV_ABORT:
5021 return NB_OK;
5022 case NB_EV_APPLY:
5023 bgp = nb_running_get_entry(args->dnode, NULL, true);
5024 peer_str =
5025 yang_dnode_get_string(args->dnode, "../../interface");
5026 peer = bgp_unnumbered_neighbor_peer_lookup(
5027 bgp, peer_str, args->errmsg, args->errmsg_len);
5028 if (!peer)
5029 return NB_ERR_INCONSISTENCY;
5030
5031 source_str = yang_dnode_get_string(args->dnode, NULL);
5032
5033 str2sockunion(source_str, &su);
5034 peer_update_source_addr_set(peer, &su);
5035
5036 break;
5037 }
5038
5039 return NB_OK;
5040 }
5041
5042 int bgp_neighbors_unnumbered_neighbor_update_source_ip_destroy(
5043 struct nb_cb_destroy_args *args)
5044 {
5045 struct bgp *bgp;
5046 const char *peer_str;
5047 struct peer *peer;
5048
5049 switch (args->event) {
5050 case NB_EV_VALIDATE:
5051 case NB_EV_PREPARE:
5052 case NB_EV_ABORT:
5053 return NB_OK;
5054 case NB_EV_APPLY:
5055 bgp = nb_running_get_entry(args->dnode, NULL, true);
5056 peer_str =
5057 yang_dnode_get_string(args->dnode, "../../interface");
5058 peer = bgp_unnumbered_neighbor_peer_lookup(
5059 bgp, peer_str, args->errmsg, args->errmsg_len);
5060 if (!peer)
5061 return NB_ERR_INCONSISTENCY;
5062
5063 peer_update_source_unset(peer);
5064
5065 break;
5066 }
5067
5068 return NB_OK;
5069 }
5070
5071 /*
5072 * XPath:
5073 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/update-source/interface
5074 */
5075 int bgp_neighbors_unnumbered_neighbor_update_source_interface_modify(
5076 struct nb_cb_modify_args *args)
5077 {
5078 struct bgp *bgp;
5079 const char *peer_str, *source_str;
5080 struct peer *peer;
5081 struct prefix p;
5082
5083 switch (args->event) {
5084 case NB_EV_VALIDATE:
5085 source_str = yang_dnode_get_string(args->dnode, NULL);
5086 if (str2prefix(source_str, &p)) {
5087 snprintf(args->errmsg, args->errmsg_len,
5088 "Invalid update-source, remove prefix length");
5089 return NB_ERR_VALIDATION;
5090 }
5091 break;
5092 case NB_EV_PREPARE:
5093 case NB_EV_ABORT:
5094 return NB_OK;
5095 case NB_EV_APPLY:
5096 bgp = nb_running_get_entry(args->dnode, NULL, true);
5097 peer_str =
5098 yang_dnode_get_string(args->dnode, "../../interface");
5099 peer = bgp_unnumbered_neighbor_peer_lookup(
5100 bgp, peer_str, args->errmsg, args->errmsg_len);
5101 if (!peer)
5102 return NB_ERR_INCONSISTENCY;
5103
5104 source_str = yang_dnode_get_string(args->dnode, NULL);
5105
5106 peer_update_source_if_set(peer, source_str);
5107
5108 break;
5109 }
5110
5111 return NB_OK;
5112 }
5113
5114 int bgp_neighbors_unnumbered_neighbor_update_source_interface_destroy(
5115 struct nb_cb_destroy_args *args)
5116 {
5117 struct bgp *bgp;
5118 const char *peer_str;
5119 struct peer *peer;
5120
5121 switch (args->event) {
5122 case NB_EV_VALIDATE:
5123 case NB_EV_PREPARE:
5124 case NB_EV_ABORT:
5125 return NB_OK;
5126 case NB_EV_APPLY:
5127 bgp = nb_running_get_entry(args->dnode, NULL, true);
5128 peer_str =
5129 yang_dnode_get_string(args->dnode, "../../interface");
5130 peer = bgp_unnumbered_neighbor_peer_lookup(
5131 bgp, peer_str, args->errmsg, args->errmsg_len);
5132 if (!peer)
5133 return NB_ERR_INCONSISTENCY;
5134
5135 peer_update_source_unset(peer);
5136
5137 break;
5138 }
5139
5140 return NB_OK;
5141 }
5142
5143 /*
5144 * XPath:
5145 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as
5146 */
5147 void bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_apply_finish(
5148 struct nb_cb_apply_finish_args *args)
5149 {
5150 struct bgp *bgp;
5151 const char *peer_str;
5152 int as_type = AS_SPECIFIED;
5153 int ret;
5154 as_t as = 0;
5155 struct peer *peer = NULL;
5156 afi_t afi = AFI_IP;
5157 safi_t safi = SAFI_UNICAST;
5158
5159 bgp = nb_running_get_entry(args->dnode, NULL, true);
5160 peer_str = yang_dnode_get_string(args->dnode, "../interface");
5161 as_type = yang_dnode_get_enum(args->dnode, "./remote-as-type");
5162 if (yang_dnode_exists(args->dnode, "./remote-as"))
5163 as = yang_dnode_get_uint32(args->dnode, "./remote-as");
5164
5165 peer = peer_lookup_by_conf_if(bgp, peer_str);
5166
5167 ret = peer_remote_as(bgp, NULL, peer_str, &as, as_type, afi, safi);
5168
5169 if (ret < 0 && !peer) {
5170 snprintf(args->errmsg, args->errmsg_len,
5171 "Create the peer-group or interface first");
5172 return;
5173 }
5174
5175 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
5176 }
5177
5178 /*
5179 * XPath:
5180 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as/remote-as-type
5181 */
5182 int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_modify(
5183 struct nb_cb_modify_args *args)
5184 {
5185 switch (args->event) {
5186 case NB_EV_VALIDATE:
5187 case NB_EV_PREPARE:
5188 case NB_EV_ABORT:
5189 case NB_EV_APPLY:
5190 /* TODO: implement me. */
5191 break;
5192 }
5193
5194 return NB_OK;
5195 }
5196
5197 int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_destroy(
5198 struct nb_cb_destroy_args *args)
5199 {
5200 struct bgp *bgp;
5201 const char *peer_str;
5202 struct peer *peer;
5203
5204 switch (args->event) {
5205 case NB_EV_VALIDATE:
5206 case NB_EV_PREPARE:
5207 case NB_EV_ABORT:
5208 return NB_OK;
5209 case NB_EV_APPLY:
5210 bgp = nb_running_get_entry(args->dnode, NULL, true);
5211 peer_str =
5212 yang_dnode_get_string(args->dnode, "../../interface");
5213 peer = peer_lookup_by_conf_if(bgp, peer_str);
5214
5215 /* remote-as set to 0 and as_type to unspecified */
5216 if (peer)
5217 peer_as_change(peer, 0, AS_UNSPECIFIED);
5218
5219 break;
5220 }
5221
5222 return NB_OK;
5223 }
5224
5225 /*
5226 * XPath:
5227 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as/remote-as
5228 */
5229 int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_modify(
5230 struct nb_cb_modify_args *args)
5231 {
5232 switch (args->event) {
5233 case NB_EV_VALIDATE:
5234 case NB_EV_PREPARE:
5235 case NB_EV_ABORT:
5236 case NB_EV_APPLY:
5237 /* TODO: implement me. */
5238 break;
5239 }
5240
5241 return NB_OK;
5242 }
5243
5244 int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_destroy(
5245 struct nb_cb_destroy_args *args)
5246 {
5247 switch (args->event) {
5248 case NB_EV_VALIDATE:
5249 case NB_EV_PREPARE:
5250 case NB_EV_ABORT:
5251 case NB_EV_APPLY:
5252 /* TODO: implement me. */
5253 break;
5254 }
5255
5256 return NB_OK;
5257 }
5258
5259 /*
5260 * XPath:
5261 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/ebgp-multihop/enabled
5262 */
5263 int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_enabled_modify(
5264 struct nb_cb_modify_args *args)
5265 {
5266 struct bgp *bgp;
5267 const char *peer_str;
5268 struct peer *peer;
5269 bool set = false;
5270 int ret = 0;
5271 uint8_t ttl = MAXTTL;
5272
5273 switch (args->event) {
5274 case NB_EV_VALIDATE:
5275 case NB_EV_PREPARE:
5276 case NB_EV_ABORT:
5277 return NB_OK;
5278 case NB_EV_APPLY:
5279 bgp = nb_running_get_entry(args->dnode, NULL, true);
5280 peer_str =
5281 yang_dnode_get_string(args->dnode, "../../interface");
5282 peer = peer_lookup_by_conf_if(bgp, peer_str);
5283 if (!peer)
5284 return NB_ERR_INCONSISTENCY;
5285
5286 if (peer->conf_if) {
5287 ret = BGP_ERR_INVALID_FOR_DIRECT_PEER;
5288 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len,
5289 ret);
5290 return NB_ERR_INCONSISTENCY;
5291 }
5292
5293 set = yang_dnode_get_bool(args->dnode, NULL);
5294
5295 if (set)
5296 ret = peer_ebgp_multihop_set(peer, ttl);
5297 else
5298 ret = peer_ebgp_multihop_unset(peer);
5299
5300 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
5301
5302 break;
5303 }
5304
5305 return NB_OK;
5306 }
5307
5308 int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_enabled_destroy(
5309 struct nb_cb_destroy_args *args)
5310 {
5311 struct bgp *bgp;
5312 const char *peer_str;
5313 struct peer *peer;
5314 int ret = 0;
5315
5316 switch (args->event) {
5317 case NB_EV_VALIDATE:
5318 case NB_EV_PREPARE:
5319 case NB_EV_ABORT:
5320 return NB_OK;
5321 case NB_EV_APPLY:
5322 bgp = nb_running_get_entry(args->dnode, NULL, true);
5323 peer_str =
5324 yang_dnode_get_string(args->dnode, "../../interface");
5325 peer = peer_lookup_by_conf_if(bgp, peer_str);
5326 if (!peer)
5327 return NB_ERR_INCONSISTENCY;
5328
5329 ret = peer_ebgp_multihop_unset(peer);
5330
5331 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
5332
5333 break;
5334 }
5335
5336 return NB_OK;
5337 }
5338
5339 /*
5340 * XPath:
5341 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/ebgp-multihop/multihop-ttl
5342 */
5343 int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_multihop_ttl_modify(
5344 struct nb_cb_modify_args *args)
5345 {
5346 struct bgp *bgp;
5347 const char *peer_str;
5348 struct peer *peer;
5349 int ret = 0;
5350 uint8_t ttl = MAXTTL;
5351
5352 switch (args->event) {
5353 case NB_EV_VALIDATE:
5354 case NB_EV_PREPARE:
5355 case NB_EV_ABORT:
5356 return NB_OK;
5357 case NB_EV_APPLY:
5358 bgp = nb_running_get_entry(args->dnode, NULL, true);
5359 peer_str =
5360 yang_dnode_get_string(args->dnode, "../../interface");
5361 peer = peer_lookup_by_conf_if(bgp, peer_str);
5362 if (!peer)
5363 return NB_ERR_INCONSISTENCY;
5364
5365 if (peer->conf_if) {
5366 ret = BGP_ERR_INVALID_FOR_DIRECT_PEER;
5367 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len,
5368 ret);
5369 return NB_ERR_INCONSISTENCY;
5370 }
5371
5372 ttl = yang_dnode_get_uint8(args->dnode, NULL);
5373
5374 ret = peer_ebgp_multihop_set(peer, ttl);
5375
5376 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
5377
5378 break;
5379 }
5380
5381 return NB_OK;
5382 }
5383
5384 int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_multihop_ttl_destroy(
5385 struct nb_cb_destroy_args *args)
5386 {
5387 struct bgp *bgp;
5388 const char *peer_str;
5389 struct peer *peer;
5390 int ret = 0;
5391
5392 switch (args->event) {
5393 case NB_EV_VALIDATE:
5394 case NB_EV_PREPARE:
5395 case NB_EV_ABORT:
5396 return NB_OK;
5397 case NB_EV_APPLY:
5398 bgp = nb_running_get_entry(args->dnode, NULL, true);
5399 peer_str =
5400 yang_dnode_get_string(args->dnode, "../../interface");
5401 peer = peer_lookup_by_conf_if(bgp, peer_str);
5402 if (!peer)
5403 return NB_ERR_INCONSISTENCY;
5404
5405 ret = peer_ebgp_multihop_unset(peer);
5406
5407 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
5408
5409 break;
5410 }
5411
5412 return NB_OK;
5413 }
5414
5415 /*
5416 * XPath:
5417 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/ebgp-multihop/disable-connected-check
5418 */
5419 int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_disable_connected_check_modify(
5420 struct nb_cb_modify_args *args)
5421 {
5422 struct bgp *bgp;
5423 const char *peer_str;
5424 struct peer *peer;
5425 bool set = false;
5426
5427 switch (args->event) {
5428 case NB_EV_VALIDATE:
5429 case NB_EV_PREPARE:
5430 case NB_EV_ABORT:
5431 return NB_OK;
5432 case NB_EV_APPLY:
5433 bgp = nb_running_get_entry(args->dnode, NULL, true);
5434 peer_str =
5435 yang_dnode_get_string(args->dnode, "../../interface");
5436 peer = peer_lookup_by_conf_if(bgp, peer_str);
5437 if (!peer)
5438 return NB_ERR_INCONSISTENCY;
5439
5440 set = yang_dnode_get_bool(args->dnode, NULL);
5441
5442 if (peer_flag_modify_nb(bgp, peer_str, peer,
5443 PEER_FLAG_DISABLE_CONNECTED_CHECK, set,
5444 args->errmsg, args->errmsg_len)
5445 < 0)
5446 return NB_ERR_INCONSISTENCY;
5447
5448 break;
5449 }
5450
5451 return NB_OK;
5452 }
5453
5454 /*
5455 * XPath:
5456 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as
5457 */
5458 void bgp_neighbors_unnumbered_neighbor_local_as_apply_finish(
5459 struct nb_cb_apply_finish_args *args)
5460 {
5461 struct bgp *bgp;
5462 int ret;
5463 as_t as = 0;
5464 const char *peer_str;
5465 struct peer *peer = NULL;
5466 bool no_prepend = 0;
5467 bool replace_as = 0;
5468
5469 bgp = nb_running_get_entry(args->dnode, NULL, true);
5470 peer_str = yang_dnode_get_string(args->dnode, "../interface");
5471
5472 peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
5473 args->errmsg_len);
5474
5475 if (yang_dnode_exists(args->dnode, "./local-as"))
5476 as = yang_dnode_get_uint32(args->dnode, "./local-as");
5477 if (yang_dnode_exists(args->dnode, "./no-prepend"))
5478 no_prepend = yang_dnode_get_bool(args->dnode, "./no-prepend");
5479 if (yang_dnode_exists(args->dnode, "./no-replace-as"))
5480 replace_as =
5481 yang_dnode_get_bool(args->dnode, "./no-replace-as");
5482
5483 if (!as && !no_prepend && !replace_as)
5484 ret = peer_local_as_unset(peer);
5485 else
5486 ret = peer_local_as_set(peer, as, no_prepend, replace_as);
5487
5488 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
5489 }
5490
5491 /*
5492 * XPath:
5493 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as/local-as
5494 */
5495 int bgp_neighbors_unnumbered_neighbor_local_as_local_as_modify(
5496 struct nb_cb_modify_args *args)
5497 {
5498 switch (args->event) {
5499 case NB_EV_VALIDATE:
5500 case NB_EV_PREPARE:
5501 case NB_EV_ABORT:
5502 case NB_EV_APPLY:
5503 /* TODO: implement me. */
5504 break;
5505 }
5506
5507 return NB_OK;
5508 }
5509
5510 int bgp_neighbors_unnumbered_neighbor_local_as_local_as_destroy(
5511 struct nb_cb_destroy_args *args)
5512 {
5513 switch (args->event) {
5514 case NB_EV_VALIDATE:
5515 case NB_EV_PREPARE:
5516 case NB_EV_ABORT:
5517 case NB_EV_APPLY:
5518 /* TODO: implement me. */
5519 break;
5520 }
5521
5522 return NB_OK;
5523 }
5524
5525 /*
5526 * XPath:
5527 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as/no-prepend
5528 */
5529 int bgp_neighbors_unnumbered_neighbor_local_as_no_prepend_modify(
5530 struct nb_cb_modify_args *args)
5531 {
5532 switch (args->event) {
5533 case NB_EV_VALIDATE:
5534 case NB_EV_PREPARE:
5535 case NB_EV_ABORT:
5536 case NB_EV_APPLY:
5537 /* TODO: implement me. */
5538 break;
5539 }
5540
5541 return NB_OK;
5542 }
5543
5544 int bgp_neighbors_unnumbered_neighbor_local_as_no_prepend_destroy(
5545 struct nb_cb_destroy_args *args)
5546 {
5547 switch (args->event) {
5548 case NB_EV_VALIDATE:
5549 case NB_EV_PREPARE:
5550 case NB_EV_ABORT:
5551 case NB_EV_APPLY:
5552 /* TODO: implement me. */
5553 break;
5554 }
5555
5556 return NB_OK;
5557 }
5558
5559 /*
5560 * XPath:
5561 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as/no-replace-as
5562 */
5563 int bgp_neighbors_unnumbered_neighbor_local_as_no_replace_as_modify(
5564 struct nb_cb_modify_args *args)
5565 {
5566 switch (args->event) {
5567 case NB_EV_VALIDATE:
5568 case NB_EV_PREPARE:
5569 case NB_EV_ABORT:
5570 case NB_EV_APPLY:
5571 /* TODO: implement me. */
5572 break;
5573 }
5574
5575 return NB_OK;
5576 }
5577
5578 /*
5579 * XPath:
5580 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/enable
5581 */
5582 int bgp_neighbors_unnumbered_neighbor_bfd_options_enable_modify(
5583 struct nb_cb_modify_args *args)
5584 {
5585 switch (args->event) {
5586 case NB_EV_VALIDATE:
5587 case NB_EV_PREPARE:
5588 case NB_EV_ABORT:
5589 case NB_EV_APPLY:
5590 /* TODO: implement me. */
5591 break;
5592 }
5593
5594 return NB_OK;
5595 }
5596
5597 /*
5598 * XPath:
5599 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/detect-multiplier
5600 */
5601 int bgp_neighbors_unnumbered_neighbor_bfd_options_detect_multiplier_modify(
5602 struct nb_cb_modify_args *args)
5603 {
5604 switch (args->event) {
5605 case NB_EV_VALIDATE:
5606 case NB_EV_PREPARE:
5607 case NB_EV_ABORT:
5608 case NB_EV_APPLY:
5609 /* TODO: implement me. */
5610 break;
5611 }
5612
5613 return NB_OK;
5614 }
5615
5616 int bgp_neighbors_unnumbered_neighbor_bfd_options_detect_multiplier_destroy(
5617 struct nb_cb_destroy_args *args)
5618 {
5619 switch (args->event) {
5620 case NB_EV_VALIDATE:
5621 case NB_EV_PREPARE:
5622 case NB_EV_ABORT:
5623 case NB_EV_APPLY:
5624 /* TODO: implement me. */
5625 break;
5626 }
5627
5628 return NB_OK;
5629 }
5630
5631 /*
5632 * XPath:
5633 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/required-min-rx
5634 */
5635 int bgp_neighbors_unnumbered_neighbor_bfd_options_required_min_rx_modify(
5636 struct nb_cb_modify_args *args)
5637 {
5638 switch (args->event) {
5639 case NB_EV_VALIDATE:
5640 case NB_EV_PREPARE:
5641 case NB_EV_ABORT:
5642 case NB_EV_APPLY:
5643 /* TODO: implement me. */
5644 break;
5645 }
5646
5647 return NB_OK;
5648 }
5649
5650 int bgp_neighbors_unnumbered_neighbor_bfd_options_required_min_rx_destroy(
5651 struct nb_cb_destroy_args *args)
5652 {
5653 switch (args->event) {
5654 case NB_EV_VALIDATE:
5655 case NB_EV_PREPARE:
5656 case NB_EV_ABORT:
5657 case NB_EV_APPLY:
5658 /* TODO: implement me. */
5659 break;
5660 }
5661
5662 return NB_OK;
5663 }
5664
5665 /*
5666 * XPath:
5667 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/desired-min-tx
5668 */
5669 int bgp_neighbors_unnumbered_neighbor_bfd_options_desired_min_tx_modify(
5670 struct nb_cb_modify_args *args)
5671 {
5672 switch (args->event) {
5673 case NB_EV_VALIDATE:
5674 case NB_EV_PREPARE:
5675 case NB_EV_ABORT:
5676 case NB_EV_APPLY:
5677 /* TODO: implement me. */
5678 break;
5679 }
5680
5681 return NB_OK;
5682 }
5683
5684 int bgp_neighbors_unnumbered_neighbor_bfd_options_desired_min_tx_destroy(
5685 struct nb_cb_destroy_args *args)
5686 {
5687 switch (args->event) {
5688 case NB_EV_VALIDATE:
5689 case NB_EV_PREPARE:
5690 case NB_EV_ABORT:
5691 case NB_EV_APPLY:
5692 /* TODO: implement me. */
5693 break;
5694 }
5695
5696 return NB_OK;
5697 }
5698
5699 /*
5700 * XPath:
5701 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/session-type
5702 */
5703 int bgp_neighbors_unnumbered_neighbor_bfd_options_session_type_modify(
5704 struct nb_cb_modify_args *args)
5705 {
5706 switch (args->event) {
5707 case NB_EV_VALIDATE:
5708 case NB_EV_PREPARE:
5709 case NB_EV_ABORT:
5710 case NB_EV_APPLY:
5711 /* TODO: implement me. */
5712 break;
5713 }
5714
5715 return NB_OK;
5716 }
5717
5718 int bgp_neighbors_unnumbered_neighbor_bfd_options_session_type_destroy(
5719 struct nb_cb_destroy_args *args)
5720 {
5721 switch (args->event) {
5722 case NB_EV_VALIDATE:
5723 case NB_EV_PREPARE:
5724 case NB_EV_ABORT:
5725 case NB_EV_APPLY:
5726 /* TODO: implement me. */
5727 break;
5728 }
5729
5730 return NB_OK;
5731 }
5732
5733 /*
5734 * XPath:
5735 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/check-cp-failure
5736 */
5737 int bgp_neighbors_unnumbered_neighbor_bfd_options_check_cp_failure_modify(
5738 struct nb_cb_modify_args *args)
5739 {
5740 switch (args->event) {
5741 case NB_EV_VALIDATE:
5742 case NB_EV_PREPARE:
5743 case NB_EV_ABORT:
5744 case NB_EV_APPLY:
5745 /* TODO: implement me. */
5746 break;
5747 }
5748
5749 return NB_OK;
5750 }
5751
5752 int bgp_neighbors_unnumbered_neighbor_bfd_options_check_cp_failure_destroy(
5753 struct nb_cb_destroy_args *args)
5754 {
5755 switch (args->event) {
5756 case NB_EV_VALIDATE:
5757 case NB_EV_PREPARE:
5758 case NB_EV_ABORT:
5759 case NB_EV_APPLY:
5760 /* TODO: implement me. */
5761 break;
5762 }
5763
5764 return NB_OK;
5765 }
5766
5767 /*
5768 * XPath:
5769 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown
5770 */
5771 void bgp_neighbors_unnumbered_neighbor_admin_shutdown_apply_finish(
5772 struct nb_cb_apply_finish_args *args)
5773 {
5774 struct bgp *bgp;
5775 const char *peer_str;
5776 struct peer *peer;
5777 bool enable = false;
5778 const char *message;
5779
5780 bgp = nb_running_get_entry(args->dnode, NULL, true);
5781 peer_str = yang_dnode_get_string(args->dnode, "../interface");
5782 peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
5783 args->errmsg_len);
5784
5785 if (yang_dnode_exists(args->dnode, "./message")) {
5786 message = yang_dnode_get_string(args->dnode, "./message");
5787 peer_tx_shutdown_message_set(peer, message);
5788 }
5789 enable = yang_dnode_get_bool(args->dnode, "./enable");
5790
5791 peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_SHUTDOWN, enable,
5792 args->errmsg, args->errmsg_len);
5793 }
5794
5795 /*
5796 * XPath:
5797 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown/enable
5798 */
5799 int bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_modify(
5800 struct nb_cb_modify_args *args)
5801 {
5802 switch (args->event) {
5803 case NB_EV_VALIDATE:
5804 case NB_EV_PREPARE:
5805 case NB_EV_ABORT:
5806 case NB_EV_APPLY:
5807 /* TODO: implement me. */
5808 break;
5809 }
5810
5811 return NB_OK;
5812 }
5813
5814 int bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_destroy(
5815 struct nb_cb_destroy_args *args)
5816 {
5817 switch (args->event) {
5818 case NB_EV_VALIDATE:
5819 case NB_EV_PREPARE:
5820 case NB_EV_ABORT:
5821 case NB_EV_APPLY:
5822 /* TODO: implement me. */
5823 break;
5824 }
5825
5826 return NB_OK;
5827 }
5828
5829 /*
5830 * XPath:
5831 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown/message
5832 */
5833 int bgp_neighbors_unnumbered_neighbor_admin_shutdown_message_modify(
5834 struct nb_cb_modify_args *args)
5835 {
5836 switch (args->event) {
5837 case NB_EV_VALIDATE:
5838 case NB_EV_PREPARE:
5839 case NB_EV_ABORT:
5840 case NB_EV_APPLY:
5841 /* TODO: implement me. */
5842 break;
5843 }
5844
5845 return NB_OK;
5846 }
5847
5848 int bgp_neighbors_unnumbered_neighbor_admin_shutdown_message_destroy(
5849 struct nb_cb_destroy_args *args)
5850 {
5851 switch (args->event) {
5852 case NB_EV_VALIDATE:
5853 case NB_EV_PREPARE:
5854 case NB_EV_ABORT:
5855 case NB_EV_APPLY:
5856 /* TODO: implement me. */
5857 break;
5858 }
5859
5860 return NB_OK;
5861 }
5862
5863 /*
5864 * XPath:
5865 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/graceful-restart/enable
5866 */
5867 int bgp_neighbors_unnumbered_neighbor_graceful_restart_enable_modify(
5868 struct nb_cb_modify_args *args)
5869 {
5870 switch (args->event) {
5871 case NB_EV_VALIDATE:
5872 case NB_EV_PREPARE:
5873 case NB_EV_ABORT:
5874 case NB_EV_APPLY:
5875 /* TODO: implement me. */
5876 break;
5877 }
5878
5879 return NB_OK;
5880 }
5881
5882 int bgp_neighbors_unnumbered_neighbor_graceful_restart_enable_destroy(
5883 struct nb_cb_destroy_args *args)
5884 {
5885 switch (args->event) {
5886 case NB_EV_VALIDATE:
5887 case NB_EV_PREPARE:
5888 case NB_EV_ABORT:
5889 case NB_EV_APPLY:
5890 /* TODO: implement me. */
5891 break;
5892 }
5893
5894 return NB_OK;
5895 }
5896
5897 /*
5898 * XPath:
5899 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/graceful-restart/graceful-restart-helper
5900 */
5901 int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_helper_modify(
5902 struct nb_cb_modify_args *args)
5903 {
5904 switch (args->event) {
5905 case NB_EV_VALIDATE:
5906 case NB_EV_PREPARE:
5907 case NB_EV_ABORT:
5908 case NB_EV_APPLY:
5909 /* TODO: implement me. */
5910 break;
5911 }
5912
5913 return NB_OK;
5914 }
5915
5916 int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_helper_destroy(
5917 struct nb_cb_destroy_args *args)
5918 {
5919 switch (args->event) {
5920 case NB_EV_VALIDATE:
5921 case NB_EV_PREPARE:
5922 case NB_EV_ABORT:
5923 case NB_EV_APPLY:
5924 /* TODO: implement me. */
5925 break;
5926 }
5927
5928 return NB_OK;
5929 }
5930
5931 /*
5932 * XPath:
5933 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/graceful-restart/graceful-restart-disable
5934 */
5935 int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_disable_modify(
5936 struct nb_cb_modify_args *args)
5937 {
5938 switch (args->event) {
5939 case NB_EV_VALIDATE:
5940 case NB_EV_PREPARE:
5941 case NB_EV_ABORT:
5942 case NB_EV_APPLY:
5943 /* TODO: implement me. */
5944 break;
5945 }
5946
5947 return NB_OK;
5948 }
5949
5950 int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_disable_destroy(
5951 struct nb_cb_destroy_args *args)
5952 {
5953 switch (args->event) {
5954 case NB_EV_VALIDATE:
5955 case NB_EV_PREPARE:
5956 case NB_EV_ABORT:
5957 case NB_EV_APPLY:
5958 /* TODO: implement me. */
5959 break;
5960 }
5961
5962 return NB_OK;
5963 }
5964
5965 /*
5966 * XPath:
5967 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/timers/advertise-interval
5968 */
5969 int bgp_neighbors_unnumbered_neighbor_timers_advertise_interval_modify(
5970 struct nb_cb_modify_args *args)
5971 {
5972 struct bgp *bgp;
5973 const char *peer_str;
5974 struct peer *peer;
5975 uint16_t routeadv;
5976 int ret;
5977
5978 switch (args->event) {
5979 case NB_EV_VALIDATE:
5980 case NB_EV_PREPARE:
5981 case NB_EV_ABORT:
5982 return NB_OK;
5983 case NB_EV_APPLY:
5984 bgp = nb_running_get_entry(args->dnode, NULL, true);
5985 peer_str =
5986 yang_dnode_get_string(args->dnode, "../../interface");
5987 peer = bgp_unnumbered_neighbor_peer_lookup(
5988 bgp, peer_str, args->errmsg, args->errmsg_len);
5989 routeadv = yang_dnode_get_uint16(args->dnode, NULL);
5990
5991 ret = peer_advertise_interval_set(peer, routeadv);
5992 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
5993
5994 break;
5995 }
5996
5997 return NB_OK;
5998 }
5999
6000 int bgp_neighbors_unnumbered_neighbor_timers_advertise_interval_destroy(
6001 struct nb_cb_destroy_args *args)
6002 {
6003 struct bgp *bgp;
6004 const char *peer_str;
6005 struct peer *peer;
6006 int ret;
6007
6008 switch (args->event) {
6009 case NB_EV_VALIDATE:
6010 case NB_EV_PREPARE:
6011 case NB_EV_ABORT:
6012 return NB_OK;
6013 case NB_EV_APPLY:
6014 bgp = nb_running_get_entry(args->dnode, NULL, true);
6015 peer_str =
6016 yang_dnode_get_string(args->dnode, "../../interface");
6017 peer = bgp_unnumbered_neighbor_peer_lookup(
6018 bgp, peer_str, args->errmsg, args->errmsg_len);
6019
6020 ret = peer_advertise_interval_unset(peer);
6021 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
6022
6023 break;
6024 }
6025
6026 return NB_OK;
6027 }
6028
6029 /*
6030 * XPath:
6031 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/timers/connect-time
6032 */
6033 int bgp_neighbors_unnumbered_neighbor_timers_connect_time_modify(
6034 struct nb_cb_modify_args *args)
6035 {
6036 struct bgp *bgp;
6037 const char *peer_str;
6038 struct peer *peer;
6039 uint16_t connect;
6040 int ret;
6041
6042 switch (args->event) {
6043 case NB_EV_VALIDATE:
6044 case NB_EV_PREPARE:
6045 case NB_EV_ABORT:
6046 return NB_OK;
6047 case NB_EV_APPLY:
6048 bgp = nb_running_get_entry(args->dnode, NULL, true);
6049 peer_str =
6050 yang_dnode_get_string(args->dnode, "../../interface");
6051 peer = bgp_unnumbered_neighbor_peer_lookup(
6052 bgp, peer_str, args->errmsg, args->errmsg_len);
6053 connect = yang_dnode_get_uint16(args->dnode, NULL);
6054
6055 ret = peer_timers_connect_set(peer, connect);
6056 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
6057
6058 break;
6059 }
6060
6061 return NB_OK;
6062 }
6063
6064 int bgp_neighbors_unnumbered_neighbor_timers_connect_time_destroy(
6065 struct nb_cb_destroy_args *args)
6066 {
6067 struct bgp *bgp;
6068 const char *peer_str;
6069 struct peer *peer;
6070 int ret;
6071
6072 switch (args->event) {
6073 case NB_EV_VALIDATE:
6074 case NB_EV_PREPARE:
6075 case NB_EV_ABORT:
6076 return NB_OK;
6077 case NB_EV_APPLY:
6078 bgp = nb_running_get_entry(args->dnode, NULL, true);
6079 peer_str =
6080 yang_dnode_get_string(args->dnode, "../../interface");
6081 peer = bgp_unnumbered_neighbor_peer_lookup(
6082 bgp, peer_str, args->errmsg, args->errmsg_len);
6083 ret = peer_timers_connect_unset(peer);
6084 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
6085 < 0)
6086 return NB_ERR_INCONSISTENCY;
6087
6088 break;
6089 }
6090
6091 return NB_OK;
6092 }
6093
6094 /*
6095 * XPath:
6096 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/timers/hold-time
6097 */
6098 int bgp_neighbors_unnumbered_neighbor_timers_hold_time_modify(
6099 struct nb_cb_modify_args *args)
6100 {
6101 struct bgp *bgp;
6102 const char *peer_str;
6103 struct peer *peer;
6104 uint16_t keepalive = 0;
6105 uint16_t holdtime = 0;
6106 int ret = 0;
6107
6108 switch (args->event) {
6109 case NB_EV_VALIDATE:
6110 case NB_EV_PREPARE:
6111 case NB_EV_ABORT:
6112 return NB_OK;
6113 case NB_EV_APPLY:
6114 bgp = nb_running_get_entry(args->dnode, NULL, true);
6115 peer_str =
6116 yang_dnode_get_string(args->dnode, "../../interface");
6117 peer = bgp_unnumbered_neighbor_peer_lookup(
6118 bgp, peer_str, args->errmsg, args->errmsg_len);
6119
6120 keepalive = yang_dnode_get_uint16(args->dnode, "../keepalive");
6121 holdtime = yang_dnode_get_uint16(args->dnode, NULL);
6122
6123 if (keepalive != BGP_DEFAULT_KEEPALIVE
6124 && holdtime != BGP_DEFAULT_HOLDTIME) {
6125 ret = peer_timers_set(peer, keepalive, holdtime);
6126 } else
6127 ret = peer_timers_unset(peer);
6128
6129 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
6130 < 0)
6131 return NB_ERR_INCONSISTENCY;
6132
6133 break;
6134 }
6135
6136 return NB_OK;
6137 }
6138
6139 /*
6140 * XPath:
6141 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/timers/keepalive
6142 */
6143 int bgp_neighbors_unnumbered_neighbor_timers_keepalive_modify(
6144 struct nb_cb_modify_args *args)
6145 {
6146 struct bgp *bgp;
6147 const char *peer_str;
6148 struct peer *peer;
6149 uint16_t keepalive = 0, curr_keep = 0;
6150 uint16_t holdtime = 0;
6151 int ret = 0;
6152
6153 switch (args->event) {
6154 case NB_EV_VALIDATE:
6155 case NB_EV_PREPARE:
6156 case NB_EV_ABORT:
6157 return NB_OK;
6158 case NB_EV_APPLY:
6159 bgp = nb_running_get_entry(args->dnode, NULL, true);
6160 peer_str =
6161 yang_dnode_get_string(args->dnode, "../../interface");
6162 peer = bgp_unnumbered_neighbor_peer_lookup(
6163 bgp, peer_str, args->errmsg, args->errmsg_len);
6164
6165 keepalive = yang_dnode_get_uint16(args->dnode, NULL);
6166 holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time");
6167
6168 if (keepalive != BGP_DEFAULT_KEEPALIVE
6169 && holdtime != BGP_DEFAULT_HOLDTIME) {
6170 if (peer->holdtime == holdtime) {
6171 curr_keep = (keepalive < holdtime / 3
6172 ? keepalive
6173 : holdtime / 3);
6174 if (curr_keep == keepalive)
6175 return NB_OK;
6176 }
6177 ret = peer_timers_set(peer, keepalive, holdtime);
6178 } else
6179 ret = peer_timers_unset(peer);
6180
6181 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
6182 < 0)
6183 return NB_ERR_INCONSISTENCY;
6184
6185 break;
6186 }
6187
6188 return NB_OK;
6189 }
6190
6191 /*
6192 * XPath:
6193 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi
6194 */
6195 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_create(
6196 struct nb_cb_create_args *args)
6197 {
6198 switch (args->event) {
6199 case NB_EV_VALIDATE:
6200 case NB_EV_PREPARE:
6201 case NB_EV_ABORT:
6202 case NB_EV_APPLY:
6203 /* TODO: implement me. */
6204 break;
6205 }
6206
6207 return NB_OK;
6208 }
6209
6210 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_destroy(
6211 struct nb_cb_destroy_args *args)
6212 {
6213 switch (args->event) {
6214 case NB_EV_VALIDATE:
6215 case NB_EV_PREPARE:
6216 case NB_EV_ABORT:
6217 case NB_EV_APPLY:
6218 /* TODO: implement me. */
6219 break;
6220 }
6221
6222 return NB_OK;
6223 }
6224
6225 /*
6226 * XPath:
6227 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/enabled
6228 */
6229 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_modify(
6230 struct nb_cb_modify_args *args)
6231 {
6232 struct bgp *bgp;
6233 const char *peer_str;
6234 const char *af_name;
6235 afi_t afi;
6236 safi_t safi;
6237 bool activate = false;
6238 int ret = 0;
6239 struct peer *peer;
6240
6241 switch (args->event) {
6242 case NB_EV_VALIDATE:
6243 case NB_EV_PREPARE:
6244 case NB_EV_ABORT:
6245 return NB_OK;
6246 case NB_EV_APPLY:
6247 bgp = nb_running_get_entry(args->dnode, NULL, true);
6248 af_name =
6249 yang_dnode_get_string(args->dnode, "../afi-safi-name");
6250 yang_afi_safi_identity2value(af_name, &afi, &safi);
6251 peer_str = yang_dnode_get_string(args->dnode,
6252 "../../../interface");
6253
6254 peer = bgp_unnumbered_neighbor_peer_lookup(
6255 bgp, peer_str, args->errmsg, args->errmsg_len);
6256
6257 activate = yang_dnode_get_bool(args->dnode, NULL);
6258
6259 if (activate)
6260 ret = peer_activate(peer, afi, safi);
6261 else
6262 ret = peer_deactivate(peer, afi, safi);
6263
6264 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
6265 < 0)
6266 return NB_ERR_INCONSISTENCY;
6267
6268 break;
6269 }
6270
6271 return NB_OK;
6272 }
6273
6274 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_destroy(
6275 struct nb_cb_destroy_args *args)
6276 {
6277 switch (args->event) {
6278 case NB_EV_VALIDATE:
6279 case NB_EV_PREPARE:
6280 case NB_EV_ABORT:
6281 case NB_EV_APPLY:
6282 /* TODO: implement me. */
6283 break;
6284 }
6285
6286 return NB_OK;
6287 }
6288
6289 static struct peer *bgp_peer_group_peer_lookup(struct bgp *bgp,
6290 const char *peer_str)
6291 {
6292 struct peer_group *group = NULL;
6293
6294 group = peer_group_lookup(bgp, peer_str);
6295 return group->conf;
6296 }
6297
6298 /*
6299 * XPath:
6300 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group
6301 */
6302 int bgp_peer_groups_peer_group_create(struct nb_cb_create_args *args)
6303 {
6304 const char *peer_grp_str;
6305 struct peer *peer;
6306 struct peer_group *group;
6307 struct bgp *bgp;
6308 char unnbr_xpath[XPATH_MAXLEN];
6309 const struct lyd_node *bgp_dnode;
6310
6311 switch (args->event) {
6312 case NB_EV_VALIDATE:
6313 peer_grp_str =
6314 yang_dnode_get_string(args->dnode, "./peer-group-name");
6315 bgp_dnode = yang_dnode_get_parent(args->dnode, "bgp");
6316 snprintf(unnbr_xpath, sizeof(unnbr_xpath),
6317 FRR_BGP_NEIGHBOR_UNNUM_XPATH, peer_grp_str, "");
6318
6319 if (yang_dnode_exists(bgp_dnode, unnbr_xpath)) {
6320 snprintf(args->errmsg, args->errmsg_len,
6321 "Name conflict with interface: %s",
6322 peer_grp_str);
6323 return NB_ERR_VALIDATION;
6324 }
6325
6326 break;
6327 case NB_EV_PREPARE:
6328 case NB_EV_ABORT:
6329 return NB_OK;
6330 case NB_EV_APPLY:
6331 bgp = nb_running_get_entry(args->dnode, NULL, true);
6332 peer_grp_str =
6333 yang_dnode_get_string(args->dnode, "./peer-group-name");
6334 peer = peer_lookup_by_conf_if(bgp, peer_grp_str);
6335 if (peer) {
6336 snprintf(args->errmsg, args->errmsg_len,
6337 "Name conflict with interface:");
6338 return NB_ERR_INCONSISTENCY;
6339 }
6340
6341 group = peer_group_get(bgp, peer_grp_str);
6342 if (!group) {
6343 snprintf(args->errmsg, args->errmsg_len,
6344 "BGP failed to find or create peer-group");
6345 return NB_ERR_INCONSISTENCY;
6346 }
6347 break;
6348 }
6349
6350 return NB_OK;
6351 }
6352
6353 int bgp_peer_groups_peer_group_destroy(struct nb_cb_destroy_args *args)
6354 {
6355 const char *peer_grp_str;
6356 struct peer_group *group;
6357 struct bgp *bgp;
6358
6359 switch (args->event) {
6360 case NB_EV_VALIDATE:
6361 case NB_EV_PREPARE:
6362 case NB_EV_ABORT:
6363 return NB_OK;
6364 case NB_EV_APPLY:
6365 bgp = nb_running_get_entry(args->dnode, NULL, true);
6366 peer_grp_str =
6367 yang_dnode_get_string(args->dnode, "./peer-group-name");
6368
6369 group = peer_group_lookup(bgp, peer_grp_str);
6370 if (group) {
6371 peer_group_notify_unconfig(group);
6372 peer_group_delete(group);
6373 }
6374
6375 break;
6376 }
6377
6378 return NB_OK;
6379 }
6380
6381 /*
6382 * XPath:
6383 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ipv4-listen-range
6384 */
6385 int bgp_peer_groups_peer_group_ipv4_listen_range_create(
6386 struct nb_cb_create_args *args)
6387 {
6388 switch (args->event) {
6389 case NB_EV_VALIDATE:
6390 case NB_EV_PREPARE:
6391 case NB_EV_ABORT:
6392 case NB_EV_APPLY:
6393 /* TODO: implement me. */
6394 break;
6395 }
6396
6397 return NB_OK;
6398 }
6399
6400 int bgp_peer_groups_peer_group_ipv4_listen_range_destroy(
6401 struct nb_cb_destroy_args *args)
6402 {
6403 switch (args->event) {
6404 case NB_EV_VALIDATE:
6405 case NB_EV_PREPARE:
6406 case NB_EV_ABORT:
6407 case NB_EV_APPLY:
6408 /* TODO: implement me. */
6409 break;
6410 }
6411
6412 return NB_OK;
6413 }
6414
6415 /*
6416 * XPath:
6417 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ipv6-listen-range
6418 */
6419 int bgp_peer_groups_peer_group_ipv6_listen_range_create(
6420 struct nb_cb_create_args *args)
6421 {
6422 switch (args->event) {
6423 case NB_EV_VALIDATE:
6424 case NB_EV_PREPARE:
6425 case NB_EV_ABORT:
6426 case NB_EV_APPLY:
6427 /* TODO: implement me. */
6428 break;
6429 }
6430
6431 return NB_OK;
6432 }
6433
6434 int bgp_peer_groups_peer_group_ipv6_listen_range_destroy(
6435 struct nb_cb_destroy_args *args)
6436 {
6437 switch (args->event) {
6438 case NB_EV_VALIDATE:
6439 case NB_EV_PREPARE:
6440 case NB_EV_ABORT:
6441 case NB_EV_APPLY:
6442 /* TODO: implement me. */
6443 break;
6444 }
6445
6446 return NB_OK;
6447 }
6448
6449 /*
6450 * XPath:
6451 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/password
6452 */
6453 int bgp_peer_groups_peer_group_password_modify(struct nb_cb_modify_args *args)
6454 {
6455 struct bgp *bgp;
6456 const char *peer_str;
6457 const char *passwrd_str;
6458 struct peer *peer = NULL;
6459
6460 switch (args->event) {
6461 case NB_EV_VALIDATE:
6462 case NB_EV_PREPARE:
6463 case NB_EV_ABORT:
6464 return NB_OK;
6465 case NB_EV_APPLY:
6466 bgp = nb_running_get_entry(args->dnode, NULL, true);
6467 peer_str = yang_dnode_get_string(args->dnode,
6468 "../peer-group-name");
6469 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6470
6471 passwrd_str = yang_dnode_get_string(args->dnode, NULL);
6472 peer_password_set(peer, passwrd_str);
6473
6474 break;
6475 }
6476
6477 return NB_OK;
6478 }
6479
6480 int bgp_peer_groups_peer_group_password_destroy(struct nb_cb_destroy_args *args)
6481 {
6482 struct bgp *bgp;
6483 const char *peer_str;
6484 struct peer *peer = NULL;
6485
6486 switch (args->event) {
6487 case NB_EV_VALIDATE:
6488 case NB_EV_PREPARE:
6489 case NB_EV_ABORT:
6490 return NB_OK;
6491 case NB_EV_APPLY:
6492 bgp = nb_running_get_entry(args->dnode, NULL, true);
6493 peer_str = yang_dnode_get_string(args->dnode,
6494 "../peer-group-name");
6495 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6496
6497 peer_password_unset(peer);
6498
6499 break;
6500 }
6501
6502 return NB_OK;
6503 }
6504
6505 /*
6506 * XPath:
6507 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ttl-security
6508 */
6509 int bgp_peer_groups_peer_group_ttl_security_modify(
6510 struct nb_cb_modify_args *args)
6511 {
6512 struct bgp *bgp;
6513 const char *peer_str;
6514 struct peer *peer;
6515 int ret;
6516 uint8_t gtsm_hops;
6517
6518 switch (args->event) {
6519 case NB_EV_VALIDATE:
6520 case NB_EV_PREPARE:
6521 case NB_EV_ABORT:
6522 return NB_OK;
6523 case NB_EV_APPLY:
6524 bgp = nb_running_get_entry(args->dnode, NULL, true);
6525 peer_str = yang_dnode_get_string(args->dnode,
6526 "../peer-group-name");
6527 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6528 if (!peer)
6529 return NB_ERR_INCONSISTENCY;
6530
6531 gtsm_hops = yang_dnode_get_uint8(args->dnode, NULL);
6532 /*
6533 * If 'neighbor swpX', then this is for directly connected
6534 * peers, we should not accept a ttl-security hops value greater
6535 * than 1.
6536 */
6537 if (peer->conf_if && (gtsm_hops > BGP_GTSM_HOPS_CONNECTED)) {
6538 snprintf(
6539 args->errmsg, args->errmsg_len,
6540 "%d is directly connected peer, hops cannot exceed 1\n",
6541 gtsm_hops);
6542 return NB_ERR_INCONSISTENCY;
6543 }
6544
6545 ret = peer_ttl_security_hops_set(peer, gtsm_hops);
6546 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
6547 < 0)
6548 return NB_ERR_INCONSISTENCY;
6549
6550 break;
6551 }
6552
6553 return NB_OK;
6554 }
6555
6556 int bgp_peer_groups_peer_group_ttl_security_destroy(
6557 struct nb_cb_destroy_args *args)
6558 {
6559 struct bgp *bgp;
6560 const char *peer_str;
6561 struct peer *peer;
6562 int ret;
6563
6564 switch (args->event) {
6565 case NB_EV_VALIDATE:
6566 case NB_EV_PREPARE:
6567 case NB_EV_ABORT:
6568 return NB_OK;
6569 case NB_EV_APPLY:
6570 bgp = nb_running_get_entry(args->dnode, NULL, true);
6571 peer_str = yang_dnode_get_string(args->dnode,
6572 "../peer-group-name");
6573 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6574 if (!peer)
6575 return NB_ERR_INCONSISTENCY;
6576
6577 ret = peer_ttl_security_hops_unset(peer);
6578 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
6579 < 0)
6580 return NB_ERR_INCONSISTENCY;
6581
6582 break;
6583 }
6584
6585 return NB_OK;
6586 }
6587
6588 /*
6589 * XPath:
6590 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/solo
6591 */
6592 int bgp_peer_groups_peer_group_solo_modify(struct nb_cb_modify_args *args)
6593 {
6594 switch (args->event) {
6595 case NB_EV_VALIDATE:
6596 case NB_EV_PREPARE:
6597 case NB_EV_ABORT:
6598 case NB_EV_APPLY:
6599 /* TODO: implement me. */
6600 break;
6601 }
6602
6603 return NB_OK;
6604 }
6605
6606 /*
6607 * XPath:
6608 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/enforce-first-as
6609 */
6610 int bgp_peer_groups_peer_group_enforce_first_as_modify(
6611 struct nb_cb_modify_args *args)
6612 {
6613 struct bgp *bgp;
6614 const char *peer_str;
6615 struct peer *peer;
6616 bool enable = false;
6617
6618 switch (args->event) {
6619 case NB_EV_VALIDATE:
6620 case NB_EV_PREPARE:
6621 case NB_EV_ABORT:
6622 return NB_OK;
6623 case NB_EV_APPLY:
6624 bgp = nb_running_get_entry(args->dnode, NULL, true);
6625 peer_str = yang_dnode_get_string(args->dnode,
6626 "../peer-group-name");
6627 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6628
6629 enable = yang_dnode_get_bool(args->dnode, NULL);
6630
6631 peer_flag_modify_nb(bgp, peer_str, peer,
6632 PEER_FLAG_ENFORCE_FIRST_AS, enable,
6633 args->errmsg, args->errmsg_len);
6634
6635 break;
6636 }
6637
6638 return NB_OK;
6639 }
6640
6641 /*
6642 * XPath:
6643 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/description
6644 */
6645 int bgp_peer_groups_peer_group_description_modify(
6646 struct nb_cb_modify_args *args)
6647 {
6648 struct bgp *bgp;
6649 const char *peer_str;
6650 const char *desc_str;
6651 struct peer *peer = NULL;
6652
6653 switch (args->event) {
6654 case NB_EV_VALIDATE:
6655 case NB_EV_PREPARE:
6656 case NB_EV_ABORT:
6657 return NB_OK;
6658 case NB_EV_APPLY:
6659 bgp = nb_running_get_entry(args->dnode, NULL, true);
6660 peer_str = yang_dnode_get_string(args->dnode,
6661 "../peer-group-name");
6662 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6663
6664 desc_str = yang_dnode_get_string(args->dnode, NULL);
6665
6666 peer_description_set(peer, desc_str);
6667
6668 break;
6669 }
6670
6671 return NB_OK;
6672 }
6673
6674 int bgp_peer_groups_peer_group_description_destroy(
6675 struct nb_cb_destroy_args *args)
6676 {
6677 struct bgp *bgp;
6678 const char *peer_str;
6679 struct peer *peer = NULL;
6680
6681 switch (args->event) {
6682 case NB_EV_VALIDATE:
6683 case NB_EV_PREPARE:
6684 case NB_EV_ABORT:
6685 return NB_OK;
6686 case NB_EV_APPLY:
6687 bgp = nb_running_get_entry(args->dnode, NULL, true);
6688 peer_str = yang_dnode_get_string(args->dnode,
6689 "../peer-group-name");
6690 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6691 if (!peer)
6692 return NB_ERR_INCONSISTENCY;
6693
6694 peer_description_unset(peer);
6695
6696 break;
6697 }
6698
6699 return NB_OK;
6700 }
6701
6702 /*
6703 * XPath:
6704 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/passive-mode
6705 */
6706 int bgp_peer_groups_peer_group_passive_mode_modify(
6707 struct nb_cb_modify_args *args)
6708 {
6709 struct bgp *bgp;
6710 const char *peer_str;
6711 struct peer *peer;
6712 bool set = false;
6713
6714 switch (args->event) {
6715 case NB_EV_VALIDATE:
6716 case NB_EV_PREPARE:
6717 case NB_EV_ABORT:
6718 return NB_OK;
6719 case NB_EV_APPLY:
6720 bgp = nb_running_get_entry(args->dnode, NULL, true);
6721 peer_str = yang_dnode_get_string(args->dnode,
6722 "../peer-group-name");
6723 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6724 if (!peer)
6725 return NB_ERR_INCONSISTENCY;
6726
6727 set = yang_dnode_get_bool(args->dnode, NULL);
6728
6729 if (peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_PASSIVE,
6730 set, args->errmsg, args->errmsg_len)
6731 < 0)
6732 return NB_ERR_INCONSISTENCY;
6733
6734 break;
6735 }
6736
6737 return NB_OK;
6738 }
6739
6740 /*
6741 * XPath:
6742 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/dynamic-capability
6743 */
6744 int bgp_peer_groups_peer_group_capability_options_dynamic_capability_modify(
6745 struct nb_cb_modify_args *args)
6746 {
6747 struct bgp *bgp;
6748 const char *peer_str;
6749 struct peer *peer;
6750 bool enable = false;
6751
6752 switch (args->event) {
6753 case NB_EV_VALIDATE:
6754 case NB_EV_PREPARE:
6755 case NB_EV_ABORT:
6756 return NB_OK;
6757 case NB_EV_APPLY:
6758 bgp = nb_running_get_entry(args->dnode, NULL, true);
6759 peer_str = yang_dnode_get_string(args->dnode,
6760 "../../peer-group-name");
6761 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6762 if (!peer)
6763 return NB_ERR_INCONSISTENCY;
6764
6765 enable = yang_dnode_get_bool(args->dnode, NULL);
6766
6767 peer_flag_modify_nb(bgp, peer_str, peer,
6768 PEER_FLAG_DYNAMIC_CAPABILITY, enable,
6769 args->errmsg, args->errmsg_len);
6770
6771 break;
6772 }
6773
6774 return NB_OK;
6775 }
6776
6777 /*
6778 * XPath:
6779 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/strict-capability
6780 */
6781 int bgp_peer_groups_peer_group_capability_options_strict_capability_modify(
6782 struct nb_cb_modify_args *args)
6783 {
6784 struct bgp *bgp;
6785 const char *peer_str;
6786 struct peer *peer;
6787 bool enable = false;
6788
6789 switch (args->event) {
6790 case NB_EV_VALIDATE:
6791 case NB_EV_PREPARE:
6792 case NB_EV_ABORT:
6793 return NB_OK;
6794 case NB_EV_APPLY:
6795 bgp = nb_running_get_entry(args->dnode, NULL, true);
6796 peer_str = yang_dnode_get_string(args->dnode,
6797 "../../peer-group-name");
6798 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6799 if (!peer)
6800 return NB_ERR_INCONSISTENCY;
6801
6802 enable = yang_dnode_get_bool(args->dnode, NULL);
6803
6804 peer_flag_modify_nb(bgp, peer_str, peer,
6805 PEER_FLAG_STRICT_CAP_MATCH, enable,
6806 args->errmsg, args->errmsg_len);
6807
6808 break;
6809 }
6810
6811 return NB_OK;
6812 }
6813
6814 /*
6815 * XPath:
6816 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/extended-nexthop-capability
6817 */
6818 int bgp_peer_groups_peer_group_capability_options_extended_nexthop_capability_modify(
6819 struct nb_cb_modify_args *args)
6820 {
6821 struct bgp *bgp;
6822 const char *peer_str;
6823 struct peer *peer;
6824 bool enable = false;
6825
6826 switch (args->event) {
6827 case NB_EV_VALIDATE:
6828 case NB_EV_PREPARE:
6829 case NB_EV_ABORT:
6830 return NB_OK;
6831 case NB_EV_APPLY:
6832 bgp = nb_running_get_entry(args->dnode, NULL, true);
6833 peer_str = yang_dnode_get_string(args->dnode,
6834 "../../peer-group-name");
6835 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6836 if (!peer)
6837 return NB_ERR_INCONSISTENCY;
6838
6839 enable = yang_dnode_get_bool(args->dnode, NULL);
6840
6841 peer_flag_modify_nb(bgp, peer_str, peer,
6842 PEER_FLAG_CAPABILITY_ENHE, enable,
6843 args->errmsg, args->errmsg_len);
6844
6845 break;
6846 }
6847
6848 return NB_OK;
6849 }
6850
6851 /*
6852 * XPath:
6853 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/capability-negotiate
6854 */
6855 int bgp_peer_groups_peer_group_capability_options_capability_negotiate_modify(
6856 struct nb_cb_modify_args *args)
6857 {
6858 switch (args->event) {
6859 case NB_EV_VALIDATE:
6860 case NB_EV_PREPARE:
6861 case NB_EV_ABORT:
6862 case NB_EV_APPLY:
6863 /* TODO: implement me. */
6864 break;
6865 }
6866
6867 return NB_OK;
6868 }
6869
6870 /*
6871 * XPath:
6872 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/override-capability
6873 */
6874 int bgp_peer_groups_peer_group_capability_options_override_capability_modify(
6875 struct nb_cb_modify_args *args)
6876 {
6877 struct bgp *bgp;
6878 const char *peer_str;
6879 struct peer *peer;
6880 bool enable = false;
6881
6882 switch (args->event) {
6883 case NB_EV_VALIDATE:
6884 case NB_EV_PREPARE:
6885 case NB_EV_ABORT:
6886 return NB_OK;
6887 case NB_EV_APPLY:
6888 bgp = nb_running_get_entry(args->dnode, NULL, true);
6889 peer_str = yang_dnode_get_string(args->dnode,
6890 "../../peer-group-name");
6891 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6892 if (!peer)
6893 return NB_ERR_INCONSISTENCY;
6894
6895 enable = yang_dnode_get_bool(args->dnode, NULL);
6896
6897 peer_flag_modify_nb(bgp, peer_str, peer,
6898 PEER_FLAG_OVERRIDE_CAPABILITY, enable,
6899 args->errmsg, args->errmsg_len);
6900
6901 break;
6902 }
6903
6904 return NB_OK;
6905 }
6906
6907 /*
6908 * XPath:
6909 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/update-source/ip
6910 */
6911 int bgp_peer_groups_peer_group_update_source_ip_modify(
6912 struct nb_cb_modify_args *args)
6913 {
6914 struct bgp *bgp;
6915 const char *peer_str, *source_str;
6916 struct peer *peer;
6917 union sockunion su;
6918
6919 switch (args->event) {
6920 case NB_EV_VALIDATE:
6921 case NB_EV_PREPARE:
6922 case NB_EV_ABORT:
6923 return NB_OK;
6924 case NB_EV_APPLY:
6925 bgp = nb_running_get_entry(args->dnode, NULL, true);
6926 peer_str = yang_dnode_get_string(args->dnode,
6927 "../../peer-group-name");
6928 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6929 if (!peer)
6930 return NB_ERR_INCONSISTENCY;
6931
6932 source_str = yang_dnode_get_string(args->dnode, NULL);
6933
6934 str2sockunion(source_str, &su);
6935 peer_update_source_addr_set(peer, &su);
6936
6937 break;
6938 }
6939
6940 return NB_OK;
6941 }
6942
6943 int bgp_peer_groups_peer_group_update_source_ip_destroy(
6944 struct nb_cb_destroy_args *args)
6945 {
6946 struct bgp *bgp;
6947 const char *peer_str;
6948 struct peer *peer;
6949
6950 switch (args->event) {
6951 case NB_EV_VALIDATE:
6952 case NB_EV_PREPARE:
6953 case NB_EV_ABORT:
6954 return NB_OK;
6955 case NB_EV_APPLY:
6956 bgp = nb_running_get_entry(args->dnode, NULL, true);
6957 peer_str = yang_dnode_get_string(args->dnode,
6958 "../../peer-group-name");
6959 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
6960 if (!peer)
6961 return NB_ERR_INCONSISTENCY;
6962
6963 peer_update_source_unset(peer);
6964
6965 break;
6966 }
6967
6968 return NB_OK;
6969 }
6970
6971 /*
6972 * XPath:
6973 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/update-source/interface
6974 */
6975 int bgp_peer_groups_peer_group_update_source_interface_modify(
6976 struct nb_cb_modify_args *args)
6977 {
6978 struct bgp *bgp;
6979 const char *peer_str, *source_str;
6980 struct peer *peer;
6981 struct prefix p;
6982
6983 switch (args->event) {
6984 case NB_EV_VALIDATE:
6985 source_str = yang_dnode_get_string(args->dnode, NULL);
6986 if (str2prefix(source_str, &p)) {
6987 snprintf(args->errmsg, args->errmsg_len,
6988 "Invalid update-source, remove prefix length");
6989 return NB_ERR_VALIDATION;
6990 }
6991 break;
6992 case NB_EV_PREPARE:
6993 case NB_EV_ABORT:
6994 return NB_OK;
6995 case NB_EV_APPLY:
6996 bgp = nb_running_get_entry(args->dnode, NULL, true);
6997 peer_str = yang_dnode_get_string(args->dnode,
6998 "../../peer-group-name");
6999 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7000 if (!peer)
7001 return NB_ERR_INCONSISTENCY;
7002
7003 source_str = yang_dnode_get_string(args->dnode, NULL);
7004
7005 peer_update_source_if_set(peer, source_str);
7006
7007 break;
7008 }
7009
7010 return NB_OK;
7011 }
7012
7013 int bgp_peer_groups_peer_group_update_source_interface_destroy(
7014 struct nb_cb_destroy_args *args)
7015 {
7016 struct bgp *bgp;
7017 const char *peer_str;
7018 struct peer *peer;
7019
7020 switch (args->event) {
7021 case NB_EV_VALIDATE:
7022 case NB_EV_PREPARE:
7023 case NB_EV_ABORT:
7024 return NB_OK;
7025 case NB_EV_APPLY:
7026 bgp = nb_running_get_entry(args->dnode, NULL, true);
7027 peer_str = yang_dnode_get_string(args->dnode,
7028 "../../peer-group-name");
7029 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7030 if (!peer)
7031 return NB_ERR_INCONSISTENCY;
7032
7033 peer_update_source_unset(peer);
7034
7035 break;
7036 }
7037
7038 return NB_OK;
7039 }
7040
7041 /*
7042 * XPath:
7043 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as
7044 */
7045 void bgp_peer_group_neighbor_remote_as_apply_finish(
7046 struct nb_cb_apply_finish_args *args)
7047 {
7048 struct bgp *bgp;
7049 const char *peer_str;
7050 int as_type = AS_SPECIFIED;
7051 int ret;
7052 as_t as = 0;
7053
7054 bgp = nb_running_get_entry(args->dnode, NULL, true);
7055 peer_str = yang_dnode_get_string(args->dnode, "../peer-group-name");
7056 as_type = yang_dnode_get_enum(args->dnode, "./remote-as-type");
7057 if (yang_dnode_exists(args->dnode, "./remote-as"))
7058 as = yang_dnode_get_uint32(args->dnode, "./remote-as");
7059
7060 ret = peer_group_remote_as(bgp, peer_str, &as, as_type);
7061 if (ret < 0) {
7062 snprintf(args->errmsg, args->errmsg_len,
7063 "Create the peer-group or interface first");
7064 return;
7065 }
7066 }
7067
7068 /*
7069 * XPath:
7070 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as/remote-as-type
7071 */
7072 int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_modify(
7073 struct nb_cb_modify_args *args)
7074 {
7075 switch (args->event) {
7076 case NB_EV_VALIDATE:
7077 case NB_EV_PREPARE:
7078 case NB_EV_ABORT:
7079 case NB_EV_APPLY:
7080 /* TODO: implement me. */
7081 break;
7082 }
7083
7084 return NB_OK;
7085 }
7086
7087 int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_destroy(
7088 struct nb_cb_destroy_args *args)
7089 {
7090 struct bgp *bgp;
7091 const char *peer_str;
7092 struct peer_group *group;
7093
7094 switch (args->event) {
7095 case NB_EV_VALIDATE:
7096 case NB_EV_PREPARE:
7097 case NB_EV_ABORT:
7098 return NB_OK;
7099 case NB_EV_APPLY:
7100 bgp = nb_running_get_entry(args->dnode, NULL, true);
7101 peer_str = yang_dnode_get_string(args->dnode,
7102 "../../peer-group-name");
7103 group = peer_group_lookup(bgp, peer_str);
7104 if (group)
7105 peer_group_remote_as_delete(group);
7106
7107 break;
7108 }
7109
7110 return NB_OK;
7111 }
7112
7113 /*
7114 * XPath:
7115 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as/remote-as
7116 */
7117 int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_modify(
7118 struct nb_cb_modify_args *args)
7119 {
7120 switch (args->event) {
7121 case NB_EV_VALIDATE:
7122 case NB_EV_PREPARE:
7123 case NB_EV_ABORT:
7124 case NB_EV_APPLY:
7125 /* TODO: implement me. */
7126 break;
7127 }
7128
7129 return NB_OK;
7130 }
7131
7132 int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_destroy(
7133 struct nb_cb_destroy_args *args)
7134 {
7135 switch (args->event) {
7136 case NB_EV_VALIDATE:
7137 case NB_EV_PREPARE:
7138 case NB_EV_ABORT:
7139 case NB_EV_APPLY:
7140 /* TODO: implement me. */
7141 break;
7142 }
7143
7144 return NB_OK;
7145 }
7146
7147 /*
7148 * XPath:
7149 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ebgp-multihop/enabled
7150 */
7151 int bgp_peer_groups_peer_group_ebgp_multihop_enabled_modify(
7152 struct nb_cb_modify_args *args)
7153 {
7154 struct bgp *bgp;
7155 const char *peer_str;
7156 struct peer *peer;
7157 bool set = false;
7158 int ret = 0;
7159 uint8_t ttl = MAXTTL;
7160
7161 switch (args->event) {
7162 case NB_EV_VALIDATE:
7163 case NB_EV_PREPARE:
7164 case NB_EV_ABORT:
7165 return NB_OK;
7166 case NB_EV_APPLY:
7167 bgp = nb_running_get_entry(args->dnode, NULL, true);
7168 peer_str = yang_dnode_get_string(args->dnode,
7169 "../../peer-group-name");
7170 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7171 if (!peer)
7172 return NB_ERR_INCONSISTENCY;
7173
7174 if (peer->conf_if) {
7175 ret = BGP_ERR_INVALID_FOR_DIRECT_PEER;
7176 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len,
7177 ret);
7178 return NB_ERR_INCONSISTENCY;
7179 }
7180
7181 set = yang_dnode_get_bool(args->dnode, NULL);
7182
7183 if (set)
7184 ret = peer_ebgp_multihop_set(peer, ttl);
7185 else
7186 ret = peer_ebgp_multihop_unset(peer);
7187
7188 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
7189 < 0)
7190 return NB_ERR_INCONSISTENCY;
7191
7192 break;
7193 }
7194
7195 return NB_OK;
7196 }
7197
7198 int bgp_peer_groups_peer_group_ebgp_multihop_enabled_destroy(
7199 struct nb_cb_destroy_args *args)
7200 {
7201 struct bgp *bgp;
7202 const char *peer_str;
7203 struct peer *peer;
7204 int ret = 0;
7205
7206 switch (args->event) {
7207 case NB_EV_VALIDATE:
7208 case NB_EV_PREPARE:
7209 case NB_EV_ABORT:
7210 return NB_OK;
7211 case NB_EV_APPLY:
7212 bgp = nb_running_get_entry(args->dnode, NULL, true);
7213 peer_str = yang_dnode_get_string(args->dnode,
7214 "../../peer-group-name");
7215 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7216 if (!peer)
7217 return NB_ERR_INCONSISTENCY;
7218
7219 ret = peer_ebgp_multihop_unset(peer);
7220
7221 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
7222 < 0)
7223 return NB_ERR_INCONSISTENCY;
7224
7225 break;
7226 }
7227
7228 return NB_OK;
7229 }
7230
7231 /*
7232 * XPath:
7233 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ebgp-multihop/multihop-ttl
7234 */
7235 int bgp_peer_groups_peer_group_ebgp_multihop_multihop_ttl_modify(
7236 struct nb_cb_modify_args *args)
7237 {
7238 struct bgp *bgp;
7239 const char *peer_str;
7240 struct peer *peer;
7241 int ret = 0;
7242 uint8_t ttl = MAXTTL;
7243
7244 switch (args->event) {
7245 case NB_EV_VALIDATE:
7246 case NB_EV_PREPARE:
7247 case NB_EV_ABORT:
7248 return NB_OK;
7249 case NB_EV_APPLY:
7250 bgp = nb_running_get_entry(args->dnode, NULL, true);
7251 peer_str = yang_dnode_get_string(args->dnode,
7252 "../../peer-group-name");
7253 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7254 if (!peer)
7255 return NB_ERR_INCONSISTENCY;
7256
7257 if (peer->conf_if) {
7258 ret = BGP_ERR_INVALID_FOR_DIRECT_PEER;
7259 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len,
7260 ret);
7261 return NB_ERR_INCONSISTENCY;
7262 }
7263
7264 ttl = yang_dnode_get_uint8(args->dnode, NULL);
7265
7266 ret = peer_ebgp_multihop_set(peer, ttl);
7267
7268 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
7269 < 0)
7270 return NB_ERR_INCONSISTENCY;
7271
7272 break;
7273 }
7274
7275 return NB_OK;
7276 }
7277
7278 int bgp_peer_groups_peer_group_ebgp_multihop_multihop_ttl_destroy(
7279 struct nb_cb_destroy_args *args)
7280 {
7281 struct bgp *bgp;
7282 const char *peer_str;
7283 struct peer *peer;
7284 int ret = 0;
7285
7286 switch (args->event) {
7287 case NB_EV_VALIDATE:
7288 case NB_EV_PREPARE:
7289 case NB_EV_ABORT:
7290 return NB_OK;
7291 case NB_EV_APPLY:
7292 bgp = nb_running_get_entry(args->dnode, NULL, true);
7293 peer_str = yang_dnode_get_string(args->dnode,
7294 "../../peer-group-name");
7295 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7296 if (!peer)
7297 return NB_ERR_INCONSISTENCY;
7298
7299 ret = peer_ebgp_multihop_unset(peer);
7300
7301 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
7302 < 0)
7303 return NB_ERR_INCONSISTENCY;
7304
7305 break;
7306 }
7307
7308 return NB_OK;
7309 }
7310
7311 /*
7312 * XPath:
7313 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ebgp-multihop/disable-connected-check
7314 */
7315 int bgp_peer_groups_peer_group_ebgp_multihop_disable_connected_check_modify(
7316 struct nb_cb_modify_args *args)
7317 {
7318 struct bgp *bgp;
7319 const char *peer_str;
7320 struct peer *peer;
7321 bool set = false;
7322
7323 switch (args->event) {
7324 case NB_EV_VALIDATE:
7325 case NB_EV_PREPARE:
7326 case NB_EV_ABORT:
7327 return NB_OK;
7328 case NB_EV_APPLY:
7329 bgp = nb_running_get_entry(args->dnode, NULL, true);
7330 peer_str = yang_dnode_get_string(args->dnode,
7331 "../../peer-group-name");
7332 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7333 if (!peer)
7334 return NB_ERR_INCONSISTENCY;
7335
7336 set = yang_dnode_get_bool(args->dnode, NULL);
7337
7338 if (peer_flag_modify_nb(bgp, peer_str, peer,
7339 PEER_FLAG_DISABLE_CONNECTED_CHECK, set,
7340 args->errmsg, args->errmsg_len)
7341 < 0)
7342 return NB_ERR_INCONSISTENCY;
7343
7344 break;
7345 }
7346
7347 return NB_OK;
7348 }
7349
7350 /*
7351 * XPath:
7352 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as
7353 */
7354 void bgp_peer_groups_peer_group_local_as_apply_finish(
7355 struct nb_cb_apply_finish_args *args)
7356 {
7357 struct bgp *bgp;
7358 int ret;
7359 as_t as = 0;
7360 const char *peer_str;
7361 struct peer *peer = NULL;
7362 bool no_prepend = false;
7363 bool replace_as = false;
7364
7365 bgp = nb_running_get_entry(args->dnode, NULL, true);
7366 peer_str = yang_dnode_get_string(args->dnode, "../peer-group-name");
7367
7368 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7369
7370 if (yang_dnode_exists(args->dnode, "./local-as"))
7371 as = yang_dnode_get_uint32(args->dnode, "./local-as");
7372
7373 if (yang_dnode_exists(args->dnode, "./local-as"))
7374 as = yang_dnode_get_uint32(args->dnode, "./local-as");
7375 if (yang_dnode_exists(args->dnode, "./no-prepend"))
7376 no_prepend = yang_dnode_get_bool(args->dnode, "./no-prepend");
7377 if (yang_dnode_exists(args->dnode, "./no-replace-as"))
7378 replace_as =
7379 yang_dnode_get_bool(args->dnode, "./no-replace-as");
7380
7381 if (!as && !no_prepend && !replace_as)
7382 ret = peer_local_as_unset(peer);
7383 else
7384 ret = peer_local_as_set(peer, as, no_prepend, replace_as);
7385
7386 bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
7387 }
7388
7389 /*
7390 * XPath:
7391 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as/local-as
7392 */
7393 int bgp_peer_groups_peer_group_local_as_local_as_modify(
7394 struct nb_cb_modify_args *args)
7395 {
7396 switch (args->event) {
7397 case NB_EV_VALIDATE:
7398 case NB_EV_PREPARE:
7399 case NB_EV_ABORT:
7400 case NB_EV_APPLY:
7401 /* TODO: implement me. */
7402 break;
7403 }
7404
7405 return NB_OK;
7406 }
7407
7408 int bgp_peer_groups_peer_group_local_as_local_as_destroy(
7409 struct nb_cb_destroy_args *args)
7410 {
7411 struct bgp *bgp;
7412 const char *peer_str;
7413 struct peer *peer;
7414 int ret;
7415
7416 switch (args->event) {
7417 case NB_EV_VALIDATE:
7418 case NB_EV_PREPARE:
7419 case NB_EV_ABORT:
7420 return NB_OK;
7421 case NB_EV_APPLY:
7422 bgp = nb_running_get_entry(args->dnode, NULL, true);
7423 peer_str = yang_dnode_get_string(args->dnode,
7424 "../../peer-group-name");
7425 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7426
7427 ret = peer_local_as_unset(peer);
7428 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
7429 < 0)
7430 return NB_ERR_INCONSISTENCY;
7431
7432 break;
7433 }
7434
7435 return NB_OK;
7436 }
7437
7438 /*
7439 * XPath:
7440 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as/no-prepend
7441 */
7442 int bgp_peer_groups_peer_group_local_as_no_prepend_modify(
7443 struct nb_cb_modify_args *args)
7444 {
7445 switch (args->event) {
7446 case NB_EV_VALIDATE:
7447 case NB_EV_PREPARE:
7448 case NB_EV_ABORT:
7449 case NB_EV_APPLY:
7450 /* TODO: implement me. */
7451 break;
7452 }
7453
7454 return NB_OK;
7455 }
7456
7457 int bgp_peer_groups_peer_group_local_as_no_prepend_destroy(
7458 struct nb_cb_destroy_args *args)
7459 {
7460 switch (args->event) {
7461 case NB_EV_VALIDATE:
7462 case NB_EV_PREPARE:
7463 case NB_EV_ABORT:
7464 case NB_EV_APPLY:
7465 /* TODO: implement me. */
7466 break;
7467 }
7468
7469 return NB_OK;
7470 }
7471
7472 /*
7473 * XPath:
7474 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as/no-replace-as
7475 */
7476 int bgp_peer_groups_peer_group_local_as_no_replace_as_modify(
7477 struct nb_cb_modify_args *args)
7478 {
7479 switch (args->event) {
7480 case NB_EV_VALIDATE:
7481 case NB_EV_PREPARE:
7482 case NB_EV_ABORT:
7483 case NB_EV_APPLY:
7484 /* TODO: implement me. */
7485 break;
7486 }
7487
7488 return NB_OK;
7489 }
7490
7491 /*
7492 * XPath:
7493 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/enable
7494 */
7495 int bgp_peer_groups_peer_group_bfd_options_enable_modify(
7496 struct nb_cb_modify_args *args)
7497 {
7498 switch (args->event) {
7499 case NB_EV_VALIDATE:
7500 case NB_EV_PREPARE:
7501 case NB_EV_ABORT:
7502 case NB_EV_APPLY:
7503 /* TODO: implement me. */
7504 break;
7505 }
7506
7507 return NB_OK;
7508 }
7509
7510 /*
7511 * XPath:
7512 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/detect-multiplier
7513 */
7514 int bgp_peer_groups_peer_group_bfd_options_detect_multiplier_modify(
7515 struct nb_cb_modify_args *args)
7516 {
7517 switch (args->event) {
7518 case NB_EV_VALIDATE:
7519 case NB_EV_PREPARE:
7520 case NB_EV_ABORT:
7521 case NB_EV_APPLY:
7522 /* TODO: implement me. */
7523 break;
7524 }
7525
7526 return NB_OK;
7527 }
7528
7529 int bgp_peer_groups_peer_group_bfd_options_detect_multiplier_destroy(
7530 struct nb_cb_destroy_args *args)
7531 {
7532 switch (args->event) {
7533 case NB_EV_VALIDATE:
7534 case NB_EV_PREPARE:
7535 case NB_EV_ABORT:
7536 case NB_EV_APPLY:
7537 /* TODO: implement me. */
7538 break;
7539 }
7540
7541 return NB_OK;
7542 }
7543
7544 /*
7545 * XPath:
7546 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/required-min-rx
7547 */
7548 int bgp_peer_groups_peer_group_bfd_options_required_min_rx_modify(
7549 struct nb_cb_modify_args *args)
7550 {
7551 switch (args->event) {
7552 case NB_EV_VALIDATE:
7553 case NB_EV_PREPARE:
7554 case NB_EV_ABORT:
7555 case NB_EV_APPLY:
7556 /* TODO: implement me. */
7557 break;
7558 }
7559
7560 return NB_OK;
7561 }
7562
7563 int bgp_peer_groups_peer_group_bfd_options_required_min_rx_destroy(
7564 struct nb_cb_destroy_args *args)
7565 {
7566 switch (args->event) {
7567 case NB_EV_VALIDATE:
7568 case NB_EV_PREPARE:
7569 case NB_EV_ABORT:
7570 case NB_EV_APPLY:
7571 /* TODO: implement me. */
7572 break;
7573 }
7574
7575 return NB_OK;
7576 }
7577
7578 /*
7579 * XPath:
7580 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/desired-min-tx
7581 */
7582 int bgp_peer_groups_peer_group_bfd_options_desired_min_tx_modify(
7583 struct nb_cb_modify_args *args)
7584 {
7585 switch (args->event) {
7586 case NB_EV_VALIDATE:
7587 case NB_EV_PREPARE:
7588 case NB_EV_ABORT:
7589 case NB_EV_APPLY:
7590 /* TODO: implement me. */
7591 break;
7592 }
7593
7594 return NB_OK;
7595 }
7596
7597 int bgp_peer_groups_peer_group_bfd_options_desired_min_tx_destroy(
7598 struct nb_cb_destroy_args *args)
7599 {
7600 switch (args->event) {
7601 case NB_EV_VALIDATE:
7602 case NB_EV_PREPARE:
7603 case NB_EV_ABORT:
7604 case NB_EV_APPLY:
7605 /* TODO: implement me. */
7606 break;
7607 }
7608
7609 return NB_OK;
7610 }
7611
7612 /*
7613 * XPath:
7614 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/session-type
7615 */
7616 int bgp_peer_groups_peer_group_bfd_options_session_type_modify(
7617 struct nb_cb_modify_args *args)
7618 {
7619 switch (args->event) {
7620 case NB_EV_VALIDATE:
7621 case NB_EV_PREPARE:
7622 case NB_EV_ABORT:
7623 case NB_EV_APPLY:
7624 /* TODO: implement me. */
7625 break;
7626 }
7627
7628 return NB_OK;
7629 }
7630
7631 int bgp_peer_groups_peer_group_bfd_options_session_type_destroy(
7632 struct nb_cb_destroy_args *args)
7633 {
7634 switch (args->event) {
7635 case NB_EV_VALIDATE:
7636 case NB_EV_PREPARE:
7637 case NB_EV_ABORT:
7638 case NB_EV_APPLY:
7639 /* TODO: implement me. */
7640 break;
7641 }
7642
7643 return NB_OK;
7644 }
7645
7646 /*
7647 * XPath:
7648 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/check-cp-failure
7649 */
7650 int bgp_peer_groups_peer_group_bfd_options_check_cp_failure_modify(
7651 struct nb_cb_modify_args *args)
7652 {
7653 switch (args->event) {
7654 case NB_EV_VALIDATE:
7655 case NB_EV_PREPARE:
7656 case NB_EV_ABORT:
7657 case NB_EV_APPLY:
7658 /* TODO: implement me. */
7659 break;
7660 }
7661
7662 return NB_OK;
7663 }
7664
7665 int bgp_peer_groups_peer_group_bfd_options_check_cp_failure_destroy(
7666 struct nb_cb_destroy_args *args)
7667 {
7668 switch (args->event) {
7669 case NB_EV_VALIDATE:
7670 case NB_EV_PREPARE:
7671 case NB_EV_ABORT:
7672 case NB_EV_APPLY:
7673 /* TODO: implement me. */
7674 break;
7675 }
7676
7677 return NB_OK;
7678 }
7679
7680 /*
7681 * XPath:
7682 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown
7683 */
7684 void bgp_peer_groups_peer_group_admin_shutdown_apply_finish(
7685 struct nb_cb_apply_finish_args *args)
7686 {
7687 struct bgp *bgp;
7688 const char *peer_str;
7689 struct peer *peer;
7690 bool enable = false;
7691 const char *message;
7692
7693 bgp = nb_running_get_entry(args->dnode, NULL, true);
7694 peer_str = yang_dnode_get_string(args->dnode, "../peer-group-name");
7695 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7696
7697 if (yang_dnode_exists(args->dnode, "./message")) {
7698 message = yang_dnode_get_string(args->dnode, "./message");
7699 peer_tx_shutdown_message_set(peer, message);
7700 }
7701 enable = yang_dnode_get_bool(args->dnode, "./enable");
7702
7703 peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_SHUTDOWN, enable,
7704 args->errmsg, args->errmsg_len);
7705 }
7706
7707 /*
7708 * XPath:
7709 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown/enable
7710 */
7711 int bgp_peer_groups_peer_group_admin_shutdown_enable_modify(
7712 struct nb_cb_modify_args *args)
7713 {
7714 switch (args->event) {
7715 case NB_EV_VALIDATE:
7716 case NB_EV_PREPARE:
7717 case NB_EV_ABORT:
7718 case NB_EV_APPLY:
7719 /* TODO: implement me. */
7720 break;
7721 }
7722
7723 return NB_OK;
7724 }
7725
7726 int bgp_peer_groups_peer_group_admin_shutdown_enable_destroy(
7727 struct nb_cb_destroy_args *args)
7728 {
7729 switch (args->event) {
7730 case NB_EV_VALIDATE:
7731 case NB_EV_PREPARE:
7732 case NB_EV_ABORT:
7733 case NB_EV_APPLY:
7734 /* TODO: implement me. */
7735 break;
7736 }
7737
7738 return NB_OK;
7739 }
7740
7741 /*
7742 * XPath:
7743 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown/message
7744 */
7745 int bgp_peer_groups_peer_group_admin_shutdown_message_modify(
7746 struct nb_cb_modify_args *args)
7747 {
7748 switch (args->event) {
7749 case NB_EV_VALIDATE:
7750 case NB_EV_PREPARE:
7751 case NB_EV_ABORT:
7752 case NB_EV_APPLY:
7753 /* TODO: implement me. */
7754 break;
7755 }
7756
7757 return NB_OK;
7758 }
7759
7760 int bgp_peer_groups_peer_group_admin_shutdown_message_destroy(
7761 struct nb_cb_destroy_args *args)
7762 {
7763 switch (args->event) {
7764 case NB_EV_VALIDATE:
7765 case NB_EV_PREPARE:
7766 case NB_EV_ABORT:
7767 case NB_EV_APPLY:
7768 /* TODO: implement me. */
7769 break;
7770 }
7771
7772 return NB_OK;
7773 }
7774
7775 /*
7776 * XPath:
7777 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/graceful-restart/enable
7778 */
7779 int bgp_peer_groups_peer_group_graceful_restart_enable_modify(
7780 struct nb_cb_modify_args *args)
7781 {
7782 switch (args->event) {
7783 case NB_EV_VALIDATE:
7784 case NB_EV_PREPARE:
7785 case NB_EV_ABORT:
7786 case NB_EV_APPLY:
7787 /* TODO: implement me. */
7788 break;
7789 }
7790
7791 return NB_OK;
7792 }
7793
7794 int bgp_peer_groups_peer_group_graceful_restart_enable_destroy(
7795 struct nb_cb_destroy_args *args)
7796 {
7797 switch (args->event) {
7798 case NB_EV_VALIDATE:
7799 case NB_EV_PREPARE:
7800 case NB_EV_ABORT:
7801 case NB_EV_APPLY:
7802 /* TODO: implement me. */
7803 break;
7804 }
7805
7806 return NB_OK;
7807 }
7808
7809 /*
7810 * XPath:
7811 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/graceful-restart/graceful-restart-helper
7812 */
7813 int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_helper_modify(
7814 struct nb_cb_modify_args *args)
7815 {
7816 switch (args->event) {
7817 case NB_EV_VALIDATE:
7818 case NB_EV_PREPARE:
7819 case NB_EV_ABORT:
7820 case NB_EV_APPLY:
7821 /* TODO: implement me. */
7822 break;
7823 }
7824
7825 return NB_OK;
7826 }
7827
7828 int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_helper_destroy(
7829 struct nb_cb_destroy_args *args)
7830 {
7831 switch (args->event) {
7832 case NB_EV_VALIDATE:
7833 case NB_EV_PREPARE:
7834 case NB_EV_ABORT:
7835 case NB_EV_APPLY:
7836 /* TODO: implement me. */
7837 break;
7838 }
7839
7840 return NB_OK;
7841 }
7842
7843 /*
7844 * XPath:
7845 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/graceful-restart/graceful-restart-disable
7846 */
7847 int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_disable_modify(
7848 struct nb_cb_modify_args *args)
7849 {
7850 switch (args->event) {
7851 case NB_EV_VALIDATE:
7852 case NB_EV_PREPARE:
7853 case NB_EV_ABORT:
7854 case NB_EV_APPLY:
7855 /* TODO: implement me. */
7856 break;
7857 }
7858
7859 return NB_OK;
7860 }
7861
7862 int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_disable_destroy(
7863 struct nb_cb_destroy_args *args)
7864 {
7865 switch (args->event) {
7866 case NB_EV_VALIDATE:
7867 case NB_EV_PREPARE:
7868 case NB_EV_ABORT:
7869 case NB_EV_APPLY:
7870 /* TODO: implement me. */
7871 break;
7872 }
7873
7874 return NB_OK;
7875 }
7876
7877 /*
7878 * XPath:
7879 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/timers/advertise-interval
7880 */
7881 int bgp_peer_groups_peer_group_timers_advertise_interval_modify(
7882 struct nb_cb_modify_args *args)
7883 {
7884 struct bgp *bgp;
7885 const char *peer_str;
7886 struct peer *peer;
7887 uint16_t routeadv;
7888 int ret;
7889
7890 switch (args->event) {
7891 case NB_EV_VALIDATE:
7892 case NB_EV_PREPARE:
7893 case NB_EV_ABORT:
7894 return NB_OK;
7895 case NB_EV_APPLY:
7896 bgp = nb_running_get_entry(args->dnode, NULL, true);
7897 peer_str = yang_dnode_get_string(args->dnode,
7898 "../../peer-group-name");
7899 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7900 routeadv = yang_dnode_get_uint16(args->dnode, NULL);
7901
7902 ret = peer_advertise_interval_set(peer, routeadv);
7903 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
7904 < 0)
7905 return NB_ERR_INCONSISTENCY;
7906
7907 break;
7908 }
7909
7910 return NB_OK;
7911 }
7912
7913 int bgp_peer_groups_peer_group_timers_advertise_interval_destroy(
7914 struct nb_cb_destroy_args *args)
7915 {
7916 struct bgp *bgp;
7917 const char *peer_str;
7918 struct peer *peer;
7919 int ret;
7920
7921 switch (args->event) {
7922 case NB_EV_VALIDATE:
7923 case NB_EV_PREPARE:
7924 case NB_EV_ABORT:
7925 return NB_OK;
7926 case NB_EV_APPLY:
7927 bgp = nb_running_get_entry(args->dnode, NULL, true);
7928 peer_str = yang_dnode_get_string(args->dnode,
7929 "../../peer-group-name");
7930 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7931
7932 ret = peer_advertise_interval_unset(peer);
7933 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
7934 < 0)
7935 return NB_ERR_INCONSISTENCY;
7936
7937 break;
7938 }
7939
7940 return NB_OK;
7941 }
7942
7943 /*
7944 * XPath:
7945 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/timers/connect-time
7946 */
7947 int bgp_peer_groups_peer_group_timers_connect_time_modify(
7948 struct nb_cb_modify_args *args)
7949 {
7950 struct bgp *bgp;
7951 const char *peer_str;
7952 struct peer *peer;
7953 uint16_t connect;
7954 int ret;
7955
7956 switch (args->event) {
7957 case NB_EV_VALIDATE:
7958 case NB_EV_PREPARE:
7959 case NB_EV_ABORT:
7960 return NB_OK;
7961 case NB_EV_APPLY:
7962 bgp = nb_running_get_entry(args->dnode, NULL, true);
7963 peer_str = yang_dnode_get_string(args->dnode,
7964 "../../peer-group-name");
7965 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7966 connect = yang_dnode_get_uint16(args->dnode, NULL);
7967
7968 ret = peer_timers_connect_set(peer, connect);
7969 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
7970 < 0)
7971 return NB_ERR_INCONSISTENCY;
7972
7973 break;
7974 }
7975
7976 return NB_OK;
7977 }
7978
7979 int bgp_peer_groups_peer_group_timers_connect_time_destroy(
7980 struct nb_cb_destroy_args *args)
7981 {
7982 struct bgp *bgp;
7983 const char *peer_str;
7984 struct peer *peer;
7985 int ret;
7986
7987 switch (args->event) {
7988 case NB_EV_VALIDATE:
7989 case NB_EV_PREPARE:
7990 case NB_EV_ABORT:
7991 return NB_OK;
7992 case NB_EV_APPLY:
7993 bgp = nb_running_get_entry(args->dnode, NULL, true);
7994 peer_str = yang_dnode_get_string(args->dnode,
7995 "../../peer-group-name");
7996 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
7997
7998 ret = peer_timers_connect_unset(peer);
7999 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
8000 < 0)
8001 return NB_ERR_INCONSISTENCY;
8002
8003 break;
8004 }
8005
8006 return NB_OK;
8007 }
8008
8009 /*
8010 * XPath:
8011 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/timers/hold-time
8012 */
8013 int bgp_peer_groups_peer_group_timers_hold_time_modify(
8014 struct nb_cb_modify_args *args)
8015 {
8016 struct bgp *bgp;
8017 const char *peer_str;
8018 struct peer *peer;
8019 uint16_t keepalive = 0;
8020 uint16_t holdtime = 0;
8021 int ret = 0;
8022
8023 switch (args->event) {
8024 case NB_EV_VALIDATE:
8025 case NB_EV_PREPARE:
8026 case NB_EV_ABORT:
8027 return NB_OK;
8028 case NB_EV_APPLY:
8029 bgp = nb_running_get_entry(args->dnode, NULL, true);
8030 peer_str = yang_dnode_get_string(args->dnode,
8031 "../../peer-group-name");
8032 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
8033
8034 keepalive = yang_dnode_get_uint16(args->dnode, "../keepalive");
8035 holdtime = yang_dnode_get_uint16(args->dnode, NULL);
8036
8037 if (keepalive != BGP_DEFAULT_KEEPALIVE
8038 && holdtime != BGP_DEFAULT_HOLDTIME) {
8039 ret = peer_timers_set(peer, keepalive, holdtime);
8040 } else
8041 ret = peer_timers_unset(peer);
8042
8043 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
8044 < 0)
8045 return NB_ERR_INCONSISTENCY;
8046
8047 break;
8048 }
8049
8050 return NB_OK;
8051 }
8052
8053 /*
8054 * XPath:
8055 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/timers/keepalive
8056 */
8057 int bgp_peer_groups_peer_group_timers_keepalive_modify(
8058 struct nb_cb_modify_args *args)
8059 {
8060 struct bgp *bgp;
8061 const char *peer_str;
8062 struct peer *peer;
8063 uint16_t keepalive = 0, curr_keep = 0;
8064 uint16_t holdtime = 0;
8065 int ret = 0;
8066
8067 switch (args->event) {
8068 case NB_EV_VALIDATE:
8069 case NB_EV_PREPARE:
8070 case NB_EV_ABORT:
8071 return NB_OK;
8072 case NB_EV_APPLY:
8073 bgp = nb_running_get_entry(args->dnode, NULL, true);
8074 peer_str = yang_dnode_get_string(args->dnode,
8075 "../../peer-group-name");
8076 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
8077
8078 keepalive = yang_dnode_get_uint16(args->dnode, NULL);
8079 holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time");
8080
8081 if (keepalive != BGP_DEFAULT_KEEPALIVE
8082 && holdtime != BGP_DEFAULT_HOLDTIME) {
8083 if (peer->holdtime == holdtime) {
8084 curr_keep = (keepalive < holdtime / 3
8085 ? keepalive
8086 : holdtime / 3);
8087 if (curr_keep == keepalive) {
8088 // zlog_debug("%s holdtime %u keepalive
8089 // %u value is already set, skipping
8090 // update.",
8091 // __func__, holdtime, keepalive);
8092 return NB_OK;
8093 }
8094 }
8095 ret = peer_timers_set(peer, keepalive, holdtime);
8096 } else
8097 ret = peer_timers_unset(peer);
8098
8099 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
8100 < 0)
8101 return NB_ERR_INCONSISTENCY;
8102
8103 break;
8104 }
8105
8106 return NB_OK;
8107 }
8108
8109 /*
8110 * XPath:
8111 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi
8112 */
8113 int bgp_peer_groups_peer_group_afi_safis_afi_safi_create(
8114 struct nb_cb_create_args *args)
8115 {
8116 switch (args->event) {
8117 case NB_EV_VALIDATE:
8118 case NB_EV_PREPARE:
8119 case NB_EV_ABORT:
8120 case NB_EV_APPLY:
8121 /* TODO: implement me. */
8122 break;
8123 }
8124
8125 return NB_OK;
8126 }
8127
8128 int bgp_peer_groups_peer_group_afi_safis_afi_safi_destroy(
8129 struct nb_cb_destroy_args *args)
8130 {
8131 switch (args->event) {
8132 case NB_EV_VALIDATE:
8133 case NB_EV_PREPARE:
8134 case NB_EV_ABORT:
8135 case NB_EV_APPLY:
8136 /* TODO: implement me. */
8137 break;
8138 }
8139
8140 return NB_OK;
8141 }
8142
8143 /*
8144 * XPath:
8145 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/enabled
8146 */
8147 int bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_modify(
8148 struct nb_cb_modify_args *args)
8149 {
8150 struct bgp *bgp;
8151 const char *peer_str;
8152 const char *af_name;
8153 afi_t afi;
8154 safi_t safi;
8155 bool activate = false;
8156 int ret = 0;
8157 struct peer *peer;
8158
8159 switch (args->event) {
8160 case NB_EV_VALIDATE:
8161 case NB_EV_PREPARE:
8162 case NB_EV_ABORT:
8163 return NB_OK;
8164 case NB_EV_APPLY:
8165 bgp = nb_running_get_entry(args->dnode, NULL, true);
8166 af_name =
8167 yang_dnode_get_string(args->dnode, "../afi-safi-name");
8168 yang_afi_safi_identity2value(af_name, &afi, &safi);
8169 peer_str = yang_dnode_get_string(args->dnode,
8170 "../../../peer-group-name");
8171 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
8172
8173 activate = yang_dnode_get_bool(args->dnode, NULL);
8174 if (activate)
8175 ret = peer_activate(peer, afi, safi);
8176 else
8177 ret = peer_deactivate(peer, afi, safi);
8178
8179 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
8180 < 0)
8181 return NB_ERR_INCONSISTENCY;
8182
8183 break;
8184 }
8185
8186 return NB_OK;
8187 }
8188
8189 int bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_destroy(
8190 struct nb_cb_destroy_args *args)
8191 {
8192 switch (args->event) {
8193 case NB_EV_VALIDATE:
8194 case NB_EV_PREPARE:
8195 case NB_EV_ABORT:
8196 case NB_EV_APPLY:
8197 /* TODO: implement me. */
8198 break;
8199 }
8200
8201 return NB_OK;
8202 }
8203
8204 void bgp_global_afi_safis_afi_safi_network_config_apply_finish(
8205 struct nb_cb_apply_finish_args *args)
8206 {
8207 const struct lyd_node *af_dnode;
8208 struct bgp *bgp;
8209 const char *af_name;
8210 struct prefix prefix;
8211 bool is_backdoor = false;
8212 uint32_t label_index = BGP_INVALID_LABEL_INDEX;
8213 const char *rmap_name = NULL;
8214 afi_t afi;
8215 safi_t safi;
8216
8217 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
8218 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
8219 yang_afi_safi_identity2value(af_name, &afi, &safi);
8220 bgp = nb_running_get_entry(af_dnode, NULL, true);
8221
8222 yang_dnode_get_prefix(&prefix, args->dnode, "./prefix");
8223
8224 is_backdoor = yang_dnode_get_bool(args->dnode, "./backdoor");
8225
8226 if (yang_dnode_exists(args->dnode, "./label-index"))
8227 label_index =
8228 yang_dnode_get_uint32(args->dnode, "./label-index");
8229
8230 if (yang_dnode_exists(args->dnode, "./rmap-policy-export"))
8231 rmap_name = yang_dnode_get_string(args->dnode,
8232 "./rmap-policy-export");
8233
8234 bgp_static_set(bgp, NULL, &prefix, afi, safi, rmap_name, is_backdoor,
8235 label_index, args->errmsg, args->errmsg_len);
8236 }
8237
8238 static int bgp_global_afi_safis_afi_safi_network_config_destroy(
8239 struct nb_cb_destroy_args *args)
8240 {
8241 const struct lyd_node *af_dnode;
8242 struct bgp *bgp;
8243 const char *af_name;
8244 struct prefix prefix;
8245 uint32_t label_index = BGP_INVALID_LABEL_INDEX;
8246 const char *rmap_name = NULL;
8247 bool is_backdoor = false;
8248 afi_t afi;
8249 safi_t safi;
8250 int ret;
8251
8252 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
8253 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
8254 yang_afi_safi_identity2value(af_name, &afi, &safi);
8255 bgp = nb_running_get_entry(af_dnode, NULL, true);
8256
8257 yang_dnode_get_prefix(&prefix, args->dnode, "./prefix");
8258
8259 if (yang_dnode_exists(args->dnode, "./rmap-policy-export"))
8260 rmap_name = yang_dnode_get_string(args->dnode,
8261 "./rmap-policy-export");
8262
8263 if (yang_dnode_exists(args->dnode, "./label-index"))
8264 label_index =
8265 yang_dnode_get_uint32(args->dnode, "./label-index");
8266
8267 if (yang_dnode_exists(args->dnode, "./backdoor"))
8268 is_backdoor = yang_dnode_get_bool(args->dnode, "./backdoor");
8269
8270 ret = bgp_static_set(bgp, "no", &prefix, afi, safi, rmap_name,
8271 is_backdoor, label_index, args->errmsg,
8272 args->errmsg_len);
8273 if (ret < 0)
8274 return NB_ERR_INCONSISTENCY;
8275
8276 return NB_OK;
8277 }
8278
8279 /*
8280 * XPath:
8281 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/network-config
8282 */
8283 int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_create(
8284 struct nb_cb_create_args *args)
8285 {
8286 /* Handled in network_config_apply_finish callback */
8287
8288 return NB_OK;
8289 }
8290
8291 int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_destroy(
8292 struct nb_cb_destroy_args *args)
8293 {
8294 switch (args->event) {
8295 case NB_EV_VALIDATE:
8296 case NB_EV_PREPARE:
8297 case NB_EV_ABORT:
8298 return NB_OK;
8299 case NB_EV_APPLY:
8300 return bgp_global_afi_safis_afi_safi_network_config_destroy(
8301 args);
8302
8303 break;
8304 }
8305
8306 return NB_OK;
8307 }
8308
8309 /*
8310 * XPath:
8311 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/network-config/backdoor
8312 */
8313 int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_backdoor_modify(
8314 struct nb_cb_modify_args *args)
8315 {
8316 /* Handled in unicast_network_config_apply_finish callback */
8317
8318 return NB_OK;
8319 }
8320
8321 /*
8322 * XPath:
8323 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/network-config/label-index
8324 */
8325 int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_label_index_modify(
8326 struct nb_cb_modify_args *args)
8327 {
8328 const struct lyd_node *af_dnode;
8329 struct bgp *bgp;
8330 const char *af_name;
8331 struct prefix prefix;
8332 uint32_t label_index;
8333 afi_t afi;
8334 safi_t safi;
8335 struct bgp_dest *dest;
8336 struct bgp_static *bgp_static;
8337
8338 switch (args->event) {
8339 case NB_EV_VALIDATE:
8340 bgp = nb_running_get_entry(args->dnode, NULL, false);
8341 if (!bgp)
8342 return NB_OK;
8343
8344 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
8345 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
8346 yang_afi_safi_identity2value(af_name, &afi, &safi);
8347 yang_dnode_get_prefix(&prefix, args->dnode, "../prefix");
8348 apply_mask(&prefix);
8349
8350 label_index = yang_dnode_get_uint32(args->dnode, NULL);
8351
8352 dest = bgp_node_get(bgp->route[afi][safi], &prefix);
8353 bgp_static = bgp_dest_get_bgp_static_info(dest);
8354 if (bgp_static) {
8355 if (bgp_static->label_index != label_index) {
8356 snprintf(
8357 args->errmsg, args->errmsg_len,
8358 "Cannot change label-index: curr %u input %u\n",
8359 bgp_static->label_index, label_index);
8360 return NB_ERR_VALIDATION;
8361 }
8362 }
8363
8364 break;
8365 case NB_EV_PREPARE:
8366 case NB_EV_ABORT:
8367 case NB_EV_APPLY:
8368 break;
8369 }
8370
8371 return NB_OK;
8372 }
8373
8374 int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_label_index_destroy(
8375 struct nb_cb_destroy_args *args)
8376 {
8377 /* Handled in unicast_network_config_apply_finish callback */
8378
8379 return NB_OK;
8380 }
8381
8382 /*
8383 * XPath:
8384 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/network-config/rmap-policy-export
8385 */
8386 int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_rmap_policy_export_modify(
8387 struct nb_cb_modify_args *args)
8388 {
8389 /* Handled in unicast_network_config_apply_finish callback */
8390
8391 return NB_OK;
8392 }
8393
8394 int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_rmap_policy_export_destroy(
8395 struct nb_cb_destroy_args *args)
8396 {
8397 /* rmap destory alone is not supported by backend, the entire network
8398 * config needs to be destroyed.
8399 */
8400 switch (args->event) {
8401 case NB_EV_VALIDATE:
8402 case NB_EV_PREPARE:
8403 case NB_EV_ABORT:
8404 case NB_EV_APPLY:
8405 /* TODO: implement me. */
8406 break;
8407 }
8408
8409 return NB_OK;
8410 }
8411
8412 void bgp_global_afi_safi_aggregate_route_apply_finish(
8413 struct nb_cb_apply_finish_args *args)
8414 {
8415 const struct lyd_node *af_dnode;
8416 struct bgp *bgp;
8417 const char *af_name;
8418 struct prefix prefix;
8419 const char *rmap_name = NULL;
8420 afi_t afi;
8421 safi_t safi;
8422 uint8_t as_set = 0;
8423 int summary_only = 0;
8424 uint8_t origin = BGP_ORIGIN_UNSPECIFIED;
8425 bool match_med = false;
8426 const char *suppress_map = NULL;
8427
8428 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
8429 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
8430 yang_afi_safi_identity2value(af_name, &afi, &safi);
8431 bgp = nb_running_get_entry(af_dnode, NULL, true);
8432
8433 yang_dnode_get_prefix(&prefix, args->dnode, "./prefix");
8434
8435 if (yang_dnode_exists(args->dnode, "./as-set"))
8436 as_set = yang_dnode_get_bool(args->dnode, "./as-set");
8437
8438 summary_only = yang_dnode_get_bool(args->dnode, "./summary-only");
8439
8440 if (yang_dnode_exists(args->dnode, "./rmap-policy-export"))
8441 rmap_name = yang_dnode_get_string(args->dnode,
8442 "./rmap-policy-export");
8443
8444 origin = yang_dnode_get_enum(args->dnode, "./origin");
8445 match_med = yang_dnode_get_bool(args->dnode, "./match-med");
8446 if (yang_dnode_exists(args->dnode, "./suppress-map"))
8447 suppress_map =
8448 yang_dnode_get_string(args->dnode, "./suppress-map");
8449
8450 bgp_aggregate_set(bgp, &prefix, afi, safi, rmap_name, summary_only,
8451 as_set, origin, match_med, suppress_map, args->errmsg,
8452 args->errmsg_len);
8453 }
8454
8455 static int
8456 bgp_global_afi_safi_aggregate_route_destroy(struct nb_cb_destroy_args *args)
8457 {
8458 const struct lyd_node *af_dnode;
8459 struct bgp *bgp;
8460 const char *af_name;
8461 struct prefix prefix;
8462 afi_t afi;
8463 safi_t safi;
8464 int ret;
8465
8466 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
8467 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
8468 yang_afi_safi_identity2value(af_name, &afi, &safi);
8469 bgp = nb_running_get_entry(af_dnode, NULL, true);
8470
8471 yang_dnode_get_prefix(&prefix, args->dnode, "./prefix");
8472
8473 ret = bgp_aggregate_unset(bgp, &prefix, afi, safi, args->errmsg,
8474 args->errmsg_len);
8475
8476 if (ret < 0)
8477 return NB_ERR_INCONSISTENCY;
8478
8479 return NB_OK;
8480 }
8481
8482 /*
8483 * XPath:
8484 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route
8485 */
8486 int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_create(
8487 struct nb_cb_create_args *args)
8488 {
8489 switch (args->event) {
8490 case NB_EV_VALIDATE:
8491 case NB_EV_PREPARE:
8492 case NB_EV_ABORT:
8493 case NB_EV_APPLY:
8494 /* TODO: implement me. */
8495 break;
8496 }
8497
8498 return NB_OK;
8499 }
8500
8501 int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_destroy(
8502 struct nb_cb_destroy_args *args)
8503 {
8504 switch (args->event) {
8505 case NB_EV_VALIDATE:
8506 case NB_EV_PREPARE:
8507 case NB_EV_ABORT:
8508 return NB_OK;
8509 case NB_EV_APPLY:
8510 return bgp_global_afi_safi_aggregate_route_destroy(args);
8511 }
8512
8513 return NB_OK;
8514 }
8515
8516 /*
8517 * XPath:
8518 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/as-set
8519 */
8520 int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_as_set_modify(
8521 struct nb_cb_modify_args *args)
8522 {
8523 switch (args->event) {
8524 case NB_EV_VALIDATE:
8525 case NB_EV_PREPARE:
8526 case NB_EV_ABORT:
8527 case NB_EV_APPLY:
8528 /* TODO: implement me. */
8529 break;
8530 }
8531
8532 return NB_OK;
8533 }
8534
8535 /*
8536 * XPath:
8537 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/summary-only
8538 */
8539 int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_summary_only_modify(
8540 struct nb_cb_modify_args *args)
8541 {
8542 switch (args->event) {
8543 case NB_EV_VALIDATE:
8544 case NB_EV_PREPARE:
8545 case NB_EV_ABORT:
8546 case NB_EV_APPLY:
8547 /* TODO: implement me. */
8548 break;
8549 }
8550
8551 return NB_OK;
8552 }
8553
8554 /*
8555 * XPath:
8556 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/rmap-policy-export
8557 */
8558 int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_rmap_policy_export_modify(
8559 struct nb_cb_modify_args *args)
8560 {
8561 switch (args->event) {
8562 case NB_EV_VALIDATE:
8563 case NB_EV_PREPARE:
8564 case NB_EV_ABORT:
8565 case NB_EV_APPLY:
8566 /* TODO: implement me. */
8567 break;
8568 }
8569
8570 return NB_OK;
8571 }
8572
8573 int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_rmap_policy_export_destroy(
8574 struct nb_cb_destroy_args *args)
8575 {
8576 switch (args->event) {
8577 case NB_EV_VALIDATE:
8578 case NB_EV_PREPARE:
8579 case NB_EV_ABORT:
8580 case NB_EV_APPLY:
8581 /* TODO: implement me. */
8582 break;
8583 }
8584
8585 return NB_OK;
8586 }
8587
8588 /*
8589 * XPath:
8590 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/origin
8591 */
8592 int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_origin_modify(
8593 struct nb_cb_modify_args *args)
8594 {
8595 switch (args->event) {
8596 case NB_EV_VALIDATE:
8597 case NB_EV_PREPARE:
8598 case NB_EV_ABORT:
8599 case NB_EV_APPLY:
8600 /* TODO: implement me. */
8601 break;
8602 }
8603
8604 return NB_OK;
8605 }
8606
8607 /*
8608 * XPath:
8609 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/match-med
8610 */
8611 int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_match_med_modify(
8612 struct nb_cb_modify_args *args)
8613 {
8614 switch (args->event) {
8615 case NB_EV_VALIDATE:
8616 case NB_EV_PREPARE:
8617 case NB_EV_ABORT:
8618 case NB_EV_APPLY:
8619 /* TODO: implement me. */
8620 break;
8621 }
8622
8623 return NB_OK;
8624 }
8625
8626 /*
8627 * XPath:
8628 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/suppress-map
8629 */
8630 int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_suppress_map_modify(
8631 struct nb_cb_modify_args *args)
8632 {
8633 switch (args->event) {
8634 case NB_EV_VALIDATE:
8635 case NB_EV_PREPARE:
8636 case NB_EV_ABORT:
8637 case NB_EV_APPLY:
8638 /* TODO: implement me. */
8639 break;
8640 }
8641
8642 return NB_OK;
8643 }
8644
8645 int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_suppress_map_destroy(
8646 struct nb_cb_destroy_args *args)
8647 {
8648 switch (args->event) {
8649 case NB_EV_VALIDATE:
8650 case NB_EV_PREPARE:
8651 case NB_EV_ABORT:
8652 case NB_EV_APPLY:
8653 /* TODO: implement me. */
8654 break;
8655 }
8656
8657 return NB_OK;
8658 }
8659
8660 void bgp_global_afi_safi_admin_distance_route_apply_finish(
8661 struct nb_cb_apply_finish_args *args)
8662 {
8663 const struct lyd_node *af_dnode;
8664 const char *af_name;
8665 const char *prefix_str = NULL;
8666 const char *access_list_str = NULL;
8667 uint8_t distance;
8668 afi_t afi;
8669 safi_t safi;
8670
8671 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
8672 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
8673 yang_afi_safi_identity2value(af_name, &afi, &safi);
8674
8675 prefix_str = yang_dnode_get_string(args->dnode, "./prefix");
8676 distance = yang_dnode_get_uint8(args->dnode, "./distance");
8677 if (yang_dnode_exists(args->dnode, "./access-list-policy-export"))
8678 access_list_str = yang_dnode_get_string(
8679 args->dnode, "./access-list-policy-export");
8680
8681 bgp_distance_set(distance, prefix_str, access_list_str, afi, safi,
8682 args->errmsg, args->errmsg_len);
8683 }
8684
8685 static int bgp_global_afi_safi_admin_distance_route_destroy(
8686 struct nb_cb_destroy_args *args)
8687 {
8688 const struct lyd_node *af_dnode;
8689 const char *af_name;
8690 const char *prefix_str = NULL;
8691 const char *access_list_str = NULL;
8692 uint8_t distance;
8693 afi_t afi;
8694 safi_t safi;
8695
8696 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
8697 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
8698 yang_afi_safi_identity2value(af_name, &afi, &safi);
8699
8700 prefix_str = yang_dnode_get_string(args->dnode, "./prefix");
8701 distance = yang_dnode_get_uint8(args->dnode, "./distance");
8702 if (yang_dnode_exists(args->dnode, "./access-list-policy-export"))
8703 access_list_str = yang_dnode_get_string(
8704 args->dnode, "./access-list-policy-export");
8705
8706 if (bgp_distance_unset(distance, prefix_str, access_list_str, afi, safi,
8707 args->errmsg, args->errmsg_len)
8708 != CMD_SUCCESS)
8709 return NB_ERR_INCONSISTENCY;
8710
8711 return NB_OK;
8712 }
8713
8714 /*
8715 * XPath:
8716 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance-route
8717 */
8718 int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_create(
8719 struct nb_cb_create_args *args)
8720 {
8721 switch (args->event) {
8722 case NB_EV_VALIDATE:
8723 case NB_EV_PREPARE:
8724 case NB_EV_ABORT:
8725 case NB_EV_APPLY:
8726 /* TODO: implement me. */
8727 break;
8728 }
8729
8730 return NB_OK;
8731 }
8732
8733 int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_destroy(
8734 struct nb_cb_destroy_args *args)
8735 {
8736 switch (args->event) {
8737 case NB_EV_VALIDATE:
8738 case NB_EV_PREPARE:
8739 case NB_EV_ABORT:
8740 return NB_OK;
8741 case NB_EV_APPLY:
8742 return bgp_global_afi_safi_admin_distance_route_destroy(args);
8743 }
8744
8745 return NB_OK;
8746 }
8747
8748 /*
8749 * XPath:
8750 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance-route/distance
8751 */
8752 int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_distance_modify(
8753 struct nb_cb_modify_args *args)
8754 {
8755 switch (args->event) {
8756 case NB_EV_VALIDATE:
8757 case NB_EV_PREPARE:
8758 case NB_EV_ABORT:
8759 case NB_EV_APPLY:
8760 /* TODO: implement me. */
8761 break;
8762 }
8763
8764 return NB_OK;
8765 }
8766
8767 /*
8768 * XPath:
8769 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance-route/access-list-policy-export
8770 */
8771 int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_access_list_policy_export_modify(
8772 struct nb_cb_modify_args *args)
8773 {
8774 switch (args->event) {
8775 case NB_EV_VALIDATE:
8776 case NB_EV_PREPARE:
8777 case NB_EV_ABORT:
8778 case NB_EV_APPLY:
8779 /* TODO: implement me. */
8780 break;
8781 }
8782
8783 return NB_OK;
8784 }
8785
8786 int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_access_list_policy_export_destroy(
8787 struct nb_cb_destroy_args *args)
8788 {
8789 switch (args->event) {
8790 case NB_EV_VALIDATE:
8791 case NB_EV_PREPARE:
8792 case NB_EV_ABORT:
8793 case NB_EV_APPLY:
8794 /* TODO: implement me. */
8795 break;
8796 }
8797
8798 return NB_OK;
8799 }
8800
8801 void bgp_global_afi_safis_afi_safi_route_flap_dampening_apply_finish(
8802 struct nb_cb_apply_finish_args *args)
8803 {
8804 const struct lyd_node *af_dnode;
8805 struct bgp *bgp;
8806 const char *af_name;
8807 afi_t afi;
8808 safi_t safi;
8809 int half = DEFAULT_HALF_LIFE * 60;
8810 int reuse = DEFAULT_REUSE;
8811 int suppress = DEFAULT_SUPPRESS;
8812 int max;
8813 char ab_xpath[XPATH_MAXLEN];
8814
8815 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
8816 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
8817 yang_afi_safi_identity2value(af_name, &afi, &safi);
8818 bgp = nb_running_get_entry(af_dnode, NULL, true);
8819
8820 if (!yang_dnode_get_bool(args->dnode, "./enable")) {
8821 bgp_damp_disable(bgp, afi, safi);
8822 } else {
8823 half = yang_dnode_get_uint8(args->dnode, "./reach-decay");
8824 half *= 60;
8825 reuse = yang_dnode_get_uint16(args->dnode, "./reuse-above");
8826
8827 suppress =
8828 yang_dnode_get_uint16(args->dnode, "./suppress-above");
8829
8830 max = yang_dnode_get_uint8(args->dnode, "./unreach-decay");
8831 yang_dnode_get_path(args->dnode, ab_xpath, sizeof(ab_xpath));
8832 strlcat(ab_xpath, "/unreach-decay", sizeof(ab_xpath));
8833 if (yang_get_default_uint8(ab_xpath) == max)
8834 max = half * 4;
8835 else
8836 max *= 60;
8837
8838 bgp_damp_enable(bgp, afi, safi, half, reuse, suppress, max);
8839 }
8840 }
8841
8842 static int
8843 bgp_global_afi_safi_route_flap_validation(struct nb_cb_modify_args *args)
8844 {
8845 int reuse;
8846 int suppress;
8847
8848 if (yang_dnode_exists(args->dnode, "../suppress-above")
8849 && yang_dnode_exists(args->dnode, "../reuse-above")) {
8850 suppress =
8851 yang_dnode_get_uint16(args->dnode, "../suppress-above");
8852 reuse = yang_dnode_get_uint16(args->dnode, "../reuse-above");
8853 if (suppress < reuse) {
8854 snprintf(
8855 args->errmsg, args->errmsg_len,
8856 "Suppress value cannot be less than reuse value \n");
8857 return NB_ERR_VALIDATION;
8858 }
8859 }
8860 return NB_OK;
8861 }
8862
8863 /*
8864 * XPath:
8865 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/enable
8866 */
8867 int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_enable_modify(
8868 struct nb_cb_modify_args *args)
8869 {
8870 switch (args->event) {
8871 case NB_EV_VALIDATE:
8872 return bgp_global_afi_safi_route_flap_validation(args);
8873 case NB_EV_PREPARE:
8874 case NB_EV_ABORT:
8875 case NB_EV_APPLY:
8876 break;
8877 }
8878
8879 return NB_OK;
8880 }
8881
8882 /*
8883 * XPath:
8884 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/reach-decay
8885 */
8886 int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reach_decay_modify(
8887 struct nb_cb_modify_args *args)
8888 {
8889 switch (args->event) {
8890 case NB_EV_VALIDATE:
8891 case NB_EV_PREPARE:
8892 case NB_EV_ABORT:
8893 case NB_EV_APPLY:
8894 /* TODO: implement me. */
8895 break;
8896 }
8897
8898 return NB_OK;
8899 }
8900
8901 int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reach_decay_destroy(
8902 struct nb_cb_destroy_args *args)
8903 {
8904 switch (args->event) {
8905 case NB_EV_VALIDATE:
8906 case NB_EV_PREPARE:
8907 case NB_EV_ABORT:
8908 case NB_EV_APPLY:
8909 /* TODO: implement me. */
8910 break;
8911 }
8912
8913 return NB_OK;
8914 }
8915
8916 /*
8917 * XPath:
8918 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/reuse-above
8919 */
8920 int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reuse_above_modify(
8921 struct nb_cb_modify_args *args)
8922 {
8923 int reuse = DEFAULT_REUSE;
8924 int suppress = DEFAULT_SUPPRESS;
8925
8926 switch (args->event) {
8927 case NB_EV_VALIDATE:
8928 if (yang_dnode_exists(args->dnode, "../suppress-above"))
8929 suppress = yang_dnode_get_uint16(args->dnode,
8930 "../suppress-above");
8931 reuse = yang_dnode_get_uint16(args->dnode, "../reuse-above");
8932 if (suppress < reuse) {
8933 snprintf(
8934 args->errmsg, args->errmsg_len,
8935 "Suppress value cannot be less than reuse value \n");
8936 return NB_ERR_VALIDATION;
8937 }
8938 break;
8939 case NB_EV_PREPARE:
8940 case NB_EV_ABORT:
8941 case NB_EV_APPLY:
8942 /* TODO: implement me. */
8943 break;
8944 }
8945
8946 return NB_OK;
8947 }
8948
8949 int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reuse_above_destroy(
8950 struct nb_cb_destroy_args *args)
8951 {
8952 switch (args->event) {
8953 case NB_EV_VALIDATE:
8954 case NB_EV_PREPARE:
8955 case NB_EV_ABORT:
8956 case NB_EV_APPLY:
8957 /* TODO: implement me. */
8958 break;
8959 }
8960
8961 return NB_OK;
8962 }
8963
8964 /*
8965 * XPath:
8966 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/suppress-above
8967 */
8968 int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_suppress_above_modify(
8969 struct nb_cb_modify_args *args)
8970 {
8971 switch (args->event) {
8972 case NB_EV_VALIDATE:
8973 case NB_EV_PREPARE:
8974 case NB_EV_ABORT:
8975 case NB_EV_APPLY:
8976 /* TODO: implement me. */
8977 break;
8978 }
8979
8980 return NB_OK;
8981 }
8982
8983 int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_suppress_above_destroy(
8984 struct nb_cb_destroy_args *args)
8985 {
8986 switch (args->event) {
8987 case NB_EV_VALIDATE:
8988 case NB_EV_PREPARE:
8989 case NB_EV_ABORT:
8990 case NB_EV_APPLY:
8991 /* TODO: implement me. */
8992 break;
8993 }
8994
8995 return NB_OK;
8996 }
8997
8998 /*
8999 * XPath:
9000 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/unreach-decay
9001 */
9002 int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_unreach_decay_modify(
9003 struct nb_cb_modify_args *args)
9004 {
9005 switch (args->event) {
9006 case NB_EV_VALIDATE:
9007 case NB_EV_PREPARE:
9008 case NB_EV_ABORT:
9009 case NB_EV_APPLY:
9010 /* TODO: implement me. */
9011 break;
9012 }
9013
9014 return NB_OK;
9015 }
9016
9017 int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_unreach_decay_destroy(
9018 struct nb_cb_destroy_args *args)
9019 {
9020 switch (args->event) {
9021 case NB_EV_VALIDATE:
9022 case NB_EV_PREPARE:
9023 case NB_EV_ABORT:
9024 case NB_EV_APPLY:
9025 /* TODO: implement me. */
9026 break;
9027 }
9028
9029 return NB_OK;
9030 }
9031
9032 static int
9033 bgp_global_afi_safi_ip_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
9034 struct nb_cb_modify_args *args)
9035 {
9036 const struct lyd_node *af_dnode;
9037 struct bgp *bgp;
9038 const char *af_name;
9039 afi_t afi;
9040 safi_t safi;
9041 uint16_t maxpaths, default_maxpaths;
9042 int ret;
9043 char xpath[XPATH_MAXLEN];
9044 char afi_xpath[XPATH_MAXLEN];
9045
9046 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9047 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9048 yang_afi_safi_identity2value(af_name, &afi, &safi);
9049 bgp = nb_running_get_entry(af_dnode, NULL, true);
9050 maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
9051
9052 snprintf(xpath, sizeof(xpath), FRR_BGP_GLOBAL_XPATH, "frr-bgp:bgp",
9053 "bgp", bgp->name ? bgp->name : VRF_DEFAULT_NAME);
9054 snprintf(
9055 afi_xpath, sizeof(afi_xpath),
9056 "/global/afi-safis/afi-safi[afi-safi-name='%s']/%s/use-multiple-paths/ebgp/maximum-paths",
9057 yang_afi_safi_value2identity(afi, safi),
9058 bgp_afi_safi_get_container_str(afi, safi));
9059 strlcat(xpath, afi_xpath, sizeof(xpath));
9060 default_maxpaths = yang_get_default_uint16(xpath);
9061
9062 ret = bgp_maxpaths_config_vty(bgp, afi, safi, BGP_PEER_EBGP, maxpaths,
9063 0, maxpaths != default_maxpaths ? 1 : 0,
9064 args->errmsg, args->errmsg_len);
9065 if (ret != CMD_SUCCESS)
9066 return NB_ERR_INCONSISTENCY;
9067
9068 return NB_OK;
9069 }
9070
9071 /*
9072 * XPath:
9073 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/use-multiple-paths/ebgp/maximum-paths
9074 */
9075 int bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
9076 struct nb_cb_modify_args *args)
9077 {
9078 uint16_t maxpaths;
9079
9080 switch (args->event) {
9081 case NB_EV_VALIDATE:
9082 maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
9083 if (maxpaths > multipath_num) {
9084 snprintf(args->errmsg, args->errmsg_len,
9085 "maxpaths %u is out of range %u", maxpaths,
9086 multipath_num);
9087 return NB_ERR_VALIDATION;
9088 }
9089 break;
9090 case NB_EV_PREPARE:
9091 case NB_EV_ABORT:
9092 return NB_OK;
9093 case NB_EV_APPLY:
9094 return bgp_global_afi_safi_ip_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
9095 args);
9096 }
9097
9098 return NB_OK;
9099 }
9100
9101 /*
9102 * XPath:
9103 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/use-multiple-paths/ibgp
9104 */
9105 void bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths_apply_finish(
9106 struct nb_cb_apply_finish_args *args)
9107 {
9108 const struct lyd_node *af_dnode;
9109 struct bgp *bgp;
9110 const char *af_name;
9111 afi_t afi;
9112 safi_t safi;
9113 uint16_t maxpaths, default_maxpaths;
9114 char xpath[XPATH_MAXLEN];
9115 char afi_xpath[XPATH_MAXLEN];
9116 uint16_t options = 0;
9117
9118 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9119 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9120 yang_afi_safi_identity2value(af_name, &afi, &safi);
9121 bgp = nb_running_get_entry(af_dnode, NULL, true);
9122
9123 maxpaths = yang_dnode_get_uint16(args->dnode, "./maximum-paths");
9124 if (yang_dnode_get_bool(args->dnode, "./cluster-length-list"))
9125 options = BGP_FLAG_IBGP_MULTIPATH_SAME_CLUSTERLEN;
9126
9127 snprintf(xpath, sizeof(xpath), FRR_BGP_GLOBAL_XPATH, "frr-bgp:bgp",
9128 "bgp", bgp->name ? bgp->name : VRF_DEFAULT_NAME);
9129 snprintf(
9130 afi_xpath, sizeof(afi_xpath),
9131 "/global/afi-safis/afi-safi[afi-safi-name='%s']/%s/use-multiple-paths/ibgp/maximum-paths",
9132 yang_afi_safi_value2identity(afi, safi),
9133 bgp_afi_safi_get_container_str(afi, safi));
9134 strlcat(xpath, afi_xpath, sizeof(xpath));
9135 default_maxpaths = yang_get_default_uint16(xpath);
9136
9137 bgp_maxpaths_config_vty(bgp, afi, safi, BGP_PEER_IBGP, maxpaths,
9138 options, maxpaths != default_maxpaths ? 1 : 0,
9139 args->errmsg, args->errmsg_len);
9140 }
9141
9142 /*
9143 * XPath:
9144 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/use-multiple-paths/ibgp/maximum-paths
9145 */
9146 int bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ibgp_maximum_paths_modify(
9147 struct nb_cb_modify_args *args)
9148 {
9149 uint16_t maxpaths;
9150
9151 switch (args->event) {
9152 case NB_EV_VALIDATE:
9153 maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
9154 if (maxpaths > multipath_num) {
9155 snprintf(args->errmsg, args->errmsg_len,
9156 "maxpaths %u is out of range %u", maxpaths,
9157 multipath_num);
9158 return NB_ERR_VALIDATION;
9159 }
9160 break;
9161 case NB_EV_PREPARE:
9162 case NB_EV_ABORT:
9163 return NB_OK;
9164 case NB_EV_APPLY:
9165 break;
9166 }
9167
9168 return NB_OK;
9169 }
9170
9171 /*
9172 * XPath:
9173 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/use-multiple-paths/ibgp/cluster-length-list
9174 */
9175 int bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ibgp_cluster_length_list_modify(
9176 struct nb_cb_modify_args *args)
9177 {
9178 switch (args->event) {
9179 case NB_EV_VALIDATE:
9180 case NB_EV_PREPARE:
9181 case NB_EV_ABORT:
9182 case NB_EV_APPLY:
9183 /* TODO: implement me. */
9184 break;
9185 }
9186
9187 return NB_OK;
9188 }
9189
9190 int bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
9191 struct nb_cb_destroy_args *args)
9192 {
9193 switch (args->event) {
9194 case NB_EV_VALIDATE:
9195 case NB_EV_PREPARE:
9196 case NB_EV_ABORT:
9197 case NB_EV_APPLY:
9198 /* TODO: implement me. */
9199 break;
9200 }
9201
9202 return NB_OK;
9203 }
9204
9205 void bgp_global_afi_safi_ip_unicast_redistribution_list_apply_finish(
9206 struct nb_cb_apply_finish_args *args)
9207 {
9208 const struct lyd_node *af_dnode;
9209 struct bgp *bgp;
9210 const char *af_name;
9211 afi_t afi;
9212 safi_t safi;
9213 int route_type;
9214 int route_instance;
9215 struct bgp_redist *red;
9216 bool changed = false;
9217 struct route_map *route_map = NULL;
9218 const char *rmap_name = NULL;
9219 uint32_t metric = 0;
9220
9221 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9222 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9223 yang_afi_safi_identity2value(af_name, &afi, &safi);
9224 bgp = nb_running_get_entry(af_dnode, NULL, true);
9225
9226 route_type = yang_dnode_get_enum(args->dnode, "./route-type");
9227 route_instance = yang_dnode_get_uint16(args->dnode, "./route-instance");
9228
9229 red = bgp_redist_add(bgp, afi, route_type, route_instance);
9230
9231 if (yang_dnode_exists(args->dnode, "./rmap-policy-import")) {
9232 rmap_name = yang_dnode_get_string(args->dnode,
9233 "./rmap-policy-import");
9234 route_map = route_map_lookup_by_name(rmap_name);
9235
9236 changed = bgp_redistribute_rmap_set(red, rmap_name, route_map);
9237 }
9238
9239 if (yang_dnode_exists(args->dnode, "./metric")) {
9240 metric = yang_dnode_get_uint32(args->dnode, "./metric");
9241 changed |= bgp_redistribute_metric_set(bgp, red, afi,
9242 route_type, metric);
9243 }
9244
9245 bgp_redistribute_set(bgp, afi, route_type, route_instance, changed);
9246 }
9247
9248 /*
9249 * XPath:
9250 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/redistribution-list
9251 */
9252 int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_create(
9253 struct nb_cb_create_args *args)
9254 {
9255 switch (args->event) {
9256 case NB_EV_VALIDATE:
9257 case NB_EV_PREPARE:
9258 case NB_EV_ABORT:
9259 case NB_EV_APPLY:
9260 /* TODO: implement me. */
9261 break;
9262 }
9263
9264 return NB_OK;
9265 }
9266
9267 int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_destroy(
9268 struct nb_cb_destroy_args *args)
9269 {
9270 const struct lyd_node *af_dnode;
9271 struct bgp *bgp;
9272 const char *af_name;
9273 afi_t afi;
9274 safi_t safi;
9275 int route_type;
9276 int route_instance;
9277
9278 switch (args->event) {
9279 case NB_EV_VALIDATE:
9280 case NB_EV_PREPARE:
9281 case NB_EV_ABORT:
9282 return NB_OK;
9283 case NB_EV_APPLY:
9284 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9285 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9286 yang_afi_safi_identity2value(af_name, &afi, &safi);
9287 bgp = nb_running_get_entry(af_dnode, NULL, true);
9288
9289 route_type = yang_dnode_get_enum(args->dnode, "./route-type");
9290 route_instance =
9291 yang_dnode_get_uint16(args->dnode, "./route-instance");
9292
9293 bgp_redistribute_unset(bgp, afi, route_type, route_instance);
9294
9295 break;
9296 }
9297
9298 return NB_OK;
9299 }
9300
9301 /*
9302 * XPath:
9303 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/redistribution-list/metric
9304 */
9305 int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_metric_modify(
9306 struct nb_cb_modify_args *args)
9307 {
9308 switch (args->event) {
9309 case NB_EV_VALIDATE:
9310 case NB_EV_PREPARE:
9311 case NB_EV_ABORT:
9312 case NB_EV_APPLY:
9313 /* TODO: implement me. */
9314 break;
9315 }
9316
9317 return NB_OK;
9318 }
9319
9320 int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_metric_destroy(
9321 struct nb_cb_destroy_args *args)
9322 {
9323 switch (args->event) {
9324 case NB_EV_VALIDATE:
9325 case NB_EV_PREPARE:
9326 case NB_EV_ABORT:
9327 case NB_EV_APPLY:
9328 /* TODO: implement me. */
9329 break;
9330 }
9331
9332 return NB_OK;
9333 }
9334
9335 /*
9336 * XPath:
9337 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/redistribution-list/rmap-policy-import
9338 */
9339 int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_rmap_policy_import_modify(
9340 struct nb_cb_modify_args *args)
9341 {
9342 switch (args->event) {
9343 case NB_EV_VALIDATE:
9344 case NB_EV_PREPARE:
9345 case NB_EV_ABORT:
9346 case NB_EV_APPLY:
9347 /* TODO: implement me. */
9348 break;
9349 }
9350
9351 return NB_OK;
9352 }
9353
9354 int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_rmap_policy_import_destroy(
9355 struct nb_cb_destroy_args *args)
9356 {
9357 switch (args->event) {
9358 case NB_EV_VALIDATE:
9359 case NB_EV_PREPARE:
9360 case NB_EV_ABORT:
9361 case NB_EV_APPLY:
9362 /* TODO: implement me. */
9363 break;
9364 }
9365
9366 return NB_OK;
9367 }
9368
9369 static int
9370 bgp_global_afi_safis_admin_distance_modify(struct nb_cb_apply_finish_args *args)
9371 {
9372 struct bgp *bgp;
9373 const struct lyd_node *af_dnode;
9374 const char *af_name;
9375 afi_t afi;
9376 safi_t safi;
9377 uint8_t distance_ebgp, distance_ibgp, distance_local;
9378
9379 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9380 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9381 yang_afi_safi_identity2value(af_name, &afi, &safi);
9382 bgp = nb_running_get_entry(af_dnode, NULL, true);
9383
9384 distance_ebgp = yang_dnode_get_uint8(args->dnode, "./external");
9385 distance_ibgp = yang_dnode_get_uint8(args->dnode, "./internal");
9386 distance_local = yang_dnode_get_uint8(args->dnode, "./local");
9387
9388 bgp->distance_ebgp[afi][safi] = distance_ebgp;
9389 bgp->distance_ibgp[afi][safi] = distance_ibgp;
9390 bgp->distance_local[afi][safi] = distance_local;
9391
9392 bgp_announce_routes_distance_update(bgp, afi, safi);
9393
9394 return NB_OK;
9395 }
9396
9397 /*
9398 * XPath:
9399 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance
9400 */
9401 void bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_apply_finish(
9402 struct nb_cb_apply_finish_args *args)
9403 {
9404 bgp_global_afi_safis_admin_distance_modify(args);
9405 }
9406
9407 /*
9408 * XPath:
9409 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance/external
9410 */
9411 int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_external_modify(
9412 struct nb_cb_modify_args *args)
9413 {
9414 /* Handled in admin_distance_apply_finish callback */
9415
9416 return NB_OK;
9417 }
9418
9419 /*
9420 * XPath:
9421 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance/internal
9422 */
9423 int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_internal_modify(
9424 struct nb_cb_modify_args *args)
9425 {
9426 /* Handled in admin_distance_apply_finish callback */
9427
9428 return NB_OK;
9429 }
9430
9431 /*
9432 * XPath:
9433 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance/local
9434 */
9435 int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_local_modify(
9436 struct nb_cb_modify_args *args)
9437 {
9438 /* Handled in admin_distance_apply_finish callback */
9439
9440 return NB_OK;
9441 }
9442
9443 /*
9444 * XPath:
9445 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-export
9446 */
9447 int bgp_global_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify(
9448 struct nb_cb_modify_args *args)
9449 {
9450 switch (args->event) {
9451 case NB_EV_VALIDATE:
9452 case NB_EV_PREPARE:
9453 case NB_EV_ABORT:
9454 case NB_EV_APPLY:
9455 /* TODO: implement me. */
9456 break;
9457 }
9458
9459 return NB_OK;
9460 }
9461
9462 int bgp_global_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy(
9463 struct nb_cb_destroy_args *args)
9464 {
9465 switch (args->event) {
9466 case NB_EV_VALIDATE:
9467 case NB_EV_PREPARE:
9468 case NB_EV_ABORT:
9469 case NB_EV_APPLY:
9470 /* TODO: implement me. */
9471 break;
9472 }
9473
9474 return NB_OK;
9475 }
9476
9477 static int bgp_global_afi_safi_ip_unicast_vpn_config_rd_modify(
9478 struct nb_cb_modify_args *args)
9479 {
9480 struct bgp *bgp;
9481 const struct lyd_node *af_dnode;
9482 const char *af_name;
9483 afi_t afi;
9484 safi_t safi;
9485 const char *rd_str = NULL;
9486 struct prefix_rd prd;
9487
9488 bgp = nb_running_get_entry(args->dnode, NULL, true);
9489
9490 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9491 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9492 yang_afi_safi_identity2value(af_name, &afi, &safi);
9493
9494 rd_str = yang_dnode_get_string(args->dnode, NULL);
9495 if (!str2prefix_rd(rd_str, &prd)) {
9496 snprintf(args->errmsg, args->errmsg_len, "Malformed rd %s\n",
9497 rd_str);
9498 return NB_ERR_INCONSISTENCY;
9499 }
9500
9501 /*
9502 * pre-change: un-export vpn routes (vpn->vrf routes unaffected)
9503 */
9504 vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
9505 bgp);
9506
9507 bgp->vpn_policy[afi].tovpn_rd = prd;
9508 SET_FLAG(bgp->vpn_policy[afi].flags, BGP_VPN_POLICY_TOVPN_RD_SET);
9509
9510 /* post-change: re-export vpn routes */
9511 vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
9512 bgp);
9513
9514 return NB_OK;
9515 }
9516
9517 static int bgp_global_afi_safi_ip_unicast_vpn_config_rd_destroy(
9518 struct nb_cb_destroy_args *args)
9519 {
9520 struct bgp *bgp;
9521 const struct lyd_node *af_dnode;
9522 const char *af_name;
9523 afi_t afi;
9524 safi_t safi;
9525 const char *rd_str = NULL;
9526 struct prefix_rd prd;
9527
9528 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9529 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9530 yang_afi_safi_identity2value(af_name, &afi, &safi);
9531 bgp = nb_running_get_entry(af_dnode, NULL, true);
9532
9533 rd_str = yang_dnode_get_string(args->dnode, NULL);
9534 if (str2prefix_rd(rd_str, &prd)) {
9535 snprintf(args->errmsg, args->errmsg_len, "Malformed rd %s \n",
9536 rd_str);
9537 return NB_ERR_INCONSISTENCY;
9538 }
9539
9540 /*
9541 * pre-change: un-export vpn routes (vpn->vrf routes unaffected)
9542 */
9543 vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
9544 bgp);
9545
9546 UNSET_FLAG(bgp->vpn_policy[afi].flags, BGP_VPN_POLICY_TOVPN_RD_SET);
9547
9548 /* post-change: re-export vpn routes */
9549 vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
9550 bgp);
9551 return NB_OK;
9552 }
9553
9554 /*
9555 * XPath:
9556 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/rd
9557 */
9558 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rd_modify(
9559 struct nb_cb_modify_args *args)
9560 {
9561 struct bgp *bgp;
9562 const struct lyd_node *af_dnode;
9563 const char *af_name;
9564 afi_t afi;
9565 safi_t safi;
9566
9567 switch (args->event) {
9568 case NB_EV_VALIDATE:
9569 bgp = nb_running_get_entry(args->dnode, NULL, false);
9570 if (!bgp)
9571 return NB_OK;
9572
9573 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9574 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9575 yang_afi_safi_identity2value(af_name, &afi, &safi);
9576
9577 if (!vpn_policy_check_import(bgp, afi, safi, false,
9578 args->errmsg, args->errmsg_len))
9579 return NB_ERR_VALIDATION;
9580 break;
9581 case NB_EV_PREPARE:
9582 case NB_EV_ABORT:
9583 return NB_OK;
9584 case NB_EV_APPLY:
9585
9586 return bgp_global_afi_safi_ip_unicast_vpn_config_rd_modify(
9587 args);
9588
9589 break;
9590 }
9591
9592 return NB_OK;
9593 }
9594
9595 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rd_destroy(
9596 struct nb_cb_destroy_args *args)
9597 {
9598 switch (args->event) {
9599 case NB_EV_VALIDATE:
9600 case NB_EV_PREPARE:
9601 case NB_EV_ABORT:
9602 return NB_OK;
9603 case NB_EV_APPLY:
9604 return bgp_global_afi_safi_ip_unicast_vpn_config_rd_destroy(
9605 args);
9606 }
9607
9608 return NB_OK;
9609 }
9610
9611 /*
9612 * XPath:
9613 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/label
9614 */
9615 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_modify(
9616 struct nb_cb_modify_args *args)
9617 {
9618 switch (args->event) {
9619 case NB_EV_VALIDATE:
9620 case NB_EV_PREPARE:
9621 case NB_EV_ABORT:
9622 case NB_EV_APPLY:
9623 /* TODO: implement me. */
9624 break;
9625 }
9626
9627 return NB_OK;
9628 }
9629
9630 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_destroy(
9631 struct nb_cb_destroy_args *args)
9632 {
9633 switch (args->event) {
9634 case NB_EV_VALIDATE:
9635 case NB_EV_PREPARE:
9636 case NB_EV_ABORT:
9637 case NB_EV_APPLY:
9638 /* TODO: implement me. */
9639 break;
9640 }
9641
9642 return NB_OK;
9643 }
9644
9645 /*
9646 * XPath:
9647 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/label-auto
9648 */
9649 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_auto_modify(
9650 struct nb_cb_modify_args *args)
9651 {
9652 switch (args->event) {
9653 case NB_EV_VALIDATE:
9654 case NB_EV_PREPARE:
9655 case NB_EV_ABORT:
9656 case NB_EV_APPLY:
9657 /* TODO: implement me. */
9658 break;
9659 }
9660
9661 return NB_OK;
9662 }
9663
9664 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_auto_destroy(
9665 struct nb_cb_destroy_args *args)
9666 {
9667 switch (args->event) {
9668 case NB_EV_VALIDATE:
9669 case NB_EV_PREPARE:
9670 case NB_EV_ABORT:
9671 case NB_EV_APPLY:
9672 /* TODO: implement me. */
9673 break;
9674 }
9675
9676 return NB_OK;
9677 }
9678
9679 static int bgp_global_afi_safi_ip_unicast_vpn_config_nexthop_modify(
9680 struct nb_cb_modify_args *args)
9681 {
9682 struct bgp *bgp;
9683 const struct lyd_node *af_dnode;
9684 const char *af_name;
9685 afi_t afi;
9686 safi_t safi;
9687 struct prefix p;
9688
9689 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9690 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9691 yang_afi_safi_identity2value(af_name, &afi, &safi);
9692 bgp = nb_running_get_entry(af_dnode, NULL, true);
9693
9694 yang_dnode_get_prefix(&p, args->dnode, NULL);
9695
9696 /*
9697 * pre-change: un-export vpn routes (vpn->vrf routes unaffected)
9698 */
9699 vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
9700 bgp);
9701
9702 bgp->vpn_policy[afi].tovpn_nexthop = p;
9703 SET_FLAG(bgp->vpn_policy[afi].flags, BGP_VPN_POLICY_TOVPN_NEXTHOP_SET);
9704
9705 /* post-change: re-export vpn routes */
9706 vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
9707 bgp);
9708
9709 return NB_OK;
9710 }
9711
9712 static int bgp_global_afi_safi_ip_unicast_vpn_config_nexthop_destroy(
9713 struct nb_cb_destroy_args *args)
9714 {
9715 struct bgp *bgp;
9716 const struct lyd_node *af_dnode;
9717 const char *af_name;
9718 afi_t afi;
9719 safi_t safi;
9720 struct prefix p;
9721
9722 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9723 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9724 yang_afi_safi_identity2value(af_name, &afi, &safi);
9725 bgp = nb_running_get_entry(af_dnode, NULL, true);
9726
9727 yang_dnode_get_prefix(&p, args->dnode, NULL);
9728
9729 /*
9730 * pre-change: un-export vpn routes (vpn->vrf routes unaffected)
9731 */
9732 vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
9733 bgp);
9734 UNSET_FLAG(bgp->vpn_policy[afi].flags,
9735 BGP_VPN_POLICY_TOVPN_NEXTHOP_SET);
9736 /* post-change: re-export vpn routes */
9737 vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
9738 bgp);
9739 return NB_OK;
9740 }
9741
9742 /*
9743 * XPath:
9744 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/nexthop
9745 */
9746 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_nexthop_modify(
9747 struct nb_cb_modify_args *args)
9748 {
9749 struct bgp *bgp;
9750 const struct lyd_node *af_dnode;
9751 const char *af_name;
9752 afi_t afi;
9753 safi_t safi;
9754
9755 switch (args->event) {
9756 case NB_EV_VALIDATE:
9757 bgp = nb_running_get_entry(args->dnode, NULL, false);
9758 if (!bgp)
9759 return NB_OK;
9760 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9761 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9762 yang_afi_safi_identity2value(af_name, &afi, &safi);
9763
9764 if (!vpn_policy_check_import(bgp, afi, safi, false,
9765 args->errmsg, args->errmsg_len))
9766 return NB_ERR_VALIDATION;
9767
9768 break;
9769 case NB_EV_PREPARE:
9770 case NB_EV_ABORT:
9771 return NB_OK;
9772 case NB_EV_APPLY:
9773 return bgp_global_afi_safi_ip_unicast_vpn_config_nexthop_modify(
9774 args);
9775 }
9776
9777 return NB_OK;
9778 }
9779
9780 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_nexthop_destroy(
9781 struct nb_cb_destroy_args *args)
9782 {
9783 switch (args->event) {
9784 case NB_EV_VALIDATE:
9785 case NB_EV_PREPARE:
9786 case NB_EV_ABORT:
9787 return NB_OK;
9788 case NB_EV_APPLY:
9789 return bgp_global_afi_safi_ip_unicast_vpn_config_nexthop_destroy(
9790 args);
9791 }
9792
9793 return NB_OK;
9794 }
9795
9796 static int bgp_global_afi_safi_ip_unicast_vpn_config_import_export_vpn_modify(
9797 struct nb_cb_modify_args *args, const char *direction_str,
9798 bool is_enable)
9799 {
9800 struct bgp *bgp;
9801 const struct lyd_node *af_dnode;
9802 const char *af_name;
9803 afi_t afi;
9804 safi_t safi;
9805 int previous_state;
9806 int flag;
9807 vpn_policy_direction_t dir;
9808
9809 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9810 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9811 yang_afi_safi_identity2value(af_name, &afi, &safi);
9812 bgp = nb_running_get_entry(af_dnode, NULL, true);
9813
9814 if (!strcmp(direction_str, "import")) {
9815 flag = BGP_CONFIG_MPLSVPN_TO_VRF_IMPORT;
9816 dir = BGP_VPN_POLICY_DIR_FROMVPN;
9817 } else if (!strcmp(direction_str, "export")) {
9818 flag = BGP_CONFIG_VRF_TO_MPLSVPN_EXPORT;
9819 dir = BGP_VPN_POLICY_DIR_TOVPN;
9820 } else {
9821 snprintf(args->errmsg, args->errmsg_len,
9822 "unknown direction %s\n", direction_str);
9823 return NB_ERR_INCONSISTENCY;
9824 }
9825
9826 previous_state = CHECK_FLAG(bgp->af_flags[afi][safi], flag);
9827
9828 if (is_enable) {
9829 SET_FLAG(bgp->af_flags[afi][safi], flag);
9830 if (!previous_state) {
9831 /* trigger export current vrf */
9832 vpn_leak_postchange(dir, afi, bgp_get_default(), bgp);
9833 }
9834 } else {
9835 if (previous_state) {
9836 /* trigger un-export current vrf */
9837 vpn_leak_prechange(dir, afi, bgp_get_default(), bgp);
9838 }
9839 UNSET_FLAG(bgp->af_flags[afi][safi], flag);
9840 }
9841
9842 return NB_OK;
9843 }
9844
9845 /*
9846 * XPath:
9847 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/import-vpn
9848 */
9849 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_vpn_modify(
9850 struct nb_cb_modify_args *args)
9851 {
9852 bool is_enable = false;
9853 struct bgp *bgp;
9854
9855 switch (args->event) {
9856 case NB_EV_VALIDATE:
9857 bgp = nb_running_get_entry(args->dnode, NULL, false);
9858 if (!bgp)
9859 return NB_OK;
9860
9861 if (BGP_INSTANCE_TYPE_VRF != bgp->inst_type
9862 && BGP_INSTANCE_TYPE_DEFAULT != bgp->inst_type) {
9863 snprintf(
9864 args->errmsg, args->errmsg_len,
9865 "import|export vpn valid only for bgp vrf or default instance");
9866 return NB_ERR_VALIDATION;
9867 }
9868
9869 break;
9870 case NB_EV_PREPARE:
9871 case NB_EV_ABORT:
9872 return NB_OK;
9873 case NB_EV_APPLY:
9874 if (yang_dnode_get_bool(args->dnode, NULL))
9875 is_enable = true;
9876
9877 return bgp_global_afi_safi_ip_unicast_vpn_config_import_export_vpn_modify(
9878 args, "import", is_enable);
9879 }
9880
9881 return NB_OK;
9882 }
9883
9884 /*
9885 * XPath:
9886 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/export-vpn
9887 */
9888 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_export_vpn_modify(
9889 struct nb_cb_modify_args *args)
9890 {
9891 bool is_enable = false;
9892 struct bgp *bgp;
9893
9894 switch (args->event) {
9895 case NB_EV_VALIDATE:
9896 bgp = nb_running_get_entry(args->dnode, NULL, false);
9897 if (!bgp)
9898 return NB_OK;
9899
9900 if (BGP_INSTANCE_TYPE_VRF != bgp->inst_type
9901 && BGP_INSTANCE_TYPE_DEFAULT != bgp->inst_type) {
9902 snprintf(
9903 args->errmsg, args->errmsg_len,
9904 "import|export vpn valid only for bgp vrf or default instance");
9905 return NB_ERR_VALIDATION;
9906 }
9907 break;
9908 case NB_EV_PREPARE:
9909 case NB_EV_ABORT:
9910 return NB_OK;
9911 case NB_EV_APPLY:
9912 if (yang_dnode_get_bool(args->dnode, NULL))
9913 is_enable = true;
9914
9915 return bgp_global_afi_safi_ip_unicast_vpn_config_import_export_vpn_modify(
9916 args, "export", is_enable);
9917 }
9918
9919 return NB_OK;
9920 }
9921
9922
9923 static int bgp_global_afi_safi_ip_unicast_vpn_config_import_vrfs_create(
9924 struct nb_cb_create_args *args)
9925 {
9926 struct bgp *bgp;
9927 const struct lyd_node *af_dnode;
9928 const char *af_name;
9929 afi_t afi;
9930 safi_t safi;
9931 int ret = 0;
9932 as_t as;
9933 struct bgp *vrf_bgp, *bgp_default;
9934 const char *import_name;
9935 char *vname;
9936 enum bgp_instance_type bgp_type = BGP_INSTANCE_TYPE_VRF;
9937 struct listnode *node;
9938
9939 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
9940 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
9941 yang_afi_safi_identity2value(af_name, &afi, &safi);
9942 bgp = nb_running_get_entry(af_dnode, NULL, true);
9943
9944 as = bgp->as;
9945 import_name = yang_dnode_get_string(args->dnode, "./vrf");
9946
9947 if (((BGP_INSTANCE_TYPE_DEFAULT == bgp->inst_type)
9948 && (strcmp(import_name, VRF_DEFAULT_NAME) == 0))
9949 || (bgp->name && (strcmp(import_name, bgp->name) == 0))) {
9950 snprintf(args->errmsg, args->errmsg_len,
9951 "Cannot %s vrf %s into itself\n", "import",
9952 import_name);
9953 return NB_ERR_INCONSISTENCY;
9954 }
9955
9956 bgp_default = bgp_get_default();
9957 if (!bgp_default) {
9958 /* Auto-create assuming the same AS */
9959 ret = bgp_get_vty(&bgp_default, &as, NULL,
9960 BGP_INSTANCE_TYPE_DEFAULT);
9961
9962 if (ret) {
9963 snprintf(
9964 args->errmsg, args->errmsg_len,
9965 "VRF default is not configured as a bgp instance");
9966 return NB_ERR_INCONSISTENCY;
9967 }
9968 }
9969
9970 vrf_bgp = bgp_lookup_by_name(import_name);
9971 if (!vrf_bgp) {
9972 if (strcmp(import_name, VRF_DEFAULT_NAME) == 0)
9973 vrf_bgp = bgp_default;
9974 else
9975 /* Auto-create assuming the same AS */
9976 ret = bgp_get_vty(&vrf_bgp, &as, import_name, bgp_type);
9977
9978 if (ret) {
9979 snprintf(args->errmsg, args->errmsg_len,
9980 "VRF %s is not configured as a bgp instance\n",
9981 import_name);
9982 return NB_ERR_INCONSISTENCY;
9983 }
9984 }
9985
9986 /* Already importing from "import_vrf"? */
9987 for (ALL_LIST_ELEMENTS_RO(bgp->vpn_policy[afi].import_vrf, node,
9988 vname)) {
9989 if (strcmp(vname, import_name) == 0) {
9990 snprintf(args->errmsg, args->errmsg_len,
9991 "already importing from vrf %s", import_name);
9992 return NB_ERR_INCONSISTENCY;
9993 }
9994 }
9995
9996 vrf_import_from_vrf(bgp, vrf_bgp, afi, safi);
9997
9998 return NB_OK;
9999 }
10000
10001
10002 static int bgp_global_afi_safi_ip_unicast_vpn_config_import_vrf_list_destroy(
10003 struct nb_cb_destroy_args *args)
10004 {
10005 struct bgp *bgp;
10006 const struct lyd_node *af_dnode;
10007 const char *af_name;
10008 afi_t afi;
10009 safi_t safi;
10010 int ret = 0;
10011 as_t as;
10012 struct bgp *vrf_bgp, *bgp_default;
10013 const char *import_name;
10014 enum bgp_instance_type bgp_type = BGP_INSTANCE_TYPE_VRF;
10015
10016 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
10017 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
10018 yang_afi_safi_identity2value(af_name, &afi, &safi);
10019 bgp = nb_running_get_entry(af_dnode, NULL, true);
10020
10021 as = bgp->as;
10022 import_name = yang_dnode_get_string(args->dnode, "./vrf");
10023
10024 if (((BGP_INSTANCE_TYPE_DEFAULT == bgp->inst_type)
10025 && (strcmp(import_name, VRF_DEFAULT_NAME) == 0))
10026 || (bgp->name && (strcmp(import_name, bgp->name) == 0))) {
10027 snprintf(args->errmsg, args->errmsg_len,
10028 "Cannot %s vrf %s into itself\n", "unimport",
10029 import_name);
10030 return NB_ERR_INCONSISTENCY;
10031 }
10032
10033 bgp_default = bgp_get_default();
10034 if (!bgp_default) {
10035 /* Auto-create assuming the same AS */
10036 ret = bgp_get_vty(&bgp_default, &as, NULL,
10037 BGP_INSTANCE_TYPE_DEFAULT);
10038
10039 if (ret) {
10040 snprintf(
10041 args->errmsg, args->errmsg_len, "%s",
10042 "VRF default is not configured as a bgp instance");
10043 return NB_ERR_INCONSISTENCY;
10044 }
10045 }
10046
10047 vrf_bgp = bgp_lookup_by_name(import_name);
10048 if (!vrf_bgp) {
10049 if (strcmp(import_name, VRF_DEFAULT_NAME) == 0)
10050 vrf_bgp = bgp_default;
10051 else
10052 /* Auto-create assuming the same AS */
10053 ret = bgp_get_vty(&vrf_bgp, &as, import_name, bgp_type);
10054
10055 if (ret) {
10056 snprintf(args->errmsg, args->errmsg_len,
10057 "VRF %s is not configured as a bgp instance\n",
10058 import_name);
10059 return NB_ERR_INCONSISTENCY;
10060 }
10061 }
10062
10063 vrf_unimport_from_vrf(bgp, vrf_bgp, afi, safi);
10064
10065 return NB_OK;
10066 }
10067
10068
10069 /*
10070 * XPath:
10071 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/import-vrf-list
10072 */
10073 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_vrf_list_create(
10074 struct nb_cb_create_args *args)
10075 {
10076 struct bgp *bgp;
10077 const struct lyd_node *af_dnode;
10078 const char *af_name;
10079 afi_t afi;
10080 safi_t safi;
10081
10082 switch (args->event) {
10083 case NB_EV_VALIDATE:
10084 bgp = nb_running_get_entry(args->dnode, NULL, false);
10085 if (!bgp)
10086 return NB_OK;
10087 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
10088 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
10089 yang_afi_safi_identity2value(af_name, &afi, &safi);
10090
10091 if (!vpn_policy_check_import(bgp, afi, safi, true, args->errmsg,
10092 args->errmsg_len))
10093 return NB_ERR_VALIDATION;
10094
10095 break;
10096 case NB_EV_PREPARE:
10097 case NB_EV_ABORT:
10098 return NB_OK;
10099 case NB_EV_APPLY:
10100 return bgp_global_afi_safi_ip_unicast_vpn_config_import_vrfs_create(
10101 args);
10102 }
10103
10104 return NB_OK;
10105 }
10106
10107 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_vrf_list_destroy(
10108 struct nb_cb_destroy_args *args)
10109 {
10110 switch (args->event) {
10111 case NB_EV_VALIDATE:
10112 case NB_EV_PREPARE:
10113 case NB_EV_ABORT:
10114 return NB_OK;
10115 case NB_EV_APPLY:
10116 return bgp_global_afi_safi_ip_unicast_vpn_config_import_vrf_list_destroy(
10117 args);
10118 }
10119
10120 return NB_OK;
10121 }
10122
10123 static int bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_modify(
10124 struct nb_cb_modify_args *args, const char *dstr)
10125 {
10126 struct bgp *bgp;
10127 const struct lyd_node *af_dnode;
10128 const char *af_name;
10129 afi_t afi;
10130 safi_t safi;
10131 const char *rmap_str = NULL;
10132 int dodir[BGP_VPN_POLICY_DIR_MAX] = {0};
10133 vpn_policy_direction_t dir;
10134
10135 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
10136 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
10137 yang_afi_safi_identity2value(af_name, &afi, &safi);
10138 bgp = nb_running_get_entry(af_dnode, NULL, true);
10139
10140 if (!strcmp(dstr, "import")) {
10141 rmap_str = yang_dnode_get_string(args->dnode, NULL);
10142 dodir[BGP_VPN_POLICY_DIR_FROMVPN] = 1;
10143 } else if (!strcmp(dstr, "export")) {
10144 rmap_str = yang_dnode_get_string(args->dnode, NULL);
10145 dodir[BGP_VPN_POLICY_DIR_TOVPN] = 1;
10146 } else if (!strcmp(dstr, "both")) {
10147 dodir[BGP_VPN_POLICY_DIR_FROMVPN] = 1;
10148 dodir[BGP_VPN_POLICY_DIR_TOVPN] = 1;
10149 }
10150
10151 for (dir = 0; dir < BGP_VPN_POLICY_DIR_MAX; ++dir) {
10152 if (!dodir[dir])
10153 continue;
10154
10155 vpn_leak_prechange(dir, afi, bgp_get_default(), bgp);
10156
10157 if (bgp->vpn_policy[afi].rmap_name[dir])
10158 XFREE(MTYPE_ROUTE_MAP_NAME,
10159 bgp->vpn_policy[afi].rmap_name[dir]);
10160 bgp->vpn_policy[afi].rmap_name[dir] =
10161 XSTRDUP(MTYPE_ROUTE_MAP_NAME, rmap_str);
10162 bgp->vpn_policy[afi].rmap[dir] =
10163 route_map_lookup_by_name(rmap_str);
10164 if (!bgp->vpn_policy[afi].rmap[dir])
10165 return NB_OK;
10166
10167
10168 vpn_leak_postchange(dir, afi, bgp_get_default(), bgp);
10169 }
10170
10171 return NB_OK;
10172 }
10173
10174 static int bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_destroy(
10175 struct nb_cb_destroy_args *args, const char *dstr)
10176 {
10177 struct bgp *bgp;
10178 const struct lyd_node *af_dnode;
10179 const char *af_name;
10180 afi_t afi;
10181 safi_t safi;
10182 int dodir[BGP_VPN_POLICY_DIR_MAX] = {0};
10183 vpn_policy_direction_t dir;
10184
10185 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
10186 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
10187 yang_afi_safi_identity2value(af_name, &afi, &safi);
10188 bgp = nb_running_get_entry(af_dnode, NULL, true);
10189
10190 if (!strcmp(dstr, "import")) {
10191 dodir[BGP_VPN_POLICY_DIR_FROMVPN] = 1;
10192 } else if (!strcmp(dstr, "export")) {
10193 dodir[BGP_VPN_POLICY_DIR_TOVPN] = 1;
10194 } else if (!strcmp(dstr, "both")) {
10195 dodir[BGP_VPN_POLICY_DIR_FROMVPN] = 1;
10196 dodir[BGP_VPN_POLICY_DIR_TOVPN] = 1;
10197 }
10198
10199 for (dir = 0; dir < BGP_VPN_POLICY_DIR_MAX; ++dir) {
10200 if (!dodir[dir])
10201 continue;
10202
10203 vpn_leak_prechange(dir, afi, bgp_get_default(), bgp);
10204
10205 if (bgp->vpn_policy[afi].rmap_name[dir])
10206 XFREE(MTYPE_ROUTE_MAP_NAME,
10207 bgp->vpn_policy[afi].rmap_name[dir]);
10208 bgp->vpn_policy[afi].rmap_name[dir] = NULL;
10209 bgp->vpn_policy[afi].rmap[dir] = NULL;
10210
10211 vpn_leak_postchange(dir, afi, bgp_get_default(), bgp);
10212 }
10213
10214 return NB_OK;
10215 }
10216
10217 /*
10218 * XPath:
10219 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/rmap-import
10220 */
10221 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_import_modify(
10222 struct nb_cb_modify_args *args)
10223 {
10224 struct bgp *bgp;
10225 const struct lyd_node *af_dnode;
10226 const char *af_name;
10227 afi_t afi;
10228 safi_t safi;
10229
10230 switch (args->event) {
10231 case NB_EV_VALIDATE:
10232 bgp = nb_running_get_entry(args->dnode, NULL, false);
10233 if (!bgp)
10234 return NB_OK;
10235 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
10236 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
10237 yang_afi_safi_identity2value(af_name, &afi, &safi);
10238
10239 if (!vpn_policy_check_import(bgp, afi, safi, false,
10240 args->errmsg, args->errmsg_len))
10241 return NB_ERR_VALIDATION;
10242 break;
10243 case NB_EV_PREPARE:
10244 case NB_EV_ABORT:
10245 return NB_OK;
10246 case NB_EV_APPLY:
10247 return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_modify(
10248 args, "import");
10249 }
10250
10251 return NB_OK;
10252 }
10253
10254 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_import_destroy(
10255 struct nb_cb_destroy_args *args)
10256 {
10257 struct bgp *bgp;
10258 const struct lyd_node *af_dnode;
10259 const char *af_name;
10260 afi_t afi;
10261 safi_t safi;
10262
10263 switch (args->event) {
10264 case NB_EV_VALIDATE:
10265 bgp = nb_running_get_entry(args->dnode, NULL, false);
10266 if (!bgp)
10267 return NB_OK;
10268 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
10269 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
10270 yang_afi_safi_identity2value(af_name, &afi, &safi);
10271
10272 if (!vpn_policy_check_import(bgp, afi, safi, false,
10273 args->errmsg, args->errmsg_len))
10274 return NB_ERR_VALIDATION;
10275 break;
10276 case NB_EV_PREPARE:
10277 case NB_EV_ABORT:
10278 return NB_OK;
10279 case NB_EV_APPLY:
10280 return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_destroy(
10281 args, "import");
10282 }
10283
10284 return NB_OK;
10285 }
10286
10287 /*
10288 * XPath:
10289 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/rmap-export
10290 */
10291 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_export_modify(
10292 struct nb_cb_modify_args *args)
10293 {
10294 switch (args->event) {
10295 case NB_EV_VALIDATE:
10296 case NB_EV_PREPARE:
10297 case NB_EV_ABORT:
10298 return NB_OK;
10299 case NB_EV_APPLY:
10300 return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_modify(
10301 args, "export");
10302 }
10303
10304 return NB_OK;
10305 }
10306
10307 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_export_destroy(
10308 struct nb_cb_destroy_args *args)
10309 {
10310 switch (args->event) {
10311 case NB_EV_VALIDATE:
10312 case NB_EV_PREPARE:
10313 case NB_EV_ABORT:
10314 return NB_OK;
10315 case NB_EV_APPLY:
10316 return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_destroy(
10317 args, "export");
10318 break;
10319 }
10320
10321 return NB_OK;
10322 }
10323
10324 /*
10325 * XPath:
10326 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/redirect-rt
10327 */
10328 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_redirect_rt_modify(
10329 struct nb_cb_modify_args *args)
10330 {
10331 switch (args->event) {
10332 case NB_EV_VALIDATE:
10333 case NB_EV_PREPARE:
10334 case NB_EV_ABORT:
10335 case NB_EV_APPLY:
10336 /* TODO: implement me. */
10337 break;
10338 }
10339
10340 return NB_OK;
10341 }
10342
10343 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_redirect_rt_destroy(
10344 struct nb_cb_destroy_args *args)
10345 {
10346 switch (args->event) {
10347 case NB_EV_VALIDATE:
10348 case NB_EV_PREPARE:
10349 case NB_EV_ABORT:
10350 case NB_EV_APPLY:
10351 /* TODO: implement me. */
10352 break;
10353 }
10354
10355 return NB_OK;
10356 }
10357
10358 /*
10359 * XPath:
10360 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/import-rt-list
10361 */
10362 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_rt_list_create(
10363 struct nb_cb_create_args *args)
10364 {
10365 switch (args->event) {
10366 case NB_EV_VALIDATE:
10367 case NB_EV_PREPARE:
10368 case NB_EV_ABORT:
10369 case NB_EV_APPLY:
10370 /* TODO: implement me. */
10371 break;
10372 }
10373
10374 return NB_OK;
10375 }
10376
10377 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_rt_list_destroy(
10378 struct nb_cb_destroy_args *args)
10379 {
10380 switch (args->event) {
10381 case NB_EV_VALIDATE:
10382 case NB_EV_PREPARE:
10383 case NB_EV_ABORT:
10384 case NB_EV_APPLY:
10385 /* TODO: implement me. */
10386 break;
10387 }
10388
10389 return NB_OK;
10390 }
10391
10392 /*
10393 * XPath:
10394 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/export-rt-list
10395 */
10396 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_export_rt_list_create(
10397 struct nb_cb_create_args *args)
10398 {
10399 switch (args->event) {
10400 case NB_EV_VALIDATE:
10401 case NB_EV_PREPARE:
10402 case NB_EV_ABORT:
10403 case NB_EV_APPLY:
10404 /* TODO: implement me. */
10405 break;
10406 }
10407
10408 return NB_OK;
10409 }
10410
10411 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_export_rt_list_destroy(
10412 struct nb_cb_destroy_args *args)
10413 {
10414 switch (args->event) {
10415 case NB_EV_VALIDATE:
10416 case NB_EV_PREPARE:
10417 case NB_EV_ABORT:
10418 case NB_EV_APPLY:
10419 /* TODO: implement me. */
10420 break;
10421 }
10422
10423 return NB_OK;
10424 }
10425
10426 /*
10427 * XPath:
10428 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/rt-list
10429 */
10430 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rt_list_create(
10431 struct nb_cb_create_args *args)
10432 {
10433 switch (args->event) {
10434 case NB_EV_VALIDATE:
10435 case NB_EV_PREPARE:
10436 case NB_EV_ABORT:
10437 case NB_EV_APPLY:
10438 /* TODO: implement me. */
10439 break;
10440 }
10441
10442 return NB_OK;
10443 }
10444
10445 int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rt_list_destroy(
10446 struct nb_cb_destroy_args *args)
10447 {
10448 switch (args->event) {
10449 case NB_EV_VALIDATE:
10450 case NB_EV_PREPARE:
10451 case NB_EV_ABORT:
10452 case NB_EV_APPLY:
10453 /* TODO: implement me. */
10454 break;
10455 }
10456
10457 return NB_OK;
10458 }
10459
10460 /*
10461 * XPath:
10462 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/network-config
10463 */
10464 int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_create(
10465 struct nb_cb_create_args *args)
10466 {
10467 /* Handled in network_config_apply_finish callback */
10468
10469 return NB_OK;
10470 }
10471
10472 int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_destroy(
10473 struct nb_cb_destroy_args *args)
10474 {
10475 switch (args->event) {
10476 case NB_EV_VALIDATE:
10477 case NB_EV_PREPARE:
10478 case NB_EV_ABORT:
10479 return NB_OK;
10480 case NB_EV_APPLY:
10481 return bgp_global_afi_safis_afi_safi_network_config_destroy(
10482 args);
10483 break;
10484 }
10485
10486 return NB_OK;
10487 }
10488
10489 /*
10490 * XPath:
10491 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/network-config/backdoor
10492 */
10493 int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_backdoor_modify(
10494 struct nb_cb_modify_args *args)
10495 {
10496 /* Handled in unicast_network_config_apply_finish callback */
10497
10498 return NB_OK;
10499 }
10500
10501 /*
10502 * XPath:
10503 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/network-config/label-index
10504 */
10505 int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_label_index_modify(
10506 struct nb_cb_modify_args *args)
10507 {
10508 /* Handled in unicast_network_config_apply_finish callback */
10509
10510 return NB_OK;
10511 }
10512
10513 int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_label_index_destroy(
10514 struct nb_cb_destroy_args *args)
10515 {
10516 switch (args->event) {
10517 case NB_EV_VALIDATE:
10518 case NB_EV_PREPARE:
10519 case NB_EV_ABORT:
10520 case NB_EV_APPLY:
10521 /* TODO: implement me. */
10522 break;
10523 }
10524
10525 return NB_OK;
10526 }
10527
10528 /*
10529 * XPath:
10530 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/network-config/rmap-policy-export
10531 */
10532 int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_rmap_policy_export_modify(
10533 struct nb_cb_modify_args *args)
10534 {
10535 /* Handled in unicast_network_config_apply_finish callback */
10536
10537 return NB_OK;
10538 }
10539
10540 int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_rmap_policy_export_destroy(
10541 struct nb_cb_destroy_args *args)
10542 {
10543 switch (args->event) {
10544 case NB_EV_VALIDATE:
10545 case NB_EV_PREPARE:
10546 case NB_EV_ABORT:
10547 case NB_EV_APPLY:
10548 /* TODO: implement me. */
10549 break;
10550 }
10551
10552 return NB_OK;
10553 }
10554
10555 /*
10556 * XPath:
10557 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route
10558 */
10559 int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_create(
10560 struct nb_cb_create_args *args)
10561 {
10562 switch (args->event) {
10563 case NB_EV_VALIDATE:
10564 case NB_EV_PREPARE:
10565 case NB_EV_ABORT:
10566 case NB_EV_APPLY:
10567 /* TODO: implement me. */
10568 break;
10569 }
10570
10571 return NB_OK;
10572 }
10573
10574 int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_destroy(
10575 struct nb_cb_destroy_args *args)
10576 {
10577 switch (args->event) {
10578 case NB_EV_VALIDATE:
10579 case NB_EV_PREPARE:
10580 case NB_EV_ABORT:
10581 return NB_OK;
10582 case NB_EV_APPLY:
10583 return bgp_global_afi_safi_aggregate_route_destroy(args);
10584 }
10585
10586 return NB_OK;
10587 }
10588
10589 /*
10590 * XPath:
10591 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/as-set
10592 */
10593 int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_as_set_modify(
10594 struct nb_cb_modify_args *args)
10595 {
10596 switch (args->event) {
10597 case NB_EV_VALIDATE:
10598 case NB_EV_PREPARE:
10599 case NB_EV_ABORT:
10600 case NB_EV_APPLY:
10601 /* TODO: implement me. */
10602 break;
10603 }
10604
10605 return NB_OK;
10606 }
10607
10608 /*
10609 * XPath:
10610 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/summary-only
10611 */
10612 int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_summary_only_modify(
10613 struct nb_cb_modify_args *args)
10614 {
10615 switch (args->event) {
10616 case NB_EV_VALIDATE:
10617 case NB_EV_PREPARE:
10618 case NB_EV_ABORT:
10619 case NB_EV_APPLY:
10620 /* TODO: implement me. */
10621 break;
10622 }
10623
10624 return NB_OK;
10625 }
10626
10627 /*
10628 * XPath:
10629 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/rmap-policy-export
10630 */
10631 int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_rmap_policy_export_modify(
10632 struct nb_cb_modify_args *args)
10633 {
10634 switch (args->event) {
10635 case NB_EV_VALIDATE:
10636 case NB_EV_PREPARE:
10637 case NB_EV_ABORT:
10638 case NB_EV_APPLY:
10639 /* TODO: implement me. */
10640 break;
10641 }
10642
10643 return NB_OK;
10644 }
10645
10646 int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_rmap_policy_export_destroy(
10647 struct nb_cb_destroy_args *args)
10648 {
10649 switch (args->event) {
10650 case NB_EV_VALIDATE:
10651 case NB_EV_PREPARE:
10652 case NB_EV_ABORT:
10653 case NB_EV_APPLY:
10654 /* TODO: implement me. */
10655 break;
10656 }
10657
10658 return NB_OK;
10659 }
10660
10661 /*
10662 * XPath:
10663 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/origin
10664 */
10665 int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_origin_modify(
10666 struct nb_cb_modify_args *args)
10667 {
10668 switch (args->event) {
10669 case NB_EV_VALIDATE:
10670 case NB_EV_PREPARE:
10671 case NB_EV_ABORT:
10672 case NB_EV_APPLY:
10673 /* TODO: implement me. */
10674 break;
10675 }
10676
10677 return NB_OK;
10678 }
10679
10680 /*
10681 * XPath:
10682 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/match-med
10683 */
10684 int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_match_med_modify(
10685 struct nb_cb_modify_args *args)
10686 {
10687 switch (args->event) {
10688 case NB_EV_VALIDATE:
10689 case NB_EV_PREPARE:
10690 case NB_EV_ABORT:
10691 case NB_EV_APPLY:
10692 /* TODO: implement me. */
10693 break;
10694 }
10695
10696 return NB_OK;
10697 }
10698
10699 /*
10700 * XPath:
10701 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/suppress-map
10702 */
10703 int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_suppress_map_modify(
10704 struct nb_cb_modify_args *args)
10705 {
10706 switch (args->event) {
10707 case NB_EV_VALIDATE:
10708 case NB_EV_PREPARE:
10709 case NB_EV_ABORT:
10710 case NB_EV_APPLY:
10711 /* TODO: implement me. */
10712 break;
10713 }
10714
10715 return NB_OK;
10716 }
10717
10718 int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_suppress_map_destroy(
10719 struct nb_cb_destroy_args *args)
10720 {
10721 switch (args->event) {
10722 case NB_EV_VALIDATE:
10723 case NB_EV_PREPARE:
10724 case NB_EV_ABORT:
10725 case NB_EV_APPLY:
10726 /* TODO: implement me. */
10727 break;
10728 }
10729
10730 return NB_OK;
10731 }
10732
10733 /*
10734 * XPath:
10735 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance-route
10736 */
10737 int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_create(
10738 struct nb_cb_create_args *args)
10739 {
10740 switch (args->event) {
10741 case NB_EV_VALIDATE:
10742 case NB_EV_PREPARE:
10743 case NB_EV_ABORT:
10744 case NB_EV_APPLY:
10745 /* TODO: implement me. */
10746 break;
10747 }
10748
10749 return NB_OK;
10750 }
10751
10752 int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_destroy(
10753 struct nb_cb_destroy_args *args)
10754 {
10755 switch (args->event) {
10756 case NB_EV_VALIDATE:
10757 case NB_EV_PREPARE:
10758 case NB_EV_ABORT:
10759 return NB_OK;
10760 case NB_EV_APPLY:
10761 return bgp_global_afi_safi_admin_distance_route_destroy(args);
10762 }
10763
10764 return NB_OK;
10765 }
10766
10767 /*
10768 * XPath:
10769 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance-route/distance
10770 */
10771 int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_distance_modify(
10772 struct nb_cb_modify_args *args)
10773 {
10774 switch (args->event) {
10775 case NB_EV_VALIDATE:
10776 case NB_EV_PREPARE:
10777 case NB_EV_ABORT:
10778 case NB_EV_APPLY:
10779 /* TODO: implement me. */
10780 break;
10781 }
10782
10783 return NB_OK;
10784 }
10785
10786 /*
10787 * XPath:
10788 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance-route/access-list-policy-export
10789 */
10790 int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_access_list_policy_export_modify(
10791 struct nb_cb_modify_args *args)
10792 {
10793 switch (args->event) {
10794 case NB_EV_VALIDATE:
10795 case NB_EV_PREPARE:
10796 case NB_EV_ABORT:
10797 case NB_EV_APPLY:
10798 /* TODO: implement me. */
10799 break;
10800 }
10801
10802 return NB_OK;
10803 }
10804
10805 int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_access_list_policy_export_destroy(
10806 struct nb_cb_destroy_args *args)
10807 {
10808 switch (args->event) {
10809 case NB_EV_VALIDATE:
10810 case NB_EV_PREPARE:
10811 case NB_EV_ABORT:
10812 case NB_EV_APPLY:
10813 /* TODO: implement me. */
10814 break;
10815 }
10816
10817 return NB_OK;
10818 }
10819
10820 /*
10821 * XPath:
10822 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/enable
10823 */
10824 int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_enable_modify(
10825 struct nb_cb_modify_args *args)
10826 {
10827 switch (args->event) {
10828 case NB_EV_VALIDATE:
10829 return bgp_global_afi_safi_route_flap_validation(args);
10830 case NB_EV_PREPARE:
10831 case NB_EV_ABORT:
10832 case NB_EV_APPLY:
10833 break;
10834 }
10835
10836 return NB_OK;
10837 }
10838
10839 /*
10840 * XPath:
10841 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/reach-decay
10842 */
10843 int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reach_decay_modify(
10844 struct nb_cb_modify_args *args)
10845 {
10846 switch (args->event) {
10847 case NB_EV_VALIDATE:
10848 case NB_EV_PREPARE:
10849 case NB_EV_ABORT:
10850 case NB_EV_APPLY:
10851 /* TODO: implement me. */
10852 break;
10853 }
10854
10855 return NB_OK;
10856 }
10857
10858 int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reach_decay_destroy(
10859 struct nb_cb_destroy_args *args)
10860 {
10861 switch (args->event) {
10862 case NB_EV_VALIDATE:
10863 case NB_EV_PREPARE:
10864 case NB_EV_ABORT:
10865 case NB_EV_APPLY:
10866 /* TODO: implement me. */
10867 break;
10868 }
10869
10870 return NB_OK;
10871 }
10872
10873 /*
10874 * XPath:
10875 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/reuse-above
10876 */
10877 int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reuse_above_modify(
10878 struct nb_cb_modify_args *args)
10879 {
10880 int reuse = DEFAULT_REUSE;
10881 int suppress = DEFAULT_SUPPRESS;
10882
10883 switch (args->event) {
10884 case NB_EV_VALIDATE:
10885 if (yang_dnode_exists(args->dnode, "../suppress-above"))
10886 suppress = yang_dnode_get_uint16(args->dnode,
10887 "../suppress-above");
10888 reuse = yang_dnode_get_uint16(args->dnode, "../reuse-above");
10889 if (suppress < reuse) {
10890 snprintf(
10891 args->errmsg, args->errmsg_len,
10892 "Suppress value cannot be less than reuse value \n");
10893 return NB_ERR_VALIDATION;
10894 }
10895 break;
10896 case NB_EV_PREPARE:
10897 case NB_EV_ABORT:
10898 case NB_EV_APPLY:
10899 /* TODO: implement me. */
10900 break;
10901 }
10902
10903 return NB_OK;
10904 }
10905
10906 int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reuse_above_destroy(
10907 struct nb_cb_destroy_args *args)
10908 {
10909 switch (args->event) {
10910 case NB_EV_VALIDATE:
10911 case NB_EV_PREPARE:
10912 case NB_EV_ABORT:
10913 case NB_EV_APPLY:
10914 /* TODO: implement me. */
10915 break;
10916 }
10917
10918 return NB_OK;
10919 }
10920
10921 /*
10922 * XPath:
10923 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/suppress-above
10924 */
10925 int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_suppress_above_modify(
10926 struct nb_cb_modify_args *args)
10927 {
10928 switch (args->event) {
10929 case NB_EV_VALIDATE:
10930 case NB_EV_PREPARE:
10931 case NB_EV_ABORT:
10932 case NB_EV_APPLY:
10933 /* TODO: implement me. */
10934 break;
10935 }
10936
10937 return NB_OK;
10938 }
10939
10940 int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_suppress_above_destroy(
10941 struct nb_cb_destroy_args *args)
10942 {
10943 switch (args->event) {
10944 case NB_EV_VALIDATE:
10945 case NB_EV_PREPARE:
10946 case NB_EV_ABORT:
10947 case NB_EV_APPLY:
10948 /* TODO: implement me. */
10949 break;
10950 }
10951
10952 return NB_OK;
10953 }
10954
10955 /*
10956 * XPath:
10957 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/unreach-decay
10958 */
10959 int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_unreach_decay_modify(
10960 struct nb_cb_modify_args *args)
10961 {
10962 switch (args->event) {
10963 case NB_EV_VALIDATE:
10964 case NB_EV_PREPARE:
10965 case NB_EV_ABORT:
10966 case NB_EV_APPLY:
10967 /* TODO: implement me. */
10968 break;
10969 }
10970
10971 return NB_OK;
10972 }
10973
10974 int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_unreach_decay_destroy(
10975 struct nb_cb_destroy_args *args)
10976 {
10977 switch (args->event) {
10978 case NB_EV_VALIDATE:
10979 case NB_EV_PREPARE:
10980 case NB_EV_ABORT:
10981 case NB_EV_APPLY:
10982 /* TODO: implement me. */
10983 break;
10984 }
10985
10986 return NB_OK;
10987 }
10988
10989 /*
10990 * XPath:
10991 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/use-multiple-paths/ebgp/maximum-paths
10992 */
10993 int bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
10994 struct nb_cb_modify_args *args)
10995 {
10996 uint16_t maxpaths;
10997
10998 switch (args->event) {
10999 case NB_EV_VALIDATE:
11000 maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
11001 if (maxpaths > multipath_num) {
11002 snprintf(args->errmsg, args->errmsg_len,
11003 "maxpaths %u is out of range %u", maxpaths,
11004 multipath_num);
11005 return NB_ERR_VALIDATION;
11006 }
11007 break;
11008 case NB_EV_PREPARE:
11009 case NB_EV_ABORT:
11010 return NB_OK;
11011 case NB_EV_APPLY:
11012 return bgp_global_afi_safi_ip_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
11013 args);
11014 }
11015
11016 return NB_OK;
11017 }
11018
11019 /*
11020 * XPath:
11021 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/use-multiple-paths/ibgp/maximum-paths
11022 */
11023 int bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ibgp_maximum_paths_modify(
11024 struct nb_cb_modify_args *args)
11025 {
11026 switch (args->event) {
11027 case NB_EV_VALIDATE:
11028 case NB_EV_PREPARE:
11029 case NB_EV_ABORT:
11030 case NB_EV_APPLY:
11031 /* TODO: implement me. */
11032 break;
11033 }
11034
11035 return NB_OK;
11036 }
11037
11038 /*
11039 * XPath:
11040 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/use-multiple-paths/ibgp/cluster-length-list
11041 */
11042 int bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ibgp_cluster_length_list_modify(
11043 struct nb_cb_modify_args *args)
11044 {
11045 switch (args->event) {
11046 case NB_EV_VALIDATE:
11047 case NB_EV_PREPARE:
11048 case NB_EV_ABORT:
11049 case NB_EV_APPLY:
11050 /* TODO: implement me. */
11051 break;
11052 }
11053
11054 return NB_OK;
11055 }
11056
11057 int bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
11058 struct nb_cb_destroy_args *args)
11059 {
11060 switch (args->event) {
11061 case NB_EV_VALIDATE:
11062 case NB_EV_PREPARE:
11063 case NB_EV_ABORT:
11064 case NB_EV_APPLY:
11065 /* TODO: implement me. */
11066 break;
11067 }
11068
11069 return NB_OK;
11070 }
11071
11072 /*
11073 * XPath:
11074 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/redistribution-list
11075 */
11076 int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_create(
11077 struct nb_cb_create_args *args)
11078 {
11079 switch (args->event) {
11080 case NB_EV_VALIDATE:
11081 case NB_EV_PREPARE:
11082 case NB_EV_ABORT:
11083 case NB_EV_APPLY:
11084 /* TODO: implement me. */
11085 break;
11086 }
11087
11088 return NB_OK;
11089 }
11090
11091 int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_destroy(
11092 struct nb_cb_destroy_args *args)
11093 {
11094 const struct lyd_node *af_dnode;
11095 struct bgp *bgp;
11096 const char *af_name;
11097 afi_t afi;
11098 safi_t safi;
11099 int route_type;
11100 int route_instance;
11101
11102 switch (args->event) {
11103 case NB_EV_VALIDATE:
11104 case NB_EV_PREPARE:
11105 case NB_EV_ABORT:
11106 return NB_OK;
11107 case NB_EV_APPLY:
11108 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
11109 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
11110 yang_afi_safi_identity2value(af_name, &afi, &safi);
11111 bgp = nb_running_get_entry(af_dnode, NULL, true);
11112
11113 route_type = yang_dnode_get_enum(args->dnode, "./route-type");
11114 route_instance =
11115 yang_dnode_get_uint16(args->dnode, "./route-instance");
11116
11117 bgp_redistribute_unset(bgp, afi, route_type, route_instance);
11118
11119 break;
11120 }
11121
11122 return NB_OK;
11123 }
11124
11125 /*
11126 * XPath:
11127 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/redistribution-list/metric
11128 */
11129 int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_metric_modify(
11130 struct nb_cb_modify_args *args)
11131 {
11132 switch (args->event) {
11133 case NB_EV_VALIDATE:
11134 case NB_EV_PREPARE:
11135 case NB_EV_ABORT:
11136 case NB_EV_APPLY:
11137 /* TODO: implement me. */
11138 break;
11139 }
11140
11141 return NB_OK;
11142 }
11143
11144 int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_metric_destroy(
11145 struct nb_cb_destroy_args *args)
11146 {
11147 switch (args->event) {
11148 case NB_EV_VALIDATE:
11149 case NB_EV_PREPARE:
11150 case NB_EV_ABORT:
11151 case NB_EV_APPLY:
11152 /* TODO: implement me. */
11153 break;
11154 }
11155
11156 return NB_OK;
11157 }
11158
11159 /*
11160 * XPath:
11161 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/redistribution-list/rmap-policy-import
11162 */
11163 int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_rmap_policy_import_modify(
11164 struct nb_cb_modify_args *args)
11165 {
11166 switch (args->event) {
11167 case NB_EV_VALIDATE:
11168 case NB_EV_PREPARE:
11169 case NB_EV_ABORT:
11170 case NB_EV_APPLY:
11171 /* TODO: implement me. */
11172 break;
11173 }
11174
11175 return NB_OK;
11176 }
11177
11178 int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_rmap_policy_import_destroy(
11179 struct nb_cb_destroy_args *args)
11180 {
11181 switch (args->event) {
11182 case NB_EV_VALIDATE:
11183 case NB_EV_PREPARE:
11184 case NB_EV_ABORT:
11185 case NB_EV_APPLY:
11186 /* TODO: implement me. */
11187 break;
11188 }
11189
11190 return NB_OK;
11191 }
11192
11193 /*
11194 * XPath:
11195 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance
11196 */
11197 void bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_apply_finish(
11198 struct nb_cb_apply_finish_args *args)
11199 {
11200 bgp_global_afi_safis_admin_distance_modify(args);
11201 }
11202
11203 /*
11204 * XPath:
11205 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance/external
11206 */
11207 int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_external_modify(
11208 struct nb_cb_modify_args *args)
11209 {
11210 /* Handled in admin_distance_apply_finish callback */
11211
11212 return NB_OK;
11213 }
11214
11215 /*
11216 * XPath:
11217 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance/internal
11218 */
11219 int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_internal_modify(
11220 struct nb_cb_modify_args *args)
11221 {
11222 /* Handled in admin_distance_apply_finish callback */
11223
11224 return NB_OK;
11225 }
11226
11227 /*
11228 * XPath:
11229 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance/local
11230 */
11231 int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_local_modify(
11232 struct nb_cb_modify_args *args)
11233 {
11234 /* Handled in admin_distance_apply_finish callback */
11235
11236 return NB_OK;
11237 }
11238
11239 /*
11240 * XPath:
11241 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-export
11242 */
11243 int bgp_global_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify(
11244 struct nb_cb_modify_args *args)
11245 {
11246 switch (args->event) {
11247 case NB_EV_VALIDATE:
11248 case NB_EV_PREPARE:
11249 case NB_EV_ABORT:
11250 case NB_EV_APPLY:
11251 /* TODO: implement me. */
11252 break;
11253 }
11254
11255 return NB_OK;
11256 }
11257
11258 int bgp_global_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy(
11259 struct nb_cb_destroy_args *args)
11260 {
11261 switch (args->event) {
11262 case NB_EV_VALIDATE:
11263 case NB_EV_PREPARE:
11264 case NB_EV_ABORT:
11265 case NB_EV_APPLY:
11266 /* TODO: implement me. */
11267 break;
11268 }
11269
11270 return NB_OK;
11271 }
11272
11273 /*
11274 * XPath:
11275 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/rd
11276 */
11277 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rd_modify(
11278 struct nb_cb_modify_args *args)
11279 {
11280 struct bgp *bgp;
11281 const struct lyd_node *af_dnode;
11282 const char *af_name;
11283 afi_t afi;
11284 safi_t safi;
11285
11286 switch (args->event) {
11287 case NB_EV_VALIDATE:
11288 bgp = nb_running_get_entry(args->dnode, NULL, false);
11289 if (!bgp)
11290 return NB_OK;
11291
11292 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
11293 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
11294 yang_afi_safi_identity2value(af_name, &afi, &safi);
11295
11296 if (!vpn_policy_check_import(bgp, afi, safi, false,
11297 args->errmsg, args->errmsg_len))
11298 return NB_ERR_VALIDATION;
11299
11300 break;
11301 case NB_EV_PREPARE:
11302 case NB_EV_ABORT:
11303 return NB_OK;
11304 case NB_EV_APPLY:
11305 return bgp_global_afi_safi_ip_unicast_vpn_config_rd_modify(
11306 args);
11307 }
11308
11309 return NB_OK;
11310 }
11311
11312 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rd_destroy(
11313 struct nb_cb_destroy_args *args)
11314 {
11315 switch (args->event) {
11316 case NB_EV_VALIDATE:
11317 case NB_EV_PREPARE:
11318 case NB_EV_ABORT:
11319 return NB_OK;
11320 case NB_EV_APPLY:
11321 return bgp_global_afi_safi_ip_unicast_vpn_config_rd_destroy(
11322 args);
11323 }
11324
11325 return NB_OK;
11326 }
11327
11328 /*
11329 * XPath:
11330 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/label
11331 */
11332 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_modify(
11333 struct nb_cb_modify_args *args)
11334 {
11335 switch (args->event) {
11336 case NB_EV_VALIDATE:
11337 case NB_EV_PREPARE:
11338 case NB_EV_ABORT:
11339 case NB_EV_APPLY:
11340 /* TODO: implement me. */
11341 break;
11342 }
11343
11344 return NB_OK;
11345 }
11346
11347 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_destroy(
11348 struct nb_cb_destroy_args *args)
11349 {
11350 switch (args->event) {
11351 case NB_EV_VALIDATE:
11352 case NB_EV_PREPARE:
11353 case NB_EV_ABORT:
11354 case NB_EV_APPLY:
11355 /* TODO: implement me. */
11356 break;
11357 }
11358
11359 return NB_OK;
11360 }
11361
11362 /*
11363 * XPath:
11364 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/label-auto
11365 */
11366 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_auto_modify(
11367 struct nb_cb_modify_args *args)
11368 {
11369 switch (args->event) {
11370 case NB_EV_VALIDATE:
11371 case NB_EV_PREPARE:
11372 case NB_EV_ABORT:
11373 case NB_EV_APPLY:
11374 /* TODO: implement me. */
11375 break;
11376 }
11377
11378 return NB_OK;
11379 }
11380
11381 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_auto_destroy(
11382 struct nb_cb_destroy_args *args)
11383 {
11384 switch (args->event) {
11385 case NB_EV_VALIDATE:
11386 case NB_EV_PREPARE:
11387 case NB_EV_ABORT:
11388 case NB_EV_APPLY:
11389 /* TODO: implement me. */
11390 break;
11391 }
11392
11393 return NB_OK;
11394 }
11395
11396 /*
11397 * XPath:
11398 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/nexthop
11399 */
11400 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_nexthop_modify(
11401 struct nb_cb_modify_args *args)
11402 {
11403 struct bgp *bgp;
11404 const struct lyd_node *af_dnode;
11405 const char *af_name;
11406 afi_t afi;
11407 safi_t safi;
11408
11409 switch (args->event) {
11410 case NB_EV_VALIDATE:
11411 bgp = nb_running_get_entry(args->dnode, NULL, false);
11412 if (!bgp)
11413 return NB_OK;
11414
11415 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
11416 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
11417 yang_afi_safi_identity2value(af_name, &afi, &safi);
11418
11419 if (!vpn_policy_check_import(bgp, afi, safi, false,
11420 args->errmsg, args->errmsg_len))
11421 return NB_ERR_VALIDATION;
11422
11423 break;
11424 case NB_EV_PREPARE:
11425 case NB_EV_ABORT:
11426 return NB_OK;
11427 case NB_EV_APPLY:
11428 return bgp_global_afi_safi_ip_unicast_vpn_config_nexthop_modify(
11429 args);
11430 }
11431
11432 return NB_OK;
11433 }
11434
11435 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_nexthop_destroy(
11436 struct nb_cb_destroy_args *args)
11437 {
11438 switch (args->event) {
11439 case NB_EV_VALIDATE:
11440 case NB_EV_PREPARE:
11441 case NB_EV_ABORT:
11442 return NB_OK;
11443 case NB_EV_APPLY:
11444 return bgp_global_afi_safi_ip_unicast_vpn_config_nexthop_destroy(
11445 args);
11446 }
11447
11448 return NB_OK;
11449 }
11450
11451 /*
11452 * XPath:
11453 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/import-vpn
11454 */
11455 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vpn_modify(
11456 struct nb_cb_modify_args *args)
11457 {
11458 switch (args->event) {
11459 case NB_EV_VALIDATE:
11460 case NB_EV_PREPARE:
11461 case NB_EV_ABORT:
11462 case NB_EV_APPLY:
11463 /* TODO: implement me. */
11464 break;
11465 }
11466
11467 return NB_OK;
11468 }
11469
11470 /*
11471 * XPath:
11472 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/export-vpn
11473 */
11474 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_vpn_modify(
11475 struct nb_cb_modify_args *args)
11476 {
11477 switch (args->event) {
11478 case NB_EV_VALIDATE:
11479 case NB_EV_PREPARE:
11480 case NB_EV_ABORT:
11481 case NB_EV_APPLY:
11482 /* TODO: implement me. */
11483 break;
11484 }
11485
11486 return NB_OK;
11487 }
11488
11489 /*
11490 * XPath:
11491 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/import-vrf-list
11492 */
11493 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vrf_list_create(
11494 struct nb_cb_create_args *args)
11495 {
11496 struct bgp *bgp;
11497 const struct lyd_node *af_dnode;
11498 const char *af_name;
11499 afi_t afi;
11500 safi_t safi;
11501
11502 switch (args->event) {
11503 case NB_EV_VALIDATE:
11504 bgp = nb_running_get_entry(args->dnode, NULL, false);
11505 if (!bgp)
11506 return NB_OK;
11507 af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
11508 af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
11509 yang_afi_safi_identity2value(af_name, &afi, &safi);
11510
11511 if (!vpn_policy_check_import(bgp, afi, safi, true, args->errmsg,
11512 args->errmsg_len))
11513 return NB_ERR_VALIDATION;
11514
11515 break;
11516 case NB_EV_PREPARE:
11517 case NB_EV_ABORT:
11518 return NB_OK;
11519 case NB_EV_APPLY:
11520 return bgp_global_afi_safi_ip_unicast_vpn_config_import_vrfs_create(
11521 args);
11522 }
11523
11524 return NB_OK;
11525 }
11526
11527 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vrf_list_destroy(
11528 struct nb_cb_destroy_args *args)
11529 {
11530 switch (args->event) {
11531 case NB_EV_VALIDATE:
11532 case NB_EV_PREPARE:
11533 case NB_EV_ABORT:
11534 return NB_OK;
11535 case NB_EV_APPLY:
11536 return bgp_global_afi_safi_ip_unicast_vpn_config_import_vrf_list_destroy(
11537 args);
11538 }
11539
11540 return NB_OK;
11541 }
11542
11543 /*
11544 * XPath:
11545 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/rmap-import
11546 */
11547 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_import_modify(
11548 struct nb_cb_modify_args *args)
11549 {
11550 switch (args->event) {
11551 case NB_EV_VALIDATE:
11552 case NB_EV_PREPARE:
11553 case NB_EV_ABORT:
11554 return NB_OK;
11555 case NB_EV_APPLY:
11556 return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_modify(
11557 args, "import");
11558 }
11559
11560 return NB_OK;
11561 }
11562
11563 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_import_destroy(
11564 struct nb_cb_destroy_args *args)
11565 {
11566 switch (args->event) {
11567 case NB_EV_VALIDATE:
11568 case NB_EV_PREPARE:
11569 case NB_EV_ABORT:
11570 return NB_OK;
11571 case NB_EV_APPLY:
11572 return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_destroy(
11573 args, "import");
11574 }
11575
11576 return NB_OK;
11577 }
11578
11579 /*
11580 * XPath:
11581 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/rmap-export
11582 */
11583 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_export_modify(
11584 struct nb_cb_modify_args *args)
11585 {
11586 switch (args->event) {
11587 case NB_EV_VALIDATE:
11588 case NB_EV_PREPARE:
11589 case NB_EV_ABORT:
11590 return NB_OK;
11591 case NB_EV_APPLY:
11592 return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_modify(
11593 args, "export");
11594 }
11595
11596 return NB_OK;
11597 }
11598
11599 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_export_destroy(
11600 struct nb_cb_destroy_args *args)
11601 {
11602 switch (args->event) {
11603 case NB_EV_VALIDATE:
11604 case NB_EV_PREPARE:
11605 case NB_EV_ABORT:
11606 return NB_OK;
11607 case NB_EV_APPLY:
11608 return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_destroy(
11609 args, "export");
11610 }
11611
11612 return NB_OK;
11613 }
11614
11615 /*
11616 * XPath:
11617 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/redirect-rt
11618 */
11619 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_redirect_rt_modify(
11620 struct nb_cb_modify_args *args)
11621 {
11622 switch (args->event) {
11623 case NB_EV_VALIDATE:
11624 case NB_EV_PREPARE:
11625 case NB_EV_ABORT:
11626 case NB_EV_APPLY:
11627 /* TODO: implement me. */
11628 break;
11629 }
11630
11631 return NB_OK;
11632 }
11633
11634 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_redirect_rt_destroy(
11635 struct nb_cb_destroy_args *args)
11636 {
11637 switch (args->event) {
11638 case NB_EV_VALIDATE:
11639 case NB_EV_PREPARE:
11640 case NB_EV_ABORT:
11641 case NB_EV_APPLY:
11642 /* TODO: implement me. */
11643 break;
11644 }
11645
11646 return NB_OK;
11647 }
11648
11649 /*
11650 * XPath:
11651 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/import-rt-list
11652 */
11653 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_rt_list_create(
11654 struct nb_cb_create_args *args)
11655 {
11656 switch (args->event) {
11657 case NB_EV_VALIDATE:
11658 case NB_EV_PREPARE:
11659 case NB_EV_ABORT:
11660 case NB_EV_APPLY:
11661 /* TODO: implement me. */
11662 break;
11663 }
11664
11665 return NB_OK;
11666 }
11667
11668 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_rt_list_destroy(
11669 struct nb_cb_destroy_args *args)
11670 {
11671 switch (args->event) {
11672 case NB_EV_VALIDATE:
11673 case NB_EV_PREPARE:
11674 case NB_EV_ABORT:
11675 case NB_EV_APPLY:
11676 /* TODO: implement me. */
11677 break;
11678 }
11679
11680 return NB_OK;
11681 }
11682
11683 /*
11684 * XPath:
11685 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/export-rt-list
11686 */
11687 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_rt_list_create(
11688 struct nb_cb_create_args *args)
11689 {
11690 switch (args->event) {
11691 case NB_EV_VALIDATE:
11692 case NB_EV_PREPARE:
11693 case NB_EV_ABORT:
11694 case NB_EV_APPLY:
11695 /* TODO: implement me. */
11696 break;
11697 }
11698
11699 return NB_OK;
11700 }
11701
11702 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_rt_list_destroy(
11703 struct nb_cb_destroy_args *args)
11704 {
11705 switch (args->event) {
11706 case NB_EV_VALIDATE:
11707 case NB_EV_PREPARE:
11708 case NB_EV_ABORT:
11709 case NB_EV_APPLY:
11710 /* TODO: implement me. */
11711 break;
11712 }
11713
11714 return NB_OK;
11715 }
11716
11717 /*
11718 * XPath:
11719 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/rt-list
11720 */
11721 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rt_list_create(
11722 struct nb_cb_create_args *args)
11723 {
11724 switch (args->event) {
11725 case NB_EV_VALIDATE:
11726 case NB_EV_PREPARE:
11727 case NB_EV_ABORT:
11728 case NB_EV_APPLY:
11729 /* TODO: implement me. */
11730 break;
11731 }
11732
11733 return NB_OK;
11734 }
11735
11736 int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rt_list_destroy(
11737 struct nb_cb_destroy_args *args)
11738 {
11739 switch (args->event) {
11740 case NB_EV_VALIDATE:
11741 case NB_EV_PREPARE:
11742 case NB_EV_ABORT:
11743 case NB_EV_APPLY:
11744 /* TODO: implement me. */
11745 break;
11746 }
11747
11748 return NB_OK;
11749 }
11750
11751 /*
11752 * XPath:
11753 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/use-multiple-paths/ebgp/maximum-paths
11754 */
11755 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
11756 struct nb_cb_modify_args *args)
11757 {
11758 uint16_t maxpaths;
11759
11760 switch (args->event) {
11761 case NB_EV_VALIDATE:
11762 maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
11763 if (maxpaths > multipath_num) {
11764 snprintf(args->errmsg, args->errmsg_len,
11765 "maxpaths %u is out of range %u", maxpaths,
11766 multipath_num);
11767 return NB_ERR_VALIDATION;
11768 }
11769 break;
11770 case NB_EV_PREPARE:
11771 case NB_EV_ABORT:
11772 return NB_OK;
11773 case NB_EV_APPLY:
11774 return bgp_global_afi_safi_ip_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
11775 args);
11776 }
11777
11778 return NB_OK;
11779 }
11780
11781 /*
11782 * XPath:
11783 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/use-multiple-paths/ibgp/maximum-paths
11784 */
11785 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_maximum_paths_modify(
11786 struct nb_cb_modify_args *args)
11787 {
11788 switch (args->event) {
11789 case NB_EV_VALIDATE:
11790 case NB_EV_PREPARE:
11791 case NB_EV_ABORT:
11792 case NB_EV_APPLY:
11793 /* TODO: implement me. */
11794 break;
11795 }
11796
11797 return NB_OK;
11798 }
11799
11800 /*
11801 * XPath:
11802 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/use-multiple-paths/ibgp/cluster-length-list
11803 */
11804 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_modify(
11805 struct nb_cb_modify_args *args)
11806 {
11807 switch (args->event) {
11808 case NB_EV_VALIDATE:
11809 case NB_EV_PREPARE:
11810 case NB_EV_ABORT:
11811 case NB_EV_APPLY:
11812 /* TODO: implement me. */
11813 break;
11814 }
11815
11816 return NB_OK;
11817 }
11818
11819 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
11820 struct nb_cb_destroy_args *args)
11821 {
11822 switch (args->event) {
11823 case NB_EV_VALIDATE:
11824 case NB_EV_PREPARE:
11825 case NB_EV_ABORT:
11826 case NB_EV_APPLY:
11827 /* TODO: implement me. */
11828 break;
11829 }
11830
11831 return NB_OK;
11832 }
11833
11834 /*
11835 * XPath:
11836 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/enable
11837 */
11838 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_enable_modify(
11839 struct nb_cb_modify_args *args)
11840 {
11841 switch (args->event) {
11842 case NB_EV_VALIDATE:
11843 return bgp_global_afi_safi_route_flap_validation(args);
11844 case NB_EV_PREPARE:
11845 case NB_EV_ABORT:
11846 case NB_EV_APPLY:
11847 break;
11848 }
11849
11850 return NB_OK;
11851 }
11852
11853 /*
11854 * XPath:
11855 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/reach-decay
11856 */
11857 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reach_decay_modify(
11858 struct nb_cb_modify_args *args)
11859 {
11860 switch (args->event) {
11861 case NB_EV_VALIDATE:
11862 case NB_EV_PREPARE:
11863 case NB_EV_ABORT:
11864 case NB_EV_APPLY:
11865 /* TODO: implement me. */
11866 break;
11867 }
11868
11869 return NB_OK;
11870 }
11871
11872 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reach_decay_destroy(
11873 struct nb_cb_destroy_args *args)
11874 {
11875 switch (args->event) {
11876 case NB_EV_VALIDATE:
11877 case NB_EV_PREPARE:
11878 case NB_EV_ABORT:
11879 case NB_EV_APPLY:
11880 /* TODO: implement me. */
11881 break;
11882 }
11883
11884 return NB_OK;
11885 }
11886
11887 /*
11888 * XPath:
11889 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/reuse-above
11890 */
11891 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reuse_above_modify(
11892 struct nb_cb_modify_args *args)
11893 {
11894 switch (args->event) {
11895 case NB_EV_VALIDATE:
11896 case NB_EV_PREPARE:
11897 case NB_EV_ABORT:
11898 case NB_EV_APPLY:
11899 /* TODO: implement me. */
11900 break;
11901 }
11902
11903 return NB_OK;
11904 }
11905
11906 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reuse_above_destroy(
11907 struct nb_cb_destroy_args *args)
11908 {
11909 switch (args->event) {
11910 case NB_EV_VALIDATE:
11911 case NB_EV_PREPARE:
11912 case NB_EV_ABORT:
11913 case NB_EV_APPLY:
11914 /* TODO: implement me. */
11915 break;
11916 }
11917
11918 return NB_OK;
11919 }
11920
11921 /*
11922 * XPath:
11923 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/suppress-above
11924 */
11925 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_suppress_above_modify(
11926 struct nb_cb_modify_args *args)
11927 {
11928 switch (args->event) {
11929 case NB_EV_VALIDATE:
11930 case NB_EV_PREPARE:
11931 case NB_EV_ABORT:
11932 case NB_EV_APPLY:
11933 /* TODO: implement me. */
11934 break;
11935 }
11936
11937 return NB_OK;
11938 }
11939
11940 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_suppress_above_destroy(
11941 struct nb_cb_destroy_args *args)
11942 {
11943 switch (args->event) {
11944 case NB_EV_VALIDATE:
11945 case NB_EV_PREPARE:
11946 case NB_EV_ABORT:
11947 case NB_EV_APPLY:
11948 /* TODO: implement me. */
11949 break;
11950 }
11951
11952 return NB_OK;
11953 }
11954
11955 /*
11956 * XPath:
11957 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/unreach-decay
11958 */
11959 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_unreach_decay_modify(
11960 struct nb_cb_modify_args *args)
11961 {
11962 switch (args->event) {
11963 case NB_EV_VALIDATE:
11964 case NB_EV_PREPARE:
11965 case NB_EV_ABORT:
11966 case NB_EV_APPLY:
11967 /* TODO: implement me. */
11968 break;
11969 }
11970
11971 return NB_OK;
11972 }
11973
11974 int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_unreach_decay_destroy(
11975 struct nb_cb_destroy_args *args)
11976 {
11977 switch (args->event) {
11978 case NB_EV_VALIDATE:
11979 case NB_EV_PREPARE:
11980 case NB_EV_ABORT:
11981 case NB_EV_APPLY:
11982 /* TODO: implement me. */
11983 break;
11984 }
11985
11986 return NB_OK;
11987 }
11988
11989 /*
11990 * XPath:
11991 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/use-multiple-paths/ebgp/maximum-paths
11992 */
11993 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
11994 struct nb_cb_modify_args *args)
11995 {
11996 uint16_t maxpaths;
11997
11998 switch (args->event) {
11999 case NB_EV_VALIDATE:
12000 maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
12001 if (maxpaths > multipath_num) {
12002 snprintf(args->errmsg, args->errmsg_len,
12003 "maxpaths %u is out of range %u", maxpaths,
12004 multipath_num);
12005 return NB_ERR_VALIDATION;
12006 }
12007 break;
12008 case NB_EV_PREPARE:
12009 case NB_EV_ABORT:
12010 return NB_OK;
12011 case NB_EV_APPLY:
12012 return bgp_global_afi_safi_ip_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
12013 args);
12014 }
12015
12016 return NB_OK;
12017 }
12018
12019 /*
12020 * XPath:
12021 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/use-multiple-paths/ibgp/maximum-paths
12022 */
12023 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ibgp_maximum_paths_modify(
12024 struct nb_cb_modify_args *args)
12025 {
12026 uint16_t maxpaths;
12027
12028 switch (args->event) {
12029 case NB_EV_VALIDATE:
12030 maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
12031 if (maxpaths > multipath_num) {
12032 snprintf(args->errmsg, args->errmsg_len,
12033 "maxpaths %u is out of range %u", maxpaths,
12034 multipath_num);
12035 return NB_ERR_VALIDATION;
12036 }
12037 break;
12038 case NB_EV_PREPARE:
12039 case NB_EV_ABORT:
12040 case NB_EV_APPLY:
12041 /* TODO: implement me. */
12042 break;
12043 }
12044
12045 return NB_OK;
12046 }
12047
12048 /*
12049 * XPath:
12050 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/use-multiple-paths/ibgp/cluster-length-list
12051 */
12052 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_modify(
12053 struct nb_cb_modify_args *args)
12054 {
12055 switch (args->event) {
12056 case NB_EV_VALIDATE:
12057 case NB_EV_PREPARE:
12058 case NB_EV_ABORT:
12059 case NB_EV_APPLY:
12060 /* TODO: implement me. */
12061 break;
12062 }
12063
12064 return NB_OK;
12065 }
12066
12067 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
12068 struct nb_cb_destroy_args *args)
12069 {
12070 switch (args->event) {
12071 case NB_EV_VALIDATE:
12072 case NB_EV_PREPARE:
12073 case NB_EV_ABORT:
12074 case NB_EV_APPLY:
12075 /* TODO: implement me. */
12076 break;
12077 }
12078
12079 return NB_OK;
12080 }
12081
12082 /*
12083 * XPath:
12084 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/enable
12085 */
12086 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_enable_modify(
12087 struct nb_cb_modify_args *args)
12088 {
12089 switch (args->event) {
12090 case NB_EV_VALIDATE:
12091 return bgp_global_afi_safi_route_flap_validation(args);
12092 case NB_EV_PREPARE:
12093 case NB_EV_ABORT:
12094 case NB_EV_APPLY:
12095 break;
12096 }
12097
12098 return NB_OK;
12099 }
12100
12101 /*
12102 * XPath:
12103 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/reach-decay
12104 */
12105 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reach_decay_modify(
12106 struct nb_cb_modify_args *args)
12107 {
12108 switch (args->event) {
12109 case NB_EV_VALIDATE:
12110 case NB_EV_PREPARE:
12111 case NB_EV_ABORT:
12112 case NB_EV_APPLY:
12113 /* TODO: implement me. */
12114 break;
12115 }
12116
12117 return NB_OK;
12118 }
12119
12120 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reach_decay_destroy(
12121 struct nb_cb_destroy_args *args)
12122 {
12123 switch (args->event) {
12124 case NB_EV_VALIDATE:
12125 case NB_EV_PREPARE:
12126 case NB_EV_ABORT:
12127 case NB_EV_APPLY:
12128 /* TODO: implement me. */
12129 break;
12130 }
12131
12132 return NB_OK;
12133 }
12134
12135 /*
12136 * XPath:
12137 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/reuse-above
12138 */
12139 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reuse_above_modify(
12140 struct nb_cb_modify_args *args)
12141 {
12142 switch (args->event) {
12143 case NB_EV_VALIDATE:
12144 case NB_EV_PREPARE:
12145 case NB_EV_ABORT:
12146 case NB_EV_APPLY:
12147 /* TODO: implement me. */
12148 break;
12149 }
12150
12151 return NB_OK;
12152 }
12153
12154 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reuse_above_destroy(
12155 struct nb_cb_destroy_args *args)
12156 {
12157 switch (args->event) {
12158 case NB_EV_VALIDATE:
12159 case NB_EV_PREPARE:
12160 case NB_EV_ABORT:
12161 case NB_EV_APPLY:
12162 /* TODO: implement me. */
12163 break;
12164 }
12165
12166 return NB_OK;
12167 }
12168
12169 /*
12170 * XPath:
12171 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/suppress-above
12172 */
12173 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_suppress_above_modify(
12174 struct nb_cb_modify_args *args)
12175 {
12176 switch (args->event) {
12177 case NB_EV_VALIDATE:
12178 case NB_EV_PREPARE:
12179 case NB_EV_ABORT:
12180 case NB_EV_APPLY:
12181 /* TODO: implement me. */
12182 break;
12183 }
12184
12185 return NB_OK;
12186 }
12187
12188 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_suppress_above_destroy(
12189 struct nb_cb_destroy_args *args)
12190 {
12191 switch (args->event) {
12192 case NB_EV_VALIDATE:
12193 case NB_EV_PREPARE:
12194 case NB_EV_ABORT:
12195 case NB_EV_APPLY:
12196 /* TODO: implement me. */
12197 break;
12198 }
12199
12200 return NB_OK;
12201 }
12202
12203 /*
12204 * XPath:
12205 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/unreach-decay
12206 */
12207 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_unreach_decay_modify(
12208 struct nb_cb_modify_args *args)
12209 {
12210 switch (args->event) {
12211 case NB_EV_VALIDATE:
12212 case NB_EV_PREPARE:
12213 case NB_EV_ABORT:
12214 case NB_EV_APPLY:
12215 /* TODO: implement me. */
12216 break;
12217 }
12218
12219 return NB_OK;
12220 }
12221
12222 int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_unreach_decay_destroy(
12223 struct nb_cb_destroy_args *args)
12224 {
12225 switch (args->event) {
12226 case NB_EV_VALIDATE:
12227 case NB_EV_PREPARE:
12228 case NB_EV_ABORT:
12229 case NB_EV_APPLY:
12230 /* TODO: implement me. */
12231 break;
12232 }
12233
12234 return NB_OK;
12235 }
12236
12237 /*
12238 * XPath:
12239 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/network-config
12240 */
12241 int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_create(
12242 struct nb_cb_create_args *args)
12243 {
12244 /* Handled in network_config_apply_finish callback */
12245
12246 return NB_OK;
12247 }
12248
12249 int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_destroy(
12250 struct nb_cb_destroy_args *args)
12251 {
12252 switch (args->event) {
12253 case NB_EV_VALIDATE:
12254 case NB_EV_PREPARE:
12255 case NB_EV_ABORT:
12256 return NB_OK;
12257 case NB_EV_APPLY:
12258 return bgp_global_afi_safis_afi_safi_network_config_destroy(
12259 args);
12260 break;
12261 }
12262
12263 return NB_OK;
12264 }
12265
12266 /*
12267 * XPath:
12268 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/network-config/backdoor
12269 */
12270 int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_backdoor_modify(
12271 struct nb_cb_modify_args *args)
12272 {
12273 switch (args->event) {
12274 case NB_EV_VALIDATE:
12275 case NB_EV_PREPARE:
12276 case NB_EV_ABORT:
12277 case NB_EV_APPLY:
12278 /* TODO: implement me. */
12279 break;
12280 }
12281
12282 return NB_OK;
12283 }
12284
12285 /*
12286 * XPath:
12287 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/network-config/label-index
12288 */
12289 int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_label_index_modify(
12290 struct nb_cb_modify_args *args)
12291 {
12292 switch (args->event) {
12293 case NB_EV_VALIDATE:
12294 case NB_EV_PREPARE:
12295 case NB_EV_ABORT:
12296 case NB_EV_APPLY:
12297 /* TODO: implement me. */
12298 break;
12299 }
12300
12301 return NB_OK;
12302 }
12303
12304 int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_label_index_destroy(
12305 struct nb_cb_destroy_args *args)
12306 {
12307 switch (args->event) {
12308 case NB_EV_VALIDATE:
12309 case NB_EV_PREPARE:
12310 case NB_EV_ABORT:
12311 case NB_EV_APPLY:
12312 /* TODO: implement me. */
12313 break;
12314 }
12315
12316 return NB_OK;
12317 }
12318
12319 /*
12320 * XPath:
12321 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/network-config/rmap-policy-export
12322 */
12323 int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_rmap_policy_export_modify(
12324 struct nb_cb_modify_args *args)
12325 {
12326 switch (args->event) {
12327 case NB_EV_VALIDATE:
12328 case NB_EV_PREPARE:
12329 case NB_EV_ABORT:
12330 case NB_EV_APPLY:
12331 /* TODO: implement me. */
12332 break;
12333 }
12334
12335 return NB_OK;
12336 }
12337
12338 int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_rmap_policy_export_destroy(
12339 struct nb_cb_destroy_args *args)
12340 {
12341 switch (args->event) {
12342 case NB_EV_VALIDATE:
12343 case NB_EV_PREPARE:
12344 case NB_EV_ABORT:
12345 case NB_EV_APPLY:
12346 /* TODO: implement me. */
12347 break;
12348 }
12349
12350 return NB_OK;
12351 }
12352
12353 /*
12354 * XPath:
12355 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route
12356 */
12357 int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_create(
12358 struct nb_cb_create_args *args)
12359 {
12360 switch (args->event) {
12361 case NB_EV_VALIDATE:
12362 case NB_EV_PREPARE:
12363 case NB_EV_ABORT:
12364 case NB_EV_APPLY:
12365 /* TODO: implement me. */
12366 break;
12367 }
12368
12369 return NB_OK;
12370 }
12371
12372 int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_destroy(
12373 struct nb_cb_destroy_args *args)
12374 {
12375 switch (args->event) {
12376 case NB_EV_VALIDATE:
12377 case NB_EV_PREPARE:
12378 case NB_EV_ABORT:
12379 case NB_EV_APPLY:
12380 /* TODO: implement me. */
12381 break;
12382 }
12383
12384 return NB_OK;
12385 }
12386
12387 /*
12388 * XPath:
12389 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/as-set
12390 */
12391 int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_as_set_modify(
12392 struct nb_cb_modify_args *args)
12393 {
12394 switch (args->event) {
12395 case NB_EV_VALIDATE:
12396 case NB_EV_PREPARE:
12397 case NB_EV_ABORT:
12398 case NB_EV_APPLY:
12399 /* TODO: implement me. */
12400 break;
12401 }
12402
12403 return NB_OK;
12404 }
12405
12406 /*
12407 * XPath:
12408 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/summary-only
12409 */
12410 int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_summary_only_modify(
12411 struct nb_cb_modify_args *args)
12412 {
12413 switch (args->event) {
12414 case NB_EV_VALIDATE:
12415 case NB_EV_PREPARE:
12416 case NB_EV_ABORT:
12417 case NB_EV_APPLY:
12418 /* TODO: implement me. */
12419 break;
12420 }
12421
12422 return NB_OK;
12423 }
12424
12425 /*
12426 * XPath:
12427 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/rmap-policy-export
12428 */
12429 int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_rmap_policy_export_modify(
12430 struct nb_cb_modify_args *args)
12431 {
12432 switch (args->event) {
12433 case NB_EV_VALIDATE:
12434 case NB_EV_PREPARE:
12435 case NB_EV_ABORT:
12436 case NB_EV_APPLY:
12437 /* TODO: implement me. */
12438 break;
12439 }
12440
12441 return NB_OK;
12442 }
12443
12444 int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_rmap_policy_export_destroy(
12445 struct nb_cb_destroy_args *args)
12446 {
12447 switch (args->event) {
12448 case NB_EV_VALIDATE:
12449 case NB_EV_PREPARE:
12450 case NB_EV_ABORT:
12451 case NB_EV_APPLY:
12452 /* TODO: implement me. */
12453 break;
12454 }
12455
12456 return NB_OK;
12457 }
12458
12459 /*
12460 * XPath:
12461 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/origin
12462 */
12463 int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_origin_modify(
12464 struct nb_cb_modify_args *args)
12465 {
12466 switch (args->event) {
12467 case NB_EV_VALIDATE:
12468 case NB_EV_PREPARE:
12469 case NB_EV_ABORT:
12470 case NB_EV_APPLY:
12471 /* TODO: implement me. */
12472 break;
12473 }
12474
12475 return NB_OK;
12476 }
12477
12478 /*
12479 * XPath:
12480 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/match-med
12481 */
12482 int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_match_med_modify(
12483 struct nb_cb_modify_args *args)
12484 {
12485 switch (args->event) {
12486 case NB_EV_VALIDATE:
12487 case NB_EV_PREPARE:
12488 case NB_EV_ABORT:
12489 case NB_EV_APPLY:
12490 /* TODO: implement me. */
12491 break;
12492 }
12493
12494 return NB_OK;
12495 }
12496
12497 /*
12498 * XPath:
12499 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/suppress-map
12500 */
12501 int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_suppress_map_modify(
12502 struct nb_cb_modify_args *args)
12503 {
12504 switch (args->event) {
12505 case NB_EV_VALIDATE:
12506 case NB_EV_PREPARE:
12507 case NB_EV_ABORT:
12508 case NB_EV_APPLY:
12509 /* TODO: implement me. */
12510 break;
12511 }
12512
12513 return NB_OK;
12514 }
12515
12516 int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_suppress_map_destroy(
12517 struct nb_cb_destroy_args *args)
12518 {
12519 switch (args->event) {
12520 case NB_EV_VALIDATE:
12521 case NB_EV_PREPARE:
12522 case NB_EV_ABORT:
12523 case NB_EV_APPLY:
12524 /* TODO: implement me. */
12525 break;
12526 }
12527
12528 return NB_OK;
12529 }
12530
12531 /*
12532 * XPath:
12533 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance-route
12534 */
12535 int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_create(
12536 struct nb_cb_create_args *args)
12537 {
12538 switch (args->event) {
12539 case NB_EV_VALIDATE:
12540 case NB_EV_PREPARE:
12541 case NB_EV_ABORT:
12542 case NB_EV_APPLY:
12543 /* TODO: implement me. */
12544 break;
12545 }
12546
12547 return NB_OK;
12548 }
12549
12550 int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_destroy(
12551 struct nb_cb_destroy_args *args)
12552 {
12553 switch (args->event) {
12554 case NB_EV_VALIDATE:
12555 case NB_EV_PREPARE:
12556 case NB_EV_ABORT:
12557 return NB_OK;
12558 case NB_EV_APPLY:
12559 return bgp_global_afi_safi_admin_distance_route_destroy(args);
12560 }
12561
12562 return NB_OK;
12563 }
12564
12565 /*
12566 * XPath:
12567 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance-route/distance
12568 */
12569 int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_distance_modify(
12570 struct nb_cb_modify_args *args)
12571 {
12572 switch (args->event) {
12573 case NB_EV_VALIDATE:
12574 case NB_EV_PREPARE:
12575 case NB_EV_ABORT:
12576 case NB_EV_APPLY:
12577 /* TODO: implement me. */
12578 break;
12579 }
12580
12581 return NB_OK;
12582 }
12583
12584 /*
12585 * XPath:
12586 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance-route/access-list-policy-export
12587 */
12588 int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_access_list_policy_export_modify(
12589 struct nb_cb_modify_args *args)
12590 {
12591 switch (args->event) {
12592 case NB_EV_VALIDATE:
12593 case NB_EV_PREPARE:
12594 case NB_EV_ABORT:
12595 case NB_EV_APPLY:
12596 /* TODO: implement me. */
12597 break;
12598 }
12599
12600 return NB_OK;
12601 }
12602
12603 int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_access_list_policy_export_destroy(
12604 struct nb_cb_destroy_args *args)
12605 {
12606 switch (args->event) {
12607 case NB_EV_VALIDATE:
12608 case NB_EV_PREPARE:
12609 case NB_EV_ABORT:
12610 case NB_EV_APPLY:
12611 /* TODO: implement me. */
12612 break;
12613 }
12614
12615 return NB_OK;
12616 }
12617
12618 /*
12619 * XPath:
12620 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance-route/distance
12621 */
12622 int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_distance_modify(
12623 struct nb_cb_modify_args *args)
12624 {
12625 switch (args->event) {
12626 case NB_EV_VALIDATE:
12627 case NB_EV_PREPARE:
12628 case NB_EV_ABORT:
12629 case NB_EV_APPLY:
12630 /* TODO: implement me. */
12631 break;
12632 }
12633
12634 return NB_OK;
12635 }
12636
12637 /*
12638 * XPath:
12639 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance-route/access-list-policy-export
12640 */
12641 int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_access_list_policy_export_modify(
12642 struct nb_cb_modify_args *args)
12643 {
12644 switch (args->event) {
12645 case NB_EV_VALIDATE:
12646 case NB_EV_PREPARE:
12647 case NB_EV_ABORT:
12648 case NB_EV_APPLY:
12649 /* TODO: implement me. */
12650 break;
12651 }
12652
12653 return NB_OK;
12654 }
12655
12656 int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_access_list_policy_export_destroy(
12657 struct nb_cb_destroy_args *args)
12658 {
12659 switch (args->event) {
12660 case NB_EV_VALIDATE:
12661 case NB_EV_PREPARE:
12662 case NB_EV_ABORT:
12663 case NB_EV_APPLY:
12664 /* TODO: implement me. */
12665 break;
12666 }
12667
12668 return NB_OK;
12669 }
12670
12671 /*
12672 * XPath:
12673 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/enable
12674 */
12675 int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_enable_modify(
12676 struct nb_cb_modify_args *args)
12677 {
12678 switch (args->event) {
12679 case NB_EV_VALIDATE:
12680 return bgp_global_afi_safi_route_flap_validation(args);
12681 case NB_EV_PREPARE:
12682 case NB_EV_ABORT:
12683 case NB_EV_APPLY:
12684 break;
12685 }
12686
12687 return NB_OK;
12688 }
12689
12690 /*
12691 * XPath:
12692 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/reach-decay
12693 */
12694 int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reach_decay_modify(
12695 struct nb_cb_modify_args *args)
12696 {
12697 switch (args->event) {
12698 case NB_EV_VALIDATE:
12699 case NB_EV_PREPARE:
12700 case NB_EV_ABORT:
12701 case NB_EV_APPLY:
12702 /* TODO: implement me. */
12703 break;
12704 }
12705
12706 return NB_OK;
12707 }
12708
12709 int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reach_decay_destroy(
12710 struct nb_cb_destroy_args *args)
12711 {
12712 switch (args->event) {
12713 case NB_EV_VALIDATE:
12714 case NB_EV_PREPARE:
12715 case NB_EV_ABORT:
12716 case NB_EV_APPLY:
12717 /* TODO: implement me. */
12718 break;
12719 }
12720
12721 return NB_OK;
12722 }
12723
12724 /*
12725 * XPath:
12726 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/reuse-above
12727 */
12728 int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reuse_above_modify(
12729 struct nb_cb_modify_args *args)
12730 {
12731 switch (args->event) {
12732 case NB_EV_VALIDATE:
12733 case NB_EV_PREPARE:
12734 case NB_EV_ABORT:
12735 case NB_EV_APPLY:
12736 /* TODO: implement me. */
12737 break;
12738 }
12739
12740 return NB_OK;
12741 }
12742
12743 int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reuse_above_destroy(
12744 struct nb_cb_destroy_args *args)
12745 {
12746 switch (args->event) {
12747 case NB_EV_VALIDATE:
12748 case NB_EV_PREPARE:
12749 case NB_EV_ABORT:
12750 case NB_EV_APPLY:
12751 /* TODO: implement me. */
12752 break;
12753 }
12754
12755 return NB_OK;
12756 }
12757
12758 /*
12759 * XPath:
12760 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/suppress-above
12761 */
12762 int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_suppress_above_modify(
12763 struct nb_cb_modify_args *args)
12764 {
12765 switch (args->event) {
12766 case NB_EV_VALIDATE:
12767 case NB_EV_PREPARE:
12768 case NB_EV_ABORT:
12769 case NB_EV_APPLY:
12770 /* TODO: implement me. */
12771 break;
12772 }
12773
12774 return NB_OK;
12775 }
12776
12777 int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_suppress_above_destroy(
12778 struct nb_cb_destroy_args *args)
12779 {
12780 switch (args->event) {
12781 case NB_EV_VALIDATE:
12782 case NB_EV_PREPARE:
12783 case NB_EV_ABORT:
12784 case NB_EV_APPLY:
12785 /* TODO: implement me. */
12786 break;
12787 }
12788
12789 return NB_OK;
12790 }
12791
12792 /*
12793 * XPath:
12794 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/unreach-decay
12795 */
12796 int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_unreach_decay_modify(
12797 struct nb_cb_modify_args *args)
12798 {
12799 switch (args->event) {
12800 case NB_EV_VALIDATE:
12801 case NB_EV_PREPARE:
12802 case NB_EV_ABORT:
12803 case NB_EV_APPLY:
12804 /* TODO: implement me. */
12805 break;
12806 }
12807
12808 return NB_OK;
12809 }
12810
12811 int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_unreach_decay_destroy(
12812 struct nb_cb_destroy_args *args)
12813 {
12814 switch (args->event) {
12815 case NB_EV_VALIDATE:
12816 case NB_EV_PREPARE:
12817 case NB_EV_ABORT:
12818 case NB_EV_APPLY:
12819 /* TODO: implement me. */
12820 break;
12821 }
12822
12823 return NB_OK;
12824 }
12825
12826 /*
12827 * XPath:
12828 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance
12829 */
12830 void bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_apply_finish(
12831 struct nb_cb_apply_finish_args *args)
12832 {
12833 bgp_global_afi_safis_admin_distance_modify(args);
12834 }
12835
12836 /*
12837 * XPath:
12838 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance/external
12839 */
12840 int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_external_modify(
12841 struct nb_cb_modify_args *args)
12842 {
12843 /* Handled in admin_distance_apply_finish callback */
12844
12845 return NB_OK;
12846 }
12847
12848 /*
12849 * XPath:
12850 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance/internal
12851 */
12852 int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_internal_modify(
12853 struct nb_cb_modify_args *args)
12854 {
12855 /* Handled in admin_distance_apply_finish callback */
12856
12857 return NB_OK;
12858 }
12859
12860 /*
12861 * XPath:
12862 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance/local
12863 */
12864 int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_local_modify(
12865 struct nb_cb_modify_args *args)
12866 {
12867 /* Handled in admin_distance_apply_finish callback */
12868
12869 return NB_OK;
12870 }
12871
12872 /*
12873 * XPath:
12874 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/enable
12875 */
12876 int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_enable_modify(
12877 struct nb_cb_modify_args *args)
12878 {
12879 switch (args->event) {
12880 case NB_EV_VALIDATE:
12881 return bgp_global_afi_safi_route_flap_validation(args);
12882 case NB_EV_PREPARE:
12883 case NB_EV_ABORT:
12884 case NB_EV_APPLY:
12885 break;
12886 }
12887
12888 return NB_OK;
12889 }
12890
12891 /*
12892 * XPath:
12893 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/reach-decay
12894 */
12895 int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reach_decay_modify(
12896 struct nb_cb_modify_args *args)
12897 {
12898 switch (args->event) {
12899 case NB_EV_VALIDATE:
12900 case NB_EV_PREPARE:
12901 case NB_EV_ABORT:
12902 case NB_EV_APPLY:
12903 /* TODO: implement me. */
12904 break;
12905 }
12906
12907 return NB_OK;
12908 }
12909
12910 int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reach_decay_destroy(
12911 struct nb_cb_destroy_args *args)
12912 {
12913 switch (args->event) {
12914 case NB_EV_VALIDATE:
12915 case NB_EV_PREPARE:
12916 case NB_EV_ABORT:
12917 case NB_EV_APPLY:
12918 /* TODO: implement me. */
12919 break;
12920 }
12921
12922 return NB_OK;
12923 }
12924
12925 /*
12926 * XPath:
12927 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/reuse-above
12928 */
12929 int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reuse_above_modify(
12930 struct nb_cb_modify_args *args)
12931 {
12932 switch (args->event) {
12933 case NB_EV_VALIDATE:
12934 case NB_EV_PREPARE:
12935 case NB_EV_ABORT:
12936 case NB_EV_APPLY:
12937 /* TODO: implement me. */
12938 break;
12939 }
12940
12941 return NB_OK;
12942 }
12943
12944 int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reuse_above_destroy(
12945 struct nb_cb_destroy_args *args)
12946 {
12947 switch (args->event) {
12948 case NB_EV_VALIDATE:
12949 case NB_EV_PREPARE:
12950 case NB_EV_ABORT:
12951 case NB_EV_APPLY:
12952 /* TODO: implement me. */
12953 break;
12954 }
12955
12956 return NB_OK;
12957 }
12958
12959 /*
12960 * XPath:
12961 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/suppress-above
12962 */
12963 int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_suppress_above_modify(
12964 struct nb_cb_modify_args *args)
12965 {
12966 switch (args->event) {
12967 case NB_EV_VALIDATE:
12968 case NB_EV_PREPARE:
12969 case NB_EV_ABORT:
12970 case NB_EV_APPLY:
12971 /* TODO: implement me. */
12972 break;
12973 }
12974
12975 return NB_OK;
12976 }
12977
12978 int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_suppress_above_destroy(
12979 struct nb_cb_destroy_args *args)
12980 {
12981 switch (args->event) {
12982 case NB_EV_VALIDATE:
12983 case NB_EV_PREPARE:
12984 case NB_EV_ABORT:
12985 case NB_EV_APPLY:
12986 /* TODO: implement me. */
12987 break;
12988 }
12989
12990 return NB_OK;
12991 }
12992
12993 /*
12994 * XPath:
12995 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/unreach-decay
12996 */
12997 int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_unreach_decay_modify(
12998 struct nb_cb_modify_args *args)
12999 {
13000 switch (args->event) {
13001 case NB_EV_VALIDATE:
13002 case NB_EV_PREPARE:
13003 case NB_EV_ABORT:
13004 case NB_EV_APPLY:
13005 /* TODO: implement me. */
13006 break;
13007 }
13008
13009 return NB_OK;
13010 }
13011
13012 int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_unreach_decay_destroy(
13013 struct nb_cb_destroy_args *args)
13014 {
13015 switch (args->event) {
13016 case NB_EV_VALIDATE:
13017 case NB_EV_PREPARE:
13018 case NB_EV_ABORT:
13019 case NB_EV_APPLY:
13020 /* TODO: implement me. */
13021 break;
13022 }
13023
13024 return NB_OK;
13025 }
13026
13027 /*
13028 * XPath:
13029 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-export
13030 */
13031 int bgp_global_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify(
13032 struct nb_cb_modify_args *args)
13033 {
13034 switch (args->event) {
13035 case NB_EV_VALIDATE:
13036 case NB_EV_PREPARE:
13037 case NB_EV_ABORT:
13038 case NB_EV_APPLY:
13039 /* TODO: implement me. */
13040 break;
13041 }
13042
13043 return NB_OK;
13044 }
13045
13046 int bgp_global_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy(
13047 struct nb_cb_destroy_args *args)
13048 {
13049 switch (args->event) {
13050 case NB_EV_VALIDATE:
13051 case NB_EV_PREPARE:
13052 case NB_EV_ABORT:
13053 case NB_EV_APPLY:
13054 /* TODO: implement me. */
13055 break;
13056 }
13057
13058 return NB_OK;
13059 }
13060
13061 /*
13062 * XPath:
13063 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/network-config
13064 */
13065 int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_create(
13066 struct nb_cb_create_args *args)
13067 {
13068 /* Handled in network_config_apply_finish callback */
13069
13070 return NB_OK;
13071 }
13072
13073 int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_destroy(
13074 struct nb_cb_destroy_args *args)
13075 {
13076 switch (args->event) {
13077 case NB_EV_VALIDATE:
13078 case NB_EV_PREPARE:
13079 case NB_EV_ABORT:
13080 return NB_OK;
13081 case NB_EV_APPLY:
13082 return bgp_global_afi_safis_afi_safi_network_config_destroy(
13083 args);
13084
13085 break;
13086 }
13087
13088 return NB_OK;
13089 }
13090
13091 /*
13092 * XPath:
13093 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/network-config/backdoor
13094 */
13095 int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_backdoor_modify(
13096 struct nb_cb_modify_args *args)
13097 {
13098 switch (args->event) {
13099 case NB_EV_VALIDATE:
13100 case NB_EV_PREPARE:
13101 case NB_EV_ABORT:
13102 case NB_EV_APPLY:
13103 /* TODO: implement me. */
13104 break;
13105 }
13106
13107 return NB_OK;
13108 }
13109
13110 /*
13111 * XPath:
13112 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/network-config/label-index
13113 */
13114 int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_label_index_modify(
13115 struct nb_cb_modify_args *args)
13116 {
13117 switch (args->event) {
13118 case NB_EV_VALIDATE:
13119 case NB_EV_PREPARE:
13120 case NB_EV_ABORT:
13121 case NB_EV_APPLY:
13122 /* TODO: implement me. */
13123 break;
13124 }
13125
13126 return NB_OK;
13127 }
13128
13129 int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_label_index_destroy(
13130 struct nb_cb_destroy_args *args)
13131 {
13132 switch (args->event) {
13133 case NB_EV_VALIDATE:
13134 case NB_EV_PREPARE:
13135 case NB_EV_ABORT:
13136 case NB_EV_APPLY:
13137 /* TODO: implement me. */
13138 break;
13139 }
13140
13141 return NB_OK;
13142 }
13143
13144 /*
13145 * XPath:
13146 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/network-config/rmap-policy-export
13147 */
13148 int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_rmap_policy_export_modify(
13149 struct nb_cb_modify_args *args)
13150 {
13151 switch (args->event) {
13152 case NB_EV_VALIDATE:
13153 case NB_EV_PREPARE:
13154 case NB_EV_ABORT:
13155 case NB_EV_APPLY:
13156 /* TODO: implement me. */
13157 break;
13158 }
13159
13160 return NB_OK;
13161 }
13162
13163 int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_rmap_policy_export_destroy(
13164 struct nb_cb_destroy_args *args)
13165 {
13166 switch (args->event) {
13167 case NB_EV_VALIDATE:
13168 case NB_EV_PREPARE:
13169 case NB_EV_ABORT:
13170 case NB_EV_APPLY:
13171 /* TODO: implement me. */
13172 break;
13173 }
13174
13175 return NB_OK;
13176 }
13177
13178 /*
13179 * XPath:
13180 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route
13181 */
13182 int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_create(
13183 struct nb_cb_create_args *args)
13184 {
13185 switch (args->event) {
13186 case NB_EV_VALIDATE:
13187 case NB_EV_PREPARE:
13188 case NB_EV_ABORT:
13189 case NB_EV_APPLY:
13190 /* TODO: implement me. */
13191 break;
13192 }
13193
13194 return NB_OK;
13195 }
13196
13197 int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_destroy(
13198 struct nb_cb_destroy_args *args)
13199 {
13200 switch (args->event) {
13201 case NB_EV_VALIDATE:
13202 case NB_EV_PREPARE:
13203 case NB_EV_ABORT:
13204 case NB_EV_APPLY:
13205 /* TODO: implement me. */
13206 break;
13207 }
13208
13209 return NB_OK;
13210 }
13211
13212 /*
13213 * XPath:
13214 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/as-set
13215 */
13216 int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_as_set_modify(
13217 struct nb_cb_modify_args *args)
13218 {
13219 switch (args->event) {
13220 case NB_EV_VALIDATE:
13221 case NB_EV_PREPARE:
13222 case NB_EV_ABORT:
13223 case NB_EV_APPLY:
13224 /* TODO: implement me. */
13225 break;
13226 }
13227
13228 return NB_OK;
13229 }
13230
13231 /*
13232 * XPath:
13233 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/summary-only
13234 */
13235 int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_summary_only_modify(
13236 struct nb_cb_modify_args *args)
13237 {
13238 switch (args->event) {
13239 case NB_EV_VALIDATE:
13240 case NB_EV_PREPARE:
13241 case NB_EV_ABORT:
13242 case NB_EV_APPLY:
13243 /* TODO: implement me. */
13244 break;
13245 }
13246
13247 return NB_OK;
13248 }
13249
13250 /*
13251 * XPath:
13252 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/rmap-policy-export
13253 */
13254 int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_rmap_policy_export_modify(
13255 struct nb_cb_modify_args *args)
13256 {
13257 switch (args->event) {
13258 case NB_EV_VALIDATE:
13259 case NB_EV_PREPARE:
13260 case NB_EV_ABORT:
13261 case NB_EV_APPLY:
13262 /* TODO: implement me. */
13263 break;
13264 }
13265
13266 return NB_OK;
13267 }
13268
13269 int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_rmap_policy_export_destroy(
13270 struct nb_cb_destroy_args *args)
13271 {
13272 switch (args->event) {
13273 case NB_EV_VALIDATE:
13274 case NB_EV_PREPARE:
13275 case NB_EV_ABORT:
13276 case NB_EV_APPLY:
13277 /* TODO: implement me. */
13278 break;
13279 }
13280
13281 return NB_OK;
13282 }
13283
13284 /*
13285 * XPath:
13286 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/origin
13287 */
13288 int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_origin_modify(
13289 struct nb_cb_modify_args *args)
13290 {
13291 switch (args->event) {
13292 case NB_EV_VALIDATE:
13293 case NB_EV_PREPARE:
13294 case NB_EV_ABORT:
13295 case NB_EV_APPLY:
13296 /* TODO: implement me. */
13297 break;
13298 }
13299
13300 return NB_OK;
13301 }
13302
13303 /*
13304 * XPath:
13305 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/match-med
13306 */
13307 int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_match_med_modify(
13308 struct nb_cb_modify_args *args)
13309 {
13310 switch (args->event) {
13311 case NB_EV_VALIDATE:
13312 case NB_EV_PREPARE:
13313 case NB_EV_ABORT:
13314 case NB_EV_APPLY:
13315 /* TODO: implement me. */
13316 break;
13317 }
13318
13319 return NB_OK;
13320 }
13321
13322 /*
13323 * XPath:
13324 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/suppress-map
13325 */
13326 int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_suppress_map_modify(
13327 struct nb_cb_modify_args *args)
13328 {
13329 switch (args->event) {
13330 case NB_EV_VALIDATE:
13331 case NB_EV_PREPARE:
13332 case NB_EV_ABORT:
13333 case NB_EV_APPLY:
13334 /* TODO: implement me. */
13335 break;
13336 }
13337
13338 return NB_OK;
13339 }
13340
13341 int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_suppress_map_destroy(
13342 struct nb_cb_destroy_args *args)
13343 {
13344 switch (args->event) {
13345 case NB_EV_VALIDATE:
13346 case NB_EV_PREPARE:
13347 case NB_EV_ABORT:
13348 case NB_EV_APPLY:
13349 /* TODO: implement me. */
13350 break;
13351 }
13352
13353 return NB_OK;
13354 }
13355
13356 /*
13357 * XPath:
13358 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance-route
13359 */
13360 int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_create(
13361 struct nb_cb_create_args *args)
13362 {
13363 switch (args->event) {
13364 case NB_EV_VALIDATE:
13365 case NB_EV_PREPARE:
13366 case NB_EV_ABORT:
13367 case NB_EV_APPLY:
13368 /* TODO: implement me. */
13369 break;
13370 }
13371
13372 return NB_OK;
13373 }
13374
13375 int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_destroy(
13376 struct nb_cb_destroy_args *args)
13377 {
13378 switch (args->event) {
13379 case NB_EV_VALIDATE:
13380 case NB_EV_PREPARE:
13381 case NB_EV_ABORT:
13382 return NB_OK;
13383 case NB_EV_APPLY:
13384 return bgp_global_afi_safi_admin_distance_route_destroy(args);
13385 }
13386
13387 return NB_OK;
13388 }
13389
13390 /*
13391 * XPath:
13392 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance
13393 */
13394 void bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_apply_finish(
13395 struct nb_cb_apply_finish_args *args)
13396 {
13397 bgp_global_afi_safis_admin_distance_modify(args);
13398 }
13399
13400 /*
13401 * XPath:
13402 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance/external
13403 */
13404 int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_external_modify(
13405 struct nb_cb_modify_args *args)
13406 {
13407 /* Handled in admin_distance_apply_finish callback */
13408
13409 return NB_OK;
13410 }
13411
13412 /*
13413 * XPath:
13414 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance/internal
13415 */
13416 int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_internal_modify(
13417 struct nb_cb_modify_args *args)
13418 {
13419 /* Handled in admin_distance_apply_finish callback */
13420
13421 return NB_OK;
13422 }
13423
13424 /*
13425 * XPath:
13426 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance/local
13427 */
13428 int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_local_modify(
13429 struct nb_cb_modify_args *args)
13430 {
13431 /* Handled in admin_distance_apply_finish callback */
13432
13433 return NB_OK;
13434 }
13435
13436 /*
13437 * XPath:
13438 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-flowspec/flow-spec-config/interface
13439 */
13440 int bgp_global_afi_safis_afi_safi_ipv4_flowspec_flow_spec_config_interface_modify(
13441 struct nb_cb_modify_args *args)
13442 {
13443 switch (args->event) {
13444 case NB_EV_VALIDATE:
13445 case NB_EV_PREPARE:
13446 case NB_EV_ABORT:
13447 case NB_EV_APPLY:
13448 /* TODO: implement me. */
13449 break;
13450 }
13451
13452 return NB_OK;
13453 }
13454
13455 int bgp_global_afi_safis_afi_safi_ipv4_flowspec_flow_spec_config_interface_destroy(
13456 struct nb_cb_destroy_args *args)
13457 {
13458 switch (args->event) {
13459 case NB_EV_VALIDATE:
13460 case NB_EV_PREPARE:
13461 case NB_EV_ABORT:
13462 case NB_EV_APPLY:
13463 /* TODO: implement me. */
13464 break;
13465 }
13466
13467 return NB_OK;
13468 }
13469
13470 /*
13471 * XPath:
13472 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/network-config
13473 */
13474 int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_create(
13475 struct nb_cb_create_args *args)
13476 {
13477 switch (args->event) {
13478 case NB_EV_VALIDATE:
13479 case NB_EV_PREPARE:
13480 case NB_EV_ABORT:
13481 case NB_EV_APPLY:
13482 /* TODO: implement me. */
13483 break;
13484 }
13485
13486 return NB_OK;
13487 }
13488
13489 int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_destroy(
13490 struct nb_cb_destroy_args *args)
13491 {
13492 switch (args->event) {
13493 case NB_EV_VALIDATE:
13494 case NB_EV_PREPARE:
13495 case NB_EV_ABORT:
13496 case NB_EV_APPLY:
13497 /* TODO: implement me. */
13498 break;
13499 }
13500
13501 return NB_OK;
13502 }
13503
13504 /*
13505 * XPath:
13506 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/network-config/prefix-list
13507 */
13508 int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_create(
13509 struct nb_cb_create_args *args)
13510 {
13511 switch (args->event) {
13512 case NB_EV_VALIDATE:
13513 case NB_EV_PREPARE:
13514 case NB_EV_ABORT:
13515 case NB_EV_APPLY:
13516 /* TODO: implement me. */
13517 break;
13518 }
13519
13520 return NB_OK;
13521 }
13522
13523 int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_destroy(
13524 struct nb_cb_destroy_args *args)
13525 {
13526 switch (args->event) {
13527 case NB_EV_VALIDATE:
13528 case NB_EV_PREPARE:
13529 case NB_EV_ABORT:
13530 case NB_EV_APPLY:
13531 /* TODO: implement me. */
13532 break;
13533 }
13534
13535 return NB_OK;
13536 }
13537
13538 /*
13539 * XPath:
13540 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/network-config/prefix-list/label-index
13541 */
13542 int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_label_index_modify(
13543 struct nb_cb_modify_args *args)
13544 {
13545 switch (args->event) {
13546 case NB_EV_VALIDATE:
13547 case NB_EV_PREPARE:
13548 case NB_EV_ABORT:
13549 case NB_EV_APPLY:
13550 /* TODO: implement me. */
13551 break;
13552 }
13553
13554 return NB_OK;
13555 }
13556
13557 /*
13558 * XPath:
13559 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/network-config/prefix-list/rmap-policy-export
13560 */
13561 int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_rmap_policy_export_modify(
13562 struct nb_cb_modify_args *args)
13563 {
13564 switch (args->event) {
13565 case NB_EV_VALIDATE:
13566 case NB_EV_PREPARE:
13567 case NB_EV_ABORT:
13568 case NB_EV_APPLY:
13569 /* TODO: implement me. */
13570 break;
13571 }
13572
13573 return NB_OK;
13574 }
13575
13576 int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_rmap_policy_export_destroy(
13577 struct nb_cb_destroy_args *args)
13578 {
13579 switch (args->event) {
13580 case NB_EV_VALIDATE:
13581 case NB_EV_PREPARE:
13582 case NB_EV_ABORT:
13583 case NB_EV_APPLY:
13584 /* TODO: implement me. */
13585 break;
13586 }
13587
13588 return NB_OK;
13589 }
13590
13591 /*
13592 * XPath:
13593 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/network-config
13594 */
13595 int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_create(
13596 struct nb_cb_create_args *args)
13597 {
13598 switch (args->event) {
13599 case NB_EV_VALIDATE:
13600 case NB_EV_PREPARE:
13601 case NB_EV_ABORT:
13602 case NB_EV_APPLY:
13603 /* TODO: implement me. */
13604 break;
13605 }
13606
13607 return NB_OK;
13608 }
13609
13610 int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_destroy(
13611 struct nb_cb_destroy_args *args)
13612 {
13613 switch (args->event) {
13614 case NB_EV_VALIDATE:
13615 case NB_EV_PREPARE:
13616 case NB_EV_ABORT:
13617 case NB_EV_APPLY:
13618 /* TODO: implement me. */
13619 break;
13620 }
13621
13622 return NB_OK;
13623 }
13624
13625 /*
13626 * XPath:
13627 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/network-config/prefix-list
13628 */
13629 int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_create(
13630 struct nb_cb_create_args *args)
13631 {
13632 switch (args->event) {
13633 case NB_EV_VALIDATE:
13634 case NB_EV_PREPARE:
13635 case NB_EV_ABORT:
13636 case NB_EV_APPLY:
13637 /* TODO: implement me. */
13638 break;
13639 }
13640
13641 return NB_OK;
13642 }
13643
13644 int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_destroy(
13645 struct nb_cb_destroy_args *args)
13646 {
13647 switch (args->event) {
13648 case NB_EV_VALIDATE:
13649 case NB_EV_PREPARE:
13650 case NB_EV_ABORT:
13651 case NB_EV_APPLY:
13652 /* TODO: implement me. */
13653 break;
13654 }
13655
13656 return NB_OK;
13657 }
13658
13659 /*
13660 * XPath:
13661 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/network-config/prefix-list/label-index
13662 */
13663 int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_label_index_modify(
13664 struct nb_cb_modify_args *args)
13665 {
13666 switch (args->event) {
13667 case NB_EV_VALIDATE:
13668 case NB_EV_PREPARE:
13669 case NB_EV_ABORT:
13670 case NB_EV_APPLY:
13671 /* TODO: implement me. */
13672 break;
13673 }
13674
13675 return NB_OK;
13676 }
13677
13678 /*
13679 * XPath:
13680 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/network-config/prefix-list/rmap-policy-export
13681 */
13682 int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_rmap_policy_export_modify(
13683 struct nb_cb_modify_args *args)
13684 {
13685 switch (args->event) {
13686 case NB_EV_VALIDATE:
13687 case NB_EV_PREPARE:
13688 case NB_EV_ABORT:
13689 case NB_EV_APPLY:
13690 /* TODO: implement me. */
13691 break;
13692 }
13693
13694 return NB_OK;
13695 }
13696
13697 int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_rmap_policy_export_destroy(
13698 struct nb_cb_destroy_args *args)
13699 {
13700 switch (args->event) {
13701 case NB_EV_VALIDATE:
13702 case NB_EV_PREPARE:
13703 case NB_EV_ABORT:
13704 case NB_EV_APPLY:
13705 /* TODO: implement me. */
13706 break;
13707 }
13708
13709 return NB_OK;
13710 }
13711
13712 /*
13713 * XPath:
13714 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-unicast/common-config/pre-policy
13715 */
13716 int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_unicast_common_config_pre_policy_modify(
13717 struct nb_cb_modify_args *args)
13718 {
13719 switch (args->event) {
13720 case NB_EV_VALIDATE:
13721 case NB_EV_PREPARE:
13722 case NB_EV_ABORT:
13723 case NB_EV_APPLY:
13724 /* TODO: implement me. */
13725 break;
13726 }
13727
13728 return NB_OK;
13729 }
13730
13731 /*
13732 * XPath:
13733 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-unicast/common-config/post-policy
13734 */
13735 int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_unicast_common_config_post_policy_modify(
13736 struct nb_cb_modify_args *args)
13737 {
13738 switch (args->event) {
13739 case NB_EV_VALIDATE:
13740 case NB_EV_PREPARE:
13741 case NB_EV_ABORT:
13742 case NB_EV_APPLY:
13743 /* TODO: implement me. */
13744 break;
13745 }
13746
13747 return NB_OK;
13748 }
13749
13750 /*
13751 * XPath:
13752 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-multicast/common-config/pre-policy
13753 */
13754 int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_multicast_common_config_pre_policy_modify(
13755 struct nb_cb_modify_args *args)
13756 {
13757 switch (args->event) {
13758 case NB_EV_VALIDATE:
13759 case NB_EV_PREPARE:
13760 case NB_EV_ABORT:
13761 case NB_EV_APPLY:
13762 /* TODO: implement me. */
13763 break;
13764 }
13765
13766 return NB_OK;
13767 }
13768
13769 /*
13770 * XPath:
13771 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-multicast/common-config/post-policy
13772 */
13773 int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_multicast_common_config_post_policy_modify(
13774 struct nb_cb_modify_args *args)
13775 {
13776 switch (args->event) {
13777 case NB_EV_VALIDATE:
13778 case NB_EV_PREPARE:
13779 case NB_EV_ABORT:
13780 case NB_EV_APPLY:
13781 /* TODO: implement me. */
13782 break;
13783 }
13784
13785 return NB_OK;
13786 }
13787
13788 /*
13789 * XPath:
13790 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-unicast/common-config/pre-policy
13791 */
13792 int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_unicast_common_config_pre_policy_modify(
13793 struct nb_cb_modify_args *args)
13794 {
13795 switch (args->event) {
13796 case NB_EV_VALIDATE:
13797 case NB_EV_PREPARE:
13798 case NB_EV_ABORT:
13799 case NB_EV_APPLY:
13800 /* TODO: implement me. */
13801 break;
13802 }
13803
13804 return NB_OK;
13805 }
13806
13807 /*
13808 * XPath:
13809 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-unicast/common-config/post-policy
13810 */
13811 int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_unicast_common_config_post_policy_modify(
13812 struct nb_cb_modify_args *args)
13813 {
13814 switch (args->event) {
13815 case NB_EV_VALIDATE:
13816 case NB_EV_PREPARE:
13817 case NB_EV_ABORT:
13818 case NB_EV_APPLY:
13819 /* TODO: implement me. */
13820 break;
13821 }
13822
13823 return NB_OK;
13824 }
13825
13826 /*
13827 * XPath:
13828 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-multicast/common-config/pre-policy
13829 */
13830 int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_multicast_common_config_pre_policy_modify(
13831 struct nb_cb_modify_args *args)
13832 {
13833 switch (args->event) {
13834 case NB_EV_VALIDATE:
13835 case NB_EV_PREPARE:
13836 case NB_EV_ABORT:
13837 case NB_EV_APPLY:
13838 /* TODO: implement me. */
13839 break;
13840 }
13841
13842 return NB_OK;
13843 }
13844
13845 /*
13846 * XPath:
13847 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-multicast/common-config/post-policy
13848 */
13849 int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_multicast_common_config_post_policy_modify(
13850 struct nb_cb_modify_args *args)
13851 {
13852 switch (args->event) {
13853 case NB_EV_VALIDATE:
13854 case NB_EV_PREPARE:
13855 case NB_EV_ABORT:
13856 case NB_EV_APPLY:
13857 /* TODO: implement me. */
13858 break;
13859 }
13860
13861 return NB_OK;
13862 }
13863
13864 static int bgp_neighbor_afi_safi_flag_modify(struct nb_cb_modify_args *args,
13865 uint32_t flags, bool set)
13866 {
13867 struct bgp *bgp;
13868 const char *peer_str;
13869 struct peer *peer;
13870 const struct lyd_node *nbr_dnode;
13871 const struct lyd_node *nbr_af_dnode;
13872 const char *af_name;
13873 afi_t afi;
13874 safi_t safi;
13875
13876 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
13877 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
13878 yang_afi_safi_identity2value(af_name, &afi, &safi);
13879
13880 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
13881 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
13882 peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
13883 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
13884 args->errmsg_len);
13885
13886 if (peer_af_flag_modify_nb(peer, afi, safi, flags, set, args->errmsg,
13887 args->errmsg_len)
13888 < 0)
13889 return NB_ERR_INCONSISTENCY;
13890
13891 return NB_OK;
13892 }
13893
13894 /*
13895 * XPath:
13896 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/add-paths/path-type
13897 */
13898 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_add_paths_path_type_modify(
13899 struct nb_cb_modify_args *args)
13900 {
13901 switch (args->event) {
13902 case NB_EV_VALIDATE:
13903 case NB_EV_PREPARE:
13904 case NB_EV_ABORT:
13905 case NB_EV_APPLY:
13906 /* TODO: implement me. */
13907 break;
13908 }
13909
13910 return NB_OK;
13911 }
13912
13913 /*
13914 * XPath:
13915 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-as
13916 */
13917 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_modify(
13918 struct nb_cb_modify_args *args)
13919 {
13920 switch (args->event) {
13921 case NB_EV_VALIDATE:
13922 case NB_EV_PREPARE:
13923 case NB_EV_ABORT:
13924 case NB_EV_APPLY:
13925 /* TODO: implement me. */
13926 break;
13927 }
13928
13929 return NB_OK;
13930 }
13931
13932 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_destroy(
13933 struct nb_cb_destroy_args *args)
13934 {
13935 switch (args->event) {
13936 case NB_EV_VALIDATE:
13937 case NB_EV_PREPARE:
13938 case NB_EV_ABORT:
13939 case NB_EV_APPLY:
13940 /* TODO: implement me. */
13941 break;
13942 }
13943
13944 return NB_OK;
13945 }
13946
13947 /*
13948 * XPath:
13949 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-origin-as
13950 */
13951 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
13952 struct nb_cb_modify_args *args)
13953 {
13954 switch (args->event) {
13955 case NB_EV_VALIDATE:
13956 case NB_EV_PREPARE:
13957 case NB_EV_ABORT:
13958 case NB_EV_APPLY:
13959 /* TODO: implement me. */
13960 break;
13961 }
13962
13963 return NB_OK;
13964 }
13965
13966 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
13967 struct nb_cb_destroy_args *args)
13968 {
13969 switch (args->event) {
13970 case NB_EV_VALIDATE:
13971 case NB_EV_PREPARE:
13972 case NB_EV_ABORT:
13973 case NB_EV_APPLY:
13974 /* TODO: implement me. */
13975 break;
13976 }
13977
13978 return NB_OK;
13979 }
13980
13981 /*
13982 * XPath:
13983 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/replace-peer-as
13984 */
13985 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify(
13986 struct nb_cb_modify_args *args)
13987 {
13988 switch (args->event) {
13989 case NB_EV_VALIDATE:
13990 case NB_EV_PREPARE:
13991 case NB_EV_ABORT:
13992 return NB_OK;
13993 case NB_EV_APPLY:
13994 return bgp_neighbor_afi_safi_flag_modify(
13995 args, PEER_FLAG_AS_OVERRIDE,
13996 yang_dnode_get_bool(args->dnode, NULL));
13997
13998 break;
13999 }
14000
14001 return NB_OK;
14002 }
14003
14004 static int
14005 bgp_peer_afi_safi_default_originate_apply(struct nb_cb_apply_finish_args *args,
14006 struct peer *peer, afi_t afi,
14007 safi_t safi)
14008 {
14009 bool originate = false;
14010 int ret = 0;
14011 struct route_map *route_map = NULL;
14012 const char *rmap = NULL;
14013
14014 originate = yang_dnode_get_bool(args->dnode, "./originate");
14015
14016 if (yang_dnode_exists(args->dnode, "./route-map")) {
14017 rmap = yang_dnode_get_string(args->dnode, "./route-map");
14018 route_map = route_map_lookup_by_name(rmap);
14019 if (!route_map) {
14020 snprintf(args->errmsg, args->errmsg_len,
14021 "The route-map '%s' does not exist.", rmap);
14022 return -1;
14023 }
14024 }
14025
14026 // zlog_debug("%s: originate %u route-map %s", __func__, originate,
14027 // rmap);
14028 if (originate)
14029 ret = peer_default_originate_set(peer, afi, safi, rmap,
14030 route_map);
14031 else
14032 ret = peer_default_originate_unset(peer, afi, safi);
14033
14034 return bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
14035 }
14036
14037 /*
14038 * XPath:
14039 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate
14040 */
14041 void bgp_neighbor_afi_safi_default_originate_apply_finish(
14042 struct nb_cb_apply_finish_args *args)
14043 {
14044 struct bgp *bgp;
14045 const char *peer_str;
14046 struct peer *peer;
14047 const struct lyd_node *nbr_dnode;
14048 const struct lyd_node *nbr_af_dnode;
14049 const char *af_name;
14050 afi_t afi;
14051 safi_t safi;
14052
14053 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
14054 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
14055 yang_afi_safi_identity2value(af_name, &afi, &safi);
14056
14057 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
14058 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
14059 peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
14060 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
14061 args->errmsg_len);
14062 if (!peer)
14063 return;
14064
14065 bgp_peer_afi_safi_default_originate_apply(args, peer, afi, safi);
14066 }
14067
14068 /*
14069 * XPath:
14070 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/originate
14071 */
14072 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify(
14073 struct nb_cb_modify_args *args)
14074 {
14075 switch (args->event) {
14076 case NB_EV_VALIDATE:
14077 case NB_EV_PREPARE:
14078 case NB_EV_ABORT:
14079 case NB_EV_APPLY:
14080 /* TODO: implement me. */
14081 break;
14082 }
14083
14084 return NB_OK;
14085 }
14086
14087 /*
14088 * XPath:
14089 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map
14090 */
14091 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify(
14092 struct nb_cb_modify_args *args)
14093 {
14094 switch (args->event) {
14095 case NB_EV_VALIDATE:
14096 case NB_EV_PREPARE:
14097 case NB_EV_ABORT:
14098 case NB_EV_APPLY:
14099 /* TODO: implement me. */
14100 break;
14101 }
14102
14103 return NB_OK;
14104 }
14105
14106 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy(
14107 struct nb_cb_destroy_args *args)
14108 {
14109 switch (args->event) {
14110 case NB_EV_VALIDATE:
14111 case NB_EV_PREPARE:
14112 case NB_EV_ABORT:
14113 case NB_EV_APPLY:
14114 /* TODO: implement me. */
14115 break;
14116 }
14117
14118 return NB_OK;
14119 }
14120
14121 static int
14122 bgp_neighbor_afi_safi_prefix_limit_list_destroy(struct nb_cb_destroy_args *args)
14123 {
14124 struct bgp *bgp;
14125 const char *peer_str;
14126 struct peer *peer;
14127 const struct lyd_node *nbr_dnode;
14128 const struct lyd_node *nbr_af_dnode;
14129 const char *af_name;
14130 afi_t afi;
14131 safi_t safi;
14132 int direction;
14133
14134 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
14135 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
14136 yang_afi_safi_identity2value(af_name, &afi, &safi);
14137
14138 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
14139 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
14140 peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
14141 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
14142 args->errmsg_len);
14143 if (!peer)
14144 return NB_ERR_INCONSISTENCY;
14145
14146 direction = yang_dnode_get_enum(args->dnode, "./direction");
14147
14148 switch (direction) {
14149 case 1:
14150 peer_maximum_prefix_unset(peer, afi, safi);
14151 break;
14152 case 2:
14153 UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT);
14154 peer->pmax_out[afi][safi] = 0;
14155 break;
14156 }
14157
14158 return NB_OK;
14159 }
14160
14161 /*
14162 * XPath:
14163 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list
14164 */
14165 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create(
14166 struct nb_cb_create_args *args)
14167 {
14168 switch (args->event) {
14169 case NB_EV_VALIDATE:
14170 case NB_EV_PREPARE:
14171 case NB_EV_ABORT:
14172 case NB_EV_APPLY:
14173 /* TODO: implement me. */
14174 break;
14175 }
14176
14177 return NB_OK;
14178 }
14179
14180 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy(
14181 struct nb_cb_destroy_args *args)
14182 {
14183 switch (args->event) {
14184 case NB_EV_VALIDATE:
14185 case NB_EV_PREPARE:
14186 case NB_EV_ABORT:
14187 return NB_OK;
14188 case NB_EV_APPLY:
14189 return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
14190 }
14191
14192 return NB_OK;
14193 }
14194
14195 static void
14196 bgp_peer_afi_safi_maximum_prefix_set(struct nb_cb_apply_finish_args *args,
14197 struct peer *peer, afi_t afi, safi_t safi)
14198 {
14199 int direction;
14200 uint32_t max;
14201 uint8_t threshold = MAXIMUM_PREFIX_THRESHOLD_DEFAULT;
14202 uint16_t restart = 0;
14203 bool warning = false;
14204 bool force;
14205
14206 max = yang_dnode_get_uint32(args->dnode, "./max-prefixes");
14207 direction = yang_dnode_get_enum(args->dnode, "./direction");
14208 switch (direction) {
14209 case 1:
14210 force = yang_dnode_get_bool(args->dnode, "./force-check");
14211
14212 if (yang_dnode_exists(args->dnode,
14213 "./options/shutdown-threshold-pct"))
14214 threshold = yang_dnode_get_uint8(
14215 args->dnode,
14216 "./options/shutdown-threshold-pct");
14217 if (yang_dnode_exists(args->dnode,
14218 "./options/tw-shutdown-threshold-pct"))
14219 threshold = yang_dnode_get_uint8(
14220 args->dnode,
14221 "./options/tw-shutdown-threshold-pct");
14222 if (yang_dnode_exists(args->dnode,
14223 "./options/tr-shutdown-threshold-pct"))
14224 threshold = yang_dnode_get_uint8(
14225 args->dnode,
14226 "./options/tr-shutdown-threshold-pct");
14227
14228 if (yang_dnode_exists(args->dnode, "./options/warning-only"))
14229 warning = yang_dnode_get_bool(args->dnode,
14230 "./options/warning-only");
14231 if (yang_dnode_exists(args->dnode, "./options/tw-warning-only"))
14232 warning = yang_dnode_get_bool(
14233 args->dnode, "./options/tw-warning-only");
14234
14235 if (yang_dnode_exists(args->dnode, "./options/restart-timer"))
14236 restart = yang_dnode_get_uint16(
14237 args->dnode, "./options/restart-timer");
14238 if (yang_dnode_exists(args->dnode,
14239 "./options/tr-restart-timer"))
14240 restart = yang_dnode_get_uint16(
14241 args->dnode, "./options/tr-restart-timer");
14242
14243 peer_maximum_prefix_set(peer, afi, safi, max, threshold,
14244 warning, restart, force);
14245
14246 break;
14247 case 2:
14248 SET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT);
14249 peer->pmax_out[afi][safi] = max;
14250
14251 break;
14252 }
14253 }
14254
14255 void bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish(
14256 struct nb_cb_apply_finish_args *args)
14257 {
14258 struct bgp *bgp;
14259 const char *peer_str;
14260 struct peer *peer;
14261 const struct lyd_node *nbr_dnode;
14262 const struct lyd_node *nbr_af_dnode;
14263 const char *af_name;
14264 afi_t afi;
14265 safi_t safi;
14266
14267 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
14268 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
14269 yang_afi_safi_identity2value(af_name, &afi, &safi);
14270
14271 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
14272 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
14273 peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
14274 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
14275 args->errmsg_len);
14276 if (!peer)
14277 return;
14278
14279 bgp_peer_afi_safi_maximum_prefix_set(args, peer, afi, safi);
14280 }
14281
14282 /*
14283 * XPath:
14284 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/max-prefixes
14285 */
14286 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
14287 struct nb_cb_modify_args *args)
14288 {
14289 switch (args->event) {
14290 case NB_EV_VALIDATE:
14291 case NB_EV_PREPARE:
14292 case NB_EV_ABORT:
14293 case NB_EV_APPLY:
14294 /* TODO: implement me. */
14295 break;
14296 }
14297
14298 return NB_OK;
14299 }
14300
14301 /*
14302 * XPath:
14303 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check
14304 */
14305 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
14306 struct nb_cb_modify_args *args)
14307 {
14308 switch (args->event) {
14309 case NB_EV_VALIDATE:
14310 case NB_EV_PREPARE:
14311 case NB_EV_ABORT:
14312 case NB_EV_APPLY:
14313 /* TODO: implement me. */
14314 break;
14315 }
14316
14317 return NB_OK;
14318 }
14319
14320 /*
14321 * XPath:
14322 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only
14323 */
14324 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
14325 struct nb_cb_modify_args *args)
14326 {
14327 switch (args->event) {
14328 case NB_EV_VALIDATE:
14329 case NB_EV_PREPARE:
14330 case NB_EV_ABORT:
14331 case NB_EV_APPLY:
14332 /* TODO: implement me. */
14333 break;
14334 }
14335
14336 return NB_OK;
14337 }
14338
14339 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
14340 struct nb_cb_destroy_args *args)
14341 {
14342 switch (args->event) {
14343 case NB_EV_VALIDATE:
14344 case NB_EV_PREPARE:
14345 case NB_EV_ABORT:
14346 case NB_EV_APPLY:
14347 /* TODO: implement me. */
14348 break;
14349 }
14350
14351 return NB_OK;
14352 }
14353
14354 /*
14355 * XPath:
14356 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer
14357 */
14358 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
14359 struct nb_cb_modify_args *args)
14360 {
14361 switch (args->event) {
14362 case NB_EV_VALIDATE:
14363 case NB_EV_PREPARE:
14364 case NB_EV_ABORT:
14365 case NB_EV_APPLY:
14366 /* TODO: implement me. */
14367 break;
14368 }
14369
14370 return NB_OK;
14371 }
14372
14373 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
14374 struct nb_cb_destroy_args *args)
14375 {
14376 switch (args->event) {
14377 case NB_EV_VALIDATE:
14378 case NB_EV_PREPARE:
14379 case NB_EV_ABORT:
14380 case NB_EV_APPLY:
14381 /* TODO: implement me. */
14382 break;
14383 }
14384
14385 return NB_OK;
14386 }
14387
14388 /*
14389 * XPath:
14390 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
14391 */
14392 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
14393 struct nb_cb_modify_args *args)
14394 {
14395 switch (args->event) {
14396 case NB_EV_VALIDATE:
14397 case NB_EV_PREPARE:
14398 case NB_EV_ABORT:
14399 case NB_EV_APPLY:
14400 /* TODO: implement me. */
14401 break;
14402 }
14403
14404 return NB_OK;
14405 }
14406
14407 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
14408 struct nb_cb_destroy_args *args)
14409 {
14410 switch (args->event) {
14411 case NB_EV_VALIDATE:
14412 case NB_EV_PREPARE:
14413 case NB_EV_ABORT:
14414 case NB_EV_APPLY:
14415 /* TODO: implement me. */
14416 break;
14417 }
14418
14419 return NB_OK;
14420 }
14421
14422 /*
14423 * XPath:
14424 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
14425 */
14426 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
14427 struct nb_cb_modify_args *args)
14428 {
14429 switch (args->event) {
14430 case NB_EV_VALIDATE:
14431 case NB_EV_PREPARE:
14432 case NB_EV_ABORT:
14433 case NB_EV_APPLY:
14434 /* TODO: implement me. */
14435 break;
14436 }
14437
14438 return NB_OK;
14439 }
14440
14441 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
14442 struct nb_cb_destroy_args *args)
14443 {
14444 switch (args->event) {
14445 case NB_EV_VALIDATE:
14446 case NB_EV_PREPARE:
14447 case NB_EV_ABORT:
14448 case NB_EV_APPLY:
14449 /* TODO: implement me. */
14450 break;
14451 }
14452
14453 return NB_OK;
14454 }
14455
14456 /*
14457 * XPath:
14458 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer
14459 */
14460 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
14461 struct nb_cb_modify_args *args)
14462 {
14463 switch (args->event) {
14464 case NB_EV_VALIDATE:
14465 case NB_EV_PREPARE:
14466 case NB_EV_ABORT:
14467 case NB_EV_APPLY:
14468 /* TODO: implement me. */
14469 break;
14470 }
14471
14472 return NB_OK;
14473 }
14474
14475 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
14476 struct nb_cb_destroy_args *args)
14477 {
14478 switch (args->event) {
14479 case NB_EV_VALIDATE:
14480 case NB_EV_PREPARE:
14481 case NB_EV_ABORT:
14482 case NB_EV_APPLY:
14483 /* TODO: implement me. */
14484 break;
14485 }
14486
14487 return NB_OK;
14488 }
14489
14490 /*
14491 * XPath:
14492 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
14493 */
14494 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
14495 struct nb_cb_modify_args *args)
14496 {
14497 switch (args->event) {
14498 case NB_EV_VALIDATE:
14499 case NB_EV_PREPARE:
14500 case NB_EV_ABORT:
14501 case NB_EV_APPLY:
14502 /* TODO: implement me. */
14503 break;
14504 }
14505
14506 return NB_OK;
14507 }
14508
14509 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
14510 struct nb_cb_destroy_args *args)
14511 {
14512 switch (args->event) {
14513 case NB_EV_VALIDATE:
14514 case NB_EV_PREPARE:
14515 case NB_EV_ABORT:
14516 case NB_EV_APPLY:
14517 /* TODO: implement me. */
14518 break;
14519 }
14520
14521 return NB_OK;
14522 }
14523
14524 /*
14525 * XPath:
14526 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only
14527 */
14528 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
14529 struct nb_cb_modify_args *args)
14530 {
14531 switch (args->event) {
14532 case NB_EV_VALIDATE:
14533 case NB_EV_PREPARE:
14534 case NB_EV_ABORT:
14535 case NB_EV_APPLY:
14536 /* TODO: implement me. */
14537 break;
14538 }
14539
14540 return NB_OK;
14541 }
14542
14543 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
14544 struct nb_cb_destroy_args *args)
14545 {
14546 switch (args->event) {
14547 case NB_EV_VALIDATE:
14548 case NB_EV_PREPARE:
14549 case NB_EV_ABORT:
14550 case NB_EV_APPLY:
14551 /* TODO: implement me. */
14552 break;
14553 }
14554
14555 return NB_OK;
14556 }
14557
14558 /*
14559 * XPath:
14560 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self
14561 */
14562 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify(
14563 struct nb_cb_modify_args *args)
14564 {
14565 switch (args->event) {
14566 case NB_EV_VALIDATE:
14567 case NB_EV_PREPARE:
14568 case NB_EV_ABORT:
14569 return NB_OK;
14570 case NB_EV_APPLY:
14571 return bgp_neighbor_afi_safi_flag_modify(
14572 args, PEER_FLAG_NEXTHOP_SELF,
14573 yang_dnode_get_bool(args->dnode, NULL));
14574
14575 break;
14576 }
14577
14578 return NB_OK;
14579 }
14580
14581 /*
14582 * XPath:
14583 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self-force
14584 */
14585 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
14586 struct nb_cb_modify_args *args)
14587 {
14588 switch (args->event) {
14589 case NB_EV_VALIDATE:
14590 case NB_EV_PREPARE:
14591 case NB_EV_ABORT:
14592 return NB_OK;
14593 case NB_EV_APPLY:
14594 return bgp_neighbor_afi_safi_flag_modify(
14595 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
14596 yang_dnode_get_bool(args->dnode, NULL));
14597
14598 break;
14599 }
14600
14601 return NB_OK;
14602 }
14603
14604 /*
14605 * XPath:
14606 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all
14607 */
14608 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_modify(
14609 struct nb_cb_modify_args *args)
14610 {
14611 switch (args->event) {
14612 case NB_EV_VALIDATE:
14613 case NB_EV_PREPARE:
14614 case NB_EV_ABORT:
14615 return NB_OK;
14616 case NB_EV_APPLY:
14617 return bgp_neighbor_afi_safi_flag_modify(
14618 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
14619 yang_dnode_get_bool(args->dnode, NULL));
14620
14621 break;
14622 }
14623
14624 return NB_OK;
14625 }
14626
14627 /*
14628 * XPath:
14629 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all-replace
14630 */
14631 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
14632 struct nb_cb_modify_args *args)
14633 {
14634 switch (args->event) {
14635 case NB_EV_VALIDATE:
14636 case NB_EV_PREPARE:
14637 case NB_EV_ABORT:
14638 return NB_OK;
14639 case NB_EV_APPLY:
14640 return bgp_neighbor_afi_safi_flag_modify(
14641 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
14642 yang_dnode_get_bool(args->dnode, NULL));
14643
14644 break;
14645 }
14646
14647 return NB_OK;
14648 }
14649
14650 /*
14651 * XPath:
14652 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as
14653 */
14654 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_modify(
14655 struct nb_cb_modify_args *args)
14656 {
14657 switch (args->event) {
14658 case NB_EV_VALIDATE:
14659 case NB_EV_PREPARE:
14660 case NB_EV_ABORT:
14661 return NB_OK;
14662 case NB_EV_APPLY:
14663 return bgp_neighbor_afi_safi_flag_modify(
14664 args, PEER_FLAG_REMOVE_PRIVATE_AS,
14665 yang_dnode_get_bool(args->dnode, NULL));
14666
14667 break;
14668 }
14669
14670 return NB_OK;
14671 }
14672
14673 /*
14674 * XPath:
14675 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-replace
14676 */
14677 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_replace_modify(
14678 struct nb_cb_modify_args *args)
14679 {
14680 switch (args->event) {
14681 case NB_EV_VALIDATE:
14682 case NB_EV_PREPARE:
14683 case NB_EV_ABORT:
14684 return NB_OK;
14685 case NB_EV_APPLY:
14686 return bgp_neighbor_afi_safi_flag_modify(
14687 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
14688 yang_dnode_get_bool(args->dnode, NULL));
14689
14690 break;
14691 }
14692
14693 return NB_OK;
14694 }
14695
14696 static int bgp_neighbor_afi_safi_weight_modify(struct nb_cb_modify_args *args)
14697 {
14698 struct bgp *bgp;
14699 const char *peer_str;
14700 struct peer *peer;
14701 const struct lyd_node *nbr_dnode;
14702 const struct lyd_node *nbr_af_dnode;
14703 const char *af_name;
14704 uint16_t weight;
14705 afi_t afi;
14706 safi_t safi;
14707 int ret;
14708
14709 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
14710 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
14711 yang_afi_safi_identity2value(af_name, &afi, &safi);
14712
14713 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
14714 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
14715 peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
14716 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
14717 args->errmsg_len);
14718
14719 weight = yang_dnode_get_uint16(args->dnode, NULL);
14720
14721 ret = peer_weight_set(peer, afi, safi, weight);
14722 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0)
14723 return NB_ERR_INCONSISTENCY;
14724
14725 return NB_OK;
14726 }
14727
14728 static int bgp_neighbor_afi_safi_weight_destroy(struct nb_cb_destroy_args *args)
14729 {
14730 struct bgp *bgp;
14731 const char *peer_str;
14732 struct peer *peer;
14733 const struct lyd_node *nbr_dnode;
14734 const struct lyd_node *nbr_af_dnode;
14735 const char *af_name;
14736 afi_t afi;
14737 safi_t safi;
14738 int ret;
14739
14740 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
14741 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
14742 yang_afi_safi_identity2value(af_name, &afi, &safi);
14743
14744 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
14745 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
14746 peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
14747 peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
14748 args->errmsg_len);
14749
14750 ret = peer_weight_unset(peer, afi, safi);
14751 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0)
14752 return NB_ERR_INCONSISTENCY;
14753
14754 return NB_OK;
14755 }
14756
14757 /*
14758 * XPath:
14759 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/weight/weight-attribute
14760 */
14761 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_modify(
14762 struct nb_cb_modify_args *args)
14763 {
14764 switch (args->event) {
14765 case NB_EV_VALIDATE:
14766 case NB_EV_PREPARE:
14767 case NB_EV_ABORT:
14768 return NB_OK;
14769 case NB_EV_APPLY:
14770 return bgp_neighbor_afi_safi_weight_modify(args);
14771
14772 break;
14773 }
14774
14775 return NB_OK;
14776 }
14777
14778 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_destroy(
14779 struct nb_cb_destroy_args *args)
14780 {
14781 switch (args->event) {
14782 case NB_EV_VALIDATE:
14783 case NB_EV_PREPARE:
14784 case NB_EV_ABORT:
14785 return NB_OK;
14786 case NB_EV_APPLY:
14787 return bgp_neighbor_afi_safi_weight_destroy(args);
14788
14789 break;
14790 }
14791
14792 return NB_OK;
14793 }
14794
14795 /*
14796 * XPath:
14797 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/route-reflector/route-reflector-client
14798 */
14799 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_route_reflector_route_reflector_client_modify(
14800 struct nb_cb_modify_args *args)
14801 {
14802 switch (args->event) {
14803 case NB_EV_VALIDATE:
14804 case NB_EV_PREPARE:
14805 case NB_EV_ABORT:
14806 return NB_OK;
14807 case NB_EV_APPLY:
14808 return bgp_neighbor_afi_safi_flag_modify(
14809 args, PEER_FLAG_REFLECTOR_CLIENT,
14810 yang_dnode_get_bool(args->dnode, NULL));
14811
14812 break;
14813 }
14814
14815 return NB_OK;
14816 }
14817
14818 /*
14819 * XPath:
14820 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/route-server/route-server-client
14821 */
14822 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_route_server_route_server_client_modify(
14823 struct nb_cb_modify_args *args)
14824 {
14825 switch (args->event) {
14826 case NB_EV_VALIDATE:
14827 case NB_EV_PREPARE:
14828 case NB_EV_ABORT:
14829 return NB_OK;
14830 case NB_EV_APPLY:
14831 return bgp_neighbor_afi_safi_flag_modify(
14832 args, PEER_FLAG_RSERVER_CLIENT,
14833 yang_dnode_get_bool(args->dnode, NULL));
14834
14835 break;
14836 }
14837
14838 return NB_OK;
14839 }
14840
14841 /*
14842 * XPath:
14843 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-community
14844 */
14845 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_community_modify(
14846 struct nb_cb_modify_args *args)
14847 {
14848 switch (args->event) {
14849 case NB_EV_VALIDATE:
14850 case NB_EV_PREPARE:
14851 case NB_EV_ABORT:
14852 return NB_OK;
14853 case NB_EV_APPLY:
14854 return bgp_neighbor_afi_safi_flag_modify(
14855 args, PEER_FLAG_SEND_COMMUNITY,
14856 yang_dnode_get_bool(args->dnode, NULL));
14857
14858 break;
14859 }
14860
14861 return NB_OK;
14862 }
14863
14864 /*
14865 * XPath:
14866 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-ext-community
14867 */
14868 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_ext_community_modify(
14869 struct nb_cb_modify_args *args)
14870 {
14871 switch (args->event) {
14872 case NB_EV_VALIDATE:
14873 case NB_EV_PREPARE:
14874 case NB_EV_ABORT:
14875 return NB_OK;
14876 case NB_EV_APPLY:
14877 return bgp_neighbor_afi_safi_flag_modify(
14878 args, PEER_FLAG_SEND_EXT_COMMUNITY,
14879 yang_dnode_get_bool(args->dnode, NULL));
14880
14881 break;
14882 }
14883
14884 return NB_OK;
14885 }
14886
14887 /*
14888 * XPath:
14889 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-large-community
14890 */
14891 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_large_community_modify(
14892 struct nb_cb_modify_args *args)
14893 {
14894 switch (args->event) {
14895 case NB_EV_VALIDATE:
14896 case NB_EV_PREPARE:
14897 case NB_EV_ABORT:
14898 return NB_OK;
14899 case NB_EV_APPLY:
14900 return bgp_neighbor_afi_safi_flag_modify(
14901 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
14902 yang_dnode_get_bool(args->dnode, NULL));
14903
14904 break;
14905 }
14906
14907 return NB_OK;
14908 }
14909
14910 /*
14911 * XPath:
14912 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/soft-reconfiguration
14913 */
14914 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_modify(
14915 struct nb_cb_modify_args *args)
14916 {
14917 switch (args->event) {
14918 case NB_EV_VALIDATE:
14919 case NB_EV_PREPARE:
14920 case NB_EV_ABORT:
14921 return NB_OK;
14922 case NB_EV_APPLY:
14923 return bgp_neighbor_afi_safi_flag_modify(
14924 args, PEER_FLAG_SOFT_RECONFIG,
14925 yang_dnode_get_bool(args->dnode, NULL));
14926
14927 break;
14928 }
14929
14930 return NB_OK;
14931 }
14932
14933 /*
14934 * XPath:
14935 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/as-path-unchanged
14936 */
14937 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
14938 struct nb_cb_modify_args *args)
14939 {
14940 switch (args->event) {
14941 case NB_EV_VALIDATE:
14942 case NB_EV_PREPARE:
14943 case NB_EV_ABORT:
14944 return NB_OK;
14945 case NB_EV_APPLY:
14946 return bgp_neighbor_afi_safi_flag_modify(
14947 args, PEER_FLAG_AS_PATH_UNCHANGED,
14948 yang_dnode_get_bool(args->dnode, NULL));
14949
14950 break;
14951 }
14952
14953 return NB_OK;
14954 }
14955
14956 /*
14957 * XPath:
14958 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/next-hop-unchanged
14959 */
14960 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
14961 struct nb_cb_modify_args *args)
14962 {
14963 switch (args->event) {
14964 case NB_EV_VALIDATE:
14965 case NB_EV_PREPARE:
14966 case NB_EV_ABORT:
14967 return NB_OK;
14968 case NB_EV_APPLY:
14969 return bgp_neighbor_afi_safi_flag_modify(
14970 args, PEER_FLAG_NEXTHOP_UNCHANGED,
14971 yang_dnode_get_bool(args->dnode, NULL));
14972
14973 break;
14974 }
14975
14976 return NB_OK;
14977 }
14978
14979 /*
14980 * XPath:
14981 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/med-unchanged
14982 */
14983 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_unchanged_modify(
14984 struct nb_cb_modify_args *args)
14985 {
14986 switch (args->event) {
14987 case NB_EV_VALIDATE:
14988 case NB_EV_PREPARE:
14989 case NB_EV_ABORT:
14990 return NB_OK;
14991 case NB_EV_APPLY:
14992 return bgp_neighbor_afi_safi_flag_modify(
14993 args, PEER_FLAG_MED_UNCHANGED,
14994 yang_dnode_get_bool(args->dnode, NULL));
14995
14996 break;
14997 }
14998
14999 return NB_OK;
15000 }
15001
15002 /*
15003 * XPath:
15004 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-send
15005 */
15006 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_modify(
15007 struct nb_cb_modify_args *args)
15008 {
15009 switch (args->event) {
15010 case NB_EV_VALIDATE:
15011 case NB_EV_PREPARE:
15012 case NB_EV_ABORT:
15013 case NB_EV_APPLY:
15014 /* TODO: implement me. */
15015 break;
15016 }
15017
15018 return NB_OK;
15019 }
15020
15021 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_destroy(
15022 struct nb_cb_destroy_args *args)
15023 {
15024 switch (args->event) {
15025 case NB_EV_VALIDATE:
15026 case NB_EV_PREPARE:
15027 case NB_EV_ABORT:
15028 case NB_EV_APPLY:
15029 /* TODO: implement me. */
15030 break;
15031 }
15032
15033 return NB_OK;
15034 }
15035
15036 /*
15037 * XPath:
15038 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-receive
15039 */
15040 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_modify(
15041 struct nb_cb_modify_args *args)
15042 {
15043 switch (args->event) {
15044 case NB_EV_VALIDATE:
15045 case NB_EV_PREPARE:
15046 case NB_EV_ABORT:
15047 case NB_EV_APPLY:
15048 /* TODO: implement me. */
15049 break;
15050 }
15051
15052 return NB_OK;
15053 }
15054
15055 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_destroy(
15056 struct nb_cb_destroy_args *args)
15057 {
15058 switch (args->event) {
15059 case NB_EV_VALIDATE:
15060 case NB_EV_PREPARE:
15061 case NB_EV_ABORT:
15062 case NB_EV_APPLY:
15063 /* TODO: implement me. */
15064 break;
15065 }
15066
15067 return NB_OK;
15068 }
15069
15070 /*
15071 * XPath:
15072 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-both
15073 */
15074 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_modify(
15075 struct nb_cb_modify_args *args)
15076 {
15077 switch (args->event) {
15078 case NB_EV_VALIDATE:
15079 case NB_EV_PREPARE:
15080 case NB_EV_ABORT:
15081 case NB_EV_APPLY:
15082 /* TODO: implement me. */
15083 break;
15084 }
15085
15086 return NB_OK;
15087 }
15088
15089 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_destroy(
15090 struct nb_cb_destroy_args *args)
15091 {
15092 switch (args->event) {
15093 case NB_EV_VALIDATE:
15094 case NB_EV_PREPARE:
15095 case NB_EV_ABORT:
15096 case NB_EV_APPLY:
15097 /* TODO: implement me. */
15098 break;
15099 }
15100
15101 return NB_OK;
15102 }
15103
15104 /*
15105 * XPath:
15106 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-import
15107 */
15108 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_modify(
15109 struct nb_cb_modify_args *args)
15110 {
15111 switch (args->event) {
15112 case NB_EV_VALIDATE:
15113 case NB_EV_PREPARE:
15114 case NB_EV_ABORT:
15115 case NB_EV_APPLY:
15116 /* TODO: implement me. */
15117 break;
15118 }
15119
15120 return NB_OK;
15121 }
15122
15123 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_destroy(
15124 struct nb_cb_destroy_args *args)
15125 {
15126 switch (args->event) {
15127 case NB_EV_VALIDATE:
15128 case NB_EV_PREPARE:
15129 case NB_EV_ABORT:
15130 case NB_EV_APPLY:
15131 /* TODO: implement me. */
15132 break;
15133 }
15134
15135 return NB_OK;
15136 }
15137
15138 /*
15139 * XPath:
15140 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-export
15141 */
15142 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify(
15143 struct nb_cb_modify_args *args)
15144 {
15145 switch (args->event) {
15146 case NB_EV_VALIDATE:
15147 case NB_EV_PREPARE:
15148 case NB_EV_ABORT:
15149 case NB_EV_APPLY:
15150 /* TODO: implement me. */
15151 break;
15152 }
15153
15154 return NB_OK;
15155 }
15156
15157 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy(
15158 struct nb_cb_destroy_args *args)
15159 {
15160 switch (args->event) {
15161 case NB_EV_VALIDATE:
15162 case NB_EV_PREPARE:
15163 case NB_EV_ABORT:
15164 case NB_EV_APPLY:
15165 /* TODO: implement me. */
15166 break;
15167 }
15168
15169 return NB_OK;
15170 }
15171
15172 /*
15173 * XPath:
15174 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-import
15175 */
15176 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_modify(
15177 struct nb_cb_modify_args *args)
15178 {
15179 switch (args->event) {
15180 case NB_EV_VALIDATE:
15181 case NB_EV_PREPARE:
15182 case NB_EV_ABORT:
15183 case NB_EV_APPLY:
15184 /* TODO: implement me. */
15185 break;
15186 }
15187
15188 return NB_OK;
15189 }
15190
15191 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_destroy(
15192 struct nb_cb_destroy_args *args)
15193 {
15194 switch (args->event) {
15195 case NB_EV_VALIDATE:
15196 case NB_EV_PREPARE:
15197 case NB_EV_ABORT:
15198 case NB_EV_APPLY:
15199 /* TODO: implement me. */
15200 break;
15201 }
15202
15203 return NB_OK;
15204 }
15205
15206 /*
15207 * XPath:
15208 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-export
15209 */
15210 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_modify(
15211 struct nb_cb_modify_args *args)
15212 {
15213 switch (args->event) {
15214 case NB_EV_VALIDATE:
15215 case NB_EV_PREPARE:
15216 case NB_EV_ABORT:
15217 case NB_EV_APPLY:
15218 /* TODO: implement me. */
15219 break;
15220 }
15221
15222 return NB_OK;
15223 }
15224
15225 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_destroy(
15226 struct nb_cb_destroy_args *args)
15227 {
15228 switch (args->event) {
15229 case NB_EV_VALIDATE:
15230 case NB_EV_PREPARE:
15231 case NB_EV_ABORT:
15232 case NB_EV_APPLY:
15233 /* TODO: implement me. */
15234 break;
15235 }
15236
15237 return NB_OK;
15238 }
15239
15240 /*
15241 * XPath:
15242 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-import
15243 */
15244 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_modify(
15245 struct nb_cb_modify_args *args)
15246 {
15247 switch (args->event) {
15248 case NB_EV_VALIDATE:
15249 case NB_EV_PREPARE:
15250 case NB_EV_ABORT:
15251 case NB_EV_APPLY:
15252 /* TODO: implement me. */
15253 break;
15254 }
15255
15256 return NB_OK;
15257 }
15258
15259 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_destroy(
15260 struct nb_cb_destroy_args *args)
15261 {
15262 switch (args->event) {
15263 case NB_EV_VALIDATE:
15264 case NB_EV_PREPARE:
15265 case NB_EV_ABORT:
15266 case NB_EV_APPLY:
15267 /* TODO: implement me. */
15268 break;
15269 }
15270
15271 return NB_OK;
15272 }
15273
15274 /*
15275 * XPath:
15276 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-export
15277 */
15278 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_modify(
15279 struct nb_cb_modify_args *args)
15280 {
15281 switch (args->event) {
15282 case NB_EV_VALIDATE:
15283 case NB_EV_PREPARE:
15284 case NB_EV_ABORT:
15285 case NB_EV_APPLY:
15286 /* TODO: implement me. */
15287 break;
15288 }
15289
15290 return NB_OK;
15291 }
15292
15293 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_destroy(
15294 struct nb_cb_destroy_args *args)
15295 {
15296 switch (args->event) {
15297 case NB_EV_VALIDATE:
15298 case NB_EV_PREPARE:
15299 case NB_EV_ABORT:
15300 case NB_EV_APPLY:
15301 /* TODO: implement me. */
15302 break;
15303 }
15304
15305 return NB_OK;
15306 }
15307
15308 /*
15309 * XPath:
15310 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-import
15311 */
15312 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
15313 struct nb_cb_modify_args *args)
15314 {
15315 switch (args->event) {
15316 case NB_EV_VALIDATE:
15317 case NB_EV_PREPARE:
15318 case NB_EV_ABORT:
15319 case NB_EV_APPLY:
15320 /* TODO: implement me. */
15321 break;
15322 }
15323
15324 return NB_OK;
15325 }
15326
15327 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
15328 struct nb_cb_destroy_args *args)
15329 {
15330 switch (args->event) {
15331 case NB_EV_VALIDATE:
15332 case NB_EV_PREPARE:
15333 case NB_EV_ABORT:
15334 case NB_EV_APPLY:
15335 /* TODO: implement me. */
15336 break;
15337 }
15338
15339 return NB_OK;
15340 }
15341
15342 /*
15343 * XPath:
15344 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-export
15345 */
15346 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
15347 struct nb_cb_modify_args *args)
15348 {
15349 switch (args->event) {
15350 case NB_EV_VALIDATE:
15351 case NB_EV_PREPARE:
15352 case NB_EV_ABORT:
15353 case NB_EV_APPLY:
15354 /* TODO: implement me. */
15355 break;
15356 }
15357
15358 return NB_OK;
15359 }
15360
15361 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
15362 struct nb_cb_destroy_args *args)
15363 {
15364 switch (args->event) {
15365 case NB_EV_VALIDATE:
15366 case NB_EV_PREPARE:
15367 case NB_EV_ABORT:
15368 case NB_EV_APPLY:
15369 /* TODO: implement me. */
15370 break;
15371 }
15372
15373 return NB_OK;
15374 }
15375
15376 /*
15377 * XPath:
15378 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-import
15379 */
15380 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_modify(
15381 struct nb_cb_modify_args *args)
15382 {
15383 switch (args->event) {
15384 case NB_EV_VALIDATE:
15385 case NB_EV_PREPARE:
15386 case NB_EV_ABORT:
15387 case NB_EV_APPLY:
15388 /* TODO: implement me. */
15389 break;
15390 }
15391
15392 return NB_OK;
15393 }
15394
15395 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
15396 struct nb_cb_destroy_args *args)
15397 {
15398 switch (args->event) {
15399 case NB_EV_VALIDATE:
15400 case NB_EV_PREPARE:
15401 case NB_EV_ABORT:
15402 case NB_EV_APPLY:
15403 /* TODO: implement me. */
15404 break;
15405 }
15406
15407 return NB_OK;
15408 }
15409
15410 /*
15411 * XPath:
15412 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-export
15413 */
15414 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_modify(
15415 struct nb_cb_modify_args *args)
15416 {
15417 switch (args->event) {
15418 case NB_EV_VALIDATE:
15419 case NB_EV_PREPARE:
15420 case NB_EV_ABORT:
15421 case NB_EV_APPLY:
15422 /* TODO: implement me. */
15423 break;
15424 }
15425
15426 return NB_OK;
15427 }
15428
15429 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
15430 struct nb_cb_destroy_args *args)
15431 {
15432 switch (args->event) {
15433 case NB_EV_VALIDATE:
15434 case NB_EV_PREPARE:
15435 case NB_EV_ABORT:
15436 case NB_EV_APPLY:
15437 /* TODO: implement me. */
15438 break;
15439 }
15440
15441 return NB_OK;
15442 }
15443
15444 /*
15445 * XPath:
15446 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-local-unchanged
15447 */
15448 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_local_unchanged_modify(
15449 struct nb_cb_modify_args *args)
15450 {
15451 switch (args->event) {
15452 case NB_EV_VALIDATE:
15453 case NB_EV_PREPARE:
15454 case NB_EV_ABORT:
15455 case NB_EV_APPLY:
15456 /* TODO: implement me. */
15457 break;
15458 }
15459
15460 return NB_OK;
15461 }
15462
15463 /*
15464 * XPath:
15465 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/add-paths/path-type
15466 */
15467 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_add_paths_path_type_modify(
15468 struct nb_cb_modify_args *args)
15469 {
15470 switch (args->event) {
15471 case NB_EV_VALIDATE:
15472 case NB_EV_PREPARE:
15473 case NB_EV_ABORT:
15474 case NB_EV_APPLY:
15475 /* TODO: implement me. */
15476 break;
15477 }
15478
15479 return NB_OK;
15480 }
15481
15482 /*
15483 * XPath:
15484 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-as
15485 */
15486 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_modify(
15487 struct nb_cb_modify_args *args)
15488 {
15489 switch (args->event) {
15490 case NB_EV_VALIDATE:
15491 case NB_EV_PREPARE:
15492 case NB_EV_ABORT:
15493 case NB_EV_APPLY:
15494 /* TODO: implement me. */
15495 break;
15496 }
15497
15498 return NB_OK;
15499 }
15500
15501 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_destroy(
15502 struct nb_cb_destroy_args *args)
15503 {
15504 switch (args->event) {
15505 case NB_EV_VALIDATE:
15506 case NB_EV_PREPARE:
15507 case NB_EV_ABORT:
15508 case NB_EV_APPLY:
15509 /* TODO: implement me. */
15510 break;
15511 }
15512
15513 return NB_OK;
15514 }
15515
15516 /*
15517 * XPath:
15518 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-origin-as
15519 */
15520 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
15521 struct nb_cb_modify_args *args)
15522 {
15523 switch (args->event) {
15524 case NB_EV_VALIDATE:
15525 case NB_EV_PREPARE:
15526 case NB_EV_ABORT:
15527 case NB_EV_APPLY:
15528 /* TODO: implement me. */
15529 break;
15530 }
15531
15532 return NB_OK;
15533 }
15534
15535 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
15536 struct nb_cb_destroy_args *args)
15537 {
15538 switch (args->event) {
15539 case NB_EV_VALIDATE:
15540 case NB_EV_PREPARE:
15541 case NB_EV_ABORT:
15542 case NB_EV_APPLY:
15543 /* TODO: implement me. */
15544 break;
15545 }
15546
15547 return NB_OK;
15548 }
15549
15550 /*
15551 * XPath:
15552 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/replace-peer-as
15553 */
15554 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify(
15555 struct nb_cb_modify_args *args)
15556 {
15557 switch (args->event) {
15558 case NB_EV_VALIDATE:
15559 case NB_EV_PREPARE:
15560 case NB_EV_ABORT:
15561 return NB_OK;
15562 case NB_EV_APPLY:
15563 return bgp_neighbor_afi_safi_flag_modify(
15564 args, PEER_FLAG_AS_OVERRIDE,
15565 yang_dnode_get_bool(args->dnode, NULL));
15566
15567 break;
15568 }
15569
15570 return NB_OK;
15571 }
15572
15573 /*
15574 * XPath:
15575 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/originate
15576 */
15577 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify(
15578 struct nb_cb_modify_args *args)
15579 {
15580 switch (args->event) {
15581 case NB_EV_VALIDATE:
15582 case NB_EV_PREPARE:
15583 case NB_EV_ABORT:
15584 case NB_EV_APPLY:
15585 /* TODO: implement me. */
15586 break;
15587 }
15588
15589 return NB_OK;
15590 }
15591
15592 /*
15593 * XPath:
15594 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map
15595 */
15596 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify(
15597 struct nb_cb_modify_args *args)
15598 {
15599 switch (args->event) {
15600 case NB_EV_VALIDATE:
15601 case NB_EV_PREPARE:
15602 case NB_EV_ABORT:
15603 case NB_EV_APPLY:
15604 /* TODO: implement me. */
15605 break;
15606 }
15607
15608 return NB_OK;
15609 }
15610
15611 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy(
15612 struct nb_cb_destroy_args *args)
15613 {
15614 switch (args->event) {
15615 case NB_EV_VALIDATE:
15616 case NB_EV_PREPARE:
15617 case NB_EV_ABORT:
15618 case NB_EV_APPLY:
15619 /* TODO: implement me. */
15620 break;
15621 }
15622
15623 return NB_OK;
15624 }
15625
15626 /*
15627 * XPath:
15628 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/as-path-unchanged
15629 */
15630 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
15631 struct nb_cb_modify_args *args)
15632 {
15633 switch (args->event) {
15634 case NB_EV_VALIDATE:
15635 case NB_EV_PREPARE:
15636 case NB_EV_ABORT:
15637 return NB_OK;
15638 case NB_EV_APPLY:
15639 return bgp_neighbor_afi_safi_flag_modify(
15640 args, PEER_FLAG_AS_PATH_UNCHANGED,
15641 yang_dnode_get_bool(args->dnode, NULL));
15642
15643 break;
15644 }
15645
15646 return NB_OK;
15647 }
15648
15649 /*
15650 * XPath:
15651 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/next-hop-unchanged
15652 */
15653 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
15654 struct nb_cb_modify_args *args)
15655 {
15656 switch (args->event) {
15657 case NB_EV_VALIDATE:
15658 case NB_EV_PREPARE:
15659 case NB_EV_ABORT:
15660 return NB_OK;
15661 case NB_EV_APPLY:
15662 return bgp_neighbor_afi_safi_flag_modify(
15663 args, PEER_FLAG_NEXTHOP_UNCHANGED,
15664 yang_dnode_get_bool(args->dnode, NULL));
15665
15666 break;
15667 }
15668
15669 return NB_OK;
15670 }
15671
15672 /*
15673 * XPath:
15674 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/med-unchanged
15675 */
15676 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_unchanged_modify(
15677 struct nb_cb_modify_args *args)
15678 {
15679 switch (args->event) {
15680 case NB_EV_VALIDATE:
15681 case NB_EV_PREPARE:
15682 case NB_EV_ABORT:
15683 return NB_OK;
15684 case NB_EV_APPLY:
15685 return bgp_neighbor_afi_safi_flag_modify(
15686 args, PEER_FLAG_MED_UNCHANGED,
15687 yang_dnode_get_bool(args->dnode, NULL));
15688
15689 break;
15690 }
15691
15692 return NB_OK;
15693 }
15694
15695 /*
15696 * XPath:
15697 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-send
15698 */
15699 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_modify(
15700 struct nb_cb_modify_args *args)
15701 {
15702 switch (args->event) {
15703 case NB_EV_VALIDATE:
15704 case NB_EV_PREPARE:
15705 case NB_EV_ABORT:
15706 case NB_EV_APPLY:
15707 /* TODO: implement me. */
15708 break;
15709 }
15710
15711 return NB_OK;
15712 }
15713
15714 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_destroy(
15715 struct nb_cb_destroy_args *args)
15716 {
15717 switch (args->event) {
15718 case NB_EV_VALIDATE:
15719 case NB_EV_PREPARE:
15720 case NB_EV_ABORT:
15721 case NB_EV_APPLY:
15722 /* TODO: implement me. */
15723 break;
15724 }
15725
15726 return NB_OK;
15727 }
15728
15729 /*
15730 * XPath:
15731 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-receive
15732 */
15733 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_modify(
15734 struct nb_cb_modify_args *args)
15735 {
15736 switch (args->event) {
15737 case NB_EV_VALIDATE:
15738 case NB_EV_PREPARE:
15739 case NB_EV_ABORT:
15740 case NB_EV_APPLY:
15741 /* TODO: implement me. */
15742 break;
15743 }
15744
15745 return NB_OK;
15746 }
15747
15748 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_destroy(
15749 struct nb_cb_destroy_args *args)
15750 {
15751 switch (args->event) {
15752 case NB_EV_VALIDATE:
15753 case NB_EV_PREPARE:
15754 case NB_EV_ABORT:
15755 case NB_EV_APPLY:
15756 /* TODO: implement me. */
15757 break;
15758 }
15759
15760 return NB_OK;
15761 }
15762
15763 /*
15764 * XPath:
15765 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-both
15766 */
15767 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_modify(
15768 struct nb_cb_modify_args *args)
15769 {
15770 switch (args->event) {
15771 case NB_EV_VALIDATE:
15772 case NB_EV_PREPARE:
15773 case NB_EV_ABORT:
15774 case NB_EV_APPLY:
15775 /* TODO: implement me. */
15776 break;
15777 }
15778
15779 return NB_OK;
15780 }
15781
15782 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_destroy(
15783 struct nb_cb_destroy_args *args)
15784 {
15785 switch (args->event) {
15786 case NB_EV_VALIDATE:
15787 case NB_EV_PREPARE:
15788 case NB_EV_ABORT:
15789 case NB_EV_APPLY:
15790 /* TODO: implement me. */
15791 break;
15792 }
15793
15794 return NB_OK;
15795 }
15796
15797 /*
15798 * XPath:
15799 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list
15800 */
15801 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create(
15802 struct nb_cb_create_args *args)
15803 {
15804 switch (args->event) {
15805 case NB_EV_VALIDATE:
15806 case NB_EV_PREPARE:
15807 case NB_EV_ABORT:
15808 case NB_EV_APPLY:
15809 /* TODO: implement me. */
15810 break;
15811 }
15812
15813 return NB_OK;
15814 }
15815
15816 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy(
15817 struct nb_cb_destroy_args *args)
15818 {
15819 switch (args->event) {
15820 case NB_EV_VALIDATE:
15821 case NB_EV_PREPARE:
15822 case NB_EV_ABORT:
15823 return NB_OK;
15824 case NB_EV_APPLY:
15825 return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
15826 }
15827
15828 return NB_OK;
15829 }
15830
15831 /*
15832 * XPath:
15833 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/max-prefixes
15834 */
15835 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
15836 struct nb_cb_modify_args *args)
15837 {
15838 switch (args->event) {
15839 case NB_EV_VALIDATE:
15840 case NB_EV_PREPARE:
15841 case NB_EV_ABORT:
15842 case NB_EV_APPLY:
15843 /* TODO: implement me. */
15844 break;
15845 }
15846
15847 return NB_OK;
15848 }
15849
15850 /*
15851 * XPath:
15852 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check
15853 */
15854 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
15855 struct nb_cb_modify_args *args)
15856 {
15857 switch (args->event) {
15858 case NB_EV_VALIDATE:
15859 case NB_EV_PREPARE:
15860 case NB_EV_ABORT:
15861 case NB_EV_APPLY:
15862 /* TODO: implement me. */
15863 break;
15864 }
15865
15866 return NB_OK;
15867 }
15868
15869 /*
15870 * XPath:
15871 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only
15872 */
15873 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
15874 struct nb_cb_modify_args *args)
15875 {
15876 switch (args->event) {
15877 case NB_EV_VALIDATE:
15878 case NB_EV_PREPARE:
15879 case NB_EV_ABORT:
15880 case NB_EV_APPLY:
15881 /* TODO: implement me. */
15882 break;
15883 }
15884
15885 return NB_OK;
15886 }
15887
15888 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
15889 struct nb_cb_destroy_args *args)
15890 {
15891 switch (args->event) {
15892 case NB_EV_VALIDATE:
15893 case NB_EV_PREPARE:
15894 case NB_EV_ABORT:
15895 case NB_EV_APPLY:
15896 /* TODO: implement me. */
15897 break;
15898 }
15899
15900 return NB_OK;
15901 }
15902
15903 /*
15904 * XPath:
15905 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer
15906 */
15907 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
15908 struct nb_cb_modify_args *args)
15909 {
15910 switch (args->event) {
15911 case NB_EV_VALIDATE:
15912 case NB_EV_PREPARE:
15913 case NB_EV_ABORT:
15914 case NB_EV_APPLY:
15915 /* TODO: implement me. */
15916 break;
15917 }
15918
15919 return NB_OK;
15920 }
15921
15922 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
15923 struct nb_cb_destroy_args *args)
15924 {
15925 switch (args->event) {
15926 case NB_EV_VALIDATE:
15927 case NB_EV_PREPARE:
15928 case NB_EV_ABORT:
15929 case NB_EV_APPLY:
15930 /* TODO: implement me. */
15931 break;
15932 }
15933
15934 return NB_OK;
15935 }
15936
15937 /*
15938 * XPath:
15939 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
15940 */
15941 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
15942 struct nb_cb_modify_args *args)
15943 {
15944 switch (args->event) {
15945 case NB_EV_VALIDATE:
15946 case NB_EV_PREPARE:
15947 case NB_EV_ABORT:
15948 case NB_EV_APPLY:
15949 /* TODO: implement me. */
15950 break;
15951 }
15952
15953 return NB_OK;
15954 }
15955
15956 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
15957 struct nb_cb_destroy_args *args)
15958 {
15959 switch (args->event) {
15960 case NB_EV_VALIDATE:
15961 case NB_EV_PREPARE:
15962 case NB_EV_ABORT:
15963 case NB_EV_APPLY:
15964 /* TODO: implement me. */
15965 break;
15966 }
15967
15968 return NB_OK;
15969 }
15970
15971 /*
15972 * XPath:
15973 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
15974 */
15975 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
15976 struct nb_cb_modify_args *args)
15977 {
15978 switch (args->event) {
15979 case NB_EV_VALIDATE:
15980 case NB_EV_PREPARE:
15981 case NB_EV_ABORT:
15982 case NB_EV_APPLY:
15983 /* TODO: implement me. */
15984 break;
15985 }
15986
15987 return NB_OK;
15988 }
15989
15990 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
15991 struct nb_cb_destroy_args *args)
15992 {
15993 switch (args->event) {
15994 case NB_EV_VALIDATE:
15995 case NB_EV_PREPARE:
15996 case NB_EV_ABORT:
15997 case NB_EV_APPLY:
15998 /* TODO: implement me. */
15999 break;
16000 }
16001
16002 return NB_OK;
16003 }
16004
16005 /*
16006 * XPath:
16007 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer
16008 */
16009 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
16010 struct nb_cb_modify_args *args)
16011 {
16012 switch (args->event) {
16013 case NB_EV_VALIDATE:
16014 case NB_EV_PREPARE:
16015 case NB_EV_ABORT:
16016 case NB_EV_APPLY:
16017 /* TODO: implement me. */
16018 break;
16019 }
16020
16021 return NB_OK;
16022 }
16023
16024 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
16025 struct nb_cb_destroy_args *args)
16026 {
16027 switch (args->event) {
16028 case NB_EV_VALIDATE:
16029 case NB_EV_PREPARE:
16030 case NB_EV_ABORT:
16031 case NB_EV_APPLY:
16032 /* TODO: implement me. */
16033 break;
16034 }
16035
16036 return NB_OK;
16037 }
16038
16039 /*
16040 * XPath:
16041 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
16042 */
16043 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
16044 struct nb_cb_modify_args *args)
16045 {
16046 switch (args->event) {
16047 case NB_EV_VALIDATE:
16048 case NB_EV_PREPARE:
16049 case NB_EV_ABORT:
16050 case NB_EV_APPLY:
16051 /* TODO: implement me. */
16052 break;
16053 }
16054
16055 return NB_OK;
16056 }
16057
16058 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
16059 struct nb_cb_destroy_args *args)
16060 {
16061 switch (args->event) {
16062 case NB_EV_VALIDATE:
16063 case NB_EV_PREPARE:
16064 case NB_EV_ABORT:
16065 case NB_EV_APPLY:
16066 /* TODO: implement me. */
16067 break;
16068 }
16069
16070 return NB_OK;
16071 }
16072
16073 /*
16074 * XPath:
16075 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only
16076 */
16077 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
16078 struct nb_cb_modify_args *args)
16079 {
16080 switch (args->event) {
16081 case NB_EV_VALIDATE:
16082 case NB_EV_PREPARE:
16083 case NB_EV_ABORT:
16084 case NB_EV_APPLY:
16085 /* TODO: implement me. */
16086 break;
16087 }
16088
16089 return NB_OK;
16090 }
16091
16092 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
16093 struct nb_cb_destroy_args *args)
16094 {
16095 switch (args->event) {
16096 case NB_EV_VALIDATE:
16097 case NB_EV_PREPARE:
16098 case NB_EV_ABORT:
16099 case NB_EV_APPLY:
16100 /* TODO: implement me. */
16101 break;
16102 }
16103
16104 return NB_OK;
16105 }
16106
16107 /*
16108 * XPath:
16109 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self
16110 */
16111 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify(
16112 struct nb_cb_modify_args *args)
16113 {
16114 switch (args->event) {
16115 case NB_EV_VALIDATE:
16116 case NB_EV_PREPARE:
16117 case NB_EV_ABORT:
16118 return NB_OK;
16119 case NB_EV_APPLY:
16120 return bgp_neighbor_afi_safi_flag_modify(
16121 args, PEER_FLAG_NEXTHOP_SELF,
16122 yang_dnode_get_bool(args->dnode, NULL));
16123
16124 break;
16125 }
16126
16127 return NB_OK;
16128 }
16129
16130 /*
16131 * XPath:
16132 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self-force
16133 */
16134 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
16135 struct nb_cb_modify_args *args)
16136 {
16137 switch (args->event) {
16138 case NB_EV_VALIDATE:
16139 case NB_EV_PREPARE:
16140 case NB_EV_ABORT:
16141 return NB_OK;
16142 case NB_EV_APPLY:
16143 return bgp_neighbor_afi_safi_flag_modify(
16144 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
16145 yang_dnode_get_bool(args->dnode, NULL));
16146
16147 break;
16148 }
16149
16150 return NB_OK;
16151 }
16152
16153 /*
16154 * XPath:
16155 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all
16156 */
16157 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_modify(
16158 struct nb_cb_modify_args *args)
16159 {
16160 switch (args->event) {
16161 case NB_EV_VALIDATE:
16162 case NB_EV_PREPARE:
16163 case NB_EV_ABORT:
16164 return NB_OK;
16165 case NB_EV_APPLY:
16166 return bgp_neighbor_afi_safi_flag_modify(
16167 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
16168 yang_dnode_get_bool(args->dnode, NULL));
16169
16170 break;
16171 }
16172
16173 return NB_OK;
16174 }
16175
16176 /*
16177 * XPath:
16178 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all-replace
16179 */
16180 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
16181 struct nb_cb_modify_args *args)
16182 {
16183 switch (args->event) {
16184 case NB_EV_VALIDATE:
16185 case NB_EV_PREPARE:
16186 case NB_EV_ABORT:
16187 return NB_OK;
16188 case NB_EV_APPLY:
16189 return bgp_neighbor_afi_safi_flag_modify(
16190 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
16191 yang_dnode_get_bool(args->dnode, NULL));
16192
16193 break;
16194 }
16195
16196 return NB_OK;
16197 }
16198
16199 /*
16200 * XPath:
16201 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as
16202 */
16203 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_modify(
16204 struct nb_cb_modify_args *args)
16205 {
16206 switch (args->event) {
16207 case NB_EV_VALIDATE:
16208 case NB_EV_PREPARE:
16209 case NB_EV_ABORT:
16210 return NB_OK;
16211 case NB_EV_APPLY:
16212 return bgp_neighbor_afi_safi_flag_modify(
16213 args, PEER_FLAG_REMOVE_PRIVATE_AS,
16214 yang_dnode_get_bool(args->dnode, NULL));
16215
16216 break;
16217 }
16218
16219 return NB_OK;
16220 }
16221
16222 /*
16223 * XPath:
16224 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-replace
16225 */
16226 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_replace_modify(
16227 struct nb_cb_modify_args *args)
16228 {
16229 switch (args->event) {
16230 case NB_EV_VALIDATE:
16231 case NB_EV_PREPARE:
16232 case NB_EV_ABORT:
16233 return NB_OK;
16234 case NB_EV_APPLY:
16235 return bgp_neighbor_afi_safi_flag_modify(
16236 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
16237 yang_dnode_get_bool(args->dnode, NULL));
16238
16239 break;
16240 }
16241
16242 return NB_OK;
16243 }
16244
16245 /*
16246 * XPath:
16247 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/route-reflector/route-reflector-client
16248 */
16249 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_route_reflector_route_reflector_client_modify(
16250 struct nb_cb_modify_args *args)
16251 {
16252 switch (args->event) {
16253 case NB_EV_VALIDATE:
16254 case NB_EV_PREPARE:
16255 case NB_EV_ABORT:
16256 return NB_OK;
16257 case NB_EV_APPLY:
16258 return bgp_neighbor_afi_safi_flag_modify(
16259 args, PEER_FLAG_REFLECTOR_CLIENT,
16260 yang_dnode_get_bool(args->dnode, NULL));
16261
16262 break;
16263 }
16264
16265 return NB_OK;
16266 }
16267
16268 /*
16269 * XPath:
16270 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/route-server/route-server-client
16271 */
16272 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_route_server_route_server_client_modify(
16273 struct nb_cb_modify_args *args)
16274 {
16275 switch (args->event) {
16276 case NB_EV_VALIDATE:
16277 case NB_EV_PREPARE:
16278 case NB_EV_ABORT:
16279 return NB_OK;
16280 case NB_EV_APPLY:
16281 return bgp_neighbor_afi_safi_flag_modify(
16282 args, PEER_FLAG_RSERVER_CLIENT,
16283 yang_dnode_get_bool(args->dnode, NULL));
16284
16285 break;
16286 }
16287
16288 return NB_OK;
16289 }
16290
16291 /*
16292 * XPath:
16293 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-community
16294 */
16295 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_community_modify(
16296 struct nb_cb_modify_args *args)
16297 {
16298 switch (args->event) {
16299 case NB_EV_VALIDATE:
16300 case NB_EV_PREPARE:
16301 case NB_EV_ABORT:
16302 return NB_OK;
16303 case NB_EV_APPLY:
16304 return bgp_neighbor_afi_safi_flag_modify(
16305 args, PEER_FLAG_SEND_COMMUNITY,
16306 yang_dnode_get_bool(args->dnode, NULL));
16307
16308 break;
16309 }
16310
16311 return NB_OK;
16312 }
16313
16314 /*
16315 * XPath:
16316 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-ext-community
16317 */
16318 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_ext_community_modify(
16319 struct nb_cb_modify_args *args)
16320 {
16321 switch (args->event) {
16322 case NB_EV_VALIDATE:
16323 case NB_EV_PREPARE:
16324 case NB_EV_ABORT:
16325 return NB_OK;
16326 case NB_EV_APPLY:
16327 return bgp_neighbor_afi_safi_flag_modify(
16328 args, PEER_FLAG_SEND_EXT_COMMUNITY,
16329 yang_dnode_get_bool(args->dnode, NULL));
16330
16331 break;
16332 }
16333
16334 return NB_OK;
16335 }
16336
16337 /*
16338 * XPath:
16339 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-large-community
16340 */
16341 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_large_community_modify(
16342 struct nb_cb_modify_args *args)
16343 {
16344 switch (args->event) {
16345 case NB_EV_VALIDATE:
16346 case NB_EV_PREPARE:
16347 case NB_EV_ABORT:
16348 return NB_OK;
16349 case NB_EV_APPLY:
16350 return bgp_neighbor_afi_safi_flag_modify(
16351 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
16352 yang_dnode_get_bool(args->dnode, NULL));
16353
16354 break;
16355 }
16356
16357 return NB_OK;
16358 }
16359
16360 /*
16361 * XPath:
16362 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/soft-reconfiguration
16363 */
16364 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_modify(
16365 struct nb_cb_modify_args *args)
16366 {
16367 switch (args->event) {
16368 case NB_EV_VALIDATE:
16369 case NB_EV_PREPARE:
16370 case NB_EV_ABORT:
16371 return NB_OK;
16372 case NB_EV_APPLY:
16373 return bgp_neighbor_afi_safi_flag_modify(
16374 args, PEER_FLAG_SOFT_RECONFIG,
16375 yang_dnode_get_bool(args->dnode, NULL));
16376
16377 break;
16378 }
16379
16380 return NB_OK;
16381 }
16382
16383 /*
16384 * XPath:
16385 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/weight/weight-attribute
16386 */
16387 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_modify(
16388 struct nb_cb_modify_args *args)
16389 {
16390 switch (args->event) {
16391 case NB_EV_VALIDATE:
16392 case NB_EV_PREPARE:
16393 case NB_EV_ABORT:
16394 return NB_OK;
16395 case NB_EV_APPLY:
16396 return bgp_neighbor_afi_safi_weight_modify(args);
16397
16398 break;
16399 }
16400
16401 return NB_OK;
16402 }
16403
16404 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_destroy(
16405 struct nb_cb_destroy_args *args)
16406 {
16407 switch (args->event) {
16408 case NB_EV_VALIDATE:
16409 case NB_EV_PREPARE:
16410 case NB_EV_ABORT:
16411 return NB_OK;
16412 case NB_EV_APPLY:
16413 return bgp_neighbor_afi_safi_weight_destroy(args);
16414
16415 break;
16416 }
16417
16418 return NB_OK;
16419 }
16420
16421 /*
16422 * XPath:
16423 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/add-paths/path-type
16424 */
16425 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_add_paths_path_type_modify(
16426 struct nb_cb_modify_args *args)
16427 {
16428 switch (args->event) {
16429 case NB_EV_VALIDATE:
16430 case NB_EV_PREPARE:
16431 case NB_EV_ABORT:
16432 case NB_EV_APPLY:
16433 /* TODO: implement me. */
16434 break;
16435 }
16436
16437 return NB_OK;
16438 }
16439
16440 /*
16441 * XPath:
16442 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-as
16443 */
16444 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_modify(
16445 struct nb_cb_modify_args *args)
16446 {
16447 switch (args->event) {
16448 case NB_EV_VALIDATE:
16449 case NB_EV_PREPARE:
16450 case NB_EV_ABORT:
16451 case NB_EV_APPLY:
16452 /* TODO: implement me. */
16453 break;
16454 }
16455
16456 return NB_OK;
16457 }
16458
16459 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_destroy(
16460 struct nb_cb_destroy_args *args)
16461 {
16462 switch (args->event) {
16463 case NB_EV_VALIDATE:
16464 case NB_EV_PREPARE:
16465 case NB_EV_ABORT:
16466 case NB_EV_APPLY:
16467 /* TODO: implement me. */
16468 break;
16469 }
16470
16471 return NB_OK;
16472 }
16473
16474 /*
16475 * XPath:
16476 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-origin-as
16477 */
16478 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_modify(
16479 struct nb_cb_modify_args *args)
16480 {
16481 switch (args->event) {
16482 case NB_EV_VALIDATE:
16483 case NB_EV_PREPARE:
16484 case NB_EV_ABORT:
16485 case NB_EV_APPLY:
16486 /* TODO: implement me. */
16487 break;
16488 }
16489
16490 return NB_OK;
16491 }
16492
16493 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_destroy(
16494 struct nb_cb_destroy_args *args)
16495 {
16496 switch (args->event) {
16497 case NB_EV_VALIDATE:
16498 case NB_EV_PREPARE:
16499 case NB_EV_ABORT:
16500 case NB_EV_APPLY:
16501 /* TODO: implement me. */
16502 break;
16503 }
16504
16505 return NB_OK;
16506 }
16507
16508 /*
16509 * XPath:
16510 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/replace-peer-as
16511 */
16512 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify(
16513 struct nb_cb_modify_args *args)
16514 {
16515 switch (args->event) {
16516 case NB_EV_VALIDATE:
16517 case NB_EV_PREPARE:
16518 case NB_EV_ABORT:
16519 return NB_OK;
16520 case NB_EV_APPLY:
16521 return bgp_neighbor_afi_safi_flag_modify(
16522 args, PEER_FLAG_AS_OVERRIDE,
16523 yang_dnode_get_bool(args->dnode, NULL));
16524
16525 break;
16526 }
16527
16528 return NB_OK;
16529 }
16530
16531 /*
16532 * XPath:
16533 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/originate
16534 */
16535 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify(
16536 struct nb_cb_modify_args *args)
16537 {
16538 switch (args->event) {
16539 case NB_EV_VALIDATE:
16540 case NB_EV_PREPARE:
16541 case NB_EV_ABORT:
16542 case NB_EV_APPLY:
16543 /* TODO: implement me. */
16544 break;
16545 }
16546
16547 return NB_OK;
16548 }
16549
16550 /*
16551 * XPath:
16552 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map
16553 */
16554 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify(
16555 struct nb_cb_modify_args *args)
16556 {
16557 switch (args->event) {
16558 case NB_EV_VALIDATE:
16559 case NB_EV_PREPARE:
16560 case NB_EV_ABORT:
16561 case NB_EV_APPLY:
16562 /* TODO: implement me. */
16563 break;
16564 }
16565
16566 return NB_OK;
16567 }
16568
16569 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy(
16570 struct nb_cb_destroy_args *args)
16571 {
16572 switch (args->event) {
16573 case NB_EV_VALIDATE:
16574 case NB_EV_PREPARE:
16575 case NB_EV_ABORT:
16576 case NB_EV_APPLY:
16577 /* TODO: implement me. */
16578 break;
16579 }
16580
16581 return NB_OK;
16582 }
16583
16584 /*
16585 * XPath:
16586 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/as-path-unchanged
16587 */
16588 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify(
16589 struct nb_cb_modify_args *args)
16590 {
16591 switch (args->event) {
16592 case NB_EV_VALIDATE:
16593 case NB_EV_PREPARE:
16594 case NB_EV_ABORT:
16595 return NB_OK;
16596 case NB_EV_APPLY:
16597 return bgp_neighbor_afi_safi_flag_modify(
16598 args, PEER_FLAG_AS_PATH_UNCHANGED,
16599 yang_dnode_get_bool(args->dnode, NULL));
16600
16601 break;
16602 }
16603
16604 return NB_OK;
16605 }
16606
16607 /*
16608 * XPath:
16609 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/next-hop-unchanged
16610 */
16611 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify(
16612 struct nb_cb_modify_args *args)
16613 {
16614 switch (args->event) {
16615 case NB_EV_VALIDATE:
16616 case NB_EV_PREPARE:
16617 case NB_EV_ABORT:
16618 return NB_OK;
16619 case NB_EV_APPLY:
16620 return bgp_neighbor_afi_safi_flag_modify(
16621 args, PEER_FLAG_NEXTHOP_UNCHANGED,
16622 yang_dnode_get_bool(args->dnode, NULL));
16623
16624 break;
16625 }
16626
16627 return NB_OK;
16628 }
16629
16630 /*
16631 * XPath:
16632 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/med-unchanged
16633 */
16634 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_unchanged_modify(
16635 struct nb_cb_modify_args *args)
16636 {
16637 switch (args->event) {
16638 case NB_EV_VALIDATE:
16639 case NB_EV_PREPARE:
16640 case NB_EV_ABORT:
16641 return NB_OK;
16642 case NB_EV_APPLY:
16643 return bgp_neighbor_afi_safi_flag_modify(
16644 args, PEER_FLAG_MED_UNCHANGED,
16645 yang_dnode_get_bool(args->dnode, NULL));
16646
16647 break;
16648 }
16649
16650 return NB_OK;
16651 }
16652
16653 /*
16654 * XPath:
16655 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-send
16656 */
16657 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_modify(
16658 struct nb_cb_modify_args *args)
16659 {
16660 switch (args->event) {
16661 case NB_EV_VALIDATE:
16662 case NB_EV_PREPARE:
16663 case NB_EV_ABORT:
16664 case NB_EV_APPLY:
16665 /* TODO: implement me. */
16666 break;
16667 }
16668
16669 return NB_OK;
16670 }
16671
16672 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_destroy(
16673 struct nb_cb_destroy_args *args)
16674 {
16675 switch (args->event) {
16676 case NB_EV_VALIDATE:
16677 case NB_EV_PREPARE:
16678 case NB_EV_ABORT:
16679 case NB_EV_APPLY:
16680 /* TODO: implement me. */
16681 break;
16682 }
16683
16684 return NB_OK;
16685 }
16686
16687 /*
16688 * XPath:
16689 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-receive
16690 */
16691 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_modify(
16692 struct nb_cb_modify_args *args)
16693 {
16694 switch (args->event) {
16695 case NB_EV_VALIDATE:
16696 case NB_EV_PREPARE:
16697 case NB_EV_ABORT:
16698 case NB_EV_APPLY:
16699 /* TODO: implement me. */
16700 break;
16701 }
16702
16703 return NB_OK;
16704 }
16705
16706 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_destroy(
16707 struct nb_cb_destroy_args *args)
16708 {
16709 switch (args->event) {
16710 case NB_EV_VALIDATE:
16711 case NB_EV_PREPARE:
16712 case NB_EV_ABORT:
16713 case NB_EV_APPLY:
16714 /* TODO: implement me. */
16715 break;
16716 }
16717
16718 return NB_OK;
16719 }
16720
16721 /*
16722 * XPath:
16723 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-both
16724 */
16725 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_modify(
16726 struct nb_cb_modify_args *args)
16727 {
16728 switch (args->event) {
16729 case NB_EV_VALIDATE:
16730 case NB_EV_PREPARE:
16731 case NB_EV_ABORT:
16732 case NB_EV_APPLY:
16733 /* TODO: implement me. */
16734 break;
16735 }
16736
16737 return NB_OK;
16738 }
16739
16740 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_destroy(
16741 struct nb_cb_destroy_args *args)
16742 {
16743 switch (args->event) {
16744 case NB_EV_VALIDATE:
16745 case NB_EV_PREPARE:
16746 case NB_EV_ABORT:
16747 case NB_EV_APPLY:
16748 /* TODO: implement me. */
16749 break;
16750 }
16751
16752 return NB_OK;
16753 }
16754
16755 /*
16756 * XPath:
16757 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list
16758 */
16759 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create(
16760 struct nb_cb_create_args *args)
16761 {
16762 switch (args->event) {
16763 case NB_EV_VALIDATE:
16764 case NB_EV_PREPARE:
16765 case NB_EV_ABORT:
16766 case NB_EV_APPLY:
16767 /* TODO: implement me. */
16768 break;
16769 }
16770
16771 return NB_OK;
16772 }
16773
16774 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy(
16775 struct nb_cb_destroy_args *args)
16776 {
16777 switch (args->event) {
16778 case NB_EV_VALIDATE:
16779 case NB_EV_PREPARE:
16780 case NB_EV_ABORT:
16781 return NB_OK;
16782 case NB_EV_APPLY:
16783 return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
16784 }
16785
16786 return NB_OK;
16787 }
16788
16789 /*
16790 * XPath:
16791 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/max-prefixes
16792 */
16793 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify(
16794 struct nb_cb_modify_args *args)
16795 {
16796 switch (args->event) {
16797 case NB_EV_VALIDATE:
16798 case NB_EV_PREPARE:
16799 case NB_EV_ABORT:
16800 case NB_EV_APPLY:
16801 /* TODO: implement me. */
16802 break;
16803 }
16804
16805 return NB_OK;
16806 }
16807
16808 /*
16809 * XPath:
16810 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check
16811 */
16812 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify(
16813 struct nb_cb_modify_args *args)
16814 {
16815 switch (args->event) {
16816 case NB_EV_VALIDATE:
16817 case NB_EV_PREPARE:
16818 case NB_EV_ABORT:
16819 case NB_EV_APPLY:
16820 /* TODO: implement me. */
16821 break;
16822 }
16823
16824 return NB_OK;
16825 }
16826
16827 /*
16828 * XPath:
16829 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only
16830 */
16831 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify(
16832 struct nb_cb_modify_args *args)
16833 {
16834 switch (args->event) {
16835 case NB_EV_VALIDATE:
16836 case NB_EV_PREPARE:
16837 case NB_EV_ABORT:
16838 case NB_EV_APPLY:
16839 /* TODO: implement me. */
16840 break;
16841 }
16842
16843 return NB_OK;
16844 }
16845
16846 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy(
16847 struct nb_cb_destroy_args *args)
16848 {
16849 switch (args->event) {
16850 case NB_EV_VALIDATE:
16851 case NB_EV_PREPARE:
16852 case NB_EV_ABORT:
16853 case NB_EV_APPLY:
16854 /* TODO: implement me. */
16855 break;
16856 }
16857
16858 return NB_OK;
16859 }
16860
16861 /*
16862 * XPath:
16863 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer
16864 */
16865 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify(
16866 struct nb_cb_modify_args *args)
16867 {
16868 switch (args->event) {
16869 case NB_EV_VALIDATE:
16870 case NB_EV_PREPARE:
16871 case NB_EV_ABORT:
16872 case NB_EV_APPLY:
16873 /* TODO: implement me. */
16874 break;
16875 }
16876
16877 return NB_OK;
16878 }
16879
16880 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
16881 struct nb_cb_destroy_args *args)
16882 {
16883 switch (args->event) {
16884 case NB_EV_VALIDATE:
16885 case NB_EV_PREPARE:
16886 case NB_EV_ABORT:
16887 case NB_EV_APPLY:
16888 /* TODO: implement me. */
16889 break;
16890 }
16891
16892 return NB_OK;
16893 }
16894
16895 /*
16896 * XPath:
16897 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct
16898 */
16899 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
16900 struct nb_cb_modify_args *args)
16901 {
16902 switch (args->event) {
16903 case NB_EV_VALIDATE:
16904 case NB_EV_PREPARE:
16905 case NB_EV_ABORT:
16906 case NB_EV_APPLY:
16907 /* TODO: implement me. */
16908 break;
16909 }
16910
16911 return NB_OK;
16912 }
16913
16914 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
16915 struct nb_cb_destroy_args *args)
16916 {
16917 switch (args->event) {
16918 case NB_EV_VALIDATE:
16919 case NB_EV_PREPARE:
16920 case NB_EV_ABORT:
16921 case NB_EV_APPLY:
16922 /* TODO: implement me. */
16923 break;
16924 }
16925
16926 return NB_OK;
16927 }
16928
16929 /*
16930 * XPath:
16931 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
16932 */
16933 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
16934 struct nb_cb_modify_args *args)
16935 {
16936 switch (args->event) {
16937 case NB_EV_VALIDATE:
16938 case NB_EV_PREPARE:
16939 case NB_EV_ABORT:
16940 case NB_EV_APPLY:
16941 /* TODO: implement me. */
16942 break;
16943 }
16944
16945 return NB_OK;
16946 }
16947
16948 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
16949 struct nb_cb_destroy_args *args)
16950 {
16951 switch (args->event) {
16952 case NB_EV_VALIDATE:
16953 case NB_EV_PREPARE:
16954 case NB_EV_ABORT:
16955 case NB_EV_APPLY:
16956 /* TODO: implement me. */
16957 break;
16958 }
16959
16960 return NB_OK;
16961 }
16962
16963 /*
16964 * XPath:
16965 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer
16966 */
16967 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
16968 struct nb_cb_modify_args *args)
16969 {
16970 switch (args->event) {
16971 case NB_EV_VALIDATE:
16972 case NB_EV_PREPARE:
16973 case NB_EV_ABORT:
16974 case NB_EV_APPLY:
16975 /* TODO: implement me. */
16976 break;
16977 }
16978
16979 return NB_OK;
16980 }
16981
16982 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
16983 struct nb_cb_destroy_args *args)
16984 {
16985 switch (args->event) {
16986 case NB_EV_VALIDATE:
16987 case NB_EV_PREPARE:
16988 case NB_EV_ABORT:
16989 case NB_EV_APPLY:
16990 /* TODO: implement me. */
16991 break;
16992 }
16993
16994 return NB_OK;
16995 }
16996
16997 /*
16998 * XPath:
16999 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
17000 */
17001 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
17002 struct nb_cb_modify_args *args)
17003 {
17004 switch (args->event) {
17005 case NB_EV_VALIDATE:
17006 case NB_EV_PREPARE:
17007 case NB_EV_ABORT:
17008 case NB_EV_APPLY:
17009 /* TODO: implement me. */
17010 break;
17011 }
17012
17013 return NB_OK;
17014 }
17015
17016 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
17017 struct nb_cb_destroy_args *args)
17018 {
17019 switch (args->event) {
17020 case NB_EV_VALIDATE:
17021 case NB_EV_PREPARE:
17022 case NB_EV_ABORT:
17023 case NB_EV_APPLY:
17024 /* TODO: implement me. */
17025 break;
17026 }
17027
17028 return NB_OK;
17029 }
17030
17031 /*
17032 * XPath:
17033 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only
17034 */
17035 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
17036 struct nb_cb_modify_args *args)
17037 {
17038 switch (args->event) {
17039 case NB_EV_VALIDATE:
17040 case NB_EV_PREPARE:
17041 case NB_EV_ABORT:
17042 case NB_EV_APPLY:
17043 /* TODO: implement me. */
17044 break;
17045 }
17046
17047 return NB_OK;
17048 }
17049
17050 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
17051 struct nb_cb_destroy_args *args)
17052 {
17053 switch (args->event) {
17054 case NB_EV_VALIDATE:
17055 case NB_EV_PREPARE:
17056 case NB_EV_ABORT:
17057 case NB_EV_APPLY:
17058 /* TODO: implement me. */
17059 break;
17060 }
17061
17062 return NB_OK;
17063 }
17064
17065 /*
17066 * XPath:
17067 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self
17068 */
17069 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify(
17070 struct nb_cb_modify_args *args)
17071 {
17072 switch (args->event) {
17073 case NB_EV_VALIDATE:
17074 case NB_EV_PREPARE:
17075 case NB_EV_ABORT:
17076 return NB_OK;
17077 case NB_EV_APPLY:
17078 return bgp_neighbor_afi_safi_flag_modify(
17079 args, PEER_FLAG_NEXTHOP_SELF,
17080 yang_dnode_get_bool(args->dnode, NULL));
17081
17082 break;
17083 }
17084
17085 return NB_OK;
17086 }
17087
17088 /*
17089 * XPath:
17090 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self-force
17091 */
17092 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_force_modify(
17093 struct nb_cb_modify_args *args)
17094 {
17095 switch (args->event) {
17096 case NB_EV_VALIDATE:
17097 case NB_EV_PREPARE:
17098 case NB_EV_ABORT:
17099 return NB_OK;
17100 case NB_EV_APPLY:
17101 return bgp_neighbor_afi_safi_flag_modify(
17102 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
17103 yang_dnode_get_bool(args->dnode, NULL));
17104
17105 break;
17106 }
17107
17108 return NB_OK;
17109 }
17110
17111 /*
17112 * XPath:
17113 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all
17114 */
17115 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_modify(
17116 struct nb_cb_modify_args *args)
17117 {
17118 switch (args->event) {
17119 case NB_EV_VALIDATE:
17120 case NB_EV_PREPARE:
17121 case NB_EV_ABORT:
17122 return NB_OK;
17123 case NB_EV_APPLY:
17124 return bgp_neighbor_afi_safi_flag_modify(
17125 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
17126 yang_dnode_get_bool(args->dnode, NULL));
17127
17128 break;
17129 }
17130
17131 return NB_OK;
17132 }
17133
17134 /*
17135 * XPath:
17136 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all-replace
17137 */
17138 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_replace_modify(
17139 struct nb_cb_modify_args *args)
17140 {
17141 switch (args->event) {
17142 case NB_EV_VALIDATE:
17143 case NB_EV_PREPARE:
17144 case NB_EV_ABORT:
17145 return NB_OK;
17146 case NB_EV_APPLY:
17147 return bgp_neighbor_afi_safi_flag_modify(
17148 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
17149 yang_dnode_get_bool(args->dnode, NULL));
17150
17151 break;
17152 }
17153
17154 return NB_OK;
17155 }
17156
17157 /*
17158 * XPath:
17159 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as
17160 */
17161 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_modify(
17162 struct nb_cb_modify_args *args)
17163 {
17164 switch (args->event) {
17165 case NB_EV_VALIDATE:
17166 case NB_EV_PREPARE:
17167 case NB_EV_ABORT:
17168 return NB_OK;
17169 case NB_EV_APPLY:
17170 return bgp_neighbor_afi_safi_flag_modify(
17171 args, PEER_FLAG_REMOVE_PRIVATE_AS,
17172 yang_dnode_get_bool(args->dnode, NULL));
17173
17174 break;
17175 }
17176
17177 return NB_OK;
17178 }
17179
17180 /*
17181 * XPath:
17182 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-replace
17183 */
17184 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_replace_modify(
17185 struct nb_cb_modify_args *args)
17186 {
17187 switch (args->event) {
17188 case NB_EV_VALIDATE:
17189 case NB_EV_PREPARE:
17190 case NB_EV_ABORT:
17191 return NB_OK;
17192 case NB_EV_APPLY:
17193 return bgp_neighbor_afi_safi_flag_modify(
17194 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
17195 yang_dnode_get_bool(args->dnode, NULL));
17196
17197 break;
17198 }
17199
17200 return NB_OK;
17201 }
17202
17203 /*
17204 * XPath:
17205 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/route-reflector/route-reflector-client
17206 */
17207 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_route_reflector_route_reflector_client_modify(
17208 struct nb_cb_modify_args *args)
17209 {
17210 switch (args->event) {
17211 case NB_EV_VALIDATE:
17212 case NB_EV_PREPARE:
17213 case NB_EV_ABORT:
17214 return NB_OK;
17215 case NB_EV_APPLY:
17216 return bgp_neighbor_afi_safi_flag_modify(
17217 args, PEER_FLAG_REFLECTOR_CLIENT,
17218 yang_dnode_get_bool(args->dnode, NULL));
17219
17220 break;
17221 }
17222
17223 return NB_OK;
17224 }
17225
17226 /*
17227 * XPath:
17228 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/route-server/route-server-client
17229 */
17230 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_route_server_route_server_client_modify(
17231 struct nb_cb_modify_args *args)
17232 {
17233 switch (args->event) {
17234 case NB_EV_VALIDATE:
17235 case NB_EV_PREPARE:
17236 case NB_EV_ABORT:
17237 return NB_OK;
17238 case NB_EV_APPLY:
17239 return bgp_neighbor_afi_safi_flag_modify(
17240 args, PEER_FLAG_RSERVER_CLIENT,
17241 yang_dnode_get_bool(args->dnode, NULL));
17242
17243 break;
17244 }
17245
17246 return NB_OK;
17247 }
17248
17249 /*
17250 * XPath:
17251 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-community
17252 */
17253 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_community_modify(
17254 struct nb_cb_modify_args *args)
17255 {
17256 switch (args->event) {
17257 case NB_EV_VALIDATE:
17258 case NB_EV_PREPARE:
17259 case NB_EV_ABORT:
17260 return NB_OK;
17261 case NB_EV_APPLY:
17262 return bgp_neighbor_afi_safi_flag_modify(
17263 args, PEER_FLAG_SEND_COMMUNITY,
17264 yang_dnode_get_bool(args->dnode, NULL));
17265
17266 break;
17267 }
17268
17269 return NB_OK;
17270 }
17271
17272 /*
17273 * XPath:
17274 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-ext-community
17275 */
17276 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_ext_community_modify(
17277 struct nb_cb_modify_args *args)
17278 {
17279 switch (args->event) {
17280 case NB_EV_VALIDATE:
17281 case NB_EV_PREPARE:
17282 case NB_EV_ABORT:
17283 return NB_OK;
17284 case NB_EV_APPLY:
17285 return bgp_neighbor_afi_safi_flag_modify(
17286 args, PEER_FLAG_SEND_EXT_COMMUNITY,
17287 yang_dnode_get_bool(args->dnode, NULL));
17288
17289 break;
17290 }
17291
17292 return NB_OK;
17293 }
17294
17295 /*
17296 * XPath:
17297 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-large-community
17298 */
17299 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_large_community_modify(
17300 struct nb_cb_modify_args *args)
17301 {
17302 switch (args->event) {
17303 case NB_EV_VALIDATE:
17304 case NB_EV_PREPARE:
17305 case NB_EV_ABORT:
17306 return NB_OK;
17307 case NB_EV_APPLY:
17308 return bgp_neighbor_afi_safi_flag_modify(
17309 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
17310 yang_dnode_get_bool(args->dnode, NULL));
17311
17312 break;
17313 }
17314
17315 return NB_OK;
17316 }
17317
17318 /*
17319 * XPath:
17320 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/soft-reconfiguration
17321 */
17322 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguration_modify(
17323 struct nb_cb_modify_args *args)
17324 {
17325 switch (args->event) {
17326 case NB_EV_VALIDATE:
17327 case NB_EV_PREPARE:
17328 case NB_EV_ABORT:
17329 return NB_OK;
17330 case NB_EV_APPLY:
17331 return bgp_neighbor_afi_safi_flag_modify(
17332 args, PEER_FLAG_SOFT_RECONFIG,
17333 yang_dnode_get_bool(args->dnode, NULL));
17334
17335 break;
17336 }
17337
17338 return NB_OK;
17339 }
17340
17341 /*
17342 * XPath:
17343 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/weight/weight-attribute
17344 */
17345 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_modify(
17346 struct nb_cb_modify_args *args)
17347 {
17348 switch (args->event) {
17349 case NB_EV_VALIDATE:
17350 case NB_EV_PREPARE:
17351 case NB_EV_ABORT:
17352 return NB_OK;
17353 case NB_EV_APPLY:
17354 return bgp_neighbor_afi_safi_weight_modify(args);
17355
17356 break;
17357 }
17358
17359 return NB_OK;
17360 }
17361
17362 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_destroy(
17363 struct nb_cb_destroy_args *args)
17364 {
17365 switch (args->event) {
17366 case NB_EV_VALIDATE:
17367 case NB_EV_PREPARE:
17368 case NB_EV_ABORT:
17369 return NB_OK;
17370 case NB_EV_APPLY:
17371 return bgp_neighbor_afi_safi_weight_destroy(args);
17372
17373 break;
17374 }
17375
17376 return NB_OK;
17377 }
17378
17379 /*
17380 * XPath:
17381 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/add-paths/path-type
17382 */
17383 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_add_paths_path_type_modify(
17384 struct nb_cb_modify_args *args)
17385 {
17386 switch (args->event) {
17387 case NB_EV_VALIDATE:
17388 case NB_EV_PREPARE:
17389 case NB_EV_ABORT:
17390 case NB_EV_APPLY:
17391 /* TODO: implement me. */
17392 break;
17393 }
17394
17395 return NB_OK;
17396 }
17397
17398 /*
17399 * XPath:
17400 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-as
17401 */
17402 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_modify(
17403 struct nb_cb_modify_args *args)
17404 {
17405 switch (args->event) {
17406 case NB_EV_VALIDATE:
17407 case NB_EV_PREPARE:
17408 case NB_EV_ABORT:
17409 case NB_EV_APPLY:
17410 /* TODO: implement me. */
17411 break;
17412 }
17413
17414 return NB_OK;
17415 }
17416
17417 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_destroy(
17418 struct nb_cb_destroy_args *args)
17419 {
17420 switch (args->event) {
17421 case NB_EV_VALIDATE:
17422 case NB_EV_PREPARE:
17423 case NB_EV_ABORT:
17424 case NB_EV_APPLY:
17425 /* TODO: implement me. */
17426 break;
17427 }
17428
17429 return NB_OK;
17430 }
17431
17432 /*
17433 * XPath:
17434 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-origin-as
17435 */
17436 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_modify(
17437 struct nb_cb_modify_args *args)
17438 {
17439 switch (args->event) {
17440 case NB_EV_VALIDATE:
17441 case NB_EV_PREPARE:
17442 case NB_EV_ABORT:
17443 case NB_EV_APPLY:
17444 /* TODO: implement me. */
17445 break;
17446 }
17447
17448 return NB_OK;
17449 }
17450
17451 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_destroy(
17452 struct nb_cb_destroy_args *args)
17453 {
17454 switch (args->event) {
17455 case NB_EV_VALIDATE:
17456 case NB_EV_PREPARE:
17457 case NB_EV_ABORT:
17458 case NB_EV_APPLY:
17459 /* TODO: implement me. */
17460 break;
17461 }
17462
17463 return NB_OK;
17464 }
17465
17466 /*
17467 * XPath:
17468 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/replace-peer-as
17469 */
17470 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify(
17471 struct nb_cb_modify_args *args)
17472 {
17473 switch (args->event) {
17474 case NB_EV_VALIDATE:
17475 case NB_EV_PREPARE:
17476 case NB_EV_ABORT:
17477 return NB_OK;
17478 case NB_EV_APPLY:
17479 return bgp_neighbor_afi_safi_flag_modify(
17480 args, PEER_FLAG_AS_OVERRIDE,
17481 yang_dnode_get_bool(args->dnode, NULL));
17482
17483 break;
17484 }
17485
17486 return NB_OK;
17487 }
17488
17489 /*
17490 * XPath:
17491 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/originate
17492 */
17493 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify(
17494 struct nb_cb_modify_args *args)
17495 {
17496 switch (args->event) {
17497 case NB_EV_VALIDATE:
17498 case NB_EV_PREPARE:
17499 case NB_EV_ABORT:
17500 case NB_EV_APPLY:
17501 /* TODO: implement me. */
17502 break;
17503 }
17504
17505 return NB_OK;
17506 }
17507
17508 /*
17509 * XPath:
17510 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map
17511 */
17512 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify(
17513 struct nb_cb_modify_args *args)
17514 {
17515 switch (args->event) {
17516 case NB_EV_VALIDATE:
17517 case NB_EV_PREPARE:
17518 case NB_EV_ABORT:
17519 case NB_EV_APPLY:
17520 /* TODO: implement me. */
17521 break;
17522 }
17523
17524 return NB_OK;
17525 }
17526
17527 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy(
17528 struct nb_cb_destroy_args *args)
17529 {
17530 switch (args->event) {
17531 case NB_EV_VALIDATE:
17532 case NB_EV_PREPARE:
17533 case NB_EV_ABORT:
17534 case NB_EV_APPLY:
17535 /* TODO: implement me. */
17536 break;
17537 }
17538
17539 return NB_OK;
17540 }
17541
17542 /*
17543 * XPath:
17544 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/as-path-unchanged
17545 */
17546 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify(
17547 struct nb_cb_modify_args *args)
17548 {
17549 switch (args->event) {
17550 case NB_EV_VALIDATE:
17551 case NB_EV_PREPARE:
17552 case NB_EV_ABORT:
17553 return NB_OK;
17554 case NB_EV_APPLY:
17555 return bgp_neighbor_afi_safi_flag_modify(
17556 args, PEER_FLAG_AS_PATH_UNCHANGED,
17557 yang_dnode_get_bool(args->dnode, NULL));
17558
17559 break;
17560 }
17561
17562 return NB_OK;
17563 }
17564
17565 /*
17566 * XPath:
17567 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/next-hop-unchanged
17568 */
17569 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify(
17570 struct nb_cb_modify_args *args)
17571 {
17572 switch (args->event) {
17573 case NB_EV_VALIDATE:
17574 case NB_EV_PREPARE:
17575 case NB_EV_ABORT:
17576 return NB_OK;
17577 case NB_EV_APPLY:
17578 return bgp_neighbor_afi_safi_flag_modify(
17579 args, PEER_FLAG_NEXTHOP_UNCHANGED,
17580 yang_dnode_get_bool(args->dnode, NULL));
17581
17582 break;
17583 }
17584
17585 return NB_OK;
17586 }
17587
17588 /*
17589 * XPath:
17590 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/med-unchanged
17591 */
17592 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_unchanged_modify(
17593 struct nb_cb_modify_args *args)
17594 {
17595 switch (args->event) {
17596 case NB_EV_VALIDATE:
17597 case NB_EV_PREPARE:
17598 case NB_EV_ABORT:
17599 return NB_OK;
17600 case NB_EV_APPLY:
17601 return bgp_neighbor_afi_safi_flag_modify(
17602 args, PEER_FLAG_MED_UNCHANGED,
17603 yang_dnode_get_bool(args->dnode, NULL));
17604
17605 break;
17606 }
17607
17608 return NB_OK;
17609 }
17610
17611 /*
17612 * XPath:
17613 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-send
17614 */
17615 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_modify(
17616 struct nb_cb_modify_args *args)
17617 {
17618 switch (args->event) {
17619 case NB_EV_VALIDATE:
17620 case NB_EV_PREPARE:
17621 case NB_EV_ABORT:
17622 case NB_EV_APPLY:
17623 /* TODO: implement me. */
17624 break;
17625 }
17626
17627 return NB_OK;
17628 }
17629
17630 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_destroy(
17631 struct nb_cb_destroy_args *args)
17632 {
17633 switch (args->event) {
17634 case NB_EV_VALIDATE:
17635 case NB_EV_PREPARE:
17636 case NB_EV_ABORT:
17637 case NB_EV_APPLY:
17638 /* TODO: implement me. */
17639 break;
17640 }
17641
17642 return NB_OK;
17643 }
17644
17645 /*
17646 * XPath:
17647 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-receive
17648 */
17649 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_modify(
17650 struct nb_cb_modify_args *args)
17651 {
17652 switch (args->event) {
17653 case NB_EV_VALIDATE:
17654 case NB_EV_PREPARE:
17655 case NB_EV_ABORT:
17656 case NB_EV_APPLY:
17657 /* TODO: implement me. */
17658 break;
17659 }
17660
17661 return NB_OK;
17662 }
17663
17664 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_destroy(
17665 struct nb_cb_destroy_args *args)
17666 {
17667 switch (args->event) {
17668 case NB_EV_VALIDATE:
17669 case NB_EV_PREPARE:
17670 case NB_EV_ABORT:
17671 case NB_EV_APPLY:
17672 /* TODO: implement me. */
17673 break;
17674 }
17675
17676 return NB_OK;
17677 }
17678
17679 /*
17680 * XPath:
17681 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-both
17682 */
17683 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_modify(
17684 struct nb_cb_modify_args *args)
17685 {
17686 switch (args->event) {
17687 case NB_EV_VALIDATE:
17688 case NB_EV_PREPARE:
17689 case NB_EV_ABORT:
17690 case NB_EV_APPLY:
17691 /* TODO: implement me. */
17692 break;
17693 }
17694
17695 return NB_OK;
17696 }
17697
17698 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_destroy(
17699 struct nb_cb_destroy_args *args)
17700 {
17701 switch (args->event) {
17702 case NB_EV_VALIDATE:
17703 case NB_EV_PREPARE:
17704 case NB_EV_ABORT:
17705 case NB_EV_APPLY:
17706 /* TODO: implement me. */
17707 break;
17708 }
17709
17710 return NB_OK;
17711 }
17712
17713 /*
17714 * XPath:
17715 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list
17716 */
17717 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create(
17718 struct nb_cb_create_args *args)
17719 {
17720 switch (args->event) {
17721 case NB_EV_VALIDATE:
17722 case NB_EV_PREPARE:
17723 case NB_EV_ABORT:
17724 case NB_EV_APPLY:
17725 /* TODO: implement me. */
17726 break;
17727 }
17728
17729 return NB_OK;
17730 }
17731
17732 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy(
17733 struct nb_cb_destroy_args *args)
17734 {
17735 switch (args->event) {
17736 case NB_EV_VALIDATE:
17737 case NB_EV_PREPARE:
17738 case NB_EV_ABORT:
17739 return NB_OK;
17740 case NB_EV_APPLY:
17741 return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
17742 }
17743
17744 return NB_OK;
17745 }
17746
17747 /*
17748 * XPath:
17749 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/max-prefixes
17750 */
17751 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify(
17752 struct nb_cb_modify_args *args)
17753 {
17754 switch (args->event) {
17755 case NB_EV_VALIDATE:
17756 case NB_EV_PREPARE:
17757 case NB_EV_ABORT:
17758 case NB_EV_APPLY:
17759 /* TODO: implement me. */
17760 break;
17761 }
17762
17763 return NB_OK;
17764 }
17765
17766 /*
17767 * XPath:
17768 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check
17769 */
17770 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify(
17771 struct nb_cb_modify_args *args)
17772 {
17773 switch (args->event) {
17774 case NB_EV_VALIDATE:
17775 case NB_EV_PREPARE:
17776 case NB_EV_ABORT:
17777 case NB_EV_APPLY:
17778 /* TODO: implement me. */
17779 break;
17780 }
17781
17782 return NB_OK;
17783 }
17784
17785 /*
17786 * XPath:
17787 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only
17788 */
17789 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify(
17790 struct nb_cb_modify_args *args)
17791 {
17792 switch (args->event) {
17793 case NB_EV_VALIDATE:
17794 case NB_EV_PREPARE:
17795 case NB_EV_ABORT:
17796 case NB_EV_APPLY:
17797 /* TODO: implement me. */
17798 break;
17799 }
17800
17801 return NB_OK;
17802 }
17803
17804 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy(
17805 struct nb_cb_destroy_args *args)
17806 {
17807 switch (args->event) {
17808 case NB_EV_VALIDATE:
17809 case NB_EV_PREPARE:
17810 case NB_EV_ABORT:
17811 case NB_EV_APPLY:
17812 /* TODO: implement me. */
17813 break;
17814 }
17815
17816 return NB_OK;
17817 }
17818
17819 /*
17820 * XPath:
17821 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer
17822 */
17823 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify(
17824 struct nb_cb_modify_args *args)
17825 {
17826 switch (args->event) {
17827 case NB_EV_VALIDATE:
17828 case NB_EV_PREPARE:
17829 case NB_EV_ABORT:
17830 case NB_EV_APPLY:
17831 /* TODO: implement me. */
17832 break;
17833 }
17834
17835 return NB_OK;
17836 }
17837
17838 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
17839 struct nb_cb_destroy_args *args)
17840 {
17841 switch (args->event) {
17842 case NB_EV_VALIDATE:
17843 case NB_EV_PREPARE:
17844 case NB_EV_ABORT:
17845 case NB_EV_APPLY:
17846 /* TODO: implement me. */
17847 break;
17848 }
17849
17850 return NB_OK;
17851 }
17852
17853 /*
17854 * XPath:
17855 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct
17856 */
17857 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
17858 struct nb_cb_modify_args *args)
17859 {
17860 switch (args->event) {
17861 case NB_EV_VALIDATE:
17862 case NB_EV_PREPARE:
17863 case NB_EV_ABORT:
17864 case NB_EV_APPLY:
17865 /* TODO: implement me. */
17866 break;
17867 }
17868
17869 return NB_OK;
17870 }
17871
17872 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
17873 struct nb_cb_destroy_args *args)
17874 {
17875 switch (args->event) {
17876 case NB_EV_VALIDATE:
17877 case NB_EV_PREPARE:
17878 case NB_EV_ABORT:
17879 case NB_EV_APPLY:
17880 /* TODO: implement me. */
17881 break;
17882 }
17883
17884 return NB_OK;
17885 }
17886
17887 /*
17888 * XPath:
17889 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
17890 */
17891 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
17892 struct nb_cb_modify_args *args)
17893 {
17894 switch (args->event) {
17895 case NB_EV_VALIDATE:
17896 case NB_EV_PREPARE:
17897 case NB_EV_ABORT:
17898 case NB_EV_APPLY:
17899 /* TODO: implement me. */
17900 break;
17901 }
17902
17903 return NB_OK;
17904 }
17905
17906 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
17907 struct nb_cb_destroy_args *args)
17908 {
17909 switch (args->event) {
17910 case NB_EV_VALIDATE:
17911 case NB_EV_PREPARE:
17912 case NB_EV_ABORT:
17913 case NB_EV_APPLY:
17914 /* TODO: implement me. */
17915 break;
17916 }
17917
17918 return NB_OK;
17919 }
17920
17921 /*
17922 * XPath:
17923 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer
17924 */
17925 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
17926 struct nb_cb_modify_args *args)
17927 {
17928 switch (args->event) {
17929 case NB_EV_VALIDATE:
17930 case NB_EV_PREPARE:
17931 case NB_EV_ABORT:
17932 case NB_EV_APPLY:
17933 /* TODO: implement me. */
17934 break;
17935 }
17936
17937 return NB_OK;
17938 }
17939
17940 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
17941 struct nb_cb_destroy_args *args)
17942 {
17943 switch (args->event) {
17944 case NB_EV_VALIDATE:
17945 case NB_EV_PREPARE:
17946 case NB_EV_ABORT:
17947 case NB_EV_APPLY:
17948 /* TODO: implement me. */
17949 break;
17950 }
17951
17952 return NB_OK;
17953 }
17954
17955 /*
17956 * XPath:
17957 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
17958 */
17959 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
17960 struct nb_cb_modify_args *args)
17961 {
17962 switch (args->event) {
17963 case NB_EV_VALIDATE:
17964 case NB_EV_PREPARE:
17965 case NB_EV_ABORT:
17966 case NB_EV_APPLY:
17967 /* TODO: implement me. */
17968 break;
17969 }
17970
17971 return NB_OK;
17972 }
17973
17974 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
17975 struct nb_cb_destroy_args *args)
17976 {
17977 switch (args->event) {
17978 case NB_EV_VALIDATE:
17979 case NB_EV_PREPARE:
17980 case NB_EV_ABORT:
17981 case NB_EV_APPLY:
17982 /* TODO: implement me. */
17983 break;
17984 }
17985
17986 return NB_OK;
17987 }
17988
17989 /*
17990 * XPath:
17991 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only
17992 */
17993 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
17994 struct nb_cb_modify_args *args)
17995 {
17996 switch (args->event) {
17997 case NB_EV_VALIDATE:
17998 case NB_EV_PREPARE:
17999 case NB_EV_ABORT:
18000 case NB_EV_APPLY:
18001 /* TODO: implement me. */
18002 break;
18003 }
18004
18005 return NB_OK;
18006 }
18007
18008 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
18009 struct nb_cb_destroy_args *args)
18010 {
18011 switch (args->event) {
18012 case NB_EV_VALIDATE:
18013 case NB_EV_PREPARE:
18014 case NB_EV_ABORT:
18015 case NB_EV_APPLY:
18016 /* TODO: implement me. */
18017 break;
18018 }
18019
18020 return NB_OK;
18021 }
18022
18023 /*
18024 * XPath:
18025 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self
18026 */
18027 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify(
18028 struct nb_cb_modify_args *args)
18029 {
18030 switch (args->event) {
18031 case NB_EV_VALIDATE:
18032 case NB_EV_PREPARE:
18033 case NB_EV_ABORT:
18034 return NB_OK;
18035 case NB_EV_APPLY:
18036 return bgp_neighbor_afi_safi_flag_modify(
18037 args, PEER_FLAG_NEXTHOP_SELF,
18038 yang_dnode_get_bool(args->dnode, NULL));
18039
18040 break;
18041 }
18042
18043 return NB_OK;
18044 }
18045
18046 /*
18047 * XPath:
18048 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self-force
18049 */
18050 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_force_modify(
18051 struct nb_cb_modify_args *args)
18052 {
18053 switch (args->event) {
18054 case NB_EV_VALIDATE:
18055 case NB_EV_PREPARE:
18056 case NB_EV_ABORT:
18057 return NB_OK;
18058 case NB_EV_APPLY:
18059 return bgp_neighbor_afi_safi_flag_modify(
18060 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
18061 yang_dnode_get_bool(args->dnode, NULL));
18062
18063 break;
18064 }
18065
18066 return NB_OK;
18067 }
18068
18069 /*
18070 * XPath:
18071 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all
18072 */
18073 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_modify(
18074 struct nb_cb_modify_args *args)
18075 {
18076 switch (args->event) {
18077 case NB_EV_VALIDATE:
18078 case NB_EV_PREPARE:
18079 case NB_EV_ABORT:
18080 return NB_OK;
18081 case NB_EV_APPLY:
18082 return bgp_neighbor_afi_safi_flag_modify(
18083 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
18084 yang_dnode_get_bool(args->dnode, NULL));
18085
18086 break;
18087 }
18088
18089 return NB_OK;
18090 }
18091
18092 /*
18093 * XPath:
18094 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all-replace
18095 */
18096 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_replace_modify(
18097 struct nb_cb_modify_args *args)
18098 {
18099 switch (args->event) {
18100 case NB_EV_VALIDATE:
18101 case NB_EV_PREPARE:
18102 case NB_EV_ABORT:
18103 return NB_OK;
18104 case NB_EV_APPLY:
18105 return bgp_neighbor_afi_safi_flag_modify(
18106 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
18107 yang_dnode_get_bool(args->dnode, NULL));
18108
18109 break;
18110 }
18111
18112 return NB_OK;
18113 }
18114
18115 /*
18116 * XPath:
18117 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as
18118 */
18119 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_modify(
18120 struct nb_cb_modify_args *args)
18121 {
18122 switch (args->event) {
18123 case NB_EV_VALIDATE:
18124 case NB_EV_PREPARE:
18125 case NB_EV_ABORT:
18126 return NB_OK;
18127 case NB_EV_APPLY:
18128 return bgp_neighbor_afi_safi_flag_modify(
18129 args, PEER_FLAG_REMOVE_PRIVATE_AS,
18130 yang_dnode_get_bool(args->dnode, NULL));
18131
18132 break;
18133 }
18134
18135 return NB_OK;
18136 }
18137
18138 /*
18139 * XPath:
18140 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-replace
18141 */
18142 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_replace_modify(
18143 struct nb_cb_modify_args *args)
18144 {
18145 switch (args->event) {
18146 case NB_EV_VALIDATE:
18147 case NB_EV_PREPARE:
18148 case NB_EV_ABORT:
18149 return NB_OK;
18150 case NB_EV_APPLY:
18151 return bgp_neighbor_afi_safi_flag_modify(
18152 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
18153 yang_dnode_get_bool(args->dnode, NULL));
18154
18155 break;
18156 }
18157
18158 return NB_OK;
18159 }
18160
18161 /*
18162 * XPath:
18163 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/route-reflector/route-reflector-client
18164 */
18165 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_route_reflector_route_reflector_client_modify(
18166 struct nb_cb_modify_args *args)
18167 {
18168 switch (args->event) {
18169 case NB_EV_VALIDATE:
18170 case NB_EV_PREPARE:
18171 case NB_EV_ABORT:
18172 return NB_OK;
18173 case NB_EV_APPLY:
18174 return bgp_neighbor_afi_safi_flag_modify(
18175 args, PEER_FLAG_REFLECTOR_CLIENT,
18176 yang_dnode_get_bool(args->dnode, NULL));
18177
18178 break;
18179 }
18180
18181 return NB_OK;
18182 }
18183
18184 /*
18185 * XPath:
18186 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/route-server/route-server-client
18187 */
18188 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_route_server_route_server_client_modify(
18189 struct nb_cb_modify_args *args)
18190 {
18191 switch (args->event) {
18192 case NB_EV_VALIDATE:
18193 case NB_EV_PREPARE:
18194 case NB_EV_ABORT:
18195 return NB_OK;
18196 case NB_EV_APPLY:
18197 return bgp_neighbor_afi_safi_flag_modify(
18198 args, PEER_FLAG_RSERVER_CLIENT,
18199 yang_dnode_get_bool(args->dnode, NULL));
18200
18201 break;
18202 }
18203
18204 return NB_OK;
18205 }
18206
18207 /*
18208 * XPath:
18209 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-community
18210 */
18211 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_community_modify(
18212 struct nb_cb_modify_args *args)
18213 {
18214 switch (args->event) {
18215 case NB_EV_VALIDATE:
18216 case NB_EV_PREPARE:
18217 case NB_EV_ABORT:
18218 return NB_OK;
18219 case NB_EV_APPLY:
18220 return bgp_neighbor_afi_safi_flag_modify(
18221 args, PEER_FLAG_SEND_COMMUNITY,
18222 yang_dnode_get_bool(args->dnode, NULL));
18223
18224 break;
18225 }
18226
18227 return NB_OK;
18228 }
18229
18230 /*
18231 * XPath:
18232 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-ext-community
18233 */
18234 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_ext_community_modify(
18235 struct nb_cb_modify_args *args)
18236 {
18237 switch (args->event) {
18238 case NB_EV_VALIDATE:
18239 case NB_EV_PREPARE:
18240 case NB_EV_ABORT:
18241 return NB_OK;
18242 case NB_EV_APPLY:
18243 return bgp_neighbor_afi_safi_flag_modify(
18244 args, PEER_FLAG_SEND_EXT_COMMUNITY,
18245 yang_dnode_get_bool(args->dnode, NULL));
18246
18247 break;
18248 }
18249
18250 return NB_OK;
18251 }
18252
18253 /*
18254 * XPath:
18255 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-large-community
18256 */
18257 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_large_community_modify(
18258 struct nb_cb_modify_args *args)
18259 {
18260 switch (args->event) {
18261 case NB_EV_VALIDATE:
18262 case NB_EV_PREPARE:
18263 case NB_EV_ABORT:
18264 return NB_OK;
18265 case NB_EV_APPLY:
18266 return bgp_neighbor_afi_safi_flag_modify(
18267 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
18268 yang_dnode_get_bool(args->dnode, NULL));
18269
18270 break;
18271 }
18272
18273 return NB_OK;
18274 }
18275
18276 /*
18277 * XPath:
18278 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/soft-reconfiguration
18279 */
18280 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguration_modify(
18281 struct nb_cb_modify_args *args)
18282 {
18283 switch (args->event) {
18284 case NB_EV_VALIDATE:
18285 case NB_EV_PREPARE:
18286 case NB_EV_ABORT:
18287 return NB_OK;
18288 case NB_EV_APPLY:
18289 return bgp_neighbor_afi_safi_flag_modify(
18290 args, PEER_FLAG_SOFT_RECONFIG,
18291 yang_dnode_get_bool(args->dnode, NULL));
18292
18293 break;
18294 }
18295
18296 return NB_OK;
18297 }
18298
18299 /*
18300 * XPath:
18301 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/weight/weight-attribute
18302 */
18303 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_modify(
18304 struct nb_cb_modify_args *args)
18305 {
18306 switch (args->event) {
18307 case NB_EV_VALIDATE:
18308 case NB_EV_PREPARE:
18309 case NB_EV_ABORT:
18310 return NB_OK;
18311 case NB_EV_APPLY:
18312 return bgp_neighbor_afi_safi_weight_modify(args);
18313
18314 break;
18315 }
18316
18317 return NB_OK;
18318 }
18319
18320 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_destroy(
18321 struct nb_cb_destroy_args *args)
18322 {
18323 switch (args->event) {
18324 case NB_EV_VALIDATE:
18325 case NB_EV_PREPARE:
18326 case NB_EV_ABORT:
18327 return NB_OK;
18328 case NB_EV_APPLY:
18329 return bgp_neighbor_afi_safi_weight_destroy(args);
18330
18331 break;
18332 }
18333
18334 return NB_OK;
18335 }
18336
18337 /*
18338 * XPath:
18339 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/add-paths/path-type
18340 */
18341 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_add_paths_path_type_modify(
18342 struct nb_cb_modify_args *args)
18343 {
18344 switch (args->event) {
18345 case NB_EV_VALIDATE:
18346 case NB_EV_PREPARE:
18347 case NB_EV_ABORT:
18348 case NB_EV_APPLY:
18349 /* TODO: implement me. */
18350 break;
18351 }
18352
18353 return NB_OK;
18354 }
18355
18356 /*
18357 * XPath:
18358 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-as
18359 */
18360 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_modify(
18361 struct nb_cb_modify_args *args)
18362 {
18363 switch (args->event) {
18364 case NB_EV_VALIDATE:
18365 case NB_EV_PREPARE:
18366 case NB_EV_ABORT:
18367 case NB_EV_APPLY:
18368 /* TODO: implement me. */
18369 break;
18370 }
18371
18372 return NB_OK;
18373 }
18374
18375 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_destroy(
18376 struct nb_cb_destroy_args *args)
18377 {
18378 switch (args->event) {
18379 case NB_EV_VALIDATE:
18380 case NB_EV_PREPARE:
18381 case NB_EV_ABORT:
18382 case NB_EV_APPLY:
18383 /* TODO: implement me. */
18384 break;
18385 }
18386
18387 return NB_OK;
18388 }
18389
18390 /*
18391 * XPath:
18392 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-origin-as
18393 */
18394 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_modify(
18395 struct nb_cb_modify_args *args)
18396 {
18397 switch (args->event) {
18398 case NB_EV_VALIDATE:
18399 case NB_EV_PREPARE:
18400 case NB_EV_ABORT:
18401 case NB_EV_APPLY:
18402 /* TODO: implement me. */
18403 break;
18404 }
18405
18406 return NB_OK;
18407 }
18408
18409 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
18410 struct nb_cb_destroy_args *args)
18411 {
18412 switch (args->event) {
18413 case NB_EV_VALIDATE:
18414 case NB_EV_PREPARE:
18415 case NB_EV_ABORT:
18416 case NB_EV_APPLY:
18417 /* TODO: implement me. */
18418 break;
18419 }
18420
18421 return NB_OK;
18422 }
18423
18424 /*
18425 * XPath:
18426 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/replace-peer-as
18427 */
18428 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify(
18429 struct nb_cb_modify_args *args)
18430 {
18431 switch (args->event) {
18432 case NB_EV_VALIDATE:
18433 case NB_EV_PREPARE:
18434 case NB_EV_ABORT:
18435 return NB_OK;
18436 case NB_EV_APPLY:
18437 return bgp_neighbor_afi_safi_flag_modify(
18438 args, PEER_FLAG_AS_OVERRIDE,
18439 yang_dnode_get_bool(args->dnode, NULL));
18440
18441 break;
18442 }
18443
18444 return NB_OK;
18445 }
18446
18447 /*
18448 * XPath:
18449 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate
18450 */
18451 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify(
18452 struct nb_cb_modify_args *args)
18453 {
18454 switch (args->event) {
18455 case NB_EV_VALIDATE:
18456 case NB_EV_PREPARE:
18457 case NB_EV_ABORT:
18458 case NB_EV_APPLY:
18459 /* TODO: implement me. */
18460 break;
18461 }
18462
18463 return NB_OK;
18464 }
18465
18466 /*
18467 * XPath:
18468 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map
18469 */
18470 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify(
18471 struct nb_cb_modify_args *args)
18472 {
18473 switch (args->event) {
18474 case NB_EV_VALIDATE:
18475 case NB_EV_PREPARE:
18476 case NB_EV_ABORT:
18477 case NB_EV_APPLY:
18478 /* TODO: implement me. */
18479 break;
18480 }
18481
18482 return NB_OK;
18483 }
18484
18485 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy(
18486 struct nb_cb_destroy_args *args)
18487 {
18488 switch (args->event) {
18489 case NB_EV_VALIDATE:
18490 case NB_EV_PREPARE:
18491 case NB_EV_ABORT:
18492 case NB_EV_APPLY:
18493 /* TODO: implement me. */
18494 break;
18495 }
18496
18497 return NB_OK;
18498 }
18499
18500 /*
18501 * XPath:
18502 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/as-path-unchanged
18503 */
18504 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
18505 struct nb_cb_modify_args *args)
18506 {
18507 switch (args->event) {
18508 case NB_EV_VALIDATE:
18509 case NB_EV_PREPARE:
18510 case NB_EV_ABORT:
18511 return NB_OK;
18512 case NB_EV_APPLY:
18513 return bgp_neighbor_afi_safi_flag_modify(
18514 args, PEER_FLAG_AS_PATH_UNCHANGED,
18515 yang_dnode_get_bool(args->dnode, NULL));
18516
18517 break;
18518 }
18519
18520 return NB_OK;
18521 }
18522
18523 /*
18524 * XPath:
18525 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/next-hop-unchanged
18526 */
18527 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
18528 struct nb_cb_modify_args *args)
18529 {
18530 switch (args->event) {
18531 case NB_EV_VALIDATE:
18532 case NB_EV_PREPARE:
18533 case NB_EV_ABORT:
18534 return NB_OK;
18535 case NB_EV_APPLY:
18536 return bgp_neighbor_afi_safi_flag_modify(
18537 args, PEER_FLAG_NEXTHOP_UNCHANGED,
18538 yang_dnode_get_bool(args->dnode, NULL));
18539
18540 break;
18541 }
18542
18543 return NB_OK;
18544 }
18545
18546 /*
18547 * XPath:
18548 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/med-unchanged
18549 */
18550 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_med_unchanged_modify(
18551 struct nb_cb_modify_args *args)
18552 {
18553 switch (args->event) {
18554 case NB_EV_VALIDATE:
18555 case NB_EV_PREPARE:
18556 case NB_EV_ABORT:
18557 return NB_OK;
18558 case NB_EV_APPLY:
18559 return bgp_neighbor_afi_safi_flag_modify(
18560 args, PEER_FLAG_MED_UNCHANGED,
18561 yang_dnode_get_bool(args->dnode, NULL));
18562
18563 break;
18564 }
18565
18566 return NB_OK;
18567 }
18568
18569 /*
18570 * XPath:
18571 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-send
18572 */
18573 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_modify(
18574 struct nb_cb_modify_args *args)
18575 {
18576 switch (args->event) {
18577 case NB_EV_VALIDATE:
18578 case NB_EV_PREPARE:
18579 case NB_EV_ABORT:
18580 case NB_EV_APPLY:
18581 /* TODO: implement me. */
18582 break;
18583 }
18584
18585 return NB_OK;
18586 }
18587
18588 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_destroy(
18589 struct nb_cb_destroy_args *args)
18590 {
18591 switch (args->event) {
18592 case NB_EV_VALIDATE:
18593 case NB_EV_PREPARE:
18594 case NB_EV_ABORT:
18595 case NB_EV_APPLY:
18596 /* TODO: implement me. */
18597 break;
18598 }
18599
18600 return NB_OK;
18601 }
18602
18603 /*
18604 * XPath:
18605 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-receive
18606 */
18607 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_modify(
18608 struct nb_cb_modify_args *args)
18609 {
18610 switch (args->event) {
18611 case NB_EV_VALIDATE:
18612 case NB_EV_PREPARE:
18613 case NB_EV_ABORT:
18614 case NB_EV_APPLY:
18615 /* TODO: implement me. */
18616 break;
18617 }
18618
18619 return NB_OK;
18620 }
18621
18622 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_destroy(
18623 struct nb_cb_destroy_args *args)
18624 {
18625 switch (args->event) {
18626 case NB_EV_VALIDATE:
18627 case NB_EV_PREPARE:
18628 case NB_EV_ABORT:
18629 case NB_EV_APPLY:
18630 /* TODO: implement me. */
18631 break;
18632 }
18633
18634 return NB_OK;
18635 }
18636
18637 /*
18638 * XPath:
18639 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-both
18640 */
18641 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_modify(
18642 struct nb_cb_modify_args *args)
18643 {
18644 switch (args->event) {
18645 case NB_EV_VALIDATE:
18646 case NB_EV_PREPARE:
18647 case NB_EV_ABORT:
18648 case NB_EV_APPLY:
18649 /* TODO: implement me. */
18650 break;
18651 }
18652
18653 return NB_OK;
18654 }
18655
18656 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_destroy(
18657 struct nb_cb_destroy_args *args)
18658 {
18659 switch (args->event) {
18660 case NB_EV_VALIDATE:
18661 case NB_EV_PREPARE:
18662 case NB_EV_ABORT:
18663 case NB_EV_APPLY:
18664 /* TODO: implement me. */
18665 break;
18666 }
18667
18668 return NB_OK;
18669 }
18670
18671 /*
18672 * XPath:
18673 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list
18674 */
18675 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create(
18676 struct nb_cb_create_args *args)
18677 {
18678 switch (args->event) {
18679 case NB_EV_VALIDATE:
18680 case NB_EV_PREPARE:
18681 case NB_EV_ABORT:
18682 case NB_EV_APPLY:
18683 /* TODO: implement me. */
18684 break;
18685 }
18686
18687 return NB_OK;
18688 }
18689
18690 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy(
18691 struct nb_cb_destroy_args *args)
18692 {
18693 switch (args->event) {
18694 case NB_EV_VALIDATE:
18695 case NB_EV_PREPARE:
18696 case NB_EV_ABORT:
18697 return NB_OK;
18698 case NB_EV_APPLY:
18699 return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
18700 }
18701
18702 return NB_OK;
18703 }
18704
18705 /*
18706 * XPath:
18707 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/max-prefixes
18708 */
18709 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
18710 struct nb_cb_modify_args *args)
18711 {
18712 switch (args->event) {
18713 case NB_EV_VALIDATE:
18714 case NB_EV_PREPARE:
18715 case NB_EV_ABORT:
18716 case NB_EV_APPLY:
18717 /* TODO: implement me. */
18718 break;
18719 }
18720
18721 return NB_OK;
18722 }
18723
18724 /*
18725 * XPath:
18726 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check
18727 */
18728 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify(
18729 struct nb_cb_modify_args *args)
18730 {
18731 switch (args->event) {
18732 case NB_EV_VALIDATE:
18733 case NB_EV_PREPARE:
18734 case NB_EV_ABORT:
18735 case NB_EV_APPLY:
18736 /* TODO: implement me. */
18737 break;
18738 }
18739
18740 return NB_OK;
18741 }
18742
18743 /*
18744 * XPath:
18745 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only
18746 */
18747 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
18748 struct nb_cb_modify_args *args)
18749 {
18750 switch (args->event) {
18751 case NB_EV_VALIDATE:
18752 case NB_EV_PREPARE:
18753 case NB_EV_ABORT:
18754 case NB_EV_APPLY:
18755 /* TODO: implement me. */
18756 break;
18757 }
18758
18759 return NB_OK;
18760 }
18761
18762 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
18763 struct nb_cb_destroy_args *args)
18764 {
18765 switch (args->event) {
18766 case NB_EV_VALIDATE:
18767 case NB_EV_PREPARE:
18768 case NB_EV_ABORT:
18769 case NB_EV_APPLY:
18770 /* TODO: implement me. */
18771 break;
18772 }
18773
18774 return NB_OK;
18775 }
18776
18777 /*
18778 * XPath:
18779 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer
18780 */
18781 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
18782 struct nb_cb_modify_args *args)
18783 {
18784 switch (args->event) {
18785 case NB_EV_VALIDATE:
18786 case NB_EV_PREPARE:
18787 case NB_EV_ABORT:
18788 case NB_EV_APPLY:
18789 /* TODO: implement me. */
18790 break;
18791 }
18792
18793 return NB_OK;
18794 }
18795
18796 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
18797 struct nb_cb_destroy_args *args)
18798 {
18799 switch (args->event) {
18800 case NB_EV_VALIDATE:
18801 case NB_EV_PREPARE:
18802 case NB_EV_ABORT:
18803 case NB_EV_APPLY:
18804 /* TODO: implement me. */
18805 break;
18806 }
18807
18808 return NB_OK;
18809 }
18810
18811 /*
18812 * XPath:
18813 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
18814 */
18815 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
18816 struct nb_cb_modify_args *args)
18817 {
18818 switch (args->event) {
18819 case NB_EV_VALIDATE:
18820 case NB_EV_PREPARE:
18821 case NB_EV_ABORT:
18822 case NB_EV_APPLY:
18823 /* TODO: implement me. */
18824 break;
18825 }
18826
18827 return NB_OK;
18828 }
18829
18830 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
18831 struct nb_cb_destroy_args *args)
18832 {
18833 switch (args->event) {
18834 case NB_EV_VALIDATE:
18835 case NB_EV_PREPARE:
18836 case NB_EV_ABORT:
18837 case NB_EV_APPLY:
18838 /* TODO: implement me. */
18839 break;
18840 }
18841
18842 return NB_OK;
18843 }
18844
18845 /*
18846 * XPath:
18847 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
18848 */
18849 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
18850 struct nb_cb_modify_args *args)
18851 {
18852 switch (args->event) {
18853 case NB_EV_VALIDATE:
18854 case NB_EV_PREPARE:
18855 case NB_EV_ABORT:
18856 case NB_EV_APPLY:
18857 /* TODO: implement me. */
18858 break;
18859 }
18860
18861 return NB_OK;
18862 }
18863
18864 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
18865 struct nb_cb_destroy_args *args)
18866 {
18867 switch (args->event) {
18868 case NB_EV_VALIDATE:
18869 case NB_EV_PREPARE:
18870 case NB_EV_ABORT:
18871 case NB_EV_APPLY:
18872 /* TODO: implement me. */
18873 break;
18874 }
18875
18876 return NB_OK;
18877 }
18878
18879 /*
18880 * XPath:
18881 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer
18882 */
18883 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
18884 struct nb_cb_modify_args *args)
18885 {
18886 switch (args->event) {
18887 case NB_EV_VALIDATE:
18888 case NB_EV_PREPARE:
18889 case NB_EV_ABORT:
18890 case NB_EV_APPLY:
18891 /* TODO: implement me. */
18892 break;
18893 }
18894
18895 return NB_OK;
18896 }
18897
18898 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
18899 struct nb_cb_destroy_args *args)
18900 {
18901 switch (args->event) {
18902 case NB_EV_VALIDATE:
18903 case NB_EV_PREPARE:
18904 case NB_EV_ABORT:
18905 case NB_EV_APPLY:
18906 /* TODO: implement me. */
18907 break;
18908 }
18909
18910 return NB_OK;
18911 }
18912
18913 /*
18914 * XPath:
18915 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
18916 */
18917 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
18918 struct nb_cb_modify_args *args)
18919 {
18920 switch (args->event) {
18921 case NB_EV_VALIDATE:
18922 case NB_EV_PREPARE:
18923 case NB_EV_ABORT:
18924 case NB_EV_APPLY:
18925 /* TODO: implement me. */
18926 break;
18927 }
18928
18929 return NB_OK;
18930 }
18931
18932 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
18933 struct nb_cb_destroy_args *args)
18934 {
18935 switch (args->event) {
18936 case NB_EV_VALIDATE:
18937 case NB_EV_PREPARE:
18938 case NB_EV_ABORT:
18939 case NB_EV_APPLY:
18940 /* TODO: implement me. */
18941 break;
18942 }
18943
18944 return NB_OK;
18945 }
18946
18947 /*
18948 * XPath:
18949 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only
18950 */
18951 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
18952 struct nb_cb_modify_args *args)
18953 {
18954 switch (args->event) {
18955 case NB_EV_VALIDATE:
18956 case NB_EV_PREPARE:
18957 case NB_EV_ABORT:
18958 case NB_EV_APPLY:
18959 /* TODO: implement me. */
18960 break;
18961 }
18962
18963 return NB_OK;
18964 }
18965
18966 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
18967 struct nb_cb_destroy_args *args)
18968 {
18969 switch (args->event) {
18970 case NB_EV_VALIDATE:
18971 case NB_EV_PREPARE:
18972 case NB_EV_ABORT:
18973 case NB_EV_APPLY:
18974 /* TODO: implement me. */
18975 break;
18976 }
18977
18978 return NB_OK;
18979 }
18980
18981 /*
18982 * XPath:
18983 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self
18984 */
18985 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify(
18986 struct nb_cb_modify_args *args)
18987 {
18988 switch (args->event) {
18989 case NB_EV_VALIDATE:
18990 case NB_EV_PREPARE:
18991 case NB_EV_ABORT:
18992 return NB_OK;
18993 case NB_EV_APPLY:
18994 return bgp_neighbor_afi_safi_flag_modify(
18995 args, PEER_FLAG_NEXTHOP_SELF,
18996 yang_dnode_get_bool(args->dnode, NULL));
18997
18998 break;
18999 }
19000
19001 return NB_OK;
19002 }
19003
19004 /*
19005 * XPath:
19006 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self-force
19007 */
19008 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_force_modify(
19009 struct nb_cb_modify_args *args)
19010 {
19011 switch (args->event) {
19012 case NB_EV_VALIDATE:
19013 case NB_EV_PREPARE:
19014 case NB_EV_ABORT:
19015 return NB_OK;
19016 case NB_EV_APPLY:
19017 return bgp_neighbor_afi_safi_flag_modify(
19018 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
19019 yang_dnode_get_bool(args->dnode, NULL));
19020
19021 break;
19022 }
19023
19024 return NB_OK;
19025 }
19026
19027 /*
19028 * XPath:
19029 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all
19030 */
19031 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_modify(
19032 struct nb_cb_modify_args *args)
19033 {
19034 switch (args->event) {
19035 case NB_EV_VALIDATE:
19036 case NB_EV_PREPARE:
19037 case NB_EV_ABORT:
19038 return NB_OK;
19039 case NB_EV_APPLY:
19040 return bgp_neighbor_afi_safi_flag_modify(
19041 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
19042 yang_dnode_get_bool(args->dnode, NULL));
19043
19044 break;
19045 }
19046
19047 return NB_OK;
19048 }
19049
19050 /*
19051 * XPath:
19052 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all-replace
19053 */
19054 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_replace_modify(
19055 struct nb_cb_modify_args *args)
19056 {
19057 switch (args->event) {
19058 case NB_EV_VALIDATE:
19059 case NB_EV_PREPARE:
19060 case NB_EV_ABORT:
19061 return NB_OK;
19062 case NB_EV_APPLY:
19063 return bgp_neighbor_afi_safi_flag_modify(
19064 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
19065 yang_dnode_get_bool(args->dnode, NULL));
19066
19067 break;
19068 }
19069
19070 return NB_OK;
19071 }
19072
19073 /*
19074 * XPath:
19075 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as
19076 */
19077 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_modify(
19078 struct nb_cb_modify_args *args)
19079 {
19080 switch (args->event) {
19081 case NB_EV_VALIDATE:
19082 case NB_EV_PREPARE:
19083 case NB_EV_ABORT:
19084 return NB_OK;
19085 case NB_EV_APPLY:
19086 return bgp_neighbor_afi_safi_flag_modify(
19087 args, PEER_FLAG_REMOVE_PRIVATE_AS,
19088 yang_dnode_get_bool(args->dnode, NULL));
19089
19090 break;
19091 }
19092
19093 return NB_OK;
19094 }
19095
19096 /*
19097 * XPath:
19098 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-replace
19099 */
19100 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_replace_modify(
19101 struct nb_cb_modify_args *args)
19102 {
19103 switch (args->event) {
19104 case NB_EV_VALIDATE:
19105 case NB_EV_PREPARE:
19106 case NB_EV_ABORT:
19107 return NB_OK;
19108 case NB_EV_APPLY:
19109 return bgp_neighbor_afi_safi_flag_modify(
19110 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
19111 yang_dnode_get_bool(args->dnode, NULL));
19112
19113 break;
19114 }
19115
19116 return NB_OK;
19117 }
19118
19119 /*
19120 * XPath:
19121 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/route-reflector/route-reflector-client
19122 */
19123 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflector_route_reflector_client_modify(
19124 struct nb_cb_modify_args *args)
19125 {
19126 switch (args->event) {
19127 case NB_EV_VALIDATE:
19128 case NB_EV_PREPARE:
19129 case NB_EV_ABORT:
19130 return NB_OK;
19131 case NB_EV_APPLY:
19132 return bgp_neighbor_afi_safi_flag_modify(
19133 args, PEER_FLAG_REFLECTOR_CLIENT,
19134 yang_dnode_get_bool(args->dnode, NULL));
19135
19136 break;
19137 }
19138
19139 return NB_OK;
19140 }
19141
19142 /*
19143 * XPath:
19144 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/route-server/route-server-client
19145 */
19146 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_route_server_client_modify(
19147 struct nb_cb_modify_args *args)
19148 {
19149 switch (args->event) {
19150 case NB_EV_VALIDATE:
19151 case NB_EV_PREPARE:
19152 case NB_EV_ABORT:
19153 return NB_OK;
19154 case NB_EV_APPLY:
19155 return bgp_neighbor_afi_safi_flag_modify(
19156 args, PEER_FLAG_RSERVER_CLIENT,
19157 yang_dnode_get_bool(args->dnode, NULL));
19158
19159 break;
19160 }
19161
19162 return NB_OK;
19163 }
19164
19165 /*
19166 * XPath:
19167 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-community
19168 */
19169 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_community_modify(
19170 struct nb_cb_modify_args *args)
19171 {
19172 switch (args->event) {
19173 case NB_EV_VALIDATE:
19174 case NB_EV_PREPARE:
19175 case NB_EV_ABORT:
19176 return NB_OK;
19177 case NB_EV_APPLY:
19178 return bgp_neighbor_afi_safi_flag_modify(
19179 args, PEER_FLAG_SEND_COMMUNITY,
19180 yang_dnode_get_bool(args->dnode, NULL));
19181
19182 break;
19183 }
19184
19185 return NB_OK;
19186 }
19187
19188 /*
19189 * XPath:
19190 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-ext-community
19191 */
19192 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_ext_community_modify(
19193 struct nb_cb_modify_args *args)
19194 {
19195 switch (args->event) {
19196 case NB_EV_VALIDATE:
19197 case NB_EV_PREPARE:
19198 case NB_EV_ABORT:
19199 return NB_OK;
19200 case NB_EV_APPLY:
19201 return bgp_neighbor_afi_safi_flag_modify(
19202 args, PEER_FLAG_SEND_EXT_COMMUNITY,
19203 yang_dnode_get_bool(args->dnode, NULL));
19204
19205 break;
19206 }
19207
19208 return NB_OK;
19209 }
19210
19211 /*
19212 * XPath:
19213 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-large-community
19214 */
19215 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_large_community_modify(
19216 struct nb_cb_modify_args *args)
19217 {
19218 switch (args->event) {
19219 case NB_EV_VALIDATE:
19220 case NB_EV_PREPARE:
19221 case NB_EV_ABORT:
19222 return NB_OK;
19223 case NB_EV_APPLY:
19224 return bgp_neighbor_afi_safi_flag_modify(
19225 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
19226 yang_dnode_get_bool(args->dnode, NULL));
19227
19228 break;
19229 }
19230
19231 return NB_OK;
19232 }
19233
19234 /*
19235 * XPath:
19236 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/soft-reconfiguration
19237 */
19238 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfiguration_modify(
19239 struct nb_cb_modify_args *args)
19240 {
19241 switch (args->event) {
19242 case NB_EV_VALIDATE:
19243 case NB_EV_PREPARE:
19244 case NB_EV_ABORT:
19245 return NB_OK;
19246 case NB_EV_APPLY:
19247 return bgp_neighbor_afi_safi_flag_modify(
19248 args, PEER_FLAG_SOFT_RECONFIG,
19249 yang_dnode_get_bool(args->dnode, NULL));
19250
19251 break;
19252 }
19253
19254 return NB_OK;
19255 }
19256
19257 /*
19258 * XPath:
19259 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/weight/weight-attribute
19260 */
19261 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_modify(
19262 struct nb_cb_modify_args *args)
19263 {
19264 switch (args->event) {
19265 case NB_EV_VALIDATE:
19266 case NB_EV_PREPARE:
19267 case NB_EV_ABORT:
19268 return NB_OK;
19269 case NB_EV_APPLY:
19270 return bgp_neighbor_afi_safi_weight_modify(args);
19271
19272 break;
19273 }
19274
19275 return NB_OK;
19276 }
19277
19278 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_destroy(
19279 struct nb_cb_destroy_args *args)
19280 {
19281 switch (args->event) {
19282 case NB_EV_VALIDATE:
19283 case NB_EV_PREPARE:
19284 case NB_EV_ABORT:
19285 return NB_OK;
19286 case NB_EV_APPLY:
19287 return bgp_neighbor_afi_safi_weight_destroy(args);
19288
19289 break;
19290 }
19291
19292 return NB_OK;
19293 }
19294
19295 /*
19296 * XPath:
19297 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/add-paths/path-type
19298 */
19299 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_add_paths_path_type_modify(
19300 struct nb_cb_modify_args *args)
19301 {
19302 switch (args->event) {
19303 case NB_EV_VALIDATE:
19304 case NB_EV_PREPARE:
19305 case NB_EV_ABORT:
19306 case NB_EV_APPLY:
19307 /* TODO: implement me. */
19308 break;
19309 }
19310
19311 return NB_OK;
19312 }
19313
19314 /*
19315 * XPath:
19316 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-as
19317 */
19318 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_modify(
19319 struct nb_cb_modify_args *args)
19320 {
19321 switch (args->event) {
19322 case NB_EV_VALIDATE:
19323 case NB_EV_PREPARE:
19324 case NB_EV_ABORT:
19325 case NB_EV_APPLY:
19326 /* TODO: implement me. */
19327 break;
19328 }
19329
19330 return NB_OK;
19331 }
19332
19333 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_destroy(
19334 struct nb_cb_destroy_args *args)
19335 {
19336 switch (args->event) {
19337 case NB_EV_VALIDATE:
19338 case NB_EV_PREPARE:
19339 case NB_EV_ABORT:
19340 case NB_EV_APPLY:
19341 /* TODO: implement me. */
19342 break;
19343 }
19344
19345 return NB_OK;
19346 }
19347
19348 /*
19349 * XPath:
19350 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-origin-as
19351 */
19352 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_modify(
19353 struct nb_cb_modify_args *args)
19354 {
19355 switch (args->event) {
19356 case NB_EV_VALIDATE:
19357 case NB_EV_PREPARE:
19358 case NB_EV_ABORT:
19359 case NB_EV_APPLY:
19360 /* TODO: implement me. */
19361 break;
19362 }
19363
19364 return NB_OK;
19365 }
19366
19367 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
19368 struct nb_cb_destroy_args *args)
19369 {
19370 switch (args->event) {
19371 case NB_EV_VALIDATE:
19372 case NB_EV_PREPARE:
19373 case NB_EV_ABORT:
19374 case NB_EV_APPLY:
19375 /* TODO: implement me. */
19376 break;
19377 }
19378
19379 return NB_OK;
19380 }
19381
19382 /*
19383 * XPath:
19384 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/replace-peer-as
19385 */
19386 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify(
19387 struct nb_cb_modify_args *args)
19388 {
19389 switch (args->event) {
19390 case NB_EV_VALIDATE:
19391 case NB_EV_PREPARE:
19392 case NB_EV_ABORT:
19393 return NB_OK;
19394 case NB_EV_APPLY:
19395 return bgp_neighbor_afi_safi_flag_modify(
19396 args, PEER_FLAG_AS_OVERRIDE,
19397 yang_dnode_get_bool(args->dnode, NULL));
19398
19399 break;
19400 }
19401
19402 return NB_OK;
19403 }
19404
19405 /*
19406 * XPath:
19407 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate
19408 */
19409 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify(
19410 struct nb_cb_modify_args *args)
19411 {
19412 switch (args->event) {
19413 case NB_EV_VALIDATE:
19414 case NB_EV_PREPARE:
19415 case NB_EV_ABORT:
19416 case NB_EV_APPLY:
19417 /* TODO: implement me. */
19418 break;
19419 }
19420
19421 return NB_OK;
19422 }
19423
19424 /*
19425 * XPath:
19426 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map
19427 */
19428 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify(
19429 struct nb_cb_modify_args *args)
19430 {
19431 switch (args->event) {
19432 case NB_EV_VALIDATE:
19433 case NB_EV_PREPARE:
19434 case NB_EV_ABORT:
19435 case NB_EV_APPLY:
19436 /* TODO: implement me. */
19437 break;
19438 }
19439
19440 return NB_OK;
19441 }
19442
19443 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy(
19444 struct nb_cb_destroy_args *args)
19445 {
19446 switch (args->event) {
19447 case NB_EV_VALIDATE:
19448 case NB_EV_PREPARE:
19449 case NB_EV_ABORT:
19450 case NB_EV_APPLY:
19451 /* TODO: implement me. */
19452 break;
19453 }
19454
19455 return NB_OK;
19456 }
19457
19458 /*
19459 * XPath:
19460 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/as-path-unchanged
19461 */
19462 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
19463 struct nb_cb_modify_args *args)
19464 {
19465 switch (args->event) {
19466 case NB_EV_VALIDATE:
19467 case NB_EV_PREPARE:
19468 case NB_EV_ABORT:
19469 return NB_OK;
19470 case NB_EV_APPLY:
19471 return bgp_neighbor_afi_safi_flag_modify(
19472 args, PEER_FLAG_AS_PATH_UNCHANGED,
19473 yang_dnode_get_bool(args->dnode, NULL));
19474
19475 break;
19476 }
19477
19478 return NB_OK;
19479 }
19480
19481 /*
19482 * XPath:
19483 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/next-hop-unchanged
19484 */
19485 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
19486 struct nb_cb_modify_args *args)
19487 {
19488 switch (args->event) {
19489 case NB_EV_VALIDATE:
19490 case NB_EV_PREPARE:
19491 case NB_EV_ABORT:
19492 return NB_OK;
19493 case NB_EV_APPLY:
19494 return bgp_neighbor_afi_safi_flag_modify(
19495 args, PEER_FLAG_NEXTHOP_UNCHANGED,
19496 yang_dnode_get_bool(args->dnode, NULL));
19497
19498 break;
19499 }
19500
19501 return NB_OK;
19502 }
19503
19504 /*
19505 * XPath:
19506 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/med-unchanged
19507 */
19508 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_med_unchanged_modify(
19509 struct nb_cb_modify_args *args)
19510 {
19511 switch (args->event) {
19512 case NB_EV_VALIDATE:
19513 case NB_EV_PREPARE:
19514 case NB_EV_ABORT:
19515 return NB_OK;
19516 case NB_EV_APPLY:
19517 return bgp_neighbor_afi_safi_flag_modify(
19518 args, PEER_FLAG_MED_UNCHANGED,
19519 yang_dnode_get_bool(args->dnode, NULL));
19520
19521 break;
19522 }
19523
19524 return NB_OK;
19525 }
19526
19527 /*
19528 * XPath:
19529 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-send
19530 */
19531 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_modify(
19532 struct nb_cb_modify_args *args)
19533 {
19534 switch (args->event) {
19535 case NB_EV_VALIDATE:
19536 case NB_EV_PREPARE:
19537 case NB_EV_ABORT:
19538 case NB_EV_APPLY:
19539 /* TODO: implement me. */
19540 break;
19541 }
19542
19543 return NB_OK;
19544 }
19545
19546 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_destroy(
19547 struct nb_cb_destroy_args *args)
19548 {
19549 switch (args->event) {
19550 case NB_EV_VALIDATE:
19551 case NB_EV_PREPARE:
19552 case NB_EV_ABORT:
19553 case NB_EV_APPLY:
19554 /* TODO: implement me. */
19555 break;
19556 }
19557
19558 return NB_OK;
19559 }
19560
19561 /*
19562 * XPath:
19563 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-receive
19564 */
19565 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_modify(
19566 struct nb_cb_modify_args *args)
19567 {
19568 switch (args->event) {
19569 case NB_EV_VALIDATE:
19570 case NB_EV_PREPARE:
19571 case NB_EV_ABORT:
19572 case NB_EV_APPLY:
19573 /* TODO: implement me. */
19574 break;
19575 }
19576
19577 return NB_OK;
19578 }
19579
19580 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_destroy(
19581 struct nb_cb_destroy_args *args)
19582 {
19583 switch (args->event) {
19584 case NB_EV_VALIDATE:
19585 case NB_EV_PREPARE:
19586 case NB_EV_ABORT:
19587 case NB_EV_APPLY:
19588 /* TODO: implement me. */
19589 break;
19590 }
19591
19592 return NB_OK;
19593 }
19594
19595 /*
19596 * XPath:
19597 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-both
19598 */
19599 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_modify(
19600 struct nb_cb_modify_args *args)
19601 {
19602 switch (args->event) {
19603 case NB_EV_VALIDATE:
19604 case NB_EV_PREPARE:
19605 case NB_EV_ABORT:
19606 case NB_EV_APPLY:
19607 /* TODO: implement me. */
19608 break;
19609 }
19610
19611 return NB_OK;
19612 }
19613
19614 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_destroy(
19615 struct nb_cb_destroy_args *args)
19616 {
19617 switch (args->event) {
19618 case NB_EV_VALIDATE:
19619 case NB_EV_PREPARE:
19620 case NB_EV_ABORT:
19621 case NB_EV_APPLY:
19622 /* TODO: implement me. */
19623 break;
19624 }
19625
19626 return NB_OK;
19627 }
19628
19629 /*
19630 * XPath:
19631 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list
19632 */
19633 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create(
19634 struct nb_cb_create_args *args)
19635 {
19636 switch (args->event) {
19637 case NB_EV_VALIDATE:
19638 case NB_EV_PREPARE:
19639 case NB_EV_ABORT:
19640 case NB_EV_APPLY:
19641 /* TODO: implement me. */
19642 break;
19643 }
19644
19645 return NB_OK;
19646 }
19647
19648 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy(
19649 struct nb_cb_destroy_args *args)
19650 {
19651 switch (args->event) {
19652 case NB_EV_VALIDATE:
19653 case NB_EV_PREPARE:
19654 case NB_EV_ABORT:
19655 return NB_OK;
19656 case NB_EV_APPLY:
19657 return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
19658 }
19659
19660 return NB_OK;
19661 }
19662
19663 /*
19664 * XPath:
19665 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/max-prefixes
19666 */
19667 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
19668 struct nb_cb_modify_args *args)
19669 {
19670 switch (args->event) {
19671 case NB_EV_VALIDATE:
19672 case NB_EV_PREPARE:
19673 case NB_EV_ABORT:
19674 case NB_EV_APPLY:
19675 /* TODO: implement me. */
19676 break;
19677 }
19678
19679 return NB_OK;
19680 }
19681
19682 /*
19683 * XPath:
19684 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check
19685 */
19686 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify(
19687 struct nb_cb_modify_args *args)
19688 {
19689 switch (args->event) {
19690 case NB_EV_VALIDATE:
19691 case NB_EV_PREPARE:
19692 case NB_EV_ABORT:
19693 case NB_EV_APPLY:
19694 /* TODO: implement me. */
19695 break;
19696 }
19697
19698 return NB_OK;
19699 }
19700
19701 /*
19702 * XPath:
19703 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only
19704 */
19705 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
19706 struct nb_cb_modify_args *args)
19707 {
19708 switch (args->event) {
19709 case NB_EV_VALIDATE:
19710 case NB_EV_PREPARE:
19711 case NB_EV_ABORT:
19712 case NB_EV_APPLY:
19713 /* TODO: implement me. */
19714 break;
19715 }
19716
19717 return NB_OK;
19718 }
19719
19720 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
19721 struct nb_cb_destroy_args *args)
19722 {
19723 switch (args->event) {
19724 case NB_EV_VALIDATE:
19725 case NB_EV_PREPARE:
19726 case NB_EV_ABORT:
19727 case NB_EV_APPLY:
19728 /* TODO: implement me. */
19729 break;
19730 }
19731
19732 return NB_OK;
19733 }
19734
19735 /*
19736 * XPath:
19737 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer
19738 */
19739 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
19740 struct nb_cb_modify_args *args)
19741 {
19742 switch (args->event) {
19743 case NB_EV_VALIDATE:
19744 case NB_EV_PREPARE:
19745 case NB_EV_ABORT:
19746 case NB_EV_APPLY:
19747 /* TODO: implement me. */
19748 break;
19749 }
19750
19751 return NB_OK;
19752 }
19753
19754 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
19755 struct nb_cb_destroy_args *args)
19756 {
19757 switch (args->event) {
19758 case NB_EV_VALIDATE:
19759 case NB_EV_PREPARE:
19760 case NB_EV_ABORT:
19761 case NB_EV_APPLY:
19762 /* TODO: implement me. */
19763 break;
19764 }
19765
19766 return NB_OK;
19767 }
19768
19769 /*
19770 * XPath:
19771 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
19772 */
19773 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
19774 struct nb_cb_modify_args *args)
19775 {
19776 switch (args->event) {
19777 case NB_EV_VALIDATE:
19778 case NB_EV_PREPARE:
19779 case NB_EV_ABORT:
19780 case NB_EV_APPLY:
19781 /* TODO: implement me. */
19782 break;
19783 }
19784
19785 return NB_OK;
19786 }
19787
19788 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
19789 struct nb_cb_destroy_args *args)
19790 {
19791 switch (args->event) {
19792 case NB_EV_VALIDATE:
19793 case NB_EV_PREPARE:
19794 case NB_EV_ABORT:
19795 case NB_EV_APPLY:
19796 /* TODO: implement me. */
19797 break;
19798 }
19799
19800 return NB_OK;
19801 }
19802
19803 /*
19804 * XPath:
19805 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
19806 */
19807 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
19808 struct nb_cb_modify_args *args)
19809 {
19810 switch (args->event) {
19811 case NB_EV_VALIDATE:
19812 case NB_EV_PREPARE:
19813 case NB_EV_ABORT:
19814 case NB_EV_APPLY:
19815 /* TODO: implement me. */
19816 break;
19817 }
19818
19819 return NB_OK;
19820 }
19821
19822 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
19823 struct nb_cb_destroy_args *args)
19824 {
19825 switch (args->event) {
19826 case NB_EV_VALIDATE:
19827 case NB_EV_PREPARE:
19828 case NB_EV_ABORT:
19829 case NB_EV_APPLY:
19830 /* TODO: implement me. */
19831 break;
19832 }
19833
19834 return NB_OK;
19835 }
19836
19837 /*
19838 * XPath:
19839 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer
19840 */
19841 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
19842 struct nb_cb_modify_args *args)
19843 {
19844 switch (args->event) {
19845 case NB_EV_VALIDATE:
19846 case NB_EV_PREPARE:
19847 case NB_EV_ABORT:
19848 case NB_EV_APPLY:
19849 /* TODO: implement me. */
19850 break;
19851 }
19852
19853 return NB_OK;
19854 }
19855
19856 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
19857 struct nb_cb_destroy_args *args)
19858 {
19859 switch (args->event) {
19860 case NB_EV_VALIDATE:
19861 case NB_EV_PREPARE:
19862 case NB_EV_ABORT:
19863 case NB_EV_APPLY:
19864 /* TODO: implement me. */
19865 break;
19866 }
19867
19868 return NB_OK;
19869 }
19870
19871 /*
19872 * XPath:
19873 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
19874 */
19875 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
19876 struct nb_cb_modify_args *args)
19877 {
19878 switch (args->event) {
19879 case NB_EV_VALIDATE:
19880 case NB_EV_PREPARE:
19881 case NB_EV_ABORT:
19882 case NB_EV_APPLY:
19883 /* TODO: implement me. */
19884 break;
19885 }
19886
19887 return NB_OK;
19888 }
19889
19890 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
19891 struct nb_cb_destroy_args *args)
19892 {
19893 switch (args->event) {
19894 case NB_EV_VALIDATE:
19895 case NB_EV_PREPARE:
19896 case NB_EV_ABORT:
19897 case NB_EV_APPLY:
19898 /* TODO: implement me. */
19899 break;
19900 }
19901
19902 return NB_OK;
19903 }
19904
19905 /*
19906 * XPath:
19907 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only
19908 */
19909 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
19910 struct nb_cb_modify_args *args)
19911 {
19912 switch (args->event) {
19913 case NB_EV_VALIDATE:
19914 case NB_EV_PREPARE:
19915 case NB_EV_ABORT:
19916 case NB_EV_APPLY:
19917 /* TODO: implement me. */
19918 break;
19919 }
19920
19921 return NB_OK;
19922 }
19923
19924 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
19925 struct nb_cb_destroy_args *args)
19926 {
19927 switch (args->event) {
19928 case NB_EV_VALIDATE:
19929 case NB_EV_PREPARE:
19930 case NB_EV_ABORT:
19931 case NB_EV_APPLY:
19932 /* TODO: implement me. */
19933 break;
19934 }
19935
19936 return NB_OK;
19937 }
19938
19939 /*
19940 * XPath:
19941 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self
19942 */
19943 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify(
19944 struct nb_cb_modify_args *args)
19945 {
19946 switch (args->event) {
19947 case NB_EV_VALIDATE:
19948 case NB_EV_PREPARE:
19949 case NB_EV_ABORT:
19950 return NB_OK;
19951 case NB_EV_APPLY:
19952 return bgp_neighbor_afi_safi_flag_modify(
19953 args, PEER_FLAG_NEXTHOP_SELF,
19954 yang_dnode_get_bool(args->dnode, NULL));
19955
19956 break;
19957 }
19958
19959 return NB_OK;
19960 }
19961
19962 /*
19963 * XPath:
19964 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self-force
19965 */
19966 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_force_modify(
19967 struct nb_cb_modify_args *args)
19968 {
19969 switch (args->event) {
19970 case NB_EV_VALIDATE:
19971 case NB_EV_PREPARE:
19972 case NB_EV_ABORT:
19973 return NB_OK;
19974 case NB_EV_APPLY:
19975 return bgp_neighbor_afi_safi_flag_modify(
19976 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
19977 yang_dnode_get_bool(args->dnode, NULL));
19978
19979 break;
19980 }
19981
19982 return NB_OK;
19983 }
19984
19985 /*
19986 * XPath:
19987 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all
19988 */
19989 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_modify(
19990 struct nb_cb_modify_args *args)
19991 {
19992 switch (args->event) {
19993 case NB_EV_VALIDATE:
19994 case NB_EV_PREPARE:
19995 case NB_EV_ABORT:
19996 return NB_OK;
19997 case NB_EV_APPLY:
19998 return bgp_neighbor_afi_safi_flag_modify(
19999 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
20000 yang_dnode_get_bool(args->dnode, NULL));
20001
20002 break;
20003 }
20004
20005 return NB_OK;
20006 }
20007
20008 /*
20009 * XPath:
20010 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all-replace
20011 */
20012 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_replace_modify(
20013 struct nb_cb_modify_args *args)
20014 {
20015 switch (args->event) {
20016 case NB_EV_VALIDATE:
20017 case NB_EV_PREPARE:
20018 case NB_EV_ABORT:
20019 return NB_OK;
20020 case NB_EV_APPLY:
20021 return bgp_neighbor_afi_safi_flag_modify(
20022 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
20023 yang_dnode_get_bool(args->dnode, NULL));
20024
20025 break;
20026 }
20027
20028 return NB_OK;
20029 }
20030
20031 /*
20032 * XPath:
20033 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as
20034 */
20035 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_modify(
20036 struct nb_cb_modify_args *args)
20037 {
20038 switch (args->event) {
20039 case NB_EV_VALIDATE:
20040 case NB_EV_PREPARE:
20041 case NB_EV_ABORT:
20042 return NB_OK;
20043 case NB_EV_APPLY:
20044 return bgp_neighbor_afi_safi_flag_modify(
20045 args, PEER_FLAG_REMOVE_PRIVATE_AS,
20046 yang_dnode_get_bool(args->dnode, NULL));
20047
20048 break;
20049 }
20050
20051 return NB_OK;
20052 }
20053
20054 /*
20055 * XPath:
20056 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-replace
20057 */
20058 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_replace_modify(
20059 struct nb_cb_modify_args *args)
20060 {
20061 switch (args->event) {
20062 case NB_EV_VALIDATE:
20063 case NB_EV_PREPARE:
20064 case NB_EV_ABORT:
20065 return NB_OK;
20066 case NB_EV_APPLY:
20067 return bgp_neighbor_afi_safi_flag_modify(
20068 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
20069 yang_dnode_get_bool(args->dnode, NULL));
20070
20071 break;
20072 }
20073
20074 return NB_OK;
20075 }
20076
20077 /*
20078 * XPath:
20079 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/route-reflector/route-reflector-client
20080 */
20081 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflector_route_reflector_client_modify(
20082 struct nb_cb_modify_args *args)
20083 {
20084 switch (args->event) {
20085 case NB_EV_VALIDATE:
20086 case NB_EV_PREPARE:
20087 case NB_EV_ABORT:
20088 return NB_OK;
20089 case NB_EV_APPLY:
20090 return bgp_neighbor_afi_safi_flag_modify(
20091 args, PEER_FLAG_REFLECTOR_CLIENT,
20092 yang_dnode_get_bool(args->dnode, NULL));
20093
20094 break;
20095 }
20096
20097 return NB_OK;
20098 }
20099
20100 /*
20101 * XPath:
20102 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/route-server/route-server-client
20103 */
20104 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_route_server_client_modify(
20105 struct nb_cb_modify_args *args)
20106 {
20107 switch (args->event) {
20108 case NB_EV_VALIDATE:
20109 case NB_EV_PREPARE:
20110 case NB_EV_ABORT:
20111 return NB_OK;
20112 case NB_EV_APPLY:
20113 return bgp_neighbor_afi_safi_flag_modify(
20114 args, PEER_FLAG_RSERVER_CLIENT,
20115 yang_dnode_get_bool(args->dnode, NULL));
20116
20117 break;
20118 }
20119
20120 return NB_OK;
20121 }
20122
20123 /*
20124 * XPath:
20125 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-community
20126 */
20127 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_community_modify(
20128 struct nb_cb_modify_args *args)
20129 {
20130 switch (args->event) {
20131 case NB_EV_VALIDATE:
20132 case NB_EV_PREPARE:
20133 case NB_EV_ABORT:
20134 return NB_OK;
20135 case NB_EV_APPLY:
20136 return bgp_neighbor_afi_safi_flag_modify(
20137 args, PEER_FLAG_SEND_COMMUNITY,
20138 yang_dnode_get_bool(args->dnode, NULL));
20139
20140 break;
20141 }
20142
20143 return NB_OK;
20144 }
20145
20146 /*
20147 * XPath:
20148 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-ext-community
20149 */
20150 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_ext_community_modify(
20151 struct nb_cb_modify_args *args)
20152 {
20153 switch (args->event) {
20154 case NB_EV_VALIDATE:
20155 case NB_EV_PREPARE:
20156 case NB_EV_ABORT:
20157 return NB_OK;
20158 case NB_EV_APPLY:
20159 return bgp_neighbor_afi_safi_flag_modify(
20160 args, PEER_FLAG_SEND_EXT_COMMUNITY,
20161 yang_dnode_get_bool(args->dnode, NULL));
20162
20163 break;
20164 }
20165
20166 return NB_OK;
20167 }
20168
20169 /*
20170 * XPath:
20171 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-large-community
20172 */
20173 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_large_community_modify(
20174 struct nb_cb_modify_args *args)
20175 {
20176 switch (args->event) {
20177 case NB_EV_VALIDATE:
20178 case NB_EV_PREPARE:
20179 case NB_EV_ABORT:
20180 return NB_OK;
20181 case NB_EV_APPLY:
20182 return bgp_neighbor_afi_safi_flag_modify(
20183 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
20184 yang_dnode_get_bool(args->dnode, NULL));
20185
20186 break;
20187 }
20188
20189 return NB_OK;
20190 }
20191
20192 /*
20193 * XPath:
20194 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/soft-reconfiguration
20195 */
20196 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfiguration_modify(
20197 struct nb_cb_modify_args *args)
20198 {
20199 switch (args->event) {
20200 case NB_EV_VALIDATE:
20201 case NB_EV_PREPARE:
20202 case NB_EV_ABORT:
20203 return NB_OK;
20204 case NB_EV_APPLY:
20205 return bgp_neighbor_afi_safi_flag_modify(
20206 args, PEER_FLAG_SOFT_RECONFIG,
20207 yang_dnode_get_bool(args->dnode, NULL));
20208
20209 break;
20210 }
20211
20212 return NB_OK;
20213 }
20214
20215 /*
20216 * XPath:
20217 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/weight/weight-attribute
20218 */
20219 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_modify(
20220 struct nb_cb_modify_args *args)
20221 {
20222 switch (args->event) {
20223 case NB_EV_VALIDATE:
20224 case NB_EV_PREPARE:
20225 case NB_EV_ABORT:
20226 return NB_OK;
20227 case NB_EV_APPLY:
20228 return bgp_neighbor_afi_safi_weight_modify(args);
20229
20230 break;
20231 }
20232
20233 return NB_OK;
20234 }
20235
20236 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_destroy(
20237 struct nb_cb_destroy_args *args)
20238 {
20239 switch (args->event) {
20240 case NB_EV_VALIDATE:
20241 case NB_EV_PREPARE:
20242 case NB_EV_ABORT:
20243 return NB_OK;
20244 case NB_EV_APPLY:
20245 return bgp_neighbor_afi_safi_weight_destroy(args);
20246
20247 break;
20248 }
20249
20250 return NB_OK;
20251 }
20252
20253 /*
20254 * XPath:
20255 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/add-paths/path-type
20256 */
20257 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_add_paths_path_type_modify(
20258 struct nb_cb_modify_args *args)
20259 {
20260 switch (args->event) {
20261 case NB_EV_VALIDATE:
20262 case NB_EV_PREPARE:
20263 case NB_EV_ABORT:
20264 case NB_EV_APPLY:
20265 /* TODO: implement me. */
20266 break;
20267 }
20268
20269 return NB_OK;
20270 }
20271
20272 /*
20273 * XPath:
20274 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-as
20275 */
20276 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_modify(
20277 struct nb_cb_modify_args *args)
20278 {
20279 switch (args->event) {
20280 case NB_EV_VALIDATE:
20281 case NB_EV_PREPARE:
20282 case NB_EV_ABORT:
20283 case NB_EV_APPLY:
20284 /* TODO: implement me. */
20285 break;
20286 }
20287
20288 return NB_OK;
20289 }
20290
20291 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_destroy(
20292 struct nb_cb_destroy_args *args)
20293 {
20294 switch (args->event) {
20295 case NB_EV_VALIDATE:
20296 case NB_EV_PREPARE:
20297 case NB_EV_ABORT:
20298 case NB_EV_APPLY:
20299 /* TODO: implement me. */
20300 break;
20301 }
20302
20303 return NB_OK;
20304 }
20305
20306 /*
20307 * XPath:
20308 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-origin-as
20309 */
20310 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
20311 struct nb_cb_modify_args *args)
20312 {
20313 switch (args->event) {
20314 case NB_EV_VALIDATE:
20315 case NB_EV_PREPARE:
20316 case NB_EV_ABORT:
20317 case NB_EV_APPLY:
20318 /* TODO: implement me. */
20319 break;
20320 }
20321
20322 return NB_OK;
20323 }
20324
20325 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
20326 struct nb_cb_destroy_args *args)
20327 {
20328 switch (args->event) {
20329 case NB_EV_VALIDATE:
20330 case NB_EV_PREPARE:
20331 case NB_EV_ABORT:
20332 case NB_EV_APPLY:
20333 /* TODO: implement me. */
20334 break;
20335 }
20336
20337 return NB_OK;
20338 }
20339
20340 /*
20341 * XPath:
20342 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/replace-peer-as
20343 */
20344 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_replace_peer_as_modify(
20345 struct nb_cb_modify_args *args)
20346 {
20347 switch (args->event) {
20348 case NB_EV_VALIDATE:
20349 case NB_EV_PREPARE:
20350 case NB_EV_ABORT:
20351 return NB_OK;
20352 case NB_EV_APPLY:
20353 return bgp_neighbor_afi_safi_flag_modify(
20354 args, PEER_FLAG_AS_OVERRIDE,
20355 yang_dnode_get_bool(args->dnode, NULL));
20356
20357 break;
20358 }
20359
20360 return NB_OK;
20361 }
20362
20363 /*
20364 * XPath:
20365 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/as-path-unchanged
20366 */
20367 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
20368 struct nb_cb_modify_args *args)
20369 {
20370 switch (args->event) {
20371 case NB_EV_VALIDATE:
20372 case NB_EV_PREPARE:
20373 case NB_EV_ABORT:
20374 return NB_OK;
20375 case NB_EV_APPLY:
20376 return bgp_neighbor_afi_safi_flag_modify(
20377 args, PEER_FLAG_AS_PATH_UNCHANGED,
20378 yang_dnode_get_bool(args->dnode, NULL));
20379
20380 break;
20381 }
20382
20383 return NB_OK;
20384 }
20385
20386 /*
20387 * XPath:
20388 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/next-hop-unchanged
20389 */
20390 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
20391 struct nb_cb_modify_args *args)
20392 {
20393 switch (args->event) {
20394 case NB_EV_VALIDATE:
20395 case NB_EV_PREPARE:
20396 case NB_EV_ABORT:
20397 return NB_OK;
20398 case NB_EV_APPLY:
20399 return bgp_neighbor_afi_safi_flag_modify(
20400 args, PEER_FLAG_NEXTHOP_UNCHANGED,
20401 yang_dnode_get_bool(args->dnode, NULL));
20402
20403 break;
20404 }
20405
20406 return NB_OK;
20407 }
20408
20409 /*
20410 * XPath:
20411 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/med-unchanged
20412 */
20413 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_med_unchanged_modify(
20414 struct nb_cb_modify_args *args)
20415 {
20416 switch (args->event) {
20417 case NB_EV_VALIDATE:
20418 case NB_EV_PREPARE:
20419 case NB_EV_ABORT:
20420 return NB_OK;
20421 case NB_EV_APPLY:
20422 return bgp_neighbor_afi_safi_flag_modify(
20423 args, PEER_FLAG_MED_UNCHANGED,
20424 yang_dnode_get_bool(args->dnode, NULL));
20425
20426 break;
20427 }
20428
20429 return NB_OK;
20430 }
20431
20432 /*
20433 * XPath:
20434 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list
20435 */
20436 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create(
20437 struct nb_cb_create_args *args)
20438 {
20439 switch (args->event) {
20440 case NB_EV_VALIDATE:
20441 case NB_EV_PREPARE:
20442 case NB_EV_ABORT:
20443 case NB_EV_APPLY:
20444 /* TODO: implement me. */
20445 break;
20446 }
20447
20448 return NB_OK;
20449 }
20450
20451 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy(
20452 struct nb_cb_destroy_args *args)
20453 {
20454 switch (args->event) {
20455 case NB_EV_VALIDATE:
20456 case NB_EV_PREPARE:
20457 case NB_EV_ABORT:
20458 return NB_OK;
20459 case NB_EV_APPLY:
20460 return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
20461 }
20462
20463 return NB_OK;
20464 }
20465
20466 /*
20467 * XPath:
20468 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/max-prefixes
20469 */
20470 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
20471 struct nb_cb_modify_args *args)
20472 {
20473 switch (args->event) {
20474 case NB_EV_VALIDATE:
20475 case NB_EV_PREPARE:
20476 case NB_EV_ABORT:
20477 case NB_EV_APPLY:
20478 /* TODO: implement me. */
20479 break;
20480 }
20481
20482 return NB_OK;
20483 }
20484
20485 /*
20486 * XPath:
20487 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check
20488 */
20489 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
20490 struct nb_cb_modify_args *args)
20491 {
20492 switch (args->event) {
20493 case NB_EV_VALIDATE:
20494 case NB_EV_PREPARE:
20495 case NB_EV_ABORT:
20496 case NB_EV_APPLY:
20497 /* TODO: implement me. */
20498 break;
20499 }
20500
20501 return NB_OK;
20502 }
20503
20504 /*
20505 * XPath:
20506 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only
20507 */
20508 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
20509 struct nb_cb_modify_args *args)
20510 {
20511 switch (args->event) {
20512 case NB_EV_VALIDATE:
20513 case NB_EV_PREPARE:
20514 case NB_EV_ABORT:
20515 case NB_EV_APPLY:
20516 /* TODO: implement me. */
20517 break;
20518 }
20519
20520 return NB_OK;
20521 }
20522
20523 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
20524 struct nb_cb_destroy_args *args)
20525 {
20526 switch (args->event) {
20527 case NB_EV_VALIDATE:
20528 case NB_EV_PREPARE:
20529 case NB_EV_ABORT:
20530 case NB_EV_APPLY:
20531 /* TODO: implement me. */
20532 break;
20533 }
20534
20535 return NB_OK;
20536 }
20537
20538 /*
20539 * XPath:
20540 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer
20541 */
20542 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
20543 struct nb_cb_modify_args *args)
20544 {
20545 switch (args->event) {
20546 case NB_EV_VALIDATE:
20547 case NB_EV_PREPARE:
20548 case NB_EV_ABORT:
20549 case NB_EV_APPLY:
20550 /* TODO: implement me. */
20551 break;
20552 }
20553
20554 return NB_OK;
20555 }
20556
20557 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
20558 struct nb_cb_destroy_args *args)
20559 {
20560 switch (args->event) {
20561 case NB_EV_VALIDATE:
20562 case NB_EV_PREPARE:
20563 case NB_EV_ABORT:
20564 case NB_EV_APPLY:
20565 /* TODO: implement me. */
20566 break;
20567 }
20568
20569 return NB_OK;
20570 }
20571
20572 /*
20573 * XPath:
20574 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
20575 */
20576 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
20577 struct nb_cb_modify_args *args)
20578 {
20579 switch (args->event) {
20580 case NB_EV_VALIDATE:
20581 case NB_EV_PREPARE:
20582 case NB_EV_ABORT:
20583 case NB_EV_APPLY:
20584 /* TODO: implement me. */
20585 break;
20586 }
20587
20588 return NB_OK;
20589 }
20590
20591 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
20592 struct nb_cb_destroy_args *args)
20593 {
20594 switch (args->event) {
20595 case NB_EV_VALIDATE:
20596 case NB_EV_PREPARE:
20597 case NB_EV_ABORT:
20598 case NB_EV_APPLY:
20599 /* TODO: implement me. */
20600 break;
20601 }
20602
20603 return NB_OK;
20604 }
20605
20606 /*
20607 * XPath:
20608 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
20609 */
20610 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
20611 struct nb_cb_modify_args *args)
20612 {
20613 switch (args->event) {
20614 case NB_EV_VALIDATE:
20615 case NB_EV_PREPARE:
20616 case NB_EV_ABORT:
20617 case NB_EV_APPLY:
20618 /* TODO: implement me. */
20619 break;
20620 }
20621
20622 return NB_OK;
20623 }
20624
20625 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
20626 struct nb_cb_destroy_args *args)
20627 {
20628 switch (args->event) {
20629 case NB_EV_VALIDATE:
20630 case NB_EV_PREPARE:
20631 case NB_EV_ABORT:
20632 case NB_EV_APPLY:
20633 /* TODO: implement me. */
20634 break;
20635 }
20636
20637 return NB_OK;
20638 }
20639
20640 /*
20641 * XPath:
20642 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer
20643 */
20644 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
20645 struct nb_cb_modify_args *args)
20646 {
20647 switch (args->event) {
20648 case NB_EV_VALIDATE:
20649 case NB_EV_PREPARE:
20650 case NB_EV_ABORT:
20651 case NB_EV_APPLY:
20652 /* TODO: implement me. */
20653 break;
20654 }
20655
20656 return NB_OK;
20657 }
20658
20659 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
20660 struct nb_cb_destroy_args *args)
20661 {
20662 switch (args->event) {
20663 case NB_EV_VALIDATE:
20664 case NB_EV_PREPARE:
20665 case NB_EV_ABORT:
20666 case NB_EV_APPLY:
20667 /* TODO: implement me. */
20668 break;
20669 }
20670
20671 return NB_OK;
20672 }
20673
20674 /*
20675 * XPath:
20676 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
20677 */
20678 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
20679 struct nb_cb_modify_args *args)
20680 {
20681 switch (args->event) {
20682 case NB_EV_VALIDATE:
20683 case NB_EV_PREPARE:
20684 case NB_EV_ABORT:
20685 case NB_EV_APPLY:
20686 /* TODO: implement me. */
20687 break;
20688 }
20689
20690 return NB_OK;
20691 }
20692
20693 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
20694 struct nb_cb_destroy_args *args)
20695 {
20696 switch (args->event) {
20697 case NB_EV_VALIDATE:
20698 case NB_EV_PREPARE:
20699 case NB_EV_ABORT:
20700 case NB_EV_APPLY:
20701 /* TODO: implement me. */
20702 break;
20703 }
20704
20705 return NB_OK;
20706 }
20707
20708 /*
20709 * XPath:
20710 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only
20711 */
20712 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
20713 struct nb_cb_modify_args *args)
20714 {
20715 switch (args->event) {
20716 case NB_EV_VALIDATE:
20717 case NB_EV_PREPARE:
20718 case NB_EV_ABORT:
20719 case NB_EV_APPLY:
20720 /* TODO: implement me. */
20721 break;
20722 }
20723
20724 return NB_OK;
20725 }
20726
20727 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
20728 struct nb_cb_destroy_args *args)
20729 {
20730 switch (args->event) {
20731 case NB_EV_VALIDATE:
20732 case NB_EV_PREPARE:
20733 case NB_EV_ABORT:
20734 case NB_EV_APPLY:
20735 /* TODO: implement me. */
20736 break;
20737 }
20738
20739 return NB_OK;
20740 }
20741
20742 /*
20743 * XPath:
20744 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self
20745 */
20746 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify(
20747 struct nb_cb_modify_args *args)
20748 {
20749 switch (args->event) {
20750 case NB_EV_VALIDATE:
20751 case NB_EV_PREPARE:
20752 case NB_EV_ABORT:
20753 return NB_OK;
20754 case NB_EV_APPLY:
20755 return bgp_neighbor_afi_safi_flag_modify(
20756 args, PEER_FLAG_NEXTHOP_SELF,
20757 yang_dnode_get_bool(args->dnode, NULL));
20758
20759 break;
20760 }
20761
20762 return NB_OK;
20763 }
20764
20765 /*
20766 * XPath:
20767 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self-force
20768 */
20769 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
20770 struct nb_cb_modify_args *args)
20771 {
20772 switch (args->event) {
20773 case NB_EV_VALIDATE:
20774 case NB_EV_PREPARE:
20775 case NB_EV_ABORT:
20776 return NB_OK;
20777 case NB_EV_APPLY:
20778 return bgp_neighbor_afi_safi_flag_modify(
20779 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
20780 yang_dnode_get_bool(args->dnode, NULL));
20781
20782 break;
20783 }
20784
20785 return NB_OK;
20786 }
20787
20788 /*
20789 * XPath:
20790 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all
20791 */
20792 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_modify(
20793 struct nb_cb_modify_args *args)
20794 {
20795 switch (args->event) {
20796 case NB_EV_VALIDATE:
20797 case NB_EV_PREPARE:
20798 case NB_EV_ABORT:
20799 return NB_OK;
20800 case NB_EV_APPLY:
20801 return bgp_neighbor_afi_safi_flag_modify(
20802 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
20803 yang_dnode_get_bool(args->dnode, NULL));
20804
20805 break;
20806 }
20807
20808 return NB_OK;
20809 }
20810
20811 /*
20812 * XPath:
20813 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all-replace
20814 */
20815 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
20816 struct nb_cb_modify_args *args)
20817 {
20818 switch (args->event) {
20819 case NB_EV_VALIDATE:
20820 case NB_EV_PREPARE:
20821 case NB_EV_ABORT:
20822 return NB_OK;
20823 case NB_EV_APPLY:
20824 return bgp_neighbor_afi_safi_flag_modify(
20825 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
20826 yang_dnode_get_bool(args->dnode, NULL));
20827
20828 break;
20829 }
20830
20831 return NB_OK;
20832 }
20833
20834 /*
20835 * XPath:
20836 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as
20837 */
20838 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_modify(
20839 struct nb_cb_modify_args *args)
20840 {
20841 switch (args->event) {
20842 case NB_EV_VALIDATE:
20843 case NB_EV_PREPARE:
20844 case NB_EV_ABORT:
20845 return NB_OK;
20846 case NB_EV_APPLY:
20847 return bgp_neighbor_afi_safi_flag_modify(
20848 args, PEER_FLAG_REMOVE_PRIVATE_AS,
20849 yang_dnode_get_bool(args->dnode, NULL));
20850
20851 break;
20852 }
20853
20854 return NB_OK;
20855 }
20856
20857 /*
20858 * XPath:
20859 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-replace
20860 */
20861 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_replace_modify(
20862 struct nb_cb_modify_args *args)
20863 {
20864 switch (args->event) {
20865 case NB_EV_VALIDATE:
20866 case NB_EV_PREPARE:
20867 case NB_EV_ABORT:
20868 return NB_OK;
20869 case NB_EV_APPLY:
20870 return bgp_neighbor_afi_safi_flag_modify(
20871 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
20872 yang_dnode_get_bool(args->dnode, NULL));
20873
20874 break;
20875 }
20876
20877 return NB_OK;
20878 }
20879
20880 /*
20881 * XPath:
20882 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-reflector/route-reflector-client
20883 */
20884 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector_route_reflector_client_modify(
20885 struct nb_cb_modify_args *args)
20886 {
20887 switch (args->event) {
20888 case NB_EV_VALIDATE:
20889 case NB_EV_PREPARE:
20890 case NB_EV_ABORT:
20891 return NB_OK;
20892 case NB_EV_APPLY:
20893 return bgp_neighbor_afi_safi_flag_modify(
20894 args, PEER_FLAG_REFLECTOR_CLIENT,
20895 yang_dnode_get_bool(args->dnode, NULL));
20896
20897 break;
20898 }
20899
20900 return NB_OK;
20901 }
20902
20903 /*
20904 * XPath:
20905 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-server/route-server-client
20906 */
20907 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_route_server_client_modify(
20908 struct nb_cb_modify_args *args)
20909 {
20910 switch (args->event) {
20911 case NB_EV_VALIDATE:
20912 case NB_EV_PREPARE:
20913 case NB_EV_ABORT:
20914 return NB_OK;
20915 case NB_EV_APPLY:
20916 return bgp_neighbor_afi_safi_flag_modify(
20917 args, PEER_FLAG_RSERVER_CLIENT,
20918 yang_dnode_get_bool(args->dnode, NULL));
20919
20920 break;
20921 }
20922
20923 return NB_OK;
20924 }
20925
20926 /*
20927 * XPath:
20928 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-community
20929 */
20930 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_community_modify(
20931 struct nb_cb_modify_args *args)
20932 {
20933 switch (args->event) {
20934 case NB_EV_VALIDATE:
20935 case NB_EV_PREPARE:
20936 case NB_EV_ABORT:
20937 return NB_OK;
20938 case NB_EV_APPLY:
20939 return bgp_neighbor_afi_safi_flag_modify(
20940 args, PEER_FLAG_SEND_COMMUNITY,
20941 yang_dnode_get_bool(args->dnode, NULL));
20942
20943 break;
20944 }
20945
20946 return NB_OK;
20947 }
20948
20949 /*
20950 * XPath:
20951 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-ext-community
20952 */
20953 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_ext_community_modify(
20954 struct nb_cb_modify_args *args)
20955 {
20956 switch (args->event) {
20957 case NB_EV_VALIDATE:
20958 case NB_EV_PREPARE:
20959 case NB_EV_ABORT:
20960 return NB_OK;
20961 case NB_EV_APPLY:
20962 return bgp_neighbor_afi_safi_flag_modify(
20963 args, PEER_FLAG_SEND_EXT_COMMUNITY,
20964 yang_dnode_get_bool(args->dnode, NULL));
20965
20966 break;
20967 }
20968
20969 return NB_OK;
20970 }
20971
20972 /*
20973 * XPath:
20974 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-large-community
20975 */
20976 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_large_community_modify(
20977 struct nb_cb_modify_args *args)
20978 {
20979 switch (args->event) {
20980 case NB_EV_VALIDATE:
20981 case NB_EV_PREPARE:
20982 case NB_EV_ABORT:
20983 return NB_OK;
20984 case NB_EV_APPLY:
20985 return bgp_neighbor_afi_safi_flag_modify(
20986 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
20987 yang_dnode_get_bool(args->dnode, NULL));
20988
20989 break;
20990 }
20991
20992 return NB_OK;
20993 }
20994
20995 /*
20996 * XPath:
20997 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/soft-reconfiguration
20998 */
20999 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfiguration_modify(
21000 struct nb_cb_modify_args *args)
21001 {
21002 switch (args->event) {
21003 case NB_EV_VALIDATE:
21004 case NB_EV_PREPARE:
21005 case NB_EV_ABORT:
21006 return NB_OK;
21007 case NB_EV_APPLY:
21008 return bgp_neighbor_afi_safi_flag_modify(
21009 args, PEER_FLAG_SOFT_RECONFIG,
21010 yang_dnode_get_bool(args->dnode, NULL));
21011
21012 break;
21013 }
21014
21015 return NB_OK;
21016 }
21017
21018 /*
21019 * XPath:
21020 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/weight/weight-attribute
21021 */
21022 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_modify(
21023 struct nb_cb_modify_args *args)
21024 {
21025 switch (args->event) {
21026 case NB_EV_VALIDATE:
21027 case NB_EV_PREPARE:
21028 case NB_EV_ABORT:
21029 return NB_OK;
21030 case NB_EV_APPLY:
21031 return bgp_neighbor_afi_safi_weight_modify(args);
21032
21033 break;
21034 }
21035
21036 return NB_OK;
21037 }
21038
21039 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_destroy(
21040 struct nb_cb_destroy_args *args)
21041 {
21042 switch (args->event) {
21043 case NB_EV_VALIDATE:
21044 case NB_EV_PREPARE:
21045 case NB_EV_ABORT:
21046 return NB_OK;
21047 case NB_EV_APPLY:
21048 return bgp_neighbor_afi_safi_weight_destroy(args);
21049
21050 break;
21051 }
21052
21053 return NB_OK;
21054 }
21055
21056 /*
21057 * XPath:
21058 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/add-paths/path-type
21059 */
21060 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_add_paths_path_type_modify(
21061 struct nb_cb_modify_args *args)
21062 {
21063 switch (args->event) {
21064 case NB_EV_VALIDATE:
21065 case NB_EV_PREPARE:
21066 case NB_EV_ABORT:
21067 case NB_EV_APPLY:
21068 /* TODO: implement me. */
21069 break;
21070 }
21071
21072 return NB_OK;
21073 }
21074
21075 /*
21076 * XPath:
21077 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-as
21078 */
21079 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_modify(
21080 struct nb_cb_modify_args *args)
21081 {
21082 switch (args->event) {
21083 case NB_EV_VALIDATE:
21084 case NB_EV_PREPARE:
21085 case NB_EV_ABORT:
21086 case NB_EV_APPLY:
21087 /* TODO: implement me. */
21088 break;
21089 }
21090
21091 return NB_OK;
21092 }
21093
21094 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_destroy(
21095 struct nb_cb_destroy_args *args)
21096 {
21097 switch (args->event) {
21098 case NB_EV_VALIDATE:
21099 case NB_EV_PREPARE:
21100 case NB_EV_ABORT:
21101 case NB_EV_APPLY:
21102 /* TODO: implement me. */
21103 break;
21104 }
21105
21106 return NB_OK;
21107 }
21108
21109 /*
21110 * XPath:
21111 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-origin-as
21112 */
21113 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
21114 struct nb_cb_modify_args *args)
21115 {
21116 switch (args->event) {
21117 case NB_EV_VALIDATE:
21118 case NB_EV_PREPARE:
21119 case NB_EV_ABORT:
21120 case NB_EV_APPLY:
21121 /* TODO: implement me. */
21122 break;
21123 }
21124
21125 return NB_OK;
21126 }
21127
21128 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
21129 struct nb_cb_destroy_args *args)
21130 {
21131 switch (args->event) {
21132 case NB_EV_VALIDATE:
21133 case NB_EV_PREPARE:
21134 case NB_EV_ABORT:
21135 case NB_EV_APPLY:
21136 /* TODO: implement me. */
21137 break;
21138 }
21139
21140 return NB_OK;
21141 }
21142
21143 /*
21144 * XPath:
21145 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/replace-peer-as
21146 */
21147 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_replace_peer_as_modify(
21148 struct nb_cb_modify_args *args)
21149 {
21150 switch (args->event) {
21151 case NB_EV_VALIDATE:
21152 case NB_EV_PREPARE:
21153 case NB_EV_ABORT:
21154 return NB_OK;
21155 case NB_EV_APPLY:
21156 return bgp_neighbor_afi_safi_flag_modify(
21157 args, PEER_FLAG_AS_OVERRIDE,
21158 yang_dnode_get_bool(args->dnode, NULL));
21159
21160 break;
21161 }
21162
21163 return NB_OK;
21164 }
21165
21166 /*
21167 * XPath:
21168 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/as-path-unchanged
21169 */
21170 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
21171 struct nb_cb_modify_args *args)
21172 {
21173 switch (args->event) {
21174 case NB_EV_VALIDATE:
21175 case NB_EV_PREPARE:
21176 case NB_EV_ABORT:
21177 return NB_OK;
21178 case NB_EV_APPLY:
21179 return bgp_neighbor_afi_safi_flag_modify(
21180 args, PEER_FLAG_AS_PATH_UNCHANGED,
21181 yang_dnode_get_bool(args->dnode, NULL));
21182
21183 break;
21184 }
21185
21186 return NB_OK;
21187 }
21188
21189 /*
21190 * XPath:
21191 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/next-hop-unchanged
21192 */
21193 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
21194 struct nb_cb_modify_args *args)
21195 {
21196 switch (args->event) {
21197 case NB_EV_VALIDATE:
21198 case NB_EV_PREPARE:
21199 case NB_EV_ABORT:
21200 return NB_OK;
21201 case NB_EV_APPLY:
21202 return bgp_neighbor_afi_safi_flag_modify(
21203 args, PEER_FLAG_NEXTHOP_UNCHANGED,
21204 yang_dnode_get_bool(args->dnode, NULL));
21205
21206 break;
21207 }
21208
21209 return NB_OK;
21210 }
21211
21212 /*
21213 * XPath:
21214 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/med-unchanged
21215 */
21216 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_med_unchanged_modify(
21217 struct nb_cb_modify_args *args)
21218 {
21219 switch (args->event) {
21220 case NB_EV_VALIDATE:
21221 case NB_EV_PREPARE:
21222 case NB_EV_ABORT:
21223 return NB_OK;
21224 case NB_EV_APPLY:
21225 return bgp_neighbor_afi_safi_flag_modify(
21226 args, PEER_FLAG_MED_UNCHANGED,
21227 yang_dnode_get_bool(args->dnode, NULL));
21228
21229 break;
21230 }
21231
21232 return NB_OK;
21233 }
21234
21235 /*
21236 * XPath:
21237 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list
21238 */
21239 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create(
21240 struct nb_cb_create_args *args)
21241 {
21242 switch (args->event) {
21243 case NB_EV_VALIDATE:
21244 case NB_EV_PREPARE:
21245 case NB_EV_ABORT:
21246 case NB_EV_APPLY:
21247 /* TODO: implement me. */
21248 break;
21249 }
21250
21251 return NB_OK;
21252 }
21253
21254 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy(
21255 struct nb_cb_destroy_args *args)
21256 {
21257 switch (args->event) {
21258 case NB_EV_VALIDATE:
21259 case NB_EV_PREPARE:
21260 case NB_EV_ABORT:
21261 return NB_OK;
21262 case NB_EV_APPLY:
21263 return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
21264 }
21265
21266 return NB_OK;
21267 }
21268
21269 /*
21270 * XPath:
21271 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/max-prefixes
21272 */
21273 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
21274 struct nb_cb_modify_args *args)
21275 {
21276 switch (args->event) {
21277 case NB_EV_VALIDATE:
21278 case NB_EV_PREPARE:
21279 case NB_EV_ABORT:
21280 case NB_EV_APPLY:
21281 /* TODO: implement me. */
21282 break;
21283 }
21284
21285 return NB_OK;
21286 }
21287
21288 /*
21289 * XPath:
21290 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check
21291 */
21292 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
21293 struct nb_cb_modify_args *args)
21294 {
21295 switch (args->event) {
21296 case NB_EV_VALIDATE:
21297 case NB_EV_PREPARE:
21298 case NB_EV_ABORT:
21299 case NB_EV_APPLY:
21300 /* TODO: implement me. */
21301 break;
21302 }
21303
21304 return NB_OK;
21305 }
21306
21307 /*
21308 * XPath:
21309 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only
21310 */
21311 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
21312 struct nb_cb_modify_args *args)
21313 {
21314 switch (args->event) {
21315 case NB_EV_VALIDATE:
21316 case NB_EV_PREPARE:
21317 case NB_EV_ABORT:
21318 case NB_EV_APPLY:
21319 /* TODO: implement me. */
21320 break;
21321 }
21322
21323 return NB_OK;
21324 }
21325
21326 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
21327 struct nb_cb_destroy_args *args)
21328 {
21329 switch (args->event) {
21330 case NB_EV_VALIDATE:
21331 case NB_EV_PREPARE:
21332 case NB_EV_ABORT:
21333 case NB_EV_APPLY:
21334 /* TODO: implement me. */
21335 break;
21336 }
21337
21338 return NB_OK;
21339 }
21340
21341 /*
21342 * XPath:
21343 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer
21344 */
21345 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
21346 struct nb_cb_modify_args *args)
21347 {
21348 switch (args->event) {
21349 case NB_EV_VALIDATE:
21350 case NB_EV_PREPARE:
21351 case NB_EV_ABORT:
21352 case NB_EV_APPLY:
21353 /* TODO: implement me. */
21354 break;
21355 }
21356
21357 return NB_OK;
21358 }
21359
21360 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
21361 struct nb_cb_destroy_args *args)
21362 {
21363 switch (args->event) {
21364 case NB_EV_VALIDATE:
21365 case NB_EV_PREPARE:
21366 case NB_EV_ABORT:
21367 case NB_EV_APPLY:
21368 /* TODO: implement me. */
21369 break;
21370 }
21371
21372 return NB_OK;
21373 }
21374
21375 /*
21376 * XPath:
21377 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
21378 */
21379 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
21380 struct nb_cb_modify_args *args)
21381 {
21382 switch (args->event) {
21383 case NB_EV_VALIDATE:
21384 case NB_EV_PREPARE:
21385 case NB_EV_ABORT:
21386 case NB_EV_APPLY:
21387 /* TODO: implement me. */
21388 break;
21389 }
21390
21391 return NB_OK;
21392 }
21393
21394 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
21395 struct nb_cb_destroy_args *args)
21396 {
21397 switch (args->event) {
21398 case NB_EV_VALIDATE:
21399 case NB_EV_PREPARE:
21400 case NB_EV_ABORT:
21401 case NB_EV_APPLY:
21402 /* TODO: implement me. */
21403 break;
21404 }
21405
21406 return NB_OK;
21407 }
21408
21409 /*
21410 * XPath:
21411 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
21412 */
21413 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
21414 struct nb_cb_modify_args *args)
21415 {
21416 switch (args->event) {
21417 case NB_EV_VALIDATE:
21418 case NB_EV_PREPARE:
21419 case NB_EV_ABORT:
21420 case NB_EV_APPLY:
21421 /* TODO: implement me. */
21422 break;
21423 }
21424
21425 return NB_OK;
21426 }
21427
21428 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
21429 struct nb_cb_destroy_args *args)
21430 {
21431 switch (args->event) {
21432 case NB_EV_VALIDATE:
21433 case NB_EV_PREPARE:
21434 case NB_EV_ABORT:
21435 case NB_EV_APPLY:
21436 /* TODO: implement me. */
21437 break;
21438 }
21439
21440 return NB_OK;
21441 }
21442
21443 /*
21444 * XPath:
21445 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer
21446 */
21447 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
21448 struct nb_cb_modify_args *args)
21449 {
21450 switch (args->event) {
21451 case NB_EV_VALIDATE:
21452 case NB_EV_PREPARE:
21453 case NB_EV_ABORT:
21454 case NB_EV_APPLY:
21455 /* TODO: implement me. */
21456 break;
21457 }
21458
21459 return NB_OK;
21460 }
21461
21462 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
21463 struct nb_cb_destroy_args *args)
21464 {
21465 switch (args->event) {
21466 case NB_EV_VALIDATE:
21467 case NB_EV_PREPARE:
21468 case NB_EV_ABORT:
21469 case NB_EV_APPLY:
21470 /* TODO: implement me. */
21471 break;
21472 }
21473
21474 return NB_OK;
21475 }
21476
21477 /*
21478 * XPath:
21479 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
21480 */
21481 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
21482 struct nb_cb_modify_args *args)
21483 {
21484 switch (args->event) {
21485 case NB_EV_VALIDATE:
21486 case NB_EV_PREPARE:
21487 case NB_EV_ABORT:
21488 case NB_EV_APPLY:
21489 /* TODO: implement me. */
21490 break;
21491 }
21492
21493 return NB_OK;
21494 }
21495
21496 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
21497 struct nb_cb_destroy_args *args)
21498 {
21499 switch (args->event) {
21500 case NB_EV_VALIDATE:
21501 case NB_EV_PREPARE:
21502 case NB_EV_ABORT:
21503 case NB_EV_APPLY:
21504 /* TODO: implement me. */
21505 break;
21506 }
21507
21508 return NB_OK;
21509 }
21510
21511 /*
21512 * XPath:
21513 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only
21514 */
21515 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
21516 struct nb_cb_modify_args *args)
21517 {
21518 switch (args->event) {
21519 case NB_EV_VALIDATE:
21520 case NB_EV_PREPARE:
21521 case NB_EV_ABORT:
21522 case NB_EV_APPLY:
21523 /* TODO: implement me. */
21524 break;
21525 }
21526
21527 return NB_OK;
21528 }
21529
21530 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
21531 struct nb_cb_destroy_args *args)
21532 {
21533 switch (args->event) {
21534 case NB_EV_VALIDATE:
21535 case NB_EV_PREPARE:
21536 case NB_EV_ABORT:
21537 case NB_EV_APPLY:
21538 /* TODO: implement me. */
21539 break;
21540 }
21541
21542 return NB_OK;
21543 }
21544
21545 /*
21546 * XPath:
21547 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self
21548 */
21549 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify(
21550 struct nb_cb_modify_args *args)
21551 {
21552 switch (args->event) {
21553 case NB_EV_VALIDATE:
21554 case NB_EV_PREPARE:
21555 case NB_EV_ABORT:
21556 return NB_OK;
21557 case NB_EV_APPLY:
21558 return bgp_neighbor_afi_safi_flag_modify(
21559 args, PEER_FLAG_NEXTHOP_SELF,
21560 yang_dnode_get_bool(args->dnode, NULL));
21561
21562 break;
21563 }
21564
21565 return NB_OK;
21566 }
21567
21568 /*
21569 * XPath:
21570 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self-force
21571 */
21572 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
21573 struct nb_cb_modify_args *args)
21574 {
21575 switch (args->event) {
21576 case NB_EV_VALIDATE:
21577 case NB_EV_PREPARE:
21578 case NB_EV_ABORT:
21579 return NB_OK;
21580 case NB_EV_APPLY:
21581 return bgp_neighbor_afi_safi_flag_modify(
21582 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
21583 yang_dnode_get_bool(args->dnode, NULL));
21584
21585 break;
21586 }
21587
21588 return NB_OK;
21589 }
21590
21591 /*
21592 * XPath:
21593 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all
21594 */
21595 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_modify(
21596 struct nb_cb_modify_args *args)
21597 {
21598 switch (args->event) {
21599 case NB_EV_VALIDATE:
21600 case NB_EV_PREPARE:
21601 case NB_EV_ABORT:
21602 return NB_OK;
21603 case NB_EV_APPLY:
21604 return bgp_neighbor_afi_safi_flag_modify(
21605 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
21606 yang_dnode_get_bool(args->dnode, NULL));
21607
21608 break;
21609 }
21610
21611 return NB_OK;
21612 }
21613
21614 /*
21615 * XPath:
21616 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all-replace
21617 */
21618 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
21619 struct nb_cb_modify_args *args)
21620 {
21621 switch (args->event) {
21622 case NB_EV_VALIDATE:
21623 case NB_EV_PREPARE:
21624 case NB_EV_ABORT:
21625 return NB_OK;
21626 case NB_EV_APPLY:
21627 return bgp_neighbor_afi_safi_flag_modify(
21628 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
21629 yang_dnode_get_bool(args->dnode, NULL));
21630
21631 break;
21632 }
21633
21634 return NB_OK;
21635 }
21636
21637 /*
21638 * XPath:
21639 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as
21640 */
21641 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_modify(
21642 struct nb_cb_modify_args *args)
21643 {
21644 switch (args->event) {
21645 case NB_EV_VALIDATE:
21646 case NB_EV_PREPARE:
21647 case NB_EV_ABORT:
21648 return NB_OK;
21649 case NB_EV_APPLY:
21650 return bgp_neighbor_afi_safi_flag_modify(
21651 args, PEER_FLAG_REMOVE_PRIVATE_AS,
21652 yang_dnode_get_bool(args->dnode, NULL));
21653
21654 break;
21655 }
21656
21657 return NB_OK;
21658 }
21659
21660 /*
21661 * XPath:
21662 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-replace
21663 */
21664 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_replace_modify(
21665 struct nb_cb_modify_args *args)
21666 {
21667 switch (args->event) {
21668 case NB_EV_VALIDATE:
21669 case NB_EV_PREPARE:
21670 case NB_EV_ABORT:
21671 return NB_OK;
21672 case NB_EV_APPLY:
21673 return bgp_neighbor_afi_safi_flag_modify(
21674 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
21675 yang_dnode_get_bool(args->dnode, NULL));
21676
21677 break;
21678 }
21679
21680 return NB_OK;
21681 }
21682
21683 /*
21684 * XPath:
21685 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-reflector/route-reflector-client
21686 */
21687 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector_route_reflector_client_modify(
21688 struct nb_cb_modify_args *args)
21689 {
21690 switch (args->event) {
21691 case NB_EV_VALIDATE:
21692 case NB_EV_PREPARE:
21693 case NB_EV_ABORT:
21694 return NB_OK;
21695 case NB_EV_APPLY:
21696 return bgp_neighbor_afi_safi_flag_modify(
21697 args, PEER_FLAG_REFLECTOR_CLIENT,
21698 yang_dnode_get_bool(args->dnode, NULL));
21699
21700 break;
21701 }
21702
21703 return NB_OK;
21704 }
21705
21706 /*
21707 * XPath:
21708 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-server/route-server-client
21709 */
21710 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_route_server_client_modify(
21711 struct nb_cb_modify_args *args)
21712 {
21713 switch (args->event) {
21714 case NB_EV_VALIDATE:
21715 case NB_EV_PREPARE:
21716 case NB_EV_ABORT:
21717 return NB_OK;
21718 case NB_EV_APPLY:
21719 return bgp_neighbor_afi_safi_flag_modify(
21720 args, PEER_FLAG_RSERVER_CLIENT,
21721 yang_dnode_get_bool(args->dnode, NULL));
21722
21723 break;
21724 }
21725
21726 return NB_OK;
21727 }
21728
21729 /*
21730 * XPath:
21731 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-community
21732 */
21733 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_community_modify(
21734 struct nb_cb_modify_args *args)
21735 {
21736 switch (args->event) {
21737 case NB_EV_VALIDATE:
21738 case NB_EV_PREPARE:
21739 case NB_EV_ABORT:
21740 return NB_OK;
21741 case NB_EV_APPLY:
21742 return bgp_neighbor_afi_safi_flag_modify(
21743 args, PEER_FLAG_SEND_COMMUNITY,
21744 yang_dnode_get_bool(args->dnode, NULL));
21745
21746 break;
21747 }
21748
21749 return NB_OK;
21750 }
21751
21752 /*
21753 * XPath:
21754 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-ext-community
21755 */
21756 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_ext_community_modify(
21757 struct nb_cb_modify_args *args)
21758 {
21759 switch (args->event) {
21760 case NB_EV_VALIDATE:
21761 case NB_EV_PREPARE:
21762 case NB_EV_ABORT:
21763 return NB_OK;
21764 case NB_EV_APPLY:
21765 return bgp_neighbor_afi_safi_flag_modify(
21766 args, PEER_FLAG_SEND_EXT_COMMUNITY,
21767 yang_dnode_get_bool(args->dnode, NULL));
21768
21769 break;
21770 }
21771
21772 return NB_OK;
21773 }
21774
21775 /*
21776 * XPath:
21777 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-large-community
21778 */
21779 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_large_community_modify(
21780 struct nb_cb_modify_args *args)
21781 {
21782 switch (args->event) {
21783 case NB_EV_VALIDATE:
21784 case NB_EV_PREPARE:
21785 case NB_EV_ABORT:
21786 return NB_OK;
21787 case NB_EV_APPLY:
21788 return bgp_neighbor_afi_safi_flag_modify(
21789 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
21790 yang_dnode_get_bool(args->dnode, NULL));
21791
21792 break;
21793 }
21794
21795 return NB_OK;
21796 }
21797
21798 /*
21799 * XPath:
21800 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/soft-reconfiguration
21801 */
21802 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfiguration_modify(
21803 struct nb_cb_modify_args *args)
21804 {
21805 switch (args->event) {
21806 case NB_EV_VALIDATE:
21807 case NB_EV_PREPARE:
21808 case NB_EV_ABORT:
21809 return NB_OK;
21810 case NB_EV_APPLY:
21811 return bgp_neighbor_afi_safi_flag_modify(
21812 args, PEER_FLAG_SOFT_RECONFIG,
21813 yang_dnode_get_bool(args->dnode, NULL));
21814
21815 break;
21816 }
21817
21818 return NB_OK;
21819 }
21820
21821 /*
21822 * XPath:
21823 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/weight/weight-attribute
21824 */
21825 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_modify(
21826 struct nb_cb_modify_args *args)
21827 {
21828 switch (args->event) {
21829 case NB_EV_VALIDATE:
21830 case NB_EV_PREPARE:
21831 case NB_EV_ABORT:
21832 return NB_OK;
21833 case NB_EV_APPLY:
21834 return bgp_neighbor_afi_safi_weight_modify(args);
21835
21836 break;
21837 }
21838
21839 return NB_OK;
21840 }
21841
21842 int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_destroy(
21843 struct nb_cb_destroy_args *args)
21844 {
21845 switch (args->event) {
21846 case NB_EV_VALIDATE:
21847 case NB_EV_PREPARE:
21848 case NB_EV_ABORT:
21849 return NB_OK;
21850 case NB_EV_APPLY:
21851 return bgp_neighbor_afi_safi_weight_destroy(args);
21852
21853 break;
21854 }
21855
21856 return NB_OK;
21857 }
21858
21859 /*
21860 * XPath:
21861 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-as
21862 */
21863 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_modify(
21864 struct nb_cb_modify_args *args)
21865 {
21866 switch (args->event) {
21867 case NB_EV_VALIDATE:
21868 case NB_EV_PREPARE:
21869 case NB_EV_ABORT:
21870 case NB_EV_APPLY:
21871 /* TODO: implement me. */
21872 break;
21873 }
21874
21875 return NB_OK;
21876 }
21877
21878 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_destroy(
21879 struct nb_cb_destroy_args *args)
21880 {
21881 switch (args->event) {
21882 case NB_EV_VALIDATE:
21883 case NB_EV_PREPARE:
21884 case NB_EV_ABORT:
21885 case NB_EV_APPLY:
21886 /* TODO: implement me. */
21887 break;
21888 }
21889
21890 return NB_OK;
21891 }
21892
21893 /*
21894 * XPath:
21895 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-origin-as
21896 */
21897 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_modify(
21898 struct nb_cb_modify_args *args)
21899 {
21900 switch (args->event) {
21901 case NB_EV_VALIDATE:
21902 case NB_EV_PREPARE:
21903 case NB_EV_ABORT:
21904 case NB_EV_APPLY:
21905 /* TODO: implement me. */
21906 break;
21907 }
21908
21909 return NB_OK;
21910 }
21911
21912 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_destroy(
21913 struct nb_cb_destroy_args *args)
21914 {
21915 switch (args->event) {
21916 case NB_EV_VALIDATE:
21917 case NB_EV_PREPARE:
21918 case NB_EV_ABORT:
21919 case NB_EV_APPLY:
21920 /* TODO: implement me. */
21921 break;
21922 }
21923
21924 return NB_OK;
21925 }
21926
21927 /*
21928 * XPath:
21929 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/replace-peer-as
21930 */
21931 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace_peer_as_modify(
21932 struct nb_cb_modify_args *args)
21933 {
21934 switch (args->event) {
21935 case NB_EV_VALIDATE:
21936 case NB_EV_PREPARE:
21937 case NB_EV_ABORT:
21938 return NB_OK;
21939 case NB_EV_APPLY:
21940 return bgp_neighbor_afi_safi_flag_modify(
21941 args, PEER_FLAG_AS_OVERRIDE,
21942 yang_dnode_get_bool(args->dnode, NULL));
21943
21944 break;
21945 }
21946
21947 return NB_OK;
21948 }
21949
21950 /*
21951 * XPath:
21952 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/as-path-unchanged
21953 */
21954 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_unchanged_modify(
21955 struct nb_cb_modify_args *args)
21956 {
21957 switch (args->event) {
21958 case NB_EV_VALIDATE:
21959 case NB_EV_PREPARE:
21960 case NB_EV_ABORT:
21961 return NB_OK;
21962 case NB_EV_APPLY:
21963 return bgp_neighbor_afi_safi_flag_modify(
21964 args, PEER_FLAG_AS_PATH_UNCHANGED,
21965 yang_dnode_get_bool(args->dnode, NULL));
21966
21967 break;
21968 }
21969
21970 return NB_OK;
21971 }
21972
21973 /*
21974 * XPath:
21975 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/next-hop-unchanged
21976 */
21977 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop_unchanged_modify(
21978 struct nb_cb_modify_args *args)
21979 {
21980 switch (args->event) {
21981 case NB_EV_VALIDATE:
21982 case NB_EV_PREPARE:
21983 case NB_EV_ABORT:
21984 return NB_OK;
21985 case NB_EV_APPLY:
21986 return bgp_neighbor_afi_safi_flag_modify(
21987 args, PEER_FLAG_NEXTHOP_UNCHANGED,
21988 yang_dnode_get_bool(args->dnode, NULL));
21989
21990 break;
21991 }
21992
21993 return NB_OK;
21994 }
21995
21996 /*
21997 * XPath:
21998 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/med-unchanged
21999 */
22000 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unchanged_modify(
22001 struct nb_cb_modify_args *args)
22002 {
22003 switch (args->event) {
22004 case NB_EV_VALIDATE:
22005 case NB_EV_PREPARE:
22006 case NB_EV_ABORT:
22007 return NB_OK;
22008 case NB_EV_APPLY:
22009 return bgp_neighbor_afi_safi_flag_modify(
22010 args, PEER_FLAG_MED_UNCHANGED,
22011 yang_dnode_get_bool(args->dnode, NULL));
22012
22013 break;
22014 }
22015
22016 return NB_OK;
22017 }
22018
22019 /*
22020 * XPath:
22021 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self
22022 */
22023 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_modify(
22024 struct nb_cb_modify_args *args)
22025 {
22026 switch (args->event) {
22027 case NB_EV_VALIDATE:
22028 case NB_EV_PREPARE:
22029 case NB_EV_ABORT:
22030 return NB_OK;
22031 case NB_EV_APPLY:
22032 return bgp_neighbor_afi_safi_flag_modify(
22033 args, PEER_FLAG_NEXTHOP_SELF,
22034 yang_dnode_get_bool(args->dnode, NULL));
22035
22036 break;
22037 }
22038
22039 return NB_OK;
22040 }
22041
22042 /*
22043 * XPath:
22044 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self-force
22045 */
22046 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_force_modify(
22047 struct nb_cb_modify_args *args)
22048 {
22049 switch (args->event) {
22050 case NB_EV_VALIDATE:
22051 case NB_EV_PREPARE:
22052 case NB_EV_ABORT:
22053 return NB_OK;
22054 case NB_EV_APPLY:
22055 return bgp_neighbor_afi_safi_flag_modify(
22056 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
22057 yang_dnode_get_bool(args->dnode, NULL));
22058
22059 break;
22060 }
22061
22062 return NB_OK;
22063 }
22064
22065 /*
22066 * XPath:
22067 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/route-reflector/route-reflector-client
22068 */
22069 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_reflector_client_modify(
22070 struct nb_cb_modify_args *args)
22071 {
22072 switch (args->event) {
22073 case NB_EV_VALIDATE:
22074 case NB_EV_PREPARE:
22075 case NB_EV_ABORT:
22076 return NB_OK;
22077 case NB_EV_APPLY:
22078 return bgp_neighbor_afi_safi_flag_modify(
22079 args, PEER_FLAG_REFLECTOR_CLIENT,
22080 yang_dnode_get_bool(args->dnode, NULL));
22081
22082 break;
22083 }
22084
22085 return NB_OK;
22086 }
22087
22088 /*
22089 * XPath:
22090 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/route-server/route-server-client
22091 */
22092 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_server_route_server_client_modify(
22093 struct nb_cb_modify_args *args)
22094 {
22095 switch (args->event) {
22096 case NB_EV_VALIDATE:
22097 case NB_EV_PREPARE:
22098 case NB_EV_ABORT:
22099 return NB_OK;
22100 case NB_EV_APPLY:
22101 return bgp_neighbor_afi_safi_flag_modify(
22102 args, PEER_FLAG_RSERVER_CLIENT,
22103 yang_dnode_get_bool(args->dnode, NULL));
22104
22105 break;
22106 }
22107
22108 return NB_OK;
22109 }
22110
22111 /*
22112 * XPath:
22113 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/soft-reconfiguration
22114 */
22115 int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_modify(
22116 struct nb_cb_modify_args *args)
22117 {
22118 switch (args->event) {
22119 case NB_EV_VALIDATE:
22120 case NB_EV_PREPARE:
22121 case NB_EV_ABORT:
22122 return NB_OK;
22123 case NB_EV_APPLY:
22124 return bgp_neighbor_afi_safi_flag_modify(
22125 args, PEER_FLAG_SOFT_RECONFIG,
22126 yang_dnode_get_bool(args->dnode, NULL));
22127
22128 break;
22129 }
22130
22131 return NB_OK;
22132 }
22133
22134 /*
22135 * XPath:
22136 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/route-reflector/route-reflector-client
22137 */
22138 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_reflector_route_reflector_client_modify(
22139 struct nb_cb_modify_args *args)
22140 {
22141 switch (args->event) {
22142 case NB_EV_VALIDATE:
22143 case NB_EV_PREPARE:
22144 case NB_EV_ABORT:
22145 return NB_OK;
22146 case NB_EV_APPLY:
22147 return bgp_neighbor_afi_safi_flag_modify(
22148 args, PEER_FLAG_REFLECTOR_CLIENT,
22149 yang_dnode_get_bool(args->dnode, NULL));
22150
22151 break;
22152 }
22153
22154 return NB_OK;
22155 }
22156
22157 /*
22158 * XPath:
22159 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/route-server/route-server-client
22160 */
22161 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_server_route_server_client_modify(
22162 struct nb_cb_modify_args *args)
22163 {
22164 switch (args->event) {
22165 case NB_EV_VALIDATE:
22166 case NB_EV_PREPARE:
22167 case NB_EV_ABORT:
22168 return NB_OK;
22169 case NB_EV_APPLY:
22170 return bgp_neighbor_afi_safi_flag_modify(
22171 args, PEER_FLAG_RSERVER_CLIENT,
22172 yang_dnode_get_bool(args->dnode, NULL));
22173
22174 break;
22175 }
22176
22177 return NB_OK;
22178 }
22179
22180 /*
22181 * XPath:
22182 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/soft-reconfiguration
22183 */
22184 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration_modify(
22185 struct nb_cb_modify_args *args)
22186 {
22187 switch (args->event) {
22188 case NB_EV_VALIDATE:
22189 case NB_EV_PREPARE:
22190 case NB_EV_ABORT:
22191 return NB_OK;
22192 case NB_EV_APPLY:
22193 return bgp_neighbor_afi_safi_flag_modify(
22194 args, PEER_FLAG_SOFT_RECONFIG,
22195 yang_dnode_get_bool(args->dnode, NULL));
22196
22197 break;
22198 }
22199
22200 return NB_OK;
22201 }
22202
22203 /*
22204 * XPath:
22205 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/route-reflector/route-reflector-client
22206 */
22207 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_reflector_route_reflector_client_modify(
22208 struct nb_cb_modify_args *args)
22209 {
22210 switch (args->event) {
22211 case NB_EV_VALIDATE:
22212 case NB_EV_PREPARE:
22213 case NB_EV_ABORT:
22214 return NB_OK;
22215 case NB_EV_APPLY:
22216 return bgp_neighbor_afi_safi_flag_modify(
22217 args, PEER_FLAG_REFLECTOR_CLIENT,
22218 yang_dnode_get_bool(args->dnode, NULL));
22219
22220 break;
22221 }
22222
22223 return NB_OK;
22224 }
22225
22226 /*
22227 * XPath:
22228 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/route-server/route-server-client
22229 */
22230 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_server_route_server_client_modify(
22231 struct nb_cb_modify_args *args)
22232 {
22233 switch (args->event) {
22234 case NB_EV_VALIDATE:
22235 case NB_EV_PREPARE:
22236 case NB_EV_ABORT:
22237 return NB_OK;
22238 case NB_EV_APPLY:
22239 return bgp_neighbor_afi_safi_flag_modify(
22240 args, PEER_FLAG_RSERVER_CLIENT,
22241 yang_dnode_get_bool(args->dnode, NULL));
22242
22243 break;
22244 }
22245
22246 return NB_OK;
22247 }
22248
22249 /*
22250 * XPath:
22251 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/soft-reconfiguration
22252 */
22253 int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify(
22254 struct nb_cb_modify_args *args)
22255 {
22256 switch (args->event) {
22257 case NB_EV_VALIDATE:
22258 case NB_EV_PREPARE:
22259 case NB_EV_ABORT:
22260 return NB_OK;
22261 case NB_EV_APPLY:
22262 return bgp_neighbor_afi_safi_flag_modify(
22263 args, PEER_FLAG_SOFT_RECONFIG,
22264 yang_dnode_get_bool(args->dnode, NULL));
22265
22266 break;
22267 }
22268
22269 return NB_OK;
22270 }
22271
22272 static int
22273 bgp_unnumbered_neighbor_afi_safi_flag_modify(struct nb_cb_modify_args *args,
22274 uint32_t flags, bool set)
22275 {
22276 struct bgp *bgp;
22277 const char *peer_str;
22278 struct peer *peer;
22279 const struct lyd_node *nbr_dnode;
22280 const struct lyd_node *nbr_af_dnode;
22281 const char *af_name;
22282 afi_t afi;
22283 safi_t safi;
22284
22285 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
22286 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
22287 yang_afi_safi_identity2value(af_name, &afi, &safi);
22288
22289 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
22290 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
22291 peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
22292 peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
22293 args->errmsg_len);
22294
22295 if (peer_af_flag_modify_nb(peer, afi, safi, flags, set, args->errmsg,
22296 args->errmsg_len)
22297 < 0)
22298 return NB_ERR_INCONSISTENCY;
22299
22300 return NB_OK;
22301 }
22302
22303 /*
22304 * XPath:
22305 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/add-paths/path-type
22306 */
22307 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_add_paths_path_type_modify(
22308 struct nb_cb_modify_args *args)
22309 {
22310 switch (args->event) {
22311 case NB_EV_VALIDATE:
22312 case NB_EV_PREPARE:
22313 case NB_EV_ABORT:
22314 case NB_EV_APPLY:
22315 /* TODO: implement me. */
22316 break;
22317 }
22318
22319 return NB_OK;
22320 }
22321
22322 /*
22323 * XPath:
22324 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-as
22325 */
22326 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_modify(
22327 struct nb_cb_modify_args *args)
22328 {
22329 switch (args->event) {
22330 case NB_EV_VALIDATE:
22331 case NB_EV_PREPARE:
22332 case NB_EV_ABORT:
22333 case NB_EV_APPLY:
22334 /* TODO: implement me. */
22335 break;
22336 }
22337
22338 return NB_OK;
22339 }
22340
22341 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_destroy(
22342 struct nb_cb_destroy_args *args)
22343 {
22344 switch (args->event) {
22345 case NB_EV_VALIDATE:
22346 case NB_EV_PREPARE:
22347 case NB_EV_ABORT:
22348 case NB_EV_APPLY:
22349 /* TODO: implement me. */
22350 break;
22351 }
22352
22353 return NB_OK;
22354 }
22355
22356 /*
22357 * XPath:
22358 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-origin-as
22359 */
22360 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
22361 struct nb_cb_modify_args *args)
22362 {
22363 switch (args->event) {
22364 case NB_EV_VALIDATE:
22365 case NB_EV_PREPARE:
22366 case NB_EV_ABORT:
22367 case NB_EV_APPLY:
22368 /* TODO: implement me. */
22369 break;
22370 }
22371
22372 return NB_OK;
22373 }
22374
22375 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
22376 struct nb_cb_destroy_args *args)
22377 {
22378 switch (args->event) {
22379 case NB_EV_VALIDATE:
22380 case NB_EV_PREPARE:
22381 case NB_EV_ABORT:
22382 case NB_EV_APPLY:
22383 /* TODO: implement me. */
22384 break;
22385 }
22386
22387 return NB_OK;
22388 }
22389
22390 /*
22391 * XPath:
22392 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/replace-peer-as
22393 */
22394 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify(
22395 struct nb_cb_modify_args *args)
22396 {
22397 switch (args->event) {
22398 case NB_EV_VALIDATE:
22399 case NB_EV_PREPARE:
22400 case NB_EV_ABORT:
22401 return NB_OK;
22402 case NB_EV_APPLY:
22403 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
22404 args, PEER_FLAG_AS_OVERRIDE,
22405 yang_dnode_get_bool(args->dnode, NULL));
22406
22407 break;
22408 }
22409
22410 return NB_OK;
22411 }
22412
22413 /*
22414 * XPath:
22415 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate
22416 */
22417 void bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish(
22418 struct nb_cb_apply_finish_args *args)
22419 {
22420 struct bgp *bgp;
22421 const char *peer_str;
22422 struct peer *peer;
22423 const struct lyd_node *nbr_dnode;
22424 const struct lyd_node *nbr_af_dnode;
22425 const char *af_name;
22426 afi_t afi;
22427 safi_t safi;
22428
22429 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
22430 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
22431 yang_afi_safi_identity2value(af_name, &afi, &safi);
22432
22433 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
22434 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
22435 peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
22436 peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
22437 args->errmsg_len);
22438 if (!peer)
22439 return;
22440
22441 bgp_peer_afi_safi_default_originate_apply(args, peer, afi, safi);
22442 }
22443
22444 /*
22445 * XPath:
22446 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/originate
22447 */
22448 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify(
22449 struct nb_cb_modify_args *args)
22450 {
22451 switch (args->event) {
22452 case NB_EV_VALIDATE:
22453 case NB_EV_PREPARE:
22454 case NB_EV_ABORT:
22455 case NB_EV_APPLY:
22456 /* TODO: implement me. */
22457 break;
22458 }
22459
22460 return NB_OK;
22461 }
22462
22463 /*
22464 * XPath:
22465 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map
22466 */
22467 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify(
22468 struct nb_cb_modify_args *args)
22469 {
22470 switch (args->event) {
22471 case NB_EV_VALIDATE:
22472 case NB_EV_PREPARE:
22473 case NB_EV_ABORT:
22474 case NB_EV_APPLY:
22475 /* TODO: implement me. */
22476 break;
22477 }
22478
22479 return NB_OK;
22480 }
22481
22482 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy(
22483 struct nb_cb_destroy_args *args)
22484 {
22485 switch (args->event) {
22486 case NB_EV_VALIDATE:
22487 case NB_EV_PREPARE:
22488 case NB_EV_ABORT:
22489 case NB_EV_APPLY:
22490 /* TODO: implement me. */
22491 break;
22492 }
22493
22494 return NB_OK;
22495 }
22496
22497 static int bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
22498 struct nb_cb_destroy_args *args)
22499 {
22500 struct bgp *bgp;
22501 const char *peer_str;
22502 struct peer *peer;
22503 const struct lyd_node *nbr_dnode;
22504 const struct lyd_node *nbr_af_dnode;
22505 const char *af_name;
22506 afi_t afi;
22507 safi_t safi;
22508 int direction;
22509
22510 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
22511 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
22512 yang_afi_safi_identity2value(af_name, &afi, &safi);
22513
22514 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
22515 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
22516 peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
22517 peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
22518 args->errmsg_len);
22519 if (!peer)
22520 return NB_ERR_INCONSISTENCY;
22521
22522 direction = yang_dnode_get_enum(args->dnode, "./direction");
22523
22524 switch (direction) {
22525 case 1:
22526 peer_maximum_prefix_unset(peer, afi, safi);
22527 break;
22528 case 2:
22529 UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT);
22530 peer->pmax_out[afi][safi] = 0;
22531 break;
22532 }
22533
22534 return NB_OK;
22535 }
22536
22537 /*
22538 * XPath:
22539 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list
22540 */
22541 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create(
22542 struct nb_cb_create_args *args)
22543 {
22544 switch (args->event) {
22545 case NB_EV_VALIDATE:
22546 case NB_EV_PREPARE:
22547 case NB_EV_ABORT:
22548 case NB_EV_APPLY:
22549 /* TODO: implement me. */
22550 break;
22551 }
22552
22553 return NB_OK;
22554 }
22555
22556 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy(
22557 struct nb_cb_destroy_args *args)
22558 {
22559 switch (args->event) {
22560 case NB_EV_VALIDATE:
22561 case NB_EV_PREPARE:
22562 case NB_EV_ABORT:
22563 return NB_OK;
22564 case NB_EV_APPLY:
22565 return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
22566 args);
22567 }
22568
22569 return NB_OK;
22570 }
22571
22572 void bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish(
22573 struct nb_cb_apply_finish_args *args)
22574 {
22575 struct bgp *bgp;
22576 const char *peer_str;
22577 struct peer *peer;
22578 const struct lyd_node *nbr_dnode;
22579 const struct lyd_node *nbr_af_dnode;
22580 const char *af_name;
22581 afi_t afi;
22582 safi_t safi;
22583
22584 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
22585 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
22586 yang_afi_safi_identity2value(af_name, &afi, &safi);
22587
22588 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
22589 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
22590 peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
22591 peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
22592 args->errmsg_len);
22593 if (!peer)
22594 return;
22595
22596 bgp_peer_afi_safi_maximum_prefix_set(args, peer, afi, safi);
22597 }
22598
22599 /*
22600 * XPath:
22601 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/max-prefixes
22602 */
22603 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
22604 struct nb_cb_modify_args *args)
22605 {
22606 switch (args->event) {
22607 case NB_EV_VALIDATE:
22608 case NB_EV_PREPARE:
22609 case NB_EV_ABORT:
22610 case NB_EV_APPLY:
22611 /* TODO: implement me. */
22612 break;
22613 }
22614
22615 return NB_OK;
22616 }
22617
22618 /*
22619 * XPath:
22620 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check
22621 */
22622 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
22623 struct nb_cb_modify_args *args)
22624 {
22625 switch (args->event) {
22626 case NB_EV_VALIDATE:
22627 case NB_EV_PREPARE:
22628 case NB_EV_ABORT:
22629 case NB_EV_APPLY:
22630 /* TODO: implement me. */
22631 break;
22632 }
22633
22634 return NB_OK;
22635 }
22636
22637 /*
22638 * XPath:
22639 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only
22640 */
22641 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
22642 struct nb_cb_modify_args *args)
22643 {
22644 switch (args->event) {
22645 case NB_EV_VALIDATE:
22646 case NB_EV_PREPARE:
22647 case NB_EV_ABORT:
22648 case NB_EV_APPLY:
22649 /* TODO: implement me. */
22650 break;
22651 }
22652
22653 return NB_OK;
22654 }
22655
22656 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
22657 struct nb_cb_destroy_args *args)
22658 {
22659 switch (args->event) {
22660 case NB_EV_VALIDATE:
22661 case NB_EV_PREPARE:
22662 case NB_EV_ABORT:
22663 case NB_EV_APPLY:
22664 /* TODO: implement me. */
22665 break;
22666 }
22667
22668 return NB_OK;
22669 }
22670
22671 /*
22672 * XPath:
22673 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer
22674 */
22675 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
22676 struct nb_cb_modify_args *args)
22677 {
22678 switch (args->event) {
22679 case NB_EV_VALIDATE:
22680 case NB_EV_PREPARE:
22681 case NB_EV_ABORT:
22682 case NB_EV_APPLY:
22683 /* TODO: implement me. */
22684 break;
22685 }
22686
22687 return NB_OK;
22688 }
22689
22690 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
22691 struct nb_cb_destroy_args *args)
22692 {
22693 switch (args->event) {
22694 case NB_EV_VALIDATE:
22695 case NB_EV_PREPARE:
22696 case NB_EV_ABORT:
22697 case NB_EV_APPLY:
22698 /* TODO: implement me. */
22699 break;
22700 }
22701
22702 return NB_OK;
22703 }
22704
22705 /*
22706 * XPath:
22707 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
22708 */
22709 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
22710 struct nb_cb_modify_args *args)
22711 {
22712 switch (args->event) {
22713 case NB_EV_VALIDATE:
22714 case NB_EV_PREPARE:
22715 case NB_EV_ABORT:
22716 case NB_EV_APPLY:
22717 /* TODO: implement me. */
22718 break;
22719 }
22720
22721 return NB_OK;
22722 }
22723
22724 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
22725 struct nb_cb_destroy_args *args)
22726 {
22727 switch (args->event) {
22728 case NB_EV_VALIDATE:
22729 case NB_EV_PREPARE:
22730 case NB_EV_ABORT:
22731 case NB_EV_APPLY:
22732 /* TODO: implement me. */
22733 break;
22734 }
22735
22736 return NB_OK;
22737 }
22738
22739 /*
22740 * XPath:
22741 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
22742 */
22743 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
22744 struct nb_cb_modify_args *args)
22745 {
22746 switch (args->event) {
22747 case NB_EV_VALIDATE:
22748 case NB_EV_PREPARE:
22749 case NB_EV_ABORT:
22750 case NB_EV_APPLY:
22751 /* TODO: implement me. */
22752 break;
22753 }
22754
22755 return NB_OK;
22756 }
22757
22758 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
22759 struct nb_cb_destroy_args *args)
22760 {
22761 switch (args->event) {
22762 case NB_EV_VALIDATE:
22763 case NB_EV_PREPARE:
22764 case NB_EV_ABORT:
22765 case NB_EV_APPLY:
22766 /* TODO: implement me. */
22767 break;
22768 }
22769
22770 return NB_OK;
22771 }
22772
22773 /*
22774 * XPath:
22775 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer
22776 */
22777 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
22778 struct nb_cb_modify_args *args)
22779 {
22780 switch (args->event) {
22781 case NB_EV_VALIDATE:
22782 case NB_EV_PREPARE:
22783 case NB_EV_ABORT:
22784 case NB_EV_APPLY:
22785 /* TODO: implement me. */
22786 break;
22787 }
22788
22789 return NB_OK;
22790 }
22791
22792 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
22793 struct nb_cb_destroy_args *args)
22794 {
22795 switch (args->event) {
22796 case NB_EV_VALIDATE:
22797 case NB_EV_PREPARE:
22798 case NB_EV_ABORT:
22799 case NB_EV_APPLY:
22800 /* TODO: implement me. */
22801 break;
22802 }
22803
22804 return NB_OK;
22805 }
22806
22807 /*
22808 * XPath:
22809 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
22810 */
22811 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
22812 struct nb_cb_modify_args *args)
22813 {
22814 switch (args->event) {
22815 case NB_EV_VALIDATE:
22816 case NB_EV_PREPARE:
22817 case NB_EV_ABORT:
22818 case NB_EV_APPLY:
22819 /* TODO: implement me. */
22820 break;
22821 }
22822
22823 return NB_OK;
22824 }
22825
22826 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
22827 struct nb_cb_destroy_args *args)
22828 {
22829 switch (args->event) {
22830 case NB_EV_VALIDATE:
22831 case NB_EV_PREPARE:
22832 case NB_EV_ABORT:
22833 case NB_EV_APPLY:
22834 /* TODO: implement me. */
22835 break;
22836 }
22837
22838 return NB_OK;
22839 }
22840
22841 /*
22842 * XPath:
22843 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only
22844 */
22845 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
22846 struct nb_cb_modify_args *args)
22847 {
22848 switch (args->event) {
22849 case NB_EV_VALIDATE:
22850 case NB_EV_PREPARE:
22851 case NB_EV_ABORT:
22852 case NB_EV_APPLY:
22853 /* TODO: implement me. */
22854 break;
22855 }
22856
22857 return NB_OK;
22858 }
22859
22860 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
22861 struct nb_cb_destroy_args *args)
22862 {
22863 switch (args->event) {
22864 case NB_EV_VALIDATE:
22865 case NB_EV_PREPARE:
22866 case NB_EV_ABORT:
22867 case NB_EV_APPLY:
22868 /* TODO: implement me. */
22869 break;
22870 }
22871
22872 return NB_OK;
22873 }
22874
22875 /*
22876 * XPath:
22877 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self
22878 */
22879 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify(
22880 struct nb_cb_modify_args *args)
22881 {
22882 switch (args->event) {
22883 case NB_EV_VALIDATE:
22884 case NB_EV_PREPARE:
22885 case NB_EV_ABORT:
22886 return NB_OK;
22887 case NB_EV_APPLY:
22888 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
22889 args, PEER_FLAG_NEXTHOP_SELF,
22890 yang_dnode_get_bool(args->dnode, NULL));
22891
22892 break;
22893 }
22894
22895 return NB_OK;
22896 }
22897
22898 /*
22899 * XPath:
22900 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self-force
22901 */
22902 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
22903 struct nb_cb_modify_args *args)
22904 {
22905 switch (args->event) {
22906 case NB_EV_VALIDATE:
22907 case NB_EV_PREPARE:
22908 case NB_EV_ABORT:
22909 return NB_OK;
22910 case NB_EV_APPLY:
22911 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
22912 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
22913 yang_dnode_get_bool(args->dnode, NULL));
22914
22915 break;
22916 }
22917
22918 return NB_OK;
22919 }
22920
22921 /*
22922 * XPath:
22923 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all
22924 */
22925 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_modify(
22926 struct nb_cb_modify_args *args)
22927 {
22928 switch (args->event) {
22929 case NB_EV_VALIDATE:
22930 case NB_EV_PREPARE:
22931 case NB_EV_ABORT:
22932 return NB_OK;
22933 case NB_EV_APPLY:
22934 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
22935 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
22936 yang_dnode_get_bool(args->dnode, NULL));
22937
22938 break;
22939 }
22940
22941 return NB_OK;
22942 }
22943
22944 /*
22945 * XPath:
22946 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all-replace
22947 */
22948 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
22949 struct nb_cb_modify_args *args)
22950 {
22951 switch (args->event) {
22952 case NB_EV_VALIDATE:
22953 case NB_EV_PREPARE:
22954 case NB_EV_ABORT:
22955 return NB_OK;
22956 case NB_EV_APPLY:
22957 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
22958 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
22959 yang_dnode_get_bool(args->dnode, NULL));
22960
22961 break;
22962 }
22963
22964 return NB_OK;
22965 }
22966
22967 /*
22968 * XPath:
22969 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as
22970 */
22971 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_modify(
22972 struct nb_cb_modify_args *args)
22973 {
22974 switch (args->event) {
22975 case NB_EV_VALIDATE:
22976 case NB_EV_PREPARE:
22977 case NB_EV_ABORT:
22978 return NB_OK;
22979 case NB_EV_APPLY:
22980 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
22981 args, PEER_FLAG_REMOVE_PRIVATE_AS,
22982 yang_dnode_get_bool(args->dnode, NULL));
22983
22984 break;
22985 }
22986
22987 return NB_OK;
22988 }
22989
22990 /*
22991 * XPath:
22992 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-replace
22993 */
22994 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_replace_modify(
22995 struct nb_cb_modify_args *args)
22996 {
22997 switch (args->event) {
22998 case NB_EV_VALIDATE:
22999 case NB_EV_PREPARE:
23000 case NB_EV_ABORT:
23001 return NB_OK;
23002 case NB_EV_APPLY:
23003 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23004 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
23005 yang_dnode_get_bool(args->dnode, NULL));
23006
23007 break;
23008 }
23009
23010 return NB_OK;
23011 }
23012
23013 static int
23014 bgp_unnumbered_neighbor_afi_safi_weight_modify(struct nb_cb_modify_args *args)
23015 {
23016 struct bgp *bgp;
23017 const char *peer_str;
23018 struct peer *peer;
23019 const struct lyd_node *nbr_dnode;
23020 const char *af_name;
23021 uint16_t weight;
23022 afi_t afi;
23023 safi_t safi;
23024 const struct lyd_node *nbr_af_dnode;
23025 int ret;
23026
23027 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
23028 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
23029 yang_afi_safi_identity2value(af_name, &afi, &safi);
23030
23031 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
23032 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
23033 peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
23034 peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
23035 args->errmsg_len);
23036
23037 weight = yang_dnode_get_uint16(args->dnode, NULL);
23038
23039 ret = peer_weight_set(peer, afi, safi, weight);
23040 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0)
23041 return NB_ERR_INCONSISTENCY;
23042
23043 return NB_OK;
23044 }
23045
23046 static int
23047 bgp_unnumbered_neighbor_afi_safi_weight_destroy(struct nb_cb_destroy_args *args)
23048 {
23049 struct bgp *bgp;
23050 const char *peer_str;
23051 struct peer *peer;
23052 const struct lyd_node *nbr_dnode;
23053 const struct lyd_node *nbr_af_dnode;
23054 const char *af_name;
23055 afi_t afi;
23056 safi_t safi;
23057 int ret;
23058
23059 bgp = nb_running_get_entry(args->dnode, NULL, true);
23060 nbr_dnode = yang_dnode_get_parent(args->dnode, "unnumbered-neighbor");
23061 peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
23062 peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
23063 args->errmsg_len);
23064 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
23065 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
23066 yang_afi_safi_identity2value(af_name, &afi, &safi);
23067
23068 ret = peer_weight_unset(peer, afi, safi);
23069 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0)
23070 return NB_ERR_INCONSISTENCY;
23071
23072 return NB_OK;
23073 }
23074
23075 /*
23076 * XPath:
23077 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/weight/weight-attribute
23078 */
23079 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_modify(
23080 struct nb_cb_modify_args *args)
23081 {
23082 switch (args->event) {
23083 case NB_EV_VALIDATE:
23084 case NB_EV_PREPARE:
23085 case NB_EV_ABORT:
23086 return NB_OK;
23087 case NB_EV_APPLY:
23088 return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
23089
23090 break;
23091 }
23092
23093 return NB_OK;
23094 }
23095
23096 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_destroy(
23097 struct nb_cb_destroy_args *args)
23098 {
23099 switch (args->event) {
23100 case NB_EV_VALIDATE:
23101 case NB_EV_PREPARE:
23102 case NB_EV_ABORT:
23103 return NB_OK;
23104 case NB_EV_APPLY:
23105 return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
23106
23107 break;
23108 }
23109
23110 return NB_OK;
23111 }
23112
23113 /*
23114 * XPath:
23115 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/route-reflector/route-reflector-client
23116 */
23117 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_route_reflector_route_reflector_client_modify(
23118 struct nb_cb_modify_args *args)
23119 {
23120 switch (args->event) {
23121 case NB_EV_VALIDATE:
23122 case NB_EV_PREPARE:
23123 case NB_EV_ABORT:
23124 return NB_OK;
23125 case NB_EV_APPLY:
23126 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23127 args, PEER_FLAG_REFLECTOR_CLIENT,
23128 yang_dnode_get_bool(args->dnode, NULL));
23129
23130 break;
23131 }
23132
23133 return NB_OK;
23134 }
23135
23136 /*
23137 * XPath:
23138 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/route-server/route-server-client
23139 */
23140 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_route_server_route_server_client_modify(
23141 struct nb_cb_modify_args *args)
23142 {
23143 switch (args->event) {
23144 case NB_EV_VALIDATE:
23145 case NB_EV_PREPARE:
23146 case NB_EV_ABORT:
23147 return NB_OK;
23148 case NB_EV_APPLY:
23149 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23150 args, PEER_FLAG_RSERVER_CLIENT,
23151 yang_dnode_get_bool(args->dnode, NULL));
23152
23153 break;
23154 }
23155
23156 return NB_OK;
23157 }
23158
23159 /*
23160 * XPath:
23161 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-community
23162 */
23163 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_community_modify(
23164 struct nb_cb_modify_args *args)
23165 {
23166 switch (args->event) {
23167 case NB_EV_VALIDATE:
23168 case NB_EV_PREPARE:
23169 case NB_EV_ABORT:
23170 return NB_OK;
23171 case NB_EV_APPLY:
23172 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23173 args, PEER_FLAG_SEND_COMMUNITY,
23174 yang_dnode_get_bool(args->dnode, NULL));
23175
23176 break;
23177 }
23178
23179 return NB_OK;
23180 }
23181
23182 /*
23183 * XPath:
23184 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-ext-community
23185 */
23186 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_ext_community_modify(
23187 struct nb_cb_modify_args *args)
23188 {
23189 switch (args->event) {
23190 case NB_EV_VALIDATE:
23191 case NB_EV_PREPARE:
23192 case NB_EV_ABORT:
23193 return NB_OK;
23194 case NB_EV_APPLY:
23195 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23196 args, PEER_FLAG_SEND_EXT_COMMUNITY,
23197 yang_dnode_get_bool(args->dnode, NULL));
23198
23199 break;
23200 }
23201
23202 return NB_OK;
23203 }
23204
23205 /*
23206 * XPath:
23207 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-large-community
23208 */
23209 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_large_community_modify(
23210 struct nb_cb_modify_args *args)
23211 {
23212 switch (args->event) {
23213 case NB_EV_VALIDATE:
23214 case NB_EV_PREPARE:
23215 case NB_EV_ABORT:
23216 return NB_OK;
23217 case NB_EV_APPLY:
23218 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23219 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
23220 yang_dnode_get_bool(args->dnode, NULL));
23221
23222 break;
23223 }
23224
23225 return NB_OK;
23226 }
23227
23228 /*
23229 * XPath:
23230 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/soft-reconfiguration
23231 */
23232 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_modify(
23233 struct nb_cb_modify_args *args)
23234 {
23235 switch (args->event) {
23236 case NB_EV_VALIDATE:
23237 case NB_EV_PREPARE:
23238 case NB_EV_ABORT:
23239 return NB_OK;
23240 case NB_EV_APPLY:
23241 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23242 args, PEER_FLAG_SOFT_RECONFIG,
23243 yang_dnode_get_bool(args->dnode, NULL));
23244
23245 break;
23246 }
23247
23248 return NB_OK;
23249 }
23250
23251 /*
23252 * XPath:
23253 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/as-path-unchanged
23254 */
23255 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
23256 struct nb_cb_modify_args *args)
23257 {
23258 switch (args->event) {
23259 case NB_EV_VALIDATE:
23260 case NB_EV_PREPARE:
23261 case NB_EV_ABORT:
23262 return NB_OK;
23263 case NB_EV_APPLY:
23264 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23265 args, PEER_FLAG_AS_PATH_UNCHANGED,
23266 yang_dnode_get_bool(args->dnode, NULL));
23267
23268 break;
23269 }
23270
23271 return NB_OK;
23272 }
23273
23274 /*
23275 * XPath:
23276 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/next-hop-unchanged
23277 */
23278 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
23279 struct nb_cb_modify_args *args)
23280 {
23281 switch (args->event) {
23282 case NB_EV_VALIDATE:
23283 case NB_EV_PREPARE:
23284 case NB_EV_ABORT:
23285 return NB_OK;
23286 case NB_EV_APPLY:
23287 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23288 args, PEER_FLAG_NEXTHOP_UNCHANGED,
23289 yang_dnode_get_bool(args->dnode, NULL));
23290
23291 break;
23292 }
23293
23294 return NB_OK;
23295 }
23296
23297 /*
23298 * XPath:
23299 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/med-unchanged
23300 */
23301 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_unchanged_modify(
23302 struct nb_cb_modify_args *args)
23303 {
23304 switch (args->event) {
23305 case NB_EV_VALIDATE:
23306 case NB_EV_PREPARE:
23307 case NB_EV_ABORT:
23308 return NB_OK;
23309 case NB_EV_APPLY:
23310 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23311 args, PEER_FLAG_MED_UNCHANGED,
23312 yang_dnode_get_bool(args->dnode, NULL));
23313
23314 break;
23315 }
23316
23317 return NB_OK;
23318 }
23319
23320 /*
23321 * XPath:
23322 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-send
23323 */
23324 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_modify(
23325 struct nb_cb_modify_args *args)
23326 {
23327 switch (args->event) {
23328 case NB_EV_VALIDATE:
23329 case NB_EV_PREPARE:
23330 case NB_EV_ABORT:
23331 case NB_EV_APPLY:
23332 /* TODO: implement me. */
23333 break;
23334 }
23335
23336 return NB_OK;
23337 }
23338
23339 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_destroy(
23340 struct nb_cb_destroy_args *args)
23341 {
23342 switch (args->event) {
23343 case NB_EV_VALIDATE:
23344 case NB_EV_PREPARE:
23345 case NB_EV_ABORT:
23346 case NB_EV_APPLY:
23347 /* TODO: implement me. */
23348 break;
23349 }
23350
23351 return NB_OK;
23352 }
23353
23354 /*
23355 * XPath:
23356 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-receive
23357 */
23358 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_modify(
23359 struct nb_cb_modify_args *args)
23360 {
23361 switch (args->event) {
23362 case NB_EV_VALIDATE:
23363 case NB_EV_PREPARE:
23364 case NB_EV_ABORT:
23365 case NB_EV_APPLY:
23366 /* TODO: implement me. */
23367 break;
23368 }
23369
23370 return NB_OK;
23371 }
23372
23373 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_destroy(
23374 struct nb_cb_destroy_args *args)
23375 {
23376 switch (args->event) {
23377 case NB_EV_VALIDATE:
23378 case NB_EV_PREPARE:
23379 case NB_EV_ABORT:
23380 case NB_EV_APPLY:
23381 /* TODO: implement me. */
23382 break;
23383 }
23384
23385 return NB_OK;
23386 }
23387
23388 /*
23389 * XPath:
23390 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-both
23391 */
23392 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_modify(
23393 struct nb_cb_modify_args *args)
23394 {
23395 switch (args->event) {
23396 case NB_EV_VALIDATE:
23397 case NB_EV_PREPARE:
23398 case NB_EV_ABORT:
23399 case NB_EV_APPLY:
23400 /* TODO: implement me. */
23401 break;
23402 }
23403
23404 return NB_OK;
23405 }
23406
23407 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_destroy(
23408 struct nb_cb_destroy_args *args)
23409 {
23410 switch (args->event) {
23411 case NB_EV_VALIDATE:
23412 case NB_EV_PREPARE:
23413 case NB_EV_ABORT:
23414 case NB_EV_APPLY:
23415 /* TODO: implement me. */
23416 break;
23417 }
23418
23419 return NB_OK;
23420 }
23421
23422 /*
23423 * XPath:
23424 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-import
23425 */
23426 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_modify(
23427 struct nb_cb_modify_args *args)
23428 {
23429 switch (args->event) {
23430 case NB_EV_VALIDATE:
23431 case NB_EV_PREPARE:
23432 case NB_EV_ABORT:
23433 case NB_EV_APPLY:
23434 /* TODO: implement me. */
23435 break;
23436 }
23437
23438 return NB_OK;
23439 }
23440
23441 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_destroy(
23442 struct nb_cb_destroy_args *args)
23443 {
23444 switch (args->event) {
23445 case NB_EV_VALIDATE:
23446 case NB_EV_PREPARE:
23447 case NB_EV_ABORT:
23448 case NB_EV_APPLY:
23449 /* TODO: implement me. */
23450 break;
23451 }
23452
23453 return NB_OK;
23454 }
23455
23456 /*
23457 * XPath:
23458 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-export
23459 */
23460 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify(
23461 struct nb_cb_modify_args *args)
23462 {
23463 switch (args->event) {
23464 case NB_EV_VALIDATE:
23465 case NB_EV_PREPARE:
23466 case NB_EV_ABORT:
23467 case NB_EV_APPLY:
23468 /* TODO: implement me. */
23469 break;
23470 }
23471
23472 return NB_OK;
23473 }
23474
23475 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy(
23476 struct nb_cb_destroy_args *args)
23477 {
23478 switch (args->event) {
23479 case NB_EV_VALIDATE:
23480 case NB_EV_PREPARE:
23481 case NB_EV_ABORT:
23482 case NB_EV_APPLY:
23483 /* TODO: implement me. */
23484 break;
23485 }
23486
23487 return NB_OK;
23488 }
23489
23490 /*
23491 * XPath:
23492 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-import
23493 */
23494 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_modify(
23495 struct nb_cb_modify_args *args)
23496 {
23497 switch (args->event) {
23498 case NB_EV_VALIDATE:
23499 case NB_EV_PREPARE:
23500 case NB_EV_ABORT:
23501 case NB_EV_APPLY:
23502 /* TODO: implement me. */
23503 break;
23504 }
23505
23506 return NB_OK;
23507 }
23508
23509 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_destroy(
23510 struct nb_cb_destroy_args *args)
23511 {
23512 switch (args->event) {
23513 case NB_EV_VALIDATE:
23514 case NB_EV_PREPARE:
23515 case NB_EV_ABORT:
23516 case NB_EV_APPLY:
23517 /* TODO: implement me. */
23518 break;
23519 }
23520
23521 return NB_OK;
23522 }
23523
23524 /*
23525 * XPath:
23526 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-export
23527 */
23528 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_modify(
23529 struct nb_cb_modify_args *args)
23530 {
23531 switch (args->event) {
23532 case NB_EV_VALIDATE:
23533 case NB_EV_PREPARE:
23534 case NB_EV_ABORT:
23535 case NB_EV_APPLY:
23536 /* TODO: implement me. */
23537 break;
23538 }
23539
23540 return NB_OK;
23541 }
23542
23543 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_destroy(
23544 struct nb_cb_destroy_args *args)
23545 {
23546 switch (args->event) {
23547 case NB_EV_VALIDATE:
23548 case NB_EV_PREPARE:
23549 case NB_EV_ABORT:
23550 case NB_EV_APPLY:
23551 /* TODO: implement me. */
23552 break;
23553 }
23554
23555 return NB_OK;
23556 }
23557
23558 /*
23559 * XPath:
23560 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-import
23561 */
23562 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_modify(
23563 struct nb_cb_modify_args *args)
23564 {
23565 switch (args->event) {
23566 case NB_EV_VALIDATE:
23567 case NB_EV_PREPARE:
23568 case NB_EV_ABORT:
23569 case NB_EV_APPLY:
23570 /* TODO: implement me. */
23571 break;
23572 }
23573
23574 return NB_OK;
23575 }
23576
23577 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_destroy(
23578 struct nb_cb_destroy_args *args)
23579 {
23580 switch (args->event) {
23581 case NB_EV_VALIDATE:
23582 case NB_EV_PREPARE:
23583 case NB_EV_ABORT:
23584 case NB_EV_APPLY:
23585 /* TODO: implement me. */
23586 break;
23587 }
23588
23589 return NB_OK;
23590 }
23591
23592 /*
23593 * XPath:
23594 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-export
23595 */
23596 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_modify(
23597 struct nb_cb_modify_args *args)
23598 {
23599 switch (args->event) {
23600 case NB_EV_VALIDATE:
23601 case NB_EV_PREPARE:
23602 case NB_EV_ABORT:
23603 case NB_EV_APPLY:
23604 /* TODO: implement me. */
23605 break;
23606 }
23607
23608 return NB_OK;
23609 }
23610
23611 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_destroy(
23612 struct nb_cb_destroy_args *args)
23613 {
23614 switch (args->event) {
23615 case NB_EV_VALIDATE:
23616 case NB_EV_PREPARE:
23617 case NB_EV_ABORT:
23618 case NB_EV_APPLY:
23619 /* TODO: implement me. */
23620 break;
23621 }
23622
23623 return NB_OK;
23624 }
23625
23626 /*
23627 * XPath:
23628 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-import
23629 */
23630 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
23631 struct nb_cb_modify_args *args)
23632 {
23633 switch (args->event) {
23634 case NB_EV_VALIDATE:
23635 case NB_EV_PREPARE:
23636 case NB_EV_ABORT:
23637 case NB_EV_APPLY:
23638 /* TODO: implement me. */
23639 break;
23640 }
23641
23642 return NB_OK;
23643 }
23644
23645 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
23646 struct nb_cb_destroy_args *args)
23647 {
23648 switch (args->event) {
23649 case NB_EV_VALIDATE:
23650 case NB_EV_PREPARE:
23651 case NB_EV_ABORT:
23652 case NB_EV_APPLY:
23653 /* TODO: implement me. */
23654 break;
23655 }
23656
23657 return NB_OK;
23658 }
23659
23660 /*
23661 * XPath:
23662 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-export
23663 */
23664 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
23665 struct nb_cb_modify_args *args)
23666 {
23667 switch (args->event) {
23668 case NB_EV_VALIDATE:
23669 case NB_EV_PREPARE:
23670 case NB_EV_ABORT:
23671 case NB_EV_APPLY:
23672 /* TODO: implement me. */
23673 break;
23674 }
23675
23676 return NB_OK;
23677 }
23678
23679 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
23680 struct nb_cb_destroy_args *args)
23681 {
23682 switch (args->event) {
23683 case NB_EV_VALIDATE:
23684 case NB_EV_PREPARE:
23685 case NB_EV_ABORT:
23686 case NB_EV_APPLY:
23687 /* TODO: implement me. */
23688 break;
23689 }
23690
23691 return NB_OK;
23692 }
23693
23694 /*
23695 * XPath:
23696 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-import
23697 */
23698 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_modify(
23699 struct nb_cb_modify_args *args)
23700 {
23701 switch (args->event) {
23702 case NB_EV_VALIDATE:
23703 case NB_EV_PREPARE:
23704 case NB_EV_ABORT:
23705 case NB_EV_APPLY:
23706 /* TODO: implement me. */
23707 break;
23708 }
23709
23710 return NB_OK;
23711 }
23712
23713 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
23714 struct nb_cb_destroy_args *args)
23715 {
23716 switch (args->event) {
23717 case NB_EV_VALIDATE:
23718 case NB_EV_PREPARE:
23719 case NB_EV_ABORT:
23720 case NB_EV_APPLY:
23721 /* TODO: implement me. */
23722 break;
23723 }
23724
23725 return NB_OK;
23726 }
23727
23728 /*
23729 * XPath:
23730 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-export
23731 */
23732 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_modify(
23733 struct nb_cb_modify_args *args)
23734 {
23735 switch (args->event) {
23736 case NB_EV_VALIDATE:
23737 case NB_EV_PREPARE:
23738 case NB_EV_ABORT:
23739 case NB_EV_APPLY:
23740 /* TODO: implement me. */
23741 break;
23742 }
23743
23744 return NB_OK;
23745 }
23746
23747 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
23748 struct nb_cb_destroy_args *args)
23749 {
23750 switch (args->event) {
23751 case NB_EV_VALIDATE:
23752 case NB_EV_PREPARE:
23753 case NB_EV_ABORT:
23754 case NB_EV_APPLY:
23755 /* TODO: implement me. */
23756 break;
23757 }
23758
23759 return NB_OK;
23760 }
23761
23762 /*
23763 * XPath:
23764 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-local-unchanged
23765 */
23766 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_local_unchanged_modify(
23767 struct nb_cb_modify_args *args)
23768 {
23769 switch (args->event) {
23770 case NB_EV_VALIDATE:
23771 case NB_EV_PREPARE:
23772 case NB_EV_ABORT:
23773 case NB_EV_APPLY:
23774 /* TODO: implement me. */
23775 break;
23776 }
23777
23778 return NB_OK;
23779 }
23780
23781 /*
23782 * XPath:
23783 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/add-paths/path-type
23784 */
23785 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_add_paths_path_type_modify(
23786 struct nb_cb_modify_args *args)
23787 {
23788 switch (args->event) {
23789 case NB_EV_VALIDATE:
23790 case NB_EV_PREPARE:
23791 case NB_EV_ABORT:
23792 case NB_EV_APPLY:
23793 /* TODO: implement me. */
23794 break;
23795 }
23796
23797 return NB_OK;
23798 }
23799
23800 /*
23801 * XPath:
23802 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-as
23803 */
23804 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_modify(
23805 struct nb_cb_modify_args *args)
23806 {
23807 switch (args->event) {
23808 case NB_EV_VALIDATE:
23809 case NB_EV_PREPARE:
23810 case NB_EV_ABORT:
23811 case NB_EV_APPLY:
23812 /* TODO: implement me. */
23813 break;
23814 }
23815
23816 return NB_OK;
23817 }
23818
23819 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_destroy(
23820 struct nb_cb_destroy_args *args)
23821 {
23822 switch (args->event) {
23823 case NB_EV_VALIDATE:
23824 case NB_EV_PREPARE:
23825 case NB_EV_ABORT:
23826 case NB_EV_APPLY:
23827 /* TODO: implement me. */
23828 break;
23829 }
23830
23831 return NB_OK;
23832 }
23833
23834 /*
23835 * XPath:
23836 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-origin-as
23837 */
23838 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
23839 struct nb_cb_modify_args *args)
23840 {
23841 switch (args->event) {
23842 case NB_EV_VALIDATE:
23843 case NB_EV_PREPARE:
23844 case NB_EV_ABORT:
23845 case NB_EV_APPLY:
23846 /* TODO: implement me. */
23847 break;
23848 }
23849
23850 return NB_OK;
23851 }
23852
23853 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
23854 struct nb_cb_destroy_args *args)
23855 {
23856 switch (args->event) {
23857 case NB_EV_VALIDATE:
23858 case NB_EV_PREPARE:
23859 case NB_EV_ABORT:
23860 case NB_EV_APPLY:
23861 /* TODO: implement me. */
23862 break;
23863 }
23864
23865 return NB_OK;
23866 }
23867
23868 /*
23869 * XPath:
23870 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/replace-peer-as
23871 */
23872 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify(
23873 struct nb_cb_modify_args *args)
23874 {
23875 switch (args->event) {
23876 case NB_EV_VALIDATE:
23877 case NB_EV_PREPARE:
23878 case NB_EV_ABORT:
23879 return NB_OK;
23880 case NB_EV_APPLY:
23881 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23882 args, PEER_FLAG_AS_OVERRIDE,
23883 yang_dnode_get_bool(args->dnode, NULL));
23884
23885 break;
23886 }
23887
23888 return NB_OK;
23889 }
23890
23891 /*
23892 * XPath:
23893 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/originate
23894 */
23895 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify(
23896 struct nb_cb_modify_args *args)
23897 {
23898 switch (args->event) {
23899 case NB_EV_VALIDATE:
23900 case NB_EV_PREPARE:
23901 case NB_EV_ABORT:
23902 case NB_EV_APPLY:
23903 /* TODO: implement me. */
23904 break;
23905 }
23906
23907 return NB_OK;
23908 }
23909
23910 /*
23911 * XPath:
23912 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map
23913 */
23914 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify(
23915 struct nb_cb_modify_args *args)
23916 {
23917 switch (args->event) {
23918 case NB_EV_VALIDATE:
23919 case NB_EV_PREPARE:
23920 case NB_EV_ABORT:
23921 case NB_EV_APPLY:
23922 /* TODO: implement me. */
23923 break;
23924 }
23925
23926 return NB_OK;
23927 }
23928
23929 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy(
23930 struct nb_cb_destroy_args *args)
23931 {
23932 switch (args->event) {
23933 case NB_EV_VALIDATE:
23934 case NB_EV_PREPARE:
23935 case NB_EV_ABORT:
23936 case NB_EV_APPLY:
23937 /* TODO: implement me. */
23938 break;
23939 }
23940
23941 return NB_OK;
23942 }
23943
23944 /*
23945 * XPath:
23946 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/as-path-unchanged
23947 */
23948 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
23949 struct nb_cb_modify_args *args)
23950 {
23951 switch (args->event) {
23952 case NB_EV_VALIDATE:
23953 case NB_EV_PREPARE:
23954 case NB_EV_ABORT:
23955 return NB_OK;
23956 case NB_EV_APPLY:
23957 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23958 args, PEER_FLAG_AS_PATH_UNCHANGED,
23959 yang_dnode_get_bool(args->dnode, NULL));
23960
23961 break;
23962 }
23963
23964 return NB_OK;
23965 }
23966
23967 /*
23968 * XPath:
23969 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/next-hop-unchanged
23970 */
23971 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
23972 struct nb_cb_modify_args *args)
23973 {
23974 switch (args->event) {
23975 case NB_EV_VALIDATE:
23976 case NB_EV_PREPARE:
23977 case NB_EV_ABORT:
23978 return NB_OK;
23979 case NB_EV_APPLY:
23980 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
23981 args, PEER_FLAG_NEXTHOP_UNCHANGED,
23982 yang_dnode_get_bool(args->dnode, NULL));
23983
23984 break;
23985 }
23986
23987 return NB_OK;
23988 }
23989
23990 /*
23991 * XPath:
23992 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/med-unchanged
23993 */
23994 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_unchanged_modify(
23995 struct nb_cb_modify_args *args)
23996 {
23997 switch (args->event) {
23998 case NB_EV_VALIDATE:
23999 case NB_EV_PREPARE:
24000 case NB_EV_ABORT:
24001 return NB_OK;
24002 case NB_EV_APPLY:
24003 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24004 args, PEER_FLAG_MED_UNCHANGED,
24005 yang_dnode_get_bool(args->dnode, NULL));
24006
24007 break;
24008 }
24009
24010 return NB_OK;
24011 }
24012
24013 /*
24014 * XPath:
24015 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-send
24016 */
24017 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_modify(
24018 struct nb_cb_modify_args *args)
24019 {
24020 switch (args->event) {
24021 case NB_EV_VALIDATE:
24022 case NB_EV_PREPARE:
24023 case NB_EV_ABORT:
24024 case NB_EV_APPLY:
24025 /* TODO: implement me. */
24026 break;
24027 }
24028
24029 return NB_OK;
24030 }
24031
24032 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_destroy(
24033 struct nb_cb_destroy_args *args)
24034 {
24035 switch (args->event) {
24036 case NB_EV_VALIDATE:
24037 case NB_EV_PREPARE:
24038 case NB_EV_ABORT:
24039 case NB_EV_APPLY:
24040 /* TODO: implement me. */
24041 break;
24042 }
24043
24044 return NB_OK;
24045 }
24046
24047 /*
24048 * XPath:
24049 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-receive
24050 */
24051 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_modify(
24052 struct nb_cb_modify_args *args)
24053 {
24054 switch (args->event) {
24055 case NB_EV_VALIDATE:
24056 case NB_EV_PREPARE:
24057 case NB_EV_ABORT:
24058 case NB_EV_APPLY:
24059 /* TODO: implement me. */
24060 break;
24061 }
24062
24063 return NB_OK;
24064 }
24065
24066 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_destroy(
24067 struct nb_cb_destroy_args *args)
24068 {
24069 switch (args->event) {
24070 case NB_EV_VALIDATE:
24071 case NB_EV_PREPARE:
24072 case NB_EV_ABORT:
24073 case NB_EV_APPLY:
24074 /* TODO: implement me. */
24075 break;
24076 }
24077
24078 return NB_OK;
24079 }
24080
24081 /*
24082 * XPath:
24083 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-both
24084 */
24085 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_modify(
24086 struct nb_cb_modify_args *args)
24087 {
24088 switch (args->event) {
24089 case NB_EV_VALIDATE:
24090 case NB_EV_PREPARE:
24091 case NB_EV_ABORT:
24092 case NB_EV_APPLY:
24093 /* TODO: implement me. */
24094 break;
24095 }
24096
24097 return NB_OK;
24098 }
24099
24100 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_destroy(
24101 struct nb_cb_destroy_args *args)
24102 {
24103 switch (args->event) {
24104 case NB_EV_VALIDATE:
24105 case NB_EV_PREPARE:
24106 case NB_EV_ABORT:
24107 case NB_EV_APPLY:
24108 /* TODO: implement me. */
24109 break;
24110 }
24111
24112 return NB_OK;
24113 }
24114
24115 /*
24116 * XPath:
24117 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list
24118 */
24119 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create(
24120 struct nb_cb_create_args *args)
24121 {
24122 switch (args->event) {
24123 case NB_EV_VALIDATE:
24124 case NB_EV_PREPARE:
24125 case NB_EV_ABORT:
24126 case NB_EV_APPLY:
24127 /* TODO: implement me. */
24128 break;
24129 }
24130
24131 return NB_OK;
24132 }
24133
24134 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy(
24135 struct nb_cb_destroy_args *args)
24136 {
24137 switch (args->event) {
24138 case NB_EV_VALIDATE:
24139 case NB_EV_PREPARE:
24140 case NB_EV_ABORT:
24141 return NB_OK;
24142 case NB_EV_APPLY:
24143 return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
24144 args);
24145 }
24146
24147 return NB_OK;
24148 }
24149
24150 /*
24151 * XPath:
24152 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/max-prefixes
24153 */
24154 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
24155 struct nb_cb_modify_args *args)
24156 {
24157 switch (args->event) {
24158 case NB_EV_VALIDATE:
24159 case NB_EV_PREPARE:
24160 case NB_EV_ABORT:
24161 case NB_EV_APPLY:
24162 /* TODO: implement me. */
24163 break;
24164 }
24165
24166 return NB_OK;
24167 }
24168
24169 /*
24170 * XPath:
24171 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check
24172 */
24173 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
24174 struct nb_cb_modify_args *args)
24175 {
24176 switch (args->event) {
24177 case NB_EV_VALIDATE:
24178 case NB_EV_PREPARE:
24179 case NB_EV_ABORT:
24180 case NB_EV_APPLY:
24181 /* TODO: implement me. */
24182 break;
24183 }
24184
24185 return NB_OK;
24186 }
24187
24188 /*
24189 * XPath:
24190 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only
24191 */
24192 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
24193 struct nb_cb_modify_args *args)
24194 {
24195 switch (args->event) {
24196 case NB_EV_VALIDATE:
24197 case NB_EV_PREPARE:
24198 case NB_EV_ABORT:
24199 case NB_EV_APPLY:
24200 /* TODO: implement me. */
24201 break;
24202 }
24203
24204 return NB_OK;
24205 }
24206
24207 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
24208 struct nb_cb_destroy_args *args)
24209 {
24210 switch (args->event) {
24211 case NB_EV_VALIDATE:
24212 case NB_EV_PREPARE:
24213 case NB_EV_ABORT:
24214 case NB_EV_APPLY:
24215 /* TODO: implement me. */
24216 break;
24217 }
24218
24219 return NB_OK;
24220 }
24221
24222 /*
24223 * XPath:
24224 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer
24225 */
24226 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
24227 struct nb_cb_modify_args *args)
24228 {
24229 switch (args->event) {
24230 case NB_EV_VALIDATE:
24231 case NB_EV_PREPARE:
24232 case NB_EV_ABORT:
24233 case NB_EV_APPLY:
24234 /* TODO: implement me. */
24235 break;
24236 }
24237
24238 return NB_OK;
24239 }
24240
24241 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
24242 struct nb_cb_destroy_args *args)
24243 {
24244 switch (args->event) {
24245 case NB_EV_VALIDATE:
24246 case NB_EV_PREPARE:
24247 case NB_EV_ABORT:
24248 case NB_EV_APPLY:
24249 /* TODO: implement me. */
24250 break;
24251 }
24252
24253 return NB_OK;
24254 }
24255
24256 /*
24257 * XPath:
24258 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
24259 */
24260 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
24261 struct nb_cb_modify_args *args)
24262 {
24263 switch (args->event) {
24264 case NB_EV_VALIDATE:
24265 case NB_EV_PREPARE:
24266 case NB_EV_ABORT:
24267 case NB_EV_APPLY:
24268 /* TODO: implement me. */
24269 break;
24270 }
24271
24272 return NB_OK;
24273 }
24274
24275 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
24276 struct nb_cb_destroy_args *args)
24277 {
24278 switch (args->event) {
24279 case NB_EV_VALIDATE:
24280 case NB_EV_PREPARE:
24281 case NB_EV_ABORT:
24282 case NB_EV_APPLY:
24283 /* TODO: implement me. */
24284 break;
24285 }
24286
24287 return NB_OK;
24288 }
24289
24290 /*
24291 * XPath:
24292 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
24293 */
24294 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
24295 struct nb_cb_modify_args *args)
24296 {
24297 switch (args->event) {
24298 case NB_EV_VALIDATE:
24299 case NB_EV_PREPARE:
24300 case NB_EV_ABORT:
24301 case NB_EV_APPLY:
24302 /* TODO: implement me. */
24303 break;
24304 }
24305
24306 return NB_OK;
24307 }
24308
24309 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
24310 struct nb_cb_destroy_args *args)
24311 {
24312 switch (args->event) {
24313 case NB_EV_VALIDATE:
24314 case NB_EV_PREPARE:
24315 case NB_EV_ABORT:
24316 case NB_EV_APPLY:
24317 /* TODO: implement me. */
24318 break;
24319 }
24320
24321 return NB_OK;
24322 }
24323
24324 /*
24325 * XPath:
24326 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer
24327 */
24328 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
24329 struct nb_cb_modify_args *args)
24330 {
24331 switch (args->event) {
24332 case NB_EV_VALIDATE:
24333 case NB_EV_PREPARE:
24334 case NB_EV_ABORT:
24335 case NB_EV_APPLY:
24336 /* TODO: implement me. */
24337 break;
24338 }
24339
24340 return NB_OK;
24341 }
24342
24343 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
24344 struct nb_cb_destroy_args *args)
24345 {
24346 switch (args->event) {
24347 case NB_EV_VALIDATE:
24348 case NB_EV_PREPARE:
24349 case NB_EV_ABORT:
24350 case NB_EV_APPLY:
24351 /* TODO: implement me. */
24352 break;
24353 }
24354
24355 return NB_OK;
24356 }
24357
24358 /*
24359 * XPath:
24360 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
24361 */
24362 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
24363 struct nb_cb_modify_args *args)
24364 {
24365 switch (args->event) {
24366 case NB_EV_VALIDATE:
24367 case NB_EV_PREPARE:
24368 case NB_EV_ABORT:
24369 case NB_EV_APPLY:
24370 /* TODO: implement me. */
24371 break;
24372 }
24373
24374 return NB_OK;
24375 }
24376
24377 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
24378 struct nb_cb_destroy_args *args)
24379 {
24380 switch (args->event) {
24381 case NB_EV_VALIDATE:
24382 case NB_EV_PREPARE:
24383 case NB_EV_ABORT:
24384 case NB_EV_APPLY:
24385 /* TODO: implement me. */
24386 break;
24387 }
24388
24389 return NB_OK;
24390 }
24391
24392 /*
24393 * XPath:
24394 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only
24395 */
24396 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
24397 struct nb_cb_modify_args *args)
24398 {
24399 switch (args->event) {
24400 case NB_EV_VALIDATE:
24401 case NB_EV_PREPARE:
24402 case NB_EV_ABORT:
24403 case NB_EV_APPLY:
24404 /* TODO: implement me. */
24405 break;
24406 }
24407
24408 return NB_OK;
24409 }
24410
24411 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
24412 struct nb_cb_destroy_args *args)
24413 {
24414 switch (args->event) {
24415 case NB_EV_VALIDATE:
24416 case NB_EV_PREPARE:
24417 case NB_EV_ABORT:
24418 case NB_EV_APPLY:
24419 /* TODO: implement me. */
24420 break;
24421 }
24422
24423 return NB_OK;
24424 }
24425
24426 /*
24427 * XPath:
24428 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self
24429 */
24430 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify(
24431 struct nb_cb_modify_args *args)
24432 {
24433 switch (args->event) {
24434 case NB_EV_VALIDATE:
24435 case NB_EV_PREPARE:
24436 case NB_EV_ABORT:
24437 return NB_OK;
24438 case NB_EV_APPLY:
24439 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24440 args, PEER_FLAG_NEXTHOP_SELF,
24441 yang_dnode_get_bool(args->dnode, NULL));
24442
24443 break;
24444 }
24445
24446 return NB_OK;
24447 }
24448
24449 /*
24450 * XPath:
24451 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self-force
24452 */
24453 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
24454 struct nb_cb_modify_args *args)
24455 {
24456 switch (args->event) {
24457 case NB_EV_VALIDATE:
24458 case NB_EV_PREPARE:
24459 case NB_EV_ABORT:
24460 return NB_OK;
24461 case NB_EV_APPLY:
24462 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24463 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
24464 yang_dnode_get_bool(args->dnode, NULL));
24465
24466 break;
24467 }
24468
24469 return NB_OK;
24470 }
24471
24472 /*
24473 * XPath:
24474 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all
24475 */
24476 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_modify(
24477 struct nb_cb_modify_args *args)
24478 {
24479 switch (args->event) {
24480 case NB_EV_VALIDATE:
24481 case NB_EV_PREPARE:
24482 case NB_EV_ABORT:
24483 return NB_OK;
24484 case NB_EV_APPLY:
24485 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24486 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
24487 yang_dnode_get_bool(args->dnode, NULL));
24488
24489 break;
24490 }
24491
24492 return NB_OK;
24493 }
24494
24495 /*
24496 * XPath:
24497 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all-replace
24498 */
24499 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
24500 struct nb_cb_modify_args *args)
24501 {
24502 switch (args->event) {
24503 case NB_EV_VALIDATE:
24504 case NB_EV_PREPARE:
24505 case NB_EV_ABORT:
24506 return NB_OK;
24507 case NB_EV_APPLY:
24508 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24509 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
24510 yang_dnode_get_bool(args->dnode, NULL));
24511
24512 break;
24513 }
24514
24515 return NB_OK;
24516 }
24517
24518 /*
24519 * XPath:
24520 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as
24521 */
24522 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_modify(
24523 struct nb_cb_modify_args *args)
24524 {
24525 switch (args->event) {
24526 case NB_EV_VALIDATE:
24527 case NB_EV_PREPARE:
24528 case NB_EV_ABORT:
24529 return NB_OK;
24530 case NB_EV_APPLY:
24531 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24532 args, PEER_FLAG_REMOVE_PRIVATE_AS,
24533 yang_dnode_get_bool(args->dnode, NULL));
24534
24535 break;
24536 }
24537
24538 return NB_OK;
24539 }
24540
24541 /*
24542 * XPath:
24543 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-replace
24544 */
24545 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_replace_modify(
24546 struct nb_cb_modify_args *args)
24547 {
24548 switch (args->event) {
24549 case NB_EV_VALIDATE:
24550 case NB_EV_PREPARE:
24551 case NB_EV_ABORT:
24552 return NB_OK;
24553 case NB_EV_APPLY:
24554 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24555 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
24556 yang_dnode_get_bool(args->dnode, NULL));
24557
24558 break;
24559 }
24560
24561 return NB_OK;
24562 }
24563
24564 /*
24565 * XPath:
24566 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/route-reflector/route-reflector-client
24567 */
24568 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_route_reflector_route_reflector_client_modify(
24569 struct nb_cb_modify_args *args)
24570 {
24571 switch (args->event) {
24572 case NB_EV_VALIDATE:
24573 case NB_EV_PREPARE:
24574 case NB_EV_ABORT:
24575 return NB_OK;
24576 case NB_EV_APPLY:
24577 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24578 args, PEER_FLAG_REFLECTOR_CLIENT,
24579 yang_dnode_get_bool(args->dnode, NULL));
24580
24581 break;
24582 }
24583
24584 return NB_OK;
24585 }
24586
24587 /*
24588 * XPath:
24589 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/route-server/route-server-client
24590 */
24591 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_route_server_route_server_client_modify(
24592 struct nb_cb_modify_args *args)
24593 {
24594 switch (args->event) {
24595 case NB_EV_VALIDATE:
24596 case NB_EV_PREPARE:
24597 case NB_EV_ABORT:
24598 return NB_OK;
24599 case NB_EV_APPLY:
24600 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24601 args, PEER_FLAG_RSERVER_CLIENT,
24602 yang_dnode_get_bool(args->dnode, NULL));
24603
24604 break;
24605 }
24606
24607 return NB_OK;
24608 }
24609
24610 /*
24611 * XPath:
24612 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-community
24613 */
24614 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_community_modify(
24615 struct nb_cb_modify_args *args)
24616 {
24617 switch (args->event) {
24618 case NB_EV_VALIDATE:
24619 case NB_EV_PREPARE:
24620 case NB_EV_ABORT:
24621 return NB_OK;
24622 case NB_EV_APPLY:
24623 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24624 args, PEER_FLAG_SEND_COMMUNITY,
24625 yang_dnode_get_bool(args->dnode, NULL));
24626
24627 break;
24628 }
24629
24630 return NB_OK;
24631 }
24632
24633 /*
24634 * XPath:
24635 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-ext-community
24636 */
24637 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_ext_community_modify(
24638 struct nb_cb_modify_args *args)
24639 {
24640 switch (args->event) {
24641 case NB_EV_VALIDATE:
24642 case NB_EV_PREPARE:
24643 case NB_EV_ABORT:
24644 return NB_OK;
24645 case NB_EV_APPLY:
24646 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24647 args, PEER_FLAG_SEND_EXT_COMMUNITY,
24648 yang_dnode_get_bool(args->dnode, NULL));
24649
24650 break;
24651 }
24652
24653 return NB_OK;
24654 }
24655
24656 /*
24657 * XPath:
24658 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-large-community
24659 */
24660 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_large_community_modify(
24661 struct nb_cb_modify_args *args)
24662 {
24663 switch (args->event) {
24664 case NB_EV_VALIDATE:
24665 case NB_EV_PREPARE:
24666 case NB_EV_ABORT:
24667 return NB_OK;
24668 case NB_EV_APPLY:
24669 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24670 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
24671 yang_dnode_get_bool(args->dnode, NULL));
24672
24673 break;
24674 }
24675
24676 return NB_OK;
24677 }
24678
24679 /*
24680 * XPath:
24681 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/soft-reconfiguration
24682 */
24683 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_modify(
24684 struct nb_cb_modify_args *args)
24685 {
24686 switch (args->event) {
24687 case NB_EV_VALIDATE:
24688 case NB_EV_PREPARE:
24689 case NB_EV_ABORT:
24690 return NB_OK;
24691 case NB_EV_APPLY:
24692 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24693 args, PEER_FLAG_SOFT_RECONFIG,
24694 yang_dnode_get_bool(args->dnode, NULL));
24695
24696 break;
24697 }
24698
24699 return NB_OK;
24700 }
24701
24702 /*
24703 * XPath:
24704 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/weight/weight-attribute
24705 */
24706 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_modify(
24707 struct nb_cb_modify_args *args)
24708 {
24709 switch (args->event) {
24710 case NB_EV_VALIDATE:
24711 case NB_EV_PREPARE:
24712 case NB_EV_ABORT:
24713 return NB_OK;
24714 case NB_EV_APPLY:
24715 return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
24716
24717 break;
24718 }
24719
24720 return NB_OK;
24721 }
24722
24723 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_destroy(
24724 struct nb_cb_destroy_args *args)
24725 {
24726 switch (args->event) {
24727 case NB_EV_VALIDATE:
24728 case NB_EV_PREPARE:
24729 case NB_EV_ABORT:
24730 return NB_OK;
24731 case NB_EV_APPLY:
24732 return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
24733
24734 break;
24735 }
24736
24737 return NB_OK;
24738 }
24739
24740 /*
24741 * XPath:
24742 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/add-paths/path-type
24743 */
24744 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_add_paths_path_type_modify(
24745 struct nb_cb_modify_args *args)
24746 {
24747 switch (args->event) {
24748 case NB_EV_VALIDATE:
24749 case NB_EV_PREPARE:
24750 case NB_EV_ABORT:
24751 case NB_EV_APPLY:
24752 /* TODO: implement me. */
24753 break;
24754 }
24755
24756 return NB_OK;
24757 }
24758
24759 /*
24760 * XPath:
24761 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-as
24762 */
24763 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_modify(
24764 struct nb_cb_modify_args *args)
24765 {
24766 switch (args->event) {
24767 case NB_EV_VALIDATE:
24768 case NB_EV_PREPARE:
24769 case NB_EV_ABORT:
24770 case NB_EV_APPLY:
24771 /* TODO: implement me. */
24772 break;
24773 }
24774
24775 return NB_OK;
24776 }
24777
24778 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_destroy(
24779 struct nb_cb_destroy_args *args)
24780 {
24781 switch (args->event) {
24782 case NB_EV_VALIDATE:
24783 case NB_EV_PREPARE:
24784 case NB_EV_ABORT:
24785 case NB_EV_APPLY:
24786 /* TODO: implement me. */
24787 break;
24788 }
24789
24790 return NB_OK;
24791 }
24792
24793 /*
24794 * XPath:
24795 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-origin-as
24796 */
24797 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_modify(
24798 struct nb_cb_modify_args *args)
24799 {
24800 switch (args->event) {
24801 case NB_EV_VALIDATE:
24802 case NB_EV_PREPARE:
24803 case NB_EV_ABORT:
24804 case NB_EV_APPLY:
24805 /* TODO: implement me. */
24806 break;
24807 }
24808
24809 return NB_OK;
24810 }
24811
24812 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_destroy(
24813 struct nb_cb_destroy_args *args)
24814 {
24815 switch (args->event) {
24816 case NB_EV_VALIDATE:
24817 case NB_EV_PREPARE:
24818 case NB_EV_ABORT:
24819 case NB_EV_APPLY:
24820 /* TODO: implement me. */
24821 break;
24822 }
24823
24824 return NB_OK;
24825 }
24826
24827 /*
24828 * XPath:
24829 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/replace-peer-as
24830 */
24831 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify(
24832 struct nb_cb_modify_args *args)
24833 {
24834 switch (args->event) {
24835 case NB_EV_VALIDATE:
24836 case NB_EV_PREPARE:
24837 case NB_EV_ABORT:
24838 return NB_OK;
24839 case NB_EV_APPLY:
24840 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24841 args, PEER_FLAG_AS_OVERRIDE,
24842 yang_dnode_get_bool(args->dnode, NULL));
24843
24844 break;
24845 }
24846
24847 return NB_OK;
24848 }
24849
24850 /*
24851 * XPath:
24852 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/originate
24853 */
24854 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify(
24855 struct nb_cb_modify_args *args)
24856 {
24857 switch (args->event) {
24858 case NB_EV_VALIDATE:
24859 case NB_EV_PREPARE:
24860 case NB_EV_ABORT:
24861 case NB_EV_APPLY:
24862 /* TODO: implement me. */
24863 break;
24864 }
24865
24866 return NB_OK;
24867 }
24868
24869 /*
24870 * XPath:
24871 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map
24872 */
24873 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify(
24874 struct nb_cb_modify_args *args)
24875 {
24876 switch (args->event) {
24877 case NB_EV_VALIDATE:
24878 case NB_EV_PREPARE:
24879 case NB_EV_ABORT:
24880 case NB_EV_APPLY:
24881 /* TODO: implement me. */
24882 break;
24883 }
24884
24885 return NB_OK;
24886 }
24887
24888 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy(
24889 struct nb_cb_destroy_args *args)
24890 {
24891 switch (args->event) {
24892 case NB_EV_VALIDATE:
24893 case NB_EV_PREPARE:
24894 case NB_EV_ABORT:
24895 case NB_EV_APPLY:
24896 /* TODO: implement me. */
24897 break;
24898 }
24899
24900 return NB_OK;
24901 }
24902
24903 /*
24904 * XPath:
24905 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/as-path-unchanged
24906 */
24907 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify(
24908 struct nb_cb_modify_args *args)
24909 {
24910 switch (args->event) {
24911 case NB_EV_VALIDATE:
24912 case NB_EV_PREPARE:
24913 case NB_EV_ABORT:
24914 return NB_OK;
24915 case NB_EV_APPLY:
24916 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24917 args, PEER_FLAG_AS_PATH_UNCHANGED,
24918 yang_dnode_get_bool(args->dnode, NULL));
24919
24920 break;
24921 }
24922
24923 return NB_OK;
24924 }
24925
24926 /*
24927 * XPath:
24928 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/next-hop-unchanged
24929 */
24930 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify(
24931 struct nb_cb_modify_args *args)
24932 {
24933 switch (args->event) {
24934 case NB_EV_VALIDATE:
24935 case NB_EV_PREPARE:
24936 case NB_EV_ABORT:
24937 return NB_OK;
24938 case NB_EV_APPLY:
24939 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24940 args, PEER_FLAG_NEXTHOP_UNCHANGED,
24941 yang_dnode_get_bool(args->dnode, NULL));
24942
24943 break;
24944 }
24945
24946 return NB_OK;
24947 }
24948
24949 /*
24950 * XPath:
24951 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/med-unchanged
24952 */
24953 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_unchanged_modify(
24954 struct nb_cb_modify_args *args)
24955 {
24956 switch (args->event) {
24957 case NB_EV_VALIDATE:
24958 case NB_EV_PREPARE:
24959 case NB_EV_ABORT:
24960 return NB_OK;
24961 case NB_EV_APPLY:
24962 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
24963 args, PEER_FLAG_MED_UNCHANGED,
24964 yang_dnode_get_bool(args->dnode, NULL));
24965
24966 break;
24967 }
24968
24969 return NB_OK;
24970 }
24971
24972 /*
24973 * XPath:
24974 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-send
24975 */
24976 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_modify(
24977 struct nb_cb_modify_args *args)
24978 {
24979 switch (args->event) {
24980 case NB_EV_VALIDATE:
24981 case NB_EV_PREPARE:
24982 case NB_EV_ABORT:
24983 case NB_EV_APPLY:
24984 /* TODO: implement me. */
24985 break;
24986 }
24987
24988 return NB_OK;
24989 }
24990
24991 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_destroy(
24992 struct nb_cb_destroy_args *args)
24993 {
24994 switch (args->event) {
24995 case NB_EV_VALIDATE:
24996 case NB_EV_PREPARE:
24997 case NB_EV_ABORT:
24998 case NB_EV_APPLY:
24999 /* TODO: implement me. */
25000 break;
25001 }
25002
25003 return NB_OK;
25004 }
25005
25006 /*
25007 * XPath:
25008 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-receive
25009 */
25010 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_modify(
25011 struct nb_cb_modify_args *args)
25012 {
25013 switch (args->event) {
25014 case NB_EV_VALIDATE:
25015 case NB_EV_PREPARE:
25016 case NB_EV_ABORT:
25017 case NB_EV_APPLY:
25018 /* TODO: implement me. */
25019 break;
25020 }
25021
25022 return NB_OK;
25023 }
25024
25025 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_destroy(
25026 struct nb_cb_destroy_args *args)
25027 {
25028 switch (args->event) {
25029 case NB_EV_VALIDATE:
25030 case NB_EV_PREPARE:
25031 case NB_EV_ABORT:
25032 case NB_EV_APPLY:
25033 /* TODO: implement me. */
25034 break;
25035 }
25036
25037 return NB_OK;
25038 }
25039
25040 /*
25041 * XPath:
25042 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-both
25043 */
25044 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_modify(
25045 struct nb_cb_modify_args *args)
25046 {
25047 switch (args->event) {
25048 case NB_EV_VALIDATE:
25049 case NB_EV_PREPARE:
25050 case NB_EV_ABORT:
25051 case NB_EV_APPLY:
25052 /* TODO: implement me. */
25053 break;
25054 }
25055
25056 return NB_OK;
25057 }
25058
25059 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_destroy(
25060 struct nb_cb_destroy_args *args)
25061 {
25062 switch (args->event) {
25063 case NB_EV_VALIDATE:
25064 case NB_EV_PREPARE:
25065 case NB_EV_ABORT:
25066 case NB_EV_APPLY:
25067 /* TODO: implement me. */
25068 break;
25069 }
25070
25071 return NB_OK;
25072 }
25073
25074 /*
25075 * XPath:
25076 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list
25077 */
25078 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create(
25079 struct nb_cb_create_args *args)
25080 {
25081 switch (args->event) {
25082 case NB_EV_VALIDATE:
25083 case NB_EV_PREPARE:
25084 case NB_EV_ABORT:
25085 case NB_EV_APPLY:
25086 /* TODO: implement me. */
25087 break;
25088 }
25089
25090 return NB_OK;
25091 }
25092
25093 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy(
25094 struct nb_cb_destroy_args *args)
25095 {
25096 switch (args->event) {
25097 case NB_EV_VALIDATE:
25098 case NB_EV_PREPARE:
25099 case NB_EV_ABORT:
25100 return NB_OK;
25101 case NB_EV_APPLY:
25102 return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
25103 args);
25104 }
25105
25106 return NB_OK;
25107 }
25108
25109 /*
25110 * XPath:
25111 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/max-prefixes
25112 */
25113 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify(
25114 struct nb_cb_modify_args *args)
25115 {
25116 switch (args->event) {
25117 case NB_EV_VALIDATE:
25118 case NB_EV_PREPARE:
25119 case NB_EV_ABORT:
25120 case NB_EV_APPLY:
25121 /* TODO: implement me. */
25122 break;
25123 }
25124
25125 return NB_OK;
25126 }
25127
25128 /*
25129 * XPath:
25130 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check
25131 */
25132 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify(
25133 struct nb_cb_modify_args *args)
25134 {
25135 switch (args->event) {
25136 case NB_EV_VALIDATE:
25137 case NB_EV_PREPARE:
25138 case NB_EV_ABORT:
25139 case NB_EV_APPLY:
25140 /* TODO: implement me. */
25141 break;
25142 }
25143
25144 return NB_OK;
25145 }
25146
25147 /*
25148 * XPath:
25149 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only
25150 */
25151 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify(
25152 struct nb_cb_modify_args *args)
25153 {
25154 switch (args->event) {
25155 case NB_EV_VALIDATE:
25156 case NB_EV_PREPARE:
25157 case NB_EV_ABORT:
25158 case NB_EV_APPLY:
25159 /* TODO: implement me. */
25160 break;
25161 }
25162
25163 return NB_OK;
25164 }
25165
25166 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy(
25167 struct nb_cb_destroy_args *args)
25168 {
25169 switch (args->event) {
25170 case NB_EV_VALIDATE:
25171 case NB_EV_PREPARE:
25172 case NB_EV_ABORT:
25173 case NB_EV_APPLY:
25174 /* TODO: implement me. */
25175 break;
25176 }
25177
25178 return NB_OK;
25179 }
25180
25181 /*
25182 * XPath:
25183 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer
25184 */
25185 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify(
25186 struct nb_cb_modify_args *args)
25187 {
25188 switch (args->event) {
25189 case NB_EV_VALIDATE:
25190 case NB_EV_PREPARE:
25191 case NB_EV_ABORT:
25192 case NB_EV_APPLY:
25193 /* TODO: implement me. */
25194 break;
25195 }
25196
25197 return NB_OK;
25198 }
25199
25200 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
25201 struct nb_cb_destroy_args *args)
25202 {
25203 switch (args->event) {
25204 case NB_EV_VALIDATE:
25205 case NB_EV_PREPARE:
25206 case NB_EV_ABORT:
25207 case NB_EV_APPLY:
25208 /* TODO: implement me. */
25209 break;
25210 }
25211
25212 return NB_OK;
25213 }
25214
25215 /*
25216 * XPath:
25217 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct
25218 */
25219 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
25220 struct nb_cb_modify_args *args)
25221 {
25222 switch (args->event) {
25223 case NB_EV_VALIDATE:
25224 case NB_EV_PREPARE:
25225 case NB_EV_ABORT:
25226 case NB_EV_APPLY:
25227 /* TODO: implement me. */
25228 break;
25229 }
25230
25231 return NB_OK;
25232 }
25233
25234 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
25235 struct nb_cb_destroy_args *args)
25236 {
25237 switch (args->event) {
25238 case NB_EV_VALIDATE:
25239 case NB_EV_PREPARE:
25240 case NB_EV_ABORT:
25241 case NB_EV_APPLY:
25242 /* TODO: implement me. */
25243 break;
25244 }
25245
25246 return NB_OK;
25247 }
25248
25249 /*
25250 * XPath:
25251 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
25252 */
25253 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
25254 struct nb_cb_modify_args *args)
25255 {
25256 switch (args->event) {
25257 case NB_EV_VALIDATE:
25258 case NB_EV_PREPARE:
25259 case NB_EV_ABORT:
25260 case NB_EV_APPLY:
25261 /* TODO: implement me. */
25262 break;
25263 }
25264
25265 return NB_OK;
25266 }
25267
25268 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
25269 struct nb_cb_destroy_args *args)
25270 {
25271 switch (args->event) {
25272 case NB_EV_VALIDATE:
25273 case NB_EV_PREPARE:
25274 case NB_EV_ABORT:
25275 case NB_EV_APPLY:
25276 /* TODO: implement me. */
25277 break;
25278 }
25279
25280 return NB_OK;
25281 }
25282
25283 /*
25284 * XPath:
25285 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer
25286 */
25287 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
25288 struct nb_cb_modify_args *args)
25289 {
25290 switch (args->event) {
25291 case NB_EV_VALIDATE:
25292 case NB_EV_PREPARE:
25293 case NB_EV_ABORT:
25294 case NB_EV_APPLY:
25295 /* TODO: implement me. */
25296 break;
25297 }
25298
25299 return NB_OK;
25300 }
25301
25302 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
25303 struct nb_cb_destroy_args *args)
25304 {
25305 switch (args->event) {
25306 case NB_EV_VALIDATE:
25307 case NB_EV_PREPARE:
25308 case NB_EV_ABORT:
25309 case NB_EV_APPLY:
25310 /* TODO: implement me. */
25311 break;
25312 }
25313
25314 return NB_OK;
25315 }
25316
25317 /*
25318 * XPath:
25319 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
25320 */
25321 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
25322 struct nb_cb_modify_args *args)
25323 {
25324 switch (args->event) {
25325 case NB_EV_VALIDATE:
25326 case NB_EV_PREPARE:
25327 case NB_EV_ABORT:
25328 case NB_EV_APPLY:
25329 /* TODO: implement me. */
25330 break;
25331 }
25332
25333 return NB_OK;
25334 }
25335
25336 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
25337 struct nb_cb_destroy_args *args)
25338 {
25339 switch (args->event) {
25340 case NB_EV_VALIDATE:
25341 case NB_EV_PREPARE:
25342 case NB_EV_ABORT:
25343 case NB_EV_APPLY:
25344 /* TODO: implement me. */
25345 break;
25346 }
25347
25348 return NB_OK;
25349 }
25350
25351 /*
25352 * XPath:
25353 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only
25354 */
25355 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
25356 struct nb_cb_modify_args *args)
25357 {
25358 switch (args->event) {
25359 case NB_EV_VALIDATE:
25360 case NB_EV_PREPARE:
25361 case NB_EV_ABORT:
25362 case NB_EV_APPLY:
25363 /* TODO: implement me. */
25364 break;
25365 }
25366
25367 return NB_OK;
25368 }
25369
25370 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
25371 struct nb_cb_destroy_args *args)
25372 {
25373 switch (args->event) {
25374 case NB_EV_VALIDATE:
25375 case NB_EV_PREPARE:
25376 case NB_EV_ABORT:
25377 case NB_EV_APPLY:
25378 /* TODO: implement me. */
25379 break;
25380 }
25381
25382 return NB_OK;
25383 }
25384
25385 /*
25386 * XPath:
25387 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self
25388 */
25389 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify(
25390 struct nb_cb_modify_args *args)
25391 {
25392 switch (args->event) {
25393 case NB_EV_VALIDATE:
25394 case NB_EV_PREPARE:
25395 case NB_EV_ABORT:
25396 return NB_OK;
25397 case NB_EV_APPLY:
25398 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25399 args, PEER_FLAG_NEXTHOP_SELF,
25400 yang_dnode_get_bool(args->dnode, NULL));
25401
25402 break;
25403 }
25404
25405 return NB_OK;
25406 }
25407
25408 /*
25409 * XPath:
25410 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self-force
25411 */
25412 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_force_modify(
25413 struct nb_cb_modify_args *args)
25414 {
25415 switch (args->event) {
25416 case NB_EV_VALIDATE:
25417 case NB_EV_PREPARE:
25418 case NB_EV_ABORT:
25419 return NB_OK;
25420 case NB_EV_APPLY:
25421 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25422 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
25423 yang_dnode_get_bool(args->dnode, NULL));
25424
25425 break;
25426 }
25427
25428 return NB_OK;
25429 }
25430
25431 /*
25432 * XPath:
25433 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all
25434 */
25435 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_modify(
25436 struct nb_cb_modify_args *args)
25437 {
25438 switch (args->event) {
25439 case NB_EV_VALIDATE:
25440 case NB_EV_PREPARE:
25441 case NB_EV_ABORT:
25442 return NB_OK;
25443 case NB_EV_APPLY:
25444 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25445 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
25446 yang_dnode_get_bool(args->dnode, NULL));
25447
25448 break;
25449 }
25450
25451 return NB_OK;
25452 }
25453
25454 /*
25455 * XPath:
25456 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all-replace
25457 */
25458 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_replace_modify(
25459 struct nb_cb_modify_args *args)
25460 {
25461 switch (args->event) {
25462 case NB_EV_VALIDATE:
25463 case NB_EV_PREPARE:
25464 case NB_EV_ABORT:
25465 return NB_OK;
25466 case NB_EV_APPLY:
25467 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25468 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
25469 yang_dnode_get_bool(args->dnode, NULL));
25470
25471 break;
25472 }
25473
25474 return NB_OK;
25475 }
25476
25477 /*
25478 * XPath:
25479 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as
25480 */
25481 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_modify(
25482 struct nb_cb_modify_args *args)
25483 {
25484 switch (args->event) {
25485 case NB_EV_VALIDATE:
25486 case NB_EV_PREPARE:
25487 case NB_EV_ABORT:
25488 return NB_OK;
25489 case NB_EV_APPLY:
25490 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25491 args, PEER_FLAG_REMOVE_PRIVATE_AS,
25492 yang_dnode_get_bool(args->dnode, NULL));
25493
25494 break;
25495 }
25496
25497 return NB_OK;
25498 }
25499
25500 /*
25501 * XPath:
25502 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-replace
25503 */
25504 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_replace_modify(
25505 struct nb_cb_modify_args *args)
25506 {
25507 switch (args->event) {
25508 case NB_EV_VALIDATE:
25509 case NB_EV_PREPARE:
25510 case NB_EV_ABORT:
25511 return NB_OK;
25512 case NB_EV_APPLY:
25513 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25514 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
25515 yang_dnode_get_bool(args->dnode, NULL));
25516
25517 break;
25518 }
25519
25520 return NB_OK;
25521 }
25522
25523 /*
25524 * XPath:
25525 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/route-reflector/route-reflector-client
25526 */
25527 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_route_reflector_route_reflector_client_modify(
25528 struct nb_cb_modify_args *args)
25529 {
25530 switch (args->event) {
25531 case NB_EV_VALIDATE:
25532 case NB_EV_PREPARE:
25533 case NB_EV_ABORT:
25534 return NB_OK;
25535 case NB_EV_APPLY:
25536 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25537 args, PEER_FLAG_REFLECTOR_CLIENT,
25538 yang_dnode_get_bool(args->dnode, NULL));
25539
25540 break;
25541 }
25542
25543 return NB_OK;
25544 }
25545
25546 /*
25547 * XPath:
25548 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/route-server/route-server-client
25549 */
25550 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_route_server_route_server_client_modify(
25551 struct nb_cb_modify_args *args)
25552 {
25553 switch (args->event) {
25554 case NB_EV_VALIDATE:
25555 case NB_EV_PREPARE:
25556 case NB_EV_ABORT:
25557 return NB_OK;
25558 case NB_EV_APPLY:
25559 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25560 args, PEER_FLAG_RSERVER_CLIENT,
25561 yang_dnode_get_bool(args->dnode, NULL));
25562
25563 break;
25564 }
25565
25566 return NB_OK;
25567 }
25568
25569 /*
25570 * XPath:
25571 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-community
25572 */
25573 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_community_modify(
25574 struct nb_cb_modify_args *args)
25575 {
25576 switch (args->event) {
25577 case NB_EV_VALIDATE:
25578 case NB_EV_PREPARE:
25579 case NB_EV_ABORT:
25580 return NB_OK;
25581 case NB_EV_APPLY:
25582 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25583 args, PEER_FLAG_SEND_COMMUNITY,
25584 yang_dnode_get_bool(args->dnode, NULL));
25585
25586 break;
25587 }
25588
25589 return NB_OK;
25590 }
25591
25592 /*
25593 * XPath:
25594 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-ext-community
25595 */
25596 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_ext_community_modify(
25597 struct nb_cb_modify_args *args)
25598 {
25599 switch (args->event) {
25600 case NB_EV_VALIDATE:
25601 case NB_EV_PREPARE:
25602 case NB_EV_ABORT:
25603 return NB_OK;
25604 case NB_EV_APPLY:
25605 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25606 args, PEER_FLAG_SEND_EXT_COMMUNITY,
25607 yang_dnode_get_bool(args->dnode, NULL));
25608
25609 break;
25610 }
25611
25612 return NB_OK;
25613 }
25614
25615 /*
25616 * XPath:
25617 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-large-community
25618 */
25619 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_large_community_modify(
25620 struct nb_cb_modify_args *args)
25621 {
25622 switch (args->event) {
25623 case NB_EV_VALIDATE:
25624 case NB_EV_PREPARE:
25625 case NB_EV_ABORT:
25626 return NB_OK;
25627 case NB_EV_APPLY:
25628 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25629 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
25630 yang_dnode_get_bool(args->dnode, NULL));
25631
25632 break;
25633 }
25634
25635 return NB_OK;
25636 }
25637
25638 /*
25639 * XPath:
25640 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/soft-reconfiguration
25641 */
25642 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguration_modify(
25643 struct nb_cb_modify_args *args)
25644 {
25645 switch (args->event) {
25646 case NB_EV_VALIDATE:
25647 case NB_EV_PREPARE:
25648 case NB_EV_ABORT:
25649 return NB_OK;
25650 case NB_EV_APPLY:
25651 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25652 args, PEER_FLAG_SOFT_RECONFIG,
25653 yang_dnode_get_bool(args->dnode, NULL));
25654
25655 break;
25656 }
25657
25658 return NB_OK;
25659 }
25660
25661 /*
25662 * XPath:
25663 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/weight/weight-attribute
25664 */
25665 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_modify(
25666 struct nb_cb_modify_args *args)
25667 {
25668 switch (args->event) {
25669 case NB_EV_VALIDATE:
25670 case NB_EV_PREPARE:
25671 case NB_EV_ABORT:
25672 return NB_OK;
25673 case NB_EV_APPLY:
25674 return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
25675
25676 break;
25677 }
25678
25679 return NB_OK;
25680 }
25681
25682 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_destroy(
25683 struct nb_cb_destroy_args *args)
25684 {
25685 switch (args->event) {
25686 case NB_EV_VALIDATE:
25687 case NB_EV_PREPARE:
25688 case NB_EV_ABORT:
25689 return NB_OK;
25690 case NB_EV_APPLY:
25691 return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
25692
25693 break;
25694 }
25695
25696 return NB_OK;
25697 }
25698
25699 /*
25700 * XPath:
25701 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/add-paths/path-type
25702 */
25703 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_add_paths_path_type_modify(
25704 struct nb_cb_modify_args *args)
25705 {
25706 switch (args->event) {
25707 case NB_EV_VALIDATE:
25708 case NB_EV_PREPARE:
25709 case NB_EV_ABORT:
25710 case NB_EV_APPLY:
25711 /* TODO: implement me. */
25712 break;
25713 }
25714
25715 return NB_OK;
25716 }
25717
25718 /*
25719 * XPath:
25720 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-as
25721 */
25722 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_modify(
25723 struct nb_cb_modify_args *args)
25724 {
25725 switch (args->event) {
25726 case NB_EV_VALIDATE:
25727 case NB_EV_PREPARE:
25728 case NB_EV_ABORT:
25729 case NB_EV_APPLY:
25730 /* TODO: implement me. */
25731 break;
25732 }
25733
25734 return NB_OK;
25735 }
25736
25737 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_destroy(
25738 struct nb_cb_destroy_args *args)
25739 {
25740 switch (args->event) {
25741 case NB_EV_VALIDATE:
25742 case NB_EV_PREPARE:
25743 case NB_EV_ABORT:
25744 case NB_EV_APPLY:
25745 /* TODO: implement me. */
25746 break;
25747 }
25748
25749 return NB_OK;
25750 }
25751
25752 /*
25753 * XPath:
25754 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-origin-as
25755 */
25756 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_modify(
25757 struct nb_cb_modify_args *args)
25758 {
25759 switch (args->event) {
25760 case NB_EV_VALIDATE:
25761 case NB_EV_PREPARE:
25762 case NB_EV_ABORT:
25763 case NB_EV_APPLY:
25764 /* TODO: implement me. */
25765 break;
25766 }
25767
25768 return NB_OK;
25769 }
25770
25771 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_destroy(
25772 struct nb_cb_destroy_args *args)
25773 {
25774 switch (args->event) {
25775 case NB_EV_VALIDATE:
25776 case NB_EV_PREPARE:
25777 case NB_EV_ABORT:
25778 case NB_EV_APPLY:
25779 /* TODO: implement me. */
25780 break;
25781 }
25782
25783 return NB_OK;
25784 }
25785
25786 /*
25787 * XPath:
25788 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/replace-peer-as
25789 */
25790 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify(
25791 struct nb_cb_modify_args *args)
25792 {
25793 switch (args->event) {
25794 case NB_EV_VALIDATE:
25795 case NB_EV_PREPARE:
25796 case NB_EV_ABORT:
25797 return NB_OK;
25798 case NB_EV_APPLY:
25799 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25800 args, PEER_FLAG_AS_OVERRIDE,
25801 yang_dnode_get_bool(args->dnode, NULL));
25802
25803 break;
25804 }
25805
25806 return NB_OK;
25807 }
25808
25809 /*
25810 * XPath:
25811 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/originate
25812 */
25813 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify(
25814 struct nb_cb_modify_args *args)
25815 {
25816 switch (args->event) {
25817 case NB_EV_VALIDATE:
25818 case NB_EV_PREPARE:
25819 case NB_EV_ABORT:
25820 case NB_EV_APPLY:
25821 /* TODO: implement me. */
25822 break;
25823 }
25824
25825 return NB_OK;
25826 }
25827
25828 /*
25829 * XPath:
25830 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map
25831 */
25832 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify(
25833 struct nb_cb_modify_args *args)
25834 {
25835 switch (args->event) {
25836 case NB_EV_VALIDATE:
25837 case NB_EV_PREPARE:
25838 case NB_EV_ABORT:
25839 case NB_EV_APPLY:
25840 /* TODO: implement me. */
25841 break;
25842 }
25843
25844 return NB_OK;
25845 }
25846
25847 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy(
25848 struct nb_cb_destroy_args *args)
25849 {
25850 switch (args->event) {
25851 case NB_EV_VALIDATE:
25852 case NB_EV_PREPARE:
25853 case NB_EV_ABORT:
25854 case NB_EV_APPLY:
25855 /* TODO: implement me. */
25856 break;
25857 }
25858
25859 return NB_OK;
25860 }
25861
25862 /*
25863 * XPath:
25864 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/as-path-unchanged
25865 */
25866 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify(
25867 struct nb_cb_modify_args *args)
25868 {
25869 switch (args->event) {
25870 case NB_EV_VALIDATE:
25871 case NB_EV_PREPARE:
25872 case NB_EV_ABORT:
25873 return NB_OK;
25874 case NB_EV_APPLY:
25875 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25876 args, PEER_FLAG_AS_PATH_UNCHANGED,
25877 yang_dnode_get_bool(args->dnode, NULL));
25878
25879 break;
25880 }
25881
25882 return NB_OK;
25883 }
25884
25885 /*
25886 * XPath:
25887 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/next-hop-unchanged
25888 */
25889 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify(
25890 struct nb_cb_modify_args *args)
25891 {
25892 switch (args->event) {
25893 case NB_EV_VALIDATE:
25894 case NB_EV_PREPARE:
25895 case NB_EV_ABORT:
25896 return NB_OK;
25897 case NB_EV_APPLY:
25898 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25899 args, PEER_FLAG_NEXTHOP_UNCHANGED,
25900 yang_dnode_get_bool(args->dnode, NULL));
25901
25902 break;
25903 }
25904
25905 return NB_OK;
25906 }
25907
25908 /*
25909 * XPath:
25910 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/med-unchanged
25911 */
25912 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_unchanged_modify(
25913 struct nb_cb_modify_args *args)
25914 {
25915 switch (args->event) {
25916 case NB_EV_VALIDATE:
25917 case NB_EV_PREPARE:
25918 case NB_EV_ABORT:
25919 return NB_OK;
25920 case NB_EV_APPLY:
25921 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
25922 args, PEER_FLAG_MED_UNCHANGED,
25923 yang_dnode_get_bool(args->dnode, NULL));
25924
25925 break;
25926 }
25927
25928 return NB_OK;
25929 }
25930
25931 /*
25932 * XPath:
25933 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-send
25934 */
25935 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_modify(
25936 struct nb_cb_modify_args *args)
25937 {
25938 switch (args->event) {
25939 case NB_EV_VALIDATE:
25940 case NB_EV_PREPARE:
25941 case NB_EV_ABORT:
25942 case NB_EV_APPLY:
25943 /* TODO: implement me. */
25944 break;
25945 }
25946
25947 return NB_OK;
25948 }
25949
25950 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_destroy(
25951 struct nb_cb_destroy_args *args)
25952 {
25953 switch (args->event) {
25954 case NB_EV_VALIDATE:
25955 case NB_EV_PREPARE:
25956 case NB_EV_ABORT:
25957 case NB_EV_APPLY:
25958 /* TODO: implement me. */
25959 break;
25960 }
25961
25962 return NB_OK;
25963 }
25964
25965 /*
25966 * XPath:
25967 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-receive
25968 */
25969 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_modify(
25970 struct nb_cb_modify_args *args)
25971 {
25972 switch (args->event) {
25973 case NB_EV_VALIDATE:
25974 case NB_EV_PREPARE:
25975 case NB_EV_ABORT:
25976 case NB_EV_APPLY:
25977 /* TODO: implement me. */
25978 break;
25979 }
25980
25981 return NB_OK;
25982 }
25983
25984 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_destroy(
25985 struct nb_cb_destroy_args *args)
25986 {
25987 switch (args->event) {
25988 case NB_EV_VALIDATE:
25989 case NB_EV_PREPARE:
25990 case NB_EV_ABORT:
25991 case NB_EV_APPLY:
25992 /* TODO: implement me. */
25993 break;
25994 }
25995
25996 return NB_OK;
25997 }
25998
25999 /*
26000 * XPath:
26001 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-both
26002 */
26003 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_modify(
26004 struct nb_cb_modify_args *args)
26005 {
26006 switch (args->event) {
26007 case NB_EV_VALIDATE:
26008 case NB_EV_PREPARE:
26009 case NB_EV_ABORT:
26010 case NB_EV_APPLY:
26011 /* TODO: implement me. */
26012 break;
26013 }
26014
26015 return NB_OK;
26016 }
26017
26018 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_destroy(
26019 struct nb_cb_destroy_args *args)
26020 {
26021 switch (args->event) {
26022 case NB_EV_VALIDATE:
26023 case NB_EV_PREPARE:
26024 case NB_EV_ABORT:
26025 case NB_EV_APPLY:
26026 /* TODO: implement me. */
26027 break;
26028 }
26029
26030 return NB_OK;
26031 }
26032
26033 /*
26034 * XPath:
26035 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list
26036 */
26037 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create(
26038 struct nb_cb_create_args *args)
26039 {
26040 switch (args->event) {
26041 case NB_EV_VALIDATE:
26042 case NB_EV_PREPARE:
26043 case NB_EV_ABORT:
26044 case NB_EV_APPLY:
26045 /* TODO: implement me. */
26046 break;
26047 }
26048
26049 return NB_OK;
26050 }
26051
26052 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy(
26053 struct nb_cb_destroy_args *args)
26054 {
26055 switch (args->event) {
26056 case NB_EV_VALIDATE:
26057 case NB_EV_PREPARE:
26058 case NB_EV_ABORT:
26059 return NB_OK;
26060 case NB_EV_APPLY:
26061 return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
26062 args);
26063 }
26064
26065 return NB_OK;
26066 }
26067
26068 /*
26069 * XPath:
26070 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/max-prefixes
26071 */
26072 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify(
26073 struct nb_cb_modify_args *args)
26074 {
26075 switch (args->event) {
26076 case NB_EV_VALIDATE:
26077 case NB_EV_PREPARE:
26078 case NB_EV_ABORT:
26079 case NB_EV_APPLY:
26080 /* TODO: implement me. */
26081 break;
26082 }
26083
26084 return NB_OK;
26085 }
26086
26087 /*
26088 * XPath:
26089 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check
26090 */
26091 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify(
26092 struct nb_cb_modify_args *args)
26093 {
26094 switch (args->event) {
26095 case NB_EV_VALIDATE:
26096 case NB_EV_PREPARE:
26097 case NB_EV_ABORT:
26098 case NB_EV_APPLY:
26099 /* TODO: implement me. */
26100 break;
26101 }
26102
26103 return NB_OK;
26104 }
26105
26106 /*
26107 * XPath:
26108 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only
26109 */
26110 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify(
26111 struct nb_cb_modify_args *args)
26112 {
26113 switch (args->event) {
26114 case NB_EV_VALIDATE:
26115 case NB_EV_PREPARE:
26116 case NB_EV_ABORT:
26117 case NB_EV_APPLY:
26118 /* TODO: implement me. */
26119 break;
26120 }
26121
26122 return NB_OK;
26123 }
26124
26125 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy(
26126 struct nb_cb_destroy_args *args)
26127 {
26128 switch (args->event) {
26129 case NB_EV_VALIDATE:
26130 case NB_EV_PREPARE:
26131 case NB_EV_ABORT:
26132 case NB_EV_APPLY:
26133 /* TODO: implement me. */
26134 break;
26135 }
26136
26137 return NB_OK;
26138 }
26139
26140 /*
26141 * XPath:
26142 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer
26143 */
26144 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify(
26145 struct nb_cb_modify_args *args)
26146 {
26147 switch (args->event) {
26148 case NB_EV_VALIDATE:
26149 case NB_EV_PREPARE:
26150 case NB_EV_ABORT:
26151 case NB_EV_APPLY:
26152 /* TODO: implement me. */
26153 break;
26154 }
26155
26156 return NB_OK;
26157 }
26158
26159 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
26160 struct nb_cb_destroy_args *args)
26161 {
26162 switch (args->event) {
26163 case NB_EV_VALIDATE:
26164 case NB_EV_PREPARE:
26165 case NB_EV_ABORT:
26166 case NB_EV_APPLY:
26167 /* TODO: implement me. */
26168 break;
26169 }
26170
26171 return NB_OK;
26172 }
26173
26174 /*
26175 * XPath:
26176 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct
26177 */
26178 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
26179 struct nb_cb_modify_args *args)
26180 {
26181 switch (args->event) {
26182 case NB_EV_VALIDATE:
26183 case NB_EV_PREPARE:
26184 case NB_EV_ABORT:
26185 case NB_EV_APPLY:
26186 /* TODO: implement me. */
26187 break;
26188 }
26189
26190 return NB_OK;
26191 }
26192
26193 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
26194 struct nb_cb_destroy_args *args)
26195 {
26196 switch (args->event) {
26197 case NB_EV_VALIDATE:
26198 case NB_EV_PREPARE:
26199 case NB_EV_ABORT:
26200 case NB_EV_APPLY:
26201 /* TODO: implement me. */
26202 break;
26203 }
26204
26205 return NB_OK;
26206 }
26207
26208 /*
26209 * XPath:
26210 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
26211 */
26212 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
26213 struct nb_cb_modify_args *args)
26214 {
26215 switch (args->event) {
26216 case NB_EV_VALIDATE:
26217 case NB_EV_PREPARE:
26218 case NB_EV_ABORT:
26219 case NB_EV_APPLY:
26220 /* TODO: implement me. */
26221 break;
26222 }
26223
26224 return NB_OK;
26225 }
26226
26227 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
26228 struct nb_cb_destroy_args *args)
26229 {
26230 switch (args->event) {
26231 case NB_EV_VALIDATE:
26232 case NB_EV_PREPARE:
26233 case NB_EV_ABORT:
26234 case NB_EV_APPLY:
26235 /* TODO: implement me. */
26236 break;
26237 }
26238
26239 return NB_OK;
26240 }
26241
26242 /*
26243 * XPath:
26244 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer
26245 */
26246 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
26247 struct nb_cb_modify_args *args)
26248 {
26249 switch (args->event) {
26250 case NB_EV_VALIDATE:
26251 case NB_EV_PREPARE:
26252 case NB_EV_ABORT:
26253 case NB_EV_APPLY:
26254 /* TODO: implement me. */
26255 break;
26256 }
26257
26258 return NB_OK;
26259 }
26260
26261 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
26262 struct nb_cb_destroy_args *args)
26263 {
26264 switch (args->event) {
26265 case NB_EV_VALIDATE:
26266 case NB_EV_PREPARE:
26267 case NB_EV_ABORT:
26268 case NB_EV_APPLY:
26269 /* TODO: implement me. */
26270 break;
26271 }
26272
26273 return NB_OK;
26274 }
26275
26276 /*
26277 * XPath:
26278 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
26279 */
26280 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
26281 struct nb_cb_modify_args *args)
26282 {
26283 switch (args->event) {
26284 case NB_EV_VALIDATE:
26285 case NB_EV_PREPARE:
26286 case NB_EV_ABORT:
26287 case NB_EV_APPLY:
26288 /* TODO: implement me. */
26289 break;
26290 }
26291
26292 return NB_OK;
26293 }
26294
26295 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
26296 struct nb_cb_destroy_args *args)
26297 {
26298 switch (args->event) {
26299 case NB_EV_VALIDATE:
26300 case NB_EV_PREPARE:
26301 case NB_EV_ABORT:
26302 case NB_EV_APPLY:
26303 /* TODO: implement me. */
26304 break;
26305 }
26306
26307 return NB_OK;
26308 }
26309
26310 /*
26311 * XPath:
26312 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only
26313 */
26314 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
26315 struct nb_cb_modify_args *args)
26316 {
26317 switch (args->event) {
26318 case NB_EV_VALIDATE:
26319 case NB_EV_PREPARE:
26320 case NB_EV_ABORT:
26321 case NB_EV_APPLY:
26322 /* TODO: implement me. */
26323 break;
26324 }
26325
26326 return NB_OK;
26327 }
26328
26329 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
26330 struct nb_cb_destroy_args *args)
26331 {
26332 switch (args->event) {
26333 case NB_EV_VALIDATE:
26334 case NB_EV_PREPARE:
26335 case NB_EV_ABORT:
26336 case NB_EV_APPLY:
26337 /* TODO: implement me. */
26338 break;
26339 }
26340
26341 return NB_OK;
26342 }
26343
26344 /*
26345 * XPath:
26346 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self
26347 */
26348 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify(
26349 struct nb_cb_modify_args *args)
26350 {
26351 switch (args->event) {
26352 case NB_EV_VALIDATE:
26353 case NB_EV_PREPARE:
26354 case NB_EV_ABORT:
26355 return NB_OK;
26356 case NB_EV_APPLY:
26357 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26358 args, PEER_FLAG_NEXTHOP_SELF,
26359 yang_dnode_get_bool(args->dnode, NULL));
26360
26361 break;
26362 }
26363
26364 return NB_OK;
26365 }
26366
26367 /*
26368 * XPath:
26369 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self-force
26370 */
26371 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_force_modify(
26372 struct nb_cb_modify_args *args)
26373 {
26374 switch (args->event) {
26375 case NB_EV_VALIDATE:
26376 case NB_EV_PREPARE:
26377 case NB_EV_ABORT:
26378 return NB_OK;
26379 case NB_EV_APPLY:
26380 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26381 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
26382 yang_dnode_get_bool(args->dnode, NULL));
26383
26384 break;
26385 }
26386
26387 return NB_OK;
26388 }
26389
26390 /*
26391 * XPath:
26392 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all
26393 */
26394 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_modify(
26395 struct nb_cb_modify_args *args)
26396 {
26397 switch (args->event) {
26398 case NB_EV_VALIDATE:
26399 case NB_EV_PREPARE:
26400 case NB_EV_ABORT:
26401 return NB_OK;
26402 case NB_EV_APPLY:
26403 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26404 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
26405 yang_dnode_get_bool(args->dnode, NULL));
26406
26407 break;
26408 }
26409
26410 return NB_OK;
26411 }
26412
26413 /*
26414 * XPath:
26415 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all-replace
26416 */
26417 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_replace_modify(
26418 struct nb_cb_modify_args *args)
26419 {
26420 switch (args->event) {
26421 case NB_EV_VALIDATE:
26422 case NB_EV_PREPARE:
26423 case NB_EV_ABORT:
26424 return NB_OK;
26425 case NB_EV_APPLY:
26426 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26427 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
26428 yang_dnode_get_bool(args->dnode, NULL));
26429
26430 break;
26431 }
26432
26433 return NB_OK;
26434 }
26435
26436 /*
26437 * XPath:
26438 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as
26439 */
26440 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_modify(
26441 struct nb_cb_modify_args *args)
26442 {
26443 switch (args->event) {
26444 case NB_EV_VALIDATE:
26445 case NB_EV_PREPARE:
26446 case NB_EV_ABORT:
26447 return NB_OK;
26448 case NB_EV_APPLY:
26449 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26450 args, PEER_FLAG_REMOVE_PRIVATE_AS,
26451 yang_dnode_get_bool(args->dnode, NULL));
26452
26453 break;
26454 }
26455
26456 return NB_OK;
26457 }
26458
26459 /*
26460 * XPath:
26461 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-replace
26462 */
26463 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_replace_modify(
26464 struct nb_cb_modify_args *args)
26465 {
26466 switch (args->event) {
26467 case NB_EV_VALIDATE:
26468 case NB_EV_PREPARE:
26469 case NB_EV_ABORT:
26470 return NB_OK;
26471 case NB_EV_APPLY:
26472 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26473 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
26474 yang_dnode_get_bool(args->dnode, NULL));
26475
26476 break;
26477 }
26478
26479 return NB_OK;
26480 }
26481
26482 /*
26483 * XPath:
26484 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/route-reflector/route-reflector-client
26485 */
26486 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_route_reflector_route_reflector_client_modify(
26487 struct nb_cb_modify_args *args)
26488 {
26489 switch (args->event) {
26490 case NB_EV_VALIDATE:
26491 case NB_EV_PREPARE:
26492 case NB_EV_ABORT:
26493 return NB_OK;
26494 case NB_EV_APPLY:
26495 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26496 args, PEER_FLAG_REFLECTOR_CLIENT,
26497 yang_dnode_get_bool(args->dnode, NULL));
26498
26499 break;
26500 }
26501
26502 return NB_OK;
26503 }
26504
26505 /*
26506 * XPath:
26507 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/route-server/route-server-client
26508 */
26509 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_route_server_route_server_client_modify(
26510 struct nb_cb_modify_args *args)
26511 {
26512 switch (args->event) {
26513 case NB_EV_VALIDATE:
26514 case NB_EV_PREPARE:
26515 case NB_EV_ABORT:
26516 return NB_OK;
26517 case NB_EV_APPLY:
26518 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26519 args, PEER_FLAG_RSERVER_CLIENT,
26520 yang_dnode_get_bool(args->dnode, NULL));
26521
26522 break;
26523 }
26524
26525 return NB_OK;
26526 }
26527
26528 /*
26529 * XPath:
26530 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-community
26531 */
26532 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_community_modify(
26533 struct nb_cb_modify_args *args)
26534 {
26535 switch (args->event) {
26536 case NB_EV_VALIDATE:
26537 case NB_EV_PREPARE:
26538 case NB_EV_ABORT:
26539 return NB_OK;
26540 case NB_EV_APPLY:
26541 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26542 args, PEER_FLAG_SEND_COMMUNITY,
26543 yang_dnode_get_bool(args->dnode, NULL));
26544
26545 break;
26546 }
26547
26548 return NB_OK;
26549 }
26550
26551 /*
26552 * XPath:
26553 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-ext-community
26554 */
26555 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_ext_community_modify(
26556 struct nb_cb_modify_args *args)
26557 {
26558 switch (args->event) {
26559 case NB_EV_VALIDATE:
26560 case NB_EV_PREPARE:
26561 case NB_EV_ABORT:
26562 return NB_OK;
26563 case NB_EV_APPLY:
26564 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26565 args, PEER_FLAG_SEND_EXT_COMMUNITY,
26566 yang_dnode_get_bool(args->dnode, NULL));
26567
26568 break;
26569 }
26570
26571 return NB_OK;
26572 }
26573
26574 /*
26575 * XPath:
26576 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-large-community
26577 */
26578 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_large_community_modify(
26579 struct nb_cb_modify_args *args)
26580 {
26581 switch (args->event) {
26582 case NB_EV_VALIDATE:
26583 case NB_EV_PREPARE:
26584 case NB_EV_ABORT:
26585 return NB_OK;
26586 case NB_EV_APPLY:
26587 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26588 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
26589 yang_dnode_get_bool(args->dnode, NULL));
26590
26591 break;
26592 }
26593
26594 return NB_OK;
26595 }
26596
26597 /*
26598 * XPath:
26599 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/soft-reconfiguration
26600 */
26601 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguration_modify(
26602 struct nb_cb_modify_args *args)
26603 {
26604 switch (args->event) {
26605 case NB_EV_VALIDATE:
26606 case NB_EV_PREPARE:
26607 case NB_EV_ABORT:
26608 return NB_OK;
26609 case NB_EV_APPLY:
26610 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26611 args, PEER_FLAG_SOFT_RECONFIG,
26612 yang_dnode_get_bool(args->dnode, NULL));
26613
26614 break;
26615 }
26616
26617 return NB_OK;
26618 }
26619
26620 /*
26621 * XPath:
26622 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/weight/weight-attribute
26623 */
26624 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_modify(
26625 struct nb_cb_modify_args *args)
26626 {
26627 switch (args->event) {
26628 case NB_EV_VALIDATE:
26629 case NB_EV_PREPARE:
26630 case NB_EV_ABORT:
26631 return NB_OK;
26632 case NB_EV_APPLY:
26633 return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
26634
26635 break;
26636 }
26637
26638 return NB_OK;
26639 }
26640
26641 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_destroy(
26642 struct nb_cb_destroy_args *args)
26643 {
26644 switch (args->event) {
26645 case NB_EV_VALIDATE:
26646 case NB_EV_PREPARE:
26647 case NB_EV_ABORT:
26648 return NB_OK;
26649 case NB_EV_APPLY:
26650 return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
26651
26652 break;
26653 }
26654
26655 return NB_OK;
26656 }
26657
26658 /*
26659 * XPath:
26660 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/add-paths/path-type
26661 */
26662 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_add_paths_path_type_modify(
26663 struct nb_cb_modify_args *args)
26664 {
26665 switch (args->event) {
26666 case NB_EV_VALIDATE:
26667 case NB_EV_PREPARE:
26668 case NB_EV_ABORT:
26669 case NB_EV_APPLY:
26670 /* TODO: implement me. */
26671 break;
26672 }
26673
26674 return NB_OK;
26675 }
26676
26677 /*
26678 * XPath:
26679 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-as
26680 */
26681 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_modify(
26682 struct nb_cb_modify_args *args)
26683 {
26684 switch (args->event) {
26685 case NB_EV_VALIDATE:
26686 case NB_EV_PREPARE:
26687 case NB_EV_ABORT:
26688 case NB_EV_APPLY:
26689 /* TODO: implement me. */
26690 break;
26691 }
26692
26693 return NB_OK;
26694 }
26695
26696 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_destroy(
26697 struct nb_cb_destroy_args *args)
26698 {
26699 switch (args->event) {
26700 case NB_EV_VALIDATE:
26701 case NB_EV_PREPARE:
26702 case NB_EV_ABORT:
26703 case NB_EV_APPLY:
26704 /* TODO: implement me. */
26705 break;
26706 }
26707
26708 return NB_OK;
26709 }
26710
26711 /*
26712 * XPath:
26713 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-origin-as
26714 */
26715 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_modify(
26716 struct nb_cb_modify_args *args)
26717 {
26718 switch (args->event) {
26719 case NB_EV_VALIDATE:
26720 case NB_EV_PREPARE:
26721 case NB_EV_ABORT:
26722 case NB_EV_APPLY:
26723 /* TODO: implement me. */
26724 break;
26725 }
26726
26727 return NB_OK;
26728 }
26729
26730 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
26731 struct nb_cb_destroy_args *args)
26732 {
26733 switch (args->event) {
26734 case NB_EV_VALIDATE:
26735 case NB_EV_PREPARE:
26736 case NB_EV_ABORT:
26737 case NB_EV_APPLY:
26738 /* TODO: implement me. */
26739 break;
26740 }
26741
26742 return NB_OK;
26743 }
26744
26745 /*
26746 * XPath:
26747 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/replace-peer-as
26748 */
26749 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify(
26750 struct nb_cb_modify_args *args)
26751 {
26752 switch (args->event) {
26753 case NB_EV_VALIDATE:
26754 case NB_EV_PREPARE:
26755 case NB_EV_ABORT:
26756 return NB_OK;
26757 case NB_EV_APPLY:
26758 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26759 args, PEER_FLAG_AS_OVERRIDE,
26760 yang_dnode_get_bool(args->dnode, NULL));
26761
26762 break;
26763 }
26764
26765 return NB_OK;
26766 }
26767
26768 /*
26769 * XPath:
26770 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate
26771 */
26772 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify(
26773 struct nb_cb_modify_args *args)
26774 {
26775 switch (args->event) {
26776 case NB_EV_VALIDATE:
26777 case NB_EV_PREPARE:
26778 case NB_EV_ABORT:
26779 case NB_EV_APPLY:
26780 /* TODO: implement me. */
26781 break;
26782 }
26783
26784 return NB_OK;
26785 }
26786
26787 /*
26788 * XPath:
26789 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map
26790 */
26791 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify(
26792 struct nb_cb_modify_args *args)
26793 {
26794 switch (args->event) {
26795 case NB_EV_VALIDATE:
26796 case NB_EV_PREPARE:
26797 case NB_EV_ABORT:
26798 case NB_EV_APPLY:
26799 /* TODO: implement me. */
26800 break;
26801 }
26802
26803 return NB_OK;
26804 }
26805
26806 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy(
26807 struct nb_cb_destroy_args *args)
26808 {
26809 switch (args->event) {
26810 case NB_EV_VALIDATE:
26811 case NB_EV_PREPARE:
26812 case NB_EV_ABORT:
26813 case NB_EV_APPLY:
26814 /* TODO: implement me. */
26815 break;
26816 }
26817
26818 return NB_OK;
26819 }
26820
26821 /*
26822 * XPath:
26823 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/as-path-unchanged
26824 */
26825 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
26826 struct nb_cb_modify_args *args)
26827 {
26828 switch (args->event) {
26829 case NB_EV_VALIDATE:
26830 case NB_EV_PREPARE:
26831 case NB_EV_ABORT:
26832 return NB_OK;
26833 case NB_EV_APPLY:
26834 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26835 args, PEER_FLAG_AS_PATH_UNCHANGED,
26836 yang_dnode_get_bool(args->dnode, NULL));
26837
26838 break;
26839 }
26840
26841 return NB_OK;
26842 }
26843
26844 /*
26845 * XPath:
26846 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/next-hop-unchanged
26847 */
26848 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
26849 struct nb_cb_modify_args *args)
26850 {
26851 switch (args->event) {
26852 case NB_EV_VALIDATE:
26853 case NB_EV_PREPARE:
26854 case NB_EV_ABORT:
26855 return NB_OK;
26856 case NB_EV_APPLY:
26857 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26858 args, PEER_FLAG_NEXTHOP_UNCHANGED,
26859 yang_dnode_get_bool(args->dnode, NULL));
26860
26861 break;
26862 }
26863
26864 return NB_OK;
26865 }
26866
26867 /*
26868 * XPath:
26869 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/med-unchanged
26870 */
26871 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_med_unchanged_modify(
26872 struct nb_cb_modify_args *args)
26873 {
26874 switch (args->event) {
26875 case NB_EV_VALIDATE:
26876 case NB_EV_PREPARE:
26877 case NB_EV_ABORT:
26878 return NB_OK;
26879 case NB_EV_APPLY:
26880 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
26881 args, PEER_FLAG_MED_UNCHANGED,
26882 yang_dnode_get_bool(args->dnode, NULL));
26883
26884 break;
26885 }
26886
26887 return NB_OK;
26888 }
26889
26890 /*
26891 * XPath:
26892 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-send
26893 */
26894 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_modify(
26895 struct nb_cb_modify_args *args)
26896 {
26897 switch (args->event) {
26898 case NB_EV_VALIDATE:
26899 case NB_EV_PREPARE:
26900 case NB_EV_ABORT:
26901 case NB_EV_APPLY:
26902 /* TODO: implement me. */
26903 break;
26904 }
26905
26906 return NB_OK;
26907 }
26908
26909 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_destroy(
26910 struct nb_cb_destroy_args *args)
26911 {
26912 switch (args->event) {
26913 case NB_EV_VALIDATE:
26914 case NB_EV_PREPARE:
26915 case NB_EV_ABORT:
26916 case NB_EV_APPLY:
26917 /* TODO: implement me. */
26918 break;
26919 }
26920
26921 return NB_OK;
26922 }
26923
26924 /*
26925 * XPath:
26926 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-receive
26927 */
26928 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_modify(
26929 struct nb_cb_modify_args *args)
26930 {
26931 switch (args->event) {
26932 case NB_EV_VALIDATE:
26933 case NB_EV_PREPARE:
26934 case NB_EV_ABORT:
26935 case NB_EV_APPLY:
26936 /* TODO: implement me. */
26937 break;
26938 }
26939
26940 return NB_OK;
26941 }
26942
26943 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_destroy(
26944 struct nb_cb_destroy_args *args)
26945 {
26946 switch (args->event) {
26947 case NB_EV_VALIDATE:
26948 case NB_EV_PREPARE:
26949 case NB_EV_ABORT:
26950 case NB_EV_APPLY:
26951 /* TODO: implement me. */
26952 break;
26953 }
26954
26955 return NB_OK;
26956 }
26957
26958 /*
26959 * XPath:
26960 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-both
26961 */
26962 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_modify(
26963 struct nb_cb_modify_args *args)
26964 {
26965 switch (args->event) {
26966 case NB_EV_VALIDATE:
26967 case NB_EV_PREPARE:
26968 case NB_EV_ABORT:
26969 case NB_EV_APPLY:
26970 /* TODO: implement me. */
26971 break;
26972 }
26973
26974 return NB_OK;
26975 }
26976
26977 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_destroy(
26978 struct nb_cb_destroy_args *args)
26979 {
26980 switch (args->event) {
26981 case NB_EV_VALIDATE:
26982 case NB_EV_PREPARE:
26983 case NB_EV_ABORT:
26984 case NB_EV_APPLY:
26985 /* TODO: implement me. */
26986 break;
26987 }
26988
26989 return NB_OK;
26990 }
26991
26992 /*
26993 * XPath:
26994 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list
26995 */
26996 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create(
26997 struct nb_cb_create_args *args)
26998 {
26999 switch (args->event) {
27000 case NB_EV_VALIDATE:
27001 case NB_EV_PREPARE:
27002 case NB_EV_ABORT:
27003 case NB_EV_APPLY:
27004 /* TODO: implement me. */
27005 break;
27006 }
27007
27008 return NB_OK;
27009 }
27010
27011 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy(
27012 struct nb_cb_destroy_args *args)
27013 {
27014 switch (args->event) {
27015 case NB_EV_VALIDATE:
27016 case NB_EV_PREPARE:
27017 case NB_EV_ABORT:
27018 return NB_OK;
27019 case NB_EV_APPLY:
27020 return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
27021 args);
27022 }
27023
27024 return NB_OK;
27025 }
27026
27027 /*
27028 * XPath:
27029 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/max-prefixes
27030 */
27031 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
27032 struct nb_cb_modify_args *args)
27033 {
27034 switch (args->event) {
27035 case NB_EV_VALIDATE:
27036 case NB_EV_PREPARE:
27037 case NB_EV_ABORT:
27038 case NB_EV_APPLY:
27039 /* TODO: implement me. */
27040 break;
27041 }
27042
27043 return NB_OK;
27044 }
27045
27046 /*
27047 * XPath:
27048 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check
27049 */
27050 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify(
27051 struct nb_cb_modify_args *args)
27052 {
27053 switch (args->event) {
27054 case NB_EV_VALIDATE:
27055 case NB_EV_PREPARE:
27056 case NB_EV_ABORT:
27057 case NB_EV_APPLY:
27058 /* TODO: implement me. */
27059 break;
27060 }
27061
27062 return NB_OK;
27063 }
27064
27065 /*
27066 * XPath:
27067 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only
27068 */
27069 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
27070 struct nb_cb_modify_args *args)
27071 {
27072 switch (args->event) {
27073 case NB_EV_VALIDATE:
27074 case NB_EV_PREPARE:
27075 case NB_EV_ABORT:
27076 case NB_EV_APPLY:
27077 /* TODO: implement me. */
27078 break;
27079 }
27080
27081 return NB_OK;
27082 }
27083
27084 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
27085 struct nb_cb_destroy_args *args)
27086 {
27087 switch (args->event) {
27088 case NB_EV_VALIDATE:
27089 case NB_EV_PREPARE:
27090 case NB_EV_ABORT:
27091 case NB_EV_APPLY:
27092 /* TODO: implement me. */
27093 break;
27094 }
27095
27096 return NB_OK;
27097 }
27098
27099 /*
27100 * XPath:
27101 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer
27102 */
27103 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
27104 struct nb_cb_modify_args *args)
27105 {
27106 switch (args->event) {
27107 case NB_EV_VALIDATE:
27108 case NB_EV_PREPARE:
27109 case NB_EV_ABORT:
27110 case NB_EV_APPLY:
27111 /* TODO: implement me. */
27112 break;
27113 }
27114
27115 return NB_OK;
27116 }
27117
27118 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
27119 struct nb_cb_destroy_args *args)
27120 {
27121 switch (args->event) {
27122 case NB_EV_VALIDATE:
27123 case NB_EV_PREPARE:
27124 case NB_EV_ABORT:
27125 case NB_EV_APPLY:
27126 /* TODO: implement me. */
27127 break;
27128 }
27129
27130 return NB_OK;
27131 }
27132
27133 /*
27134 * XPath:
27135 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
27136 */
27137 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
27138 struct nb_cb_modify_args *args)
27139 {
27140 switch (args->event) {
27141 case NB_EV_VALIDATE:
27142 case NB_EV_PREPARE:
27143 case NB_EV_ABORT:
27144 case NB_EV_APPLY:
27145 /* TODO: implement me. */
27146 break;
27147 }
27148
27149 return NB_OK;
27150 }
27151
27152 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
27153 struct nb_cb_destroy_args *args)
27154 {
27155 switch (args->event) {
27156 case NB_EV_VALIDATE:
27157 case NB_EV_PREPARE:
27158 case NB_EV_ABORT:
27159 case NB_EV_APPLY:
27160 /* TODO: implement me. */
27161 break;
27162 }
27163
27164 return NB_OK;
27165 }
27166
27167 /*
27168 * XPath:
27169 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
27170 */
27171 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
27172 struct nb_cb_modify_args *args)
27173 {
27174 switch (args->event) {
27175 case NB_EV_VALIDATE:
27176 case NB_EV_PREPARE:
27177 case NB_EV_ABORT:
27178 case NB_EV_APPLY:
27179 /* TODO: implement me. */
27180 break;
27181 }
27182
27183 return NB_OK;
27184 }
27185
27186 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
27187 struct nb_cb_destroy_args *args)
27188 {
27189 switch (args->event) {
27190 case NB_EV_VALIDATE:
27191 case NB_EV_PREPARE:
27192 case NB_EV_ABORT:
27193 case NB_EV_APPLY:
27194 /* TODO: implement me. */
27195 break;
27196 }
27197
27198 return NB_OK;
27199 }
27200
27201 /*
27202 * XPath:
27203 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer
27204 */
27205 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
27206 struct nb_cb_modify_args *args)
27207 {
27208 switch (args->event) {
27209 case NB_EV_VALIDATE:
27210 case NB_EV_PREPARE:
27211 case NB_EV_ABORT:
27212 case NB_EV_APPLY:
27213 /* TODO: implement me. */
27214 break;
27215 }
27216
27217 return NB_OK;
27218 }
27219
27220 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
27221 struct nb_cb_destroy_args *args)
27222 {
27223 switch (args->event) {
27224 case NB_EV_VALIDATE:
27225 case NB_EV_PREPARE:
27226 case NB_EV_ABORT:
27227 case NB_EV_APPLY:
27228 /* TODO: implement me. */
27229 break;
27230 }
27231
27232 return NB_OK;
27233 }
27234
27235 /*
27236 * XPath:
27237 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
27238 */
27239 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
27240 struct nb_cb_modify_args *args)
27241 {
27242 switch (args->event) {
27243 case NB_EV_VALIDATE:
27244 case NB_EV_PREPARE:
27245 case NB_EV_ABORT:
27246 case NB_EV_APPLY:
27247 /* TODO: implement me. */
27248 break;
27249 }
27250
27251 return NB_OK;
27252 }
27253
27254 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
27255 struct nb_cb_destroy_args *args)
27256 {
27257 switch (args->event) {
27258 case NB_EV_VALIDATE:
27259 case NB_EV_PREPARE:
27260 case NB_EV_ABORT:
27261 case NB_EV_APPLY:
27262 /* TODO: implement me. */
27263 break;
27264 }
27265
27266 return NB_OK;
27267 }
27268
27269 /*
27270 * XPath:
27271 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only
27272 */
27273 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
27274 struct nb_cb_modify_args *args)
27275 {
27276 switch (args->event) {
27277 case NB_EV_VALIDATE:
27278 case NB_EV_PREPARE:
27279 case NB_EV_ABORT:
27280 case NB_EV_APPLY:
27281 /* TODO: implement me. */
27282 break;
27283 }
27284
27285 return NB_OK;
27286 }
27287
27288 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
27289 struct nb_cb_destroy_args *args)
27290 {
27291 switch (args->event) {
27292 case NB_EV_VALIDATE:
27293 case NB_EV_PREPARE:
27294 case NB_EV_ABORT:
27295 case NB_EV_APPLY:
27296 /* TODO: implement me. */
27297 break;
27298 }
27299
27300 return NB_OK;
27301 }
27302
27303 /*
27304 * XPath:
27305 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self
27306 */
27307 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify(
27308 struct nb_cb_modify_args *args)
27309 {
27310 switch (args->event) {
27311 case NB_EV_VALIDATE:
27312 case NB_EV_PREPARE:
27313 case NB_EV_ABORT:
27314 return NB_OK;
27315 case NB_EV_APPLY:
27316 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27317 args, PEER_FLAG_NEXTHOP_SELF,
27318 yang_dnode_get_bool(args->dnode, NULL));
27319
27320 break;
27321 }
27322
27323 return NB_OK;
27324 }
27325
27326 /*
27327 * XPath:
27328 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self-force
27329 */
27330 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_force_modify(
27331 struct nb_cb_modify_args *args)
27332 {
27333 switch (args->event) {
27334 case NB_EV_VALIDATE:
27335 case NB_EV_PREPARE:
27336 case NB_EV_ABORT:
27337 return NB_OK;
27338 case NB_EV_APPLY:
27339 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27340 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
27341 yang_dnode_get_bool(args->dnode, NULL));
27342
27343 break;
27344 }
27345
27346 return NB_OK;
27347 }
27348
27349 /*
27350 * XPath:
27351 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all
27352 */
27353 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_modify(
27354 struct nb_cb_modify_args *args)
27355 {
27356 switch (args->event) {
27357 case NB_EV_VALIDATE:
27358 case NB_EV_PREPARE:
27359 case NB_EV_ABORT:
27360 return NB_OK;
27361 case NB_EV_APPLY:
27362 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27363 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
27364 yang_dnode_get_bool(args->dnode, NULL));
27365
27366 break;
27367 }
27368
27369 return NB_OK;
27370 }
27371
27372 /*
27373 * XPath:
27374 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all-replace
27375 */
27376 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_replace_modify(
27377 struct nb_cb_modify_args *args)
27378 {
27379 switch (args->event) {
27380 case NB_EV_VALIDATE:
27381 case NB_EV_PREPARE:
27382 case NB_EV_ABORT:
27383 return NB_OK;
27384 case NB_EV_APPLY:
27385 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27386 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
27387 yang_dnode_get_bool(args->dnode, NULL));
27388
27389 break;
27390 }
27391
27392 return NB_OK;
27393 }
27394
27395 /*
27396 * XPath:
27397 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as
27398 */
27399 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_modify(
27400 struct nb_cb_modify_args *args)
27401 {
27402 switch (args->event) {
27403 case NB_EV_VALIDATE:
27404 case NB_EV_PREPARE:
27405 case NB_EV_ABORT:
27406 return NB_OK;
27407 case NB_EV_APPLY:
27408 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27409 args, PEER_FLAG_REMOVE_PRIVATE_AS,
27410 yang_dnode_get_bool(args->dnode, NULL));
27411
27412 break;
27413 }
27414
27415 return NB_OK;
27416 }
27417
27418 /*
27419 * XPath:
27420 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-replace
27421 */
27422 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_replace_modify(
27423 struct nb_cb_modify_args *args)
27424 {
27425 switch (args->event) {
27426 case NB_EV_VALIDATE:
27427 case NB_EV_PREPARE:
27428 case NB_EV_ABORT:
27429 return NB_OK;
27430 case NB_EV_APPLY:
27431 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27432 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
27433 yang_dnode_get_bool(args->dnode, NULL));
27434
27435 break;
27436 }
27437
27438 return NB_OK;
27439 }
27440
27441 /*
27442 * XPath:
27443 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/route-reflector/route-reflector-client
27444 */
27445 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflector_route_reflector_client_modify(
27446 struct nb_cb_modify_args *args)
27447 {
27448 switch (args->event) {
27449 case NB_EV_VALIDATE:
27450 case NB_EV_PREPARE:
27451 case NB_EV_ABORT:
27452 return NB_OK;
27453 case NB_EV_APPLY:
27454 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27455 args, PEER_FLAG_REFLECTOR_CLIENT,
27456 yang_dnode_get_bool(args->dnode, NULL));
27457
27458 break;
27459 }
27460
27461 return NB_OK;
27462 }
27463
27464 /*
27465 * XPath:
27466 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/route-server/route-server-client
27467 */
27468 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_route_server_client_modify(
27469 struct nb_cb_modify_args *args)
27470 {
27471 switch (args->event) {
27472 case NB_EV_VALIDATE:
27473 case NB_EV_PREPARE:
27474 case NB_EV_ABORT:
27475 return NB_OK;
27476 case NB_EV_APPLY:
27477 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27478 args, PEER_FLAG_RSERVER_CLIENT,
27479 yang_dnode_get_bool(args->dnode, NULL));
27480
27481 break;
27482 }
27483
27484 return NB_OK;
27485 }
27486
27487 /*
27488 * XPath:
27489 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-community
27490 */
27491 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_community_modify(
27492 struct nb_cb_modify_args *args)
27493 {
27494 switch (args->event) {
27495 case NB_EV_VALIDATE:
27496 case NB_EV_PREPARE:
27497 case NB_EV_ABORT:
27498 return NB_OK;
27499 case NB_EV_APPLY:
27500 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27501 args, PEER_FLAG_SEND_COMMUNITY,
27502 yang_dnode_get_bool(args->dnode, NULL));
27503
27504 break;
27505 }
27506
27507 return NB_OK;
27508 }
27509
27510 /*
27511 * XPath:
27512 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-ext-community
27513 */
27514 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_ext_community_modify(
27515 struct nb_cb_modify_args *args)
27516 {
27517 switch (args->event) {
27518 case NB_EV_VALIDATE:
27519 case NB_EV_PREPARE:
27520 case NB_EV_ABORT:
27521 return NB_OK;
27522 case NB_EV_APPLY:
27523 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27524 args, PEER_FLAG_SEND_EXT_COMMUNITY,
27525 yang_dnode_get_bool(args->dnode, NULL));
27526
27527 break;
27528 }
27529
27530 return NB_OK;
27531 }
27532
27533 /*
27534 * XPath:
27535 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-large-community
27536 */
27537 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_large_community_modify(
27538 struct nb_cb_modify_args *args)
27539 {
27540 switch (args->event) {
27541 case NB_EV_VALIDATE:
27542 case NB_EV_PREPARE:
27543 case NB_EV_ABORT:
27544 return NB_OK;
27545 case NB_EV_APPLY:
27546 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27547 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
27548 yang_dnode_get_bool(args->dnode, NULL));
27549
27550 break;
27551 }
27552
27553 return NB_OK;
27554 }
27555
27556 /*
27557 * XPath:
27558 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/soft-reconfiguration
27559 */
27560 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfiguration_modify(
27561 struct nb_cb_modify_args *args)
27562 {
27563 switch (args->event) {
27564 case NB_EV_VALIDATE:
27565 case NB_EV_PREPARE:
27566 case NB_EV_ABORT:
27567 return NB_OK;
27568 case NB_EV_APPLY:
27569 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27570 args, PEER_FLAG_SOFT_RECONFIG,
27571 yang_dnode_get_bool(args->dnode, NULL));
27572
27573 break;
27574 }
27575
27576 return NB_OK;
27577 }
27578
27579 /*
27580 * XPath:
27581 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/weight/weight-attribute
27582 */
27583 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_modify(
27584 struct nb_cb_modify_args *args)
27585 {
27586 switch (args->event) {
27587 case NB_EV_VALIDATE:
27588 case NB_EV_PREPARE:
27589 case NB_EV_ABORT:
27590 return NB_OK;
27591 case NB_EV_APPLY:
27592 return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
27593
27594 break;
27595 }
27596
27597 return NB_OK;
27598 }
27599
27600 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_destroy(
27601 struct nb_cb_destroy_args *args)
27602 {
27603 switch (args->event) {
27604 case NB_EV_VALIDATE:
27605 case NB_EV_PREPARE:
27606 case NB_EV_ABORT:
27607 return NB_OK;
27608 case NB_EV_APPLY:
27609 return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
27610
27611 break;
27612 }
27613
27614 return NB_OK;
27615 }
27616
27617 /*
27618 * XPath:
27619 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/add-paths/path-type
27620 */
27621 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_add_paths_path_type_modify(
27622 struct nb_cb_modify_args *args)
27623 {
27624 switch (args->event) {
27625 case NB_EV_VALIDATE:
27626 case NB_EV_PREPARE:
27627 case NB_EV_ABORT:
27628 case NB_EV_APPLY:
27629 /* TODO: implement me. */
27630 break;
27631 }
27632
27633 return NB_OK;
27634 }
27635
27636 /*
27637 * XPath:
27638 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-as
27639 */
27640 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_modify(
27641 struct nb_cb_modify_args *args)
27642 {
27643 switch (args->event) {
27644 case NB_EV_VALIDATE:
27645 case NB_EV_PREPARE:
27646 case NB_EV_ABORT:
27647 case NB_EV_APPLY:
27648 /* TODO: implement me. */
27649 break;
27650 }
27651
27652 return NB_OK;
27653 }
27654
27655 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_destroy(
27656 struct nb_cb_destroy_args *args)
27657 {
27658 switch (args->event) {
27659 case NB_EV_VALIDATE:
27660 case NB_EV_PREPARE:
27661 case NB_EV_ABORT:
27662 case NB_EV_APPLY:
27663 /* TODO: implement me. */
27664 break;
27665 }
27666
27667 return NB_OK;
27668 }
27669
27670 /*
27671 * XPath:
27672 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-origin-as
27673 */
27674 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_modify(
27675 struct nb_cb_modify_args *args)
27676 {
27677 switch (args->event) {
27678 case NB_EV_VALIDATE:
27679 case NB_EV_PREPARE:
27680 case NB_EV_ABORT:
27681 case NB_EV_APPLY:
27682 /* TODO: implement me. */
27683 break;
27684 }
27685
27686 return NB_OK;
27687 }
27688
27689 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
27690 struct nb_cb_destroy_args *args)
27691 {
27692 switch (args->event) {
27693 case NB_EV_VALIDATE:
27694 case NB_EV_PREPARE:
27695 case NB_EV_ABORT:
27696 case NB_EV_APPLY:
27697 /* TODO: implement me. */
27698 break;
27699 }
27700
27701 return NB_OK;
27702 }
27703
27704 /*
27705 * XPath:
27706 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/replace-peer-as
27707 */
27708 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify(
27709 struct nb_cb_modify_args *args)
27710 {
27711 switch (args->event) {
27712 case NB_EV_VALIDATE:
27713 case NB_EV_PREPARE:
27714 case NB_EV_ABORT:
27715 return NB_OK;
27716 case NB_EV_APPLY:
27717 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27718 args, PEER_FLAG_AS_OVERRIDE,
27719 yang_dnode_get_bool(args->dnode, NULL));
27720
27721 break;
27722 }
27723
27724 return NB_OK;
27725 }
27726
27727 /*
27728 * XPath:
27729 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate
27730 */
27731 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify(
27732 struct nb_cb_modify_args *args)
27733 {
27734 switch (args->event) {
27735 case NB_EV_VALIDATE:
27736 case NB_EV_PREPARE:
27737 case NB_EV_ABORT:
27738 case NB_EV_APPLY:
27739 /* TODO: implement me. */
27740 break;
27741 }
27742
27743 return NB_OK;
27744 }
27745
27746 /*
27747 * XPath:
27748 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map
27749 */
27750 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify(
27751 struct nb_cb_modify_args *args)
27752 {
27753 switch (args->event) {
27754 case NB_EV_VALIDATE:
27755 case NB_EV_PREPARE:
27756 case NB_EV_ABORT:
27757 case NB_EV_APPLY:
27758 /* TODO: implement me. */
27759 break;
27760 }
27761
27762 return NB_OK;
27763 }
27764
27765 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy(
27766 struct nb_cb_destroy_args *args)
27767 {
27768 switch (args->event) {
27769 case NB_EV_VALIDATE:
27770 case NB_EV_PREPARE:
27771 case NB_EV_ABORT:
27772 case NB_EV_APPLY:
27773 /* TODO: implement me. */
27774 break;
27775 }
27776
27777 return NB_OK;
27778 }
27779
27780 /*
27781 * XPath:
27782 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/as-path-unchanged
27783 */
27784 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
27785 struct nb_cb_modify_args *args)
27786 {
27787 switch (args->event) {
27788 case NB_EV_VALIDATE:
27789 case NB_EV_PREPARE:
27790 case NB_EV_ABORT:
27791 return NB_OK;
27792 case NB_EV_APPLY:
27793 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27794 args, PEER_FLAG_AS_PATH_UNCHANGED,
27795 yang_dnode_get_bool(args->dnode, NULL));
27796
27797 break;
27798 }
27799
27800 return NB_OK;
27801 }
27802
27803 /*
27804 * XPath:
27805 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/next-hop-unchanged
27806 */
27807 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
27808 struct nb_cb_modify_args *args)
27809 {
27810 switch (args->event) {
27811 case NB_EV_VALIDATE:
27812 case NB_EV_PREPARE:
27813 case NB_EV_ABORT:
27814 return NB_OK;
27815 case NB_EV_APPLY:
27816 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27817 args, PEER_FLAG_NEXTHOP_UNCHANGED,
27818 yang_dnode_get_bool(args->dnode, NULL));
27819
27820 break;
27821 }
27822
27823 return NB_OK;
27824 }
27825
27826 /*
27827 * XPath:
27828 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/med-unchanged
27829 */
27830 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_med_unchanged_modify(
27831 struct nb_cb_modify_args *args)
27832 {
27833 switch (args->event) {
27834 case NB_EV_VALIDATE:
27835 case NB_EV_PREPARE:
27836 case NB_EV_ABORT:
27837 return NB_OK;
27838 case NB_EV_APPLY:
27839 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
27840 args, PEER_FLAG_MED_UNCHANGED,
27841 yang_dnode_get_bool(args->dnode, NULL));
27842
27843 break;
27844 }
27845
27846 return NB_OK;
27847 }
27848
27849 /*
27850 * XPath:
27851 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-send
27852 */
27853 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_modify(
27854 struct nb_cb_modify_args *args)
27855 {
27856 switch (args->event) {
27857 case NB_EV_VALIDATE:
27858 case NB_EV_PREPARE:
27859 case NB_EV_ABORT:
27860 case NB_EV_APPLY:
27861 /* TODO: implement me. */
27862 break;
27863 }
27864
27865 return NB_OK;
27866 }
27867
27868 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_destroy(
27869 struct nb_cb_destroy_args *args)
27870 {
27871 switch (args->event) {
27872 case NB_EV_VALIDATE:
27873 case NB_EV_PREPARE:
27874 case NB_EV_ABORT:
27875 case NB_EV_APPLY:
27876 /* TODO: implement me. */
27877 break;
27878 }
27879
27880 return NB_OK;
27881 }
27882
27883 /*
27884 * XPath:
27885 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-receive
27886 */
27887 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_modify(
27888 struct nb_cb_modify_args *args)
27889 {
27890 switch (args->event) {
27891 case NB_EV_VALIDATE:
27892 case NB_EV_PREPARE:
27893 case NB_EV_ABORT:
27894 case NB_EV_APPLY:
27895 /* TODO: implement me. */
27896 break;
27897 }
27898
27899 return NB_OK;
27900 }
27901
27902 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_destroy(
27903 struct nb_cb_destroy_args *args)
27904 {
27905 switch (args->event) {
27906 case NB_EV_VALIDATE:
27907 case NB_EV_PREPARE:
27908 case NB_EV_ABORT:
27909 case NB_EV_APPLY:
27910 /* TODO: implement me. */
27911 break;
27912 }
27913
27914 return NB_OK;
27915 }
27916
27917 /*
27918 * XPath:
27919 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-both
27920 */
27921 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_modify(
27922 struct nb_cb_modify_args *args)
27923 {
27924 switch (args->event) {
27925 case NB_EV_VALIDATE:
27926 case NB_EV_PREPARE:
27927 case NB_EV_ABORT:
27928 case NB_EV_APPLY:
27929 /* TODO: implement me. */
27930 break;
27931 }
27932
27933 return NB_OK;
27934 }
27935
27936 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_destroy(
27937 struct nb_cb_destroy_args *args)
27938 {
27939 switch (args->event) {
27940 case NB_EV_VALIDATE:
27941 case NB_EV_PREPARE:
27942 case NB_EV_ABORT:
27943 case NB_EV_APPLY:
27944 /* TODO: implement me. */
27945 break;
27946 }
27947
27948 return NB_OK;
27949 }
27950
27951 /*
27952 * XPath:
27953 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list
27954 */
27955 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create(
27956 struct nb_cb_create_args *args)
27957 {
27958 switch (args->event) {
27959 case NB_EV_VALIDATE:
27960 case NB_EV_PREPARE:
27961 case NB_EV_ABORT:
27962 case NB_EV_APPLY:
27963 /* TODO: implement me. */
27964 break;
27965 }
27966
27967 return NB_OK;
27968 }
27969
27970 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy(
27971 struct nb_cb_destroy_args *args)
27972 {
27973 switch (args->event) {
27974 case NB_EV_VALIDATE:
27975 case NB_EV_PREPARE:
27976 case NB_EV_ABORT:
27977 return NB_OK;
27978 case NB_EV_APPLY:
27979 return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
27980 args);
27981 }
27982
27983 return NB_OK;
27984 }
27985
27986 /*
27987 * XPath:
27988 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/max-prefixes
27989 */
27990 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
27991 struct nb_cb_modify_args *args)
27992 {
27993 switch (args->event) {
27994 case NB_EV_VALIDATE:
27995 case NB_EV_PREPARE:
27996 case NB_EV_ABORT:
27997 case NB_EV_APPLY:
27998 /* TODO: implement me. */
27999 break;
28000 }
28001
28002 return NB_OK;
28003 }
28004
28005 /*
28006 * XPath:
28007 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check
28008 */
28009 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify(
28010 struct nb_cb_modify_args *args)
28011 {
28012 switch (args->event) {
28013 case NB_EV_VALIDATE:
28014 case NB_EV_PREPARE:
28015 case NB_EV_ABORT:
28016 case NB_EV_APPLY:
28017 /* TODO: implement me. */
28018 break;
28019 }
28020
28021 return NB_OK;
28022 }
28023
28024 /*
28025 * XPath:
28026 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only
28027 */
28028 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
28029 struct nb_cb_modify_args *args)
28030 {
28031 switch (args->event) {
28032 case NB_EV_VALIDATE:
28033 case NB_EV_PREPARE:
28034 case NB_EV_ABORT:
28035 case NB_EV_APPLY:
28036 /* TODO: implement me. */
28037 break;
28038 }
28039
28040 return NB_OK;
28041 }
28042
28043 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
28044 struct nb_cb_destroy_args *args)
28045 {
28046 switch (args->event) {
28047 case NB_EV_VALIDATE:
28048 case NB_EV_PREPARE:
28049 case NB_EV_ABORT:
28050 case NB_EV_APPLY:
28051 /* TODO: implement me. */
28052 break;
28053 }
28054
28055 return NB_OK;
28056 }
28057
28058 /*
28059 * XPath:
28060 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer
28061 */
28062 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
28063 struct nb_cb_modify_args *args)
28064 {
28065 switch (args->event) {
28066 case NB_EV_VALIDATE:
28067 case NB_EV_PREPARE:
28068 case NB_EV_ABORT:
28069 case NB_EV_APPLY:
28070 /* TODO: implement me. */
28071 break;
28072 }
28073
28074 return NB_OK;
28075 }
28076
28077 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
28078 struct nb_cb_destroy_args *args)
28079 {
28080 switch (args->event) {
28081 case NB_EV_VALIDATE:
28082 case NB_EV_PREPARE:
28083 case NB_EV_ABORT:
28084 case NB_EV_APPLY:
28085 /* TODO: implement me. */
28086 break;
28087 }
28088
28089 return NB_OK;
28090 }
28091
28092 /*
28093 * XPath:
28094 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
28095 */
28096 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
28097 struct nb_cb_modify_args *args)
28098 {
28099 switch (args->event) {
28100 case NB_EV_VALIDATE:
28101 case NB_EV_PREPARE:
28102 case NB_EV_ABORT:
28103 case NB_EV_APPLY:
28104 /* TODO: implement me. */
28105 break;
28106 }
28107
28108 return NB_OK;
28109 }
28110
28111 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
28112 struct nb_cb_destroy_args *args)
28113 {
28114 switch (args->event) {
28115 case NB_EV_VALIDATE:
28116 case NB_EV_PREPARE:
28117 case NB_EV_ABORT:
28118 case NB_EV_APPLY:
28119 /* TODO: implement me. */
28120 break;
28121 }
28122
28123 return NB_OK;
28124 }
28125
28126 /*
28127 * XPath:
28128 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
28129 */
28130 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
28131 struct nb_cb_modify_args *args)
28132 {
28133 switch (args->event) {
28134 case NB_EV_VALIDATE:
28135 case NB_EV_PREPARE:
28136 case NB_EV_ABORT:
28137 case NB_EV_APPLY:
28138 /* TODO: implement me. */
28139 break;
28140 }
28141
28142 return NB_OK;
28143 }
28144
28145 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
28146 struct nb_cb_destroy_args *args)
28147 {
28148 switch (args->event) {
28149 case NB_EV_VALIDATE:
28150 case NB_EV_PREPARE:
28151 case NB_EV_ABORT:
28152 case NB_EV_APPLY:
28153 /* TODO: implement me. */
28154 break;
28155 }
28156
28157 return NB_OK;
28158 }
28159
28160 /*
28161 * XPath:
28162 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer
28163 */
28164 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
28165 struct nb_cb_modify_args *args)
28166 {
28167 switch (args->event) {
28168 case NB_EV_VALIDATE:
28169 case NB_EV_PREPARE:
28170 case NB_EV_ABORT:
28171 case NB_EV_APPLY:
28172 /* TODO: implement me. */
28173 break;
28174 }
28175
28176 return NB_OK;
28177 }
28178
28179 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
28180 struct nb_cb_destroy_args *args)
28181 {
28182 switch (args->event) {
28183 case NB_EV_VALIDATE:
28184 case NB_EV_PREPARE:
28185 case NB_EV_ABORT:
28186 case NB_EV_APPLY:
28187 /* TODO: implement me. */
28188 break;
28189 }
28190
28191 return NB_OK;
28192 }
28193
28194 /*
28195 * XPath:
28196 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
28197 */
28198 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
28199 struct nb_cb_modify_args *args)
28200 {
28201 switch (args->event) {
28202 case NB_EV_VALIDATE:
28203 case NB_EV_PREPARE:
28204 case NB_EV_ABORT:
28205 case NB_EV_APPLY:
28206 /* TODO: implement me. */
28207 break;
28208 }
28209
28210 return NB_OK;
28211 }
28212
28213 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
28214 struct nb_cb_destroy_args *args)
28215 {
28216 switch (args->event) {
28217 case NB_EV_VALIDATE:
28218 case NB_EV_PREPARE:
28219 case NB_EV_ABORT:
28220 case NB_EV_APPLY:
28221 /* TODO: implement me. */
28222 break;
28223 }
28224
28225 return NB_OK;
28226 }
28227
28228 /*
28229 * XPath:
28230 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only
28231 */
28232 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
28233 struct nb_cb_modify_args *args)
28234 {
28235 switch (args->event) {
28236 case NB_EV_VALIDATE:
28237 case NB_EV_PREPARE:
28238 case NB_EV_ABORT:
28239 case NB_EV_APPLY:
28240 /* TODO: implement me. */
28241 break;
28242 }
28243
28244 return NB_OK;
28245 }
28246
28247 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
28248 struct nb_cb_destroy_args *args)
28249 {
28250 switch (args->event) {
28251 case NB_EV_VALIDATE:
28252 case NB_EV_PREPARE:
28253 case NB_EV_ABORT:
28254 case NB_EV_APPLY:
28255 /* TODO: implement me. */
28256 break;
28257 }
28258
28259 return NB_OK;
28260 }
28261
28262 /*
28263 * XPath:
28264 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self
28265 */
28266 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify(
28267 struct nb_cb_modify_args *args)
28268 {
28269 switch (args->event) {
28270 case NB_EV_VALIDATE:
28271 case NB_EV_PREPARE:
28272 case NB_EV_ABORT:
28273 return NB_OK;
28274 case NB_EV_APPLY:
28275 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28276 args, PEER_FLAG_NEXTHOP_SELF,
28277 yang_dnode_get_bool(args->dnode, NULL));
28278
28279 break;
28280 }
28281
28282 return NB_OK;
28283 }
28284
28285 /*
28286 * XPath:
28287 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self-force
28288 */
28289 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_force_modify(
28290 struct nb_cb_modify_args *args)
28291 {
28292 switch (args->event) {
28293 case NB_EV_VALIDATE:
28294 case NB_EV_PREPARE:
28295 case NB_EV_ABORT:
28296 return NB_OK;
28297 case NB_EV_APPLY:
28298 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28299 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
28300 yang_dnode_get_bool(args->dnode, NULL));
28301
28302 break;
28303 }
28304
28305 return NB_OK;
28306 }
28307
28308 /*
28309 * XPath:
28310 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all
28311 */
28312 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_modify(
28313 struct nb_cb_modify_args *args)
28314 {
28315 switch (args->event) {
28316 case NB_EV_VALIDATE:
28317 case NB_EV_PREPARE:
28318 case NB_EV_ABORT:
28319 return NB_OK;
28320 case NB_EV_APPLY:
28321 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28322 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
28323 yang_dnode_get_bool(args->dnode, NULL));
28324
28325 break;
28326 }
28327
28328 return NB_OK;
28329 }
28330
28331 /*
28332 * XPath:
28333 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all-replace
28334 */
28335 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_replace_modify(
28336 struct nb_cb_modify_args *args)
28337 {
28338 switch (args->event) {
28339 case NB_EV_VALIDATE:
28340 case NB_EV_PREPARE:
28341 case NB_EV_ABORT:
28342 return NB_OK;
28343 case NB_EV_APPLY:
28344 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28345 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
28346 yang_dnode_get_bool(args->dnode, NULL));
28347
28348 break;
28349 }
28350
28351 return NB_OK;
28352 }
28353
28354 /*
28355 * XPath:
28356 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as
28357 */
28358 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_modify(
28359 struct nb_cb_modify_args *args)
28360 {
28361 switch (args->event) {
28362 case NB_EV_VALIDATE:
28363 case NB_EV_PREPARE:
28364 case NB_EV_ABORT:
28365 return NB_OK;
28366 case NB_EV_APPLY:
28367 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28368 args, PEER_FLAG_REMOVE_PRIVATE_AS,
28369 yang_dnode_get_bool(args->dnode, NULL));
28370
28371 break;
28372 }
28373
28374 return NB_OK;
28375 }
28376
28377 /*
28378 * XPath:
28379 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-replace
28380 */
28381 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_replace_modify(
28382 struct nb_cb_modify_args *args)
28383 {
28384 switch (args->event) {
28385 case NB_EV_VALIDATE:
28386 case NB_EV_PREPARE:
28387 case NB_EV_ABORT:
28388 return NB_OK;
28389 case NB_EV_APPLY:
28390 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28391 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
28392 yang_dnode_get_bool(args->dnode, NULL));
28393
28394 break;
28395 }
28396
28397 return NB_OK;
28398 }
28399
28400 /*
28401 * XPath:
28402 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/route-reflector/route-reflector-client
28403 */
28404 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflector_route_reflector_client_modify(
28405 struct nb_cb_modify_args *args)
28406 {
28407 switch (args->event) {
28408 case NB_EV_VALIDATE:
28409 case NB_EV_PREPARE:
28410 case NB_EV_ABORT:
28411 return NB_OK;
28412 case NB_EV_APPLY:
28413 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28414 args, PEER_FLAG_REFLECTOR_CLIENT,
28415 yang_dnode_get_bool(args->dnode, NULL));
28416
28417 break;
28418 }
28419
28420 return NB_OK;
28421 }
28422
28423 /*
28424 * XPath:
28425 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/route-server/route-server-client
28426 */
28427 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_route_server_client_modify(
28428 struct nb_cb_modify_args *args)
28429 {
28430 switch (args->event) {
28431 case NB_EV_VALIDATE:
28432 case NB_EV_PREPARE:
28433 case NB_EV_ABORT:
28434 return NB_OK;
28435 case NB_EV_APPLY:
28436 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28437 args, PEER_FLAG_RSERVER_CLIENT,
28438 yang_dnode_get_bool(args->dnode, NULL));
28439
28440 break;
28441 }
28442
28443 return NB_OK;
28444 }
28445
28446 /*
28447 * XPath:
28448 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-community
28449 */
28450 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_community_modify(
28451 struct nb_cb_modify_args *args)
28452 {
28453 switch (args->event) {
28454 case NB_EV_VALIDATE:
28455 case NB_EV_PREPARE:
28456 case NB_EV_ABORT:
28457 return NB_OK;
28458 case NB_EV_APPLY:
28459 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28460 args, PEER_FLAG_SEND_COMMUNITY,
28461 yang_dnode_get_bool(args->dnode, NULL));
28462
28463 break;
28464 }
28465
28466 return NB_OK;
28467 }
28468
28469 /*
28470 * XPath:
28471 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-ext-community
28472 */
28473 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_ext_community_modify(
28474 struct nb_cb_modify_args *args)
28475 {
28476 switch (args->event) {
28477 case NB_EV_VALIDATE:
28478 case NB_EV_PREPARE:
28479 case NB_EV_ABORT:
28480 return NB_OK;
28481 case NB_EV_APPLY:
28482 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28483 args, PEER_FLAG_SEND_EXT_COMMUNITY,
28484 yang_dnode_get_bool(args->dnode, NULL));
28485
28486 break;
28487 }
28488
28489 return NB_OK;
28490 }
28491
28492 /*
28493 * XPath:
28494 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-large-community
28495 */
28496 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_large_community_modify(
28497 struct nb_cb_modify_args *args)
28498 {
28499 switch (args->event) {
28500 case NB_EV_VALIDATE:
28501 case NB_EV_PREPARE:
28502 case NB_EV_ABORT:
28503 return NB_OK;
28504 case NB_EV_APPLY:
28505 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28506 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
28507 yang_dnode_get_bool(args->dnode, NULL));
28508
28509 break;
28510 }
28511
28512 return NB_OK;
28513 }
28514
28515 /*
28516 * XPath:
28517 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/soft-reconfiguration
28518 */
28519 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfiguration_modify(
28520 struct nb_cb_modify_args *args)
28521 {
28522 switch (args->event) {
28523 case NB_EV_VALIDATE:
28524 case NB_EV_PREPARE:
28525 case NB_EV_ABORT:
28526 return NB_OK;
28527 case NB_EV_APPLY:
28528 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28529 args, PEER_FLAG_SOFT_RECONFIG,
28530 yang_dnode_get_bool(args->dnode, NULL));
28531
28532 break;
28533 }
28534
28535 return NB_OK;
28536 }
28537
28538 /*
28539 * XPath:
28540 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/weight/weight-attribute
28541 */
28542 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_modify(
28543 struct nb_cb_modify_args *args)
28544 {
28545 switch (args->event) {
28546 case NB_EV_VALIDATE:
28547 case NB_EV_PREPARE:
28548 case NB_EV_ABORT:
28549 return NB_OK;
28550 case NB_EV_APPLY:
28551 return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
28552
28553 break;
28554 }
28555
28556 return NB_OK;
28557 }
28558
28559 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_destroy(
28560 struct nb_cb_destroy_args *args)
28561 {
28562 switch (args->event) {
28563 case NB_EV_VALIDATE:
28564 case NB_EV_PREPARE:
28565 case NB_EV_ABORT:
28566 return NB_OK;
28567 case NB_EV_APPLY:
28568 return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
28569
28570 break;
28571 }
28572
28573 return NB_OK;
28574 }
28575
28576 /*
28577 * XPath:
28578 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/add-paths/path-type
28579 */
28580 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_add_paths_path_type_modify(
28581 struct nb_cb_modify_args *args)
28582 {
28583 switch (args->event) {
28584 case NB_EV_VALIDATE:
28585 case NB_EV_PREPARE:
28586 case NB_EV_ABORT:
28587 case NB_EV_APPLY:
28588 /* TODO: implement me. */
28589 break;
28590 }
28591
28592 return NB_OK;
28593 }
28594
28595 /*
28596 * XPath:
28597 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-as
28598 */
28599 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_modify(
28600 struct nb_cb_modify_args *args)
28601 {
28602 switch (args->event) {
28603 case NB_EV_VALIDATE:
28604 case NB_EV_PREPARE:
28605 case NB_EV_ABORT:
28606 case NB_EV_APPLY:
28607 /* TODO: implement me. */
28608 break;
28609 }
28610
28611 return NB_OK;
28612 }
28613
28614 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_destroy(
28615 struct nb_cb_destroy_args *args)
28616 {
28617 switch (args->event) {
28618 case NB_EV_VALIDATE:
28619 case NB_EV_PREPARE:
28620 case NB_EV_ABORT:
28621 case NB_EV_APPLY:
28622 /* TODO: implement me. */
28623 break;
28624 }
28625
28626 return NB_OK;
28627 }
28628
28629 /*
28630 * XPath:
28631 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-origin-as
28632 */
28633 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
28634 struct nb_cb_modify_args *args)
28635 {
28636 switch (args->event) {
28637 case NB_EV_VALIDATE:
28638 case NB_EV_PREPARE:
28639 case NB_EV_ABORT:
28640 case NB_EV_APPLY:
28641 /* TODO: implement me. */
28642 break;
28643 }
28644
28645 return NB_OK;
28646 }
28647
28648 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
28649 struct nb_cb_destroy_args *args)
28650 {
28651 switch (args->event) {
28652 case NB_EV_VALIDATE:
28653 case NB_EV_PREPARE:
28654 case NB_EV_ABORT:
28655 case NB_EV_APPLY:
28656 /* TODO: implement me. */
28657 break;
28658 }
28659
28660 return NB_OK;
28661 }
28662
28663 /*
28664 * XPath:
28665 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/replace-peer-as
28666 */
28667 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_replace_peer_as_modify(
28668 struct nb_cb_modify_args *args)
28669 {
28670 switch (args->event) {
28671 case NB_EV_VALIDATE:
28672 case NB_EV_PREPARE:
28673 case NB_EV_ABORT:
28674 return NB_OK;
28675 case NB_EV_APPLY:
28676 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28677 args, PEER_FLAG_AS_OVERRIDE,
28678 yang_dnode_get_bool(args->dnode, NULL));
28679
28680 break;
28681 }
28682
28683 return NB_OK;
28684 }
28685
28686 /*
28687 * XPath:
28688 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/as-path-unchanged
28689 */
28690 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
28691 struct nb_cb_modify_args *args)
28692 {
28693 switch (args->event) {
28694 case NB_EV_VALIDATE:
28695 case NB_EV_PREPARE:
28696 case NB_EV_ABORT:
28697 return NB_OK;
28698 case NB_EV_APPLY:
28699 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28700 args, PEER_FLAG_AS_PATH_UNCHANGED,
28701 yang_dnode_get_bool(args->dnode, NULL));
28702
28703 break;
28704 }
28705
28706 return NB_OK;
28707 }
28708
28709 /*
28710 * XPath:
28711 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/next-hop-unchanged
28712 */
28713 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
28714 struct nb_cb_modify_args *args)
28715 {
28716 switch (args->event) {
28717 case NB_EV_VALIDATE:
28718 case NB_EV_PREPARE:
28719 case NB_EV_ABORT:
28720 return NB_OK;
28721 case NB_EV_APPLY:
28722 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28723 args, PEER_FLAG_NEXTHOP_UNCHANGED,
28724 yang_dnode_get_bool(args->dnode, NULL));
28725
28726 break;
28727 }
28728
28729 return NB_OK;
28730 }
28731
28732 /*
28733 * XPath:
28734 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/med-unchanged
28735 */
28736 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_med_unchanged_modify(
28737 struct nb_cb_modify_args *args)
28738 {
28739 switch (args->event) {
28740 case NB_EV_VALIDATE:
28741 case NB_EV_PREPARE:
28742 case NB_EV_ABORT:
28743 return NB_OK;
28744 case NB_EV_APPLY:
28745 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
28746 args, PEER_FLAG_MED_UNCHANGED,
28747 yang_dnode_get_bool(args->dnode, NULL));
28748
28749 break;
28750 }
28751
28752 return NB_OK;
28753 }
28754
28755 /*
28756 * XPath:
28757 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list
28758 */
28759 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create(
28760 struct nb_cb_create_args *args)
28761 {
28762 switch (args->event) {
28763 case NB_EV_VALIDATE:
28764 case NB_EV_PREPARE:
28765 case NB_EV_ABORT:
28766 case NB_EV_APPLY:
28767 /* TODO: implement me. */
28768 break;
28769 }
28770
28771 return NB_OK;
28772 }
28773
28774 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy(
28775 struct nb_cb_destroy_args *args)
28776 {
28777 switch (args->event) {
28778 case NB_EV_VALIDATE:
28779 case NB_EV_PREPARE:
28780 case NB_EV_ABORT:
28781 return NB_OK;
28782 case NB_EV_APPLY:
28783 return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
28784 args);
28785 }
28786
28787 return NB_OK;
28788 }
28789
28790 /*
28791 * XPath:
28792 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/max-prefixes
28793 */
28794 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
28795 struct nb_cb_modify_args *args)
28796 {
28797 switch (args->event) {
28798 case NB_EV_VALIDATE:
28799 case NB_EV_PREPARE:
28800 case NB_EV_ABORT:
28801 case NB_EV_APPLY:
28802 /* TODO: implement me. */
28803 break;
28804 }
28805
28806 return NB_OK;
28807 }
28808
28809 /*
28810 * XPath:
28811 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check
28812 */
28813 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
28814 struct nb_cb_modify_args *args)
28815 {
28816 switch (args->event) {
28817 case NB_EV_VALIDATE:
28818 case NB_EV_PREPARE:
28819 case NB_EV_ABORT:
28820 case NB_EV_APPLY:
28821 /* TODO: implement me. */
28822 break;
28823 }
28824
28825 return NB_OK;
28826 }
28827
28828 /*
28829 * XPath:
28830 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only
28831 */
28832 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
28833 struct nb_cb_modify_args *args)
28834 {
28835 switch (args->event) {
28836 case NB_EV_VALIDATE:
28837 case NB_EV_PREPARE:
28838 case NB_EV_ABORT:
28839 case NB_EV_APPLY:
28840 /* TODO: implement me. */
28841 break;
28842 }
28843
28844 return NB_OK;
28845 }
28846
28847 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
28848 struct nb_cb_destroy_args *args)
28849 {
28850 switch (args->event) {
28851 case NB_EV_VALIDATE:
28852 case NB_EV_PREPARE:
28853 case NB_EV_ABORT:
28854 case NB_EV_APPLY:
28855 /* TODO: implement me. */
28856 break;
28857 }
28858
28859 return NB_OK;
28860 }
28861
28862 /*
28863 * XPath:
28864 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer
28865 */
28866 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
28867 struct nb_cb_modify_args *args)
28868 {
28869 switch (args->event) {
28870 case NB_EV_VALIDATE:
28871 case NB_EV_PREPARE:
28872 case NB_EV_ABORT:
28873 case NB_EV_APPLY:
28874 /* TODO: implement me. */
28875 break;
28876 }
28877
28878 return NB_OK;
28879 }
28880
28881 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
28882 struct nb_cb_destroy_args *args)
28883 {
28884 switch (args->event) {
28885 case NB_EV_VALIDATE:
28886 case NB_EV_PREPARE:
28887 case NB_EV_ABORT:
28888 case NB_EV_APPLY:
28889 /* TODO: implement me. */
28890 break;
28891 }
28892
28893 return NB_OK;
28894 }
28895
28896 /*
28897 * XPath:
28898 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
28899 */
28900 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
28901 struct nb_cb_modify_args *args)
28902 {
28903 switch (args->event) {
28904 case NB_EV_VALIDATE:
28905 case NB_EV_PREPARE:
28906 case NB_EV_ABORT:
28907 case NB_EV_APPLY:
28908 /* TODO: implement me. */
28909 break;
28910 }
28911
28912 return NB_OK;
28913 }
28914
28915 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
28916 struct nb_cb_destroy_args *args)
28917 {
28918 switch (args->event) {
28919 case NB_EV_VALIDATE:
28920 case NB_EV_PREPARE:
28921 case NB_EV_ABORT:
28922 case NB_EV_APPLY:
28923 /* TODO: implement me. */
28924 break;
28925 }
28926
28927 return NB_OK;
28928 }
28929
28930 /*
28931 * XPath:
28932 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
28933 */
28934 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
28935 struct nb_cb_modify_args *args)
28936 {
28937 switch (args->event) {
28938 case NB_EV_VALIDATE:
28939 case NB_EV_PREPARE:
28940 case NB_EV_ABORT:
28941 case NB_EV_APPLY:
28942 /* TODO: implement me. */
28943 break;
28944 }
28945
28946 return NB_OK;
28947 }
28948
28949 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
28950 struct nb_cb_destroy_args *args)
28951 {
28952 switch (args->event) {
28953 case NB_EV_VALIDATE:
28954 case NB_EV_PREPARE:
28955 case NB_EV_ABORT:
28956 case NB_EV_APPLY:
28957 /* TODO: implement me. */
28958 break;
28959 }
28960
28961 return NB_OK;
28962 }
28963
28964 /*
28965 * XPath:
28966 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer
28967 */
28968 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
28969 struct nb_cb_modify_args *args)
28970 {
28971 switch (args->event) {
28972 case NB_EV_VALIDATE:
28973 case NB_EV_PREPARE:
28974 case NB_EV_ABORT:
28975 case NB_EV_APPLY:
28976 /* TODO: implement me. */
28977 break;
28978 }
28979
28980 return NB_OK;
28981 }
28982
28983 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
28984 struct nb_cb_destroy_args *args)
28985 {
28986 switch (args->event) {
28987 case NB_EV_VALIDATE:
28988 case NB_EV_PREPARE:
28989 case NB_EV_ABORT:
28990 case NB_EV_APPLY:
28991 /* TODO: implement me. */
28992 break;
28993 }
28994
28995 return NB_OK;
28996 }
28997
28998 /*
28999 * XPath:
29000 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
29001 */
29002 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
29003 struct nb_cb_modify_args *args)
29004 {
29005 switch (args->event) {
29006 case NB_EV_VALIDATE:
29007 case NB_EV_PREPARE:
29008 case NB_EV_ABORT:
29009 case NB_EV_APPLY:
29010 /* TODO: implement me. */
29011 break;
29012 }
29013
29014 return NB_OK;
29015 }
29016
29017 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
29018 struct nb_cb_destroy_args *args)
29019 {
29020 switch (args->event) {
29021 case NB_EV_VALIDATE:
29022 case NB_EV_PREPARE:
29023 case NB_EV_ABORT:
29024 case NB_EV_APPLY:
29025 /* TODO: implement me. */
29026 break;
29027 }
29028
29029 return NB_OK;
29030 }
29031
29032 /*
29033 * XPath:
29034 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only
29035 */
29036 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
29037 struct nb_cb_modify_args *args)
29038 {
29039 switch (args->event) {
29040 case NB_EV_VALIDATE:
29041 case NB_EV_PREPARE:
29042 case NB_EV_ABORT:
29043 case NB_EV_APPLY:
29044 /* TODO: implement me. */
29045 break;
29046 }
29047
29048 return NB_OK;
29049 }
29050
29051 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
29052 struct nb_cb_destroy_args *args)
29053 {
29054 switch (args->event) {
29055 case NB_EV_VALIDATE:
29056 case NB_EV_PREPARE:
29057 case NB_EV_ABORT:
29058 case NB_EV_APPLY:
29059 /* TODO: implement me. */
29060 break;
29061 }
29062
29063 return NB_OK;
29064 }
29065
29066 /*
29067 * XPath:
29068 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self
29069 */
29070 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify(
29071 struct nb_cb_modify_args *args)
29072 {
29073 switch (args->event) {
29074 case NB_EV_VALIDATE:
29075 case NB_EV_PREPARE:
29076 case NB_EV_ABORT:
29077 return NB_OK;
29078 case NB_EV_APPLY:
29079 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29080 args, PEER_FLAG_NEXTHOP_SELF,
29081 yang_dnode_get_bool(args->dnode, NULL));
29082
29083 break;
29084 }
29085
29086 return NB_OK;
29087 }
29088
29089 /*
29090 * XPath:
29091 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self-force
29092 */
29093 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
29094 struct nb_cb_modify_args *args)
29095 {
29096 switch (args->event) {
29097 case NB_EV_VALIDATE:
29098 case NB_EV_PREPARE:
29099 case NB_EV_ABORT:
29100 return NB_OK;
29101 case NB_EV_APPLY:
29102 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29103 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
29104 yang_dnode_get_bool(args->dnode, NULL));
29105
29106 break;
29107 }
29108
29109 return NB_OK;
29110 }
29111
29112 /*
29113 * XPath:
29114 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all
29115 */
29116 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_modify(
29117 struct nb_cb_modify_args *args)
29118 {
29119 switch (args->event) {
29120 case NB_EV_VALIDATE:
29121 case NB_EV_PREPARE:
29122 case NB_EV_ABORT:
29123 return NB_OK;
29124 case NB_EV_APPLY:
29125 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29126 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
29127 yang_dnode_get_bool(args->dnode, NULL));
29128
29129 break;
29130 }
29131
29132 return NB_OK;
29133 }
29134
29135 /*
29136 * XPath:
29137 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all-replace
29138 */
29139 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
29140 struct nb_cb_modify_args *args)
29141 {
29142 switch (args->event) {
29143 case NB_EV_VALIDATE:
29144 case NB_EV_PREPARE:
29145 case NB_EV_ABORT:
29146 return NB_OK;
29147 case NB_EV_APPLY:
29148 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29149 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
29150 yang_dnode_get_bool(args->dnode, NULL));
29151
29152 break;
29153 }
29154
29155 return NB_OK;
29156 }
29157
29158 /*
29159 * XPath:
29160 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as
29161 */
29162 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_modify(
29163 struct nb_cb_modify_args *args)
29164 {
29165 switch (args->event) {
29166 case NB_EV_VALIDATE:
29167 case NB_EV_PREPARE:
29168 case NB_EV_ABORT:
29169 return NB_OK;
29170 case NB_EV_APPLY:
29171 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29172 args, PEER_FLAG_REMOVE_PRIVATE_AS,
29173 yang_dnode_get_bool(args->dnode, NULL));
29174
29175 break;
29176 }
29177
29178 return NB_OK;
29179 }
29180
29181 /*
29182 * XPath:
29183 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-replace
29184 */
29185 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_replace_modify(
29186 struct nb_cb_modify_args *args)
29187 {
29188 switch (args->event) {
29189 case NB_EV_VALIDATE:
29190 case NB_EV_PREPARE:
29191 case NB_EV_ABORT:
29192 return NB_OK;
29193 case NB_EV_APPLY:
29194 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29195 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
29196 yang_dnode_get_bool(args->dnode, NULL));
29197
29198 break;
29199 }
29200
29201 return NB_OK;
29202 }
29203
29204 /*
29205 * XPath:
29206 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-reflector/route-reflector-client
29207 */
29208 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector_route_reflector_client_modify(
29209 struct nb_cb_modify_args *args)
29210 {
29211 switch (args->event) {
29212 case NB_EV_VALIDATE:
29213 case NB_EV_PREPARE:
29214 case NB_EV_ABORT:
29215 return NB_OK;
29216 case NB_EV_APPLY:
29217 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29218 args, PEER_FLAG_REFLECTOR_CLIENT,
29219 yang_dnode_get_bool(args->dnode, NULL));
29220
29221 break;
29222 }
29223
29224 return NB_OK;
29225 }
29226
29227 /*
29228 * XPath:
29229 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-server/route-server-client
29230 */
29231 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_route_server_client_modify(
29232 struct nb_cb_modify_args *args)
29233 {
29234 switch (args->event) {
29235 case NB_EV_VALIDATE:
29236 case NB_EV_PREPARE:
29237 case NB_EV_ABORT:
29238 return NB_OK;
29239 case NB_EV_APPLY:
29240 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29241 args, PEER_FLAG_RSERVER_CLIENT,
29242 yang_dnode_get_bool(args->dnode, NULL));
29243
29244 break;
29245 }
29246
29247 return NB_OK;
29248 }
29249
29250 /*
29251 * XPath:
29252 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-community
29253 */
29254 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_community_modify(
29255 struct nb_cb_modify_args *args)
29256 {
29257 switch (args->event) {
29258 case NB_EV_VALIDATE:
29259 case NB_EV_PREPARE:
29260 case NB_EV_ABORT:
29261 return NB_OK;
29262 case NB_EV_APPLY:
29263 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29264 args, PEER_FLAG_SEND_COMMUNITY,
29265 yang_dnode_get_bool(args->dnode, NULL));
29266
29267 break;
29268 }
29269
29270 return NB_OK;
29271 }
29272
29273 /*
29274 * XPath:
29275 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-ext-community
29276 */
29277 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_ext_community_modify(
29278 struct nb_cb_modify_args *args)
29279 {
29280 switch (args->event) {
29281 case NB_EV_VALIDATE:
29282 case NB_EV_PREPARE:
29283 case NB_EV_ABORT:
29284 return NB_OK;
29285 case NB_EV_APPLY:
29286 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29287 args, PEER_FLAG_SEND_EXT_COMMUNITY,
29288 yang_dnode_get_bool(args->dnode, NULL));
29289
29290 break;
29291 }
29292
29293 return NB_OK;
29294 }
29295
29296 /*
29297 * XPath:
29298 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-large-community
29299 */
29300 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_large_community_modify(
29301 struct nb_cb_modify_args *args)
29302 {
29303 switch (args->event) {
29304 case NB_EV_VALIDATE:
29305 case NB_EV_PREPARE:
29306 case NB_EV_ABORT:
29307 return NB_OK;
29308 case NB_EV_APPLY:
29309 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29310 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
29311 yang_dnode_get_bool(args->dnode, NULL));
29312
29313 break;
29314 }
29315
29316 return NB_OK;
29317 }
29318
29319 /*
29320 * XPath:
29321 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/soft-reconfiguration
29322 */
29323 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfiguration_modify(
29324 struct nb_cb_modify_args *args)
29325 {
29326 switch (args->event) {
29327 case NB_EV_VALIDATE:
29328 case NB_EV_PREPARE:
29329 case NB_EV_ABORT:
29330 return NB_OK;
29331 case NB_EV_APPLY:
29332 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29333 args, PEER_FLAG_SOFT_RECONFIG,
29334 yang_dnode_get_bool(args->dnode, NULL));
29335
29336 break;
29337 }
29338
29339 return NB_OK;
29340 }
29341
29342 /*
29343 * XPath:
29344 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/weight/weight-attribute
29345 */
29346 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_modify(
29347 struct nb_cb_modify_args *args)
29348 {
29349 switch (args->event) {
29350 case NB_EV_VALIDATE:
29351 case NB_EV_PREPARE:
29352 case NB_EV_ABORT:
29353 return NB_OK;
29354 case NB_EV_APPLY:
29355 return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
29356
29357 break;
29358 }
29359
29360 return NB_OK;
29361 }
29362
29363 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_destroy(
29364 struct nb_cb_destroy_args *args)
29365 {
29366 switch (args->event) {
29367 case NB_EV_VALIDATE:
29368 case NB_EV_PREPARE:
29369 case NB_EV_ABORT:
29370 return NB_OK;
29371 case NB_EV_APPLY:
29372 return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
29373
29374 break;
29375 }
29376
29377 return NB_OK;
29378 }
29379
29380 /*
29381 * XPath:
29382 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/add-paths/path-type
29383 */
29384 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_add_paths_path_type_modify(
29385 struct nb_cb_modify_args *args)
29386 {
29387 switch (args->event) {
29388 case NB_EV_VALIDATE:
29389 case NB_EV_PREPARE:
29390 case NB_EV_ABORT:
29391 case NB_EV_APPLY:
29392 /* TODO: implement me. */
29393 break;
29394 }
29395
29396 return NB_OK;
29397 }
29398
29399 /*
29400 * XPath:
29401 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-as
29402 */
29403 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_modify(
29404 struct nb_cb_modify_args *args)
29405 {
29406 switch (args->event) {
29407 case NB_EV_VALIDATE:
29408 case NB_EV_PREPARE:
29409 case NB_EV_ABORT:
29410 case NB_EV_APPLY:
29411 /* TODO: implement me. */
29412 break;
29413 }
29414
29415 return NB_OK;
29416 }
29417
29418 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_destroy(
29419 struct nb_cb_destroy_args *args)
29420 {
29421 switch (args->event) {
29422 case NB_EV_VALIDATE:
29423 case NB_EV_PREPARE:
29424 case NB_EV_ABORT:
29425 case NB_EV_APPLY:
29426 /* TODO: implement me. */
29427 break;
29428 }
29429
29430 return NB_OK;
29431 }
29432
29433 /*
29434 * XPath:
29435 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-origin-as
29436 */
29437 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
29438 struct nb_cb_modify_args *args)
29439 {
29440 switch (args->event) {
29441 case NB_EV_VALIDATE:
29442 case NB_EV_PREPARE:
29443 case NB_EV_ABORT:
29444 case NB_EV_APPLY:
29445 /* TODO: implement me. */
29446 break;
29447 }
29448
29449 return NB_OK;
29450 }
29451
29452 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
29453 struct nb_cb_destroy_args *args)
29454 {
29455 switch (args->event) {
29456 case NB_EV_VALIDATE:
29457 case NB_EV_PREPARE:
29458 case NB_EV_ABORT:
29459 case NB_EV_APPLY:
29460 /* TODO: implement me. */
29461 break;
29462 }
29463
29464 return NB_OK;
29465 }
29466
29467 /*
29468 * XPath:
29469 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/replace-peer-as
29470 */
29471 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_replace_peer_as_modify(
29472 struct nb_cb_modify_args *args)
29473 {
29474 switch (args->event) {
29475 case NB_EV_VALIDATE:
29476 case NB_EV_PREPARE:
29477 case NB_EV_ABORT:
29478 return NB_OK;
29479 case NB_EV_APPLY:
29480 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29481 args, PEER_FLAG_AS_OVERRIDE,
29482 yang_dnode_get_bool(args->dnode, NULL));
29483
29484 break;
29485 }
29486
29487 return NB_OK;
29488 }
29489
29490 /*
29491 * XPath:
29492 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/as-path-unchanged
29493 */
29494 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
29495 struct nb_cb_modify_args *args)
29496 {
29497 switch (args->event) {
29498 case NB_EV_VALIDATE:
29499 case NB_EV_PREPARE:
29500 case NB_EV_ABORT:
29501 return NB_OK;
29502 case NB_EV_APPLY:
29503 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29504 args, PEER_FLAG_AS_PATH_UNCHANGED,
29505 yang_dnode_get_bool(args->dnode, NULL));
29506
29507 break;
29508 }
29509
29510 return NB_OK;
29511 }
29512
29513 /*
29514 * XPath:
29515 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/next-hop-unchanged
29516 */
29517 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
29518 struct nb_cb_modify_args *args)
29519 {
29520 switch (args->event) {
29521 case NB_EV_VALIDATE:
29522 case NB_EV_PREPARE:
29523 case NB_EV_ABORT:
29524 return NB_OK;
29525 case NB_EV_APPLY:
29526 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29527 args, PEER_FLAG_NEXTHOP_UNCHANGED,
29528 yang_dnode_get_bool(args->dnode, NULL));
29529
29530 break;
29531 }
29532
29533 return NB_OK;
29534 }
29535
29536 /*
29537 * XPath:
29538 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/med-unchanged
29539 */
29540 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_med_unchanged_modify(
29541 struct nb_cb_modify_args *args)
29542 {
29543 switch (args->event) {
29544 case NB_EV_VALIDATE:
29545 case NB_EV_PREPARE:
29546 case NB_EV_ABORT:
29547 return NB_OK;
29548 case NB_EV_APPLY:
29549 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29550 args, PEER_FLAG_MED_UNCHANGED,
29551 yang_dnode_get_bool(args->dnode, NULL));
29552
29553 break;
29554 }
29555
29556 return NB_OK;
29557 }
29558
29559 /*
29560 * XPath:
29561 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list
29562 */
29563 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create(
29564 struct nb_cb_create_args *args)
29565 {
29566 switch (args->event) {
29567 case NB_EV_VALIDATE:
29568 case NB_EV_PREPARE:
29569 case NB_EV_ABORT:
29570 case NB_EV_APPLY:
29571 /* TODO: implement me. */
29572 break;
29573 }
29574
29575 return NB_OK;
29576 }
29577
29578 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy(
29579 struct nb_cb_destroy_args *args)
29580 {
29581 switch (args->event) {
29582 case NB_EV_VALIDATE:
29583 case NB_EV_PREPARE:
29584 case NB_EV_ABORT:
29585 return NB_OK;
29586 case NB_EV_APPLY:
29587 return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
29588 args);
29589 }
29590
29591 return NB_OK;
29592 }
29593
29594 /*
29595 * XPath:
29596 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/max-prefixes
29597 */
29598 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
29599 struct nb_cb_modify_args *args)
29600 {
29601 switch (args->event) {
29602 case NB_EV_VALIDATE:
29603 case NB_EV_PREPARE:
29604 case NB_EV_ABORT:
29605 case NB_EV_APPLY:
29606 /* TODO: implement me. */
29607 break;
29608 }
29609
29610 return NB_OK;
29611 }
29612
29613 /*
29614 * XPath:
29615 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check
29616 */
29617 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
29618 struct nb_cb_modify_args *args)
29619 {
29620 switch (args->event) {
29621 case NB_EV_VALIDATE:
29622 case NB_EV_PREPARE:
29623 case NB_EV_ABORT:
29624 case NB_EV_APPLY:
29625 /* TODO: implement me. */
29626 break;
29627 }
29628
29629 return NB_OK;
29630 }
29631
29632 /*
29633 * XPath:
29634 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only
29635 */
29636 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
29637 struct nb_cb_modify_args *args)
29638 {
29639 switch (args->event) {
29640 case NB_EV_VALIDATE:
29641 case NB_EV_PREPARE:
29642 case NB_EV_ABORT:
29643 case NB_EV_APPLY:
29644 /* TODO: implement me. */
29645 break;
29646 }
29647
29648 return NB_OK;
29649 }
29650
29651 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
29652 struct nb_cb_destroy_args *args)
29653 {
29654 switch (args->event) {
29655 case NB_EV_VALIDATE:
29656 case NB_EV_PREPARE:
29657 case NB_EV_ABORT:
29658 case NB_EV_APPLY:
29659 /* TODO: implement me. */
29660 break;
29661 }
29662
29663 return NB_OK;
29664 }
29665
29666 /*
29667 * XPath:
29668 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer
29669 */
29670 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
29671 struct nb_cb_modify_args *args)
29672 {
29673 switch (args->event) {
29674 case NB_EV_VALIDATE:
29675 case NB_EV_PREPARE:
29676 case NB_EV_ABORT:
29677 case NB_EV_APPLY:
29678 /* TODO: implement me. */
29679 break;
29680 }
29681
29682 return NB_OK;
29683 }
29684
29685 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
29686 struct nb_cb_destroy_args *args)
29687 {
29688 switch (args->event) {
29689 case NB_EV_VALIDATE:
29690 case NB_EV_PREPARE:
29691 case NB_EV_ABORT:
29692 case NB_EV_APPLY:
29693 /* TODO: implement me. */
29694 break;
29695 }
29696
29697 return NB_OK;
29698 }
29699
29700 /*
29701 * XPath:
29702 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
29703 */
29704 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
29705 struct nb_cb_modify_args *args)
29706 {
29707 switch (args->event) {
29708 case NB_EV_VALIDATE:
29709 case NB_EV_PREPARE:
29710 case NB_EV_ABORT:
29711 case NB_EV_APPLY:
29712 /* TODO: implement me. */
29713 break;
29714 }
29715
29716 return NB_OK;
29717 }
29718
29719 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
29720 struct nb_cb_destroy_args *args)
29721 {
29722 switch (args->event) {
29723 case NB_EV_VALIDATE:
29724 case NB_EV_PREPARE:
29725 case NB_EV_ABORT:
29726 case NB_EV_APPLY:
29727 /* TODO: implement me. */
29728 break;
29729 }
29730
29731 return NB_OK;
29732 }
29733
29734 /*
29735 * XPath:
29736 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
29737 */
29738 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
29739 struct nb_cb_modify_args *args)
29740 {
29741 switch (args->event) {
29742 case NB_EV_VALIDATE:
29743 case NB_EV_PREPARE:
29744 case NB_EV_ABORT:
29745 case NB_EV_APPLY:
29746 /* TODO: implement me. */
29747 break;
29748 }
29749
29750 return NB_OK;
29751 }
29752
29753 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
29754 struct nb_cb_destroy_args *args)
29755 {
29756 switch (args->event) {
29757 case NB_EV_VALIDATE:
29758 case NB_EV_PREPARE:
29759 case NB_EV_ABORT:
29760 case NB_EV_APPLY:
29761 /* TODO: implement me. */
29762 break;
29763 }
29764
29765 return NB_OK;
29766 }
29767
29768 /*
29769 * XPath:
29770 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer
29771 */
29772 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
29773 struct nb_cb_modify_args *args)
29774 {
29775 switch (args->event) {
29776 case NB_EV_VALIDATE:
29777 case NB_EV_PREPARE:
29778 case NB_EV_ABORT:
29779 case NB_EV_APPLY:
29780 /* TODO: implement me. */
29781 break;
29782 }
29783
29784 return NB_OK;
29785 }
29786
29787 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
29788 struct nb_cb_destroy_args *args)
29789 {
29790 switch (args->event) {
29791 case NB_EV_VALIDATE:
29792 case NB_EV_PREPARE:
29793 case NB_EV_ABORT:
29794 case NB_EV_APPLY:
29795 /* TODO: implement me. */
29796 break;
29797 }
29798
29799 return NB_OK;
29800 }
29801
29802 /*
29803 * XPath:
29804 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
29805 */
29806 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
29807 struct nb_cb_modify_args *args)
29808 {
29809 switch (args->event) {
29810 case NB_EV_VALIDATE:
29811 case NB_EV_PREPARE:
29812 case NB_EV_ABORT:
29813 case NB_EV_APPLY:
29814 /* TODO: implement me. */
29815 break;
29816 }
29817
29818 return NB_OK;
29819 }
29820
29821 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
29822 struct nb_cb_destroy_args *args)
29823 {
29824 switch (args->event) {
29825 case NB_EV_VALIDATE:
29826 case NB_EV_PREPARE:
29827 case NB_EV_ABORT:
29828 case NB_EV_APPLY:
29829 /* TODO: implement me. */
29830 break;
29831 }
29832
29833 return NB_OK;
29834 }
29835
29836 /*
29837 * XPath:
29838 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only
29839 */
29840 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
29841 struct nb_cb_modify_args *args)
29842 {
29843 switch (args->event) {
29844 case NB_EV_VALIDATE:
29845 case NB_EV_PREPARE:
29846 case NB_EV_ABORT:
29847 case NB_EV_APPLY:
29848 /* TODO: implement me. */
29849 break;
29850 }
29851
29852 return NB_OK;
29853 }
29854
29855 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
29856 struct nb_cb_destroy_args *args)
29857 {
29858 switch (args->event) {
29859 case NB_EV_VALIDATE:
29860 case NB_EV_PREPARE:
29861 case NB_EV_ABORT:
29862 case NB_EV_APPLY:
29863 /* TODO: implement me. */
29864 break;
29865 }
29866
29867 return NB_OK;
29868 }
29869
29870 /*
29871 * XPath:
29872 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self
29873 */
29874 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify(
29875 struct nb_cb_modify_args *args)
29876 {
29877 switch (args->event) {
29878 case NB_EV_VALIDATE:
29879 case NB_EV_PREPARE:
29880 case NB_EV_ABORT:
29881 return NB_OK;
29882 case NB_EV_APPLY:
29883 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29884 args, PEER_FLAG_NEXTHOP_SELF,
29885 yang_dnode_get_bool(args->dnode, NULL));
29886
29887 break;
29888 }
29889
29890 return NB_OK;
29891 }
29892
29893 /*
29894 * XPath:
29895 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self-force
29896 */
29897 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
29898 struct nb_cb_modify_args *args)
29899 {
29900 switch (args->event) {
29901 case NB_EV_VALIDATE:
29902 case NB_EV_PREPARE:
29903 case NB_EV_ABORT:
29904 return NB_OK;
29905 case NB_EV_APPLY:
29906 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29907 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
29908 yang_dnode_get_bool(args->dnode, NULL));
29909
29910 break;
29911 }
29912
29913 return NB_OK;
29914 }
29915
29916 /*
29917 * XPath:
29918 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all
29919 */
29920 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_modify(
29921 struct nb_cb_modify_args *args)
29922 {
29923 switch (args->event) {
29924 case NB_EV_VALIDATE:
29925 case NB_EV_PREPARE:
29926 case NB_EV_ABORT:
29927 return NB_OK;
29928 case NB_EV_APPLY:
29929 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29930 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
29931 yang_dnode_get_bool(args->dnode, NULL));
29932
29933 break;
29934 }
29935
29936 return NB_OK;
29937 }
29938
29939 /*
29940 * XPath:
29941 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all-replace
29942 */
29943 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
29944 struct nb_cb_modify_args *args)
29945 {
29946 switch (args->event) {
29947 case NB_EV_VALIDATE:
29948 case NB_EV_PREPARE:
29949 case NB_EV_ABORT:
29950 return NB_OK;
29951 case NB_EV_APPLY:
29952 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29953 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
29954 yang_dnode_get_bool(args->dnode, NULL));
29955
29956 break;
29957 }
29958
29959 return NB_OK;
29960 }
29961
29962 /*
29963 * XPath:
29964 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as
29965 */
29966 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_modify(
29967 struct nb_cb_modify_args *args)
29968 {
29969 switch (args->event) {
29970 case NB_EV_VALIDATE:
29971 case NB_EV_PREPARE:
29972 case NB_EV_ABORT:
29973 return NB_OK;
29974 case NB_EV_APPLY:
29975 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29976 args, PEER_FLAG_REMOVE_PRIVATE_AS,
29977 yang_dnode_get_bool(args->dnode, NULL));
29978
29979 break;
29980 }
29981
29982 return NB_OK;
29983 }
29984
29985 /*
29986 * XPath:
29987 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-replace
29988 */
29989 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_replace_modify(
29990 struct nb_cb_modify_args *args)
29991 {
29992 switch (args->event) {
29993 case NB_EV_VALIDATE:
29994 case NB_EV_PREPARE:
29995 case NB_EV_ABORT:
29996 return NB_OK;
29997 case NB_EV_APPLY:
29998 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
29999 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
30000 yang_dnode_get_bool(args->dnode, NULL));
30001
30002 break;
30003 }
30004
30005 return NB_OK;
30006 }
30007
30008 /*
30009 * XPath:
30010 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-reflector/route-reflector-client
30011 */
30012 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector_route_reflector_client_modify(
30013 struct nb_cb_modify_args *args)
30014 {
30015 switch (args->event) {
30016 case NB_EV_VALIDATE:
30017 case NB_EV_PREPARE:
30018 case NB_EV_ABORT:
30019 return NB_OK;
30020 case NB_EV_APPLY:
30021 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30022 args, PEER_FLAG_REFLECTOR_CLIENT,
30023 yang_dnode_get_bool(args->dnode, NULL));
30024
30025 break;
30026 }
30027
30028 return NB_OK;
30029 }
30030
30031 /*
30032 * XPath:
30033 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-server/route-server-client
30034 */
30035 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_route_server_client_modify(
30036 struct nb_cb_modify_args *args)
30037 {
30038 switch (args->event) {
30039 case NB_EV_VALIDATE:
30040 case NB_EV_PREPARE:
30041 case NB_EV_ABORT:
30042 return NB_OK;
30043 case NB_EV_APPLY:
30044 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30045 args, PEER_FLAG_RSERVER_CLIENT,
30046 yang_dnode_get_bool(args->dnode, NULL));
30047
30048 break;
30049 }
30050
30051 return NB_OK;
30052 }
30053
30054 /*
30055 * XPath:
30056 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-community
30057 */
30058 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_community_modify(
30059 struct nb_cb_modify_args *args)
30060 {
30061 switch (args->event) {
30062 case NB_EV_VALIDATE:
30063 case NB_EV_PREPARE:
30064 case NB_EV_ABORT:
30065 return NB_OK;
30066 case NB_EV_APPLY:
30067 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30068 args, PEER_FLAG_SEND_COMMUNITY,
30069 yang_dnode_get_bool(args->dnode, NULL));
30070
30071 break;
30072 }
30073
30074 return NB_OK;
30075 }
30076
30077 /*
30078 * XPath:
30079 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-ext-community
30080 */
30081 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_ext_community_modify(
30082 struct nb_cb_modify_args *args)
30083 {
30084 switch (args->event) {
30085 case NB_EV_VALIDATE:
30086 case NB_EV_PREPARE:
30087 case NB_EV_ABORT:
30088 return NB_OK;
30089 case NB_EV_APPLY:
30090 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30091 args, PEER_FLAG_SEND_EXT_COMMUNITY,
30092 yang_dnode_get_bool(args->dnode, NULL));
30093
30094 break;
30095 }
30096
30097 return NB_OK;
30098 }
30099
30100 /*
30101 * XPath:
30102 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-large-community
30103 */
30104 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_large_community_modify(
30105 struct nb_cb_modify_args *args)
30106 {
30107 switch (args->event) {
30108 case NB_EV_VALIDATE:
30109 case NB_EV_PREPARE:
30110 case NB_EV_ABORT:
30111 return NB_OK;
30112 case NB_EV_APPLY:
30113 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30114 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
30115 yang_dnode_get_bool(args->dnode, NULL));
30116
30117 break;
30118 }
30119
30120 return NB_OK;
30121 }
30122
30123 /*
30124 * XPath:
30125 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/soft-reconfiguration
30126 */
30127 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfiguration_modify(
30128 struct nb_cb_modify_args *args)
30129 {
30130 switch (args->event) {
30131 case NB_EV_VALIDATE:
30132 case NB_EV_PREPARE:
30133 case NB_EV_ABORT:
30134 return NB_OK;
30135 case NB_EV_APPLY:
30136 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30137 args, PEER_FLAG_SOFT_RECONFIG,
30138 yang_dnode_get_bool(args->dnode, NULL));
30139
30140 break;
30141 }
30142
30143 return NB_OK;
30144 }
30145
30146 /*
30147 * XPath:
30148 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/weight/weight-attribute
30149 */
30150 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_modify(
30151 struct nb_cb_modify_args *args)
30152 {
30153 switch (args->event) {
30154 case NB_EV_VALIDATE:
30155 case NB_EV_PREPARE:
30156 case NB_EV_ABORT:
30157 return NB_OK;
30158 case NB_EV_APPLY:
30159 return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
30160
30161 break;
30162 }
30163
30164 return NB_OK;
30165 }
30166
30167 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_destroy(
30168 struct nb_cb_destroy_args *args)
30169 {
30170 switch (args->event) {
30171 case NB_EV_VALIDATE:
30172 case NB_EV_PREPARE:
30173 case NB_EV_ABORT:
30174 return NB_OK;
30175 case NB_EV_APPLY:
30176 return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
30177
30178 break;
30179 }
30180
30181 return NB_OK;
30182 }
30183
30184 /*
30185 * XPath:
30186 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-as
30187 */
30188 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_modify(
30189 struct nb_cb_modify_args *args)
30190 {
30191 switch (args->event) {
30192 case NB_EV_VALIDATE:
30193 case NB_EV_PREPARE:
30194 case NB_EV_ABORT:
30195 case NB_EV_APPLY:
30196 /* TODO: implement me. */
30197 break;
30198 }
30199
30200 return NB_OK;
30201 }
30202
30203 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_destroy(
30204 struct nb_cb_destroy_args *args)
30205 {
30206 switch (args->event) {
30207 case NB_EV_VALIDATE:
30208 case NB_EV_PREPARE:
30209 case NB_EV_ABORT:
30210 case NB_EV_APPLY:
30211 /* TODO: implement me. */
30212 break;
30213 }
30214
30215 return NB_OK;
30216 }
30217
30218 /*
30219 * XPath:
30220 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-origin-as
30221 */
30222 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_modify(
30223 struct nb_cb_modify_args *args)
30224 {
30225 switch (args->event) {
30226 case NB_EV_VALIDATE:
30227 case NB_EV_PREPARE:
30228 case NB_EV_ABORT:
30229 case NB_EV_APPLY:
30230 /* TODO: implement me. */
30231 break;
30232 }
30233
30234 return NB_OK;
30235 }
30236
30237 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_destroy(
30238 struct nb_cb_destroy_args *args)
30239 {
30240 switch (args->event) {
30241 case NB_EV_VALIDATE:
30242 case NB_EV_PREPARE:
30243 case NB_EV_ABORT:
30244 case NB_EV_APPLY:
30245 /* TODO: implement me. */
30246 break;
30247 }
30248
30249 return NB_OK;
30250 }
30251
30252 /*
30253 * XPath:
30254 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/replace-peer-as
30255 */
30256 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace_peer_as_modify(
30257 struct nb_cb_modify_args *args)
30258 {
30259 switch (args->event) {
30260 case NB_EV_VALIDATE:
30261 case NB_EV_PREPARE:
30262 case NB_EV_ABORT:
30263 return NB_OK;
30264 case NB_EV_APPLY:
30265 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30266 args, PEER_FLAG_AS_OVERRIDE,
30267 yang_dnode_get_bool(args->dnode, NULL));
30268
30269 break;
30270 }
30271
30272 return NB_OK;
30273 }
30274
30275 /*
30276 * XPath:
30277 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/as-path-unchanged
30278 */
30279 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_unchanged_modify(
30280 struct nb_cb_modify_args *args)
30281 {
30282 switch (args->event) {
30283 case NB_EV_VALIDATE:
30284 case NB_EV_PREPARE:
30285 case NB_EV_ABORT:
30286 return NB_OK;
30287 case NB_EV_APPLY:
30288 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30289 args, PEER_FLAG_AS_PATH_UNCHANGED,
30290 yang_dnode_get_bool(args->dnode, NULL));
30291
30292 break;
30293 }
30294
30295 return NB_OK;
30296 }
30297
30298 /*
30299 * XPath:
30300 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/next-hop-unchanged
30301 */
30302 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop_unchanged_modify(
30303 struct nb_cb_modify_args *args)
30304 {
30305 switch (args->event) {
30306 case NB_EV_VALIDATE:
30307 case NB_EV_PREPARE:
30308 case NB_EV_ABORT:
30309 return NB_OK;
30310 case NB_EV_APPLY:
30311 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30312 args, PEER_FLAG_NEXTHOP_UNCHANGED,
30313 yang_dnode_get_bool(args->dnode, NULL));
30314
30315 break;
30316 }
30317
30318 return NB_OK;
30319 }
30320
30321 /*
30322 * XPath:
30323 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/med-unchanged
30324 */
30325 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unchanged_modify(
30326 struct nb_cb_modify_args *args)
30327 {
30328 switch (args->event) {
30329 case NB_EV_VALIDATE:
30330 case NB_EV_PREPARE:
30331 case NB_EV_ABORT:
30332 return NB_OK;
30333 case NB_EV_APPLY:
30334 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30335 args, PEER_FLAG_MED_UNCHANGED,
30336 yang_dnode_get_bool(args->dnode, NULL));
30337
30338 break;
30339 }
30340
30341 return NB_OK;
30342 }
30343
30344 /*
30345 * XPath:
30346 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self
30347 */
30348 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_modify(
30349 struct nb_cb_modify_args *args)
30350 {
30351 switch (args->event) {
30352 case NB_EV_VALIDATE:
30353 case NB_EV_PREPARE:
30354 case NB_EV_ABORT:
30355 return NB_OK;
30356 case NB_EV_APPLY:
30357 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30358 args, PEER_FLAG_NEXTHOP_SELF,
30359 yang_dnode_get_bool(args->dnode, NULL));
30360
30361 break;
30362 }
30363
30364 return NB_OK;
30365 }
30366
30367 /*
30368 * XPath:
30369 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self-force
30370 */
30371 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_force_modify(
30372 struct nb_cb_modify_args *args)
30373 {
30374 switch (args->event) {
30375 case NB_EV_VALIDATE:
30376 case NB_EV_PREPARE:
30377 case NB_EV_ABORT:
30378 return NB_OK;
30379 case NB_EV_APPLY:
30380 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30381 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
30382 yang_dnode_get_bool(args->dnode, NULL));
30383
30384 break;
30385 }
30386
30387 return NB_OK;
30388 }
30389
30390 /*
30391 * XPath:
30392 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/route-reflector/route-reflector-client
30393 */
30394 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_reflector_client_modify(
30395 struct nb_cb_modify_args *args)
30396 {
30397 switch (args->event) {
30398 case NB_EV_VALIDATE:
30399 case NB_EV_PREPARE:
30400 case NB_EV_ABORT:
30401 return NB_OK;
30402 case NB_EV_APPLY:
30403 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30404 args, PEER_FLAG_REFLECTOR_CLIENT,
30405 yang_dnode_get_bool(args->dnode, NULL));
30406
30407 break;
30408 }
30409
30410 return NB_OK;
30411 }
30412
30413 /*
30414 * XPath:
30415 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/route-server/route-server-client
30416 */
30417 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_server_route_server_client_modify(
30418 struct nb_cb_modify_args *args)
30419 {
30420 switch (args->event) {
30421 case NB_EV_VALIDATE:
30422 case NB_EV_PREPARE:
30423 case NB_EV_ABORT:
30424 return NB_OK;
30425 case NB_EV_APPLY:
30426 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30427 args, PEER_FLAG_RSERVER_CLIENT,
30428 yang_dnode_get_bool(args->dnode, NULL));
30429
30430 break;
30431 }
30432
30433 return NB_OK;
30434 }
30435
30436 /*
30437 * XPath:
30438 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/soft-reconfiguration
30439 */
30440 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_modify(
30441 struct nb_cb_modify_args *args)
30442 {
30443 switch (args->event) {
30444 case NB_EV_VALIDATE:
30445 case NB_EV_PREPARE:
30446 case NB_EV_ABORT:
30447 return NB_OK;
30448 case NB_EV_APPLY:
30449 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30450 args, PEER_FLAG_SOFT_RECONFIG,
30451 yang_dnode_get_bool(args->dnode, NULL));
30452
30453 break;
30454 }
30455
30456 return NB_OK;
30457 }
30458
30459 /*
30460 * XPath:
30461 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/route-reflector/route-reflector-client
30462 */
30463 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_reflector_route_reflector_client_modify(
30464 struct nb_cb_modify_args *args)
30465 {
30466 switch (args->event) {
30467 case NB_EV_VALIDATE:
30468 case NB_EV_PREPARE:
30469 case NB_EV_ABORT:
30470 return NB_OK;
30471 case NB_EV_APPLY:
30472 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30473 args, PEER_FLAG_REFLECTOR_CLIENT,
30474 yang_dnode_get_bool(args->dnode, NULL));
30475
30476 break;
30477 }
30478
30479 return NB_OK;
30480 }
30481
30482 /*
30483 * XPath:
30484 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/route-server/route-server-client
30485 */
30486 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_server_route_server_client_modify(
30487 struct nb_cb_modify_args *args)
30488 {
30489 switch (args->event) {
30490 case NB_EV_VALIDATE:
30491 case NB_EV_PREPARE:
30492 case NB_EV_ABORT:
30493 return NB_OK;
30494 case NB_EV_APPLY:
30495 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30496 args, PEER_FLAG_RSERVER_CLIENT,
30497 yang_dnode_get_bool(args->dnode, NULL));
30498
30499 break;
30500 }
30501
30502 return NB_OK;
30503 }
30504
30505 /*
30506 * XPath:
30507 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/soft-reconfiguration
30508 */
30509 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration_modify(
30510 struct nb_cb_modify_args *args)
30511 {
30512 switch (args->event) {
30513 case NB_EV_VALIDATE:
30514 case NB_EV_PREPARE:
30515 case NB_EV_ABORT:
30516 return NB_OK;
30517 case NB_EV_APPLY:
30518 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30519 args, PEER_FLAG_SOFT_RECONFIG,
30520 yang_dnode_get_bool(args->dnode, NULL));
30521
30522 break;
30523 }
30524
30525 return NB_OK;
30526 }
30527
30528 /*
30529 * XPath:
30530 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/route-reflector/route-reflector-client
30531 */
30532 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_reflector_route_reflector_client_modify(
30533 struct nb_cb_modify_args *args)
30534 {
30535 switch (args->event) {
30536 case NB_EV_VALIDATE:
30537 case NB_EV_PREPARE:
30538 case NB_EV_ABORT:
30539 return NB_OK;
30540 case NB_EV_APPLY:
30541 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30542 args, PEER_FLAG_REFLECTOR_CLIENT,
30543 yang_dnode_get_bool(args->dnode, NULL));
30544
30545 break;
30546 }
30547
30548 return NB_OK;
30549 }
30550
30551 /*
30552 * XPath:
30553 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/route-server/route-server-client
30554 */
30555 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_server_route_server_client_modify(
30556 struct nb_cb_modify_args *args)
30557 {
30558 switch (args->event) {
30559 case NB_EV_VALIDATE:
30560 case NB_EV_PREPARE:
30561 case NB_EV_ABORT:
30562 return NB_OK;
30563 case NB_EV_APPLY:
30564 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30565 args, PEER_FLAG_RSERVER_CLIENT,
30566 yang_dnode_get_bool(args->dnode, NULL));
30567
30568 break;
30569 }
30570
30571 return NB_OK;
30572 }
30573
30574 /*
30575 * XPath:
30576 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/soft-reconfiguration
30577 */
30578 int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify(
30579 struct nb_cb_modify_args *args)
30580 {
30581 switch (args->event) {
30582 case NB_EV_VALIDATE:
30583 case NB_EV_PREPARE:
30584 case NB_EV_ABORT:
30585 return NB_OK;
30586 case NB_EV_APPLY:
30587 return bgp_unnumbered_neighbor_afi_safi_flag_modify(
30588 args, PEER_FLAG_SOFT_RECONFIG,
30589 yang_dnode_get_bool(args->dnode, NULL));
30590
30591 break;
30592 }
30593
30594 return NB_OK;
30595 }
30596
30597 static int bgp_peer_group_afi_safi_flag_modify(struct nb_cb_modify_args *args,
30598 uint32_t flags, bool set)
30599 {
30600 struct bgp *bgp;
30601 const char *peer_str;
30602 struct peer *peer;
30603 const struct lyd_node *nbr_dnode;
30604 const struct lyd_node *nbr_af_dnode;
30605 const char *af_name;
30606 afi_t afi;
30607 safi_t safi;
30608
30609 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
30610 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
30611 yang_afi_safi_identity2value(af_name, &afi, &safi);
30612 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
30613 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
30614 peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
30615 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
30616
30617 if (peer_af_flag_modify_nb(peer, afi, safi, flags, set, args->errmsg,
30618 args->errmsg_len)
30619 < 0)
30620 return NB_ERR_INCONSISTENCY;
30621
30622 return NB_OK;
30623 }
30624
30625 /*
30626 * XPath:
30627 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/add-paths/path-type
30628 */
30629 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_add_paths_path_type_modify(
30630 struct nb_cb_modify_args *args)
30631 {
30632 switch (args->event) {
30633 case NB_EV_VALIDATE:
30634 case NB_EV_PREPARE:
30635 case NB_EV_ABORT:
30636 case NB_EV_APPLY:
30637 /* TODO: implement me. */
30638 break;
30639 }
30640
30641 return NB_OK;
30642 }
30643
30644 /*
30645 * XPath:
30646 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-as
30647 */
30648 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_modify(
30649 struct nb_cb_modify_args *args)
30650 {
30651 switch (args->event) {
30652 case NB_EV_VALIDATE:
30653 case NB_EV_PREPARE:
30654 case NB_EV_ABORT:
30655 case NB_EV_APPLY:
30656 /* TODO: implement me. */
30657 break;
30658 }
30659
30660 return NB_OK;
30661 }
30662
30663 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_destroy(
30664 struct nb_cb_destroy_args *args)
30665 {
30666 switch (args->event) {
30667 case NB_EV_VALIDATE:
30668 case NB_EV_PREPARE:
30669 case NB_EV_ABORT:
30670 case NB_EV_APPLY:
30671 /* TODO: implement me. */
30672 break;
30673 }
30674
30675 return NB_OK;
30676 }
30677
30678 /*
30679 * XPath:
30680 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-origin-as
30681 */
30682 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
30683 struct nb_cb_modify_args *args)
30684 {
30685 switch (args->event) {
30686 case NB_EV_VALIDATE:
30687 case NB_EV_PREPARE:
30688 case NB_EV_ABORT:
30689 case NB_EV_APPLY:
30690 /* TODO: implement me. */
30691 break;
30692 }
30693
30694 return NB_OK;
30695 }
30696
30697 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
30698 struct nb_cb_destroy_args *args)
30699 {
30700 switch (args->event) {
30701 case NB_EV_VALIDATE:
30702 case NB_EV_PREPARE:
30703 case NB_EV_ABORT:
30704 case NB_EV_APPLY:
30705 /* TODO: implement me. */
30706 break;
30707 }
30708
30709 return NB_OK;
30710 }
30711
30712 /*
30713 * XPath:
30714 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/as-path-options/replace-peer-as
30715 */
30716 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify(
30717 struct nb_cb_modify_args *args)
30718 {
30719 switch (args->event) {
30720 case NB_EV_VALIDATE:
30721 case NB_EV_PREPARE:
30722 case NB_EV_ABORT:
30723 return NB_OK;
30724 case NB_EV_APPLY:
30725 return bgp_peer_group_afi_safi_flag_modify(
30726 args, PEER_FLAG_AS_OVERRIDE,
30727 yang_dnode_get_bool(args->dnode, NULL));
30728
30729 break;
30730 }
30731
30732 return NB_OK;
30733 }
30734
30735 /*
30736 * XPath:
30737 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate
30738 */
30739 void bgp_peer_group_afi_safi_default_originate_apply_finish(
30740 struct nb_cb_apply_finish_args *args)
30741 {
30742 struct bgp *bgp;
30743 const char *peer_str;
30744 struct peer *peer;
30745 const struct lyd_node *nbr_dnode;
30746 const struct lyd_node *nbr_af_dnode;
30747 const char *af_name;
30748 afi_t afi;
30749 safi_t safi;
30750
30751 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
30752 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
30753 yang_afi_safi_identity2value(af_name, &afi, &safi);
30754
30755 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
30756 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
30757 peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
30758 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
30759 if (!peer)
30760 return;
30761
30762 bgp_peer_afi_safi_default_originate_apply(args, peer, afi, safi);
30763 }
30764
30765 /*
30766 * XPath:
30767 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate/originate
30768 */
30769 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify(
30770 struct nb_cb_modify_args *args)
30771 {
30772 switch (args->event) {
30773 case NB_EV_VALIDATE:
30774 case NB_EV_PREPARE:
30775 case NB_EV_ABORT:
30776 case NB_EV_APPLY:
30777 /* TODO: implement me. */
30778 break;
30779 }
30780
30781 return NB_OK;
30782 }
30783
30784 /*
30785 * XPath:
30786 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map
30787 */
30788 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify(
30789 struct nb_cb_modify_args *args)
30790 {
30791 switch (args->event) {
30792 case NB_EV_VALIDATE:
30793 case NB_EV_PREPARE:
30794 case NB_EV_ABORT:
30795 case NB_EV_APPLY:
30796 /* TODO: implement me. */
30797 break;
30798 }
30799
30800 return NB_OK;
30801 }
30802
30803 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy(
30804 struct nb_cb_destroy_args *args)
30805 {
30806 switch (args->event) {
30807 case NB_EV_VALIDATE:
30808 case NB_EV_PREPARE:
30809 case NB_EV_ABORT:
30810 case NB_EV_APPLY:
30811 /* TODO: implement me. */
30812 break;
30813 }
30814
30815 return NB_OK;
30816 }
30817
30818 static int bgp_peer_group_afi_safi_prefix_limit_list_destroy(
30819 struct nb_cb_destroy_args *args)
30820 {
30821 struct bgp *bgp;
30822 const char *peer_str;
30823 struct peer *peer;
30824 const struct lyd_node *nbr_dnode;
30825 const struct lyd_node *nbr_af_dnode;
30826 const char *af_name;
30827 afi_t afi;
30828 safi_t safi;
30829 int direction;
30830
30831 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
30832 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
30833 yang_afi_safi_identity2value(af_name, &afi, &safi);
30834
30835 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
30836 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
30837 peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
30838 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
30839 if (!peer)
30840 return NB_ERR_INCONSISTENCY;
30841
30842 direction = yang_dnode_get_enum(args->dnode, "./direction");
30843
30844 switch (direction) {
30845 case 1:
30846 peer_maximum_prefix_unset(peer, afi, safi);
30847 break;
30848 case 2:
30849 UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT);
30850 peer->pmax_out[afi][safi] = 0;
30851 break;
30852 }
30853
30854 return NB_OK;
30855 }
30856 /*
30857 * XPath:
30858 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list
30859 */
30860 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create(
30861 struct nb_cb_create_args *args)
30862 {
30863 switch (args->event) {
30864 case NB_EV_VALIDATE:
30865 case NB_EV_PREPARE:
30866 case NB_EV_ABORT:
30867 case NB_EV_APPLY:
30868 /* TODO: implement me. */
30869 break;
30870 }
30871
30872 return NB_OK;
30873 }
30874
30875 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy(
30876 struct nb_cb_destroy_args *args)
30877 {
30878 switch (args->event) {
30879 case NB_EV_VALIDATE:
30880 case NB_EV_PREPARE:
30881 case NB_EV_ABORT:
30882 return NB_OK;
30883 case NB_EV_APPLY:
30884 return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
30885 }
30886
30887 return NB_OK;
30888 }
30889
30890 void bgp_peer_group_afi_safi_prefix_limit_apply_finish(
30891 struct nb_cb_apply_finish_args *args)
30892 {
30893 struct bgp *bgp;
30894 const char *peer_str;
30895 struct peer *peer;
30896 const struct lyd_node *nbr_dnode;
30897 const struct lyd_node *nbr_af_dnode;
30898 const char *af_name;
30899 afi_t afi;
30900 safi_t safi;
30901
30902 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
30903 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
30904 yang_afi_safi_identity2value(af_name, &afi, &safi);
30905
30906 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
30907 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
30908 peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
30909 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
30910 if (!peer)
30911 return;
30912
30913 bgp_peer_afi_safi_maximum_prefix_set(args, peer, afi, safi);
30914 }
30915 /*
30916 * XPath:
30917 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/max-prefixes
30918 */
30919 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
30920 struct nb_cb_modify_args *args)
30921 {
30922 switch (args->event) {
30923 case NB_EV_VALIDATE:
30924 case NB_EV_PREPARE:
30925 case NB_EV_ABORT:
30926 case NB_EV_APPLY:
30927 /* TODO: implement me. */
30928 break;
30929 }
30930
30931 return NB_OK;
30932 }
30933
30934 /*
30935 * XPath:
30936 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check
30937 */
30938 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
30939 struct nb_cb_modify_args *args)
30940 {
30941 switch (args->event) {
30942 case NB_EV_VALIDATE:
30943 case NB_EV_PREPARE:
30944 case NB_EV_ABORT:
30945 case NB_EV_APPLY:
30946 /* TODO: implement me. */
30947 break;
30948 }
30949
30950 return NB_OK;
30951 }
30952
30953 /*
30954 * XPath:
30955 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only
30956 */
30957 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
30958 struct nb_cb_modify_args *args)
30959 {
30960 switch (args->event) {
30961 case NB_EV_VALIDATE:
30962 case NB_EV_PREPARE:
30963 case NB_EV_ABORT:
30964 case NB_EV_APPLY:
30965 /* TODO: implement me. */
30966 break;
30967 }
30968
30969 return NB_OK;
30970 }
30971
30972 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
30973 struct nb_cb_destroy_args *args)
30974 {
30975 switch (args->event) {
30976 case NB_EV_VALIDATE:
30977 case NB_EV_PREPARE:
30978 case NB_EV_ABORT:
30979 case NB_EV_APPLY:
30980 /* TODO: implement me. */
30981 break;
30982 }
30983
30984 return NB_OK;
30985 }
30986
30987 /*
30988 * XPath:
30989 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer
30990 */
30991 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
30992 struct nb_cb_modify_args *args)
30993 {
30994 switch (args->event) {
30995 case NB_EV_VALIDATE:
30996 case NB_EV_PREPARE:
30997 case NB_EV_ABORT:
30998 case NB_EV_APPLY:
30999 /* TODO: implement me. */
31000 break;
31001 }
31002
31003 return NB_OK;
31004 }
31005
31006 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
31007 struct nb_cb_destroy_args *args)
31008 {
31009 switch (args->event) {
31010 case NB_EV_VALIDATE:
31011 case NB_EV_PREPARE:
31012 case NB_EV_ABORT:
31013 case NB_EV_APPLY:
31014 /* TODO: implement me. */
31015 break;
31016 }
31017
31018 return NB_OK;
31019 }
31020
31021 /*
31022 * XPath:
31023 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
31024 */
31025 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
31026 struct nb_cb_modify_args *args)
31027 {
31028 switch (args->event) {
31029 case NB_EV_VALIDATE:
31030 case NB_EV_PREPARE:
31031 case NB_EV_ABORT:
31032 case NB_EV_APPLY:
31033 /* TODO: implement me. */
31034 break;
31035 }
31036
31037 return NB_OK;
31038 }
31039
31040 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
31041 struct nb_cb_destroy_args *args)
31042 {
31043 switch (args->event) {
31044 case NB_EV_VALIDATE:
31045 case NB_EV_PREPARE:
31046 case NB_EV_ABORT:
31047 case NB_EV_APPLY:
31048 /* TODO: implement me. */
31049 break;
31050 }
31051
31052 return NB_OK;
31053 }
31054
31055 /*
31056 * XPath:
31057 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
31058 */
31059 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
31060 struct nb_cb_modify_args *args)
31061 {
31062 switch (args->event) {
31063 case NB_EV_VALIDATE:
31064 case NB_EV_PREPARE:
31065 case NB_EV_ABORT:
31066 case NB_EV_APPLY:
31067 /* TODO: implement me. */
31068 break;
31069 }
31070
31071 return NB_OK;
31072 }
31073
31074 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
31075 struct nb_cb_destroy_args *args)
31076 {
31077 switch (args->event) {
31078 case NB_EV_VALIDATE:
31079 case NB_EV_PREPARE:
31080 case NB_EV_ABORT:
31081 case NB_EV_APPLY:
31082 /* TODO: implement me. */
31083 break;
31084 }
31085
31086 return NB_OK;
31087 }
31088
31089 /*
31090 * XPath:
31091 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer
31092 */
31093 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
31094 struct nb_cb_modify_args *args)
31095 {
31096 switch (args->event) {
31097 case NB_EV_VALIDATE:
31098 case NB_EV_PREPARE:
31099 case NB_EV_ABORT:
31100 case NB_EV_APPLY:
31101 /* TODO: implement me. */
31102 break;
31103 }
31104
31105 return NB_OK;
31106 }
31107
31108 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
31109 struct nb_cb_destroy_args *args)
31110 {
31111 switch (args->event) {
31112 case NB_EV_VALIDATE:
31113 case NB_EV_PREPARE:
31114 case NB_EV_ABORT:
31115 case NB_EV_APPLY:
31116 /* TODO: implement me. */
31117 break;
31118 }
31119
31120 return NB_OK;
31121 }
31122
31123 /*
31124 * XPath:
31125 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
31126 */
31127 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
31128 struct nb_cb_modify_args *args)
31129 {
31130 switch (args->event) {
31131 case NB_EV_VALIDATE:
31132 case NB_EV_PREPARE:
31133 case NB_EV_ABORT:
31134 case NB_EV_APPLY:
31135 /* TODO: implement me. */
31136 break;
31137 }
31138
31139 return NB_OK;
31140 }
31141
31142 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
31143 struct nb_cb_destroy_args *args)
31144 {
31145 switch (args->event) {
31146 case NB_EV_VALIDATE:
31147 case NB_EV_PREPARE:
31148 case NB_EV_ABORT:
31149 case NB_EV_APPLY:
31150 /* TODO: implement me. */
31151 break;
31152 }
31153
31154 return NB_OK;
31155 }
31156
31157 /*
31158 * XPath:
31159 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only
31160 */
31161 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
31162 struct nb_cb_modify_args *args)
31163 {
31164 switch (args->event) {
31165 case NB_EV_VALIDATE:
31166 case NB_EV_PREPARE:
31167 case NB_EV_ABORT:
31168 case NB_EV_APPLY:
31169 /* TODO: implement me. */
31170 break;
31171 }
31172
31173 return NB_OK;
31174 }
31175
31176 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
31177 struct nb_cb_destroy_args *args)
31178 {
31179 switch (args->event) {
31180 case NB_EV_VALIDATE:
31181 case NB_EV_PREPARE:
31182 case NB_EV_ABORT:
31183 case NB_EV_APPLY:
31184 /* TODO: implement me. */
31185 break;
31186 }
31187
31188 return NB_OK;
31189 }
31190
31191 /*
31192 * XPath:
31193 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self
31194 */
31195 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify(
31196 struct nb_cb_modify_args *args)
31197 {
31198 switch (args->event) {
31199 case NB_EV_VALIDATE:
31200 case NB_EV_PREPARE:
31201 case NB_EV_ABORT:
31202 return NB_OK;
31203 case NB_EV_APPLY:
31204 return bgp_peer_group_afi_safi_flag_modify(
31205 args, PEER_FLAG_NEXTHOP_SELF,
31206 yang_dnode_get_bool(args->dnode, NULL));
31207
31208 break;
31209 }
31210
31211 return NB_OK;
31212 }
31213
31214 /*
31215 * XPath:
31216 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self-force
31217 */
31218 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
31219 struct nb_cb_modify_args *args)
31220 {
31221 switch (args->event) {
31222 case NB_EV_VALIDATE:
31223 case NB_EV_PREPARE:
31224 case NB_EV_ABORT:
31225 return NB_OK;
31226 case NB_EV_APPLY:
31227 return bgp_peer_group_afi_safi_flag_modify(
31228 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
31229 yang_dnode_get_bool(args->dnode, NULL));
31230
31231 break;
31232 }
31233
31234 return NB_OK;
31235 }
31236
31237 /*
31238 * XPath:
31239 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all
31240 */
31241 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_modify(
31242 struct nb_cb_modify_args *args)
31243 {
31244 switch (args->event) {
31245 case NB_EV_VALIDATE:
31246 case NB_EV_PREPARE:
31247 case NB_EV_ABORT:
31248 return NB_OK;
31249 case NB_EV_APPLY:
31250 return bgp_peer_group_afi_safi_flag_modify(
31251 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
31252 yang_dnode_get_bool(args->dnode, NULL));
31253
31254 break;
31255 }
31256
31257 return NB_OK;
31258 }
31259
31260 /*
31261 * XPath:
31262 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all-replace
31263 */
31264 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
31265 struct nb_cb_modify_args *args)
31266 {
31267 switch (args->event) {
31268 case NB_EV_VALIDATE:
31269 case NB_EV_PREPARE:
31270 case NB_EV_ABORT:
31271 return NB_OK;
31272 case NB_EV_APPLY:
31273 return bgp_peer_group_afi_safi_flag_modify(
31274 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
31275 yang_dnode_get_bool(args->dnode, NULL));
31276
31277 break;
31278 }
31279
31280 return NB_OK;
31281 }
31282
31283 /*
31284 * XPath:
31285 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as
31286 */
31287 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_modify(
31288 struct nb_cb_modify_args *args)
31289 {
31290 switch (args->event) {
31291 case NB_EV_VALIDATE:
31292 case NB_EV_PREPARE:
31293 case NB_EV_ABORT:
31294 return NB_OK;
31295 case NB_EV_APPLY:
31296 return bgp_peer_group_afi_safi_flag_modify(
31297 args, PEER_FLAG_REMOVE_PRIVATE_AS,
31298 yang_dnode_get_bool(args->dnode, NULL));
31299
31300 break;
31301 }
31302
31303 return NB_OK;
31304 }
31305
31306 /*
31307 * XPath:
31308 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-replace
31309 */
31310 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_replace_modify(
31311 struct nb_cb_modify_args *args)
31312 {
31313 switch (args->event) {
31314 case NB_EV_VALIDATE:
31315 case NB_EV_PREPARE:
31316 case NB_EV_ABORT:
31317 return NB_OK;
31318 case NB_EV_APPLY:
31319 return bgp_peer_group_afi_safi_flag_modify(
31320 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
31321 yang_dnode_get_bool(args->dnode, NULL));
31322
31323 break;
31324 }
31325
31326 return NB_OK;
31327 }
31328
31329 static int bgp_peer_group_afi_safi_weight_modify(struct nb_cb_modify_args *args)
31330 {
31331 struct bgp *bgp;
31332 const char *peer_str;
31333 struct peer *peer;
31334 const struct lyd_node *nbr_dnode;
31335 const struct lyd_node *nbr_af_dnode;
31336 const char *af_name;
31337 uint16_t weight;
31338 afi_t afi;
31339 safi_t safi;
31340 int ret;
31341
31342 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
31343 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
31344 yang_afi_safi_identity2value(af_name, &afi, &safi);
31345
31346 nbr_dnode = yang_dnode_get_parent(args->dnode, "peer-group");
31347 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
31348 peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
31349 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
31350
31351 weight = yang_dnode_get_uint16(args->dnode, NULL);
31352
31353 ret = peer_weight_set(peer, afi, safi, weight);
31354 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0)
31355 return NB_ERR_INCONSISTENCY;
31356
31357 return NB_OK;
31358 }
31359
31360 static int
31361 bgp_peer_group_afi_safi_weight_destroy(struct nb_cb_destroy_args *args)
31362 {
31363 struct bgp *bgp;
31364 const char *peer_str;
31365 struct peer *peer;
31366 const struct lyd_node *nbr_dnode;
31367 const struct lyd_node *nbr_af_dnode;
31368 const char *af_name;
31369 afi_t afi;
31370 safi_t safi;
31371 int ret;
31372
31373 nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
31374 af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
31375 yang_afi_safi_identity2value(af_name, &afi, &safi);
31376 nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
31377 bgp = nb_running_get_entry(nbr_dnode, NULL, true);
31378 peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
31379 peer = bgp_peer_group_peer_lookup(bgp, peer_str);
31380
31381 ret = peer_weight_unset(peer, afi, safi);
31382 if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0)
31383 return NB_ERR_INCONSISTENCY;
31384
31385 return NB_OK;
31386 }
31387
31388 /*
31389 * XPath:
31390 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/weight/weight-attribute
31391 */
31392 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_modify(
31393 struct nb_cb_modify_args *args)
31394 {
31395 switch (args->event) {
31396 case NB_EV_VALIDATE:
31397 case NB_EV_PREPARE:
31398 case NB_EV_ABORT:
31399 return NB_OK;
31400 case NB_EV_APPLY:
31401 return bgp_peer_group_afi_safi_weight_modify(args);
31402
31403 break;
31404 }
31405
31406 return NB_OK;
31407 }
31408
31409 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_destroy(
31410 struct nb_cb_destroy_args *args)
31411 {
31412 switch (args->event) {
31413 case NB_EV_VALIDATE:
31414 case NB_EV_PREPARE:
31415 case NB_EV_ABORT:
31416 return NB_OK;
31417 case NB_EV_APPLY:
31418 return bgp_peer_group_afi_safi_weight_destroy(args);
31419
31420 break;
31421 }
31422
31423 return NB_OK;
31424 }
31425
31426 /*
31427 * XPath:
31428 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/route-reflector/route-reflector-client
31429 */
31430 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_route_reflector_route_reflector_client_modify(
31431 struct nb_cb_modify_args *args)
31432 {
31433 switch (args->event) {
31434 case NB_EV_VALIDATE:
31435 case NB_EV_PREPARE:
31436 case NB_EV_ABORT:
31437 return NB_OK;
31438 case NB_EV_APPLY:
31439 return bgp_peer_group_afi_safi_flag_modify(
31440 args, PEER_FLAG_REFLECTOR_CLIENT,
31441 yang_dnode_get_bool(args->dnode, NULL));
31442
31443 break;
31444 }
31445
31446 return NB_OK;
31447 }
31448
31449 /*
31450 * XPath:
31451 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/route-server/route-server-client
31452 */
31453 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_route_server_route_server_client_modify(
31454 struct nb_cb_modify_args *args)
31455 {
31456 switch (args->event) {
31457 case NB_EV_VALIDATE:
31458 case NB_EV_PREPARE:
31459 case NB_EV_ABORT:
31460 return NB_OK;
31461 case NB_EV_APPLY:
31462 return bgp_peer_group_afi_safi_flag_modify(
31463 args, PEER_FLAG_RSERVER_CLIENT,
31464 yang_dnode_get_bool(args->dnode, NULL));
31465
31466 break;
31467 }
31468
31469 return NB_OK;
31470 }
31471
31472 /*
31473 * XPath:
31474 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/send-community/send-community
31475 */
31476 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_send_community_modify(
31477 struct nb_cb_modify_args *args)
31478 {
31479 switch (args->event) {
31480 case NB_EV_VALIDATE:
31481 case NB_EV_PREPARE:
31482 case NB_EV_ABORT:
31483 return NB_OK;
31484 case NB_EV_APPLY:
31485 return bgp_peer_group_afi_safi_flag_modify(
31486 args, PEER_FLAG_SEND_COMMUNITY,
31487 yang_dnode_get_bool(args->dnode, NULL));
31488
31489 break;
31490 }
31491
31492 return NB_OK;
31493 }
31494
31495 /*
31496 * XPath:
31497 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/send-community/send-ext-community
31498 */
31499 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_send_ext_community_modify(
31500 struct nb_cb_modify_args *args)
31501 {
31502 switch (args->event) {
31503 case NB_EV_VALIDATE:
31504 case NB_EV_PREPARE:
31505 case NB_EV_ABORT:
31506 return NB_OK;
31507 case NB_EV_APPLY:
31508 return bgp_peer_group_afi_safi_flag_modify(
31509 args, PEER_FLAG_SEND_EXT_COMMUNITY,
31510 yang_dnode_get_bool(args->dnode, NULL));
31511
31512 break;
31513 }
31514
31515 return NB_OK;
31516 }
31517
31518 /*
31519 * XPath:
31520 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/send-community/send-large-community
31521 */
31522 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_send_large_community_modify(
31523 struct nb_cb_modify_args *args)
31524 {
31525 switch (args->event) {
31526 case NB_EV_VALIDATE:
31527 case NB_EV_PREPARE:
31528 case NB_EV_ABORT:
31529 return NB_OK;
31530 case NB_EV_APPLY:
31531 return bgp_peer_group_afi_safi_flag_modify(
31532 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
31533 yang_dnode_get_bool(args->dnode, NULL));
31534
31535 break;
31536 }
31537
31538 return NB_OK;
31539 }
31540
31541 /*
31542 * XPath:
31543 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/soft-reconfiguration
31544 */
31545 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_modify(
31546 struct nb_cb_modify_args *args)
31547 {
31548 switch (args->event) {
31549 case NB_EV_VALIDATE:
31550 case NB_EV_PREPARE:
31551 case NB_EV_ABORT:
31552 return NB_OK;
31553 case NB_EV_APPLY:
31554 return bgp_peer_group_afi_safi_flag_modify(
31555 args, PEER_FLAG_SOFT_RECONFIG,
31556 yang_dnode_get_bool(args->dnode, NULL));
31557
31558 break;
31559 }
31560
31561 return NB_OK;
31562 }
31563
31564 /*
31565 * XPath:
31566 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/as-path-unchanged
31567 */
31568 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
31569 struct nb_cb_modify_args *args)
31570 {
31571 switch (args->event) {
31572 case NB_EV_VALIDATE:
31573 case NB_EV_PREPARE:
31574 case NB_EV_ABORT:
31575 return NB_OK;
31576 case NB_EV_APPLY:
31577 return bgp_peer_group_afi_safi_flag_modify(
31578 args, PEER_FLAG_AS_PATH_UNCHANGED,
31579 yang_dnode_get_bool(args->dnode, NULL));
31580
31581 break;
31582 }
31583
31584 return NB_OK;
31585 }
31586
31587 /*
31588 * XPath:
31589 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/next-hop-unchanged
31590 */
31591 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
31592 struct nb_cb_modify_args *args)
31593 {
31594 switch (args->event) {
31595 case NB_EV_VALIDATE:
31596 case NB_EV_PREPARE:
31597 case NB_EV_ABORT:
31598 return NB_OK;
31599 case NB_EV_APPLY:
31600 return bgp_peer_group_afi_safi_flag_modify(
31601 args, PEER_FLAG_NEXTHOP_UNCHANGED,
31602 yang_dnode_get_bool(args->dnode, NULL));
31603
31604 break;
31605 }
31606
31607 return NB_OK;
31608 }
31609
31610 /*
31611 * XPath:
31612 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/med-unchanged
31613 */
31614 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_unchanged_modify(
31615 struct nb_cb_modify_args *args)
31616 {
31617 switch (args->event) {
31618 case NB_EV_VALIDATE:
31619 case NB_EV_PREPARE:
31620 case NB_EV_ABORT:
31621 return NB_OK;
31622 case NB_EV_APPLY:
31623 return bgp_peer_group_afi_safi_flag_modify(
31624 args, PEER_FLAG_MED_UNCHANGED,
31625 yang_dnode_get_bool(args->dnode, NULL));
31626
31627 break;
31628 }
31629
31630 return NB_OK;
31631 }
31632
31633 /*
31634 * XPath:
31635 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-send
31636 */
31637 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_modify(
31638 struct nb_cb_modify_args *args)
31639 {
31640 switch (args->event) {
31641 case NB_EV_VALIDATE:
31642 case NB_EV_PREPARE:
31643 case NB_EV_ABORT:
31644 case NB_EV_APPLY:
31645 /* TODO: implement me. */
31646 break;
31647 }
31648
31649 return NB_OK;
31650 }
31651
31652 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_destroy(
31653 struct nb_cb_destroy_args *args)
31654 {
31655 switch (args->event) {
31656 case NB_EV_VALIDATE:
31657 case NB_EV_PREPARE:
31658 case NB_EV_ABORT:
31659 case NB_EV_APPLY:
31660 /* TODO: implement me. */
31661 break;
31662 }
31663
31664 return NB_OK;
31665 }
31666
31667 /*
31668 * XPath:
31669 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-receive
31670 */
31671 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_modify(
31672 struct nb_cb_modify_args *args)
31673 {
31674 switch (args->event) {
31675 case NB_EV_VALIDATE:
31676 case NB_EV_PREPARE:
31677 case NB_EV_ABORT:
31678 case NB_EV_APPLY:
31679 /* TODO: implement me. */
31680 break;
31681 }
31682
31683 return NB_OK;
31684 }
31685
31686 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_destroy(
31687 struct nb_cb_destroy_args *args)
31688 {
31689 switch (args->event) {
31690 case NB_EV_VALIDATE:
31691 case NB_EV_PREPARE:
31692 case NB_EV_ABORT:
31693 case NB_EV_APPLY:
31694 /* TODO: implement me. */
31695 break;
31696 }
31697
31698 return NB_OK;
31699 }
31700
31701 /*
31702 * XPath:
31703 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-both
31704 */
31705 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_modify(
31706 struct nb_cb_modify_args *args)
31707 {
31708 switch (args->event) {
31709 case NB_EV_VALIDATE:
31710 case NB_EV_PREPARE:
31711 case NB_EV_ABORT:
31712 case NB_EV_APPLY:
31713 /* TODO: implement me. */
31714 break;
31715 }
31716
31717 return NB_OK;
31718 }
31719
31720 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_destroy(
31721 struct nb_cb_destroy_args *args)
31722 {
31723 switch (args->event) {
31724 case NB_EV_VALIDATE:
31725 case NB_EV_PREPARE:
31726 case NB_EV_ABORT:
31727 case NB_EV_APPLY:
31728 /* TODO: implement me. */
31729 break;
31730 }
31731
31732 return NB_OK;
31733 }
31734
31735 /*
31736 * XPath:
31737 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-import
31738 */
31739 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_modify(
31740 struct nb_cb_modify_args *args)
31741 {
31742 switch (args->event) {
31743 case NB_EV_VALIDATE:
31744 case NB_EV_PREPARE:
31745 case NB_EV_ABORT:
31746 case NB_EV_APPLY:
31747 /* TODO: implement me. */
31748 break;
31749 }
31750
31751 return NB_OK;
31752 }
31753
31754 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_destroy(
31755 struct nb_cb_destroy_args *args)
31756 {
31757 switch (args->event) {
31758 case NB_EV_VALIDATE:
31759 case NB_EV_PREPARE:
31760 case NB_EV_ABORT:
31761 case NB_EV_APPLY:
31762 /* TODO: implement me. */
31763 break;
31764 }
31765
31766 return NB_OK;
31767 }
31768
31769 /*
31770 * XPath:
31771 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-export
31772 */
31773 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify(
31774 struct nb_cb_modify_args *args)
31775 {
31776 switch (args->event) {
31777 case NB_EV_VALIDATE:
31778 case NB_EV_PREPARE:
31779 case NB_EV_ABORT:
31780 case NB_EV_APPLY:
31781 /* TODO: implement me. */
31782 break;
31783 }
31784
31785 return NB_OK;
31786 }
31787
31788 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy(
31789 struct nb_cb_destroy_args *args)
31790 {
31791 switch (args->event) {
31792 case NB_EV_VALIDATE:
31793 case NB_EV_PREPARE:
31794 case NB_EV_ABORT:
31795 case NB_EV_APPLY:
31796 /* TODO: implement me. */
31797 break;
31798 }
31799
31800 return NB_OK;
31801 }
31802
31803 /*
31804 * XPath:
31805 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-import
31806 */
31807 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_modify(
31808 struct nb_cb_modify_args *args)
31809 {
31810 switch (args->event) {
31811 case NB_EV_VALIDATE:
31812 case NB_EV_PREPARE:
31813 case NB_EV_ABORT:
31814 case NB_EV_APPLY:
31815 /* TODO: implement me. */
31816 break;
31817 }
31818
31819 return NB_OK;
31820 }
31821
31822 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_destroy(
31823 struct nb_cb_destroy_args *args)
31824 {
31825 switch (args->event) {
31826 case NB_EV_VALIDATE:
31827 case NB_EV_PREPARE:
31828 case NB_EV_ABORT:
31829 case NB_EV_APPLY:
31830 /* TODO: implement me. */
31831 break;
31832 }
31833
31834 return NB_OK;
31835 }
31836
31837 /*
31838 * XPath:
31839 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-export
31840 */
31841 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_modify(
31842 struct nb_cb_modify_args *args)
31843 {
31844 switch (args->event) {
31845 case NB_EV_VALIDATE:
31846 case NB_EV_PREPARE:
31847 case NB_EV_ABORT:
31848 case NB_EV_APPLY:
31849 /* TODO: implement me. */
31850 break;
31851 }
31852
31853 return NB_OK;
31854 }
31855
31856 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_destroy(
31857 struct nb_cb_destroy_args *args)
31858 {
31859 switch (args->event) {
31860 case NB_EV_VALIDATE:
31861 case NB_EV_PREPARE:
31862 case NB_EV_ABORT:
31863 case NB_EV_APPLY:
31864 /* TODO: implement me. */
31865 break;
31866 }
31867
31868 return NB_OK;
31869 }
31870
31871 /*
31872 * XPath:
31873 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-import
31874 */
31875 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_modify(
31876 struct nb_cb_modify_args *args)
31877 {
31878 switch (args->event) {
31879 case NB_EV_VALIDATE:
31880 case NB_EV_PREPARE:
31881 case NB_EV_ABORT:
31882 case NB_EV_APPLY:
31883 /* TODO: implement me. */
31884 break;
31885 }
31886
31887 return NB_OK;
31888 }
31889
31890 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_destroy(
31891 struct nb_cb_destroy_args *args)
31892 {
31893 switch (args->event) {
31894 case NB_EV_VALIDATE:
31895 case NB_EV_PREPARE:
31896 case NB_EV_ABORT:
31897 case NB_EV_APPLY:
31898 /* TODO: implement me. */
31899 break;
31900 }
31901
31902 return NB_OK;
31903 }
31904
31905 /*
31906 * XPath:
31907 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-export
31908 */
31909 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_modify(
31910 struct nb_cb_modify_args *args)
31911 {
31912 switch (args->event) {
31913 case NB_EV_VALIDATE:
31914 case NB_EV_PREPARE:
31915 case NB_EV_ABORT:
31916 case NB_EV_APPLY:
31917 /* TODO: implement me. */
31918 break;
31919 }
31920
31921 return NB_OK;
31922 }
31923
31924 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_destroy(
31925 struct nb_cb_destroy_args *args)
31926 {
31927 switch (args->event) {
31928 case NB_EV_VALIDATE:
31929 case NB_EV_PREPARE:
31930 case NB_EV_ABORT:
31931 case NB_EV_APPLY:
31932 /* TODO: implement me. */
31933 break;
31934 }
31935
31936 return NB_OK;
31937 }
31938
31939 /*
31940 * XPath:
31941 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-import
31942 */
31943 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
31944 struct nb_cb_modify_args *args)
31945 {
31946 switch (args->event) {
31947 case NB_EV_VALIDATE:
31948 case NB_EV_PREPARE:
31949 case NB_EV_ABORT:
31950 case NB_EV_APPLY:
31951 /* TODO: implement me. */
31952 break;
31953 }
31954
31955 return NB_OK;
31956 }
31957
31958 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
31959 struct nb_cb_destroy_args *args)
31960 {
31961 switch (args->event) {
31962 case NB_EV_VALIDATE:
31963 case NB_EV_PREPARE:
31964 case NB_EV_ABORT:
31965 case NB_EV_APPLY:
31966 /* TODO: implement me. */
31967 break;
31968 }
31969
31970 return NB_OK;
31971 }
31972
31973 /*
31974 * XPath:
31975 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-export
31976 */
31977 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
31978 struct nb_cb_modify_args *args)
31979 {
31980 switch (args->event) {
31981 case NB_EV_VALIDATE:
31982 case NB_EV_PREPARE:
31983 case NB_EV_ABORT:
31984 case NB_EV_APPLY:
31985 /* TODO: implement me. */
31986 break;
31987 }
31988
31989 return NB_OK;
31990 }
31991
31992 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
31993 struct nb_cb_destroy_args *args)
31994 {
31995 switch (args->event) {
31996 case NB_EV_VALIDATE:
31997 case NB_EV_PREPARE:
31998 case NB_EV_ABORT:
31999 case NB_EV_APPLY:
32000 /* TODO: implement me. */
32001 break;
32002 }
32003
32004 return NB_OK;
32005 }
32006
32007 /*
32008 * XPath:
32009 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-import
32010 */
32011 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_modify(
32012 struct nb_cb_modify_args *args)
32013 {
32014 switch (args->event) {
32015 case NB_EV_VALIDATE:
32016 case NB_EV_PREPARE:
32017 case NB_EV_ABORT:
32018 case NB_EV_APPLY:
32019 /* TODO: implement me. */
32020 break;
32021 }
32022
32023 return NB_OK;
32024 }
32025
32026 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
32027 struct nb_cb_destroy_args *args)
32028 {
32029 switch (args->event) {
32030 case NB_EV_VALIDATE:
32031 case NB_EV_PREPARE:
32032 case NB_EV_ABORT:
32033 case NB_EV_APPLY:
32034 /* TODO: implement me. */
32035 break;
32036 }
32037
32038 return NB_OK;
32039 }
32040
32041 /*
32042 * XPath:
32043 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-export
32044 */
32045 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_modify(
32046 struct nb_cb_modify_args *args)
32047 {
32048 switch (args->event) {
32049 case NB_EV_VALIDATE:
32050 case NB_EV_PREPARE:
32051 case NB_EV_ABORT:
32052 case NB_EV_APPLY:
32053 /* TODO: implement me. */
32054 break;
32055 }
32056
32057 return NB_OK;
32058 }
32059
32060 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
32061 struct nb_cb_destroy_args *args)
32062 {
32063 switch (args->event) {
32064 case NB_EV_VALIDATE:
32065 case NB_EV_PREPARE:
32066 case NB_EV_ABORT:
32067 case NB_EV_APPLY:
32068 /* TODO: implement me. */
32069 break;
32070 }
32071
32072 return NB_OK;
32073 }
32074
32075 /*
32076 * XPath:
32077 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/nexthop-local-unchanged
32078 */
32079 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_local_unchanged_modify(
32080 struct nb_cb_modify_args *args)
32081 {
32082 switch (args->event) {
32083 case NB_EV_VALIDATE:
32084 case NB_EV_PREPARE:
32085 case NB_EV_ABORT:
32086 case NB_EV_APPLY:
32087 /* TODO: implement me. */
32088 break;
32089 }
32090
32091 return NB_OK;
32092 }
32093
32094 /*
32095 * XPath:
32096 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/add-paths/path-type
32097 */
32098 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_add_paths_path_type_modify(
32099 struct nb_cb_modify_args *args)
32100 {
32101 switch (args->event) {
32102 case NB_EV_VALIDATE:
32103 case NB_EV_PREPARE:
32104 case NB_EV_ABORT:
32105 case NB_EV_APPLY:
32106 /* TODO: implement me. */
32107 break;
32108 }
32109
32110 return NB_OK;
32111 }
32112
32113 /*
32114 * XPath:
32115 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-as
32116 */
32117 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_modify(
32118 struct nb_cb_modify_args *args)
32119 {
32120 switch (args->event) {
32121 case NB_EV_VALIDATE:
32122 case NB_EV_PREPARE:
32123 case NB_EV_ABORT:
32124 case NB_EV_APPLY:
32125 /* TODO: implement me. */
32126 break;
32127 }
32128
32129 return NB_OK;
32130 }
32131
32132 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_destroy(
32133 struct nb_cb_destroy_args *args)
32134 {
32135 switch (args->event) {
32136 case NB_EV_VALIDATE:
32137 case NB_EV_PREPARE:
32138 case NB_EV_ABORT:
32139 case NB_EV_APPLY:
32140 /* TODO: implement me. */
32141 break;
32142 }
32143
32144 return NB_OK;
32145 }
32146
32147 /*
32148 * XPath:
32149 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-origin-as
32150 */
32151 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
32152 struct nb_cb_modify_args *args)
32153 {
32154 switch (args->event) {
32155 case NB_EV_VALIDATE:
32156 case NB_EV_PREPARE:
32157 case NB_EV_ABORT:
32158 case NB_EV_APPLY:
32159 /* TODO: implement me. */
32160 break;
32161 }
32162
32163 return NB_OK;
32164 }
32165
32166 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
32167 struct nb_cb_destroy_args *args)
32168 {
32169 switch (args->event) {
32170 case NB_EV_VALIDATE:
32171 case NB_EV_PREPARE:
32172 case NB_EV_ABORT:
32173 case NB_EV_APPLY:
32174 /* TODO: implement me. */
32175 break;
32176 }
32177
32178 return NB_OK;
32179 }
32180
32181 /*
32182 * XPath:
32183 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/as-path-options/replace-peer-as
32184 */
32185 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify(
32186 struct nb_cb_modify_args *args)
32187 {
32188 switch (args->event) {
32189 case NB_EV_VALIDATE:
32190 case NB_EV_PREPARE:
32191 case NB_EV_ABORT:
32192 return NB_OK;
32193 case NB_EV_APPLY:
32194 return bgp_peer_group_afi_safi_flag_modify(
32195 args, PEER_FLAG_AS_OVERRIDE,
32196 yang_dnode_get_bool(args->dnode, NULL));
32197
32198 break;
32199 }
32200
32201 return NB_OK;
32202 }
32203
32204 /*
32205 * XPath:
32206 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/default-originate/originate
32207 */
32208 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify(
32209 struct nb_cb_modify_args *args)
32210 {
32211 switch (args->event) {
32212 case NB_EV_VALIDATE:
32213 case NB_EV_PREPARE:
32214 case NB_EV_ABORT:
32215 case NB_EV_APPLY:
32216 /* TODO: implement me. */
32217 break;
32218 }
32219
32220 return NB_OK;
32221 }
32222
32223 /*
32224 * XPath:
32225 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map
32226 */
32227 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify(
32228 struct nb_cb_modify_args *args)
32229 {
32230 switch (args->event) {
32231 case NB_EV_VALIDATE:
32232 case NB_EV_PREPARE:
32233 case NB_EV_ABORT:
32234 case NB_EV_APPLY:
32235 /* TODO: implement me. */
32236 break;
32237 }
32238
32239 return NB_OK;
32240 }
32241
32242 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy(
32243 struct nb_cb_destroy_args *args)
32244 {
32245 switch (args->event) {
32246 case NB_EV_VALIDATE:
32247 case NB_EV_PREPARE:
32248 case NB_EV_ABORT:
32249 case NB_EV_APPLY:
32250 /* TODO: implement me. */
32251 break;
32252 }
32253
32254 return NB_OK;
32255 }
32256
32257 /*
32258 * XPath:
32259 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/as-path-unchanged
32260 */
32261 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
32262 struct nb_cb_modify_args *args)
32263 {
32264 switch (args->event) {
32265 case NB_EV_VALIDATE:
32266 case NB_EV_PREPARE:
32267 case NB_EV_ABORT:
32268 return NB_OK;
32269 case NB_EV_APPLY:
32270 return bgp_peer_group_afi_safi_flag_modify(
32271 args, PEER_FLAG_AS_PATH_UNCHANGED,
32272 yang_dnode_get_bool(args->dnode, NULL));
32273
32274 break;
32275 }
32276
32277 return NB_OK;
32278 }
32279
32280 /*
32281 * XPath:
32282 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/next-hop-unchanged
32283 */
32284 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
32285 struct nb_cb_modify_args *args)
32286 {
32287 switch (args->event) {
32288 case NB_EV_VALIDATE:
32289 case NB_EV_PREPARE:
32290 case NB_EV_ABORT:
32291 return NB_OK;
32292 case NB_EV_APPLY:
32293 return bgp_peer_group_afi_safi_flag_modify(
32294 args, PEER_FLAG_NEXTHOP_UNCHANGED,
32295 yang_dnode_get_bool(args->dnode, NULL));
32296
32297 break;
32298 }
32299
32300 return NB_OK;
32301 }
32302
32303 /*
32304 * XPath:
32305 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/med-unchanged
32306 */
32307 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_unchanged_modify(
32308 struct nb_cb_modify_args *args)
32309 {
32310 switch (args->event) {
32311 case NB_EV_VALIDATE:
32312 case NB_EV_PREPARE:
32313 case NB_EV_ABORT:
32314 return NB_OK;
32315 case NB_EV_APPLY:
32316 return bgp_peer_group_afi_safi_flag_modify(
32317 args, PEER_FLAG_MED_UNCHANGED,
32318 yang_dnode_get_bool(args->dnode, NULL));
32319
32320 break;
32321 }
32322
32323 return NB_OK;
32324 }
32325
32326 /*
32327 * XPath:
32328 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-send
32329 */
32330 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_modify(
32331 struct nb_cb_modify_args *args)
32332 {
32333 switch (args->event) {
32334 case NB_EV_VALIDATE:
32335 case NB_EV_PREPARE:
32336 case NB_EV_ABORT:
32337 case NB_EV_APPLY:
32338 /* TODO: implement me. */
32339 break;
32340 }
32341
32342 return NB_OK;
32343 }
32344
32345 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_destroy(
32346 struct nb_cb_destroy_args *args)
32347 {
32348 switch (args->event) {
32349 case NB_EV_VALIDATE:
32350 case NB_EV_PREPARE:
32351 case NB_EV_ABORT:
32352 case NB_EV_APPLY:
32353 /* TODO: implement me. */
32354 break;
32355 }
32356
32357 return NB_OK;
32358 }
32359
32360 /*
32361 * XPath:
32362 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-receive
32363 */
32364 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_modify(
32365 struct nb_cb_modify_args *args)
32366 {
32367 switch (args->event) {
32368 case NB_EV_VALIDATE:
32369 case NB_EV_PREPARE:
32370 case NB_EV_ABORT:
32371 case NB_EV_APPLY:
32372 /* TODO: implement me. */
32373 break;
32374 }
32375
32376 return NB_OK;
32377 }
32378
32379 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_destroy(
32380 struct nb_cb_destroy_args *args)
32381 {
32382 switch (args->event) {
32383 case NB_EV_VALIDATE:
32384 case NB_EV_PREPARE:
32385 case NB_EV_ABORT:
32386 case NB_EV_APPLY:
32387 /* TODO: implement me. */
32388 break;
32389 }
32390
32391 return NB_OK;
32392 }
32393
32394 /*
32395 * XPath:
32396 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-both
32397 */
32398 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_modify(
32399 struct nb_cb_modify_args *args)
32400 {
32401 switch (args->event) {
32402 case NB_EV_VALIDATE:
32403 case NB_EV_PREPARE:
32404 case NB_EV_ABORT:
32405 case NB_EV_APPLY:
32406 /* TODO: implement me. */
32407 break;
32408 }
32409
32410 return NB_OK;
32411 }
32412
32413 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_destroy(
32414 struct nb_cb_destroy_args *args)
32415 {
32416 switch (args->event) {
32417 case NB_EV_VALIDATE:
32418 case NB_EV_PREPARE:
32419 case NB_EV_ABORT:
32420 case NB_EV_APPLY:
32421 /* TODO: implement me. */
32422 break;
32423 }
32424
32425 return NB_OK;
32426 }
32427
32428 /*
32429 * XPath:
32430 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list
32431 */
32432 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create(
32433 struct nb_cb_create_args *args)
32434 {
32435 switch (args->event) {
32436 case NB_EV_VALIDATE:
32437 case NB_EV_PREPARE:
32438 case NB_EV_ABORT:
32439 case NB_EV_APPLY:
32440 /* TODO: implement me. */
32441 break;
32442 }
32443
32444 return NB_OK;
32445 }
32446
32447 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy(
32448 struct nb_cb_destroy_args *args)
32449 {
32450 switch (args->event) {
32451 case NB_EV_VALIDATE:
32452 case NB_EV_PREPARE:
32453 case NB_EV_ABORT:
32454 return NB_OK;
32455 case NB_EV_APPLY:
32456 return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
32457 }
32458
32459 return NB_OK;
32460 }
32461
32462 /*
32463 * XPath:
32464 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/max-prefixes
32465 */
32466 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
32467 struct nb_cb_modify_args *args)
32468 {
32469 switch (args->event) {
32470 case NB_EV_VALIDATE:
32471 case NB_EV_PREPARE:
32472 case NB_EV_ABORT:
32473 case NB_EV_APPLY:
32474 /* TODO: implement me. */
32475 break;
32476 }
32477
32478 return NB_OK;
32479 }
32480
32481 /*
32482 * XPath:
32483 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check
32484 */
32485 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
32486 struct nb_cb_modify_args *args)
32487 {
32488 switch (args->event) {
32489 case NB_EV_VALIDATE:
32490 case NB_EV_PREPARE:
32491 case NB_EV_ABORT:
32492 case NB_EV_APPLY:
32493 /* TODO: implement me. */
32494 break;
32495 }
32496
32497 return NB_OK;
32498 }
32499
32500 /*
32501 * XPath:
32502 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only
32503 */
32504 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
32505 struct nb_cb_modify_args *args)
32506 {
32507 switch (args->event) {
32508 case NB_EV_VALIDATE:
32509 case NB_EV_PREPARE:
32510 case NB_EV_ABORT:
32511 case NB_EV_APPLY:
32512 /* TODO: implement me. */
32513 break;
32514 }
32515
32516 return NB_OK;
32517 }
32518
32519 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
32520 struct nb_cb_destroy_args *args)
32521 {
32522 switch (args->event) {
32523 case NB_EV_VALIDATE:
32524 case NB_EV_PREPARE:
32525 case NB_EV_ABORT:
32526 case NB_EV_APPLY:
32527 /* TODO: implement me. */
32528 break;
32529 }
32530
32531 return NB_OK;
32532 }
32533
32534 /*
32535 * XPath:
32536 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer
32537 */
32538 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
32539 struct nb_cb_modify_args *args)
32540 {
32541 switch (args->event) {
32542 case NB_EV_VALIDATE:
32543 case NB_EV_PREPARE:
32544 case NB_EV_ABORT:
32545 case NB_EV_APPLY:
32546 /* TODO: implement me. */
32547 break;
32548 }
32549
32550 return NB_OK;
32551 }
32552
32553 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
32554 struct nb_cb_destroy_args *args)
32555 {
32556 switch (args->event) {
32557 case NB_EV_VALIDATE:
32558 case NB_EV_PREPARE:
32559 case NB_EV_ABORT:
32560 case NB_EV_APPLY:
32561 /* TODO: implement me. */
32562 break;
32563 }
32564
32565 return NB_OK;
32566 }
32567
32568 /*
32569 * XPath:
32570 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
32571 */
32572 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
32573 struct nb_cb_modify_args *args)
32574 {
32575 switch (args->event) {
32576 case NB_EV_VALIDATE:
32577 case NB_EV_PREPARE:
32578 case NB_EV_ABORT:
32579 case NB_EV_APPLY:
32580 /* TODO: implement me. */
32581 break;
32582 }
32583
32584 return NB_OK;
32585 }
32586
32587 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
32588 struct nb_cb_destroy_args *args)
32589 {
32590 switch (args->event) {
32591 case NB_EV_VALIDATE:
32592 case NB_EV_PREPARE:
32593 case NB_EV_ABORT:
32594 case NB_EV_APPLY:
32595 /* TODO: implement me. */
32596 break;
32597 }
32598
32599 return NB_OK;
32600 }
32601
32602 /*
32603 * XPath:
32604 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
32605 */
32606 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
32607 struct nb_cb_modify_args *args)
32608 {
32609 switch (args->event) {
32610 case NB_EV_VALIDATE:
32611 case NB_EV_PREPARE:
32612 case NB_EV_ABORT:
32613 case NB_EV_APPLY:
32614 /* TODO: implement me. */
32615 break;
32616 }
32617
32618 return NB_OK;
32619 }
32620
32621 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
32622 struct nb_cb_destroy_args *args)
32623 {
32624 switch (args->event) {
32625 case NB_EV_VALIDATE:
32626 case NB_EV_PREPARE:
32627 case NB_EV_ABORT:
32628 case NB_EV_APPLY:
32629 /* TODO: implement me. */
32630 break;
32631 }
32632
32633 return NB_OK;
32634 }
32635
32636 /*
32637 * XPath:
32638 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer
32639 */
32640 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
32641 struct nb_cb_modify_args *args)
32642 {
32643 switch (args->event) {
32644 case NB_EV_VALIDATE:
32645 case NB_EV_PREPARE:
32646 case NB_EV_ABORT:
32647 case NB_EV_APPLY:
32648 /* TODO: implement me. */
32649 break;
32650 }
32651
32652 return NB_OK;
32653 }
32654
32655 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
32656 struct nb_cb_destroy_args *args)
32657 {
32658 switch (args->event) {
32659 case NB_EV_VALIDATE:
32660 case NB_EV_PREPARE:
32661 case NB_EV_ABORT:
32662 case NB_EV_APPLY:
32663 /* TODO: implement me. */
32664 break;
32665 }
32666
32667 return NB_OK;
32668 }
32669
32670 /*
32671 * XPath:
32672 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
32673 */
32674 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
32675 struct nb_cb_modify_args *args)
32676 {
32677 switch (args->event) {
32678 case NB_EV_VALIDATE:
32679 case NB_EV_PREPARE:
32680 case NB_EV_ABORT:
32681 case NB_EV_APPLY:
32682 /* TODO: implement me. */
32683 break;
32684 }
32685
32686 return NB_OK;
32687 }
32688
32689 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
32690 struct nb_cb_destroy_args *args)
32691 {
32692 switch (args->event) {
32693 case NB_EV_VALIDATE:
32694 case NB_EV_PREPARE:
32695 case NB_EV_ABORT:
32696 case NB_EV_APPLY:
32697 /* TODO: implement me. */
32698 break;
32699 }
32700
32701 return NB_OK;
32702 }
32703
32704 /*
32705 * XPath:
32706 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only
32707 */
32708 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
32709 struct nb_cb_modify_args *args)
32710 {
32711 switch (args->event) {
32712 case NB_EV_VALIDATE:
32713 case NB_EV_PREPARE:
32714 case NB_EV_ABORT:
32715 case NB_EV_APPLY:
32716 /* TODO: implement me. */
32717 break;
32718 }
32719
32720 return NB_OK;
32721 }
32722
32723 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
32724 struct nb_cb_destroy_args *args)
32725 {
32726 switch (args->event) {
32727 case NB_EV_VALIDATE:
32728 case NB_EV_PREPARE:
32729 case NB_EV_ABORT:
32730 case NB_EV_APPLY:
32731 /* TODO: implement me. */
32732 break;
32733 }
32734
32735 return NB_OK;
32736 }
32737
32738 /*
32739 * XPath:
32740 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self
32741 */
32742 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify(
32743 struct nb_cb_modify_args *args)
32744 {
32745 switch (args->event) {
32746 case NB_EV_VALIDATE:
32747 case NB_EV_PREPARE:
32748 case NB_EV_ABORT:
32749 return NB_OK;
32750 case NB_EV_APPLY:
32751 return bgp_peer_group_afi_safi_flag_modify(
32752 args, PEER_FLAG_NEXTHOP_SELF,
32753 yang_dnode_get_bool(args->dnode, NULL));
32754
32755 break;
32756 }
32757
32758 return NB_OK;
32759 }
32760
32761 /*
32762 * XPath:
32763 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self-force
32764 */
32765 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
32766 struct nb_cb_modify_args *args)
32767 {
32768 switch (args->event) {
32769 case NB_EV_VALIDATE:
32770 case NB_EV_PREPARE:
32771 case NB_EV_ABORT:
32772 return NB_OK;
32773 case NB_EV_APPLY:
32774 return bgp_peer_group_afi_safi_flag_modify(
32775 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
32776 yang_dnode_get_bool(args->dnode, NULL));
32777
32778 break;
32779 }
32780
32781 return NB_OK;
32782 }
32783
32784 /*
32785 * XPath:
32786 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all
32787 */
32788 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_modify(
32789 struct nb_cb_modify_args *args)
32790 {
32791 switch (args->event) {
32792 case NB_EV_VALIDATE:
32793 case NB_EV_PREPARE:
32794 case NB_EV_ABORT:
32795 return NB_OK;
32796 case NB_EV_APPLY:
32797 return bgp_peer_group_afi_safi_flag_modify(
32798 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
32799 yang_dnode_get_bool(args->dnode, NULL));
32800
32801 break;
32802 }
32803
32804 return NB_OK;
32805 }
32806
32807 /*
32808 * XPath:
32809 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all-replace
32810 */
32811 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
32812 struct nb_cb_modify_args *args)
32813 {
32814 switch (args->event) {
32815 case NB_EV_VALIDATE:
32816 case NB_EV_PREPARE:
32817 case NB_EV_ABORT:
32818 return NB_OK;
32819 case NB_EV_APPLY:
32820 return bgp_peer_group_afi_safi_flag_modify(
32821 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
32822 yang_dnode_get_bool(args->dnode, NULL));
32823
32824 break;
32825 }
32826
32827 return NB_OK;
32828 }
32829
32830 /*
32831 * XPath:
32832 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as
32833 */
32834 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_modify(
32835 struct nb_cb_modify_args *args)
32836 {
32837 switch (args->event) {
32838 case NB_EV_VALIDATE:
32839 case NB_EV_PREPARE:
32840 case NB_EV_ABORT:
32841 return NB_OK;
32842 case NB_EV_APPLY:
32843 return bgp_peer_group_afi_safi_flag_modify(
32844 args, PEER_FLAG_REMOVE_PRIVATE_AS,
32845 yang_dnode_get_bool(args->dnode, NULL));
32846
32847 break;
32848 }
32849
32850 return NB_OK;
32851 }
32852
32853 /*
32854 * XPath:
32855 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-replace
32856 */
32857 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_replace_modify(
32858 struct nb_cb_modify_args *args)
32859 {
32860 switch (args->event) {
32861 case NB_EV_VALIDATE:
32862 case NB_EV_PREPARE:
32863 case NB_EV_ABORT:
32864 return NB_OK;
32865 case NB_EV_APPLY:
32866 return bgp_peer_group_afi_safi_flag_modify(
32867 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
32868 yang_dnode_get_bool(args->dnode, NULL));
32869
32870 break;
32871 }
32872
32873 return NB_OK;
32874 }
32875
32876 /*
32877 * XPath:
32878 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/route-reflector/route-reflector-client
32879 */
32880 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_route_reflector_route_reflector_client_modify(
32881 struct nb_cb_modify_args *args)
32882 {
32883 switch (args->event) {
32884 case NB_EV_VALIDATE:
32885 case NB_EV_PREPARE:
32886 case NB_EV_ABORT:
32887 return NB_OK;
32888 case NB_EV_APPLY:
32889 return bgp_peer_group_afi_safi_flag_modify(
32890 args, PEER_FLAG_REFLECTOR_CLIENT,
32891 yang_dnode_get_bool(args->dnode, NULL));
32892
32893 break;
32894 }
32895
32896 return NB_OK;
32897 }
32898
32899 /*
32900 * XPath:
32901 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/route-server/route-server-client
32902 */
32903 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_route_server_route_server_client_modify(
32904 struct nb_cb_modify_args *args)
32905 {
32906 switch (args->event) {
32907 case NB_EV_VALIDATE:
32908 case NB_EV_PREPARE:
32909 case NB_EV_ABORT:
32910 return NB_OK;
32911 case NB_EV_APPLY:
32912 return bgp_peer_group_afi_safi_flag_modify(
32913 args, PEER_FLAG_RSERVER_CLIENT,
32914 yang_dnode_get_bool(args->dnode, NULL));
32915
32916 break;
32917 }
32918
32919 return NB_OK;
32920 }
32921
32922 /*
32923 * XPath:
32924 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/send-community/send-community
32925 */
32926 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_send_community_modify(
32927 struct nb_cb_modify_args *args)
32928 {
32929 switch (args->event) {
32930 case NB_EV_VALIDATE:
32931 case NB_EV_PREPARE:
32932 case NB_EV_ABORT:
32933 return NB_OK;
32934 case NB_EV_APPLY:
32935 return bgp_peer_group_afi_safi_flag_modify(
32936 args, PEER_FLAG_SEND_COMMUNITY,
32937 yang_dnode_get_bool(args->dnode, NULL));
32938
32939 break;
32940 }
32941
32942 return NB_OK;
32943 }
32944
32945 /*
32946 * XPath:
32947 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/send-community/send-ext-community
32948 */
32949 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_send_ext_community_modify(
32950 struct nb_cb_modify_args *args)
32951 {
32952 switch (args->event) {
32953 case NB_EV_VALIDATE:
32954 case NB_EV_PREPARE:
32955 case NB_EV_ABORT:
32956 return NB_OK;
32957 case NB_EV_APPLY:
32958 return bgp_peer_group_afi_safi_flag_modify(
32959 args, PEER_FLAG_SEND_EXT_COMMUNITY,
32960 yang_dnode_get_bool(args->dnode, NULL));
32961
32962 break;
32963 }
32964
32965 return NB_OK;
32966 }
32967
32968 /*
32969 * XPath:
32970 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/send-community/send-large-community
32971 */
32972 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_send_large_community_modify(
32973 struct nb_cb_modify_args *args)
32974 {
32975 switch (args->event) {
32976 case NB_EV_VALIDATE:
32977 case NB_EV_PREPARE:
32978 case NB_EV_ABORT:
32979 return NB_OK;
32980 case NB_EV_APPLY:
32981 return bgp_peer_group_afi_safi_flag_modify(
32982 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
32983 yang_dnode_get_bool(args->dnode, NULL));
32984
32985 break;
32986 }
32987
32988 return NB_OK;
32989 }
32990
32991 /*
32992 * XPath:
32993 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/soft-reconfiguration
32994 */
32995 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_modify(
32996 struct nb_cb_modify_args *args)
32997 {
32998 switch (args->event) {
32999 case NB_EV_VALIDATE:
33000 case NB_EV_PREPARE:
33001 case NB_EV_ABORT:
33002 return NB_OK;
33003 case NB_EV_APPLY:
33004 return bgp_peer_group_afi_safi_flag_modify(
33005 args, PEER_FLAG_SOFT_RECONFIG,
33006 yang_dnode_get_bool(args->dnode, NULL));
33007
33008 break;
33009 }
33010
33011 return NB_OK;
33012 }
33013
33014 /*
33015 * XPath:
33016 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/weight/weight-attribute
33017 */
33018 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_modify(
33019 struct nb_cb_modify_args *args)
33020 {
33021 switch (args->event) {
33022 case NB_EV_VALIDATE:
33023 case NB_EV_PREPARE:
33024 case NB_EV_ABORT:
33025 return NB_OK;
33026 case NB_EV_APPLY:
33027 return bgp_peer_group_afi_safi_weight_modify(args);
33028
33029 break;
33030 }
33031
33032 return NB_OK;
33033 }
33034
33035 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_destroy(
33036 struct nb_cb_destroy_args *args)
33037 {
33038 switch (args->event) {
33039 case NB_EV_VALIDATE:
33040 case NB_EV_PREPARE:
33041 case NB_EV_ABORT:
33042 return NB_OK;
33043 case NB_EV_APPLY:
33044 return bgp_peer_group_afi_safi_weight_destroy(args);
33045
33046 break;
33047 }
33048
33049 return NB_OK;
33050 }
33051
33052 /*
33053 * XPath:
33054 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/add-paths/path-type
33055 */
33056 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_add_paths_path_type_modify(
33057 struct nb_cb_modify_args *args)
33058 {
33059 switch (args->event) {
33060 case NB_EV_VALIDATE:
33061 case NB_EV_PREPARE:
33062 case NB_EV_ABORT:
33063 case NB_EV_APPLY:
33064 /* TODO: implement me. */
33065 break;
33066 }
33067
33068 return NB_OK;
33069 }
33070
33071 /*
33072 * XPath:
33073 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-as
33074 */
33075 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_modify(
33076 struct nb_cb_modify_args *args)
33077 {
33078 switch (args->event) {
33079 case NB_EV_VALIDATE:
33080 case NB_EV_PREPARE:
33081 case NB_EV_ABORT:
33082 case NB_EV_APPLY:
33083 /* TODO: implement me. */
33084 break;
33085 }
33086
33087 return NB_OK;
33088 }
33089
33090 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_destroy(
33091 struct nb_cb_destroy_args *args)
33092 {
33093 switch (args->event) {
33094 case NB_EV_VALIDATE:
33095 case NB_EV_PREPARE:
33096 case NB_EV_ABORT:
33097 case NB_EV_APPLY:
33098 /* TODO: implement me. */
33099 break;
33100 }
33101
33102 return NB_OK;
33103 }
33104
33105 /*
33106 * XPath:
33107 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-origin-as
33108 */
33109 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_modify(
33110 struct nb_cb_modify_args *args)
33111 {
33112 switch (args->event) {
33113 case NB_EV_VALIDATE:
33114 case NB_EV_PREPARE:
33115 case NB_EV_ABORT:
33116 case NB_EV_APPLY:
33117 /* TODO: implement me. */
33118 break;
33119 }
33120
33121 return NB_OK;
33122 }
33123
33124 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_destroy(
33125 struct nb_cb_destroy_args *args)
33126 {
33127 switch (args->event) {
33128 case NB_EV_VALIDATE:
33129 case NB_EV_PREPARE:
33130 case NB_EV_ABORT:
33131 case NB_EV_APPLY:
33132 /* TODO: implement me. */
33133 break;
33134 }
33135
33136 return NB_OK;
33137 }
33138
33139 /*
33140 * XPath:
33141 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/as-path-options/replace-peer-as
33142 */
33143 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify(
33144 struct nb_cb_modify_args *args)
33145 {
33146 switch (args->event) {
33147 case NB_EV_VALIDATE:
33148 case NB_EV_PREPARE:
33149 case NB_EV_ABORT:
33150 return NB_OK;
33151 case NB_EV_APPLY:
33152 return bgp_peer_group_afi_safi_flag_modify(
33153 args, PEER_FLAG_AS_OVERRIDE,
33154 yang_dnode_get_bool(args->dnode, NULL));
33155
33156 break;
33157 }
33158
33159 return NB_OK;
33160 }
33161
33162 /*
33163 * XPath:
33164 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/default-originate/originate
33165 */
33166 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify(
33167 struct nb_cb_modify_args *args)
33168 {
33169 switch (args->event) {
33170 case NB_EV_VALIDATE:
33171 case NB_EV_PREPARE:
33172 case NB_EV_ABORT:
33173 case NB_EV_APPLY:
33174 /* TODO: implement me. */
33175 break;
33176 }
33177
33178 return NB_OK;
33179 }
33180
33181 /*
33182 * XPath:
33183 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map
33184 */
33185 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify(
33186 struct nb_cb_modify_args *args)
33187 {
33188 switch (args->event) {
33189 case NB_EV_VALIDATE:
33190 case NB_EV_PREPARE:
33191 case NB_EV_ABORT:
33192 case NB_EV_APPLY:
33193 /* TODO: implement me. */
33194 break;
33195 }
33196
33197 return NB_OK;
33198 }
33199
33200 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy(
33201 struct nb_cb_destroy_args *args)
33202 {
33203 switch (args->event) {
33204 case NB_EV_VALIDATE:
33205 case NB_EV_PREPARE:
33206 case NB_EV_ABORT:
33207 case NB_EV_APPLY:
33208 /* TODO: implement me. */
33209 break;
33210 }
33211
33212 return NB_OK;
33213 }
33214
33215 /*
33216 * XPath:
33217 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/as-path-unchanged
33218 */
33219 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify(
33220 struct nb_cb_modify_args *args)
33221 {
33222 switch (args->event) {
33223 case NB_EV_VALIDATE:
33224 case NB_EV_PREPARE:
33225 case NB_EV_ABORT:
33226 return NB_OK;
33227 case NB_EV_APPLY:
33228 return bgp_peer_group_afi_safi_flag_modify(
33229 args, PEER_FLAG_AS_PATH_UNCHANGED,
33230 yang_dnode_get_bool(args->dnode, NULL));
33231
33232 break;
33233 }
33234
33235 return NB_OK;
33236 }
33237
33238 /*
33239 * XPath:
33240 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/next-hop-unchanged
33241 */
33242 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify(
33243 struct nb_cb_modify_args *args)
33244 {
33245 switch (args->event) {
33246 case NB_EV_VALIDATE:
33247 case NB_EV_PREPARE:
33248 case NB_EV_ABORT:
33249 return NB_OK;
33250 case NB_EV_APPLY:
33251 return bgp_peer_group_afi_safi_flag_modify(
33252 args, PEER_FLAG_NEXTHOP_UNCHANGED,
33253 yang_dnode_get_bool(args->dnode, NULL));
33254
33255 break;
33256 }
33257
33258 return NB_OK;
33259 }
33260
33261 /*
33262 * XPath:
33263 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/med-unchanged
33264 */
33265 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_unchanged_modify(
33266 struct nb_cb_modify_args *args)
33267 {
33268 switch (args->event) {
33269 case NB_EV_VALIDATE:
33270 case NB_EV_PREPARE:
33271 case NB_EV_ABORT:
33272 return NB_OK;
33273 case NB_EV_APPLY:
33274 return bgp_peer_group_afi_safi_flag_modify(
33275 args, PEER_FLAG_MED_UNCHANGED,
33276 yang_dnode_get_bool(args->dnode, NULL));
33277
33278 break;
33279 }
33280
33281 return NB_OK;
33282 }
33283
33284 /*
33285 * XPath:
33286 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-send
33287 */
33288 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_modify(
33289 struct nb_cb_modify_args *args)
33290 {
33291 switch (args->event) {
33292 case NB_EV_VALIDATE:
33293 case NB_EV_PREPARE:
33294 case NB_EV_ABORT:
33295 case NB_EV_APPLY:
33296 /* TODO: implement me. */
33297 break;
33298 }
33299
33300 return NB_OK;
33301 }
33302
33303 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_destroy(
33304 struct nb_cb_destroy_args *args)
33305 {
33306 switch (args->event) {
33307 case NB_EV_VALIDATE:
33308 case NB_EV_PREPARE:
33309 case NB_EV_ABORT:
33310 case NB_EV_APPLY:
33311 /* TODO: implement me. */
33312 break;
33313 }
33314
33315 return NB_OK;
33316 }
33317
33318 /*
33319 * XPath:
33320 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-receive
33321 */
33322 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_modify(
33323 struct nb_cb_modify_args *args)
33324 {
33325 switch (args->event) {
33326 case NB_EV_VALIDATE:
33327 case NB_EV_PREPARE:
33328 case NB_EV_ABORT:
33329 case NB_EV_APPLY:
33330 /* TODO: implement me. */
33331 break;
33332 }
33333
33334 return NB_OK;
33335 }
33336
33337 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_destroy(
33338 struct nb_cb_destroy_args *args)
33339 {
33340 switch (args->event) {
33341 case NB_EV_VALIDATE:
33342 case NB_EV_PREPARE:
33343 case NB_EV_ABORT:
33344 case NB_EV_APPLY:
33345 /* TODO: implement me. */
33346 break;
33347 }
33348
33349 return NB_OK;
33350 }
33351
33352 /*
33353 * XPath:
33354 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-both
33355 */
33356 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_modify(
33357 struct nb_cb_modify_args *args)
33358 {
33359 switch (args->event) {
33360 case NB_EV_VALIDATE:
33361 case NB_EV_PREPARE:
33362 case NB_EV_ABORT:
33363 case NB_EV_APPLY:
33364 /* TODO: implement me. */
33365 break;
33366 }
33367
33368 return NB_OK;
33369 }
33370
33371 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_destroy(
33372 struct nb_cb_destroy_args *args)
33373 {
33374 switch (args->event) {
33375 case NB_EV_VALIDATE:
33376 case NB_EV_PREPARE:
33377 case NB_EV_ABORT:
33378 case NB_EV_APPLY:
33379 /* TODO: implement me. */
33380 break;
33381 }
33382
33383 return NB_OK;
33384 }
33385
33386 /*
33387 * XPath:
33388 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list
33389 */
33390 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create(
33391 struct nb_cb_create_args *args)
33392 {
33393 switch (args->event) {
33394 case NB_EV_VALIDATE:
33395 case NB_EV_PREPARE:
33396 case NB_EV_ABORT:
33397 case NB_EV_APPLY:
33398 /* TODO: implement me. */
33399 break;
33400 }
33401
33402 return NB_OK;
33403 }
33404
33405 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy(
33406 struct nb_cb_destroy_args *args)
33407 {
33408 switch (args->event) {
33409 case NB_EV_VALIDATE:
33410 case NB_EV_PREPARE:
33411 case NB_EV_ABORT:
33412 return NB_OK;
33413 case NB_EV_APPLY:
33414 return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
33415 }
33416
33417 return NB_OK;
33418 }
33419
33420 /*
33421 * XPath:
33422 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/max-prefixes
33423 */
33424 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify(
33425 struct nb_cb_modify_args *args)
33426 {
33427 switch (args->event) {
33428 case NB_EV_VALIDATE:
33429 case NB_EV_PREPARE:
33430 case NB_EV_ABORT:
33431 case NB_EV_APPLY:
33432 /* TODO: implement me. */
33433 break;
33434 }
33435
33436 return NB_OK;
33437 }
33438
33439 /*
33440 * XPath:
33441 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check
33442 */
33443 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify(
33444 struct nb_cb_modify_args *args)
33445 {
33446 switch (args->event) {
33447 case NB_EV_VALIDATE:
33448 case NB_EV_PREPARE:
33449 case NB_EV_ABORT:
33450 case NB_EV_APPLY:
33451 /* TODO: implement me. */
33452 break;
33453 }
33454
33455 return NB_OK;
33456 }
33457
33458 /*
33459 * XPath:
33460 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only
33461 */
33462 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify(
33463 struct nb_cb_modify_args *args)
33464 {
33465 switch (args->event) {
33466 case NB_EV_VALIDATE:
33467 case NB_EV_PREPARE:
33468 case NB_EV_ABORT:
33469 case NB_EV_APPLY:
33470 /* TODO: implement me. */
33471 break;
33472 }
33473
33474 return NB_OK;
33475 }
33476
33477 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy(
33478 struct nb_cb_destroy_args *args)
33479 {
33480 switch (args->event) {
33481 case NB_EV_VALIDATE:
33482 case NB_EV_PREPARE:
33483 case NB_EV_ABORT:
33484 case NB_EV_APPLY:
33485 /* TODO: implement me. */
33486 break;
33487 }
33488
33489 return NB_OK;
33490 }
33491
33492 /*
33493 * XPath:
33494 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer
33495 */
33496 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify(
33497 struct nb_cb_modify_args *args)
33498 {
33499 switch (args->event) {
33500 case NB_EV_VALIDATE:
33501 case NB_EV_PREPARE:
33502 case NB_EV_ABORT:
33503 case NB_EV_APPLY:
33504 /* TODO: implement me. */
33505 break;
33506 }
33507
33508 return NB_OK;
33509 }
33510
33511 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
33512 struct nb_cb_destroy_args *args)
33513 {
33514 switch (args->event) {
33515 case NB_EV_VALIDATE:
33516 case NB_EV_PREPARE:
33517 case NB_EV_ABORT:
33518 case NB_EV_APPLY:
33519 /* TODO: implement me. */
33520 break;
33521 }
33522
33523 return NB_OK;
33524 }
33525
33526 /*
33527 * XPath:
33528 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct
33529 */
33530 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
33531 struct nb_cb_modify_args *args)
33532 {
33533 switch (args->event) {
33534 case NB_EV_VALIDATE:
33535 case NB_EV_PREPARE:
33536 case NB_EV_ABORT:
33537 case NB_EV_APPLY:
33538 /* TODO: implement me. */
33539 break;
33540 }
33541
33542 return NB_OK;
33543 }
33544
33545 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
33546 struct nb_cb_destroy_args *args)
33547 {
33548 switch (args->event) {
33549 case NB_EV_VALIDATE:
33550 case NB_EV_PREPARE:
33551 case NB_EV_ABORT:
33552 case NB_EV_APPLY:
33553 /* TODO: implement me. */
33554 break;
33555 }
33556
33557 return NB_OK;
33558 }
33559
33560 /*
33561 * XPath:
33562 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
33563 */
33564 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
33565 struct nb_cb_modify_args *args)
33566 {
33567 switch (args->event) {
33568 case NB_EV_VALIDATE:
33569 case NB_EV_PREPARE:
33570 case NB_EV_ABORT:
33571 case NB_EV_APPLY:
33572 /* TODO: implement me. */
33573 break;
33574 }
33575
33576 return NB_OK;
33577 }
33578
33579 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
33580 struct nb_cb_destroy_args *args)
33581 {
33582 switch (args->event) {
33583 case NB_EV_VALIDATE:
33584 case NB_EV_PREPARE:
33585 case NB_EV_ABORT:
33586 case NB_EV_APPLY:
33587 /* TODO: implement me. */
33588 break;
33589 }
33590
33591 return NB_OK;
33592 }
33593
33594 /*
33595 * XPath:
33596 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer
33597 */
33598 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
33599 struct nb_cb_modify_args *args)
33600 {
33601 switch (args->event) {
33602 case NB_EV_VALIDATE:
33603 case NB_EV_PREPARE:
33604 case NB_EV_ABORT:
33605 case NB_EV_APPLY:
33606 /* TODO: implement me. */
33607 break;
33608 }
33609
33610 return NB_OK;
33611 }
33612
33613 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
33614 struct nb_cb_destroy_args *args)
33615 {
33616 switch (args->event) {
33617 case NB_EV_VALIDATE:
33618 case NB_EV_PREPARE:
33619 case NB_EV_ABORT:
33620 case NB_EV_APPLY:
33621 /* TODO: implement me. */
33622 break;
33623 }
33624
33625 return NB_OK;
33626 }
33627
33628 /*
33629 * XPath:
33630 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
33631 */
33632 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
33633 struct nb_cb_modify_args *args)
33634 {
33635 switch (args->event) {
33636 case NB_EV_VALIDATE:
33637 case NB_EV_PREPARE:
33638 case NB_EV_ABORT:
33639 case NB_EV_APPLY:
33640 /* TODO: implement me. */
33641 break;
33642 }
33643
33644 return NB_OK;
33645 }
33646
33647 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
33648 struct nb_cb_destroy_args *args)
33649 {
33650 switch (args->event) {
33651 case NB_EV_VALIDATE:
33652 case NB_EV_PREPARE:
33653 case NB_EV_ABORT:
33654 case NB_EV_APPLY:
33655 /* TODO: implement me. */
33656 break;
33657 }
33658
33659 return NB_OK;
33660 }
33661
33662 /*
33663 * XPath:
33664 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only
33665 */
33666 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
33667 struct nb_cb_modify_args *args)
33668 {
33669 switch (args->event) {
33670 case NB_EV_VALIDATE:
33671 case NB_EV_PREPARE:
33672 case NB_EV_ABORT:
33673 case NB_EV_APPLY:
33674 /* TODO: implement me. */
33675 break;
33676 }
33677
33678 return NB_OK;
33679 }
33680
33681 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
33682 struct nb_cb_destroy_args *args)
33683 {
33684 switch (args->event) {
33685 case NB_EV_VALIDATE:
33686 case NB_EV_PREPARE:
33687 case NB_EV_ABORT:
33688 case NB_EV_APPLY:
33689 /* TODO: implement me. */
33690 break;
33691 }
33692
33693 return NB_OK;
33694 }
33695
33696 /*
33697 * XPath:
33698 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self
33699 */
33700 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify(
33701 struct nb_cb_modify_args *args)
33702 {
33703 switch (args->event) {
33704 case NB_EV_VALIDATE:
33705 case NB_EV_PREPARE:
33706 case NB_EV_ABORT:
33707 return NB_OK;
33708 case NB_EV_APPLY:
33709 return bgp_peer_group_afi_safi_flag_modify(
33710 args, PEER_FLAG_NEXTHOP_SELF,
33711 yang_dnode_get_bool(args->dnode, NULL));
33712
33713 break;
33714 }
33715
33716 return NB_OK;
33717 }
33718
33719 /*
33720 * XPath:
33721 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self-force
33722 */
33723 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_force_modify(
33724 struct nb_cb_modify_args *args)
33725 {
33726 switch (args->event) {
33727 case NB_EV_VALIDATE:
33728 case NB_EV_PREPARE:
33729 case NB_EV_ABORT:
33730 return NB_OK;
33731 case NB_EV_APPLY:
33732 return bgp_peer_group_afi_safi_flag_modify(
33733 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
33734 yang_dnode_get_bool(args->dnode, NULL));
33735
33736 break;
33737 }
33738
33739 return NB_OK;
33740 }
33741
33742 /*
33743 * XPath:
33744 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all
33745 */
33746 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_modify(
33747 struct nb_cb_modify_args *args)
33748 {
33749 switch (args->event) {
33750 case NB_EV_VALIDATE:
33751 case NB_EV_PREPARE:
33752 case NB_EV_ABORT:
33753 return NB_OK;
33754 case NB_EV_APPLY:
33755 return bgp_peer_group_afi_safi_flag_modify(
33756 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
33757 yang_dnode_get_bool(args->dnode, NULL));
33758
33759 break;
33760 }
33761
33762 return NB_OK;
33763 }
33764
33765 /*
33766 * XPath:
33767 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all-replace
33768 */
33769 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_replace_modify(
33770 struct nb_cb_modify_args *args)
33771 {
33772 switch (args->event) {
33773 case NB_EV_VALIDATE:
33774 case NB_EV_PREPARE:
33775 case NB_EV_ABORT:
33776 return NB_OK;
33777 case NB_EV_APPLY:
33778 return bgp_peer_group_afi_safi_flag_modify(
33779 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
33780 yang_dnode_get_bool(args->dnode, NULL));
33781
33782 break;
33783 }
33784
33785 return NB_OK;
33786 }
33787
33788 /*
33789 * XPath:
33790 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as
33791 */
33792 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_modify(
33793 struct nb_cb_modify_args *args)
33794 {
33795 switch (args->event) {
33796 case NB_EV_VALIDATE:
33797 case NB_EV_PREPARE:
33798 case NB_EV_ABORT:
33799 return NB_OK;
33800 case NB_EV_APPLY:
33801 return bgp_peer_group_afi_safi_flag_modify(
33802 args, PEER_FLAG_REMOVE_PRIVATE_AS,
33803 yang_dnode_get_bool(args->dnode, NULL));
33804
33805 break;
33806 }
33807
33808 return NB_OK;
33809 }
33810
33811 /*
33812 * XPath:
33813 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-replace
33814 */
33815 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_replace_modify(
33816 struct nb_cb_modify_args *args)
33817 {
33818 switch (args->event) {
33819 case NB_EV_VALIDATE:
33820 case NB_EV_PREPARE:
33821 case NB_EV_ABORT:
33822 return NB_OK;
33823 case NB_EV_APPLY:
33824 return bgp_peer_group_afi_safi_flag_modify(
33825 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
33826 yang_dnode_get_bool(args->dnode, NULL));
33827
33828 break;
33829 }
33830
33831 return NB_OK;
33832 }
33833
33834 /*
33835 * XPath:
33836 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/route-reflector/route-reflector-client
33837 */
33838 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_route_reflector_route_reflector_client_modify(
33839 struct nb_cb_modify_args *args)
33840 {
33841 switch (args->event) {
33842 case NB_EV_VALIDATE:
33843 case NB_EV_PREPARE:
33844 case NB_EV_ABORT:
33845 return NB_OK;
33846 case NB_EV_APPLY:
33847 return bgp_peer_group_afi_safi_flag_modify(
33848 args, PEER_FLAG_REFLECTOR_CLIENT,
33849 yang_dnode_get_bool(args->dnode, NULL));
33850
33851 break;
33852 }
33853
33854 return NB_OK;
33855 }
33856
33857 /*
33858 * XPath:
33859 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/route-server/route-server-client
33860 */
33861 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_route_server_route_server_client_modify(
33862 struct nb_cb_modify_args *args)
33863 {
33864 switch (args->event) {
33865 case NB_EV_VALIDATE:
33866 case NB_EV_PREPARE:
33867 case NB_EV_ABORT:
33868 return NB_OK;
33869 case NB_EV_APPLY:
33870 return bgp_peer_group_afi_safi_flag_modify(
33871 args, PEER_FLAG_RSERVER_CLIENT,
33872 yang_dnode_get_bool(args->dnode, NULL));
33873
33874 break;
33875 }
33876
33877 return NB_OK;
33878 }
33879
33880 /*
33881 * XPath:
33882 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/send-community/send-community
33883 */
33884 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_send_community_modify(
33885 struct nb_cb_modify_args *args)
33886 {
33887 switch (args->event) {
33888 case NB_EV_VALIDATE:
33889 case NB_EV_PREPARE:
33890 case NB_EV_ABORT:
33891 return NB_OK;
33892 case NB_EV_APPLY:
33893 return bgp_peer_group_afi_safi_flag_modify(
33894 args, PEER_FLAG_SEND_COMMUNITY,
33895 yang_dnode_get_bool(args->dnode, NULL));
33896
33897 break;
33898 }
33899
33900 return NB_OK;
33901 }
33902
33903 /*
33904 * XPath:
33905 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/send-community/send-ext-community
33906 */
33907 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_send_ext_community_modify(
33908 struct nb_cb_modify_args *args)
33909 {
33910 switch (args->event) {
33911 case NB_EV_VALIDATE:
33912 case NB_EV_PREPARE:
33913 case NB_EV_ABORT:
33914 return NB_OK;
33915 case NB_EV_APPLY:
33916 return bgp_peer_group_afi_safi_flag_modify(
33917 args, PEER_FLAG_SEND_EXT_COMMUNITY,
33918 yang_dnode_get_bool(args->dnode, NULL));
33919
33920 break;
33921 }
33922
33923 return NB_OK;
33924 }
33925
33926 /*
33927 * XPath:
33928 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/send-community/send-large-community
33929 */
33930 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_send_large_community_modify(
33931 struct nb_cb_modify_args *args)
33932 {
33933 switch (args->event) {
33934 case NB_EV_VALIDATE:
33935 case NB_EV_PREPARE:
33936 case NB_EV_ABORT:
33937 return NB_OK;
33938 case NB_EV_APPLY:
33939 return bgp_peer_group_afi_safi_flag_modify(
33940 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
33941 yang_dnode_get_bool(args->dnode, NULL));
33942
33943 break;
33944 }
33945
33946 return NB_OK;
33947 }
33948
33949 /*
33950 * XPath:
33951 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/soft-reconfiguration
33952 */
33953 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguration_modify(
33954 struct nb_cb_modify_args *args)
33955 {
33956 switch (args->event) {
33957 case NB_EV_VALIDATE:
33958 case NB_EV_PREPARE:
33959 case NB_EV_ABORT:
33960 return NB_OK;
33961 case NB_EV_APPLY:
33962 return bgp_peer_group_afi_safi_flag_modify(
33963 args, PEER_FLAG_SOFT_RECONFIG,
33964 yang_dnode_get_bool(args->dnode, NULL));
33965
33966 break;
33967 }
33968
33969 return NB_OK;
33970 }
33971
33972 /*
33973 * XPath:
33974 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/weight/weight-attribute
33975 */
33976 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_modify(
33977 struct nb_cb_modify_args *args)
33978 {
33979 switch (args->event) {
33980 case NB_EV_VALIDATE:
33981 case NB_EV_PREPARE:
33982 case NB_EV_ABORT:
33983 return NB_OK;
33984 case NB_EV_APPLY:
33985 return bgp_peer_group_afi_safi_weight_modify(args);
33986
33987 break;
33988 }
33989
33990 return NB_OK;
33991 }
33992
33993 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_destroy(
33994 struct nb_cb_destroy_args *args)
33995 {
33996 switch (args->event) {
33997 case NB_EV_VALIDATE:
33998 case NB_EV_PREPARE:
33999 case NB_EV_ABORT:
34000 return NB_OK;
34001 case NB_EV_APPLY:
34002 return bgp_peer_group_afi_safi_weight_destroy(args);
34003
34004 break;
34005 }
34006
34007 return NB_OK;
34008 }
34009
34010 /*
34011 * XPath:
34012 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/add-paths/path-type
34013 */
34014 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_add_paths_path_type_modify(
34015 struct nb_cb_modify_args *args)
34016 {
34017 switch (args->event) {
34018 case NB_EV_VALIDATE:
34019 case NB_EV_PREPARE:
34020 case NB_EV_ABORT:
34021 case NB_EV_APPLY:
34022 /* TODO: implement me. */
34023 break;
34024 }
34025
34026 return NB_OK;
34027 }
34028
34029 /*
34030 * XPath:
34031 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-as
34032 */
34033 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_modify(
34034 struct nb_cb_modify_args *args)
34035 {
34036 switch (args->event) {
34037 case NB_EV_VALIDATE:
34038 case NB_EV_PREPARE:
34039 case NB_EV_ABORT:
34040 case NB_EV_APPLY:
34041 /* TODO: implement me. */
34042 break;
34043 }
34044
34045 return NB_OK;
34046 }
34047
34048 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_destroy(
34049 struct nb_cb_destroy_args *args)
34050 {
34051 switch (args->event) {
34052 case NB_EV_VALIDATE:
34053 case NB_EV_PREPARE:
34054 case NB_EV_ABORT:
34055 case NB_EV_APPLY:
34056 /* TODO: implement me. */
34057 break;
34058 }
34059
34060 return NB_OK;
34061 }
34062
34063 /*
34064 * XPath:
34065 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-origin-as
34066 */
34067 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_modify(
34068 struct nb_cb_modify_args *args)
34069 {
34070 switch (args->event) {
34071 case NB_EV_VALIDATE:
34072 case NB_EV_PREPARE:
34073 case NB_EV_ABORT:
34074 case NB_EV_APPLY:
34075 /* TODO: implement me. */
34076 break;
34077 }
34078
34079 return NB_OK;
34080 }
34081
34082 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_destroy(
34083 struct nb_cb_destroy_args *args)
34084 {
34085 switch (args->event) {
34086 case NB_EV_VALIDATE:
34087 case NB_EV_PREPARE:
34088 case NB_EV_ABORT:
34089 case NB_EV_APPLY:
34090 /* TODO: implement me. */
34091 break;
34092 }
34093
34094 return NB_OK;
34095 }
34096
34097 /*
34098 * XPath:
34099 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/as-path-options/replace-peer-as
34100 */
34101 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify(
34102 struct nb_cb_modify_args *args)
34103 {
34104 switch (args->event) {
34105 case NB_EV_VALIDATE:
34106 case NB_EV_PREPARE:
34107 case NB_EV_ABORT:
34108 return NB_OK;
34109 case NB_EV_APPLY:
34110 return bgp_peer_group_afi_safi_flag_modify(
34111 args, PEER_FLAG_AS_OVERRIDE,
34112 yang_dnode_get_bool(args->dnode, NULL));
34113
34114 break;
34115 }
34116
34117 return NB_OK;
34118 }
34119
34120 /*
34121 * XPath:
34122 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/default-originate/originate
34123 */
34124 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify(
34125 struct nb_cb_modify_args *args)
34126 {
34127 switch (args->event) {
34128 case NB_EV_VALIDATE:
34129 case NB_EV_PREPARE:
34130 case NB_EV_ABORT:
34131 case NB_EV_APPLY:
34132 /* TODO: implement me. */
34133 break;
34134 }
34135
34136 return NB_OK;
34137 }
34138
34139 /*
34140 * XPath:
34141 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map
34142 */
34143 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify(
34144 struct nb_cb_modify_args *args)
34145 {
34146 switch (args->event) {
34147 case NB_EV_VALIDATE:
34148 case NB_EV_PREPARE:
34149 case NB_EV_ABORT:
34150 case NB_EV_APPLY:
34151 /* TODO: implement me. */
34152 break;
34153 }
34154
34155 return NB_OK;
34156 }
34157
34158 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy(
34159 struct nb_cb_destroy_args *args)
34160 {
34161 switch (args->event) {
34162 case NB_EV_VALIDATE:
34163 case NB_EV_PREPARE:
34164 case NB_EV_ABORT:
34165 case NB_EV_APPLY:
34166 /* TODO: implement me. */
34167 break;
34168 }
34169
34170 return NB_OK;
34171 }
34172
34173 /*
34174 * XPath:
34175 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/as-path-unchanged
34176 */
34177 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify(
34178 struct nb_cb_modify_args *args)
34179 {
34180 switch (args->event) {
34181 case NB_EV_VALIDATE:
34182 case NB_EV_PREPARE:
34183 case NB_EV_ABORT:
34184 return NB_OK;
34185 case NB_EV_APPLY:
34186 return bgp_peer_group_afi_safi_flag_modify(
34187 args, PEER_FLAG_AS_PATH_UNCHANGED,
34188 yang_dnode_get_bool(args->dnode, NULL));
34189
34190 break;
34191 }
34192
34193 return NB_OK;
34194 }
34195
34196 /*
34197 * XPath:
34198 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/next-hop-unchanged
34199 */
34200 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify(
34201 struct nb_cb_modify_args *args)
34202 {
34203 switch (args->event) {
34204 case NB_EV_VALIDATE:
34205 case NB_EV_PREPARE:
34206 case NB_EV_ABORT:
34207 return NB_OK;
34208 case NB_EV_APPLY:
34209 return bgp_peer_group_afi_safi_flag_modify(
34210 args, PEER_FLAG_NEXTHOP_UNCHANGED,
34211 yang_dnode_get_bool(args->dnode, NULL));
34212
34213 break;
34214 }
34215
34216 return NB_OK;
34217 }
34218
34219 /*
34220 * XPath:
34221 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/med-unchanged
34222 */
34223 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_unchanged_modify(
34224 struct nb_cb_modify_args *args)
34225 {
34226 switch (args->event) {
34227 case NB_EV_VALIDATE:
34228 case NB_EV_PREPARE:
34229 case NB_EV_ABORT:
34230 return NB_OK;
34231 case NB_EV_APPLY:
34232 return bgp_peer_group_afi_safi_flag_modify(
34233 args, PEER_FLAG_MED_UNCHANGED,
34234 yang_dnode_get_bool(args->dnode, NULL));
34235
34236 break;
34237 }
34238
34239 return NB_OK;
34240 }
34241
34242 /*
34243 * XPath:
34244 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-send
34245 */
34246 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_modify(
34247 struct nb_cb_modify_args *args)
34248 {
34249 switch (args->event) {
34250 case NB_EV_VALIDATE:
34251 case NB_EV_PREPARE:
34252 case NB_EV_ABORT:
34253 case NB_EV_APPLY:
34254 /* TODO: implement me. */
34255 break;
34256 }
34257
34258 return NB_OK;
34259 }
34260
34261 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_destroy(
34262 struct nb_cb_destroy_args *args)
34263 {
34264 switch (args->event) {
34265 case NB_EV_VALIDATE:
34266 case NB_EV_PREPARE:
34267 case NB_EV_ABORT:
34268 case NB_EV_APPLY:
34269 /* TODO: implement me. */
34270 break;
34271 }
34272
34273 return NB_OK;
34274 }
34275
34276 /*
34277 * XPath:
34278 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-receive
34279 */
34280 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_modify(
34281 struct nb_cb_modify_args *args)
34282 {
34283 switch (args->event) {
34284 case NB_EV_VALIDATE:
34285 case NB_EV_PREPARE:
34286 case NB_EV_ABORT:
34287 case NB_EV_APPLY:
34288 /* TODO: implement me. */
34289 break;
34290 }
34291
34292 return NB_OK;
34293 }
34294
34295 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_destroy(
34296 struct nb_cb_destroy_args *args)
34297 {
34298 switch (args->event) {
34299 case NB_EV_VALIDATE:
34300 case NB_EV_PREPARE:
34301 case NB_EV_ABORT:
34302 case NB_EV_APPLY:
34303 /* TODO: implement me. */
34304 break;
34305 }
34306
34307 return NB_OK;
34308 }
34309
34310 /*
34311 * XPath:
34312 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-both
34313 */
34314 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_modify(
34315 struct nb_cb_modify_args *args)
34316 {
34317 switch (args->event) {
34318 case NB_EV_VALIDATE:
34319 case NB_EV_PREPARE:
34320 case NB_EV_ABORT:
34321 case NB_EV_APPLY:
34322 /* TODO: implement me. */
34323 break;
34324 }
34325
34326 return NB_OK;
34327 }
34328
34329 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_destroy(
34330 struct nb_cb_destroy_args *args)
34331 {
34332 switch (args->event) {
34333 case NB_EV_VALIDATE:
34334 case NB_EV_PREPARE:
34335 case NB_EV_ABORT:
34336 case NB_EV_APPLY:
34337 /* TODO: implement me. */
34338 break;
34339 }
34340
34341 return NB_OK;
34342 }
34343
34344 /*
34345 * XPath:
34346 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list
34347 */
34348 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create(
34349 struct nb_cb_create_args *args)
34350 {
34351 switch (args->event) {
34352 case NB_EV_VALIDATE:
34353 case NB_EV_PREPARE:
34354 case NB_EV_ABORT:
34355 case NB_EV_APPLY:
34356 /* TODO: implement me. */
34357 break;
34358 }
34359
34360 return NB_OK;
34361 }
34362
34363 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy(
34364 struct nb_cb_destroy_args *args)
34365 {
34366 switch (args->event) {
34367 case NB_EV_VALIDATE:
34368 case NB_EV_PREPARE:
34369 case NB_EV_ABORT:
34370 return NB_OK;
34371 case NB_EV_APPLY:
34372 return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
34373 }
34374
34375 return NB_OK;
34376 }
34377
34378 /*
34379 * XPath:
34380 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/max-prefixes
34381 */
34382 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify(
34383 struct nb_cb_modify_args *args)
34384 {
34385 switch (args->event) {
34386 case NB_EV_VALIDATE:
34387 case NB_EV_PREPARE:
34388 case NB_EV_ABORT:
34389 case NB_EV_APPLY:
34390 /* TODO: implement me. */
34391 break;
34392 }
34393
34394 return NB_OK;
34395 }
34396
34397 /*
34398 * XPath:
34399 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check
34400 */
34401 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify(
34402 struct nb_cb_modify_args *args)
34403 {
34404 switch (args->event) {
34405 case NB_EV_VALIDATE:
34406 case NB_EV_PREPARE:
34407 case NB_EV_ABORT:
34408 case NB_EV_APPLY:
34409 /* TODO: implement me. */
34410 break;
34411 }
34412
34413 return NB_OK;
34414 }
34415
34416 /*
34417 * XPath:
34418 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only
34419 */
34420 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify(
34421 struct nb_cb_modify_args *args)
34422 {
34423 switch (args->event) {
34424 case NB_EV_VALIDATE:
34425 case NB_EV_PREPARE:
34426 case NB_EV_ABORT:
34427 case NB_EV_APPLY:
34428 /* TODO: implement me. */
34429 break;
34430 }
34431
34432 return NB_OK;
34433 }
34434
34435 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy(
34436 struct nb_cb_destroy_args *args)
34437 {
34438 switch (args->event) {
34439 case NB_EV_VALIDATE:
34440 case NB_EV_PREPARE:
34441 case NB_EV_ABORT:
34442 case NB_EV_APPLY:
34443 /* TODO: implement me. */
34444 break;
34445 }
34446
34447 return NB_OK;
34448 }
34449
34450 /*
34451 * XPath:
34452 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer
34453 */
34454 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify(
34455 struct nb_cb_modify_args *args)
34456 {
34457 switch (args->event) {
34458 case NB_EV_VALIDATE:
34459 case NB_EV_PREPARE:
34460 case NB_EV_ABORT:
34461 case NB_EV_APPLY:
34462 /* TODO: implement me. */
34463 break;
34464 }
34465
34466 return NB_OK;
34467 }
34468
34469 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
34470 struct nb_cb_destroy_args *args)
34471 {
34472 switch (args->event) {
34473 case NB_EV_VALIDATE:
34474 case NB_EV_PREPARE:
34475 case NB_EV_ABORT:
34476 case NB_EV_APPLY:
34477 /* TODO: implement me. */
34478 break;
34479 }
34480
34481 return NB_OK;
34482 }
34483
34484 /*
34485 * XPath:
34486 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct
34487 */
34488 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
34489 struct nb_cb_modify_args *args)
34490 {
34491 switch (args->event) {
34492 case NB_EV_VALIDATE:
34493 case NB_EV_PREPARE:
34494 case NB_EV_ABORT:
34495 case NB_EV_APPLY:
34496 /* TODO: implement me. */
34497 break;
34498 }
34499
34500 return NB_OK;
34501 }
34502
34503 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
34504 struct nb_cb_destroy_args *args)
34505 {
34506 switch (args->event) {
34507 case NB_EV_VALIDATE:
34508 case NB_EV_PREPARE:
34509 case NB_EV_ABORT:
34510 case NB_EV_APPLY:
34511 /* TODO: implement me. */
34512 break;
34513 }
34514
34515 return NB_OK;
34516 }
34517
34518 /*
34519 * XPath:
34520 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
34521 */
34522 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
34523 struct nb_cb_modify_args *args)
34524 {
34525 switch (args->event) {
34526 case NB_EV_VALIDATE:
34527 case NB_EV_PREPARE:
34528 case NB_EV_ABORT:
34529 case NB_EV_APPLY:
34530 /* TODO: implement me. */
34531 break;
34532 }
34533
34534 return NB_OK;
34535 }
34536
34537 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
34538 struct nb_cb_destroy_args *args)
34539 {
34540 switch (args->event) {
34541 case NB_EV_VALIDATE:
34542 case NB_EV_PREPARE:
34543 case NB_EV_ABORT:
34544 case NB_EV_APPLY:
34545 /* TODO: implement me. */
34546 break;
34547 }
34548
34549 return NB_OK;
34550 }
34551
34552 /*
34553 * XPath:
34554 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer
34555 */
34556 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
34557 struct nb_cb_modify_args *args)
34558 {
34559 switch (args->event) {
34560 case NB_EV_VALIDATE:
34561 case NB_EV_PREPARE:
34562 case NB_EV_ABORT:
34563 case NB_EV_APPLY:
34564 /* TODO: implement me. */
34565 break;
34566 }
34567
34568 return NB_OK;
34569 }
34570
34571 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
34572 struct nb_cb_destroy_args *args)
34573 {
34574 switch (args->event) {
34575 case NB_EV_VALIDATE:
34576 case NB_EV_PREPARE:
34577 case NB_EV_ABORT:
34578 case NB_EV_APPLY:
34579 /* TODO: implement me. */
34580 break;
34581 }
34582
34583 return NB_OK;
34584 }
34585
34586 /*
34587 * XPath:
34588 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
34589 */
34590 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
34591 struct nb_cb_modify_args *args)
34592 {
34593 switch (args->event) {
34594 case NB_EV_VALIDATE:
34595 case NB_EV_PREPARE:
34596 case NB_EV_ABORT:
34597 case NB_EV_APPLY:
34598 /* TODO: implement me. */
34599 break;
34600 }
34601
34602 return NB_OK;
34603 }
34604
34605 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
34606 struct nb_cb_destroy_args *args)
34607 {
34608 switch (args->event) {
34609 case NB_EV_VALIDATE:
34610 case NB_EV_PREPARE:
34611 case NB_EV_ABORT:
34612 case NB_EV_APPLY:
34613 /* TODO: implement me. */
34614 break;
34615 }
34616
34617 return NB_OK;
34618 }
34619
34620 /*
34621 * XPath:
34622 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only
34623 */
34624 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
34625 struct nb_cb_modify_args *args)
34626 {
34627 switch (args->event) {
34628 case NB_EV_VALIDATE:
34629 case NB_EV_PREPARE:
34630 case NB_EV_ABORT:
34631 case NB_EV_APPLY:
34632 /* TODO: implement me. */
34633 break;
34634 }
34635
34636 return NB_OK;
34637 }
34638
34639 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
34640 struct nb_cb_destroy_args *args)
34641 {
34642 switch (args->event) {
34643 case NB_EV_VALIDATE:
34644 case NB_EV_PREPARE:
34645 case NB_EV_ABORT:
34646 case NB_EV_APPLY:
34647 /* TODO: implement me. */
34648 break;
34649 }
34650
34651 return NB_OK;
34652 }
34653
34654 /*
34655 * XPath:
34656 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self
34657 */
34658 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify(
34659 struct nb_cb_modify_args *args)
34660 {
34661 switch (args->event) {
34662 case NB_EV_VALIDATE:
34663 case NB_EV_PREPARE:
34664 case NB_EV_ABORT:
34665 return NB_OK;
34666 case NB_EV_APPLY:
34667 return bgp_peer_group_afi_safi_flag_modify(
34668 args, PEER_FLAG_NEXTHOP_SELF,
34669 yang_dnode_get_bool(args->dnode, NULL));
34670
34671 break;
34672 }
34673
34674 return NB_OK;
34675 }
34676
34677 /*
34678 * XPath:
34679 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self-force
34680 */
34681 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_force_modify(
34682 struct nb_cb_modify_args *args)
34683 {
34684 switch (args->event) {
34685 case NB_EV_VALIDATE:
34686 case NB_EV_PREPARE:
34687 case NB_EV_ABORT:
34688 return NB_OK;
34689 case NB_EV_APPLY:
34690 return bgp_peer_group_afi_safi_flag_modify(
34691 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
34692 yang_dnode_get_bool(args->dnode, NULL));
34693
34694 break;
34695 }
34696
34697 return NB_OK;
34698 }
34699
34700 /*
34701 * XPath:
34702 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all
34703 */
34704 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_modify(
34705 struct nb_cb_modify_args *args)
34706 {
34707 switch (args->event) {
34708 case NB_EV_VALIDATE:
34709 case NB_EV_PREPARE:
34710 case NB_EV_ABORT:
34711 return NB_OK;
34712 case NB_EV_APPLY:
34713 return bgp_peer_group_afi_safi_flag_modify(
34714 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
34715 yang_dnode_get_bool(args->dnode, NULL));
34716
34717 break;
34718 }
34719
34720 return NB_OK;
34721 }
34722
34723 /*
34724 * XPath:
34725 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all-replace
34726 */
34727 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_replace_modify(
34728 struct nb_cb_modify_args *args)
34729 {
34730 switch (args->event) {
34731 case NB_EV_VALIDATE:
34732 case NB_EV_PREPARE:
34733 case NB_EV_ABORT:
34734 return NB_OK;
34735 case NB_EV_APPLY:
34736 return bgp_peer_group_afi_safi_flag_modify(
34737 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
34738 yang_dnode_get_bool(args->dnode, NULL));
34739
34740 break;
34741 }
34742
34743 return NB_OK;
34744 }
34745
34746 /*
34747 * XPath:
34748 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as
34749 */
34750 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_modify(
34751 struct nb_cb_modify_args *args)
34752 {
34753 switch (args->event) {
34754 case NB_EV_VALIDATE:
34755 case NB_EV_PREPARE:
34756 case NB_EV_ABORT:
34757 return NB_OK;
34758 case NB_EV_APPLY:
34759 return bgp_peer_group_afi_safi_flag_modify(
34760 args, PEER_FLAG_REMOVE_PRIVATE_AS,
34761 yang_dnode_get_bool(args->dnode, NULL));
34762
34763 break;
34764 }
34765
34766 return NB_OK;
34767 }
34768
34769 /*
34770 * XPath:
34771 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-replace
34772 */
34773 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_replace_modify(
34774 struct nb_cb_modify_args *args)
34775 {
34776 switch (args->event) {
34777 case NB_EV_VALIDATE:
34778 case NB_EV_PREPARE:
34779 case NB_EV_ABORT:
34780 return NB_OK;
34781 case NB_EV_APPLY:
34782 return bgp_peer_group_afi_safi_flag_modify(
34783 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
34784 yang_dnode_get_bool(args->dnode, NULL));
34785
34786 break;
34787 }
34788
34789 return NB_OK;
34790 }
34791
34792 /*
34793 * XPath:
34794 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/route-reflector/route-reflector-client
34795 */
34796 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_route_reflector_route_reflector_client_modify(
34797 struct nb_cb_modify_args *args)
34798 {
34799 switch (args->event) {
34800 case NB_EV_VALIDATE:
34801 case NB_EV_PREPARE:
34802 case NB_EV_ABORT:
34803 return NB_OK;
34804 case NB_EV_APPLY:
34805 return bgp_peer_group_afi_safi_flag_modify(
34806 args, PEER_FLAG_REFLECTOR_CLIENT,
34807 yang_dnode_get_bool(args->dnode, NULL));
34808
34809 break;
34810 }
34811
34812 return NB_OK;
34813 }
34814
34815 /*
34816 * XPath:
34817 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/route-server/route-server-client
34818 */
34819 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_route_server_route_server_client_modify(
34820 struct nb_cb_modify_args *args)
34821 {
34822 switch (args->event) {
34823 case NB_EV_VALIDATE:
34824 case NB_EV_PREPARE:
34825 case NB_EV_ABORT:
34826 return NB_OK;
34827 case NB_EV_APPLY:
34828 return bgp_peer_group_afi_safi_flag_modify(
34829 args, PEER_FLAG_RSERVER_CLIENT,
34830 yang_dnode_get_bool(args->dnode, NULL));
34831
34832 break;
34833 }
34834
34835 return NB_OK;
34836 }
34837
34838 /*
34839 * XPath:
34840 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/send-community/send-community
34841 */
34842 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_send_community_modify(
34843 struct nb_cb_modify_args *args)
34844 {
34845 switch (args->event) {
34846 case NB_EV_VALIDATE:
34847 case NB_EV_PREPARE:
34848 case NB_EV_ABORT:
34849 return NB_OK;
34850 case NB_EV_APPLY:
34851 return bgp_peer_group_afi_safi_flag_modify(
34852 args, PEER_FLAG_SEND_COMMUNITY,
34853 yang_dnode_get_bool(args->dnode, NULL));
34854
34855 break;
34856 }
34857
34858 return NB_OK;
34859 }
34860
34861 /*
34862 * XPath:
34863 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/send-community/send-ext-community
34864 */
34865 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_send_ext_community_modify(
34866 struct nb_cb_modify_args *args)
34867 {
34868 switch (args->event) {
34869 case NB_EV_VALIDATE:
34870 case NB_EV_PREPARE:
34871 case NB_EV_ABORT:
34872 return NB_OK;
34873 case NB_EV_APPLY:
34874 return bgp_peer_group_afi_safi_flag_modify(
34875 args, PEER_FLAG_SEND_EXT_COMMUNITY,
34876 yang_dnode_get_bool(args->dnode, NULL));
34877
34878 break;
34879 }
34880
34881 return NB_OK;
34882 }
34883
34884 /*
34885 * XPath:
34886 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/send-community/send-large-community
34887 */
34888 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_send_large_community_modify(
34889 struct nb_cb_modify_args *args)
34890 {
34891 switch (args->event) {
34892 case NB_EV_VALIDATE:
34893 case NB_EV_PREPARE:
34894 case NB_EV_ABORT:
34895 return NB_OK;
34896 case NB_EV_APPLY:
34897 return bgp_peer_group_afi_safi_flag_modify(
34898 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
34899 yang_dnode_get_bool(args->dnode, NULL));
34900
34901 break;
34902 }
34903
34904 return NB_OK;
34905 }
34906
34907 /*
34908 * XPath:
34909 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/soft-reconfiguration
34910 */
34911 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguration_modify(
34912 struct nb_cb_modify_args *args)
34913 {
34914 switch (args->event) {
34915 case NB_EV_VALIDATE:
34916 case NB_EV_PREPARE:
34917 case NB_EV_ABORT:
34918 return NB_OK;
34919 case NB_EV_APPLY:
34920 return bgp_peer_group_afi_safi_flag_modify(
34921 args, PEER_FLAG_SOFT_RECONFIG,
34922 yang_dnode_get_bool(args->dnode, NULL));
34923
34924 break;
34925 }
34926
34927 return NB_OK;
34928 }
34929
34930 /*
34931 * XPath:
34932 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/weight/weight-attribute
34933 */
34934 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_modify(
34935 struct nb_cb_modify_args *args)
34936 {
34937 switch (args->event) {
34938 case NB_EV_VALIDATE:
34939 case NB_EV_PREPARE:
34940 case NB_EV_ABORT:
34941 return NB_OK;
34942 case NB_EV_APPLY:
34943 return bgp_peer_group_afi_safi_weight_modify(args);
34944
34945 break;
34946 }
34947
34948 return NB_OK;
34949 }
34950
34951 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_destroy(
34952 struct nb_cb_destroy_args *args)
34953 {
34954 switch (args->event) {
34955 case NB_EV_VALIDATE:
34956 case NB_EV_PREPARE:
34957 case NB_EV_ABORT:
34958 return NB_OK;
34959 case NB_EV_APPLY:
34960 return bgp_peer_group_afi_safi_weight_destroy(args);
34961
34962 break;
34963 }
34964
34965 return NB_OK;
34966 }
34967
34968 /*
34969 * XPath:
34970 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/add-paths/path-type
34971 */
34972 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_add_paths_path_type_modify(
34973 struct nb_cb_modify_args *args)
34974 {
34975 switch (args->event) {
34976 case NB_EV_VALIDATE:
34977 case NB_EV_PREPARE:
34978 case NB_EV_ABORT:
34979 case NB_EV_APPLY:
34980 /* TODO: implement me. */
34981 break;
34982 }
34983
34984 return NB_OK;
34985 }
34986
34987 /*
34988 * XPath:
34989 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-as
34990 */
34991 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_modify(
34992 struct nb_cb_modify_args *args)
34993 {
34994 switch (args->event) {
34995 case NB_EV_VALIDATE:
34996 case NB_EV_PREPARE:
34997 case NB_EV_ABORT:
34998 case NB_EV_APPLY:
34999 /* TODO: implement me. */
35000 break;
35001 }
35002
35003 return NB_OK;
35004 }
35005
35006 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_destroy(
35007 struct nb_cb_destroy_args *args)
35008 {
35009 switch (args->event) {
35010 case NB_EV_VALIDATE:
35011 case NB_EV_PREPARE:
35012 case NB_EV_ABORT:
35013 case NB_EV_APPLY:
35014 /* TODO: implement me. */
35015 break;
35016 }
35017
35018 return NB_OK;
35019 }
35020
35021 /*
35022 * XPath:
35023 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-origin-as
35024 */
35025 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_modify(
35026 struct nb_cb_modify_args *args)
35027 {
35028 switch (args->event) {
35029 case NB_EV_VALIDATE:
35030 case NB_EV_PREPARE:
35031 case NB_EV_ABORT:
35032 case NB_EV_APPLY:
35033 /* TODO: implement me. */
35034 break;
35035 }
35036
35037 return NB_OK;
35038 }
35039
35040 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
35041 struct nb_cb_destroy_args *args)
35042 {
35043 switch (args->event) {
35044 case NB_EV_VALIDATE:
35045 case NB_EV_PREPARE:
35046 case NB_EV_ABORT:
35047 case NB_EV_APPLY:
35048 /* TODO: implement me. */
35049 break;
35050 }
35051
35052 return NB_OK;
35053 }
35054
35055 /*
35056 * XPath:
35057 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/replace-peer-as
35058 */
35059 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify(
35060 struct nb_cb_modify_args *args)
35061 {
35062 switch (args->event) {
35063 case NB_EV_VALIDATE:
35064 case NB_EV_PREPARE:
35065 case NB_EV_ABORT:
35066 return NB_OK;
35067 case NB_EV_APPLY:
35068 return bgp_peer_group_afi_safi_flag_modify(
35069 args, PEER_FLAG_AS_OVERRIDE,
35070 yang_dnode_get_bool(args->dnode, NULL));
35071
35072 break;
35073 }
35074
35075 return NB_OK;
35076 }
35077
35078 /*
35079 * XPath:
35080 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate
35081 */
35082 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify(
35083 struct nb_cb_modify_args *args)
35084 {
35085 switch (args->event) {
35086 case NB_EV_VALIDATE:
35087 case NB_EV_PREPARE:
35088 case NB_EV_ABORT:
35089 case NB_EV_APPLY:
35090 /* TODO: implement me. */
35091 break;
35092 }
35093
35094 return NB_OK;
35095 }
35096
35097 /*
35098 * XPath:
35099 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map
35100 */
35101 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify(
35102 struct nb_cb_modify_args *args)
35103 {
35104 switch (args->event) {
35105 case NB_EV_VALIDATE:
35106 case NB_EV_PREPARE:
35107 case NB_EV_ABORT:
35108 case NB_EV_APPLY:
35109 /* TODO: implement me. */
35110 break;
35111 }
35112
35113 return NB_OK;
35114 }
35115
35116 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy(
35117 struct nb_cb_destroy_args *args)
35118 {
35119 switch (args->event) {
35120 case NB_EV_VALIDATE:
35121 case NB_EV_PREPARE:
35122 case NB_EV_ABORT:
35123 case NB_EV_APPLY:
35124 /* TODO: implement me. */
35125 break;
35126 }
35127
35128 return NB_OK;
35129 }
35130
35131 /*
35132 * XPath:
35133 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/as-path-unchanged
35134 */
35135 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
35136 struct nb_cb_modify_args *args)
35137 {
35138 switch (args->event) {
35139 case NB_EV_VALIDATE:
35140 case NB_EV_PREPARE:
35141 case NB_EV_ABORT:
35142 return NB_OK;
35143 case NB_EV_APPLY:
35144 return bgp_peer_group_afi_safi_flag_modify(
35145 args, PEER_FLAG_AS_PATH_UNCHANGED,
35146 yang_dnode_get_bool(args->dnode, NULL));
35147
35148 break;
35149 }
35150
35151 return NB_OK;
35152 }
35153
35154 /*
35155 * XPath:
35156 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/next-hop-unchanged
35157 */
35158 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
35159 struct nb_cb_modify_args *args)
35160 {
35161 switch (args->event) {
35162 case NB_EV_VALIDATE:
35163 case NB_EV_PREPARE:
35164 case NB_EV_ABORT:
35165 return NB_OK;
35166 case NB_EV_APPLY:
35167 return bgp_peer_group_afi_safi_flag_modify(
35168 args, PEER_FLAG_NEXTHOP_UNCHANGED,
35169 yang_dnode_get_bool(args->dnode, NULL));
35170
35171 break;
35172 }
35173
35174 return NB_OK;
35175 }
35176
35177 /*
35178 * XPath:
35179 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/med-unchanged
35180 */
35181 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_med_unchanged_modify(
35182 struct nb_cb_modify_args *args)
35183 {
35184 switch (args->event) {
35185 case NB_EV_VALIDATE:
35186 case NB_EV_PREPARE:
35187 case NB_EV_ABORT:
35188 return NB_OK;
35189 case NB_EV_APPLY:
35190 return bgp_peer_group_afi_safi_flag_modify(
35191 args, PEER_FLAG_MED_UNCHANGED,
35192 yang_dnode_get_bool(args->dnode, NULL));
35193
35194 break;
35195 }
35196
35197 return NB_OK;
35198 }
35199
35200 /*
35201 * XPath:
35202 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-send
35203 */
35204 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_modify(
35205 struct nb_cb_modify_args *args)
35206 {
35207 switch (args->event) {
35208 case NB_EV_VALIDATE:
35209 case NB_EV_PREPARE:
35210 case NB_EV_ABORT:
35211 case NB_EV_APPLY:
35212 /* TODO: implement me. */
35213 break;
35214 }
35215
35216 return NB_OK;
35217 }
35218
35219 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_destroy(
35220 struct nb_cb_destroy_args *args)
35221 {
35222 switch (args->event) {
35223 case NB_EV_VALIDATE:
35224 case NB_EV_PREPARE:
35225 case NB_EV_ABORT:
35226 case NB_EV_APPLY:
35227 /* TODO: implement me. */
35228 break;
35229 }
35230
35231 return NB_OK;
35232 }
35233
35234 /*
35235 * XPath:
35236 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-receive
35237 */
35238 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_modify(
35239 struct nb_cb_modify_args *args)
35240 {
35241 switch (args->event) {
35242 case NB_EV_VALIDATE:
35243 case NB_EV_PREPARE:
35244 case NB_EV_ABORT:
35245 case NB_EV_APPLY:
35246 /* TODO: implement me. */
35247 break;
35248 }
35249
35250 return NB_OK;
35251 }
35252
35253 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_destroy(
35254 struct nb_cb_destroy_args *args)
35255 {
35256 switch (args->event) {
35257 case NB_EV_VALIDATE:
35258 case NB_EV_PREPARE:
35259 case NB_EV_ABORT:
35260 case NB_EV_APPLY:
35261 /* TODO: implement me. */
35262 break;
35263 }
35264
35265 return NB_OK;
35266 }
35267
35268 /*
35269 * XPath:
35270 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-both
35271 */
35272 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_modify(
35273 struct nb_cb_modify_args *args)
35274 {
35275 switch (args->event) {
35276 case NB_EV_VALIDATE:
35277 case NB_EV_PREPARE:
35278 case NB_EV_ABORT:
35279 case NB_EV_APPLY:
35280 /* TODO: implement me. */
35281 break;
35282 }
35283
35284 return NB_OK;
35285 }
35286
35287 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_destroy(
35288 struct nb_cb_destroy_args *args)
35289 {
35290 switch (args->event) {
35291 case NB_EV_VALIDATE:
35292 case NB_EV_PREPARE:
35293 case NB_EV_ABORT:
35294 case NB_EV_APPLY:
35295 /* TODO: implement me. */
35296 break;
35297 }
35298
35299 return NB_OK;
35300 }
35301
35302 /*
35303 * XPath:
35304 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list
35305 */
35306 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create(
35307 struct nb_cb_create_args *args)
35308 {
35309 switch (args->event) {
35310 case NB_EV_VALIDATE:
35311 case NB_EV_PREPARE:
35312 case NB_EV_ABORT:
35313 case NB_EV_APPLY:
35314 /* TODO: implement me. */
35315 break;
35316 }
35317
35318 return NB_OK;
35319 }
35320
35321 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy(
35322 struct nb_cb_destroy_args *args)
35323 {
35324 switch (args->event) {
35325 case NB_EV_VALIDATE:
35326 case NB_EV_PREPARE:
35327 case NB_EV_ABORT:
35328 return NB_OK;
35329 case NB_EV_APPLY:
35330 return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
35331 }
35332
35333 return NB_OK;
35334 }
35335
35336 /*
35337 * XPath:
35338 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/max-prefixes
35339 */
35340 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
35341 struct nb_cb_modify_args *args)
35342 {
35343 switch (args->event) {
35344 case NB_EV_VALIDATE:
35345 case NB_EV_PREPARE:
35346 case NB_EV_ABORT:
35347 case NB_EV_APPLY:
35348 /* TODO: implement me. */
35349 break;
35350 }
35351
35352 return NB_OK;
35353 }
35354
35355 /*
35356 * XPath:
35357 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check
35358 */
35359 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify(
35360 struct nb_cb_modify_args *args)
35361 {
35362 switch (args->event) {
35363 case NB_EV_VALIDATE:
35364 case NB_EV_PREPARE:
35365 case NB_EV_ABORT:
35366 case NB_EV_APPLY:
35367 /* TODO: implement me. */
35368 break;
35369 }
35370
35371 return NB_OK;
35372 }
35373
35374 /*
35375 * XPath:
35376 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only
35377 */
35378 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
35379 struct nb_cb_modify_args *args)
35380 {
35381 switch (args->event) {
35382 case NB_EV_VALIDATE:
35383 case NB_EV_PREPARE:
35384 case NB_EV_ABORT:
35385 case NB_EV_APPLY:
35386 /* TODO: implement me. */
35387 break;
35388 }
35389
35390 return NB_OK;
35391 }
35392
35393 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
35394 struct nb_cb_destroy_args *args)
35395 {
35396 switch (args->event) {
35397 case NB_EV_VALIDATE:
35398 case NB_EV_PREPARE:
35399 case NB_EV_ABORT:
35400 case NB_EV_APPLY:
35401 /* TODO: implement me. */
35402 break;
35403 }
35404
35405 return NB_OK;
35406 }
35407
35408 /*
35409 * XPath:
35410 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer
35411 */
35412 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
35413 struct nb_cb_modify_args *args)
35414 {
35415 switch (args->event) {
35416 case NB_EV_VALIDATE:
35417 case NB_EV_PREPARE:
35418 case NB_EV_ABORT:
35419 case NB_EV_APPLY:
35420 /* TODO: implement me. */
35421 break;
35422 }
35423
35424 return NB_OK;
35425 }
35426
35427 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
35428 struct nb_cb_destroy_args *args)
35429 {
35430 switch (args->event) {
35431 case NB_EV_VALIDATE:
35432 case NB_EV_PREPARE:
35433 case NB_EV_ABORT:
35434 case NB_EV_APPLY:
35435 /* TODO: implement me. */
35436 break;
35437 }
35438
35439 return NB_OK;
35440 }
35441
35442 /*
35443 * XPath:
35444 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
35445 */
35446 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
35447 struct nb_cb_modify_args *args)
35448 {
35449 switch (args->event) {
35450 case NB_EV_VALIDATE:
35451 case NB_EV_PREPARE:
35452 case NB_EV_ABORT:
35453 case NB_EV_APPLY:
35454 /* TODO: implement me. */
35455 break;
35456 }
35457
35458 return NB_OK;
35459 }
35460
35461 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
35462 struct nb_cb_destroy_args *args)
35463 {
35464 switch (args->event) {
35465 case NB_EV_VALIDATE:
35466 case NB_EV_PREPARE:
35467 case NB_EV_ABORT:
35468 case NB_EV_APPLY:
35469 /* TODO: implement me. */
35470 break;
35471 }
35472
35473 return NB_OK;
35474 }
35475
35476 /*
35477 * XPath:
35478 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
35479 */
35480 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
35481 struct nb_cb_modify_args *args)
35482 {
35483 switch (args->event) {
35484 case NB_EV_VALIDATE:
35485 case NB_EV_PREPARE:
35486 case NB_EV_ABORT:
35487 case NB_EV_APPLY:
35488 /* TODO: implement me. */
35489 break;
35490 }
35491
35492 return NB_OK;
35493 }
35494
35495 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
35496 struct nb_cb_destroy_args *args)
35497 {
35498 switch (args->event) {
35499 case NB_EV_VALIDATE:
35500 case NB_EV_PREPARE:
35501 case NB_EV_ABORT:
35502 case NB_EV_APPLY:
35503 /* TODO: implement me. */
35504 break;
35505 }
35506
35507 return NB_OK;
35508 }
35509
35510 /*
35511 * XPath:
35512 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer
35513 */
35514 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
35515 struct nb_cb_modify_args *args)
35516 {
35517 switch (args->event) {
35518 case NB_EV_VALIDATE:
35519 case NB_EV_PREPARE:
35520 case NB_EV_ABORT:
35521 case NB_EV_APPLY:
35522 /* TODO: implement me. */
35523 break;
35524 }
35525
35526 return NB_OK;
35527 }
35528
35529 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
35530 struct nb_cb_destroy_args *args)
35531 {
35532 switch (args->event) {
35533 case NB_EV_VALIDATE:
35534 case NB_EV_PREPARE:
35535 case NB_EV_ABORT:
35536 case NB_EV_APPLY:
35537 /* TODO: implement me. */
35538 break;
35539 }
35540
35541 return NB_OK;
35542 }
35543
35544 /*
35545 * XPath:
35546 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
35547 */
35548 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
35549 struct nb_cb_modify_args *args)
35550 {
35551 switch (args->event) {
35552 case NB_EV_VALIDATE:
35553 case NB_EV_PREPARE:
35554 case NB_EV_ABORT:
35555 case NB_EV_APPLY:
35556 /* TODO: implement me. */
35557 break;
35558 }
35559
35560 return NB_OK;
35561 }
35562
35563 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
35564 struct nb_cb_destroy_args *args)
35565 {
35566 switch (args->event) {
35567 case NB_EV_VALIDATE:
35568 case NB_EV_PREPARE:
35569 case NB_EV_ABORT:
35570 case NB_EV_APPLY:
35571 /* TODO: implement me. */
35572 break;
35573 }
35574
35575 return NB_OK;
35576 }
35577
35578 /*
35579 * XPath:
35580 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only
35581 */
35582 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
35583 struct nb_cb_modify_args *args)
35584 {
35585 switch (args->event) {
35586 case NB_EV_VALIDATE:
35587 case NB_EV_PREPARE:
35588 case NB_EV_ABORT:
35589 case NB_EV_APPLY:
35590 /* TODO: implement me. */
35591 break;
35592 }
35593
35594 return NB_OK;
35595 }
35596
35597 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
35598 struct nb_cb_destroy_args *args)
35599 {
35600 switch (args->event) {
35601 case NB_EV_VALIDATE:
35602 case NB_EV_PREPARE:
35603 case NB_EV_ABORT:
35604 case NB_EV_APPLY:
35605 /* TODO: implement me. */
35606 break;
35607 }
35608
35609 return NB_OK;
35610 }
35611
35612 /*
35613 * XPath:
35614 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self
35615 */
35616 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify(
35617 struct nb_cb_modify_args *args)
35618 {
35619 switch (args->event) {
35620 case NB_EV_VALIDATE:
35621 case NB_EV_PREPARE:
35622 case NB_EV_ABORT:
35623 return NB_OK;
35624 case NB_EV_APPLY:
35625 return bgp_peer_group_afi_safi_flag_modify(
35626 args, PEER_FLAG_NEXTHOP_SELF,
35627 yang_dnode_get_bool(args->dnode, NULL));
35628
35629 break;
35630 }
35631
35632 return NB_OK;
35633 }
35634
35635 /*
35636 * XPath:
35637 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self-force
35638 */
35639 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_force_modify(
35640 struct nb_cb_modify_args *args)
35641 {
35642 switch (args->event) {
35643 case NB_EV_VALIDATE:
35644 case NB_EV_PREPARE:
35645 case NB_EV_ABORT:
35646 return NB_OK;
35647 case NB_EV_APPLY:
35648 return bgp_peer_group_afi_safi_flag_modify(
35649 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
35650 yang_dnode_get_bool(args->dnode, NULL));
35651
35652 break;
35653 }
35654
35655 return NB_OK;
35656 }
35657
35658 /*
35659 * XPath:
35660 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all
35661 */
35662 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_modify(
35663 struct nb_cb_modify_args *args)
35664 {
35665 switch (args->event) {
35666 case NB_EV_VALIDATE:
35667 case NB_EV_PREPARE:
35668 case NB_EV_ABORT:
35669 return NB_OK;
35670 case NB_EV_APPLY:
35671 return bgp_peer_group_afi_safi_flag_modify(
35672 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
35673 yang_dnode_get_bool(args->dnode, NULL));
35674
35675 break;
35676 }
35677
35678 return NB_OK;
35679 }
35680
35681 /*
35682 * XPath:
35683 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all-replace
35684 */
35685 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_replace_modify(
35686 struct nb_cb_modify_args *args)
35687 {
35688 switch (args->event) {
35689 case NB_EV_VALIDATE:
35690 case NB_EV_PREPARE:
35691 case NB_EV_ABORT:
35692 return NB_OK;
35693 case NB_EV_APPLY:
35694 return bgp_peer_group_afi_safi_flag_modify(
35695 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
35696 yang_dnode_get_bool(args->dnode, NULL));
35697
35698 break;
35699 }
35700
35701 return NB_OK;
35702 }
35703
35704 /*
35705 * XPath:
35706 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as
35707 */
35708 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_modify(
35709 struct nb_cb_modify_args *args)
35710 {
35711 switch (args->event) {
35712 case NB_EV_VALIDATE:
35713 case NB_EV_PREPARE:
35714 case NB_EV_ABORT:
35715 return NB_OK;
35716 case NB_EV_APPLY:
35717 return bgp_peer_group_afi_safi_flag_modify(
35718 args, PEER_FLAG_REMOVE_PRIVATE_AS,
35719 yang_dnode_get_bool(args->dnode, NULL));
35720
35721 break;
35722 }
35723
35724 return NB_OK;
35725 }
35726
35727 /*
35728 * XPath:
35729 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-replace
35730 */
35731 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_replace_modify(
35732 struct nb_cb_modify_args *args)
35733 {
35734 switch (args->event) {
35735 case NB_EV_VALIDATE:
35736 case NB_EV_PREPARE:
35737 case NB_EV_ABORT:
35738 return NB_OK;
35739 case NB_EV_APPLY:
35740 return bgp_peer_group_afi_safi_flag_modify(
35741 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
35742 yang_dnode_get_bool(args->dnode, NULL));
35743
35744 break;
35745 }
35746
35747 return NB_OK;
35748 }
35749
35750 /*
35751 * XPath:
35752 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/route-reflector/route-reflector-client
35753 */
35754 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflector_route_reflector_client_modify(
35755 struct nb_cb_modify_args *args)
35756 {
35757 switch (args->event) {
35758 case NB_EV_VALIDATE:
35759 case NB_EV_PREPARE:
35760 case NB_EV_ABORT:
35761 return NB_OK;
35762 case NB_EV_APPLY:
35763 return bgp_peer_group_afi_safi_flag_modify(
35764 args, PEER_FLAG_REFLECTOR_CLIENT,
35765 yang_dnode_get_bool(args->dnode, NULL));
35766
35767 break;
35768 }
35769
35770 return NB_OK;
35771 }
35772
35773 /*
35774 * XPath:
35775 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/route-server/route-server-client
35776 */
35777 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_route_server_client_modify(
35778 struct nb_cb_modify_args *args)
35779 {
35780 switch (args->event) {
35781 case NB_EV_VALIDATE:
35782 case NB_EV_PREPARE:
35783 case NB_EV_ABORT:
35784 return NB_OK;
35785 case NB_EV_APPLY:
35786 return bgp_peer_group_afi_safi_flag_modify(
35787 args, PEER_FLAG_RSERVER_CLIENT,
35788 yang_dnode_get_bool(args->dnode, NULL));
35789
35790 break;
35791 }
35792
35793 return NB_OK;
35794 }
35795
35796 /*
35797 * XPath:
35798 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-community
35799 */
35800 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_community_modify(
35801 struct nb_cb_modify_args *args)
35802 {
35803 switch (args->event) {
35804 case NB_EV_VALIDATE:
35805 case NB_EV_PREPARE:
35806 case NB_EV_ABORT:
35807 return NB_OK;
35808 case NB_EV_APPLY:
35809 return bgp_peer_group_afi_safi_flag_modify(
35810 args, PEER_FLAG_SEND_COMMUNITY,
35811 yang_dnode_get_bool(args->dnode, NULL));
35812
35813 break;
35814 }
35815
35816 return NB_OK;
35817 }
35818
35819 /*
35820 * XPath:
35821 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-ext-community
35822 */
35823 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_ext_community_modify(
35824 struct nb_cb_modify_args *args)
35825 {
35826 switch (args->event) {
35827 case NB_EV_VALIDATE:
35828 case NB_EV_PREPARE:
35829 case NB_EV_ABORT:
35830 return NB_OK;
35831 case NB_EV_APPLY:
35832 return bgp_peer_group_afi_safi_flag_modify(
35833 args, PEER_FLAG_SEND_EXT_COMMUNITY,
35834 yang_dnode_get_bool(args->dnode, NULL));
35835
35836 break;
35837 }
35838
35839 return NB_OK;
35840 }
35841
35842 /*
35843 * XPath:
35844 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-large-community
35845 */
35846 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_large_community_modify(
35847 struct nb_cb_modify_args *args)
35848 {
35849 switch (args->event) {
35850 case NB_EV_VALIDATE:
35851 case NB_EV_PREPARE:
35852 case NB_EV_ABORT:
35853 return NB_OK;
35854 case NB_EV_APPLY:
35855 return bgp_peer_group_afi_safi_flag_modify(
35856 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
35857 yang_dnode_get_bool(args->dnode, NULL));
35858
35859 break;
35860 }
35861
35862 return NB_OK;
35863 }
35864
35865 /*
35866 * XPath:
35867 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/soft-reconfiguration
35868 */
35869 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfiguration_modify(
35870 struct nb_cb_modify_args *args)
35871 {
35872 switch (args->event) {
35873 case NB_EV_VALIDATE:
35874 case NB_EV_PREPARE:
35875 case NB_EV_ABORT:
35876 return NB_OK;
35877 case NB_EV_APPLY:
35878 return bgp_peer_group_afi_safi_flag_modify(
35879 args, PEER_FLAG_SOFT_RECONFIG,
35880 yang_dnode_get_bool(args->dnode, NULL));
35881
35882 break;
35883 }
35884
35885 return NB_OK;
35886 }
35887
35888 /*
35889 * XPath:
35890 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/weight/weight-attribute
35891 */
35892 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_modify(
35893 struct nb_cb_modify_args *args)
35894 {
35895 switch (args->event) {
35896 case NB_EV_VALIDATE:
35897 case NB_EV_PREPARE:
35898 case NB_EV_ABORT:
35899 return NB_OK;
35900 case NB_EV_APPLY:
35901 return bgp_peer_group_afi_safi_weight_modify(args);
35902
35903 break;
35904 }
35905
35906 return NB_OK;
35907 }
35908
35909 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_destroy(
35910 struct nb_cb_destroy_args *args)
35911 {
35912 switch (args->event) {
35913 case NB_EV_VALIDATE:
35914 case NB_EV_PREPARE:
35915 case NB_EV_ABORT:
35916 return NB_OK;
35917 case NB_EV_APPLY:
35918 return bgp_peer_group_afi_safi_weight_destroy(args);
35919
35920 break;
35921 }
35922
35923 return NB_OK;
35924 }
35925
35926 /*
35927 * XPath:
35928 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/add-paths/path-type
35929 */
35930 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_add_paths_path_type_modify(
35931 struct nb_cb_modify_args *args)
35932 {
35933 switch (args->event) {
35934 case NB_EV_VALIDATE:
35935 case NB_EV_PREPARE:
35936 case NB_EV_ABORT:
35937 case NB_EV_APPLY:
35938 /* TODO: implement me. */
35939 break;
35940 }
35941
35942 return NB_OK;
35943 }
35944
35945 /*
35946 * XPath:
35947 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-as
35948 */
35949 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_modify(
35950 struct nb_cb_modify_args *args)
35951 {
35952 switch (args->event) {
35953 case NB_EV_VALIDATE:
35954 case NB_EV_PREPARE:
35955 case NB_EV_ABORT:
35956 case NB_EV_APPLY:
35957 /* TODO: implement me. */
35958 break;
35959 }
35960
35961 return NB_OK;
35962 }
35963
35964 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_destroy(
35965 struct nb_cb_destroy_args *args)
35966 {
35967 switch (args->event) {
35968 case NB_EV_VALIDATE:
35969 case NB_EV_PREPARE:
35970 case NB_EV_ABORT:
35971 case NB_EV_APPLY:
35972 /* TODO: implement me. */
35973 break;
35974 }
35975
35976 return NB_OK;
35977 }
35978
35979 /*
35980 * XPath:
35981 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-origin-as
35982 */
35983 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_modify(
35984 struct nb_cb_modify_args *args)
35985 {
35986 switch (args->event) {
35987 case NB_EV_VALIDATE:
35988 case NB_EV_PREPARE:
35989 case NB_EV_ABORT:
35990 case NB_EV_APPLY:
35991 /* TODO: implement me. */
35992 break;
35993 }
35994
35995 return NB_OK;
35996 }
35997
35998 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
35999 struct nb_cb_destroy_args *args)
36000 {
36001 switch (args->event) {
36002 case NB_EV_VALIDATE:
36003 case NB_EV_PREPARE:
36004 case NB_EV_ABORT:
36005 case NB_EV_APPLY:
36006 /* TODO: implement me. */
36007 break;
36008 }
36009
36010 return NB_OK;
36011 }
36012
36013 /*
36014 * XPath:
36015 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/replace-peer-as
36016 */
36017 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify(
36018 struct nb_cb_modify_args *args)
36019 {
36020 switch (args->event) {
36021 case NB_EV_VALIDATE:
36022 case NB_EV_PREPARE:
36023 case NB_EV_ABORT:
36024 return NB_OK;
36025 case NB_EV_APPLY:
36026 return bgp_peer_group_afi_safi_flag_modify(
36027 args, PEER_FLAG_AS_OVERRIDE,
36028 yang_dnode_get_bool(args->dnode, NULL));
36029
36030 break;
36031 }
36032
36033 return NB_OK;
36034 }
36035
36036 /*
36037 * XPath:
36038 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate
36039 */
36040 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify(
36041 struct nb_cb_modify_args *args)
36042 {
36043 switch (args->event) {
36044 case NB_EV_VALIDATE:
36045 case NB_EV_PREPARE:
36046 case NB_EV_ABORT:
36047 case NB_EV_APPLY:
36048 /* TODO: implement me. */
36049 break;
36050 }
36051
36052 return NB_OK;
36053 }
36054
36055 /*
36056 * XPath:
36057 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map
36058 */
36059 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify(
36060 struct nb_cb_modify_args *args)
36061 {
36062 switch (args->event) {
36063 case NB_EV_VALIDATE:
36064 case NB_EV_PREPARE:
36065 case NB_EV_ABORT:
36066 case NB_EV_APPLY:
36067 /* TODO: implement me. */
36068 break;
36069 }
36070
36071 return NB_OK;
36072 }
36073
36074 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy(
36075 struct nb_cb_destroy_args *args)
36076 {
36077 switch (args->event) {
36078 case NB_EV_VALIDATE:
36079 case NB_EV_PREPARE:
36080 case NB_EV_ABORT:
36081 case NB_EV_APPLY:
36082 /* TODO: implement me. */
36083 break;
36084 }
36085
36086 return NB_OK;
36087 }
36088
36089 /*
36090 * XPath:
36091 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/as-path-unchanged
36092 */
36093 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
36094 struct nb_cb_modify_args *args)
36095 {
36096 switch (args->event) {
36097 case NB_EV_VALIDATE:
36098 case NB_EV_PREPARE:
36099 case NB_EV_ABORT:
36100 return NB_OK;
36101 case NB_EV_APPLY:
36102 return bgp_peer_group_afi_safi_flag_modify(
36103 args, PEER_FLAG_AS_PATH_UNCHANGED,
36104 yang_dnode_get_bool(args->dnode, NULL));
36105
36106 break;
36107 }
36108
36109 return NB_OK;
36110 }
36111
36112 /*
36113 * XPath:
36114 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/next-hop-unchanged
36115 */
36116 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
36117 struct nb_cb_modify_args *args)
36118 {
36119 switch (args->event) {
36120 case NB_EV_VALIDATE:
36121 case NB_EV_PREPARE:
36122 case NB_EV_ABORT:
36123 return NB_OK;
36124 case NB_EV_APPLY:
36125 return bgp_peer_group_afi_safi_flag_modify(
36126 args, PEER_FLAG_NEXTHOP_UNCHANGED,
36127 yang_dnode_get_bool(args->dnode, NULL));
36128
36129 break;
36130 }
36131
36132 return NB_OK;
36133 }
36134
36135 /*
36136 * XPath:
36137 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/med-unchanged
36138 */
36139 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_med_unchanged_modify(
36140 struct nb_cb_modify_args *args)
36141 {
36142 switch (args->event) {
36143 case NB_EV_VALIDATE:
36144 case NB_EV_PREPARE:
36145 case NB_EV_ABORT:
36146 return NB_OK;
36147 case NB_EV_APPLY:
36148 return bgp_peer_group_afi_safi_flag_modify(
36149 args, PEER_FLAG_MED_UNCHANGED,
36150 yang_dnode_get_bool(args->dnode, NULL));
36151
36152 break;
36153 }
36154
36155 return NB_OK;
36156 }
36157
36158 /*
36159 * XPath:
36160 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-send
36161 */
36162 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_modify(
36163 struct nb_cb_modify_args *args)
36164 {
36165 switch (args->event) {
36166 case NB_EV_VALIDATE:
36167 case NB_EV_PREPARE:
36168 case NB_EV_ABORT:
36169 case NB_EV_APPLY:
36170 /* TODO: implement me. */
36171 break;
36172 }
36173
36174 return NB_OK;
36175 }
36176
36177 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_destroy(
36178 struct nb_cb_destroy_args *args)
36179 {
36180 switch (args->event) {
36181 case NB_EV_VALIDATE:
36182 case NB_EV_PREPARE:
36183 case NB_EV_ABORT:
36184 case NB_EV_APPLY:
36185 /* TODO: implement me. */
36186 break;
36187 }
36188
36189 return NB_OK;
36190 }
36191
36192 /*
36193 * XPath:
36194 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-receive
36195 */
36196 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_modify(
36197 struct nb_cb_modify_args *args)
36198 {
36199 switch (args->event) {
36200 case NB_EV_VALIDATE:
36201 case NB_EV_PREPARE:
36202 case NB_EV_ABORT:
36203 case NB_EV_APPLY:
36204 /* TODO: implement me. */
36205 break;
36206 }
36207
36208 return NB_OK;
36209 }
36210
36211 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_destroy(
36212 struct nb_cb_destroy_args *args)
36213 {
36214 switch (args->event) {
36215 case NB_EV_VALIDATE:
36216 case NB_EV_PREPARE:
36217 case NB_EV_ABORT:
36218 case NB_EV_APPLY:
36219 /* TODO: implement me. */
36220 break;
36221 }
36222
36223 return NB_OK;
36224 }
36225
36226 /*
36227 * XPath:
36228 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-both
36229 */
36230 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_modify(
36231 struct nb_cb_modify_args *args)
36232 {
36233 switch (args->event) {
36234 case NB_EV_VALIDATE:
36235 case NB_EV_PREPARE:
36236 case NB_EV_ABORT:
36237 case NB_EV_APPLY:
36238 /* TODO: implement me. */
36239 break;
36240 }
36241
36242 return NB_OK;
36243 }
36244
36245 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_destroy(
36246 struct nb_cb_destroy_args *args)
36247 {
36248 switch (args->event) {
36249 case NB_EV_VALIDATE:
36250 case NB_EV_PREPARE:
36251 case NB_EV_ABORT:
36252 case NB_EV_APPLY:
36253 /* TODO: implement me. */
36254 break;
36255 }
36256
36257 return NB_OK;
36258 }
36259
36260 /*
36261 * XPath:
36262 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list
36263 */
36264 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create(
36265 struct nb_cb_create_args *args)
36266 {
36267 switch (args->event) {
36268 case NB_EV_VALIDATE:
36269 case NB_EV_PREPARE:
36270 case NB_EV_ABORT:
36271 case NB_EV_APPLY:
36272 /* TODO: implement me. */
36273 break;
36274 }
36275
36276 return NB_OK;
36277 }
36278
36279 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy(
36280 struct nb_cb_destroy_args *args)
36281 {
36282 switch (args->event) {
36283 case NB_EV_VALIDATE:
36284 case NB_EV_PREPARE:
36285 case NB_EV_ABORT:
36286 return NB_OK;
36287 case NB_EV_APPLY:
36288 return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
36289 }
36290
36291 return NB_OK;
36292 }
36293
36294 /*
36295 * XPath:
36296 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/max-prefixes
36297 */
36298 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
36299 struct nb_cb_modify_args *args)
36300 {
36301 switch (args->event) {
36302 case NB_EV_VALIDATE:
36303 case NB_EV_PREPARE:
36304 case NB_EV_ABORT:
36305 case NB_EV_APPLY:
36306 /* TODO: implement me. */
36307 break;
36308 }
36309
36310 return NB_OK;
36311 }
36312
36313 /*
36314 * XPath:
36315 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check
36316 */
36317 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify(
36318 struct nb_cb_modify_args *args)
36319 {
36320 switch (args->event) {
36321 case NB_EV_VALIDATE:
36322 case NB_EV_PREPARE:
36323 case NB_EV_ABORT:
36324 case NB_EV_APPLY:
36325 /* TODO: implement me. */
36326 break;
36327 }
36328
36329 return NB_OK;
36330 }
36331
36332 /*
36333 * XPath:
36334 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only
36335 */
36336 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
36337 struct nb_cb_modify_args *args)
36338 {
36339 switch (args->event) {
36340 case NB_EV_VALIDATE:
36341 case NB_EV_PREPARE:
36342 case NB_EV_ABORT:
36343 case NB_EV_APPLY:
36344 /* TODO: implement me. */
36345 break;
36346 }
36347
36348 return NB_OK;
36349 }
36350
36351 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
36352 struct nb_cb_destroy_args *args)
36353 {
36354 switch (args->event) {
36355 case NB_EV_VALIDATE:
36356 case NB_EV_PREPARE:
36357 case NB_EV_ABORT:
36358 case NB_EV_APPLY:
36359 /* TODO: implement me. */
36360 break;
36361 }
36362
36363 return NB_OK;
36364 }
36365
36366 /*
36367 * XPath:
36368 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer
36369 */
36370 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
36371 struct nb_cb_modify_args *args)
36372 {
36373 switch (args->event) {
36374 case NB_EV_VALIDATE:
36375 case NB_EV_PREPARE:
36376 case NB_EV_ABORT:
36377 case NB_EV_APPLY:
36378 /* TODO: implement me. */
36379 break;
36380 }
36381
36382 return NB_OK;
36383 }
36384
36385 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
36386 struct nb_cb_destroy_args *args)
36387 {
36388 switch (args->event) {
36389 case NB_EV_VALIDATE:
36390 case NB_EV_PREPARE:
36391 case NB_EV_ABORT:
36392 case NB_EV_APPLY:
36393 /* TODO: implement me. */
36394 break;
36395 }
36396
36397 return NB_OK;
36398 }
36399
36400 /*
36401 * XPath:
36402 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
36403 */
36404 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
36405 struct nb_cb_modify_args *args)
36406 {
36407 switch (args->event) {
36408 case NB_EV_VALIDATE:
36409 case NB_EV_PREPARE:
36410 case NB_EV_ABORT:
36411 case NB_EV_APPLY:
36412 /* TODO: implement me. */
36413 break;
36414 }
36415
36416 return NB_OK;
36417 }
36418
36419 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
36420 struct nb_cb_destroy_args *args)
36421 {
36422 switch (args->event) {
36423 case NB_EV_VALIDATE:
36424 case NB_EV_PREPARE:
36425 case NB_EV_ABORT:
36426 case NB_EV_APPLY:
36427 /* TODO: implement me. */
36428 break;
36429 }
36430
36431 return NB_OK;
36432 }
36433
36434 /*
36435 * XPath:
36436 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
36437 */
36438 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
36439 struct nb_cb_modify_args *args)
36440 {
36441 switch (args->event) {
36442 case NB_EV_VALIDATE:
36443 case NB_EV_PREPARE:
36444 case NB_EV_ABORT:
36445 case NB_EV_APPLY:
36446 /* TODO: implement me. */
36447 break;
36448 }
36449
36450 return NB_OK;
36451 }
36452
36453 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
36454 struct nb_cb_destroy_args *args)
36455 {
36456 switch (args->event) {
36457 case NB_EV_VALIDATE:
36458 case NB_EV_PREPARE:
36459 case NB_EV_ABORT:
36460 case NB_EV_APPLY:
36461 /* TODO: implement me. */
36462 break;
36463 }
36464
36465 return NB_OK;
36466 }
36467
36468 /*
36469 * XPath:
36470 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer
36471 */
36472 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
36473 struct nb_cb_modify_args *args)
36474 {
36475 switch (args->event) {
36476 case NB_EV_VALIDATE:
36477 case NB_EV_PREPARE:
36478 case NB_EV_ABORT:
36479 case NB_EV_APPLY:
36480 /* TODO: implement me. */
36481 break;
36482 }
36483
36484 return NB_OK;
36485 }
36486
36487 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
36488 struct nb_cb_destroy_args *args)
36489 {
36490 switch (args->event) {
36491 case NB_EV_VALIDATE:
36492 case NB_EV_PREPARE:
36493 case NB_EV_ABORT:
36494 case NB_EV_APPLY:
36495 /* TODO: implement me. */
36496 break;
36497 }
36498
36499 return NB_OK;
36500 }
36501
36502 /*
36503 * XPath:
36504 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
36505 */
36506 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
36507 struct nb_cb_modify_args *args)
36508 {
36509 switch (args->event) {
36510 case NB_EV_VALIDATE:
36511 case NB_EV_PREPARE:
36512 case NB_EV_ABORT:
36513 case NB_EV_APPLY:
36514 /* TODO: implement me. */
36515 break;
36516 }
36517
36518 return NB_OK;
36519 }
36520
36521 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
36522 struct nb_cb_destroy_args *args)
36523 {
36524 switch (args->event) {
36525 case NB_EV_VALIDATE:
36526 case NB_EV_PREPARE:
36527 case NB_EV_ABORT:
36528 case NB_EV_APPLY:
36529 /* TODO: implement me. */
36530 break;
36531 }
36532
36533 return NB_OK;
36534 }
36535
36536 /*
36537 * XPath:
36538 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only
36539 */
36540 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
36541 struct nb_cb_modify_args *args)
36542 {
36543 switch (args->event) {
36544 case NB_EV_VALIDATE:
36545 case NB_EV_PREPARE:
36546 case NB_EV_ABORT:
36547 case NB_EV_APPLY:
36548 /* TODO: implement me. */
36549 break;
36550 }
36551
36552 return NB_OK;
36553 }
36554
36555 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
36556 struct nb_cb_destroy_args *args)
36557 {
36558 switch (args->event) {
36559 case NB_EV_VALIDATE:
36560 case NB_EV_PREPARE:
36561 case NB_EV_ABORT:
36562 case NB_EV_APPLY:
36563 /* TODO: implement me. */
36564 break;
36565 }
36566
36567 return NB_OK;
36568 }
36569
36570 /*
36571 * XPath:
36572 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self
36573 */
36574 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify(
36575 struct nb_cb_modify_args *args)
36576 {
36577 switch (args->event) {
36578 case NB_EV_VALIDATE:
36579 case NB_EV_PREPARE:
36580 case NB_EV_ABORT:
36581 return NB_OK;
36582 case NB_EV_APPLY:
36583 return bgp_peer_group_afi_safi_flag_modify(
36584 args, PEER_FLAG_NEXTHOP_SELF,
36585 yang_dnode_get_bool(args->dnode, NULL));
36586
36587 break;
36588 }
36589
36590 return NB_OK;
36591 }
36592
36593 /*
36594 * XPath:
36595 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self-force
36596 */
36597 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_force_modify(
36598 struct nb_cb_modify_args *args)
36599 {
36600 switch (args->event) {
36601 case NB_EV_VALIDATE:
36602 case NB_EV_PREPARE:
36603 case NB_EV_ABORT:
36604 return NB_OK;
36605 case NB_EV_APPLY:
36606 return bgp_peer_group_afi_safi_flag_modify(
36607 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
36608 yang_dnode_get_bool(args->dnode, NULL));
36609
36610 break;
36611 }
36612
36613 return NB_OK;
36614 }
36615
36616 /*
36617 * XPath:
36618 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all
36619 */
36620 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_modify(
36621 struct nb_cb_modify_args *args)
36622 {
36623 switch (args->event) {
36624 case NB_EV_VALIDATE:
36625 case NB_EV_PREPARE:
36626 case NB_EV_ABORT:
36627 return NB_OK;
36628 case NB_EV_APPLY:
36629 return bgp_peer_group_afi_safi_flag_modify(
36630 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
36631 yang_dnode_get_bool(args->dnode, NULL));
36632
36633 break;
36634 }
36635
36636 return NB_OK;
36637 }
36638
36639 /*
36640 * XPath:
36641 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all-replace
36642 */
36643 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_replace_modify(
36644 struct nb_cb_modify_args *args)
36645 {
36646 switch (args->event) {
36647 case NB_EV_VALIDATE:
36648 case NB_EV_PREPARE:
36649 case NB_EV_ABORT:
36650 return NB_OK;
36651 case NB_EV_APPLY:
36652 return bgp_peer_group_afi_safi_flag_modify(
36653 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
36654 yang_dnode_get_bool(args->dnode, NULL));
36655
36656 break;
36657 }
36658
36659 return NB_OK;
36660 }
36661
36662 /*
36663 * XPath:
36664 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as
36665 */
36666 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_modify(
36667 struct nb_cb_modify_args *args)
36668 {
36669 switch (args->event) {
36670 case NB_EV_VALIDATE:
36671 case NB_EV_PREPARE:
36672 case NB_EV_ABORT:
36673 return NB_OK;
36674 case NB_EV_APPLY:
36675 return bgp_peer_group_afi_safi_flag_modify(
36676 args, PEER_FLAG_REMOVE_PRIVATE_AS,
36677 yang_dnode_get_bool(args->dnode, NULL));
36678
36679 break;
36680 }
36681
36682 return NB_OK;
36683 }
36684
36685 /*
36686 * XPath:
36687 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-replace
36688 */
36689 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_replace_modify(
36690 struct nb_cb_modify_args *args)
36691 {
36692 switch (args->event) {
36693 case NB_EV_VALIDATE:
36694 case NB_EV_PREPARE:
36695 case NB_EV_ABORT:
36696 return NB_OK;
36697 case NB_EV_APPLY:
36698 return bgp_peer_group_afi_safi_flag_modify(
36699 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
36700 yang_dnode_get_bool(args->dnode, NULL));
36701
36702 break;
36703 }
36704
36705 return NB_OK;
36706 }
36707
36708 /*
36709 * XPath:
36710 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/route-reflector/route-reflector-client
36711 */
36712 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflector_route_reflector_client_modify(
36713 struct nb_cb_modify_args *args)
36714 {
36715 switch (args->event) {
36716 case NB_EV_VALIDATE:
36717 case NB_EV_PREPARE:
36718 case NB_EV_ABORT:
36719 return NB_OK;
36720 case NB_EV_APPLY:
36721 return bgp_peer_group_afi_safi_flag_modify(
36722 args, PEER_FLAG_REFLECTOR_CLIENT,
36723 yang_dnode_get_bool(args->dnode, NULL));
36724
36725 break;
36726 }
36727
36728 return NB_OK;
36729 }
36730
36731 /*
36732 * XPath:
36733 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/route-server/route-server-client
36734 */
36735 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_route_server_client_modify(
36736 struct nb_cb_modify_args *args)
36737 {
36738 switch (args->event) {
36739 case NB_EV_VALIDATE:
36740 case NB_EV_PREPARE:
36741 case NB_EV_ABORT:
36742 return NB_OK;
36743 case NB_EV_APPLY:
36744 return bgp_peer_group_afi_safi_flag_modify(
36745 args, PEER_FLAG_RSERVER_CLIENT,
36746 yang_dnode_get_bool(args->dnode, NULL));
36747
36748 break;
36749 }
36750
36751 return NB_OK;
36752 }
36753
36754 /*
36755 * XPath:
36756 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-community
36757 */
36758 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_community_modify(
36759 struct nb_cb_modify_args *args)
36760 {
36761 switch (args->event) {
36762 case NB_EV_VALIDATE:
36763 case NB_EV_PREPARE:
36764 case NB_EV_ABORT:
36765 return NB_OK;
36766 case NB_EV_APPLY:
36767 return bgp_peer_group_afi_safi_flag_modify(
36768 args, PEER_FLAG_SEND_COMMUNITY,
36769 yang_dnode_get_bool(args->dnode, NULL));
36770
36771 break;
36772 }
36773
36774 return NB_OK;
36775 }
36776
36777 /*
36778 * XPath:
36779 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-ext-community
36780 */
36781 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_ext_community_modify(
36782 struct nb_cb_modify_args *args)
36783 {
36784 switch (args->event) {
36785 case NB_EV_VALIDATE:
36786 case NB_EV_PREPARE:
36787 case NB_EV_ABORT:
36788 return NB_OK;
36789 case NB_EV_APPLY:
36790 return bgp_peer_group_afi_safi_flag_modify(
36791 args, PEER_FLAG_SEND_EXT_COMMUNITY,
36792 yang_dnode_get_bool(args->dnode, NULL));
36793
36794 break;
36795 }
36796
36797 return NB_OK;
36798 }
36799
36800 /*
36801 * XPath:
36802 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-large-community
36803 */
36804 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_large_community_modify(
36805 struct nb_cb_modify_args *args)
36806 {
36807 switch (args->event) {
36808 case NB_EV_VALIDATE:
36809 case NB_EV_PREPARE:
36810 case NB_EV_ABORT:
36811 return NB_OK;
36812 case NB_EV_APPLY:
36813 return bgp_peer_group_afi_safi_flag_modify(
36814 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
36815 yang_dnode_get_bool(args->dnode, NULL));
36816
36817 break;
36818 }
36819
36820 return NB_OK;
36821 }
36822
36823 /*
36824 * XPath:
36825 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/soft-reconfiguration
36826 */
36827 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfiguration_modify(
36828 struct nb_cb_modify_args *args)
36829 {
36830 switch (args->event) {
36831 case NB_EV_VALIDATE:
36832 case NB_EV_PREPARE:
36833 case NB_EV_ABORT:
36834 return NB_OK;
36835 case NB_EV_APPLY:
36836 return bgp_peer_group_afi_safi_flag_modify(
36837 args, PEER_FLAG_SOFT_RECONFIG,
36838 yang_dnode_get_bool(args->dnode, NULL));
36839
36840 break;
36841 }
36842
36843 return NB_OK;
36844 }
36845
36846 /*
36847 * XPath:
36848 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/weight/weight-attribute
36849 */
36850 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_modify(
36851 struct nb_cb_modify_args *args)
36852 {
36853 switch (args->event) {
36854 case NB_EV_VALIDATE:
36855 case NB_EV_PREPARE:
36856 case NB_EV_ABORT:
36857 return NB_OK;
36858 case NB_EV_APPLY:
36859 return bgp_peer_group_afi_safi_weight_modify(args);
36860
36861 break;
36862 }
36863
36864 return NB_OK;
36865 }
36866
36867 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_destroy(
36868 struct nb_cb_destroy_args *args)
36869 {
36870 switch (args->event) {
36871 case NB_EV_VALIDATE:
36872 case NB_EV_PREPARE:
36873 case NB_EV_ABORT:
36874 return NB_OK;
36875 case NB_EV_APPLY:
36876 return bgp_peer_group_afi_safi_weight_destroy(args);
36877
36878 break;
36879 }
36880
36881 return NB_OK;
36882 }
36883
36884 /*
36885 * XPath:
36886 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/add-paths/path-type
36887 */
36888 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_add_paths_path_type_modify(
36889 struct nb_cb_modify_args *args)
36890 {
36891 switch (args->event) {
36892 case NB_EV_VALIDATE:
36893 case NB_EV_PREPARE:
36894 case NB_EV_ABORT:
36895 case NB_EV_APPLY:
36896 /* TODO: implement me. */
36897 break;
36898 }
36899
36900 return NB_OK;
36901 }
36902
36903 /*
36904 * XPath:
36905 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-as
36906 */
36907 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_modify(
36908 struct nb_cb_modify_args *args)
36909 {
36910 switch (args->event) {
36911 case NB_EV_VALIDATE:
36912 case NB_EV_PREPARE:
36913 case NB_EV_ABORT:
36914 case NB_EV_APPLY:
36915 /* TODO: implement me. */
36916 break;
36917 }
36918
36919 return NB_OK;
36920 }
36921
36922 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_destroy(
36923 struct nb_cb_destroy_args *args)
36924 {
36925 switch (args->event) {
36926 case NB_EV_VALIDATE:
36927 case NB_EV_PREPARE:
36928 case NB_EV_ABORT:
36929 case NB_EV_APPLY:
36930 /* TODO: implement me. */
36931 break;
36932 }
36933
36934 return NB_OK;
36935 }
36936
36937 /*
36938 * XPath:
36939 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-origin-as
36940 */
36941 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
36942 struct nb_cb_modify_args *args)
36943 {
36944 switch (args->event) {
36945 case NB_EV_VALIDATE:
36946 case NB_EV_PREPARE:
36947 case NB_EV_ABORT:
36948 case NB_EV_APPLY:
36949 /* TODO: implement me. */
36950 break;
36951 }
36952
36953 return NB_OK;
36954 }
36955
36956 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
36957 struct nb_cb_destroy_args *args)
36958 {
36959 switch (args->event) {
36960 case NB_EV_VALIDATE:
36961 case NB_EV_PREPARE:
36962 case NB_EV_ABORT:
36963 case NB_EV_APPLY:
36964 /* TODO: implement me. */
36965 break;
36966 }
36967
36968 return NB_OK;
36969 }
36970
36971 /*
36972 * XPath:
36973 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/replace-peer-as
36974 */
36975 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_replace_peer_as_modify(
36976 struct nb_cb_modify_args *args)
36977 {
36978 switch (args->event) {
36979 case NB_EV_VALIDATE:
36980 case NB_EV_PREPARE:
36981 case NB_EV_ABORT:
36982 return NB_OK;
36983 case NB_EV_APPLY:
36984 return bgp_peer_group_afi_safi_flag_modify(
36985 args, PEER_FLAG_AS_OVERRIDE,
36986 yang_dnode_get_bool(args->dnode, NULL));
36987
36988 break;
36989 }
36990
36991 return NB_OK;
36992 }
36993
36994 /*
36995 * XPath:
36996 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/as-path-unchanged
36997 */
36998 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
36999 struct nb_cb_modify_args *args)
37000 {
37001 switch (args->event) {
37002 case NB_EV_VALIDATE:
37003 case NB_EV_PREPARE:
37004 case NB_EV_ABORT:
37005 return NB_OK;
37006 case NB_EV_APPLY:
37007 return bgp_peer_group_afi_safi_flag_modify(
37008 args, PEER_FLAG_AS_PATH_UNCHANGED,
37009 yang_dnode_get_bool(args->dnode, NULL));
37010
37011 break;
37012 }
37013
37014 return NB_OK;
37015 }
37016
37017 /*
37018 * XPath:
37019 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/next-hop-unchanged
37020 */
37021 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
37022 struct nb_cb_modify_args *args)
37023 {
37024 switch (args->event) {
37025 case NB_EV_VALIDATE:
37026 case NB_EV_PREPARE:
37027 case NB_EV_ABORT:
37028 return NB_OK;
37029 case NB_EV_APPLY:
37030 return bgp_peer_group_afi_safi_flag_modify(
37031 args, PEER_FLAG_NEXTHOP_UNCHANGED,
37032 yang_dnode_get_bool(args->dnode, NULL));
37033
37034 break;
37035 }
37036
37037 return NB_OK;
37038 }
37039
37040 /*
37041 * XPath:
37042 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/med-unchanged
37043 */
37044 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_med_unchanged_modify(
37045 struct nb_cb_modify_args *args)
37046 {
37047 switch (args->event) {
37048 case NB_EV_VALIDATE:
37049 case NB_EV_PREPARE:
37050 case NB_EV_ABORT:
37051 return NB_OK;
37052 case NB_EV_APPLY:
37053 return bgp_peer_group_afi_safi_flag_modify(
37054 args, PEER_FLAG_MED_UNCHANGED,
37055 yang_dnode_get_bool(args->dnode, NULL));
37056
37057 break;
37058 }
37059
37060 return NB_OK;
37061 }
37062
37063 /*
37064 * XPath:
37065 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list
37066 */
37067 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create(
37068 struct nb_cb_create_args *args)
37069 {
37070 switch (args->event) {
37071 case NB_EV_VALIDATE:
37072 case NB_EV_PREPARE:
37073 case NB_EV_ABORT:
37074 case NB_EV_APPLY:
37075 /* TODO: implement me. */
37076 break;
37077 }
37078
37079 return NB_OK;
37080 }
37081
37082 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy(
37083 struct nb_cb_destroy_args *args)
37084 {
37085 switch (args->event) {
37086 case NB_EV_VALIDATE:
37087 case NB_EV_PREPARE:
37088 case NB_EV_ABORT:
37089 return NB_OK;
37090 case NB_EV_APPLY:
37091 return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
37092 }
37093
37094 return NB_OK;
37095 }
37096
37097 /*
37098 * XPath:
37099 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/max-prefixes
37100 */
37101 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
37102 struct nb_cb_modify_args *args)
37103 {
37104 switch (args->event) {
37105 case NB_EV_VALIDATE:
37106 case NB_EV_PREPARE:
37107 case NB_EV_ABORT:
37108 case NB_EV_APPLY:
37109 /* TODO: implement me. */
37110 break;
37111 }
37112
37113 return NB_OK;
37114 }
37115
37116 /*
37117 * XPath:
37118 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check
37119 */
37120 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
37121 struct nb_cb_modify_args *args)
37122 {
37123 switch (args->event) {
37124 case NB_EV_VALIDATE:
37125 case NB_EV_PREPARE:
37126 case NB_EV_ABORT:
37127 case NB_EV_APPLY:
37128 /* TODO: implement me. */
37129 break;
37130 }
37131
37132 return NB_OK;
37133 }
37134
37135 /*
37136 * XPath:
37137 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only
37138 */
37139 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
37140 struct nb_cb_modify_args *args)
37141 {
37142 switch (args->event) {
37143 case NB_EV_VALIDATE:
37144 case NB_EV_PREPARE:
37145 case NB_EV_ABORT:
37146 case NB_EV_APPLY:
37147 /* TODO: implement me. */
37148 break;
37149 }
37150
37151 return NB_OK;
37152 }
37153
37154 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
37155 struct nb_cb_destroy_args *args)
37156 {
37157 switch (args->event) {
37158 case NB_EV_VALIDATE:
37159 case NB_EV_PREPARE:
37160 case NB_EV_ABORT:
37161 case NB_EV_APPLY:
37162 /* TODO: implement me. */
37163 break;
37164 }
37165
37166 return NB_OK;
37167 }
37168
37169 /*
37170 * XPath:
37171 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer
37172 */
37173 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
37174 struct nb_cb_modify_args *args)
37175 {
37176 switch (args->event) {
37177 case NB_EV_VALIDATE:
37178 case NB_EV_PREPARE:
37179 case NB_EV_ABORT:
37180 case NB_EV_APPLY:
37181 /* TODO: implement me. */
37182 break;
37183 }
37184
37185 return NB_OK;
37186 }
37187
37188 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
37189 struct nb_cb_destroy_args *args)
37190 {
37191 switch (args->event) {
37192 case NB_EV_VALIDATE:
37193 case NB_EV_PREPARE:
37194 case NB_EV_ABORT:
37195 case NB_EV_APPLY:
37196 /* TODO: implement me. */
37197 break;
37198 }
37199
37200 return NB_OK;
37201 }
37202
37203 /*
37204 * XPath:
37205 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
37206 */
37207 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
37208 struct nb_cb_modify_args *args)
37209 {
37210 switch (args->event) {
37211 case NB_EV_VALIDATE:
37212 case NB_EV_PREPARE:
37213 case NB_EV_ABORT:
37214 case NB_EV_APPLY:
37215 /* TODO: implement me. */
37216 break;
37217 }
37218
37219 return NB_OK;
37220 }
37221
37222 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
37223 struct nb_cb_destroy_args *args)
37224 {
37225 switch (args->event) {
37226 case NB_EV_VALIDATE:
37227 case NB_EV_PREPARE:
37228 case NB_EV_ABORT:
37229 case NB_EV_APPLY:
37230 /* TODO: implement me. */
37231 break;
37232 }
37233
37234 return NB_OK;
37235 }
37236
37237 /*
37238 * XPath:
37239 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
37240 */
37241 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
37242 struct nb_cb_modify_args *args)
37243 {
37244 switch (args->event) {
37245 case NB_EV_VALIDATE:
37246 case NB_EV_PREPARE:
37247 case NB_EV_ABORT:
37248 case NB_EV_APPLY:
37249 /* TODO: implement me. */
37250 break;
37251 }
37252
37253 return NB_OK;
37254 }
37255
37256 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
37257 struct nb_cb_destroy_args *args)
37258 {
37259 switch (args->event) {
37260 case NB_EV_VALIDATE:
37261 case NB_EV_PREPARE:
37262 case NB_EV_ABORT:
37263 case NB_EV_APPLY:
37264 /* TODO: implement me. */
37265 break;
37266 }
37267
37268 return NB_OK;
37269 }
37270
37271 /*
37272 * XPath:
37273 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer
37274 */
37275 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
37276 struct nb_cb_modify_args *args)
37277 {
37278 switch (args->event) {
37279 case NB_EV_VALIDATE:
37280 case NB_EV_PREPARE:
37281 case NB_EV_ABORT:
37282 case NB_EV_APPLY:
37283 /* TODO: implement me. */
37284 break;
37285 }
37286
37287 return NB_OK;
37288 }
37289
37290 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
37291 struct nb_cb_destroy_args *args)
37292 {
37293 switch (args->event) {
37294 case NB_EV_VALIDATE:
37295 case NB_EV_PREPARE:
37296 case NB_EV_ABORT:
37297 case NB_EV_APPLY:
37298 /* TODO: implement me. */
37299 break;
37300 }
37301
37302 return NB_OK;
37303 }
37304
37305 /*
37306 * XPath:
37307 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
37308 */
37309 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
37310 struct nb_cb_modify_args *args)
37311 {
37312 switch (args->event) {
37313 case NB_EV_VALIDATE:
37314 case NB_EV_PREPARE:
37315 case NB_EV_ABORT:
37316 case NB_EV_APPLY:
37317 /* TODO: implement me. */
37318 break;
37319 }
37320
37321 return NB_OK;
37322 }
37323
37324 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
37325 struct nb_cb_destroy_args *args)
37326 {
37327 switch (args->event) {
37328 case NB_EV_VALIDATE:
37329 case NB_EV_PREPARE:
37330 case NB_EV_ABORT:
37331 case NB_EV_APPLY:
37332 /* TODO: implement me. */
37333 break;
37334 }
37335
37336 return NB_OK;
37337 }
37338
37339 /*
37340 * XPath:
37341 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only
37342 */
37343 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
37344 struct nb_cb_modify_args *args)
37345 {
37346 switch (args->event) {
37347 case NB_EV_VALIDATE:
37348 case NB_EV_PREPARE:
37349 case NB_EV_ABORT:
37350 case NB_EV_APPLY:
37351 /* TODO: implement me. */
37352 break;
37353 }
37354
37355 return NB_OK;
37356 }
37357
37358 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
37359 struct nb_cb_destroy_args *args)
37360 {
37361 switch (args->event) {
37362 case NB_EV_VALIDATE:
37363 case NB_EV_PREPARE:
37364 case NB_EV_ABORT:
37365 case NB_EV_APPLY:
37366 /* TODO: implement me. */
37367 break;
37368 }
37369
37370 return NB_OK;
37371 }
37372
37373 /*
37374 * XPath:
37375 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self
37376 */
37377 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify(
37378 struct nb_cb_modify_args *args)
37379 {
37380 switch (args->event) {
37381 case NB_EV_VALIDATE:
37382 case NB_EV_PREPARE:
37383 case NB_EV_ABORT:
37384 return NB_OK;
37385 case NB_EV_APPLY:
37386 return bgp_peer_group_afi_safi_flag_modify(
37387 args, PEER_FLAG_NEXTHOP_SELF,
37388 yang_dnode_get_bool(args->dnode, NULL));
37389
37390 break;
37391 }
37392
37393 return NB_OK;
37394 }
37395
37396 /*
37397 * XPath:
37398 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self-force
37399 */
37400 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
37401 struct nb_cb_modify_args *args)
37402 {
37403 switch (args->event) {
37404 case NB_EV_VALIDATE:
37405 case NB_EV_PREPARE:
37406 case NB_EV_ABORT:
37407 return NB_OK;
37408 case NB_EV_APPLY:
37409 return bgp_peer_group_afi_safi_flag_modify(
37410 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
37411 yang_dnode_get_bool(args->dnode, NULL));
37412
37413 break;
37414 }
37415
37416 return NB_OK;
37417 }
37418
37419 /*
37420 * XPath:
37421 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all
37422 */
37423 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_modify(
37424 struct nb_cb_modify_args *args)
37425 {
37426 switch (args->event) {
37427 case NB_EV_VALIDATE:
37428 case NB_EV_PREPARE:
37429 case NB_EV_ABORT:
37430 return NB_OK;
37431 case NB_EV_APPLY:
37432 return bgp_peer_group_afi_safi_flag_modify(
37433 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
37434 yang_dnode_get_bool(args->dnode, NULL));
37435
37436 break;
37437 }
37438
37439 return NB_OK;
37440 }
37441
37442 /*
37443 * XPath:
37444 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all-replace
37445 */
37446 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
37447 struct nb_cb_modify_args *args)
37448 {
37449 switch (args->event) {
37450 case NB_EV_VALIDATE:
37451 case NB_EV_PREPARE:
37452 case NB_EV_ABORT:
37453 return NB_OK;
37454 case NB_EV_APPLY:
37455 return bgp_peer_group_afi_safi_flag_modify(
37456 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
37457 yang_dnode_get_bool(args->dnode, NULL));
37458
37459 break;
37460 }
37461
37462 return NB_OK;
37463 }
37464
37465 /*
37466 * XPath:
37467 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as
37468 */
37469 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_modify(
37470 struct nb_cb_modify_args *args)
37471 {
37472 switch (args->event) {
37473 case NB_EV_VALIDATE:
37474 case NB_EV_PREPARE:
37475 case NB_EV_ABORT:
37476 return NB_OK;
37477 case NB_EV_APPLY:
37478 return bgp_peer_group_afi_safi_flag_modify(
37479 args, PEER_FLAG_REMOVE_PRIVATE_AS,
37480 yang_dnode_get_bool(args->dnode, NULL));
37481
37482 break;
37483 }
37484
37485 return NB_OK;
37486 }
37487
37488 /*
37489 * XPath:
37490 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-replace
37491 */
37492 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_replace_modify(
37493 struct nb_cb_modify_args *args)
37494 {
37495 switch (args->event) {
37496 case NB_EV_VALIDATE:
37497 case NB_EV_PREPARE:
37498 case NB_EV_ABORT:
37499 return NB_OK;
37500 case NB_EV_APPLY:
37501 return bgp_peer_group_afi_safi_flag_modify(
37502 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
37503 yang_dnode_get_bool(args->dnode, NULL));
37504
37505 break;
37506 }
37507
37508 return NB_OK;
37509 }
37510
37511 /*
37512 * XPath:
37513 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-reflector/route-reflector-client
37514 */
37515 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector_route_reflector_client_modify(
37516 struct nb_cb_modify_args *args)
37517 {
37518 switch (args->event) {
37519 case NB_EV_VALIDATE:
37520 case NB_EV_PREPARE:
37521 case NB_EV_ABORT:
37522 return NB_OK;
37523 case NB_EV_APPLY:
37524 return bgp_peer_group_afi_safi_flag_modify(
37525 args, PEER_FLAG_REFLECTOR_CLIENT,
37526 yang_dnode_get_bool(args->dnode, NULL));
37527
37528 break;
37529 }
37530
37531 return NB_OK;
37532 }
37533
37534 /*
37535 * XPath:
37536 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-server/route-server-client
37537 */
37538 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_route_server_client_modify(
37539 struct nb_cb_modify_args *args)
37540 {
37541 switch (args->event) {
37542 case NB_EV_VALIDATE:
37543 case NB_EV_PREPARE:
37544 case NB_EV_ABORT:
37545 return NB_OK;
37546 case NB_EV_APPLY:
37547 return bgp_peer_group_afi_safi_flag_modify(
37548 args, PEER_FLAG_RSERVER_CLIENT,
37549 yang_dnode_get_bool(args->dnode, NULL));
37550
37551 break;
37552 }
37553
37554 return NB_OK;
37555 }
37556
37557 /*
37558 * XPath:
37559 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-community
37560 */
37561 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_community_modify(
37562 struct nb_cb_modify_args *args)
37563 {
37564 switch (args->event) {
37565 case NB_EV_VALIDATE:
37566 case NB_EV_PREPARE:
37567 case NB_EV_ABORT:
37568 return NB_OK;
37569 case NB_EV_APPLY:
37570 return bgp_peer_group_afi_safi_flag_modify(
37571 args, PEER_FLAG_SEND_COMMUNITY,
37572 yang_dnode_get_bool(args->dnode, NULL));
37573
37574 break;
37575 }
37576
37577 return NB_OK;
37578 }
37579
37580 /*
37581 * XPath:
37582 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-ext-community
37583 */
37584 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_ext_community_modify(
37585 struct nb_cb_modify_args *args)
37586 {
37587 switch (args->event) {
37588 case NB_EV_VALIDATE:
37589 case NB_EV_PREPARE:
37590 case NB_EV_ABORT:
37591 return NB_OK;
37592 case NB_EV_APPLY:
37593 return bgp_peer_group_afi_safi_flag_modify(
37594 args, PEER_FLAG_SEND_EXT_COMMUNITY,
37595 yang_dnode_get_bool(args->dnode, NULL));
37596
37597 break;
37598 }
37599
37600 return NB_OK;
37601 }
37602
37603 /*
37604 * XPath:
37605 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-large-community
37606 */
37607 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_large_community_modify(
37608 struct nb_cb_modify_args *args)
37609 {
37610 switch (args->event) {
37611 case NB_EV_VALIDATE:
37612 case NB_EV_PREPARE:
37613 case NB_EV_ABORT:
37614 return NB_OK;
37615 case NB_EV_APPLY:
37616 return bgp_peer_group_afi_safi_flag_modify(
37617 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
37618 yang_dnode_get_bool(args->dnode, NULL));
37619
37620 break;
37621 }
37622
37623 return NB_OK;
37624 }
37625
37626 /*
37627 * XPath:
37628 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/soft-reconfiguration
37629 */
37630 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfiguration_modify(
37631 struct nb_cb_modify_args *args)
37632 {
37633 switch (args->event) {
37634 case NB_EV_VALIDATE:
37635 case NB_EV_PREPARE:
37636 case NB_EV_ABORT:
37637 return NB_OK;
37638 case NB_EV_APPLY:
37639 return bgp_peer_group_afi_safi_flag_modify(
37640 args, PEER_FLAG_SOFT_RECONFIG,
37641 yang_dnode_get_bool(args->dnode, NULL));
37642
37643 break;
37644 }
37645
37646 return NB_OK;
37647 }
37648
37649 /*
37650 * XPath:
37651 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/weight/weight-attribute
37652 */
37653 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_modify(
37654 struct nb_cb_modify_args *args)
37655 {
37656 switch (args->event) {
37657 case NB_EV_VALIDATE:
37658 case NB_EV_PREPARE:
37659 case NB_EV_ABORT:
37660 return NB_OK;
37661 case NB_EV_APPLY:
37662 return bgp_peer_group_afi_safi_weight_modify(args);
37663
37664 break;
37665 }
37666
37667 return NB_OK;
37668 }
37669
37670 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_destroy(
37671 struct nb_cb_destroy_args *args)
37672 {
37673 switch (args->event) {
37674 case NB_EV_VALIDATE:
37675 case NB_EV_PREPARE:
37676 case NB_EV_ABORT:
37677 return NB_OK;
37678 case NB_EV_APPLY:
37679 return bgp_peer_group_afi_safi_weight_destroy(args);
37680
37681 break;
37682 }
37683
37684 return NB_OK;
37685 }
37686
37687 /*
37688 * XPath:
37689 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/add-paths/path-type
37690 */
37691 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_add_paths_path_type_modify(
37692 struct nb_cb_modify_args *args)
37693 {
37694 switch (args->event) {
37695 case NB_EV_VALIDATE:
37696 case NB_EV_PREPARE:
37697 case NB_EV_ABORT:
37698 case NB_EV_APPLY:
37699 /* TODO: implement me. */
37700 break;
37701 }
37702
37703 return NB_OK;
37704 }
37705
37706 /*
37707 * XPath:
37708 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-as
37709 */
37710 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_modify(
37711 struct nb_cb_modify_args *args)
37712 {
37713 switch (args->event) {
37714 case NB_EV_VALIDATE:
37715 case NB_EV_PREPARE:
37716 case NB_EV_ABORT:
37717 case NB_EV_APPLY:
37718 /* TODO: implement me. */
37719 break;
37720 }
37721
37722 return NB_OK;
37723 }
37724
37725 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_destroy(
37726 struct nb_cb_destroy_args *args)
37727 {
37728 switch (args->event) {
37729 case NB_EV_VALIDATE:
37730 case NB_EV_PREPARE:
37731 case NB_EV_ABORT:
37732 case NB_EV_APPLY:
37733 /* TODO: implement me. */
37734 break;
37735 }
37736
37737 return NB_OK;
37738 }
37739
37740 /*
37741 * XPath:
37742 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-origin-as
37743 */
37744 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
37745 struct nb_cb_modify_args *args)
37746 {
37747 switch (args->event) {
37748 case NB_EV_VALIDATE:
37749 case NB_EV_PREPARE:
37750 case NB_EV_ABORT:
37751 case NB_EV_APPLY:
37752 /* TODO: implement me. */
37753 break;
37754 }
37755
37756 return NB_OK;
37757 }
37758
37759 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
37760 struct nb_cb_destroy_args *args)
37761 {
37762 switch (args->event) {
37763 case NB_EV_VALIDATE:
37764 case NB_EV_PREPARE:
37765 case NB_EV_ABORT:
37766 case NB_EV_APPLY:
37767 /* TODO: implement me. */
37768 break;
37769 }
37770
37771 return NB_OK;
37772 }
37773
37774 /*
37775 * XPath:
37776 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/replace-peer-as
37777 */
37778 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_replace_peer_as_modify(
37779 struct nb_cb_modify_args *args)
37780 {
37781 switch (args->event) {
37782 case NB_EV_VALIDATE:
37783 case NB_EV_PREPARE:
37784 case NB_EV_ABORT:
37785 return NB_OK;
37786 case NB_EV_APPLY:
37787 return bgp_peer_group_afi_safi_flag_modify(
37788 args, PEER_FLAG_AS_OVERRIDE,
37789 yang_dnode_get_bool(args->dnode, NULL));
37790
37791 break;
37792 }
37793
37794 return NB_OK;
37795 }
37796
37797 /*
37798 * XPath:
37799 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/as-path-unchanged
37800 */
37801 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
37802 struct nb_cb_modify_args *args)
37803 {
37804 switch (args->event) {
37805 case NB_EV_VALIDATE:
37806 case NB_EV_PREPARE:
37807 case NB_EV_ABORT:
37808 return NB_OK;
37809 case NB_EV_APPLY:
37810 return bgp_peer_group_afi_safi_flag_modify(
37811 args, PEER_FLAG_AS_PATH_UNCHANGED,
37812 yang_dnode_get_bool(args->dnode, NULL));
37813
37814 break;
37815 }
37816
37817 return NB_OK;
37818 }
37819
37820 /*
37821 * XPath:
37822 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/next-hop-unchanged
37823 */
37824 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
37825 struct nb_cb_modify_args *args)
37826 {
37827 switch (args->event) {
37828 case NB_EV_VALIDATE:
37829 case NB_EV_PREPARE:
37830 case NB_EV_ABORT:
37831 return NB_OK;
37832 case NB_EV_APPLY:
37833 return bgp_peer_group_afi_safi_flag_modify(
37834 args, PEER_FLAG_NEXTHOP_UNCHANGED,
37835 yang_dnode_get_bool(args->dnode, NULL));
37836
37837 break;
37838 }
37839
37840 return NB_OK;
37841 }
37842
37843 /*
37844 * XPath:
37845 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/med-unchanged
37846 */
37847 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_med_unchanged_modify(
37848 struct nb_cb_modify_args *args)
37849 {
37850 switch (args->event) {
37851 case NB_EV_VALIDATE:
37852 case NB_EV_PREPARE:
37853 case NB_EV_ABORT:
37854 return NB_OK;
37855 case NB_EV_APPLY:
37856 return bgp_peer_group_afi_safi_flag_modify(
37857 args, PEER_FLAG_MED_UNCHANGED,
37858 yang_dnode_get_bool(args->dnode, NULL));
37859
37860 break;
37861 }
37862
37863 return NB_OK;
37864 }
37865
37866 /*
37867 * XPath:
37868 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list
37869 */
37870 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create(
37871 struct nb_cb_create_args *args)
37872 {
37873 switch (args->event) {
37874 case NB_EV_VALIDATE:
37875 case NB_EV_PREPARE:
37876 case NB_EV_ABORT:
37877 case NB_EV_APPLY:
37878 /* TODO: implement me. */
37879 break;
37880 }
37881
37882 return NB_OK;
37883 }
37884
37885 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy(
37886 struct nb_cb_destroy_args *args)
37887 {
37888 switch (args->event) {
37889 case NB_EV_VALIDATE:
37890 case NB_EV_PREPARE:
37891 case NB_EV_ABORT:
37892 return NB_OK;
37893 case NB_EV_APPLY:
37894 return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
37895 }
37896
37897 return NB_OK;
37898 }
37899
37900 /*
37901 * XPath:
37902 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/max-prefixes
37903 */
37904 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
37905 struct nb_cb_modify_args *args)
37906 {
37907 switch (args->event) {
37908 case NB_EV_VALIDATE:
37909 case NB_EV_PREPARE:
37910 case NB_EV_ABORT:
37911 case NB_EV_APPLY:
37912 /* TODO: implement me. */
37913 break;
37914 }
37915
37916 return NB_OK;
37917 }
37918
37919 /*
37920 * XPath:
37921 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check
37922 */
37923 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
37924 struct nb_cb_modify_args *args)
37925 {
37926 switch (args->event) {
37927 case NB_EV_VALIDATE:
37928 case NB_EV_PREPARE:
37929 case NB_EV_ABORT:
37930 case NB_EV_APPLY:
37931 /* TODO: implement me. */
37932 break;
37933 }
37934
37935 return NB_OK;
37936 }
37937
37938 /*
37939 * XPath:
37940 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only
37941 */
37942 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
37943 struct nb_cb_modify_args *args)
37944 {
37945 switch (args->event) {
37946 case NB_EV_VALIDATE:
37947 case NB_EV_PREPARE:
37948 case NB_EV_ABORT:
37949 case NB_EV_APPLY:
37950 /* TODO: implement me. */
37951 break;
37952 }
37953
37954 return NB_OK;
37955 }
37956
37957 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
37958 struct nb_cb_destroy_args *args)
37959 {
37960 switch (args->event) {
37961 case NB_EV_VALIDATE:
37962 case NB_EV_PREPARE:
37963 case NB_EV_ABORT:
37964 case NB_EV_APPLY:
37965 /* TODO: implement me. */
37966 break;
37967 }
37968
37969 return NB_OK;
37970 }
37971
37972 /*
37973 * XPath:
37974 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer
37975 */
37976 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
37977 struct nb_cb_modify_args *args)
37978 {
37979 switch (args->event) {
37980 case NB_EV_VALIDATE:
37981 case NB_EV_PREPARE:
37982 case NB_EV_ABORT:
37983 case NB_EV_APPLY:
37984 /* TODO: implement me. */
37985 break;
37986 }
37987
37988 return NB_OK;
37989 }
37990
37991 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
37992 struct nb_cb_destroy_args *args)
37993 {
37994 switch (args->event) {
37995 case NB_EV_VALIDATE:
37996 case NB_EV_PREPARE:
37997 case NB_EV_ABORT:
37998 case NB_EV_APPLY:
37999 /* TODO: implement me. */
38000 break;
38001 }
38002
38003 return NB_OK;
38004 }
38005
38006 /*
38007 * XPath:
38008 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
38009 */
38010 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
38011 struct nb_cb_modify_args *args)
38012 {
38013 switch (args->event) {
38014 case NB_EV_VALIDATE:
38015 case NB_EV_PREPARE:
38016 case NB_EV_ABORT:
38017 case NB_EV_APPLY:
38018 /* TODO: implement me. */
38019 break;
38020 }
38021
38022 return NB_OK;
38023 }
38024
38025 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
38026 struct nb_cb_destroy_args *args)
38027 {
38028 switch (args->event) {
38029 case NB_EV_VALIDATE:
38030 case NB_EV_PREPARE:
38031 case NB_EV_ABORT:
38032 case NB_EV_APPLY:
38033 /* TODO: implement me. */
38034 break;
38035 }
38036
38037 return NB_OK;
38038 }
38039
38040 /*
38041 * XPath:
38042 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
38043 */
38044 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
38045 struct nb_cb_modify_args *args)
38046 {
38047 switch (args->event) {
38048 case NB_EV_VALIDATE:
38049 case NB_EV_PREPARE:
38050 case NB_EV_ABORT:
38051 case NB_EV_APPLY:
38052 /* TODO: implement me. */
38053 break;
38054 }
38055
38056 return NB_OK;
38057 }
38058
38059 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
38060 struct nb_cb_destroy_args *args)
38061 {
38062 switch (args->event) {
38063 case NB_EV_VALIDATE:
38064 case NB_EV_PREPARE:
38065 case NB_EV_ABORT:
38066 case NB_EV_APPLY:
38067 /* TODO: implement me. */
38068 break;
38069 }
38070
38071 return NB_OK;
38072 }
38073
38074 /*
38075 * XPath:
38076 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer
38077 */
38078 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
38079 struct nb_cb_modify_args *args)
38080 {
38081 switch (args->event) {
38082 case NB_EV_VALIDATE:
38083 case NB_EV_PREPARE:
38084 case NB_EV_ABORT:
38085 case NB_EV_APPLY:
38086 /* TODO: implement me. */
38087 break;
38088 }
38089
38090 return NB_OK;
38091 }
38092
38093 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
38094 struct nb_cb_destroy_args *args)
38095 {
38096 switch (args->event) {
38097 case NB_EV_VALIDATE:
38098 case NB_EV_PREPARE:
38099 case NB_EV_ABORT:
38100 case NB_EV_APPLY:
38101 /* TODO: implement me. */
38102 break;
38103 }
38104
38105 return NB_OK;
38106 }
38107
38108 /*
38109 * XPath:
38110 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
38111 */
38112 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
38113 struct nb_cb_modify_args *args)
38114 {
38115 switch (args->event) {
38116 case NB_EV_VALIDATE:
38117 case NB_EV_PREPARE:
38118 case NB_EV_ABORT:
38119 case NB_EV_APPLY:
38120 /* TODO: implement me. */
38121 break;
38122 }
38123
38124 return NB_OK;
38125 }
38126
38127 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
38128 struct nb_cb_destroy_args *args)
38129 {
38130 switch (args->event) {
38131 case NB_EV_VALIDATE:
38132 case NB_EV_PREPARE:
38133 case NB_EV_ABORT:
38134 case NB_EV_APPLY:
38135 /* TODO: implement me. */
38136 break;
38137 }
38138
38139 return NB_OK;
38140 }
38141
38142 /*
38143 * XPath:
38144 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only
38145 */
38146 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
38147 struct nb_cb_modify_args *args)
38148 {
38149 switch (args->event) {
38150 case NB_EV_VALIDATE:
38151 case NB_EV_PREPARE:
38152 case NB_EV_ABORT:
38153 case NB_EV_APPLY:
38154 /* TODO: implement me. */
38155 break;
38156 }
38157
38158 return NB_OK;
38159 }
38160
38161 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
38162 struct nb_cb_destroy_args *args)
38163 {
38164 switch (args->event) {
38165 case NB_EV_VALIDATE:
38166 case NB_EV_PREPARE:
38167 case NB_EV_ABORT:
38168 case NB_EV_APPLY:
38169 /* TODO: implement me. */
38170 break;
38171 }
38172
38173 return NB_OK;
38174 }
38175
38176 /*
38177 * XPath:
38178 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self
38179 */
38180 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify(
38181 struct nb_cb_modify_args *args)
38182 {
38183 switch (args->event) {
38184 case NB_EV_VALIDATE:
38185 case NB_EV_PREPARE:
38186 case NB_EV_ABORT:
38187 return NB_OK;
38188 case NB_EV_APPLY:
38189 return bgp_peer_group_afi_safi_flag_modify(
38190 args, PEER_FLAG_NEXTHOP_SELF,
38191 yang_dnode_get_bool(args->dnode, NULL));
38192
38193 break;
38194 }
38195
38196 return NB_OK;
38197 }
38198
38199 /*
38200 * XPath:
38201 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self-force
38202 */
38203 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
38204 struct nb_cb_modify_args *args)
38205 {
38206 switch (args->event) {
38207 case NB_EV_VALIDATE:
38208 case NB_EV_PREPARE:
38209 case NB_EV_ABORT:
38210 return NB_OK;
38211 case NB_EV_APPLY:
38212 return bgp_peer_group_afi_safi_flag_modify(
38213 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
38214 yang_dnode_get_bool(args->dnode, NULL));
38215
38216 break;
38217 }
38218
38219 return NB_OK;
38220 }
38221
38222 /*
38223 * XPath:
38224 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all
38225 */
38226 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_modify(
38227 struct nb_cb_modify_args *args)
38228 {
38229 switch (args->event) {
38230 case NB_EV_VALIDATE:
38231 case NB_EV_PREPARE:
38232 case NB_EV_ABORT:
38233 return NB_OK;
38234 case NB_EV_APPLY:
38235 return bgp_peer_group_afi_safi_flag_modify(
38236 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
38237 yang_dnode_get_bool(args->dnode, NULL));
38238
38239 break;
38240 }
38241
38242 return NB_OK;
38243 }
38244
38245 /*
38246 * XPath:
38247 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all-replace
38248 */
38249 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
38250 struct nb_cb_modify_args *args)
38251 {
38252 switch (args->event) {
38253 case NB_EV_VALIDATE:
38254 case NB_EV_PREPARE:
38255 case NB_EV_ABORT:
38256 return NB_OK;
38257 case NB_EV_APPLY:
38258 return bgp_peer_group_afi_safi_flag_modify(
38259 args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
38260 yang_dnode_get_bool(args->dnode, NULL));
38261
38262 break;
38263 }
38264
38265 return NB_OK;
38266 }
38267
38268 /*
38269 * XPath:
38270 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as
38271 */
38272 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_modify(
38273 struct nb_cb_modify_args *args)
38274 {
38275 switch (args->event) {
38276 case NB_EV_VALIDATE:
38277 case NB_EV_PREPARE:
38278 case NB_EV_ABORT:
38279 return NB_OK;
38280 case NB_EV_APPLY:
38281 return bgp_peer_group_afi_safi_flag_modify(
38282 args, PEER_FLAG_REMOVE_PRIVATE_AS,
38283 yang_dnode_get_bool(args->dnode, NULL));
38284
38285 break;
38286 }
38287
38288 return NB_OK;
38289 }
38290
38291 /*
38292 * XPath:
38293 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-replace
38294 */
38295 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_replace_modify(
38296 struct nb_cb_modify_args *args)
38297 {
38298 switch (args->event) {
38299 case NB_EV_VALIDATE:
38300 case NB_EV_PREPARE:
38301 case NB_EV_ABORT:
38302 return NB_OK;
38303 case NB_EV_APPLY:
38304 return bgp_peer_group_afi_safi_flag_modify(
38305 args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
38306 yang_dnode_get_bool(args->dnode, NULL));
38307
38308 break;
38309 }
38310
38311 return NB_OK;
38312 }
38313
38314 /*
38315 * XPath:
38316 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-reflector/route-reflector-client
38317 */
38318 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector_route_reflector_client_modify(
38319 struct nb_cb_modify_args *args)
38320 {
38321 switch (args->event) {
38322 case NB_EV_VALIDATE:
38323 case NB_EV_PREPARE:
38324 case NB_EV_ABORT:
38325 return NB_OK;
38326 case NB_EV_APPLY:
38327 return bgp_peer_group_afi_safi_flag_modify(
38328 args, PEER_FLAG_REFLECTOR_CLIENT,
38329 yang_dnode_get_bool(args->dnode, NULL));
38330
38331 break;
38332 }
38333
38334 return NB_OK;
38335 }
38336
38337 /*
38338 * XPath:
38339 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-server/route-server-client
38340 */
38341 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_route_server_client_modify(
38342 struct nb_cb_modify_args *args)
38343 {
38344 switch (args->event) {
38345 case NB_EV_VALIDATE:
38346 case NB_EV_PREPARE:
38347 case NB_EV_ABORT:
38348 return NB_OK;
38349 case NB_EV_APPLY:
38350 return bgp_peer_group_afi_safi_flag_modify(
38351 args, PEER_FLAG_RSERVER_CLIENT,
38352 yang_dnode_get_bool(args->dnode, NULL));
38353
38354 break;
38355 }
38356
38357 return NB_OK;
38358 }
38359
38360 /*
38361 * XPath:
38362 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-community
38363 */
38364 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_community_modify(
38365 struct nb_cb_modify_args *args)
38366 {
38367 switch (args->event) {
38368 case NB_EV_VALIDATE:
38369 case NB_EV_PREPARE:
38370 case NB_EV_ABORT:
38371 return NB_OK;
38372 case NB_EV_APPLY:
38373 return bgp_peer_group_afi_safi_flag_modify(
38374 args, PEER_FLAG_SEND_COMMUNITY,
38375 yang_dnode_get_bool(args->dnode, NULL));
38376
38377 break;
38378 }
38379
38380 return NB_OK;
38381 }
38382
38383 /*
38384 * XPath:
38385 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-ext-community
38386 */
38387 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_ext_community_modify(
38388 struct nb_cb_modify_args *args)
38389 {
38390 switch (args->event) {
38391 case NB_EV_VALIDATE:
38392 case NB_EV_PREPARE:
38393 case NB_EV_ABORT:
38394 return NB_OK;
38395 case NB_EV_APPLY:
38396 return bgp_peer_group_afi_safi_flag_modify(
38397 args, PEER_FLAG_SEND_EXT_COMMUNITY,
38398 yang_dnode_get_bool(args->dnode, NULL));
38399
38400 break;
38401 }
38402
38403 return NB_OK;
38404 }
38405
38406 /*
38407 * XPath:
38408 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-large-community
38409 */
38410 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_large_community_modify(
38411 struct nb_cb_modify_args *args)
38412 {
38413 switch (args->event) {
38414 case NB_EV_VALIDATE:
38415 case NB_EV_PREPARE:
38416 case NB_EV_ABORT:
38417 return NB_OK;
38418 case NB_EV_APPLY:
38419 return bgp_peer_group_afi_safi_flag_modify(
38420 args, PEER_FLAG_SEND_LARGE_COMMUNITY,
38421 yang_dnode_get_bool(args->dnode, NULL));
38422
38423 break;
38424 }
38425
38426 return NB_OK;
38427 }
38428
38429 /*
38430 * XPath:
38431 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/soft-reconfiguration
38432 */
38433 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfiguration_modify(
38434 struct nb_cb_modify_args *args)
38435 {
38436 switch (args->event) {
38437 case NB_EV_VALIDATE:
38438 case NB_EV_PREPARE:
38439 case NB_EV_ABORT:
38440 return NB_OK;
38441 case NB_EV_APPLY:
38442 return bgp_peer_group_afi_safi_flag_modify(
38443 args, PEER_FLAG_SOFT_RECONFIG,
38444 yang_dnode_get_bool(args->dnode, NULL));
38445
38446 break;
38447 }
38448
38449 return NB_OK;
38450 }
38451
38452 /*
38453 * XPath:
38454 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/weight/weight-attribute
38455 */
38456 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_modify(
38457 struct nb_cb_modify_args *args)
38458 {
38459 switch (args->event) {
38460 case NB_EV_VALIDATE:
38461 case NB_EV_PREPARE:
38462 case NB_EV_ABORT:
38463 return NB_OK;
38464 case NB_EV_APPLY:
38465 return bgp_peer_group_afi_safi_weight_modify(args);
38466
38467 break;
38468 }
38469
38470 return NB_OK;
38471 }
38472
38473 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_destroy(
38474 struct nb_cb_destroy_args *args)
38475 {
38476 switch (args->event) {
38477 case NB_EV_VALIDATE:
38478 case NB_EV_PREPARE:
38479 case NB_EV_ABORT:
38480 return NB_OK;
38481 case NB_EV_APPLY:
38482 return bgp_peer_group_afi_safi_weight_destroy(args);
38483
38484 break;
38485 }
38486
38487 return NB_OK;
38488 }
38489
38490 /*
38491 * XPath:
38492 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-as
38493 */
38494 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_modify(
38495 struct nb_cb_modify_args *args)
38496 {
38497 switch (args->event) {
38498 case NB_EV_VALIDATE:
38499 case NB_EV_PREPARE:
38500 case NB_EV_ABORT:
38501 case NB_EV_APPLY:
38502 /* TODO: implement me. */
38503 break;
38504 }
38505
38506 return NB_OK;
38507 }
38508
38509 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_destroy(
38510 struct nb_cb_destroy_args *args)
38511 {
38512 switch (args->event) {
38513 case NB_EV_VALIDATE:
38514 case NB_EV_PREPARE:
38515 case NB_EV_ABORT:
38516 case NB_EV_APPLY:
38517 /* TODO: implement me. */
38518 break;
38519 }
38520
38521 return NB_OK;
38522 }
38523
38524 /*
38525 * XPath:
38526 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-origin-as
38527 */
38528 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_modify(
38529 struct nb_cb_modify_args *args)
38530 {
38531 switch (args->event) {
38532 case NB_EV_VALIDATE:
38533 case NB_EV_PREPARE:
38534 case NB_EV_ABORT:
38535 case NB_EV_APPLY:
38536 /* TODO: implement me. */
38537 break;
38538 }
38539
38540 return NB_OK;
38541 }
38542
38543 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_destroy(
38544 struct nb_cb_destroy_args *args)
38545 {
38546 switch (args->event) {
38547 case NB_EV_VALIDATE:
38548 case NB_EV_PREPARE:
38549 case NB_EV_ABORT:
38550 case NB_EV_APPLY:
38551 /* TODO: implement me. */
38552 break;
38553 }
38554
38555 return NB_OK;
38556 }
38557
38558 /*
38559 * XPath:
38560 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/as-path-options/replace-peer-as
38561 */
38562 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace_peer_as_modify(
38563 struct nb_cb_modify_args *args)
38564 {
38565 switch (args->event) {
38566 case NB_EV_VALIDATE:
38567 case NB_EV_PREPARE:
38568 case NB_EV_ABORT:
38569 return NB_OK;
38570 case NB_EV_APPLY:
38571 return bgp_peer_group_afi_safi_flag_modify(
38572 args, PEER_FLAG_AS_OVERRIDE,
38573 yang_dnode_get_bool(args->dnode, NULL));
38574
38575 break;
38576 }
38577
38578 return NB_OK;
38579 }
38580
38581 /*
38582 * XPath:
38583 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/as-path-unchanged
38584 */
38585 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_unchanged_modify(
38586 struct nb_cb_modify_args *args)
38587 {
38588 switch (args->event) {
38589 case NB_EV_VALIDATE:
38590 case NB_EV_PREPARE:
38591 case NB_EV_ABORT:
38592 return NB_OK;
38593 case NB_EV_APPLY:
38594 return bgp_peer_group_afi_safi_flag_modify(
38595 args, PEER_FLAG_AS_PATH_UNCHANGED,
38596 yang_dnode_get_bool(args->dnode, NULL));
38597
38598 break;
38599 }
38600
38601 return NB_OK;
38602 }
38603
38604 /*
38605 * XPath:
38606 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/next-hop-unchanged
38607 */
38608 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop_unchanged_modify(
38609 struct nb_cb_modify_args *args)
38610 {
38611 switch (args->event) {
38612 case NB_EV_VALIDATE:
38613 case NB_EV_PREPARE:
38614 case NB_EV_ABORT:
38615 return NB_OK;
38616 case NB_EV_APPLY:
38617 return bgp_peer_group_afi_safi_flag_modify(
38618 args, PEER_FLAG_NEXTHOP_UNCHANGED,
38619 yang_dnode_get_bool(args->dnode, NULL));
38620
38621 break;
38622 }
38623
38624 return NB_OK;
38625 }
38626
38627 /*
38628 * XPath:
38629 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/med-unchanged
38630 */
38631 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unchanged_modify(
38632 struct nb_cb_modify_args *args)
38633 {
38634 switch (args->event) {
38635 case NB_EV_VALIDATE:
38636 case NB_EV_PREPARE:
38637 case NB_EV_ABORT:
38638 return NB_OK;
38639 case NB_EV_APPLY:
38640 return bgp_peer_group_afi_safi_flag_modify(
38641 args, PEER_FLAG_MED_UNCHANGED,
38642 yang_dnode_get_bool(args->dnode, NULL));
38643
38644 break;
38645 }
38646
38647 return NB_OK;
38648 }
38649
38650 /*
38651 * XPath:
38652 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self
38653 */
38654 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_modify(
38655 struct nb_cb_modify_args *args)
38656 {
38657 switch (args->event) {
38658 case NB_EV_VALIDATE:
38659 case NB_EV_PREPARE:
38660 case NB_EV_ABORT:
38661 return NB_OK;
38662 case NB_EV_APPLY:
38663 return bgp_peer_group_afi_safi_flag_modify(
38664 args, PEER_FLAG_NEXTHOP_SELF,
38665 yang_dnode_get_bool(args->dnode, NULL));
38666
38667 break;
38668 }
38669
38670 return NB_OK;
38671 }
38672
38673 /*
38674 * XPath:
38675 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self-force
38676 */
38677 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_force_modify(
38678 struct nb_cb_modify_args *args)
38679 {
38680 switch (args->event) {
38681 case NB_EV_VALIDATE:
38682 case NB_EV_PREPARE:
38683 case NB_EV_ABORT:
38684 return NB_OK;
38685 case NB_EV_APPLY:
38686 return bgp_peer_group_afi_safi_flag_modify(
38687 args, PEER_FLAG_FORCE_NEXTHOP_SELF,
38688 yang_dnode_get_bool(args->dnode, NULL));
38689
38690 break;
38691 }
38692
38693 return NB_OK;
38694 }
38695
38696 /*
38697 * XPath:
38698 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/route-reflector/route-reflector-client
38699 */
38700 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_reflector_client_modify(
38701 struct nb_cb_modify_args *args)
38702 {
38703 switch (args->event) {
38704 case NB_EV_VALIDATE:
38705 case NB_EV_PREPARE:
38706 case NB_EV_ABORT:
38707 return NB_OK;
38708 case NB_EV_APPLY:
38709 return bgp_peer_group_afi_safi_flag_modify(
38710 args, PEER_FLAG_REFLECTOR_CLIENT,
38711 yang_dnode_get_bool(args->dnode, NULL));
38712
38713 break;
38714 }
38715
38716 return NB_OK;
38717 }
38718
38719 /*
38720 * XPath:
38721 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/route-server/route-server-client
38722 */
38723 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_route_server_route_server_client_modify(
38724 struct nb_cb_modify_args *args)
38725 {
38726 switch (args->event) {
38727 case NB_EV_VALIDATE:
38728 case NB_EV_PREPARE:
38729 case NB_EV_ABORT:
38730 return NB_OK;
38731 case NB_EV_APPLY:
38732 return bgp_peer_group_afi_safi_flag_modify(
38733 args, PEER_FLAG_RSERVER_CLIENT,
38734 yang_dnode_get_bool(args->dnode, NULL));
38735
38736 break;
38737 }
38738
38739 return NB_OK;
38740 }
38741
38742 /*
38743 * XPath:
38744 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/soft-reconfiguration
38745 */
38746 int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_modify(
38747 struct nb_cb_modify_args *args)
38748 {
38749 switch (args->event) {
38750 case NB_EV_VALIDATE:
38751 case NB_EV_PREPARE:
38752 case NB_EV_ABORT:
38753 return NB_OK;
38754 case NB_EV_APPLY:
38755 return bgp_peer_group_afi_safi_flag_modify(
38756 args, PEER_FLAG_SOFT_RECONFIG,
38757 yang_dnode_get_bool(args->dnode, NULL));
38758
38759 break;
38760 }
38761
38762 return NB_OK;
38763 }
38764
38765 /*
38766 * XPath:
38767 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/route-reflector/route-reflector-client
38768 */
38769 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_route_reflector_route_reflector_client_modify(
38770 struct nb_cb_modify_args *args)
38771 {
38772 switch (args->event) {
38773 case NB_EV_VALIDATE:
38774 case NB_EV_PREPARE:
38775 case NB_EV_ABORT:
38776 return NB_OK;
38777 case NB_EV_APPLY:
38778 return bgp_peer_group_afi_safi_flag_modify(
38779 args, PEER_FLAG_REFLECTOR_CLIENT,
38780 yang_dnode_get_bool(args->dnode, NULL));
38781
38782 break;
38783 }
38784
38785 return NB_OK;
38786 }
38787
38788 /*
38789 * XPath:
38790 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/route-server/route-server-client
38791 */
38792 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_route_server_route_server_client_modify(
38793 struct nb_cb_modify_args *args)
38794 {
38795 switch (args->event) {
38796 case NB_EV_VALIDATE:
38797 case NB_EV_PREPARE:
38798 case NB_EV_ABORT:
38799 return NB_OK;
38800 case NB_EV_APPLY:
38801 return bgp_peer_group_afi_safi_flag_modify(
38802 args, PEER_FLAG_RSERVER_CLIENT,
38803 yang_dnode_get_bool(args->dnode, NULL));
38804
38805 break;
38806 }
38807
38808 return NB_OK;
38809 }
38810
38811 /*
38812 * XPath:
38813 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/soft-reconfiguration
38814 */
38815 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration_modify(
38816 struct nb_cb_modify_args *args)
38817 {
38818 switch (args->event) {
38819 case NB_EV_VALIDATE:
38820 case NB_EV_PREPARE:
38821 case NB_EV_ABORT:
38822 return NB_OK;
38823 case NB_EV_APPLY:
38824 return bgp_peer_group_afi_safi_flag_modify(
38825 args, PEER_FLAG_SOFT_RECONFIG,
38826 yang_dnode_get_bool(args->dnode, NULL));
38827
38828 break;
38829 }
38830
38831 return NB_OK;
38832 }
38833
38834 /*
38835 * XPath:
38836 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/route-reflector/route-reflector-client
38837 */
38838 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_route_reflector_route_reflector_client_modify(
38839 struct nb_cb_modify_args *args)
38840 {
38841 switch (args->event) {
38842 case NB_EV_VALIDATE:
38843 case NB_EV_PREPARE:
38844 case NB_EV_ABORT:
38845 return NB_OK;
38846 case NB_EV_APPLY:
38847 return bgp_peer_group_afi_safi_flag_modify(
38848 args, PEER_FLAG_REFLECTOR_CLIENT,
38849 yang_dnode_get_bool(args->dnode, NULL));
38850
38851 break;
38852 }
38853
38854 return NB_OK;
38855 }
38856
38857 /*
38858 * XPath:
38859 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/route-server/route-server-client
38860 */
38861 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_route_server_route_server_client_modify(
38862 struct nb_cb_modify_args *args)
38863 {
38864 switch (args->event) {
38865 case NB_EV_VALIDATE:
38866 case NB_EV_PREPARE:
38867 case NB_EV_ABORT:
38868 return NB_OK;
38869 case NB_EV_APPLY:
38870 return bgp_peer_group_afi_safi_flag_modify(
38871 args, PEER_FLAG_RSERVER_CLIENT,
38872 yang_dnode_get_bool(args->dnode, NULL));
38873
38874 break;
38875 }
38876
38877 return NB_OK;
38878 }
38879
38880 /*
38881 * XPath:
38882 * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/soft-reconfiguration
38883 */
38884 int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify(
38885 struct nb_cb_modify_args *args)
38886 {
38887 switch (args->event) {
38888 case NB_EV_VALIDATE:
38889 case NB_EV_PREPARE:
38890 case NB_EV_ABORT:
38891 return NB_OK;
38892 case NB_EV_APPLY:
38893 return bgp_peer_group_afi_safi_flag_modify(
38894 args, PEER_FLAG_SOFT_RECONFIG,
38895 yang_dnode_get_bool(args->dnode, NULL));
38896
38897 break;
38898 }
38899
38900 return NB_OK;
38901 }