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 VIRTIO : Use the traditional VIRTIO interface.
99 PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
100 SR-IOV : Use SR-IOV interface.
101 E1000 : Emulate E1000 interface.
102 RTL8139 : Emulate RTL8139 interface.
103 PCNET : Emulate PCNET interface.
104 OM-MGMT : Deprecated! Use VIRTIO instead and set the VNF management interface at vnfd:mgmt-interface:cp";
108 enum PCI-PASSTHROUGH;
120 "Specifies the virtual PCI address. Expressed in
121 the following format dddd:dd:dd.d. For example
122 0000:00:12.0. This information can be used to
123 pass as metadata during the VM creation.";
129 "Aggregate bandwidth of the NIC.";
135 grouping vnfd-descriptor {
137 description "Identifier for the VNFD.";
144 description "VNFD name.";
150 description "Short name to appear as label in the UI";
155 description "Vendor of the VNFD.";
161 "Vendor logo for the Virtual Network Function";
166 description "Description of the VNFD.";
171 description "Version of the VNFD";
175 container vnf-configuration {
176 uses manotypes:vca-configuration;
179 leaf operational-status {
181 "The operational status of the VNF
182 init : The VNF has just started.
183 running : The VNF is active in VM
184 upgrading : The VNF is being upgraded (EXPERIMENTAL)
185 terminate : The VNF is being terminated
186 terminated : The VNF is in the terminated state.
187 failed : The VNF instantiation failed.
189 type vnf-operational-status;
192 container mgmt-interface {
194 "Interface over which the VNF is managed.";
196 choice endpoint-type {
198 "Indicates the type of management endpoint.";
202 "Specifies the static IP address for managing the VNF.";
204 type inet:ip-address;
210 "Use the default management interface on this VDU.";
220 "Use the ip address associated with this connection point. This cp is then considered as management.";
223 path "../../connection-point/name";
231 "Port for the management interface.";
232 type inet:port-number;
235 container dashboard-params {
236 description "Parameters for the VNF dashboard";
239 description "The HTTP path for the dashboard";
244 description "Pick HTTPS instead of HTTP , Default is false";
249 description "The HTTP port for the dashboard";
250 type inet:port-number;
258 "List of Internal Virtual Link Descriptors (VLD).
259 The internal VLD describes the basic topology of
260 the connectivity such as E-LAN, E-Line, E-Tree.
261 between internal VNF components of the system.";
264 description "Identifier for the VLD";
269 description "Name of the internal VLD";
274 description "Short name to appear as label in the UI";
283 type manotypes:virtual-link-type;
286 leaf root-bandwidth {
288 "For ELAN this is the aggregate bandwidth.";
292 leaf leaf-bandwidth {
294 "For ELAN this is the bandwidth of branches.";
298 list internal-connection-point {
300 description "List of internal connection points in this VLD";
302 description "Reference to the internal connection point id";
304 path "../../../vdu/internal-connection-point/id";
309 description "IP address of the internal connection point";
310 type inet:ip-address;
314 uses manotypes:provider-network;
316 description "Extra parameters for VLD instantiation";
318 case vim-network-ref {
319 leaf vim-network-name {
321 "Name of network in VIM account. This is used to indicate
322 pre-provisioned network name in cloud account.";
327 case vim-network-profile {
328 leaf ip-profile-ref {
329 description "Named reference to IP-profile object";
337 uses manotypes:ip-profile-list;
339 list connection-point {
342 "List for external connection points. Each VNF has one
343 or more external connection points that connect the VNF
344 to other VNFs or to external networks. Each VNF exposes
345 connection points to the orchestrator, which can construct
346 network services by connecting the connection points
347 between different VNFs. The NFVO will use VLDs and VNFFGs
348 at the network service level to construct network services.";
350 uses common-connection-point;
352 leaf internal-vld-ref {
354 "Reference to an internal VLD of the VNF. This field is
355 optional. It allows exposing an internal VLD through a
356 connection point. When building a NS, this VNF CP might be
357 connected to a NS VLD, then both VLDs (the i-VLD of the VNF and the
358 VLD of the NS) will become the same network and the IP profile will
359 be the one configured at NS level.";
361 path "../../internal-vld/id";
367 description "List of Virtual Deployment Units";
371 description "Unique id for the VDU";
376 description "Unique name for the VDU";
381 description "Description of the VDU.";
387 "Type of PDU. If this field exists, the deployment unit must be
388 understood as a PDU, not as a VDU. This field is used to identify
389 the category of PDU instances to be used at instantiation time. For
390 the instantiation to be successful, there must be available
391 PDU instances of this type in the selected datacenter.";
396 description "Number of instances of VDU";
402 "Specifies the virtual PCI address. Expressed in
403 the following format dddd:dd:dd.d. For example
404 0000:00:12.0. This information can be used to
405 pass as metadata during the VM creation.";
409 uses manotypes:vm-flavor;
410 uses manotypes:guest-epa;
411 uses manotypes:vswitch-epa;
412 uses manotypes:hypervisor-epa;
413 uses manotypes:host-epa;
418 uses manotypes:alarm;
421 uses manotypes:image-properties;
423 list alternative-images {
426 "List of alternative images per VIM type.
427 Different images can be used for specific types of VIMs instead
428 of the default image. This allows deployments in sites where the
429 image identifier in the VIM is given by the VIM provider and
431 If an alternative image is specified for a VIM type, it will prevail
432 over the default image";
435 description "VIM type: openvim, openstack, vmware, aws, etc.";
439 uses manotypes:image-properties;
442 container vdu-configuration {
443 uses manotypes:vca-configuration;
446 list monitoring-param {
448 "List of VDU-related monitoring parameters at NFVI level";
451 description "The unique id of the monitoring param at VDU level";
456 description "The associated NFVI metric to be monitored";
457 type manotypes:nfvi-metric-type;
460 leaf interface-name-ref {
462 "Reference to a VDU interface name. Applicable only when the nfvi-metric
463 refers to an interface and not to the VM";
465 path "../../interface/name";
470 choice cloud-init-input {
472 "Indicates how the contents of cloud-init script are provided.
473 There are 2 choices - inline or in a file";
478 "Contents of cloud-init script, provided inline, in cloud-config format";
484 leaf cloud-init-file {
486 "Name of file with contents of cloud-init script in cloud-config format";
492 uses manotypes:supplemental-boot-data;
494 list internal-connection-point {
497 "List for internal connection points. Each VNFC
498 has zero or more internal connection points.
499 Internal connection points are used for connecting
500 the VNF with components internal to the VNF. If a VNF
501 has only one VNFC, it may not have any internal
504 uses common-connection-point;
506 leaf internal-vld-ref {
508 path "../../../internal-vld/id";
515 "List of Interfaces (external and internal) for the VNF";
520 "Name of the interface. Note that this
521 name has only local significance to the VDU.";
527 "Explicit Position of the interface within the list";
531 leaf mgmt-interface {
533 "Flag to indicate that this is the mgmt interface
534 to be used for VDU configuration";
541 "Type of the Interface";
549 "MAC address of the interface.
550 Some VNFs require a specific MAC address to be configured
551 in the interface. While this is not recommended at all in
552 NFV environments, this parameter exists to allow those
554 This parameter will be likely deprecated in the future.";
558 choice connection-point-type {
560 leaf internal-connection-point-ref {
562 "Leaf Ref to the particular internal connection point";
564 path "../../internal-connection-point/id";
569 leaf external-connection-point-ref {
571 "Leaf Ref to the particular external connection point";
573 path "../../../connection-point/name";
579 uses virtual-interface;
587 description "Name of the disk-volumes, e.g. vda, vdb etc";
591 uses manotypes:volume-info;
595 list vdu-dependency {
597 "List of VDU dependencies.";
600 leaf vdu-source-ref {
606 leaf vdu-depends-on-ref {
608 "Reference to the VDU on which
609 the source VDU depends.";
616 leaf service-function-chain {
617 description "Type of node in Service Function Chaining Architecture";
628 leaf service-function-type {
630 "Type of Service Function.
631 NOTE: This needs to map with Service Function Type in ODL to
632 support VNFFG. Service Function Type is mandatory param in ODL
633 SFC. This is temporarily set to string for ease of use";
637 uses manotypes:http-endpoints;
639 list scaling-group-descriptor {
641 "scaling group descriptor within the VNF.
642 The scaling group defines a group of VDUs,
643 and the ratio of VDUs in the VNF
644 that is used as target for scaling action";
649 description "Name of this scaling group.";
653 list scaling-policy {
659 "Name of the scaling policy";
666 type manotypes:scaling-policy-type;
671 "Specifies if the scaling policy can be applied";
676 leaf scale-in-operation-type {
678 "Operation to be applied to check between scaling criterias to
679 check if the scale in threshold condition has been met.
681 type manotypes:scaling-criteria-operation;
685 leaf scale-out-operation-type {
687 "Operation to be applied to check between scaling criterias to
688 check if the scale out threshold condition has been met.
690 type manotypes:scaling-criteria-operation;
694 leaf threshold-time {
696 "The duration for which the criteria must hold true";
703 "The duration after a scaling-in/scaling-out action has been
704 triggered, for which there will be no further optional";
709 list scaling-criteria {
711 "list of conditions to be met for generating scaling
719 leaf scale-in-threshold {
721 "Value below which scale-in requests are generated";
725 leaf scale-in-relational-operation {
727 "The relational operator used to compare the monitoring param
728 against the scale-in-threshold.";
729 type manotypes:relational-operation-type;
733 leaf scale-out-threshold {
735 "Value above which scale-out requests are generated";
739 leaf scale-out-relational-operation {
741 "The relational operator used to compare the monitoring param
742 against the scale-out-threshold.";
743 type manotypes:relational-operation-type;
747 leaf vnf-monitoring-param-ref {
749 "Reference to the VNF level monitoring parameter
752 path "../../../../monitoring-param/id";
759 description "List of VDUs in this scaling group";
763 description "Reference to the VDU id";
765 path "../../../vdu/id";
771 "count of this VDU id within this scaling group.
772 The count allows to define the number of instances
773 when a scaling action targets this scaling group";
779 leaf min-instance-count {
781 "Minimum instances of the scaling group which are allowed.
782 These instances are created by default when the network service
788 leaf max-instance-count {
790 "Maximum instances of this scaling group that are allowed
791 in a single network service. The network service scaling
792 will fail, when the number of service group instances
793 exceed the max-instance-count specified.";
798 list scaling-config-action {
799 description "List of scaling config actions";
803 description "scaling trigger";
804 type manotypes:scaling-trigger;
807 leaf vnf-config-primitive-name-ref {
808 description "Reference to the VNF config primitive";
810 path "../../../vnf-configuration/config-primitive/name";
816 list monitoring-param {
818 "List of monitoring parameters at the network service level";
828 uses manotypes:monitoring-param-aggregation;
830 choice monitoring-type {
832 "Defines the type of monitoring param to be used:
833 * vdu-monitorin-param: VDU-related metric (from NFVI)
834 * vnf-metric: VNF-related metric (from VCA)
835 * vdu-metric: VDU-related metric (from VCA)
838 case vdu-monitoring-param {
839 description "VDU-related metric from the infrastructure";
845 leaf vdu-monitoring-param-ref {
847 path "../../vdu[id = current()/../vdu-ref]/monitoring-param/id";
853 description "VNF-related metric (from VCA)";
854 leaf vnf-metric-name-ref {
856 path "../../vnf-configuration/metrics/name";
862 description "VDU-related metric (from VCA)";
868 leaf vdu-metric-name-ref {
870 path "../../vdu[id = current()/../vdu-id-ref]/vdu-configuration/metrics/name";
877 leaf http-endpoint-ref {
879 path "../../http-endpoint/path";
883 leaf json-query-method {
884 type manotypes:json-query-method;
888 container json-query-params {
891 "The jsonpath to use to extract value from JSON structure";
896 "The objectpath to use to extract value from JSON structure";
901 uses manotypes:monitoring-param-ui-data;
902 uses manotypes:monitoring-param-value;
906 list placement-groups {
907 description "List of placement groups at VNF level";
910 uses manotypes:placement-group-info;
915 "List of VDUs that are part of this placement group";
916 key "member-vdu-ref";
918 leaf member-vdu-ref {
920 path "../../../vdu/id";