Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [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 | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 4 | |
| 5 | module service-policy { |
| 6 | namespace "http://opennetworking.org/aether/service-policy"; |
| 7 | prefix serv; |
| 8 | |
| 9 | import service-rule { prefix sr; } |
| 10 | |
| 11 | organization "Open Networking Foundation."; |
| 12 | contact "Scott Baker"; |
| 13 | description "To generate JSON from this use command |
| 14 | pyang -f jtoxx test1.yang | python3 -m json.tool > test1.json |
| 15 | Copied from YangUIComponents project"; |
| 16 | |
| 17 | revision "2021-03-04" { |
| 18 | description "An Aether Service"; |
| 19 | reference "RFC 6087"; |
| 20 | } |
| 21 | |
| 22 | typedef service-policy-id { |
| 23 | type string { |
| 24 | length 1..32; |
| 25 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 26 | description "The typedef for service-policy-id"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | container service-policy { |
| 30 | description "The top level container"; |
| 31 | |
| 32 | list service-policy { |
| 33 | key "id"; |
| 34 | description |
| 35 | "List of services"; |
| 36 | |
| 37 | leaf id { |
| 38 | type service-policy-id; |
| 39 | description "ID for this service."; |
| 40 | } |
| 41 | |
| 42 | leaf display-name { |
| 43 | type string { |
| 44 | length 1..80; |
| 45 | } |
| 46 | description "display name to use in GUI or CLI"; |
| 47 | } |
| 48 | |
| 49 | leaf qci { |
| 50 | type uint32 { |
| 51 | range 0..85; |
| 52 | } |
| 53 | default 9; |
| 54 | description |
| 55 | "QoS Class Identifier"; |
| 56 | } |
| 57 | |
| 58 | leaf arp { |
| 59 | type uint32 { |
| 60 | range 0..15; |
| 61 | } |
| 62 | default 9; |
| 63 | description |
| 64 | "Evolved-ARP"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 65 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 66 | |
| 67 | container ambr { |
| 68 | leaf uplink { |
| 69 | type uint32 { |
| 70 | range 0..4294967295; |
| 71 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 72 | units bps; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 73 | default 0; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 74 | description |
| 75 | "Upstream aggregate maximum bit rate"; |
| 76 | } |
| 77 | leaf downlink { |
| 78 | type uint32 { |
| 79 | range 0..4294967295; |
| 80 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 81 | units bps; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 82 | default 0; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 83 | description |
| 84 | "Downstream aggregate maximum bit rate"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 85 | } |
| 86 | description "The container for ambr"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 87 | } |
| 88 | |
| 89 | list rules { |
| 90 | key "rule"; |
| 91 | leaf rule { |
| 92 | type leafref { |
| 93 | path "/sr:service-rule/sr:service-rule/sr:id"; |
| 94 | } |
| 95 | description |
| 96 | "Link to service rule"; |
| 97 | } |
| 98 | leaf enabled { |
| 99 | type boolean; |
| 100 | default true; |
| 101 | description |
| 102 | "Enable or disable this service to use this rule"; |
| 103 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 104 | description "The list for rules"; |
| 105 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 106 | |
| 107 | leaf description { |
| 108 | type string { |
| 109 | length 1..100; |
| 110 | } |
| 111 | description "description of this profile"; |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 112 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 113 | } |
PUSHP RAJ | ba2e32f | 2021-11-02 10:39:24 +0000 | [diff] [blame] | 114 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 115 | } |