| garciadeblas | 5419736 | 2018-11-27 15:30:13 +0100 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * Copyright 2018 CTTC |
| 4 | * Copyright 2018 Telefonica Investigacion y Desarrollo S.A.U. |
| 5 | * |
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | * you may not use this file except in compliance with the License. |
| 8 | * You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | * See the License for the specific language governing permissions and |
| 16 | * limitations under the License. |
| 17 | * |
| 18 | * |
| 19 | */ |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 20 | |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 21 | module nst { |
| 22 | //header information |
| 23 | yang-version 1; |
| 24 | namespace "urn:ietf:params:xml:ns:yang:nfvo:nst"; |
| 25 | prefix "nst"; |
| 26 | |
| 27 | import nsd-base{ |
| 28 | prefix "nsd-base"; |
| 29 | } |
| 30 | |
| 31 | import nsd { |
| 32 | prefix "nsd"; |
| 33 | } |
| 34 | |
| 35 | import instantiation-parameters { |
| 36 | prefix "instantiation-parameters"; |
| 37 | } |
| 38 | |
| 39 | import ietf-inet-types { |
| 40 | prefix "inet"; |
| 41 | } |
| 42 | |
| 43 | //revision history |
| 44 | revision 2018-08-20 { |
| 45 | description "Initial version"; |
| 46 | } |
| 47 | |
| 48 | //typedef definitions |
| 49 | typedef connection-points { |
| 50 | description ""; |
| 51 | type string; |
| 52 | } |
| 53 | |
| 54 | typedef network-slice-type { |
| 55 | type enumeration { |
| 56 | enum eMBB { |
| 57 | description "enhanced Mobile Broadband slice"; |
| 58 | } |
| 59 | enum URLLC { |
| 60 | description "Ultra Reliable Low Latency Communications slice"; |
| 61 | } |
| 62 | enum mMTC { |
| 63 | description "massive Machine Type Communications slice"; |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | typedef resource-type { |
| 69 | type enumeration { |
| 70 | enum delay-critical-GBR { |
| 71 | description "delay critical guaranted bit rate"; |
| 72 | } |
| 73 | enum GBR { |
| 74 | description "guaranted bit rate"; |
| 75 | } |
| 76 | enum non-GBR { |
| 77 | description "NON guaranted bit rate"; |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | grouping nsvld { |
| 83 | description "List of NetSlice Subnet Virtual Link Descriptors."; |
| 84 | |
| 85 | uses nsd-base:vld-common; |
| 86 | |
| garciadeblas | 5419736 | 2018-11-27 15:30:13 +0100 | [diff] [blame] | 87 | list nss-connection-point-ref { |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 88 | description |
| 89 | "A list of references to connection points."; |
| garciadeblas | 5419736 | 2018-11-27 15:30:13 +0100 | [diff] [blame] | 90 | key "nss-ref nsd-connection-point-ref"; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 91 | |
| garciadeblas | 5419736 | 2018-11-27 15:30:13 +0100 | [diff] [blame] | 92 | leaf nss-ref { |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 93 | description "Reference to nsd"; |
| 94 | type leafref { |
| garciadeblas | 5419736 | 2018-11-27 15:30:13 +0100 | [diff] [blame] | 95 | path "/nst:nst/nst:netslice-subnet/nst:id"; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 96 | } |
| 97 | } |
| 98 | |
| 99 | leaf nsd-connection-point-ref { |
| 100 | description "A reference to a connection point name"; |
| 101 | type leafref { |
| 102 | path "/nsd:nsd-catalog/nsd:nsd/nsd:connection-point/nsd:name"; |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | leaf ip-address { |
| 107 | description "IP address of the connection point"; |
| 108 | type inet:ip-address; |
| 109 | } |
| 110 | |
| 111 | } |
| 112 | } // nsvld |
| 113 | |
| 114 | grouping snssai { |
| 115 | description ""; |
| 116 | leaf slice-service-type { |
| 117 | description "Network slice service type "; |
| 118 | type network-slice-type; |
| 119 | mandatory true; |
| 120 | } |
| 121 | leaf slice-differentiator { |
| 122 | description "Network slice differentiator"; |
| 123 | type string; |
| 124 | } |
| 125 | } // snssai |
| 126 | |
| 127 | grouping five-qi { |
| 128 | leaf id{ |
| 129 | description "Quality of service identifier"; |
| 130 | type uint16; |
| 131 | mandatory true; |
| 132 | } |
| 133 | leaf resource-type { |
| 134 | description "Quality of service resource type"; |
| 135 | type resource-type; |
| 136 | } |
| 137 | leaf priority-level { |
| 138 | description "Priority level of the service"; |
| 139 | type uint16; |
| 140 | } |
| 141 | leaf packet-delay-budget { |
| 142 | description "Packet delay budget in miliseconds (ms)"; |
| 143 | type uint16; |
| 144 | } |
| 145 | leaf packet-error-rate { |
| 146 | description "Packet error rate (PER) given in powers of ten"; |
| 147 | type uint16; |
| 148 | } |
| 149 | leaf default-max-data-burst { |
| 150 | description "Maximum data burst given in bytes (B)"; |
| 151 | type uint16; |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | grouping netslice-subnet { |
| 156 | leaf id { |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 157 | description "Identifier or name for the netslice-subnet in NST scope."; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 158 | mandatory true; |
| 159 | type string { |
| 160 | length 1..63; |
| 161 | } |
| 162 | } |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 163 | leaf description { |
| 164 | description "Description of the NSD."; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 165 | type string; |
| 166 | } |
| 167 | leaf is-shared-nss { |
| 168 | description "NSS is shared between NS"; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 169 | type boolean; |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 170 | default false; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 171 | } |
| 172 | leaf nsd-ref { |
| 173 | description "Reference to catalog NSD"; |
| 174 | mandatory true; |
| 175 | type leafref{ |
| 176 | path "/nsd:nsd-catalog/nsd:nsd/nsd:id"; |
| 177 | } |
| 178 | } |
| 179 | container instantiation-parameters { |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 180 | uses instantiation-parameters:ns_params; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 181 | } |
| 182 | |
| 183 | } |
| 184 | |
| 185 | grouping slice-connection-points { |
| 186 | description "List for external connection points. Each NS has one or more external connection |
| 187 | points. As the name implies that external connection points are used for connecting |
| 188 | the NS to other NS or to external networks. Each NS exposes these connection points |
| 189 | to the orchestrator. The orchestrator can construct network service chains by |
| 190 | connecting the connection points between different NS."; |
| 191 | |
| 192 | uses nsd-base:nsd-connection-point-common; |
| 193 | |
| 194 | choice connection { |
| 195 | description "Logical connection of the CP to a NSVLD or to a NSD CP"; |
| 196 | case netslice-vld-ref { |
| 197 | leaf netslice-vld-id-ref { |
| 198 | description "ID reference to a NSVLD in the NS"; |
| 199 | type leafref { |
| 200 | path "../../netslice-vld/id"; |
| 201 | } |
| 202 | |
| 203 | } |
| 204 | } |
| 205 | case nsd-connection-point-ref { |
| 206 | leaf nsd-id-ref { |
| 207 | description "A reference to a nsd."; |
| 208 | type leafref { |
| 209 | path "/nsd:nsd-catalog/nsd:nsd/nsd:id"; |
| 210 | } |
| 211 | } |
| 212 | leaf nsd-connection-point-ref { |
| 213 | description ""; |
| 214 | type leafref { |
| 215 | path "/nsd:nsd-catalog/nsd:nsd/nsd:connection-point/nsd:name"; |
| 216 | } |
| 217 | } |
| 218 | } |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | grouping rsp { |
| 223 | |
| 224 | uses nsd-base:rsp-common; |
| 225 | |
| 226 | list nsd-connection-point-ref { |
| 227 | description |
| 228 | "A list of references to connection points."; |
| 229 | key "nsd-ref"; |
| 230 | |
| 231 | leaf nsd-ref { |
| 232 | description "Reference to member-vnf within constituent-vnfds"; |
| 233 | type leafref { |
| 234 | path "/nsd:nsd-catalog/nsd:nsd/nsd:id"; |
| 235 | } |
| 236 | } |
| 237 | leaf order { |
| 238 | type uint8; |
| 239 | description |
| 240 | "A number that denotes the order of a NSD in a chain"; |
| 241 | } |
| 242 | leaf nsd-connection-point-ref { |
| 243 | type leafref { |
| 244 | path "/nsd:nsd-catalog/nsd:nsd/nsd:connection-point/nsd:name"; |
| 245 | } |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | grouping classifier { |
| 251 | uses nsd-base:classifier-common; |
| 252 | |
| 253 | leaf nsd-ref { |
| 254 | type leafref { |
| 255 | path "/nsd:nsd-catalog/nsd:nsd/nsd:id"; |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | leaf nsd-connection-point-ref { |
| 260 | |
| 261 | type leafref { |
| 262 | path "/nsd:nsd-catalog/nsd:nsd/nsd:connection-point/nsd:name"; |
| 263 | } |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | grouping netslicefgd { |
| 268 | |
| 269 | uses nsd-base:fgd-common; |
| 270 | |
| 271 | list rsp { |
| 272 | description |
| 273 | "List of Rendered Service Paths (RSP)."; |
| 274 | key "id"; |
| 275 | uses rsp; |
| 276 | } |
| 277 | |
| 278 | list classifier { |
| 279 | description |
| 280 | "List of classifier rules."; |
| 281 | key "id"; |
| 282 | uses classifier; |
| 283 | } |
| 284 | } |
| 285 | grouping network-slice{ |
| 286 | leaf id { |
| 287 | mandatory true; |
| 288 | type string; |
| 289 | } |
| 290 | |
| 291 | leaf name { |
| 292 | type string; |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 293 | mandatory true; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 294 | } |
| 295 | |
| 296 | container SNSSAI-identifier { |
| 297 | uses snssai; |
| 298 | } |
| 299 | container quality-of-service { |
| 300 | uses five-qi; |
| 301 | } |
| 302 | list netslice-subnet {//list with multiple network service elements |
| 303 | key "id"; |
| 304 | uses netslice-subnet; |
| 305 | } |
| 306 | list netslice-connection-point { |
| 307 | key "name"; |
| 308 | uses slice-connection-points; |
| 309 | } |
| 310 | list netslice-vld { |
| 311 | key "id"; |
| 312 | uses nsvld; |
| 313 | } |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 314 | list netslicefgd { |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 315 | key "id"; |
| 316 | uses netslicefgd; |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | //containers definitions |
| 321 | list nst { |
| 322 | key "id"; |
| 323 | uses network-slice; |
| 324 | } |
| 325 | } |