]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-pim-rp.yang
Merge pull request #6262 from qlyoung/remove-sprintf
[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 revision 2017-03-09 {
35 description
36 "Initial revision.";
37 reference
38 "RFC XXXX: A YANG Data Model for PIM RP";
39 }
40
41 typedef ipv4-multicast-group-address-prefix {
42 type inet:ipv4-prefix{
43 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])))';
44 }
45 description
46 "This type represents an IPv4 multicast group prefix,
47 which is in the range from 224.0.0.0 to 239.255.255.255.";
48 }
49
50 typedef ipv6-multicast-group-address-prefix {
51 type inet:ipv6-prefix {
52 pattern
53 '(((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])))';
54 pattern
55 '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(/.+)';
56 }
57 description
58 "This type represents an IPv6 multicast group prefix,
59 which is in the range of FF00::/8.";
60 }
61
62 typedef ip-multicast-group-address-prefix {
63 description "The IP-Multicast-Group-Address-Prefix type represents an IP multicast address
64 prefix and is IP version neutral. The format of the textual representations implies the IP
65 version. It includes a prefix-length, separated by a '/' sign.";
66 type union {
67 type ipv4-multicast-group-address-prefix;
68 type ipv6-multicast-group-address-prefix;
69 }
70 } // typedef ip-multicast-group-address-prefix
71
72 typedef plist-ref {
73 type string;
74 }
75
76 /*
77 * Groupings
78 */
79 grouping static-rp-container {
80 description
81 "Grouping of static RP container.";
82
83 container static-rp {
84 description
85 "Containing static RP attributes.";
86
87 list rp-list {
88 key "rp-address";
89 description
90 "A list of RP addresses.";
91
92 leaf rp-address {
93 type inet:ip-address;
94 description
95 "Specifies a static RP address.";
96 }
97
98 choice group-list-or-prefix-list {
99 description "Use group-list or prefix-list";
100 case group-list {
101 leaf-list group-list{
102 type ip-multicast-group-address-prefix;
103 description
104 "List of multicast group address.";
105 }
106 }
107 case prefix-list {
108 leaf prefix-list {
109 type plist-ref;
110 description
111 "Group prefix-list filter";
112 }
113 }
114 }
115 }
116 } // static-rp
117 } // static-rp-container
118
119 /*
120 * Configuration data nodes
121 */
122 augment "/frr-rt:routing/frr-rt:control-plane-protocols/"
123 + "frr-rt:control-plane-protocol/frr-pim:pim/"
124 + "frr-pim:address-family" {
125 description "PIM RP augmentation.";
126
127 container rp {
128 description
129 "PIM RP configuration data.";
130 uses static-rp-container;
131 } // rp
132 } // augment
133 }