blob: a16940235827f953caf0d0f350f08b3c6bc28383 [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-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 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000026 description "The typedef for service-policy-id";
Scott Bakerc9d3d842021-09-17 11:32:53 -070027 }
28
29 container service-policy {
30 description "The top level container";
31
32 list service-policy {
33 key "id";
34 description
35 "List of services";
36
37 leaf id {
38 type service-policy-id;
39 description "ID for this service.";
40 }
41
42 leaf display-name {
43 type string {
44 length 1..80;
45 }
46 description "display name to use in GUI or CLI";
47 }
48
49 leaf qci {
50 type uint32 {
51 range 0..85;
52 }
53 default 9;
54 description
55 "QoS Class Identifier";
56 }
57
58 leaf arp {
59 type uint32 {
60 range 0..15;
61 }
62 default 9;
63 description
64 "Evolved-ARP";
PUSHP RAJba2e32f2021-11-02 10:39:24 +000065 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070066
67 container ambr {
68 leaf uplink {
69 type uint32 {
70 range 0..4294967295;
71 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070072 units bps;
PUSHP RAJba2e32f2021-11-02 10:39:24 +000073 default 0;
Scott Bakerc9d3d842021-09-17 11:32:53 -070074 description
75 "Upstream aggregate maximum bit rate";
76 }
77 leaf downlink {
78 type uint32 {
79 range 0..4294967295;
80 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000081 units bps;
Scott Bakerc9d3d842021-09-17 11:32:53 -070082 default 0;
Scott Bakerc9d3d842021-09-17 11:32:53 -070083 description
84 "Downstream aggregate maximum bit rate";
PUSHP RAJba2e32f2021-11-02 10:39:24 +000085 }
86 description "The container for ambr";
Scott Bakerc9d3d842021-09-17 11:32:53 -070087 }
88
89 list rules {
90 key "rule";
91 leaf rule {
92 type leafref {
93 path "/sr:service-rule/sr:service-rule/sr:id";
94 }
95 description
96 "Link to service rule";
97 }
98 leaf enabled {
99 type boolean;
100 default true;
101 description
102 "Enable or disable this service to use this rule";
103 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000104 description "The list for rules";
105 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700106
107 leaf description {
108 type string {
109 length 1..100;
110 }
111 description "description of this profile";
112 }
113 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000114 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700115}