blob: 68f862ce4f44536bf11ea6f56666bce35f6df36f [file] [log] [blame]
Scott Baker4fb4ba92022-01-14 13:52:01 -08001// SPDX-FileCopyrightText: 2021 Open Networking Foundation
2//
3// SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
4
5submodule onf-priority-traffic-rule {
6 belongs-to onf-enterprise { prefix ent; }
7
8 import ietf-yang-types{ prefix yg; }
9 import onf-aether-types{ prefix at; }
10 include onf-device;
11 include onf-traffic-class;
12 include onf-application;
13
14 organization "Open Networking Foundation.";
15 contact "Scott Baker";
16 description
17 "The aether traffic class associates qos constants
18 with a named class of service";
19
20 revision "2022-01-19" {
21 description "An Aether Priority Traffic Rule";
22 reference "RFC 6087";
23 }
24
25 typedef priority-traffic-rule-id {
26 type yg:yang-identifier {
27 length 1..32;
28 }
29 description "The typedef for priority traffic rule id";
30 }
31
32 grouping priority-traffic-rule {
33 description "The top level container";
34
35 list priority-traffic-rule {
36 key "ptr-id";
37 unique "device endpoint";
38 description
39 "List of priority traffic rules";
40
41 leaf ptr-id {
42 type priority-traffic-rule-id;
43 description "ID for this priority traffic class.";
44 }
45
46 leaf display-name {
47 type string {
48 length 1..80;
49 }
50 description "display name to use in GUI or CLI";
51 }
52
53 leaf device {
54 type leafref {
55 path "../../device/dev-id";
56 }
57 mandatory true;
58 description
59 "Link to device";
60 }
61
62 leaf endpoint {
63 type leafref {
64 path "../../../application/endpoint/endpoint-id";
65 }
66 mandatory true;
67 description
68 "Link to application";
69 }
70
71 container mbr {
72 description "Maximum bitrate";
73 leaf uplink {
74 type at:bitrate;
75 units bps;
76 description "Per-Device per-Application MBR uplink data rate in bps";
77 }
78
79 leaf downlink {
80 type at:bitrate;
81 units bps;
82 description "Per-Device per application MBR downlink data rate in bps";
83 }
84 }
85
86 container gbr {
87 description "Guaranteed bitrate";
88 leaf uplink {
89 type at:bitrate;
90 units bps;
91 description "Per-Device per-Application GBR uplink data rate in bps";
92 }
93
94 leaf downlink {
95 type at:bitrate;
96 units bps;
97 description "Per-Device per application GBR downlink data rate in bps";
98 }
99 }
100
101 leaf traffic-class {
102 type leafref {
103 path "../../../traffic-class/tc-id";
104 }
105 description
106 "Link to traffic class";
107 }
108
109 leaf description {
110 type at:description;
111 description "description of this priority traffic rule";
112 }
113 }
114 }
115}