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 | |
| 147 | container device { |
| 148 | description "Per-device QOS Settings"; |
| 149 | container mbr { |
| 150 | description "Maximum bitrate"; |
| 151 | leaf uplink { |
| 152 | type at:bitrate; |
| 153 | units bps; |
| 154 | description "Per-device mbr uplink data rate in mbps"; |
| 155 | } |
| 156 | |
| 157 | leaf downlink { |
| 158 | type at:bitrate; |
| 159 | units bps; |
| 160 | description "Per-device mbr downlink data rate in mbps"; |
| 161 | } |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | container slice { |
| 166 | description "Per-Slice QOS Settings"; |
| 167 | container mbr { |
| 168 | description "Maximum bitrate"; |
| 169 | leaf uplink { |
| 170 | type at:bitrate; |
| 171 | units bps; |
| 172 | description "Per-Slice mbr uplink data rate in mbps"; |
| 173 | } |
| 174 | |
| 175 | leaf downlink { |
| 176 | type at:bitrate; |
| 177 | units bps; |
| 178 | description "Per-Slice mbr downlink data rate in mbps"; |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | leaf traffic-class { |
| 184 | type leafref { |
| 185 | path "/tc:traffic-class/tc:traffic-class/tc:id"; |
| 186 | } |
| 187 | mandatory true; |
| 188 | description |
| 189 | "Link to traffic class"; |
| 190 | } |
| 191 | // end of items populated from the template |
| 192 | } |
Scott Baker | 910f406 | 2021-09-22 13:26:23 -0700 | [diff] [blame] | 193 | } |
Scott Baker | c9d3d84 | 2021-09-17 11:32:53 -0700 | [diff] [blame] | 194 | } |