github.com/osrg/gobgp/v3@v3.30.0/tools/pyang_plugins/gobgp.yang (about) 1 module gobgp { 2 3 yang-version "1"; 4 5 // namespace 6 namespace "https://github.com/osrg/gobgp"; 7 8 prefix "gobgp"; 9 10 // import some basic types 11 import openconfig-bgp { prefix bgp; } 12 import openconfig-bgp-types { prefix bgp-types; } 13 import openconfig-bgp-multiprotocol { prefix bgp-mp; } 14 import openconfig-routing-policy {prefix rpol; } 15 import openconfig-policy-types {prefix ptypes; } 16 import openconfig-bgp-policy {prefix bgp-pol; } 17 import ietf-inet-types { prefix inet; } 18 import ietf-yang-types { prefix yang; } 19 20 // meta 21 organization 22 "GoBGP"; 23 24 contact 25 "GoBGP http://osrg.github.io/gobgp/"; 26 27 description 28 "This module contains definitions for GoBGP-specific configuration. 29 It augments bgp modules with GoBGP-specific options."; 30 31 revision "2015-08-10" { 32 description 33 "Updated model to augment base bgp modules"; 34 reference "TBD"; 35 } 36 37 typedef bmp-route-monitoring-policy-type { 38 type enumeration { 39 enum PRE-POLICY { 40 value 0; 41 description "send pre-policy routes"; 42 } 43 enum POST-POLICY { 44 value 1; 45 description "send post-policy routes"; 46 } 47 enum BOTH { 48 value 2; 49 description "!OBSOLETED! send both pre and post-policy routes"; 50 } 51 enum LOCAL-RIB { 52 value 3; 53 description "send local rib routes"; 54 } 55 enum ALL { 56 value 4; 57 description "send pre-policy, post-policy, and local rib routes"; 58 } 59 } 60 } 61 62 identity eq { 63 base ptypes:attribute-comparison; 64 } 65 66 identity ge { 67 base ptypes:attribute-comparison; 68 } 69 70 identity le { 71 base ptypes:attribute-comparison; 72 } 73 74 identity IPV4-MULTICAST { 75 base bgp-types:afi-safi-type; 76 description 77 "IPv4 multicast (AFI,SAFI = 1,2)"; 78 reference "RFC4760"; 79 } 80 81 identity IPV6-MULTICAST { 82 base bgp-types:afi-safi-type; 83 description 84 "IPv4 multicast (AFI,SAFI = 1,2)"; 85 reference "RFC4760"; 86 } 87 88 identity RTC { 89 base bgp-types:afi-safi-type; 90 description 91 "Route target membership (AFI,SAFI = 1,132)"; 92 reference "RFC4684"; 93 } 94 95 identity IPV4-ENCAP { 96 base bgp-types:afi-safi-type; 97 description 98 "Encapsulation (AFI,SAFI = 1,7)"; 99 reference "RFC5512"; 100 } 101 102 identity IPV6-ENCAP { 103 base bgp-types:afi-safi-type; 104 description 105 "Encapsulation (AFI,SAFI = 2,7)"; 106 reference "RFC5512"; 107 } 108 109 identity IPV4-FLOWSPEC { 110 base bgp-types:afi-safi-type; 111 description 112 "IPv4 flowspec (AFI,SAFI = 1,133)"; 113 reference "RFC5575"; 114 } 115 116 identity L3VPN-IPV4-FLOWSPEC { 117 base bgp-types:afi-safi-type; 118 description 119 "L3VPN IPv4 flowspec (AFI,SAFI = 1,134)"; 120 reference "RFC5575"; 121 } 122 123 identity IPV6-FLOWSPEC { 124 base bgp-types:afi-safi-type; 125 description 126 "IPv6 flowspec (AFI,SAFI = 1,133)"; 127 reference "RFC5575"; 128 } 129 130 identity L3VPN-IPV6-FLOWSPEC { 131 base bgp-types:afi-safi-type; 132 description 133 "L3VPN IPv6 flowspec (AFI,SAFI = 1,134)"; 134 reference "RFC5575"; 135 } 136 137 identity L2VPN-FLOWSPEC { 138 base bgp-types:afi-safi-type; 139 description 140 "L2VPN flowspec (AFI,SAFI = 25,134)"; 141 reference "draft-ietf-idr-flowspec-l2vpn-03"; 142 } 143 144 identity IPV4-SRPOLICY { 145 base bgp-types:afi-safi-type; 146 description 147 "SR Policy IPv4 (AFI,SAFI = 1,73)"; 148 reference "https://tools.ietf.org/html/draft-ietf-idr-segment-routing-te-policy-11"; 149 } 150 151 identity IPV6-SRPOLICY { 152 base bgp-types:afi-safi-type; 153 description 154 "SR Policy IPv6 (AFI,SAFI = 2,73)"; 155 reference "https://tools.ietf.org/html/draft-ietf-idr-segment-routing-te-policy-11"; 156 } 157 158 identity OPAQUE { 159 base bgp-types:afi-safi-type; 160 description 161 "Opaque (AFI,SAFI = 16397,241)"; 162 reference "https://tools.ietf.org/html/draft-lapukhov-bgp-opaque-signaling-01"; 163 } 164 165 identity LS { 166 base bgp-types:afi-safi-type; 167 description 168 "Linkstate (AFI,SAFI = 16388,71)"; 169 reference "RFC7752"; 170 } 171 172 identity IPV4-MUP { 173 base bgp-types:afi-safi-type; 174 description 175 "MUP IPv4 (AFI,SAFI = 1,85)"; 176 reference "https://www.ietf.org/archive/id/draft-mpmz-bess-mup-safi-01.html"; 177 } 178 179 identity IPV6-MUP { 180 base bgp-types:afi-safi-type; 181 description 182 "MUP IPv6 (AFI,SAFI = 2,85)"; 183 reference "https://www.ietf.org/archive/id/draft-mpmz-bess-mup-safi-01.html"; 184 } 185 186 grouping gobgp-message-counter { 187 description 188 "Counters for all BGPMessage types"; 189 190 leaf OPEN { 191 type uint64; 192 description 193 "Number of BGP open messages announcing, withdrawing 194 or modifying paths exchanged."; 195 } 196 197 leaf REFRESH { 198 type uint64; 199 description 200 "Number of BGP Route-Refresh messages indicating an 201 error condition has occurred exchanged."; 202 } 203 204 leaf KEEPALIVE { 205 type uint64; 206 description 207 "Number of BGP Keepalive messages indicating an 208 error condition has occurred exchanged."; 209 } 210 211 leaf DYNAMIC-CAP { 212 type uint64; 213 description 214 "Number of BGP dynamic-cap messages indicating an 215 error condition has occurred exchanged."; 216 } 217 218 leaf WITHDRAW-UPDATE { 219 type uint32; 220 description 221 "Number of updates subjected to treat-as-withdraw treatment."; 222 } 223 224 leaf WITHDRAW-PREFIX { 225 type uint32; 226 description 227 "Number of prefixes subjected to treat-as-withdraw treatment."; 228 } 229 230 leaf DISCARDED { 231 type uint64; 232 description 233 "Number of discarded messages indicating an 234 error condition has occurred exchanged."; 235 } 236 237 leaf TOTAL { 238 type uint64; 239 description 240 "Number of total messages indicating an 241 error condition has occurred exchanged."; 242 } 243 } 244 245 grouping gobgp-adjacent-table { 246 container adj-table { 247 leaf ADVERTISED { 248 type uint32; 249 } 250 251 leaf FILTERED { 252 type uint32; 253 } 254 255 leaf RECEIVED { 256 type uint32; 257 } 258 259 leaf ACCEPTED { 260 type uint32; 261 } 262 } 263 } 264 265 266 grouping gobgp-timer { 267 description "additional timer"; 268 269 leaf idle-hold-time-after-reset { 270 type decimal64 { 271 fraction-digits 2; 272 } 273 default 30; 274 description 275 "Time interval in seconds that a BGP session will be 276 in idle state after neighbor reset operation."; 277 } 278 } 279 280 281 grouping gobgp-neighbor-timer { 282 description "additional timer"; 283 284 leaf downtime { 285 type yang:timeticks; 286 description 287 "This timer determines the amount of time since the 288 BGP last transitioned out of the Established state"; 289 } 290 291 leaf update-recv-time { 292 type int64; 293 description 294 "The number of seconds elapsed since January 1, 1970 UTC 295 last time the BGP session received an UPDATE message"; 296 } 297 } 298 299 300 grouping gobgp-in-policy { 301 description 302 "additional policy"; 303 304 leaf-list in-policy { 305 type leafref { 306 path "/rpol:routing-policy/rpol:policy-definitions/" + 307 "rpol:policy-definition/rpol:name"; 308 //require-instance true; 309 } 310 description 311 "list of policy names in sequence to be applied on 312 sending a routing update in the current context, e.g., 313 for the current other route server clients."; 314 } 315 316 leaf default-in-policy { 317 type rpol:default-policy-type; 318 default REJECT-ROUTE; 319 description 320 "explicitly set a default policy if no policy definition 321 in the in-policy chain is satisfied."; 322 } 323 } 324 325 grouping gobgp-route-server-config { 326 description 327 "Configuration parameter specifying whether 328 the neighbor is route server client or not."; 329 330 leaf route-server-client { 331 type boolean; 332 default "false"; 333 description 334 "Configure the neighbor as a route server client."; 335 } 336 337 leaf secondary-route { 338 type boolean; 339 default "false"; 340 description 341 "if an export policy rejects a selected route, try the next route in 342 order until one that is accepted is found or all routes for the peer 343 are rejected."; 344 } 345 } 346 347 grouping gobgp-route-server-config-set { 348 description 349 "set of configurations for route server client."; 350 351 container route-server { 352 description 353 "Configure the local router as a route server"; 354 355 container config { 356 description 357 "Configuration parameters relating to route server 358 client(s) used for the BGP neighbor"; 359 uses gobgp-route-server-config; 360 } 361 container state { 362 config false; 363 description 364 "State information relating to route server 365 client(s) used for the BGP neighbor"; 366 uses gobgp-route-server-config; 367 } 368 } 369 } 370 371 typedef rpki-validation-result-type { 372 type enumeration { 373 enum NONE { 374 description "RPKI disabled"; 375 } 376 enum NOT-FOUND { 377 description "If the origin AS, prefix, maximum prefix length 378 does not exist in the range of ROA"; 379 } 380 enum VALID { 381 description "If the origin AS, prefix, maximum prefix length is 382 exist in the range of ROA"; 383 } 384 enum INVALID { 385 description "if the origin AS is different when prefix, 386 maximum prefix length is exist in the range of ROA"; 387 } 388 } 389 description 390 "indicate the validation result of RPKI based on ROA"; 391 } 392 393 grouping gobgp-rpki-validation-result { 394 description "additional rpki"; 395 396 leaf rpki-validation-result { 397 type rpki-validation-result-type; 398 default NOT-FOUND; 399 description 400 "specify the validation result of RPKI based on ROA as conditions"; 401 } 402 } 403 404 grouping gobgp-rpki-server-messages-sent { 405 description "additional RPKI sent messages"; 406 407 leaf serial-query { 408 type int64; 409 description 410 "Number of serial query message sent to RPKI server"; 411 } 412 leaf reset-query { 413 type int64; 414 description 415 "Number of reset query message sent to RPKI server"; 416 } 417 leaf error { 418 type int64; 419 description 420 "Number of error message sent to RPKI server"; 421 } 422 } 423 424 grouping gobgp-rpki-server-messages-received { 425 description "additional RPKI receive messages"; 426 427 leaf serial-notify { 428 type int64; 429 description 430 "Number of serial notify message received from RPKI server"; 431 } 432 leaf cache-reset { 433 type int64; 434 description 435 "Number of cache reset message received from RPKI server"; 436 } 437 leaf cache-response { 438 type int64; 439 description 440 "Number of cache response message received from RPKI server"; 441 } 442 leaf ipv4-prefix { 443 type int64; 444 description 445 "Number of ipv4 prefix message received from RPKI server"; 446 } 447 leaf ipv6-prefix { 448 type int64; 449 description 450 "Number of ipv6 prefix message received from RPKI server"; 451 } 452 leaf end-of-data { 453 type int64; 454 description 455 "Number of end of data message received from RPKI server"; 456 } 457 leaf error { 458 type int64; 459 description 460 "Number of error message received from RPKI server"; 461 } 462 } 463 464 grouping gobgp-rpki-server-messages { 465 description "additional RPKI messages"; 466 467 container rpki-sent { 468 description 469 "Counters for transmission RPKI Message types"; 470 uses gobgp-rpki-server-messages-sent; 471 } 472 container rpki-received { 473 description 474 "Counters for reception RPKI Message types"; 475 uses gobgp-rpki-server-messages-received; 476 } 477 } 478 479 grouping gobgp-rpki-server-state { 480 description "additional RPKI state"; 481 482 leaf up { 483 type boolean; 484 } 485 leaf serial-number { 486 type uint32; 487 } 488 leaf records-v4 { 489 type uint32; 490 } 491 leaf records-v6 { 492 type uint32; 493 } 494 leaf prefixes-v4 { 495 type uint32; 496 } 497 leaf prefixes-v6 { 498 type uint32; 499 } 500 leaf uptime { 501 type int64; 502 description 503 "This timer determines the amount of time since the 504 RPKI last transitioned in of the Established state"; 505 } 506 leaf downtime { 507 type int64; 508 description 509 "This timer determines the amount of time since the 510 RPKI last transitioned out of the Established state"; 511 } 512 leaf last-pdu-recv-time { 513 type int64; 514 description 515 "last time the received an pdu message from RPKI server"; 516 } 517 container rpki-messages { 518 description 519 "Counters for transmission and reception RPKI Message types"; 520 uses gobgp-rpki-server-messages; 521 } 522 } 523 524 grouping gobgp-rpki-server-config { 525 description "additional RPKI config"; 526 527 leaf address { 528 type inet:ip-address; 529 description 530 "Reference to the address of the RPKI server used as 531 a key in the RPKI server list"; 532 } 533 leaf port { 534 type uint32; 535 description 536 "Reference to the port of the RPKI server"; 537 } 538 leaf refresh-time { 539 type int64; 540 description 541 "Check interval for a configured RPKI server."; 542 } 543 leaf hold-time { 544 type int64; 545 description 546 "Specify the length of time in seconds that the session between 547 the router and RPKI server is to be considered operational 548 without any activity"; 549 } 550 leaf record-lifetime { 551 type int64; 552 description 553 "Indicate the expiration date of the route validation recode 554 received from RPKI server"; 555 } 556 leaf preference { 557 type uint8; 558 description 559 "RPKI server has a static preference. 560 Higher the preference values indicates a higher priority RPKI server"; 561 } 562 } 563 564 grouping gobgp-rpki-server-set { 565 description "additional RPKI configuration and state"; 566 567 container config { 568 description 569 "Configuration parameters relating to RPKI server"; 570 uses gobgp-rpki-server-config; 571 } 572 container state { 573 description 574 "State information relating to RPKI server"; 575 uses gobgp-rpki-server-state; 576 } 577 } 578 579 grouping gobgp-rpki-servers { 580 description "additional RPKI structure"; 581 582 container rpki-servers { 583 list rpki-server { 584 key "address"; 585 description 586 "List of RPKI servers configured on the local system"; 587 leaf address { 588 type leafref { 589 path "../config/address"; 590 } 591 } 592 uses gobgp-rpki-server-set; 593 } 594 } 595 } 596 597 grouping gobgp-bmp-server-config { 598 description "additional BMP config"; 599 600 leaf address { 601 type inet:ip-address; 602 description 603 "Reference to the address of the BMP server used as 604 a key in the BMP server list"; 605 } 606 607 leaf port { 608 type uint32; 609 description 610 "Reference to the port of the BMP server"; 611 } 612 613 leaf route-monitoring-policy { 614 type bmp-route-monitoring-policy-type; 615 default PRE-POLICY; 616 } 617 618 leaf statistics-timeout { 619 type uint16; 620 description 621 "Interval seconds of statistics messages sent to BMP server"; 622 } 623 624 leaf route-mirroring-enabled { 625 type boolean; 626 description 627 "Enable feature for mirroring of received BGP messages 628 mainly for debugging purpose"; 629 } 630 631 leaf sys-name { 632 type string; 633 description 634 "Reference to the SysName of the BMP server"; 635 } 636 637 leaf sys-descr { 638 type string; 639 description 640 "Reference to the SysDescr of the BMP server"; 641 } 642 } 643 644 grouping gobgp-bmp-server-set { 645 description "additional BMP configuration and state"; 646 647 container config { 648 description 649 "Configuration parameters relating to BMP server"; 650 uses gobgp-bmp-server-config; 651 } 652 653 container state { 654 description 655 "Configuration parameters relating to BMP server"; 656 uses gobgp-bmp-server-config; 657 } 658 } 659 660 grouping gobgp-bmp-servers { 661 description "BGP Monitoring Protocol servers"; 662 663 container bmp-servers { 664 list bmp-server { 665 key "address"; 666 description 667 "List of BMP servers configured on the local system"; 668 leaf address { 669 type leafref { 670 path "../config/address"; 671 } 672 } 673 uses gobgp-bmp-server-set; 674 } 675 } 676 } 677 grouping gobgp-vrf-common { 678 description 679 "Common parameters for VRF configuration and state."; 680 681 leaf name { 682 description 683 "Unique name among all VRF instances."; 684 type string; 685 } 686 687 leaf id { 688 description 689 "Unique identifier among all VRF instances."; 690 type uint32; 691 } 692 693 leaf rd { 694 description 695 "Route Distinguisher for this VRF."; 696 type string; 697 } 698 699 leaf-list import-rt { 700 description 701 "List of import Route Targets for this VRF."; 702 type string; 703 } 704 705 leaf-list export-rt { 706 description 707 "List of export Route Targets for this VRF."; 708 type string; 709 } 710 } 711 712 grouping gobgp-vrf-config { 713 description 714 "Configuration parameters for VRF."; 715 716 leaf-list both-rt { 717 description 718 "List of both import and export Route Targets for this VRF. Each 719 configuration for import and export Route Targets will be preferred."; 720 type string; 721 } 722 } 723 724 grouping gobgp-vrf-set { 725 description "Set of VRF instance configuration and state"; 726 727 container config { 728 description 729 "Configuration parameters for VRF."; 730 uses gobgp-vrf-common; 731 uses gobgp-vrf-config; 732 } 733 734 container state { 735 description 736 "Configured states of VRF."; 737 uses gobgp-vrf-common; 738 } 739 } 740 741 grouping gobgp-vrfs { 742 description 743 "Virtual Routing and Forwarding (VRF) instances."; 744 745 container vrfs { 746 list vrf { 747 description 748 "VRF instance configurations on the local system."; 749 750 key "name"; 751 leaf name { 752 type leafref { 753 path "../config/name"; 754 } 755 } 756 757 uses gobgp-vrf-set; 758 } 759 } 760 } 761 762 grouping long-lived-graceful-restart { 763 container long-lived-graceful-restart { 764 container config { 765 leaf enabled { 766 type boolean; 767 } 768 leaf restart-time { 769 type uint32; 770 } 771 } 772 container state { 773 leaf enabled { 774 type boolean; 775 } 776 leaf received { 777 type boolean; 778 } 779 leaf advertised { 780 type boolean; 781 } 782 leaf peer-restart-time { 783 type uint32; 784 } 785 leaf peer-restart-timer-expired { 786 type boolean; 787 } 788 } 789 } 790 } 791 792 grouping gobgp-ttl-security-config { 793 description 794 "Configuration parameters for TTL Security"; 795 796 leaf enabled { 797 type boolean; 798 default "false"; 799 description 800 "Enable features for TTL Security"; 801 } 802 803 leaf ttl-min { 804 type uint8; 805 description 806 "Reference to the port of the BMP server"; 807 } 808 } 809 810 grouping gobgp-ttl-security-config-set { 811 description 812 "set of configurations for Generalized TTL Security Mechanism (GTSM)"; 813 814 container ttl-security { 815 description 816 "Configure TTL Security feature"; 817 818 container config { 819 description 820 "Configuration parameters for TTL Security"; 821 uses gobgp-ttl-security-config; 822 } 823 824 container state { 825 config false; 826 description 827 "State information for TTL Security"; 828 uses gobgp-ttl-security-config; 829 } 830 } 831 } 832 833 // augment statements 834 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:state/bgp:messages/bgp:sent" { 835 description "additional counters"; 836 uses gobgp-message-counter; 837 } 838 839 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:state/bgp:messages/bgp:received" { 840 description "additional counters"; 841 uses gobgp-message-counter; 842 } 843 844 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:state" { 845 description "additional counters"; 846 uses gobgp-adjacent-table; 847 } 848 849 typedef bgp-capability { 850 type uint8; 851 } 852 853 typedef bgp-open-message { 854 type uint8; 855 } 856 857 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:state" { 858 leaf-list remote-capability { 859 type bgp-capability; 860 } 861 leaf-list local-capability { 862 type bgp-capability; 863 } 864 865 leaf received-open-message { 866 type bgp-open-message; 867 } 868 } 869 870 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:config" { 871 description "additional state elements"; 872 873 leaf admin-down { 874 type boolean; 875 description 876 "The config of administrative operation. If state, indicates the neighbor is disabled by the administrator"; 877 } 878 } 879 880 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:state" { 881 description "additional state elements"; 882 883 leaf admin-down { 884 type boolean; 885 description 886 "The state of administrative operation. If the state is true, it indicates the neighbor is disabled by the administrator"; 887 } 888 889 leaf admin-state { 890 type enumeration { 891 enum UP { 892 description "admin state is up"; 893 } 894 enum DOWN { 895 description "admin state is down"; 896 } 897 enum PFX_CT { 898 description "prefix counter over limit"; 899 } 900 } 901 } 902 903 leaf established-count { 904 type uint32; 905 description 906 "The number of how many the peer became established state"; 907 } 908 909 leaf flops { 910 type uint32; 911 description 912 "The number of flip-flops"; 913 } 914 915 916 } 917 918 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:config" { 919 leaf neighbor-interface { 920 type string; 921 } 922 leaf vrf { 923 type string; 924 } 925 } 926 927 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:state" { 928 leaf neighbor-interface { 929 type string; 930 } 931 leaf vrf { 932 type string; 933 } 934 } 935 936 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:state" { 937 leaf remote-router-id { 938 type string; 939 } 940 } 941 942 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:transport/bgp:config" { 943 leaf local-port { 944 description "Set the local port (if available) to use for the session."; 945 type inet:port-number; 946 } 947 948 leaf remote-port { 949 type inet:port-number; 950 } 951 952 leaf ttl { 953 description "TTL value for BGP packets"; 954 type uint8; 955 } 956 957 leaf bind-interface { 958 description "Interface name for binding."; 959 type string; 960 } 961 } 962 963 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:timers/bgp:config" { 964 description "additional timer"; 965 uses gobgp-timer; 966 } 967 968 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:timers/bgp:state" { 969 description "additional timers"; 970 uses gobgp-timer; 971 uses gobgp-neighbor-timer; 972 } 973 974 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:afi-safis/bgp:afi-safi/bgp:graceful-restart/bgp:state" { 975 description "additional graceful-restart status"; 976 leaf end-of-rib-received { 977 type boolean; 978 } 979 leaf end-of-rib-sent { 980 type boolean; 981 } 982 } 983 984 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:graceful-restart/bgp:config" { 985 description "additional graceful-restart status"; 986 leaf deferral-time { 987 type uint16; 988 } 989 leaf notification-enabled { 990 type boolean; 991 } 992 leaf long-lived-enabled { 993 type boolean; 994 } 995 } 996 997 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:graceful-restart/bgp:state" { 998 description "additional graceful-restart status"; 999 leaf deferral-time { 1000 type uint16; 1001 } 1002 leaf notification-enabled { 1003 type boolean; 1004 } 1005 leaf long-lived-enabled { 1006 type boolean; 1007 } 1008 } 1009 1010 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:config" { 1011 leaf send-software-version { 1012 type boolean; 1013 } 1014 } 1015 1016 augment "/bgp:bgp/bgp:peer-groups/bgp:peer-group/bgp:config" { 1017 leaf send-software-version { 1018 type boolean; 1019 } 1020 } 1021 1022 augment "/bgp:bgp/bgp:peer-groups/bgp:peer-group" { 1023 description "route server configuration for peer-group"; 1024 uses gobgp-route-server-config-set; 1025 } 1026 1027 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor" { 1028 description "route server configuration for neighbor"; 1029 uses gobgp-route-server-config-set; 1030 } 1031 1032 augment "/bgp:bgp/bgp:peer-groups/bgp:peer-group" { 1033 description "TTL Security configuration for peer-group"; 1034 uses gobgp-ttl-security-config-set; 1035 } 1036 1037 augment "/bgp:bgp/bgp:neighbors/bgp:neighbor" { 1038 description "TTL Security configuration for neighbor"; 1039 uses gobgp-ttl-security-config-set; 1040 } 1041 1042 augment "/bgp:bgp/bgp:global/bgp:apply-policy/bgp:config" { 1043 description "addtional policy"; 1044 uses gobgp-in-policy; 1045 1046 } 1047 1048 augment "/bgp:bgp/bgp:global/bgp:apply-policy/bgp:state" { 1049 description "additional policy"; 1050 uses gobgp-in-policy; 1051 1052 } 1053 1054 augment "/rpol:routing-policy/rpol:policy-definitions/" + 1055 "rpol:policy-definition/rpol:statements/rpol:statement/" + 1056 "rpol:actions/bgp-pol:bgp-actions/bgp-pol:set-as-path-prepend" { 1057 description "as number used for aspath prepend"; 1058 1059 leaf as { 1060 type union { 1061 type inet:as-number; 1062 type string { 1063 pattern "last-as"; 1064 } 1065 } 1066 description 1067 "autonomous system number or 'last-as' which means 1068 the leftmost as number in the AS-path to be prepended"; 1069 } 1070 } 1071 1072 augment "/rpol:routing-policy/rpol:defined-sets/rpol:neighbor-sets/rpol:neighbor-set" { 1073 description "alternative for the existing neighbor element"; 1074 1075 leaf-list neighbor-info { 1076 description 1077 "neighbor ip address or prefix"; 1078 type inet:ip-address; 1079 } 1080 } 1081 1082 augment "/rpol:routing-policy/rpol:defined-sets/" + 1083 "bgp-pol:bgp-defined-sets/bgp-pol:community-sets/bgp-pol:community-set" { 1084 description "alternative for the existing community-member"; 1085 1086 leaf-list community { 1087 description 1088 "community set member"; 1089 type string; 1090 } 1091 } 1092 1093 augment "/rpol:routing-policy/rpol:defined-sets/" + 1094 "bgp-pol:bgp-defined-sets/bgp-pol:ext-community-sets/bgp-pol:ext-community-set" { 1095 description "alternative for the existing ext-community-member"; 1096 1097 leaf-list ext-community { 1098 type string; 1099 description 1100 "extended community set member"; 1101 } 1102 } 1103 1104 augment "/rpol:routing-policy/rpol:defined-sets/" + 1105 "bgp-pol:bgp-defined-sets" { 1106 container large-community-sets { 1107 list large-community-set { 1108 key "large-community-set-name"; 1109 1110 leaf large-community-set-name { 1111 type string; 1112 } 1113 leaf-list large-community { 1114 type string; 1115 description 1116 "extended community set member"; 1117 } 1118 } 1119 } 1120 } 1121 1122 augment "/rpol:routing-policy/rpol:defined-sets/" + 1123 "bgp-pol:bgp-defined-sets/bgp-pol:as-path-sets/bgp-pol:as-path-set" { 1124 description "alternative for the existing as-path-set-member"; 1125 1126 leaf-list as-path { 1127 type string; 1128 description 1129 "AS path expression"; 1130 } 1131 } 1132 1133 augment "/rpol:routing-policy/rpol:policy-definitions/" + 1134 "rpol:policy-definition/rpol:statements/rpol:statement/" + 1135 "rpol:conditions/bgp-pol:bgp-conditions" { 1136 description "additional rpki condition"; 1137 uses gobgp-rpki-validation-result; 1138 } 1139 1140 deviation "/rpol:routing-policy/rpol:policy-definitions/" + 1141 "rpol:policy-definition/rpol:statements/rpol:statement/" + 1142 "rpol:conditions/bgp-pol:bgp-conditions/bgp-pol:route-type" { 1143 description "alternative route-type condition"; 1144 deviate replace { 1145 type enumeration { 1146 enum NONE { 1147 description "route type is none"; 1148 } 1149 enum INTERNAL { 1150 description "route type is internal"; 1151 } 1152 enum EXTERNAL { 1153 description "route type is external"; 1154 } 1155 enum LOCAL { 1156 description "route type is local"; 1157 } 1158 } 1159 1160 } 1161 } 1162 1163 augment "/rpol:routing-policy/rpol:policy-definitions/" + 1164 "rpol:policy-definition/rpol:statements/rpol:statement/" + 1165 "rpol:conditions/bgp-pol:bgp-conditions" { 1166 container match-large-community-set { 1167 leaf large-community-set { 1168 type string; 1169 } 1170 uses rpol:match-set-options-group; 1171 } 1172 } 1173 1174 augment "/rpol:routing-policy/rpol:policy-definitions/" + 1175 "rpol:policy-definition/rpol:statements/rpol:statement/" + 1176 "rpol:actions/bgp-pol:bgp-actions" { 1177 container set-large-community { 1178 container set-large-community-method { 1179 leaf-list communities { 1180 type string; 1181 } 1182 } 1183 leaf options { 1184 type bgp-pol:bgp-set-community-option-type; 1185 } 1186 } 1187 } 1188 1189 augment "/bgp:bgp" { 1190 description "Additional RPKI configuration and state"; 1191 uses gobgp-rpki-servers; 1192 } 1193 1194 augment "/bgp:bgp" { 1195 description "Additional BMP configuration and state"; 1196 uses gobgp-bmp-servers; 1197 } 1198 1199 augment "/bgp:bgp" { 1200 description "Additional VRF configuration and state"; 1201 uses gobgp-vrfs; 1202 } 1203 1204 typedef mrt-type { 1205 type enumeration { 1206 enum UPDATES { 1207 description "RPKI disabled"; 1208 } 1209 enum TABLE { 1210 description "If the origin AS, prefix, maximum prefix length is 1211 exist in the range of ROA"; 1212 } 1213 } 1214 } 1215 1216 grouping gobgp-mrt-set { 1217 container config { 1218 leaf dump-type { 1219 type mrt-type; 1220 } 1221 leaf file-name { 1222 type string; 1223 description 1224 "Configures a file name to be written"; 1225 } 1226 leaf table-name { 1227 type string; 1228 description 1229 "specify the table name with route server setup"; 1230 } 1231 leaf dump-interval { 1232 type uint64; 1233 } 1234 leaf rotation-interval { 1235 type uint64; 1236 } 1237 } 1238 } 1239 1240 grouping gobgp-mrt { 1241 description "additional mrt configuration"; 1242 container mrt-dump { 1243 list mrt { 1244 key "file-name"; 1245 leaf file-name { 1246 type leafref { 1247 path "../config/file-name"; 1248 } 1249 } 1250 uses gobgp-mrt-set; 1251 } 1252 } 1253 } 1254 1255 augment "/bgp:bgp" { 1256 description "additional mrt configuration"; 1257 uses gobgp-mrt; 1258 } 1259 1260 grouping zebra-config { 1261 leaf enabled { 1262 type boolean; 1263 description 1264 "Configure enabling to connect to zebra."; 1265 } 1266 leaf url { 1267 type string; 1268 description 1269 "Configure url for zebra."; 1270 } 1271 leaf-list redistribute-route-type { 1272 type string; 1273 } 1274 leaf version { 1275 type uint8; 1276 description 1277 "Configure version of zebra protocol. Default is 2. 1278 Supported version are 2 or 3 for Quagga and 4, 5 or 6 for FRRouting."; 1279 } 1280 leaf nexthop-trigger-enable { 1281 type boolean; 1282 } 1283 leaf nexthop-trigger-delay { 1284 type uint8; 1285 } 1286 leaf mpls-label-range-size { 1287 type uint32; 1288 description 1289 "Configure MPLS label range size which will be requested to 1290 FRR/Zebra."; 1291 } 1292 leaf software-name { 1293 type string; 1294 description 1295 "Configure zebra software name. 1296 frr4, cumulus, frr6, frr7, frr7.2, frr7.3, frr7.4, frr7.5, frr8, frr8.1 can be used."; 1297 } 1298 } 1299 1300 grouping zebra-set { 1301 container zebra { 1302 container config { 1303 uses zebra-config; 1304 } 1305 container state { 1306 uses zebra-config; 1307 } 1308 } 1309 } 1310 1311 augment "/bgp:bgp" { 1312 uses zebra-set; 1313 } 1314 1315 grouping collector-config { 1316 leaf url { 1317 type string; 1318 } 1319 leaf db-name { 1320 type string; 1321 } 1322 leaf table-dump-interval { 1323 type uint64; 1324 } 1325 } 1326 1327 grouping collector-set { 1328 container collector { 1329 container config { 1330 uses collector-config; 1331 } 1332 container state { 1333 uses collector-config; 1334 } 1335 } 1336 } 1337 1338 augment "/bgp:bgp" { 1339 uses collector-set; 1340 } 1341 1342 grouping listen-config { 1343 leaf port { 1344 type int32; 1345 } 1346 leaf-list local-address { 1347 type string; 1348 } 1349 } 1350 1351 augment "/bgp:bgp/bgp:global/bgp:config" { 1352 uses listen-config; 1353 } 1354 1355 augment "/bgp:bgp/bgp:global/bgp:state" { 1356 uses listen-config; 1357 } 1358 1359 grouping dynamic-neighbors { 1360 container dynamic-neighbors { 1361 list dynamic-neighbor { 1362 key "prefix"; 1363 1364 leaf prefix { 1365 type leafref { 1366 path "../config/prefix"; 1367 } 1368 } 1369 1370 container config { 1371 uses bgp-global-dynamic-neighbor-config; 1372 } 1373 1374 container state { 1375 config false; 1376 uses bgp-global-dynamic-neighbor-config; 1377 } 1378 } 1379 } 1380 } 1381 1382 grouping bgp-global-dynamic-neighbor-config { 1383 description "A dynamic neighbor belongs to a peer group. 1384 This configuration structure was taken from the latest openconfig."; 1385 1386 leaf prefix { 1387 type string; 1388 } 1389 leaf peer-group { 1390 type string; 1391 } 1392 } 1393 1394 augment "/bgp:bgp" { 1395 uses dynamic-neighbors; 1396 } 1397 1398 grouping disable-best-path-selection-config { 1399 leaf disable-best-path-selection { 1400 type boolean; 1401 description 1402 "Disables best path selection process."; 1403 } 1404 } 1405 1406 augment "/bgp:bgp/bgp:global/bgp:route-selection-options/bgp:config" { 1407 uses disable-best-path-selection-config; 1408 } 1409 1410 augment "/bgp:bgp/bgp:global/bgp:route-selection-options/bgp:state" { 1411 uses disable-best-path-selection-config; 1412 } 1413 1414 augment "/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi" { 1415 uses bgp-mp:all-afi-safi-common; 1416 } 1417 1418 grouping route-target-membership-config { 1419 leaf deferral-time { 1420 type uint16; 1421 } 1422 } 1423 1424 grouping afi-safi-state { 1425 leaf family { 1426 description 1427 "Address family value of AFI-SAFI pair translated from afi-safi-name."; 1428 type route-family; 1429 } 1430 } 1431 1432 augment "/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:state" { 1433 uses afi-safi-state; 1434 } 1435 1436 augment "/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi" { 1437 container route-target-membership { 1438 container config { 1439 uses route-target-membership-config; 1440 } 1441 container state { 1442 uses route-target-membership-config; 1443 } 1444 } 1445 1446 uses long-lived-graceful-restart; 1447 } 1448 1449 augment "/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi" { 1450 container add-paths { 1451 description 1452 "add-paths configuration options related to a particular AFI-SAFI."; 1453 container config { 1454 uses bgp:bgp-neighbor-add-paths_config; 1455 } 1456 container state { 1457 uses bgp:bgp-neighbor-add-paths_config; 1458 } 1459 } 1460 } 1461 }