4 * Copyright 2017 RIFT.IO Inc
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.";
71 typedef interface-type {
78 typedef vnf-operational-status {
89 grouping virtual-interface {
90 container virtual-interface {
92 "Container for the virtual interface properties";
96 "Specifies the type of virtual interface
98 PARAVIRT : Use the default paravirtualized interface for the VIM (virtio, vmxnet3, etc.).
99 VIRTIO : Deprecated! Use the traditional VIRTIO interface.
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.
105 OM-MGMT : Deprecated! Use PARAVIRT instead and set the VNF management interface at vnfd:mgmt-interface:cp";
110 enum PCI-PASSTHROUGH;
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.";
131 "Aggregate bandwidth of the NIC.";
137 grouping vnfd-descriptor {
139 description "Identifier for the VNFD.";
146 description "VNFD name.";
152 description "Short name to appear as label in the UI";
157 description "Vendor of the VNFD.";
163 "Vendor logo for the Virtual Network Function";
168 description "Description of the VNFD.";
173 description "Version of the VNFD";
177 container vnf-configuration {
178 uses manotypes:vca-configuration;
179 uses manotypes:vca-relations;
180 uses manotypes:vca-config-access;
183 leaf operational-status {
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.
193 type vnf-operational-status;
196 container mgmt-interface {
198 "Interface over which the VNF is managed.";
200 choice endpoint-type {
202 "Indicates the type of management endpoint.";
206 "Specifies the static IP address for managing the VNF.";
208 type inet:ip-address;
214 "Use the default management interface on this VDU.";
224 "Use the ip address associated with this connection point. This cp is then considered as management.";
227 path "../../connection-point/name";
235 "Port for the management interface.";
236 type inet:port-number;
239 container dashboard-params {
240 description "Parameters for the VNF dashboard";
243 description "The HTTP path for the dashboard";
248 description "Pick HTTPS instead of HTTP , Default is false";
253 description "The HTTP port for the dashboard";
254 type inet:port-number;
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.";
268 description "Identifier for the VLD";
273 description "Name of the internal VLD";
278 description "Short name to appear as label in the UI";
287 type manotypes:virtual-link-type;
290 leaf root-bandwidth {
292 "For ELAN this is the aggregate bandwidth.";
296 leaf leaf-bandwidth {
298 "For ELAN this is the bandwidth of branches.";
302 list internal-connection-point {
304 description "List of internal connection points in this VLD";
306 description "Reference to the internal connection point id";
308 path "../../../vdu/internal-connection-point/id";
313 description "IP address of the internal connection point";
314 type inet:ip-address;
318 uses manotypes:provider-network;
320 description "Extra parameters for VLD instantiation";
322 case vim-network-ref {
323 leaf vim-network-name {
325 "Name of network in VIM account. This is used to indicate
326 pre-provisioned network name in cloud account.";
331 case vim-network-profile {
332 leaf ip-profile-ref {
333 description "Named reference to IP-profile object";
341 uses manotypes:ip-profile-list;
343 list connection-point {
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.";
354 uses common-connection-point;
356 leaf internal-vld-ref {
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.";
365 path "../../internal-vld/id";
371 description "List of Virtual Deployment Units";
375 description "Unique id for the VDU";
380 description "Unique name for the VDU";
385 description "Description of the VDU.";
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.";
400 description "Number of instances of VDU";
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.";
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;
424 "This field is reserved for the identifier assigned by the VIM provider";
430 leaf vnf-monitoring-param-ref {
432 "Reference to the VNF level monitoring parameter
435 path "../../monitoring-param/id";
439 uses manotypes:alarm-properties;
442 uses manotypes:image-properties;
444 list alternative-images {
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
452 If an alternative image is specified for a VIM type, it will prevail
453 over the default image";
456 description "VIM type: openvim, openstack, vmware, aws, etc.";
460 uses manotypes:image-properties;
463 container vdu-configuration {
464 uses manotypes:vca-configuration;
465 uses manotypes:vca-config-access;
468 list monitoring-param {
470 "List of VDU-related monitoring parameters at NFVI level";
473 description "The unique id of the monitoring param at VDU level";
478 description "The associated NFVI metric to be monitored";
479 type manotypes:nfvi-metric-type;
482 leaf interface-name-ref {
484 "Reference to a VDU interface name. Applicable only when the nfvi-metric
485 refers to an interface and not to the VM";
487 path "../../interface/name";
492 choice cloud-init-input {
494 "Indicates how the contents of cloud-init script are provided.
495 There are 2 choices - inline or in a file";
500 "Contents of cloud-init script, provided inline, in cloud-config format";
506 leaf cloud-init-file {
508 "Name of file with contents of cloud-init script in cloud-config format";
514 uses manotypes:supplemental-boot-data;
516 list internal-connection-point {
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
526 uses common-connection-point;
528 leaf internal-vld-ref {
530 path "../../../internal-vld/id";
537 "List of Interfaces (external and internal) for the VNF";
542 "Name of the interface. Note that this
543 name has only local significance to the VDU.";
549 "Explicit Position of the interface within the list";
553 leaf mgmt-interface {
555 "Flag to indicate that this is the mgmt interface
556 to be used for VDU configuration";
563 "Type of the Interface";
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
576 This parameter will be likely deprecated in the future.";
580 choice connection-point-type {
582 leaf internal-connection-point-ref {
584 "Leaf Ref to the particular internal connection point";
586 path "../../internal-connection-point/id";
591 leaf external-connection-point-ref {
593 "Leaf Ref to the particular external connection point";
595 path "../../../connection-point/name";
601 uses virtual-interface;
609 description "Name of the disk-volumes, e.g. vda, vdb etc";
613 uses manotypes:volume-info;
617 list vdu-dependency {
619 "List of VDU dependencies.";
622 leaf vdu-source-ref {
628 leaf vdu-depends-on-ref {
630 "Reference to the VDU on which
631 the source VDU depends.";
638 leaf service-function-chain {
639 description "Type of node in Service Function Chaining Architecture";
650 leaf service-function-type {
652 "Type of Service Function.
653 NOTE: This needs to map with Service Function Type in ODL to
654 support VNFFG. Service Function Type is mandatory param in ODL
655 SFC. This is temporarily set to string for ease of use";
659 uses manotypes:http-endpoints;
661 list scaling-group-descriptor {
663 "scaling group descriptor within the VNF.
664 The scaling group defines a group of VDUs,
665 and the ratio of VDUs in the VNF
666 that is used as target for scaling action";
671 description "Name of this scaling group.";
675 list scaling-policy {
681 "Name of the scaling policy";
688 type manotypes:scaling-policy-type;
693 "Specifies if the scaling policy can be applied";
698 leaf scale-in-operation-type {
700 "Operation to be applied to check between scaling criterias to
701 check if the scale in threshold condition has been met.
703 type manotypes:scaling-criteria-operation;
707 leaf scale-out-operation-type {
709 "Operation to be applied to check between scaling criterias to
710 check if the scale out threshold condition has been met.
712 type manotypes:scaling-criteria-operation;
716 leaf threshold-time {
718 "The duration for which the criteria must hold true";
725 "The duration after a scaling-in/scaling-out action has been
726 triggered, for which there will be no further optional";
731 list scaling-criteria {
733 "list of conditions to be met for generating scaling
741 leaf scale-in-threshold {
743 "Value below which scale-in requests are generated";
749 leaf scale-in-relational-operation {
751 "The relational operator used to compare the monitoring param
752 against the scale-in-threshold.";
753 type manotypes:relational-operation-type;
757 leaf scale-out-threshold {
759 "Value above which scale-out requests are generated";
765 leaf scale-out-relational-operation {
767 "The relational operator used to compare the monitoring param
768 against the scale-out-threshold.";
769 type manotypes:relational-operation-type;
773 leaf vnf-monitoring-param-ref {
775 "Reference to the VNF level monitoring parameter
778 path "../../../../monitoring-param/id";
785 description "List of VDUs in this scaling group";
789 description "Reference to the VDU id";
791 path "../../../vdu/id";
797 "count of this VDU id within this scaling group.
798 The count allows to define the number of instances
799 when a scaling action targets this scaling group";
805 leaf min-instance-count {
807 "Minimum instances of the scaling group which are allowed.
808 These instances are created by default when the network service
814 leaf max-instance-count {
816 "Maximum instances of this scaling group that are allowed
817 in a single network service. The network service scaling
818 will fail, when the number of service group instances
819 exceed the max-instance-count specified.";
824 list scaling-config-action {
825 description "List of scaling config actions";
829 description "scaling trigger";
830 type manotypes:scaling-trigger;
833 leaf vnf-config-primitive-name-ref {
834 description "Reference to the VNF config primitive";
836 path "../../../vnf-configuration/config-primitive/name";
842 list monitoring-param {
844 "List of monitoring parameters at the network service level";
854 uses manotypes:monitoring-param-aggregation;
856 choice monitoring-type {
858 "Defines the type of monitoring param to be used:
859 * vdu-monitorin-param: VDU-related metric (from NFVI)
860 * vnf-metric: VNF-related metric (from VCA)
861 * vdu-metric: VDU-related metric (from VCA)
864 case vdu-monitoring-param {
865 description "VDU-related metric from the infrastructure";
866 container vdu-monitoring-param {
869 path "../../../vdu/id";
872 leaf vdu-monitoring-param-ref {
874 path "../../../vdu[id = current()/../vdu-ref]/monitoring-param/id";
881 description "VNF-related metric (from VCA)";
882 container vnf-metric {
883 leaf vnf-metric-name-ref {
885 path "../../../vnf-configuration/metrics/name";
892 description "VDU-related metric (from VCA)";
893 container vdu-metric {
896 path "../../../vdu/id";
899 leaf vdu-metric-name-ref {
901 path "../../../vdu[id = current()/../vdu-ref]/vdu-configuration/metrics/name";
909 leaf http-endpoint-ref {
911 path "../../http-endpoint/path";
915 leaf json-query-method {
916 type manotypes:json-query-method;
920 container json-query-params {
923 "The jsonpath to use to extract value from JSON structure";
928 "The objectpath to use to extract value from JSON structure";
933 uses manotypes:monitoring-param-ui-data;
934 uses manotypes:monitoring-param-value;
938 list placement-groups {
939 description "List of placement groups at VNF level";
942 uses manotypes:placement-group-info;
947 "List of VDUs that are part of this placement group";
948 key "member-vdu-ref";
950 leaf member-vdu-ref {
952 path "../../../vdu/id";