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