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 onf-vcs { |
| 6 | namespace "http://opennetworking.org/aether/vcs"; |
| 7 | prefix sl; |
| 8 | |
| 9 | import ietf-yang-types{ prefix yg; } |
| 10 | import onf-aether-types{ prefix at; } |
| 11 | import onf-application{ prefix app; } |
| 12 | import onf-device-group{ prefix dg; } |
| 13 | import onf-enterprise{ prefix ent; } |
| 14 | import onf-template{ prefix vt; } |
| 15 | import onf-traffic-class{ prefix tc; } |
| 16 | import onf-upf { prefix upf; } |
| 17 | |
| 18 | organization "Open Networking Foundation."; |
| 19 | contact "Scott Baker"; |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 20 | description |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 21 | "An Aether Virtual Cellular Service (VCS) is |
| 22 | used to connect devices with applications"; |
| 23 | |
| 24 | revision "2021-09-10" { |
| 25 | description "An Aether Virtual Cellular Service"; |
| 26 | reference "RFC 6087"; |
| 27 | } |
| 28 | |
| 29 | typedef vcs-id { |
| 30 | type yg:yang-identifier { |
| 31 | length 1..32; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | container vcs { |
| 36 | description "The top level container"; |
| 37 | |
| 38 | list vcs { |
| 39 | key "id"; |
| 40 | description |
| 41 | "List of virtual cellular services"; |
| 42 | |
| 43 | leaf id { |
| 44 | type vcs-id; |
| 45 | description "ID for this vcs."; |
| 46 | } |
| 47 | |
| 48 | leaf display-name { |
| 49 | type string { |
| 50 | length 1..80; |
| 51 | } |
| 52 | description "display name to use in GUI or CLI"; |
| 53 | } |
| 54 | |
| 55 | list device-group { |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 56 | key "device-group"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 57 | leaf device-group { |
| 58 | type leafref { |
| 59 | path "/dg:device-group/dg:device-group/dg:id"; |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 60 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 61 | description |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 62 | "Link to device group"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 63 | } |
| 64 | leaf enable { |
| 65 | type boolean; |
| 66 | default true; |
| 67 | description |
| 68 | "Enable this device group"; |
| 69 | } |
| 70 | description |
| 71 | "A list of device groups. Groups will only participate in |
| 72 | the VCS if the enable field is set to True"; |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 73 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 74 | |
| 75 | leaf template { |
| 76 | type leafref { |
| 77 | path "/vt:template/vt:template/vt:id"; |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 78 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 79 | description |
| 80 | "Link to user vcs template that was used to initialize |
| 81 | this VCS"; |
| 82 | } |
| 83 | |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 84 | list filter { |
| 85 | key "application"; |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 86 | leaf application { |
| 87 | type leafref { |
| 88 | path "/app:application/app:application/app:id"; |
| 89 | } |
| 90 | mandatory true; |
| 91 | description |
| 92 | "Link to application"; |
| 93 | } |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 94 | leaf priority { |
| 95 | type uint8; |
| 96 | default 0; |
| 97 | description |
| 98 | "Priority of this application"; |
| 99 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 100 | leaf allow { |
| 101 | type boolean; |
| 102 | default true; |
| 103 | description |
| 104 | "Allow or deny this application"; |
| 105 | } |
| 106 | description |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 107 | "A list of applications to allow and/or deny. Rules are executed in |
| 108 | priority order. The first rule to match will determine the fate |
| 109 | of the packet."; |
| 110 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 111 | |
| 112 | leaf upf { |
| 113 | type leafref { |
| 114 | path "/upf:upf/upf:upf/upf:id"; |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 115 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 116 | description |
| 117 | "Link to user plane that implements this vcf"; |
| 118 | } |
| 119 | |
| 120 | leaf description { |
| 121 | type at:description; |
| 122 | description "description of this vcs"; |
| 123 | } |
| 124 | |
| 125 | leaf enterprise { |
| 126 | type leafref { |
| 127 | path "/ent:enterprise/ent:enterprise/ent:id"; |
| 128 | } |
| 129 | mandatory true; |
| 130 | description |
| 131 | "Link to enterprise that owns this VCS"; |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 132 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 133 | |
| 134 | // the following are populated from the template |
| 135 | leaf sst { |
| 136 | type at:sst; |
| 137 | mandatory true; |
| 138 | description "Slice/Service type. Immutable."; |
| 139 | } |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 140 | |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 141 | leaf sd { |
| 142 | type at:sd; |
| 143 | mandatory true; |
| 144 | description "Slice differentiator. Immutable."; |
| 145 | } |
| 146 | |
Scott Baker | cd27641 | 2021-10-13 14:31:24 -0700 | [diff] [blame] | 147 | // This is deprecated. Per-device QOS is moving |
| 148 | // to DG. |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 149 | container device { |
| 150 | description "Per-device QOS Settings"; |
| 151 | container mbr { |
| 152 | description "Maximum bitrate"; |
| 153 | leaf uplink { |
| 154 | type at:bitrate; |
| 155 | units bps; |
| 156 | description "Per-device mbr uplink data rate in mbps"; |
| 157 | } |
| 158 | |
| 159 | leaf downlink { |
| 160 | type at:bitrate; |
| 161 | units bps; |
| 162 | description "Per-device mbr downlink data rate in mbps"; |
| 163 | } |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | container slice { |
| 168 | description "Per-Slice QOS Settings"; |
| 169 | container mbr { |
| 170 | description "Maximum bitrate"; |
| 171 | leaf uplink { |
| 172 | type at:bitrate; |
| 173 | units bps; |
| 174 | description "Per-Slice mbr uplink data rate in mbps"; |
| 175 | } |
| 176 | |
| 177 | leaf downlink { |
| 178 | type at:bitrate; |
| 179 | units bps; |
| 180 | description "Per-Slice mbr downlink data rate in mbps"; |
| 181 | } |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | leaf traffic-class { |
| 186 | type leafref { |
| 187 | path "/tc:traffic-class/tc:traffic-class/tc:id"; |
| 188 | } |
| 189 | mandatory true; |
| 190 | description |
| 191 | "Link to traffic class"; |
| 192 | } |
| 193 | // end of items populated from the template |
| 194 | } |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 195 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 196 | } |