Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2021 Open Networking Foundation |
| 2 | // |
| 3 | // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 4 | |
| 5 | module service-rule { |
| 6 | namespace "http://opennetworking.org/aether/service-rule"; |
| 7 | prefix sr; |
| 8 | |
| 9 | organization "Open Networking Foundation."; |
| 10 | contact "Scott Baker"; |
| 11 | description "To generate JSON from this use command |
| 12 | pyang -f jtoxx test1.yang | python3 -m json.tool > test1.json |
| 13 | Copied from YangUIComponents project"; |
| 14 | |
| 15 | revision "2021-03-04" { |
| 16 | description "An Aether Service Rule"; |
| 17 | reference "RFC 6087"; |
| 18 | } |
| 19 | |
| 20 | typedef service-rule-id { |
| 21 | type string { |
| 22 | length 1..32; |
| 23 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 24 | description "The typedef for service-rule-id"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | container service-rule { |
| 28 | description "The top level container"; |
| 29 | |
| 30 | list service-rule { |
| 31 | key "id"; |
| 32 | description |
| 33 | "List of service rules"; |
| 34 | |
| 35 | leaf id { |
| 36 | type service-rule-id; |
| 37 | description "ID for this service."; |
| 38 | } |
| 39 | |
| 40 | leaf display-name { |
| 41 | type string { |
| 42 | length 1..80; |
| 43 | } |
| 44 | description "display name to use in GUI or CLI"; |
| 45 | } |
| 46 | |
| 47 | leaf charging-rule-name { |
| 48 | type string { |
| 49 | length 1..80; |
| 50 | } |
| 51 | description "name of charging rule"; |
| 52 | } |
| 53 | |
| 54 | container qos { |
| 55 | leaf qci { |
| 56 | type uint32 { |
| 57 | range 0..85; |
| 58 | } |
| 59 | default 9; |
| 60 | description |
| 61 | "QoS Class Identifier"; |
| 62 | } |
| 63 | |
| 64 | container arp { |
| 65 | leaf priority { |
| 66 | type uint32 { |
| 67 | range 0..15; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 68 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 69 | default 0; |
| 70 | description |
| 71 | "Priority"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 72 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 73 | leaf preemption-capability { |
| 74 | type boolean; |
| 75 | default true; |
| 76 | description |
| 77 | "True if a bearer with lower priority should be dropped"; |
| 78 | } |
| 79 | leaf preemption-vulnerability { |
| 80 | type boolean; |
| 81 | default true; |
| 82 | description |
| 83 | "This bearer may be dropped for a bearer with higher priority"; |
| 84 | } |
| 85 | description "Evolved-ARP"; |
| 86 | } |
| 87 | |
| 88 | container maximum-requested-bandwidth { |
| 89 | leaf uplink { |
| 90 | type uint32 { |
| 91 | range 0..4294967295; |
| 92 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 93 | units bps; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 94 | default 0; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 95 | description |
| 96 | "Upstream maximum requested bandwidth"; |
| 97 | } |
| 98 | leaf downlink { |
| 99 | type uint32 { |
| 100 | range 0..4294967295; |
| 101 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 102 | units bps; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 103 | default 0; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 104 | description |
| 105 | "Downstream maximum requested bandwidth"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 106 | } |
| 107 | description "The container for maximum-requested-bandwidth"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | container guaranteed-bitrate { |
| 111 | leaf uplink { |
| 112 | type uint32 { |
| 113 | range 0..4294967295; |
| 114 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 115 | units bps; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 116 | default 0; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 117 | description |
| 118 | "Upstream guaranteed bitrate"; |
| 119 | } |
| 120 | leaf downlink { |
| 121 | type uint32 { |
| 122 | range 0..4294967295; |
| 123 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 124 | units bps; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 125 | default 0; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 126 | description |
| 127 | "Downstream guaranteed bitrate"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 128 | } |
| 129 | description "The container for guaranteed-bitrate"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | container aggregate-maximum-bitrate { |
| 133 | leaf uplink { |
| 134 | type uint32 { |
| 135 | range 0..4294967295; |
| 136 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 137 | units bps; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 138 | default 0; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 139 | description |
| 140 | "Upstream aggregate maximum bitrate"; |
| 141 | } |
| 142 | leaf downlink { |
| 143 | type uint32 { |
| 144 | range 0..4294967295; |
| 145 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 146 | units bps; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 147 | default 0; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 148 | description |
| 149 | "Downstream aggregate maximum bitrate"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 150 | } |
| 151 | description "The container for aggregate-maximum-bitrate"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 152 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 153 | description "The container for qos"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 154 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 155 | |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 156 | container flow { |
| 157 | leaf specification { |
| 158 | type string { |
| 159 | length 1..1024; |
| 160 | } |
| 161 | description "specification of this flow"; |
| 162 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 163 | description "The container for flow"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 164 | } |
| 165 | |
| 166 | leaf description { |
| 167 | type string { |
| 168 | length 1..100; |
| 169 | } |
| 170 | description "description of this rule"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 171 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 172 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 173 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 174 | } |