Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2021 Open Networking Foundation |
| 2 | // |
Sean Condon | 160ec1d | 2022-02-08 12:58:25 +0000 | [diff] [blame] | 3 | // SPDX-License-Identifier: Apache-2.0 |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 4 | |
| 5 | submodule onf-priority-traffic-rule { |
| 6 | belongs-to onf-enterprise { prefix ent; } |
| 7 | |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 8 | 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 Baker | 40a7956 | 2022-02-16 15:04:50 -0800 | [diff] [blame^] | 25 | type at:aether-identifier; |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 26 | 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 Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 33 | key "priority-traffic-rule-id"; |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 34 | unique "device endpoint"; |
| 35 | description |
| 36 | "List of priority traffic rules"; |
| 37 | |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 38 | leaf priority-traffic-rule-id { |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 39 | type priority-traffic-rule-id; |
| 40 | description "ID for this priority traffic class."; |
| 41 | } |
| 42 | |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 43 | uses at:desc-display-name; |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 44 | |
| 45 | leaf device { |
| 46 | type leafref { |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 47 | path "../../../device/device-id"; |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 48 | } |
| 49 | mandatory true; |
| 50 | description |
| 51 | "Link to device"; |
| 52 | } |
| 53 | |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 54 | leaf application { |
| 55 | type leafref { |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 56 | path "../../../../application/application-id"; |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 57 | } |
| 58 | mandatory true; |
| 59 | description |
| 60 | "Link to application"; |
| 61 | } |
| 62 | |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 63 | leaf endpoint { |
| 64 | type leafref { |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 65 | path "../../../../application/endpoint/endpoint-id"; |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 66 | } |
| 67 | mandatory true; |
| 68 | description |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 69 | "Link to endpoint in application"; |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 70 | } |
| 71 | |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 72 | 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 Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 79 | } |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 80 | case gbr-case { |
| 81 | container gbr { |
| 82 | description "Per-Device per-Application GBR (Guaranteed BitRate) in bps"; |
| 83 | uses bitrate; |
| 84 | } |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 85 | } |
| 86 | } |
| 87 | |
| 88 | leaf traffic-class { |
| 89 | type leafref { |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 90 | path "../../../../traffic-class/traffic-class-id"; |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 91 | } |
| 92 | description |
| 93 | "Link to traffic class"; |
| 94 | } |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 95 | } |
| 96 | } |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 97 | |
| 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 Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 112 | } |