blob: 2706eba2dd7cf683adc6eb4f5794bced8b207948 [file] [log] [blame]
Scott Baker4fb4ba92022-01-14 13:52:01 -08001// SPDX-FileCopyrightText: 2021 Open Networking Foundation
2//
Sean Condon160ec1d2022-02-08 12:58:25 +00003// SPDX-License-Identifier: Apache-2.0
Scott Baker4fb4ba92022-01-14 13:52:01 -08004
5submodule onf-priority-traffic-rule {
6 belongs-to onf-enterprise { prefix ent; }
7
Scott Baker4fb4ba92022-01-14 13:52:01 -08008 import onf-aether-types{ prefix at; }
9 include onf-device;
10 include onf-traffic-class;
11 include onf-application;
12
13 organization "Open Networking Foundation.";
14 contact "Scott Baker";
15 description
16 "The aether traffic class associates qos constants
17 with a named class of service";
18
19 revision "2022-01-19" {
20 description "An Aether Priority Traffic Rule";
21 reference "RFC 6087";
22 }
23
24 typedef priority-traffic-rule-id {
Scott Baker40a79562022-02-16 15:04:50 -080025 type at:aether-identifier;
Scott Baker4fb4ba92022-01-14 13:52:01 -080026 description "The typedef for priority traffic rule id";
27 }
28
29 grouping priority-traffic-rule {
30 description "The top level container";
31
32 list priority-traffic-rule {
Sean Condon9f7966e2022-02-03 10:55:06 +000033 key "priority-traffic-rule-id";
Scott Baker4fb4ba92022-01-14 13:52:01 -080034 unique "device endpoint";
35 description
36 "List of priority traffic rules";
37
Sean Condon9f7966e2022-02-03 10:55:06 +000038 leaf priority-traffic-rule-id {
Scott Baker4fb4ba92022-01-14 13:52:01 -080039 type priority-traffic-rule-id;
40 description "ID for this priority traffic class.";
41 }
42
Sean Condon9f7966e2022-02-03 10:55:06 +000043 uses at:desc-display-name;
Scott Baker4fb4ba92022-01-14 13:52:01 -080044
45 leaf device {
46 type leafref {
Sean Condon9f7966e2022-02-03 10:55:06 +000047 path "../../../device/device-id";
Scott Baker4fb4ba92022-01-14 13:52:01 -080048 }
49 mandatory true;
50 description
51 "Link to device";
52 }
53
Sean Condon24297da2022-01-27 09:50:34 +000054 leaf application {
55 type leafref {
Sean Condon9f7966e2022-02-03 10:55:06 +000056 path "../../../../application/application-id";
Sean Condon24297da2022-01-27 09:50:34 +000057 }
58 mandatory true;
59 description
60 "Link to application";
61 }
62
Scott Baker4fb4ba92022-01-14 13:52:01 -080063 leaf endpoint {
64 type leafref {
Sean Condon9f7966e2022-02-03 10:55:06 +000065 path "../../../../application/endpoint/endpoint-id";
Scott Baker4fb4ba92022-01-14 13:52:01 -080066 }
67 mandatory true;
68 description
Sean Condon24297da2022-01-27 09:50:34 +000069 "Link to endpoint in application";
Scott Baker4fb4ba92022-01-14 13:52:01 -080070 }
71
Sean Condon9f7966e2022-02-03 10:55:06 +000072 choice bitrate {
73 description "Either an GBR or an MBR can be specified, but not both";
74 case mbr-case {
75 container mbr {
76 description "Per-Device per-Application MBR (Maximum BitRate) in bps";
77 uses bitrate;
78 }
Scott Baker4fb4ba92022-01-14 13:52:01 -080079 }
Sean Condon9f7966e2022-02-03 10:55:06 +000080 case gbr-case {
81 container gbr {
82 description "Per-Device per-Application GBR (Guaranteed BitRate) in bps";
83 uses bitrate;
84 }
Scott Baker4fb4ba92022-01-14 13:52:01 -080085 }
86 }
87
88 leaf traffic-class {
89 type leafref {
Sean Condon9f7966e2022-02-03 10:55:06 +000090 path "../../../../traffic-class/traffic-class-id";
Scott Baker4fb4ba92022-01-14 13:52:01 -080091 }
92 description
93 "Link to traffic class";
94 }
Scott Baker4fb4ba92022-01-14 13:52:01 -080095 }
96 }
Sean Condon9f7966e2022-02-03 10:55:06 +000097
98 grouping bitrate {
99 description "uplink and downlink leafs for GBR and MBR";
100 leaf uplink {
101 type at:bitrate;
102 units bps;
103 description "Per-Device per-Application uplink data rate in bps";
104 }
105
106 leaf downlink {
107 type at:bitrate;
108 units bps;
109 description "Per-Device per application downlink data rate in bps";
110 }
111 }
Scott Baker4fb4ba92022-01-14 13:52:01 -0800112}