blob: 2007f96219850aa634ab9c48b1e6073b451cff9c [file] [log] [blame]
Scott Bakerc9d3d842021-09-17 11:32:53 -07001// SPDX-FileCopyrightText: 2021 Open Networking Foundation
2//
Sean Condon160ec1d2022-02-08 12:58:25 +00003// SPDX-License-Identifier: Apache-2.0
Scott Bakerc9d3d842021-09-17 11:32:53 -07004
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 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000024 description "The typedef for service-rule-id";
Scott Bakerc9d3d842021-09-17 11:32:53 -070025 }
26
27 container service-rule {
28 description "The top level container";
29
30 list service-rule {
31 key "id";
32 description
33 "List of service rules";
34
35 leaf id {
36 type service-rule-id;
37 description "ID for this service.";
38 }
39
40 leaf display-name {
41 type string {
42 length 1..80;
43 }
44 description "display name to use in GUI or CLI";
45 }
46
47 leaf charging-rule-name {
48 type string {
49 length 1..80;
50 }
51 description "name of charging rule";
52 }
53
54 container qos {
55 leaf qci {
56 type uint32 {
57 range 0..85;
58 }
59 default 9;
60 description
61 "QoS Class Identifier";
62 }
63
64 container arp {
65 leaf priority {
66 type uint32 {
67 range 0..15;
PUSHP RAJba2e32f2021-11-02 10:39:24 +000068 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070069 default 0;
70 description
71 "Priority";
PUSHP RAJba2e32f2021-11-02 10:39:24 +000072 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070073 leaf preemption-capability {
74 type boolean;
75 default true;
76 description
77 "True if a bearer with lower priority should be dropped";
78 }
79 leaf preemption-vulnerability {
80 type boolean;
81 default true;
82 description
83 "This bearer may be dropped for a bearer with higher priority";
84 }
85 description "Evolved-ARP";
86 }
87
88 container maximum-requested-bandwidth {
89 leaf uplink {
90 type uint32 {
91 range 0..4294967295;
92 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070093 units bps;
PUSHP RAJba2e32f2021-11-02 10:39:24 +000094 default 0;
Scott Bakerc9d3d842021-09-17 11:32:53 -070095 description
96 "Upstream maximum requested bandwidth";
97 }
98 leaf downlink {
99 type uint32 {
100 range 0..4294967295;
101 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700102 units bps;
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000103 default 0;
Scott Bakerc9d3d842021-09-17 11:32:53 -0700104 description
105 "Downstream maximum requested bandwidth";
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000106 }
107 description "The container for maximum-requested-bandwidth";
Scott Bakerc9d3d842021-09-17 11:32:53 -0700108 }
109
110 container guaranteed-bitrate {
111 leaf uplink {
112 type uint32 {
113 range 0..4294967295;
114 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700115 units bps;
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000116 default 0;
Scott Bakerc9d3d842021-09-17 11:32:53 -0700117 description
118 "Upstream guaranteed bitrate";
119 }
120 leaf downlink {
121 type uint32 {
122 range 0..4294967295;
123 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700124 units bps;
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000125 default 0;
Scott Bakerc9d3d842021-09-17 11:32:53 -0700126 description
127 "Downstream guaranteed bitrate";
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000128 }
129 description "The container for guaranteed-bitrate";
Scott Bakerc9d3d842021-09-17 11:32:53 -0700130 }
131
132 container aggregate-maximum-bitrate {
133 leaf uplink {
134 type uint32 {
135 range 0..4294967295;
136 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700137 units bps;
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000138 default 0;
Scott Bakerc9d3d842021-09-17 11:32:53 -0700139 description
140 "Upstream aggregate maximum bitrate";
141 }
142 leaf downlink {
143 type uint32 {
144 range 0..4294967295;
145 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700146 units bps;
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000147 default 0;
Scott Bakerc9d3d842021-09-17 11:32:53 -0700148 description
149 "Downstream aggregate maximum bitrate";
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000150 }
151 description "The container for aggregate-maximum-bitrate";
Scott Bakerc9d3d842021-09-17 11:32:53 -0700152 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000153 description "The container for qos";
Scott Bakerc9d3d842021-09-17 11:32:53 -0700154 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000155
Scott Bakerc9d3d842021-09-17 11:32:53 -0700156 container flow {
157 leaf specification {
158 type string {
159 length 1..1024;
160 }
161 description "specification of this flow";
162 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000163 description "The container for flow";
Scott Bakerc9d3d842021-09-17 11:32:53 -0700164 }
165
166 leaf description {
167 type string {
168 length 1..100;
169 }
170 description "description of this rule";
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000171 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700172 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000173 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700174}