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 "http://riftio.com/ns/riftware-1.0/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;
181 leaf operational-status {
183 "The operational status of the VNF
184 init : The VNF has just started.
185 running : The VNF is active in VM
186 upgrading : The VNF is being upgraded (EXPERIMENTAL)
187 terminate : The VNF is being terminated
188 terminated : The VNF is in the terminated state.
189 failed : The VNF instantiation failed.
191 type vnf-operational-status;
194 container mgmt-interface {
196 "Interface over which the VNF is managed.";
198 choice endpoint-type {
200 "Indicates the type of management endpoint.";
204 "Specifies the static IP address for managing the VNF.";
206 type inet:ip-address;
212 "Use the default management interface on this VDU.";
222 "Use the ip address associated with this connection point. This cp is then considered as management.";
225 path "../../connection-point/name";
233 "Port for the management interface.";
234 type inet:port-number;
237 container dashboard-params {
238 description "Parameters for the VNF dashboard";
241 description "The HTTP path for the dashboard";
246 description "Pick HTTPS instead of HTTP , Default is false";
251 description "The HTTP port for the dashboard";
252 type inet:port-number;
260 "List of Internal Virtual Link Descriptors (VLD).
261 The internal VLD describes the basic topology of
262 the connectivity such as E-LAN, E-Line, E-Tree.
263 between internal VNF components of the system.";
266 description "Identifier for the VLD";
271 description "Name of the internal VLD";
276 description "Short name to appear as label in the UI";
285 type manotypes:virtual-link-type;
288 leaf root-bandwidth {
290 "For ELAN this is the aggregate bandwidth.";
294 leaf leaf-bandwidth {
296 "For ELAN this is the bandwidth of branches.";
300 list internal-connection-point {
302 description "List of internal connection points in this VLD";
304 description "Reference to the internal connection point id";
306 path "../../../vdu/internal-connection-point/id";
311 description "IP address of the internal connection point";
312 type inet:ip-address;
316 uses manotypes:provider-network;
318 description "Extra parameters for VLD instantiation";
320 case vim-network-ref {
321 leaf vim-network-name {
323 "Name of network in VIM account. This is used to indicate
324 pre-provisioned network name in cloud account.";
329 case vim-network-profile {
330 leaf ip-profile-ref {
331 description "Named reference to IP-profile object";
339 uses manotypes:ip-profile-list;
341 list connection-point {
344 "List for external connection points. Each VNF has one
345 or more external connection points that connect the VNF
346 to other VNFs or to external networks. Each VNF exposes
347 connection points to the orchestrator, which can construct
348 network services by connecting the connection points
349 between different VNFs. The NFVO will use VLDs and VNFFGs
350 at the network service level to construct network services.";
352 uses common-connection-point;
354 leaf internal-vld-ref {
356 "Reference to an internal VLD of the VNF. This field is
357 optional. It allows exposing an internal VLD through a
358 connection point. When building a NS, this VNF CP might be
359 connected to a NS VLD, then both VLDs (the i-VLD of the VNF and the
360 VLD of the NS) will become the same network and the IP profile will
361 be the one configured at NS level.";
363 path "../../internal-vld/id";
369 description "List of Virtual Deployment Units";
373 description "Unique id for the VDU";
378 description "Unique name for the VDU";
383 description "Description of the VDU.";
389 "Type of PDU. If this field exists, the deployment unit must be
390 understood as a PDU, not as a VDU. This field is used to identify
391 the category of PDU instances to be used at instantiation time. For
392 the instantiation to be successful, there must be available
393 PDU instances of this type in the selected datacenter.";
398 description "Number of instances of VDU";
404 "Specifies the virtual PCI address. Expressed in
405 the following format dddd:dd:dd.d. For example
406 0000:00:12.0. This information can be used to
407 pass as metadata during the VM creation.";
411 uses manotypes:vm-flavor;
412 uses manotypes:guest-epa;
413 uses manotypes:vswitch-epa;
414 uses manotypes:hypervisor-epa;
415 uses manotypes:host-epa;
420 uses manotypes:alarm;
423 uses manotypes:image-properties;
425 list alternative-images {
428 "List of alternative images per VIM type.
429 Different images can be used for specific types of VIMs instead
430 of the default image. This allows deployments in sites where the
431 image identifier in the VIM is given by the VIM provider and
433 If an alternative image is specified for a VIM type, it will prevail
434 over the default image";
437 description "VIM type: openvim, openstack, vmware, aws, etc.";
441 uses manotypes:image-properties;
444 container vdu-configuration {
445 uses manotypes:vca-configuration;
448 list monitoring-param {
450 "List of VDU-related monitoring parameters at NFVI level";
453 description "The unique id of the monitoring param at VDU level";
458 description "The associated NFVI metric to be monitored";
459 type manotypes:nfvi-metric-type;
462 leaf interface-name-ref {
464 "Reference to a VDU interface name. Applicable only when the nfvi-metric
465 refers to an interface and not to the VM";
467 path "../../interface/name";
472 choice cloud-init-input {
474 "Indicates how the contents of cloud-init script are provided.
475 There are 2 choices - inline or in a file";
480 "Contents of cloud-init script, provided inline, in cloud-config format";
486 leaf cloud-init-file {
488 "Name of file with contents of cloud-init script in cloud-config format";
494 uses manotypes:supplemental-boot-data;
496 list internal-connection-point {
499 "List for internal connection points. Each VNFC
500 has zero or more internal connection points.
501 Internal connection points are used for connecting
502 the VNF with components internal to the VNF. If a VNF
503 has only one VNFC, it may not have any internal
506 uses common-connection-point;
508 leaf internal-vld-ref {
510 path "../../../internal-vld/id";
517 "List of Interfaces (external and internal) for the VNF";
522 "Name of the interface. Note that this
523 name has only local significance to the VDU.";
529 "Explicit Position of the interface within the list";
533 leaf mgmt-interface {
535 "Flag to indicate that this is the mgmt interface
536 to be used for VDU configuration";
543 "Type of the Interface";
551 "MAC address of the interface.
552 Some VNFs require a specific MAC address to be configured
553 in the interface. While this is not recommended at all in
554 NFV environments, this parameter exists to allow those
556 This parameter will be likely deprecated in the future.";
560 choice connection-point-type {
562 leaf internal-connection-point-ref {
564 "Leaf Ref to the particular internal connection point";
566 path "../../internal-connection-point/id";
571 leaf external-connection-point-ref {
573 "Leaf Ref to the particular external connection point";
575 path "../../../connection-point/name";
581 uses virtual-interface;
589 description "Name of the disk-volumes, e.g. vda, vdb etc";
593 uses manotypes:volume-info;
597 list vdu-dependency {
599 "List of VDU dependencies.";
602 leaf vdu-source-ref {
608 leaf vdu-depends-on-ref {
610 "Reference to the VDU on which
611 the source VDU depends.";
618 leaf service-function-chain {
619 description "Type of node in Service Function Chaining Architecture";
630 leaf service-function-type {
632 "Type of Service Function.
633 NOTE: This needs to map with Service Function Type in ODL to
634 support VNFFG. Service Function Type is mandatory param in ODL
635 SFC. This is temporarily set to string for ease of use";
639 uses manotypes:http-endpoints;
641 list scaling-group-descriptor {
643 "scaling group descriptor within the VNF.
644 The scaling group defines a group of VDUs,
645 and the ratio of VDUs in the VNF
646 that is used as target for scaling action";
651 description "Name of this scaling group.";
655 list scaling-policy {
661 "Name of the scaling policy";
668 type manotypes:scaling-policy-type;
673 "Specifies if the scaling policy can be applied";
678 leaf scale-in-operation-type {
680 "Operation to be applied to check between scaling criterias to
681 check if the scale in threshold condition has been met.
683 type manotypes:scaling-criteria-operation;
687 leaf scale-out-operation-type {
689 "Operation to be applied to check between scaling criterias to
690 check if the scale out threshold condition has been met.
692 type manotypes:scaling-criteria-operation;
696 leaf threshold-time {
698 "The duration for which the criteria must hold true";
705 "The duration after a scaling-in/scaling-out action has been
706 triggered, for which there will be no further optional";
711 list scaling-criteria {
713 "list of conditions to be met for generating scaling
721 leaf scale-in-threshold {
723 "Value below which scale-in requests are generated";
727 leaf scale-in-relational-operation {
729 "The relational operator used to compare the monitoring param
730 against the scale-in-threshold.";
731 type manotypes:relational-operation-type;
735 leaf scale-out-threshold {
737 "Value above which scale-out requests are generated";
741 leaf scale-out-relational-operation {
743 "The relational operator used to compare the monitoring param
744 against the scale-out-threshold.";
745 type manotypes:relational-operation-type;
749 leaf vnf-monitoring-param-ref {
751 "Reference to the VNF level monitoring parameter
754 path "../../../../monitoring-param/id";
761 description "List of VDUs in this scaling group";
765 description "Reference to the VDU id";
767 path "../../../vdu/id";
773 "count of this VDU id within this scaling group.
774 The count allows to define the number of instances
775 when a scaling action targets this scaling group";
781 leaf min-instance-count {
783 "Minimum instances of the scaling group which are allowed.
784 These instances are created by default when the network service
790 leaf max-instance-count {
792 "Maximum instances of this scaling group that are allowed
793 in a single network service. The network service scaling
794 will fail, when the number of service group instances
795 exceed the max-instance-count specified.";
800 list scaling-config-action {
801 description "List of scaling config actions";
805 description "scaling trigger";
806 type manotypes:scaling-trigger;
809 leaf vnf-config-primitive-name-ref {
810 description "Reference to the VNF config primitive";
812 path "../../../vnf-configuration/config-primitive/name";
818 list monitoring-param {
820 "List of monitoring parameters at the network service level";
830 uses manotypes:monitoring-param-aggregation;
832 choice monitoring-type {
834 "Defines the type of monitoring param to be used:
835 * vdu-monitorin-param: VDU-related metric (from NFVI)
836 * vnf-metric: VNF-related metric (from VCA)
837 * vdu-metric: VDU-related metric (from VCA)
840 case vdu-monitoring-param {
841 description "VDU-related metric from the infrastructure";
842 container vdu-monitoring-param {
845 path "../../../vdu/id";
848 leaf vdu-monitoring-param-ref {
850 path "../../../vdu[id = current()/../vdu-ref]/monitoring-param/id";
857 description "VNF-related metric (from VCA)";
858 container vnf-metric {
859 leaf vnf-metric-name-ref {
861 path "../../../vnf-configuration/metrics/name";
868 description "VDU-related metric (from VCA)";
869 container vdu-metric {
872 path "../../../vdu/id";
875 leaf vdu-metric-name-ref {
877 path "../../../vdu[id = current()/../vdu-ref]/vdu-configuration/metrics/name";
885 leaf http-endpoint-ref {
887 path "../../http-endpoint/path";
891 leaf json-query-method {
892 type manotypes:json-query-method;
896 container json-query-params {
899 "The jsonpath to use to extract value from JSON structure";
904 "The objectpath to use to extract value from JSON structure";
909 uses manotypes:monitoring-param-ui-data;
910 uses manotypes:monitoring-param-value;
914 list placement-groups {
915 description "List of placement groups at VNF level";
918 uses manotypes:placement-group-info;
923 "List of VDUs that are part of this placement group";
924 key "member-vdu-ref";
926 leaf member-vdu-ref {
928 path "../../../vdu/id";