| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * |
| 4 | * Copyright 2017 RIFT.IO Inc |
| 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 | */ |
| 20 | |
| 21 | module vnfd-base |
| 22 | { |
| garciadeblas | c038a8d | 2019-04-03 13:35:27 +0200 | [diff] [blame] | 23 | namespace "urn:etsi:osm:yang:vnfd-base"; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 24 | prefix "vnfd-base"; |
| 25 | |
| 26 | import mano-types { |
| 27 | prefix "manotypes"; |
| 28 | } |
| 29 | |
| 30 | import ietf-inet-types { |
| 31 | prefix "inet"; |
| 32 | } |
| 33 | |
| 34 | revision 2017-02-28 { |
| 35 | description |
| 36 | "Initial revision. This YANG file defines |
| 37 | the common types for Virtual Network Function |
| 38 | (VNF) descriptor"; |
| 39 | reference |
| 40 | "Derived from earlier versions of base YANG files"; |
| 41 | } |
| 42 | |
| 43 | grouping common-connection-point { |
| 44 | leaf name { |
| 45 | description "Name of the connection point"; |
| 46 | type string; |
| 47 | } |
| 48 | |
| 49 | leaf id { |
| 50 | description "Identifier for the internal connection points"; |
| 51 | type string; |
| 52 | } |
| 53 | |
| 54 | leaf short-name { |
| 55 | description "Short name to appear as label in the UI"; |
| 56 | type string; |
| 57 | } |
| 58 | |
| 59 | leaf type { |
| 60 | description "Type of the connection point."; |
| 61 | type manotypes:connection-point-type; |
| 62 | } |
| 63 | |
| 64 | leaf port-security-enabled { |
| garciadeblas | 0ec676d | 2017-12-18 18:22:27 +0100 | [diff] [blame] | 65 | description "Enables the port security for the port."; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 66 | type boolean; |
| tierno | d4f15a7 | 2017-10-14 14:28:30 +0200 | [diff] [blame] | 67 | default true; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 68 | } |
| 69 | } |
| 70 | |
| 71 | typedef interface-type { |
| 72 | type enumeration { |
| 73 | enum INTERNAL; |
| 74 | enum EXTERNAL; |
| 75 | } |
| 76 | } |
| 77 | |
| Adam Israel | fcfb1cb | 2017-10-10 12:12:30 -0400 | [diff] [blame] | 78 | typedef vnf-operational-status { |
| 79 | type enumeration { |
| 80 | enum init; |
| 81 | enum running; |
| 82 | enum upgrading; |
| 83 | enum terminate; |
| 84 | enum terminated; |
| 85 | enum failed; |
| 86 | } |
| 87 | } |
| 88 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 89 | grouping virtual-interface { |
| 90 | container virtual-interface { |
| 91 | description |
| 92 | "Container for the virtual interface properties"; |
| 93 | |
| 94 | leaf type { |
| 95 | description |
| 96 | "Specifies the type of virtual interface |
| 97 | between VM and host. |
| garciadeblas | c0a2049 | 2018-10-11 16:26:04 +0200 | [diff] [blame] | 98 | PARAVIRT : Use the default paravirtualized interface for the VIM (virtio, vmxnet3, etc.). |
| 99 | VIRTIO : Deprecated! Use the traditional VIRTIO interface. |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 100 | PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface. |
| 101 | SR-IOV : Use SR-IOV interface. |
| 102 | E1000 : Emulate E1000 interface. |
| 103 | RTL8139 : Emulate RTL8139 interface. |
| 104 | PCNET : Emulate PCNET interface. |
| garciadeblas | c0a2049 | 2018-10-11 16:26:04 +0200 | [diff] [blame] | 105 | OM-MGMT : Deprecated! Use PARAVIRT instead and set the VNF management interface at vnfd:mgmt-interface:cp"; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 106 | |
| 107 | type enumeration { |
| garciadeblas | c0a2049 | 2018-10-11 16:26:04 +0200 | [diff] [blame] | 108 | enum PARAVIRT; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 109 | enum OM-MGMT; |
| 110 | enum PCI-PASSTHROUGH; |
| 111 | enum SR-IOV; |
| 112 | enum VIRTIO; |
| 113 | enum E1000; |
| 114 | enum RTL8139; |
| 115 | enum PCNET; |
| 116 | } |
| garciadeblas | c0a2049 | 2018-10-11 16:26:04 +0200 | [diff] [blame] | 117 | default "PARAVIRT"; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 118 | } |
| 119 | |
| 120 | leaf vpci { |
| 121 | description |
| 122 | "Specifies the virtual PCI address. Expressed in |
| 123 | the following format dddd:dd:dd.d. For example |
| 124 | 0000:00:12.0. This information can be used to |
| 125 | pass as metadata during the VM creation."; |
| 126 | type string; |
| 127 | } |
| 128 | |
| 129 | leaf bandwidth { |
| 130 | description |
| 131 | "Aggregate bandwidth of the NIC."; |
| 132 | type uint64; |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | grouping vnfd-descriptor { |
| 138 | leaf id { |
| 139 | description "Identifier for the VNFD."; |
| 140 | type string { |
| 141 | length "1..63"; |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | leaf name { |
| 146 | description "VNFD name."; |
| 147 | mandatory true; |
| 148 | type string; |
| 149 | } |
| 150 | |
| 151 | leaf short-name { |
| 152 | description "Short name to appear as label in the UI"; |
| 153 | type string; |
| 154 | } |
| 155 | |
| 156 | leaf vendor { |
| 157 | description "Vendor of the VNFD."; |
| 158 | type string; |
| 159 | } |
| 160 | |
| 161 | leaf logo { |
| 162 | description |
| 163 | "Vendor logo for the Virtual Network Function"; |
| 164 | type string; |
| 165 | } |
| 166 | |
| 167 | leaf description { |
| 168 | description "Description of the VNFD."; |
| 169 | type string; |
| 170 | } |
| 171 | |
| 172 | leaf version { |
| 173 | description "Version of the VNFD"; |
| 174 | type string; |
| 175 | } |
| 176 | |
| Rajesh Velandy | ce30ffe | 2017-09-25 15:15:25 +0000 | [diff] [blame] | 177 | container vnf-configuration { |
| 178 | uses manotypes:vca-configuration; |
| garciadeblas | d13a749 | 2019-10-08 15:55:16 +0200 | [diff] [blame] | 179 | uses manotypes:vca-relations; |
| garciadeblas | c900490 | 2019-05-24 15:56:30 +0200 | [diff] [blame] | 180 | uses manotypes:vca-config-access; |
| Rajesh Velandy | ce30ffe | 2017-09-25 15:15:25 +0000 | [diff] [blame] | 181 | } |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 182 | |
| Adam Israel | fcfb1cb | 2017-10-10 12:12:30 -0400 | [diff] [blame] | 183 | leaf operational-status { |
| 184 | description |
| 185 | "The operational status of the VNF |
| 186 | init : The VNF has just started. |
| 187 | running : The VNF is active in VM |
| 188 | upgrading : The VNF is being upgraded (EXPERIMENTAL) |
| 189 | terminate : The VNF is being terminated |
| 190 | terminated : The VNF is in the terminated state. |
| 191 | failed : The VNF instantiation failed. |
| 192 | "; |
| 193 | type vnf-operational-status; |
| 194 | } |
| 195 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 196 | container mgmt-interface { |
| 197 | description |
| 198 | "Interface over which the VNF is managed."; |
| 199 | |
| 200 | choice endpoint-type { |
| 201 | description |
| 202 | "Indicates the type of management endpoint."; |
| 203 | |
| 204 | case ip { |
| 205 | description |
| 206 | "Specifies the static IP address for managing the VNF."; |
| 207 | leaf ip-address { |
| 208 | type inet:ip-address; |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | case vdu-id { |
| 213 | description |
| 214 | "Use the default management interface on this VDU."; |
| 215 | leaf vdu-id { |
| 216 | type leafref { |
| 217 | path "../../vdu/id"; |
| 218 | } |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | case cp { |
| 223 | description |
| tierno | 19a20de | 2017-11-03 16:29:05 +0100 | [diff] [blame] | 224 | "Use the ip address associated with this connection point. This cp is then considered as management."; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 225 | leaf cp { |
| 226 | type leafref { |
| 227 | path "../../connection-point/name"; |
| 228 | } |
| 229 | } |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | leaf port { |
| 234 | description |
| 235 | "Port for the management interface."; |
| 236 | type inet:port-number; |
| 237 | } |
| 238 | |
| 239 | container dashboard-params { |
| 240 | description "Parameters for the VNF dashboard"; |
| 241 | |
| 242 | leaf path { |
| 243 | description "The HTTP path for the dashboard"; |
| 244 | type string; |
| 245 | } |
| 246 | |
| 247 | leaf https { |
| 248 | description "Pick HTTPS instead of HTTP , Default is false"; |
| 249 | type boolean; |
| 250 | } |
| 251 | |
| 252 | leaf port { |
| 253 | description "The HTTP port for the dashboard"; |
| 254 | type inet:port-number; |
| 255 | } |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | list internal-vld { |
| 260 | key "id"; |
| 261 | description |
| 262 | "List of Internal Virtual Link Descriptors (VLD). |
| 263 | The internal VLD describes the basic topology of |
| 264 | the connectivity such as E-LAN, E-Line, E-Tree. |
| 265 | between internal VNF components of the system."; |
| 266 | |
| 267 | leaf id { |
| 268 | description "Identifier for the VLD"; |
| 269 | type string; |
| 270 | } |
| 271 | |
| 272 | leaf name { |
| 273 | description "Name of the internal VLD"; |
| 274 | type string; |
| 275 | } |
| 276 | |
| 277 | leaf short-name { |
| 278 | description "Short name to appear as label in the UI"; |
| 279 | type string; |
| 280 | } |
| 281 | |
| 282 | leaf description { |
| 283 | type string; |
| 284 | } |
| 285 | |
| 286 | leaf type { |
| 287 | type manotypes:virtual-link-type; |
| 288 | } |
| 289 | |
| 290 | leaf root-bandwidth { |
| 291 | description |
| 292 | "For ELAN this is the aggregate bandwidth."; |
| 293 | type uint64; |
| 294 | } |
| 295 | |
| 296 | leaf leaf-bandwidth { |
| 297 | description |
| 298 | "For ELAN this is the bandwidth of branches."; |
| 299 | type uint64; |
| 300 | } |
| 301 | |
| 302 | list internal-connection-point { |
| 303 | key "id-ref"; |
| 304 | description "List of internal connection points in this VLD"; |
| 305 | leaf id-ref { |
| garciadeblas | 0ec676d | 2017-12-18 18:22:27 +0100 | [diff] [blame] | 306 | description "Reference to the internal connection point id"; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 307 | type leafref { |
| 308 | path "../../../vdu/internal-connection-point/id"; |
| 309 | } |
| 310 | } |
| garciadeblas | 0ec676d | 2017-12-18 18:22:27 +0100 | [diff] [blame] | 311 | |
| garciadeblas | 1edb98c | 2017-12-05 13:47:09 +0100 | [diff] [blame] | 312 | leaf ip-address { |
| 313 | description "IP address of the internal connection point"; |
| 314 | type inet:ip-address; |
| 315 | } |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 316 | } |
| 317 | |
| 318 | uses manotypes:provider-network; |
| 319 | choice init-params { |
| 320 | description "Extra parameters for VLD instantiation"; |
| 321 | |
| 322 | case vim-network-ref { |
| 323 | leaf vim-network-name { |
| 324 | description |
| 325 | "Name of network in VIM account. This is used to indicate |
| 326 | pre-provisioned network name in cloud account."; |
| 327 | type string; |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | case vim-network-profile { |
| 332 | leaf ip-profile-ref { |
| 333 | description "Named reference to IP-profile object"; |
| 334 | type string; |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | uses manotypes:ip-profile-list; |
| 342 | |
| 343 | list connection-point { |
| 344 | key "name"; |
| 345 | description |
| 346 | "List for external connection points. Each VNF has one |
| 347 | or more external connection points that connect the VNF |
| 348 | to other VNFs or to external networks. Each VNF exposes |
| 349 | connection points to the orchestrator, which can construct |
| 350 | network services by connecting the connection points |
| 351 | between different VNFs. The NFVO will use VLDs and VNFFGs |
| 352 | at the network service level to construct network services."; |
| 353 | |
| 354 | uses common-connection-point; |
| garciadeblas | a75e0bb | 2017-12-12 13:33:33 +0100 | [diff] [blame] | 355 | |
| 356 | leaf internal-vld-ref { |
| 357 | description |
| 358 | "Reference to an internal VLD of the VNF. This field is |
| 359 | optional. It allows exposing an internal VLD through a |
| 360 | connection point. When building a NS, this VNF CP might be |
| 361 | connected to a NS VLD, then both VLDs (the i-VLD of the VNF and the |
| 362 | VLD of the NS) will become the same network and the IP profile will |
| 363 | be the one configured at NS level."; |
| 364 | type leafref { |
| 365 | path "../../internal-vld/id"; |
| 366 | } |
| 367 | } |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 368 | } |
| 369 | |
| 370 | list vdu { |
| 371 | description "List of Virtual Deployment Units"; |
| 372 | key "id"; |
| 373 | |
| 374 | leaf id { |
| 375 | description "Unique id for the VDU"; |
| 376 | type string; |
| 377 | } |
| 378 | |
| 379 | leaf name { |
| 380 | description "Unique name for the VDU"; |
| 381 | type string; |
| 382 | } |
| 383 | |
| 384 | leaf description { |
| 385 | description "Description of the VDU."; |
| 386 | type string; |
| 387 | } |
| 388 | |
| garciadeblas | 0ec676d | 2017-12-18 18:22:27 +0100 | [diff] [blame] | 389 | leaf pdu-type { |
| 390 | description |
| 391 | "Type of PDU. If this field exists, the deployment unit must be |
| 392 | understood as a PDU, not as a VDU. This field is used to identify |
| 393 | the category of PDU instances to be used at instantiation time. For |
| 394 | the instantiation to be successful, there must be available |
| 395 | PDU instances of this type in the selected datacenter."; |
| 396 | type string; |
| 397 | } |
| 398 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 399 | leaf count { |
| 400 | description "Number of instances of VDU"; |
| 401 | type uint64; |
| 402 | } |
| 403 | |
| 404 | leaf mgmt-vpci { |
| 405 | description |
| 406 | "Specifies the virtual PCI address. Expressed in |
| 407 | the following format dddd:dd:dd.d. For example |
| 408 | 0000:00:12.0. This information can be used to |
| 409 | pass as metadata during the VM creation."; |
| 410 | type string; |
| 411 | } |
| 412 | |
| 413 | uses manotypes:vm-flavor; |
| 414 | uses manotypes:guest-epa; |
| 415 | uses manotypes:vswitch-epa; |
| 416 | uses manotypes:hypervisor-epa; |
| 417 | uses manotypes:host-epa; |
| 418 | |
| 419 | list alarm { |
| 420 | key "alarm-id"; |
| 421 | |
| Benjamin Diaz | 46dfea5 | 2019-03-20 14:42:53 -0300 | [diff] [blame] | 422 | leaf alarm-id { |
| 423 | description |
| 424 | "This field is reserved for the identifier assigned by the VIM provider"; |
| 425 | |
| 426 | type string; |
| 427 | } |
| 428 | |
| 429 | |
| 430 | leaf vnf-monitoring-param-ref { |
| 431 | description |
| 432 | "Reference to the VNF level monitoring parameter |
| 433 | that is aggregated"; |
| 434 | type leafref { |
| 435 | path "../../monitoring-param/id"; |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | uses manotypes:alarm-properties; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 440 | } |
| 441 | |
| 442 | uses manotypes:image-properties; |
| 443 | |
| garciadeblas | e304a4d | 2017-12-05 12:30:17 +0100 | [diff] [blame] | 444 | list alternative-images { |
| 445 | key "vim-type"; |
| 446 | description |
| 447 | "List of alternative images per VIM type. |
| 448 | Different images can be used for specific types of VIMs instead |
| 449 | of the default image. This allows deployments in sites where the |
| 450 | image identifier in the VIM is given by the VIM provider and |
| 451 | cannot be modified. |
| 452 | If an alternative image is specified for a VIM type, it will prevail |
| 453 | over the default image"; |
| 454 | |
| 455 | leaf vim-type { |
| 456 | description "VIM type: openvim, openstack, vmware, aws, etc."; |
| 457 | type string; |
| 458 | } |
| 459 | |
| 460 | uses manotypes:image-properties; |
| 461 | } |
| 462 | |
| Rajesh Velandy | ce30ffe | 2017-09-25 15:15:25 +0000 | [diff] [blame] | 463 | container vdu-configuration { |
| 464 | uses manotypes:vca-configuration; |
| garciadeblas | c900490 | 2019-05-24 15:56:30 +0200 | [diff] [blame] | 465 | uses manotypes:vca-config-access; |
| Rajesh Velandy | ce30ffe | 2017-09-25 15:15:25 +0000 | [diff] [blame] | 466 | } |
| 467 | |
| garciadeblas | 8efd85e | 2018-04-02 17:29:08 +0200 | [diff] [blame] | 468 | list monitoring-param { |
| 469 | description |
| 470 | "List of VDU-related monitoring parameters at NFVI level"; |
| 471 | key id; |
| 472 | leaf id { |
| 473 | description "The unique id of the monitoring param at VDU level"; |
| 474 | type string; |
| 475 | } |
| 476 | |
| 477 | leaf nfvi-metric { |
| 478 | description "The associated NFVI metric to be monitored"; |
| 479 | type manotypes:nfvi-metric-type; |
| 480 | } |
| 481 | |
| 482 | leaf interface-name-ref { |
| 483 | description |
| 484 | "Reference to a VDU interface name. Applicable only when the nfvi-metric |
| 485 | refers to an interface and not to the VM"; |
| 486 | type leafref { |
| 487 | path "../../interface/name"; |
| 488 | } |
| 489 | } |
| 490 | } |
| 491 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 492 | choice cloud-init-input { |
| 493 | description |
| 494 | "Indicates how the contents of cloud-init script are provided. |
| 495 | There are 2 choices - inline or in a file"; |
| 496 | |
| 497 | case inline { |
| 498 | leaf cloud-init { |
| 499 | description |
| 500 | "Contents of cloud-init script, provided inline, in cloud-config format"; |
| 501 | type string; |
| 502 | } |
| 503 | } |
| 504 | |
| 505 | case filename { |
| 506 | leaf cloud-init-file { |
| 507 | description |
| 508 | "Name of file with contents of cloud-init script in cloud-config format"; |
| 509 | type string; |
| 510 | } |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | uses manotypes:supplemental-boot-data; |
| 515 | |
| 516 | list internal-connection-point { |
| 517 | key "id"; |
| 518 | description |
| 519 | "List for internal connection points. Each VNFC |
| 520 | has zero or more internal connection points. |
| 521 | Internal connection points are used for connecting |
| 522 | the VNF with components internal to the VNF. If a VNF |
| 523 | has only one VNFC, it may not have any internal |
| 524 | connection points."; |
| 525 | |
| 526 | uses common-connection-point; |
| 527 | |
| 528 | leaf internal-vld-ref { |
| 529 | type leafref { |
| 530 | path "../../../internal-vld/id"; |
| 531 | } |
| 532 | } |
| 533 | } |
| 534 | |
| 535 | list interface { |
| 536 | description |
| 537 | "List of Interfaces (external and internal) for the VNF"; |
| 538 | key name; |
| 539 | |
| 540 | leaf name { |
| 541 | description |
| 542 | "Name of the interface. Note that this |
| 543 | name has only local significance to the VDU."; |
| 544 | type string; |
| 545 | } |
| 546 | |
| 547 | leaf position { |
| 548 | description |
| 549 | "Explicit Position of the interface within the list"; |
| 550 | type uint32; |
| 551 | } |
| 552 | |
| garciadeblas | 0f6bb77 | 2018-04-13 00:58:00 +0200 | [diff] [blame] | 553 | leaf mgmt-interface { |
| 554 | description |
| 555 | "Flag to indicate that this is the mgmt interface |
| 556 | to be used for VDU configuration"; |
| 557 | type boolean; |
| 558 | default false; |
| 559 | } |
| 560 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 561 | leaf type { |
| 562 | description |
| 563 | "Type of the Interface"; |
| 564 | type interface-type; |
| 565 | |
| 566 | default "EXTERNAL"; |
| 567 | } |
| 568 | |
| garciadeblas | 98048d2 | 2017-12-05 10:30:26 +0100 | [diff] [blame] | 569 | leaf mac-address { |
| 570 | description |
| garciadeblas | 2320b25 | 2019-10-23 16:56:01 +0200 | [diff] [blame] | 571 | "MAC address of the interface. |
| 572 | Some VNFs require a specific MAC address to be configured |
| 573 | in the interface. While this is not recommended at all in |
| 574 | NFV environments, this parameter exists to allow those |
| 575 | scenarios. |
| 576 | This parameter will be likely deprecated in the future."; |
| garciadeblas | 98048d2 | 2017-12-05 10:30:26 +0100 | [diff] [blame] | 577 | type string; |
| 578 | } |
| 579 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 580 | choice connection-point-type { |
| 581 | case internal { |
| 582 | leaf internal-connection-point-ref { |
| 583 | description |
| garciadeblas | 2320b25 | 2019-10-23 16:56:01 +0200 | [diff] [blame] | 584 | "Leaf Ref to the particular internal connection point"; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 585 | type leafref { |
| garciadeblas | 2320b25 | 2019-10-23 16:56:01 +0200 | [diff] [blame] | 586 | path "../../internal-connection-point/id"; |
| 587 | } |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 588 | } |
| 589 | } |
| 590 | case external { |
| 591 | leaf external-connection-point-ref { |
| 592 | description |
| garciadeblas | 2320b25 | 2019-10-23 16:56:01 +0200 | [diff] [blame] | 593 | "Leaf Ref to the particular external connection point"; |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 594 | type leafref { |
| garciadeblas | 2320b25 | 2019-10-23 16:56:01 +0200 | [diff] [blame] | 595 | path "../../../connection-point/name"; |
| 596 | } |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 597 | } |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | uses virtual-interface; |
| 602 | } |
| 603 | |
| 604 | |
| 605 | list volumes { |
| 606 | key "name"; |
| 607 | |
| 608 | leaf name { |
| 609 | description "Name of the disk-volumes, e.g. vda, vdb etc"; |
| 610 | type string; |
| 611 | } |
| 612 | |
| 613 | uses manotypes:volume-info; |
| 614 | } |
| 615 | } |
| 616 | |
| garciadeblas | 54409a2 | 2019-10-23 16:50:16 +0200 | [diff] [blame] | 617 | list kdu { |
| 618 | description "List of K8s Deployment Units"; |
| 619 | key "name"; |
| 620 | |
| 621 | leaf name { |
| 622 | description "Unique name for the KDU"; |
| 623 | type string; |
| 624 | } |
| 625 | |
| 626 | leaf description { |
| 627 | description "Description of the KDU."; |
| 628 | type string; |
| 629 | } |
| 630 | |
| 631 | container kdu-configuration { |
| 632 | uses manotypes:vca-configuration; |
| 633 | uses manotypes:vca-config-access; |
| 634 | |
| 635 | leaf-list blacklist-config-primitive { |
| 636 | description |
| 637 | "List of blacklisted config primitives from the list of |
| 638 | default kdu config primitives"; |
| 639 | |
| 640 | type enumeration { |
| 641 | enum upgrade; |
| 642 | enum rollback; |
| 643 | } |
| 644 | |
| 645 | } |
| 646 | |
| 647 | } |
| 648 | |
| 649 | choice kdu-model { |
| 650 | description |
| 651 | "Indicates the KDU model, either as a helm-chart or as a juju-bundle."; |
| 652 | |
| 653 | case helm-chart { |
| 654 | leaf helm-chart { |
| 655 | description |
| 656 | "Helm chart that models the KDU, in any of the following ways: |
| 657 | - <helm-repo>/<helm-chart> |
| 658 | - <helm-chart folder under k8s_models folder in the package> |
| 659 | - <helm-chart tgz file (w/ or w/o extension) under k8s_models folder in the package> |
| 660 | - <URL_where_to_fetch_chart> |
| 661 | "; |
| 662 | type string; |
| 663 | } |
| 664 | } |
| 665 | |
| 666 | case juju-bundle { |
| 667 | leaf juju-bundle { |
| 668 | description |
| 669 | "Juju bundle that models the KDU, in any of the following ways: |
| 670 | - <juju-repo>/<juju-bundle> |
| 671 | - <juju-bundle folder under k8s_models folder in the package> |
| 672 | - <juju-bundle tgz file (w/ or w/o extension) under k8s_models folder in the package> |
| 673 | - <URL_where_to_fetch_juju_bundle> |
| 674 | "; |
| 675 | type string; |
| 676 | } |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | } |
| 681 | |
| 682 | container k8s-cluster { |
| 683 | leaf-list version { |
| 684 | description |
| 685 | "List of supported K8s versions. |
| 686 | The cluster where the KDUs will be deployed will have to match |
| 687 | one of these versions."; |
| 688 | |
| 689 | type string; |
| 690 | } |
| 691 | |
| 692 | leaf-list cni { |
| 693 | description |
| 694 | "List of supported CNI plugins. |
| 695 | The cluster where the KDUs will be deployed will have to use |
| 696 | one of these CNI plugins."; |
| 697 | |
| 698 | type enumeration { |
| 699 | enum calico; |
| 700 | enum flannel; |
| 701 | enum multus; |
| 702 | } |
| 703 | } |
| 704 | |
| 705 | list nets { |
| 706 | description |
| 707 | "List of required networks in the K8s cluster. |
| 708 | The cluster where the KDUs will be deployed will have to use |
| 709 | one of these CNI plugins."; |
| 710 | |
| 711 | key "id"; |
| 712 | |
| 713 | leaf id { |
| 714 | description "Internal identifier for the K8s cluster network in this VNF"; |
| 715 | type string; |
| 716 | } |
| 717 | |
| 718 | leaf external-connection-point-ref { |
| 719 | description |
| 720 | "Leaf Ref to the particular external connection point"; |
| 721 | type leafref { |
| 722 | path "../../../connection-point/name"; |
| 723 | } |
| 724 | } |
| 725 | |
| 726 | } |
| 727 | } |
| 728 | |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 729 | list vdu-dependency { |
| 730 | description |
| 731 | "List of VDU dependencies."; |
| 732 | |
| 733 | key vdu-source-ref; |
| 734 | leaf vdu-source-ref { |
| 735 | type leafref { |
| 736 | path "../../vdu/id"; |
| 737 | } |
| 738 | } |
| 739 | |
| 740 | leaf vdu-depends-on-ref { |
| 741 | description |
| 742 | "Reference to the VDU on which |
| 743 | the source VDU depends."; |
| 744 | type leafref { |
| 745 | path "../../vdu/id"; |
| 746 | } |
| 747 | } |
| 748 | } |
| 749 | |
| 750 | leaf service-function-chain { |
| 751 | description "Type of node in Service Function Chaining Architecture"; |
| 752 | |
| 753 | type enumeration { |
| 754 | enum UNAWARE; |
| 755 | enum CLASSIFIER; |
| 756 | enum SF; |
| 757 | enum SFF; |
| 758 | } |
| 759 | default "UNAWARE"; |
| 760 | } |
| 761 | |
| 762 | leaf service-function-type { |
| 763 | description |
| 764 | "Type of Service Function. |
| 765 | NOTE: This needs to map with Service Function Type in ODL to |
| 766 | support VNFFG. Service Function Type is mandatory param in ODL |
| 767 | SFC. This is temporarily set to string for ease of use"; |
| 768 | type string; |
| 769 | } |
| 770 | |
| garciadeblas | 8efd85e | 2018-04-02 17:29:08 +0200 | [diff] [blame] | 771 | uses manotypes:http-endpoints; |
| 772 | |
| 773 | list scaling-group-descriptor { |
| 774 | description |
| 775 | "scaling group descriptor within the VNF. |
| 776 | The scaling group defines a group of VDUs, |
| 777 | and the ratio of VDUs in the VNF |
| 778 | that is used as target for scaling action"; |
| 779 | |
| 780 | key "name"; |
| 781 | |
| 782 | leaf name { |
| 783 | description "Name of this scaling group."; |
| 784 | type string; |
| 785 | } |
| 786 | |
| 787 | list scaling-policy { |
| 788 | |
| 789 | key "name"; |
| 790 | |
| 791 | leaf name { |
| 792 | description |
| 793 | "Name of the scaling policy"; |
| 794 | type string; |
| 795 | } |
| 796 | |
| 797 | leaf scaling-type { |
| 798 | description |
| 799 | "Type of scaling"; |
| 800 | type manotypes:scaling-policy-type; |
| 801 | } |
| 802 | |
| 803 | leaf enabled { |
| 804 | description |
| 805 | "Specifies if the scaling policy can be applied"; |
| 806 | type boolean; |
| 807 | default true; |
| 808 | } |
| 809 | |
| 810 | leaf scale-in-operation-type { |
| 811 | description |
| 812 | "Operation to be applied to check between scaling criterias to |
| 813 | check if the scale in threshold condition has been met. |
| 814 | Defaults to AND"; |
| 815 | type manotypes:scaling-criteria-operation; |
| 816 | default AND; |
| 817 | } |
| 818 | |
| 819 | leaf scale-out-operation-type { |
| 820 | description |
| 821 | "Operation to be applied to check between scaling criterias to |
| 822 | check if the scale out threshold condition has been met. |
| 823 | Defauls to OR"; |
| 824 | type manotypes:scaling-criteria-operation; |
| 825 | default OR; |
| 826 | } |
| 827 | |
| 828 | leaf threshold-time { |
| 829 | description |
| 830 | "The duration for which the criteria must hold true"; |
| 831 | type uint32; |
| 832 | mandatory true; |
| 833 | } |
| 834 | |
| 835 | leaf cooldown-time { |
| 836 | description |
| 837 | "The duration after a scaling-in/scaling-out action has been |
| 838 | triggered, for which there will be no further optional"; |
| 839 | type uint32; |
| 840 | mandatory true; |
| 841 | } |
| 842 | |
| 843 | list scaling-criteria { |
| 844 | description |
| 845 | "list of conditions to be met for generating scaling |
| 846 | requests"; |
| 847 | key "name"; |
| 848 | |
| 849 | leaf name { |
| 850 | type string; |
| 851 | } |
| 852 | |
| 853 | leaf scale-in-threshold { |
| 854 | description |
| 855 | "Value below which scale-in requests are generated"; |
| vijay.r | 64a85fd | 2019-01-23 16:32:10 +0530 | [diff] [blame] | 856 | type decimal64{ |
| 857 | fraction-digits 10; |
| 858 | } |
| garciadeblas | 8efd85e | 2018-04-02 17:29:08 +0200 | [diff] [blame] | 859 | } |
| 860 | |
| 861 | leaf scale-in-relational-operation { |
| 862 | description |
| 863 | "The relational operator used to compare the monitoring param |
| 864 | against the scale-in-threshold."; |
| 865 | type manotypes:relational-operation-type; |
| 866 | default LE; |
| 867 | } |
| 868 | |
| 869 | leaf scale-out-threshold { |
| 870 | description |
| 871 | "Value above which scale-out requests are generated"; |
| vijay.r | 64a85fd | 2019-01-23 16:32:10 +0530 | [diff] [blame] | 872 | type decimal64{ |
| 873 | fraction-digits 10; |
| 874 | } |
| garciadeblas | 8efd85e | 2018-04-02 17:29:08 +0200 | [diff] [blame] | 875 | } |
| 876 | |
| 877 | leaf scale-out-relational-operation { |
| 878 | description |
| 879 | "The relational operator used to compare the monitoring param |
| 880 | against the scale-out-threshold."; |
| 881 | type manotypes:relational-operation-type; |
| 882 | default GE; |
| 883 | } |
| 884 | |
| 885 | leaf vnf-monitoring-param-ref { |
| 886 | description |
| 887 | "Reference to the VNF level monitoring parameter |
| 888 | that is aggregated"; |
| 889 | type leafref { |
| 890 | path "../../../../monitoring-param/id"; |
| 891 | } |
| 892 | } |
| 893 | } |
| 894 | } |
| 895 | |
| 896 | list vdu { |
| 897 | description "List of VDUs in this scaling group"; |
| 898 | key "vdu-id-ref"; |
| 899 | |
| 900 | leaf vdu-id-ref { |
| 901 | description "Reference to the VDU id"; |
| 902 | type leafref { |
| 903 | path "../../../vdu/id"; |
| 904 | } |
| 905 | } |
| 906 | |
| 907 | leaf count { |
| 908 | description |
| 909 | "count of this VDU id within this scaling group. |
| 910 | The count allows to define the number of instances |
| 911 | when a scaling action targets this scaling group"; |
| 912 | type uint32; |
| 913 | default 1; |
| 914 | } |
| 915 | } |
| 916 | |
| 917 | leaf min-instance-count { |
| 918 | description |
| 919 | "Minimum instances of the scaling group which are allowed. |
| 920 | These instances are created by default when the network service |
| 921 | is instantiated."; |
| 922 | type uint32; |
| 923 | default 0; |
| 924 | } |
| 925 | |
| 926 | leaf max-instance-count { |
| 927 | description |
| 928 | "Maximum instances of this scaling group that are allowed |
| 929 | in a single network service. The network service scaling |
| 930 | will fail, when the number of service group instances |
| 931 | exceed the max-instance-count specified."; |
| 932 | type uint32; |
| 933 | default 10; |
| 934 | } |
| 935 | |
| 936 | list scaling-config-action { |
| 937 | description "List of scaling config actions"; |
| 938 | key "trigger"; |
| 939 | |
| 940 | leaf trigger { |
| 941 | description "scaling trigger"; |
| 942 | type manotypes:scaling-trigger; |
| 943 | } |
| 944 | |
| 945 | leaf vnf-config-primitive-name-ref { |
| 946 | description "Reference to the VNF config primitive"; |
| 947 | type leafref { |
| 948 | path "../../../vnf-configuration/config-primitive/name"; |
| 949 | } |
| 950 | } |
| 951 | } |
| 952 | } |
| 953 | |
| 954 | list monitoring-param { |
| 955 | description |
| 956 | "List of monitoring parameters at the network service level"; |
| 957 | key id; |
| 958 | leaf id { |
| 959 | type string; |
| 960 | } |
| 961 | |
| 962 | leaf name { |
| 963 | type string; |
| 964 | } |
| 965 | |
| 966 | uses manotypes:monitoring-param-aggregation; |
| 967 | |
| 968 | choice monitoring-type { |
| 969 | description |
| 970 | "Defines the type of monitoring param to be used: |
| 971 | * vdu-monitorin-param: VDU-related metric (from NFVI) |
| 972 | * vnf-metric: VNF-related metric (from VCA) |
| 973 | * vdu-metric: VDU-related metric (from VCA) |
| 974 | "; |
| 975 | |
| 976 | case vdu-monitoring-param { |
| 977 | description "VDU-related metric from the infrastructure"; |
| garciadeblas | 18e4ca5 | 2018-06-12 15:42:01 +0200 | [diff] [blame] | 978 | container vdu-monitoring-param { |
| 979 | leaf vdu-ref { |
| 980 | type leafref { |
| 981 | path "../../../vdu/id"; |
| 982 | } |
| garciadeblas | 8efd85e | 2018-04-02 17:29:08 +0200 | [diff] [blame] | 983 | } |
| garciadeblas | 18e4ca5 | 2018-06-12 15:42:01 +0200 | [diff] [blame] | 984 | leaf vdu-monitoring-param-ref { |
| 985 | type leafref { |
| 986 | path "../../../vdu[id = current()/../vdu-ref]/monitoring-param/id"; |
| 987 | } |
| garciadeblas | 8efd85e | 2018-04-02 17:29:08 +0200 | [diff] [blame] | 988 | } |
| 989 | } |
| 990 | } |
| 991 | |
| 992 | case vnf-metric { |
| 993 | description "VNF-related metric (from VCA)"; |
| garciadeblas | 18e4ca5 | 2018-06-12 15:42:01 +0200 | [diff] [blame] | 994 | container vnf-metric { |
| 995 | leaf vnf-metric-name-ref { |
| 996 | type leafref { |
| 997 | path "../../../vnf-configuration/metrics/name"; |
| 998 | } |
| garciadeblas | 8efd85e | 2018-04-02 17:29:08 +0200 | [diff] [blame] | 999 | } |
| 1000 | } |
| 1001 | } |
| 1002 | |
| 1003 | case vdu-metric { |
| 1004 | description "VDU-related metric (from VCA)"; |
| garciadeblas | 18e4ca5 | 2018-06-12 15:42:01 +0200 | [diff] [blame] | 1005 | container vdu-metric { |
| 1006 | leaf vdu-ref { |
| 1007 | type leafref { |
| 1008 | path "../../../vdu/id"; |
| 1009 | } |
| garciadeblas | 8efd85e | 2018-04-02 17:29:08 +0200 | [diff] [blame] | 1010 | } |
| garciadeblas | 18e4ca5 | 2018-06-12 15:42:01 +0200 | [diff] [blame] | 1011 | leaf vdu-metric-name-ref { |
| 1012 | type leafref { |
| 1013 | path "../../../vdu[id = current()/../vdu-ref]/vdu-configuration/metrics/name"; |
| 1014 | } |
| garciadeblas | 8efd85e | 2018-04-02 17:29:08 +0200 | [diff] [blame] | 1015 | } |
| 1016 | } |
| 1017 | } |
| 1018 | |
| 1019 | } |
| 1020 | |
| 1021 | leaf http-endpoint-ref { |
| 1022 | type leafref { |
| 1023 | path "../../http-endpoint/path"; |
| 1024 | } |
| 1025 | } |
| 1026 | |
| 1027 | leaf json-query-method { |
| 1028 | type manotypes:json-query-method; |
| 1029 | default "NAMEKEY"; |
| 1030 | } |
| 1031 | |
| 1032 | container json-query-params { |
| 1033 | leaf json-path { |
| 1034 | description |
| 1035 | "The jsonpath to use to extract value from JSON structure"; |
| 1036 | type string; |
| 1037 | } |
| 1038 | leaf object-path { |
| 1039 | description |
| 1040 | "The objectpath to use to extract value from JSON structure"; |
| 1041 | type string; |
| 1042 | } |
| 1043 | } |
| 1044 | |
| 1045 | uses manotypes:monitoring-param-ui-data; |
| 1046 | uses manotypes:monitoring-param-value; |
| 1047 | |
| 1048 | } |
| Rajesh Velandy | e27e0b2 | 2017-09-18 17:21:48 -0400 | [diff] [blame] | 1049 | |
| 1050 | list placement-groups { |
| 1051 | description "List of placement groups at VNF level"; |
| 1052 | |
| 1053 | key "name"; |
| 1054 | uses manotypes:placement-group-info; |
| 1055 | |
| 1056 | list member-vdus { |
| 1057 | |
| 1058 | description |
| 1059 | "List of VDUs that are part of this placement group"; |
| 1060 | key "member-vdu-ref"; |
| 1061 | |
| 1062 | leaf member-vdu-ref { |
| 1063 | type leafref { |
| 1064 | path "../../../vdu/id"; |
| 1065 | } |
| 1066 | } |
| 1067 | } |
| 1068 | } |
| 1069 | } |
| 1070 | } |
| 1071 | |
| 1072 | // vim: sw=2 |