blob: a0db1586f869c5cf3a2590945c642518f4a6d236 [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-policy {
6 namespace "http://opennetworking.org/aether/service-policy";
7 prefix serv;
8
9 import service-rule { prefix sr; }
10
11 organization "Open Networking Foundation.";
12 contact "Scott Baker";
13 description "To generate JSON from this use command
14 pyang -f jtoxx test1.yang | python3 -m json.tool > test1.json
15 Copied from YangUIComponents project";
16
17 revision "2021-03-04" {
18 description "An Aether Service";
19 reference "RFC 6087";
20 }
21
22 typedef service-policy-id {
23 type string {
24 length 1..32;
25 }
26 }
27
28 container service-policy {
29 description "The top level container";
30
31 list service-policy {
32 key "id";
33 description
34 "List of services";
35
36 leaf id {
37 type service-policy-id;
38 description "ID for this service.";
39 }
40
41 leaf display-name {
42 type string {
43 length 1..80;
44 }
45 description "display name to use in GUI or CLI";
46 }
47
48 leaf qci {
49 type uint32 {
50 range 0..85;
51 }
52 default 9;
53 description
54 "QoS Class Identifier";
55 }
56
57 leaf arp {
58 type uint32 {
59 range 0..15;
60 }
61 default 9;
62 description
63 "Evolved-ARP";
64 }
65
66 container ambr {
67 leaf uplink {
68 type uint32 {
69 range 0..4294967295;
70 }
71 default 0;
72 units bps;
73 description
74 "Upstream aggregate maximum bit rate";
75 }
76 leaf downlink {
77 type uint32 {
78 range 0..4294967295;
79 }
80 default 0;
81 units bps;
82 description
83 "Downstream aggregate maximum bit rate";
84 }
85 }
86
87 list rules {
88 key "rule";
89 leaf rule {
90 type leafref {
91 path "/sr:service-rule/sr:service-rule/sr:id";
92 }
93 description
94 "Link to service rule";
95 }
96 leaf enabled {
97 type boolean;
98 default true;
99 description
100 "Enable or disable this service to use this rule";
101 }
102 }
103
104 leaf description {
105 type string {
106 length 1..100;
107 }
108 description "description of this profile";
109 }
110 }
111 }
112}