3 * Copyright 2017 RIFT.IO Inc
4 * Copyright 2018-2020 ETSI
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 namespace "urn:etsi:osm:yang:vnfd-base";
30 import ietf-inet-types {
36 "Initial revision. This YANG file defines
37 the common types for Virtual Network Function
40 "Derived from earlier versions of base YANG files";
43 grouping common-connection-point {
45 description "Name of the connection point";
50 description "Identifier for the internal connection points";
55 description "Short name to appear as label in the UI";
60 description "Type of the connection point.";
61 type manotypes:connection-point-type;
64 leaf port-security-enabled {
65 description "Enables the port security for the port.";
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)";
76 enum allow-address-pairs;
82 typedef interface-type {
89 typedef vnf-operational-status {
100 grouping virtual-interface {
101 container virtual-interface {
103 "Container for the virtual interface properties";
107 "Specifies the type of virtual interface
109 PARAVIRT : Use the default paravirtualized interface for the VIM (virtio, vmxnet3, etc.).
110 VIRTIO : Deprecated! Use the traditional VIRTIO interface.
111 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.
116 OM-MGMT : Deprecated! Use PARAVIRT instead and set the VNF management interface at vnfd:mgmt-interface:cp";
121 enum PCI-PASSTHROUGH;
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.";
142 "Aggregate bandwidth of the NIC.";
148 grouping vnfd-descriptor {
150 description "Identifier for the VNFD.";
157 description "VNFD name.";
163 description "Short name to appear as label in the UI";
168 description "Vendor of the VNFD.";
174 "Vendor logo for the Virtual Network Function";
179 description "Description of the VNFD.";
184 description "Version of the VNFD";
188 container vnf-configuration {
189 uses manotypes:vca-configuration;
190 uses manotypes:vca-relations;
191 uses manotypes:vca-config-access;
194 leaf operational-status {
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.
204 type vnf-operational-status;
207 container mgmt-interface {
209 "Interface over which the VNF is managed.";
211 choice endpoint-type {
213 "Indicates the type of management endpoint.";
217 "Specifies the static IP address for managing the VNF.";
219 type inet:ip-address;
225 "Use the default management interface on this VDU.";
235 "Use the ip address associated with this connection point. This cp is then considered as management.";
238 path "../../connection-point/name";
246 "Port for the management interface.";
247 type inet:port-number;
250 container dashboard-params {
251 description "Parameters for the VNF dashboard";
254 description "The HTTP path for the dashboard";
259 description "Pick HTTPS instead of HTTP , Default is false";
264 description "The HTTP port for the dashboard";
265 type inet:port-number;
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.";
279 description "Identifier for the VLD";
284 description "Name of the internal VLD";
289 description "Short name to appear as label in the UI";
298 type manotypes:virtual-link-type;
301 leaf root-bandwidth {
303 "For ELAN this is the aggregate bandwidth.";
307 leaf leaf-bandwidth {
309 "For ELAN this is the bandwidth of branches.";
313 list internal-connection-point {
315 description "List of internal connection points in this VLD";
317 description "Reference to the internal connection point id";
319 path "../../../vdu/internal-connection-point/id";
324 description "IP address of the internal connection point";
325 type inet:ip-address;
329 uses manotypes:provider-network;
331 description "Extra parameters for VLD instantiation";
333 case vim-network-ref {
334 leaf vim-network-name {
336 "Name of network in VIM account. This is used to indicate
337 pre-provisioned network name in cloud account.";
342 case vim-network-profile {
343 leaf ip-profile-ref {
344 description "Named reference to IP-profile object";
352 uses manotypes:ip-profile-list;
354 list connection-point {
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.";
365 uses common-connection-point;
367 leaf internal-vld-ref {
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.";
376 path "../../internal-vld/id";
382 description "List of Virtual Deployment Units";
386 description "Unique id for the VDU";
391 description "Unique name for the VDU";
396 description "Description of the VDU.";
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.";
411 description "Number of instances of VDU";
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.";
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;
435 "This field is reserved for the identifier assigned by the VIM provider";
441 leaf vnf-monitoring-param-ref {
443 "Reference to the VNF level monitoring parameter
446 path "../../monitoring-param/id";
450 uses manotypes:alarm-properties;
453 uses manotypes:image-properties;
455 list alternative-images {
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
463 If an alternative image is specified for a VIM type, it will prevail
464 over the default image";
467 description "VIM type: openvim, openstack, vmware, aws, etc.";
471 uses manotypes:image-properties;
474 container vdu-configuration {
475 uses manotypes:vca-configuration;
476 uses manotypes:vca-config-access;
479 list monitoring-param {
481 "List of VDU-related monitoring parameters at NFVI level";
484 description "The unique id of the monitoring param at VDU level";
489 description "The associated NFVI metric to be monitored";
490 type manotypes:nfvi-metric-type;
493 leaf interface-name-ref {
495 "Reference to a VDU interface name. Applicable only when the nfvi-metric
496 refers to an interface and not to the VM";
498 path "../../interface/name";
503 choice cloud-init-input {
505 "Indicates how the contents of cloud-init script are provided.
506 There are 2 choices - inline or in a file";
511 "Contents of cloud-init script, provided inline, in cloud-config format";
517 leaf cloud-init-file {
519 "Name of file with contents of cloud-init script in cloud-config format";
525 uses manotypes:supplemental-boot-data;
527 list internal-connection-point {
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
537 uses common-connection-point;
539 leaf internal-vld-ref {
541 path "../../../internal-vld/id";
548 "List of Interfaces (external and internal) for the VNF";
553 "Name of the interface. Note that this
554 name has only local significance to the VDU.";
560 "Explicit Position of the interface within the list";
564 leaf mgmt-interface {
566 "Flag to indicate that this is the mgmt interface
567 to be used for VDU configuration";
574 "Type of the Interface";
582 "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
587 This parameter will be likely deprecated in the future.";
591 choice connection-point-type {
593 leaf internal-connection-point-ref {
595 "Leaf Ref to the particular internal connection point";
597 path "../../internal-connection-point/id";
602 leaf external-connection-point-ref {
604 "Leaf Ref to the particular external connection point";
606 path "../../../connection-point/name";
612 uses virtual-interface;
620 description "Name of the disk-volumes, e.g. vda, vdb etc";
624 uses manotypes:volume-info;
629 description "List of K8s Deployment Units";
633 description "Unique name for the KDU";
638 description "Description of the KDU.";
642 container kdu-configuration {
643 uses manotypes:vca-configuration;
644 uses manotypes:vca-config-access;
646 leaf-list blacklist-config-primitive {
648 "List of blacklisted config primitives from the list of
649 default kdu config primitives";
662 "Indicates the KDU model, either as a helm-chart or as a juju-bundle.";
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>
677 "Helm version to use for this helm-chart, v3 by default";
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>
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.";
707 description "Name of the Kubernetes service exposed by he KDU model";
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.";
721 leaf external-connection-point-ref {
723 "Leaf Ref to the particular external connection point";
725 path "../../../connection-point/name";
733 container k8s-cluster {
736 "List of supported K8s versions.
737 The cluster where the KDUs will be deployed will have to match
738 one of these versions.";
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.";
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.";
765 description "Internal identifier for the K8s cluster network in this VNF";
769 leaf external-connection-point-ref {
771 "Leaf Ref to the particular external connection point";
773 path "../../../connection-point/name";
780 list vdu-dependency {
782 "List of VDU dependencies.";
785 leaf vdu-source-ref {
791 leaf vdu-depends-on-ref {
793 "Reference to the VDU on which
794 the source VDU depends.";
801 leaf service-function-chain {
802 description "Type of node in Service Function Chaining Architecture";
813 leaf service-function-type {
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";
822 uses manotypes:http-endpoints;
824 list scaling-group-descriptor {
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";
834 description "Name of this scaling group.";
838 list scaling-policy {
844 "Name of the scaling policy";
851 type manotypes:scaling-policy-type;
856 "Specifies if the scaling policy can be applied";
861 leaf scale-in-operation-type {
863 "Operation to be applied to check between scaling criterias to
864 check if the scale in threshold condition has been met.
866 type manotypes:scaling-criteria-operation;
870 leaf scale-out-operation-type {
872 "Operation to be applied to check between scaling criterias to
873 check if the scale out threshold condition has been met.
875 type manotypes:scaling-criteria-operation;
879 leaf threshold-time {
881 "The duration for which the criteria must hold true";
888 "The duration after a scaling-in/scaling-out action has been
889 triggered, for which there will be no further optional";
894 list scaling-criteria {
896 "list of conditions to be met for generating scaling
904 leaf scale-in-threshold {
906 "Value below which scale-in requests are generated";
912 leaf scale-in-relational-operation {
914 "The relational operator used to compare the monitoring param
915 against the scale-in-threshold.";
916 type manotypes:relational-operation-type;
920 leaf scale-out-threshold {
922 "Value above which scale-out requests are generated";
928 leaf scale-out-relational-operation {
930 "The relational operator used to compare the monitoring param
931 against the scale-out-threshold.";
932 type manotypes:relational-operation-type;
936 leaf vnf-monitoring-param-ref {
938 "Reference to the VNF level monitoring parameter
941 path "../../../../monitoring-param/id";
948 description "List of VDUs in this scaling group";
952 description "Reference to the VDU id";
954 path "../../../vdu/id";
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";
968 leaf min-instance-count {
970 "Minimum instances of the scaling group which are allowed.
971 These instances are created by default when the network service
977 leaf max-instance-count {
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.";
987 list scaling-config-action {
988 description "List of scaling config actions";
992 description "scaling trigger";
993 type manotypes:scaling-trigger;
996 leaf vnf-config-primitive-name-ref {
997 description "Reference to the VNF config primitive";
999 path "../../../vnf-configuration/config-primitive/name";
1005 list monitoring-param {
1007 "List of monitoring parameters at the network service level";
1017 uses manotypes:monitoring-param-aggregation;
1019 choice monitoring-type {
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)
1027 case vdu-monitoring-param {
1028 description "VDU-related metric from the infrastructure";
1029 container vdu-monitoring-param {
1032 path "../../../vdu/id";
1035 leaf vdu-monitoring-param-ref {
1037 path "../../../vdu[id = current()/../vdu-ref]/monitoring-param/id";
1044 description "VNF-related metric (from VCA)";
1045 container vnf-metric {
1046 leaf vnf-metric-name-ref {
1048 path "../../../vnf-configuration/metrics/name";
1055 description "VDU-related metric (from VCA)";
1056 container vdu-metric {
1059 path "../../../vdu/id";
1062 leaf vdu-metric-name-ref {
1064 path "../../../vdu[id = current()/../vdu-ref]/vdu-configuration/metrics/name";
1072 leaf http-endpoint-ref {
1074 path "../../http-endpoint/path";
1078 leaf json-query-method {
1079 type manotypes:json-query-method;
1083 container json-query-params {
1086 "The jsonpath to use to extract value from JSON structure";
1091 "The objectpath to use to extract value from JSON structure";
1096 uses manotypes:monitoring-param-ui-data;
1097 uses manotypes:monitoring-param-value;
1101 list placement-groups {
1102 description "List of placement groups at VNF level";
1105 uses manotypes:placement-group-info;
1110 "List of VDUs that are part of this placement group";
1111 key "member-vdu-ref";
1113 leaf member-vdu-ref {
1115 path "../../../vdu/id";