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