Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2021 Open Networking Foundation |
| 2 | // |
| 3 | // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 4 | |
| 5 | submodule 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 | |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 62 | leaf application { |
| 63 | type leafref { |
| 64 | path "../../../application/app-id"; |
| 65 | } |
| 66 | mandatory true; |
| 67 | description |
| 68 | "Link to application"; |
| 69 | } |
| 70 | |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 71 | leaf endpoint { |
| 72 | type leafref { |
| 73 | path "../../../application/endpoint/endpoint-id"; |
| 74 | } |
| 75 | mandatory true; |
| 76 | description |
Sean Condon | 24297da | 2022-01-27 09:50:34 +0000 | [diff] [blame] | 77 | "Link to endpoint in application"; |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 78 | } |
| 79 | |
| 80 | container mbr { |
| 81 | description "Maximum bitrate"; |
| 82 | leaf uplink { |
| 83 | type at:bitrate; |
| 84 | units bps; |
| 85 | description "Per-Device per-Application MBR uplink data rate in bps"; |
| 86 | } |
| 87 | |
| 88 | leaf downlink { |
| 89 | type at:bitrate; |
| 90 | units bps; |
| 91 | description "Per-Device per application MBR downlink data rate in bps"; |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | container gbr { |
| 96 | description "Guaranteed bitrate"; |
| 97 | leaf uplink { |
| 98 | type at:bitrate; |
| 99 | units bps; |
| 100 | description "Per-Device per-Application GBR uplink data rate in bps"; |
| 101 | } |
| 102 | |
| 103 | leaf downlink { |
| 104 | type at:bitrate; |
| 105 | units bps; |
| 106 | description "Per-Device per application GBR downlink data rate in bps"; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | leaf traffic-class { |
| 111 | type leafref { |
| 112 | path "../../../traffic-class/tc-id"; |
| 113 | } |
| 114 | description |
| 115 | "Link to traffic class"; |
| 116 | } |
| 117 | |
| 118 | leaf description { |
| 119 | type at:description; |
| 120 | description "description of this priority traffic rule"; |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | } |