blob: 5dce12745ef7c2be890ab029011f11f3166f217d [file] [log] [blame]
Scott Bakerc9d3d842021-09-17 11:32:53 -07001// SPDX-FileCopyrightText: 2021 Open Networking Foundation
2//
3// SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
4
5module service-rule {
6 namespace "http://opennetworking.org/aether/service-rule";
7 prefix sr;
8
9 organization "Open Networking Foundation.";
10 contact "Scott Baker";
11 description "To generate JSON from this use command
12 pyang -f jtoxx test1.yang | python3 -m json.tool > test1.json
13 Copied from YangUIComponents project";
14
15 revision "2021-03-04" {
16 description "An Aether Service Rule";
17 reference "RFC 6087";
18 }
19
20 typedef service-rule-id {
21 type string {
22 length 1..32;
23 }
24 }
25
26 container service-rule {
27 description "The top level container";
28
29 list service-rule {
30 key "id";
31 description
32 "List of service rules";
33
34 leaf id {
35 type service-rule-id;
36 description "ID for this service.";
37 }
38
39 leaf display-name {
40 type string {
41 length 1..80;
42 }
43 description "display name to use in GUI or CLI";
44 }
45
46 leaf charging-rule-name {
47 type string {
48 length 1..80;
49 }
50 description "name of charging rule";
51 }
52
53 container qos {
54 leaf qci {
55 type uint32 {
56 range 0..85;
57 }
58 default 9;
59 description
60 "QoS Class Identifier";
61 }
62
63 container arp {
64 leaf priority {
65 type uint32 {
66 range 0..15;
67 }
68 default 0;
69 description
70 "Priority";
71 }
72 leaf preemption-capability {
73 type boolean;
74 default true;
75 description
76 "True if a bearer with lower priority should be dropped";
77 }
78 leaf preemption-vulnerability {
79 type boolean;
80 default true;
81 description
82 "This bearer may be dropped for a bearer with higher priority";
83 }
84 description "Evolved-ARP";
85 }
86
87 container maximum-requested-bandwidth {
88 leaf uplink {
89 type uint32 {
90 range 0..4294967295;
91 }
92 default 0;
93 units bps;
94 description
95 "Upstream maximum requested bandwidth";
96 }
97 leaf downlink {
98 type uint32 {
99 range 0..4294967295;
100 }
101 default 0;
102 units bps;
103 description
104 "Downstream maximum requested bandwidth";
105 }
106 }
107
108 container guaranteed-bitrate {
109 leaf uplink {
110 type uint32 {
111 range 0..4294967295;
112 }
113 default 0;
114 units bps;
115 description
116 "Upstream guaranteed bitrate";
117 }
118 leaf downlink {
119 type uint32 {
120 range 0..4294967295;
121 }
122 default 0;
123 units bps;
124 description
125 "Downstream guaranteed bitrate";
126 }
127 }
128
129 container aggregate-maximum-bitrate {
130 leaf uplink {
131 type uint32 {
132 range 0..4294967295;
133 }
134 default 0;
135 units bps;
136 description
137 "Upstream aggregate maximum bitrate";
138 }
139 leaf downlink {
140 type uint32 {
141 range 0..4294967295;
142 }
143 default 0;
144 units bps;
145 description
146 "Downstream aggregate maximum bitrate";
147 }
148 }
149 }
150
151 container flow {
152 leaf specification {
153 type string {
154 length 1..1024;
155 }
156 description "specification of this flow";
157 }
158 }
159
160 leaf description {
161 type string {
162 length 1..100;
163 }
164 description "description of this rule";
165 }
166 }
167 }
168}