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