]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-staticd.yang
yang: add SPDX License IDs
[mirror_frr.git] / yang / frr-staticd.yang
1 // SPDX-License-Identifier: BSD-2-Clause
2 module frr-staticd {
3 yang-version 1.1;
4 namespace "http://frrouting.org/yang/staticd";
5 prefix frr-staticd;
6
7 import frr-routing {
8 prefix frr-rt;
9 }
10
11 import frr-nexthop {
12 prefix frr-nexthop;
13 }
14
15 import ietf-inet-types {
16 prefix inet;
17 }
18
19 import frr-bfdd {
20 prefix frr-bfdd;
21 }
22
23 organization
24 "FRRouting";
25 contact
26 "FRR Users List: <mailto:frog@lists.frrouting.org>
27 FRR Development List: <mailto:dev@lists.frrouting.org>";
28 description
29 "This module defines a model for managing FRR staticd information.
30 This YANG module augments the ietf-routing with additional
31 nexthop information
32
33 Copyright 2020 FRRouting
34
35 Redistribution and use in source and binary forms, with or without
36 modification, are permitted provided that the following conditions
37 are met:
38
39 1. Redistributions of source code must retain the above copyright notice,
40 this list of conditions and the following disclaimer.
41
42 2. Redistributions in binary form must reproduce the above copyright
43 notice, this list of conditions and the following disclaimer in the
44 documentation and/or other materials provided with the distribution.
45
46 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
47 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
48 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
49 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
50 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
51 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
52 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
53 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
54 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
55 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
56 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
57
58 revision 2019-12-03 {
59 description
60 "Initial revision.";
61 }
62
63 identity staticd {
64 base frr-rt:routing-protocol;
65 description
66 "'Staticd' routing pseudo-protocol.";
67 }
68
69 grouping staticd-prefix-attributes {
70 list path-list {
71 key "table-id distance";
72 leaf table-id {
73 type uint32;
74 description
75 "Table-id";
76 }
77
78 leaf distance {
79 type frr-rt:administrative-distance;
80 description
81 "Admin distance associated with this route.";
82 }
83
84 leaf tag {
85 type uint32;
86 default "0";
87 description
88 "Route tag";
89 }
90
91 uses frr-nexthop:frr-nexthop;
92 }
93 }
94
95 augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol" {
96 container staticd {
97 when "../frr-rt:type = 'frr-staticd:staticd'" {
98 description
99 "This container is only valid for the 'staticd' routing
100 protocol.";
101 }
102 description
103 "Support for a 'staticd' pseudo-protocol instance
104 consists of a list of routes.";
105 list route-list {
106 key "prefix afi-safi";
107 description
108 "List of staticd IP routes.";
109 leaf prefix {
110 type inet:ip-prefix;
111 description
112 "IP prefix.";
113 }
114 leaf afi-safi {
115 type identityref {
116 base frr-rt:afi-safi-type;
117 }
118 description
119 "AFI-SAFI type.";
120 }
121
122 uses staticd-prefix-attributes {
123 augment "path-list/frr-nexthops/nexthop" {
124 container bfd-monitoring {
125 description "BFD monitoring options.";
126 presence
127 "Present if BFD configuration is available.";
128
129 when "../nh-type = 'ip4' or ../nh-type = 'ip4-ifindex' or
130 ../nh-type = 'ip6' or ../nh-type = 'ip6-ifindex'";
131 uses frr-bfdd:bfd-monitoring;
132 }
133 }
134 }
135
136 list src-list {
137 key "src-prefix";
138 leaf src-prefix {
139 type inet:ipv6-prefix;
140 description
141 "IPv6 source prefix";
142 }
143
144 uses staticd-prefix-attributes;
145 }
146 }
147 }
148 }
149 }