]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-pim-rp.yang
Merge pull request #6339 from opensourcerouting/ds-const-redux
[mirror_frr.git] / yang / frr-pim-rp.yang
1 module frr-pim-rp {
2 yang-version "1.1";
3 namespace "http://frrouting.org/yang/pim-rp";
4
5 prefix frr-pim-rp;
6
7 import ietf-inet-types {
8 prefix "inet";
9 }
10
11 import ietf-routing-types {
12 prefix "rt-types";
13 }
14
15 import frr-routing {
16 prefix "frr-rt";
17 }
18
19 import frr-pim {
20 prefix "frr-pim";
21 }
22
23 organization
24 "FRRouting";
25
26 contact
27 "FRR Users List: <mailto:frog@lists.frrouting.org>
28 FRR Development List: <mailto:dev@lists.frrouting.org>";
29
30 description
31 "The module defines a collection of YANG definitions common for
32 all PIM (Protocol Independent Multicast) RP (Rendezvous Point) model.
33
34 Copyright 2020 FRRouting
35
36 Redistribution and use in source and binary forms, with or without
37 modification, are permitted provided that the following conditions
38 are met:
39
40 1. Redistributions of source code must retain the above copyright notice,
41 this list of conditions and the following disclaimer.
42
43 2. Redistributions in binary form must reproduce the above copyright
44 notice, this list of conditions and the following disclaimer in the
45 documentation and/or other materials provided with the distribution.
46
47 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
48 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
49 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
50 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
51 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
52 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
53 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
54 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
55 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
56 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
57 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
58
59 revision 2017-03-09 {
60 description
61 "Initial revision.";
62 reference
63 "RFC XXXX: A YANG Data Model for PIM RP";
64 }
65
66 typedef ipv4-multicast-group-address-prefix {
67 type inet:ipv4-prefix{
68 pattern '(2((2[4-9])|(3[0-9]))\.)(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(/(([4-9])|([1-2][0-9])|(3[0-2])))';
69 }
70 description
71 "This type represents an IPv4 multicast group prefix,
72 which is in the range from 224.0.0.0 to 239.255.255.255.";
73 }
74
75 typedef ipv6-multicast-group-address-prefix {
76 type inet:ipv6-prefix {
77 pattern
78 '(((FF|ff)[0-9a-fA-F]{2}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/((1[6-9])|([2-9][0-9])|(1[0-1][0-9])|(12[0-8])))';
79 pattern
80 '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(/.+)';
81 }
82 description
83 "This type represents an IPv6 multicast group prefix,
84 which is in the range of FF00::/8.";
85 }
86
87 typedef ip-multicast-group-address-prefix {
88 description "The IP-Multicast-Group-Address-Prefix type represents an IP multicast address
89 prefix and is IP version neutral. The format of the textual representations implies the IP
90 version. It includes a prefix-length, separated by a '/' sign.";
91 type union {
92 type ipv4-multicast-group-address-prefix;
93 type ipv6-multicast-group-address-prefix;
94 }
95 } // typedef ip-multicast-group-address-prefix
96
97 typedef plist-ref {
98 type string;
99 }
100
101 /*
102 * Groupings
103 */
104 grouping static-rp-container {
105 description
106 "Grouping of static RP container.";
107
108 container static-rp {
109 description
110 "Containing static RP attributes.";
111
112 list rp-list {
113 key "rp-address";
114 description
115 "A list of RP addresses.";
116
117 leaf rp-address {
118 type inet:ip-address;
119 description
120 "Specifies a static RP address.";
121 }
122
123 choice group-list-or-prefix-list {
124 description "Use group-list or prefix-list";
125 case group-list {
126 leaf-list group-list{
127 type ip-multicast-group-address-prefix;
128 description
129 "List of multicast group address.";
130 }
131 }
132 case prefix-list {
133 leaf prefix-list {
134 type plist-ref;
135 description
136 "Group prefix-list filter";
137 }
138 }
139 }
140 }
141 } // static-rp
142 } // static-rp-container
143
144 /*
145 * Configuration data nodes
146 */
147 augment "/frr-rt:routing/frr-rt:control-plane-protocols/"
148 + "frr-rt:control-plane-protocol/frr-pim:pim/"
149 + "frr-pim:address-family" {
150 description "PIM RP augmentation.";
151
152 container rp {
153 description
154 "PIM RP configuration data.";
155 uses static-rp-container;
156 } // rp
157 } // augment
158 }