4 * Copyright 2016-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:vnfr";
35 prefix "project-vnfd";
46 import ietf-yang-types {
50 import ietf-inet-types {
60 "Update model to support projects.";
65 "Initial revision. This YANG file defines
66 the Virtual Network Function Record (VNFR)";
68 "Derived from earlier versions of base YANG files";
71 typedef vdu-operational-status {
75 enum vm-alloc-pending;
79 enum vl-terminate-phase;
85 typedef vnf-operational-status {
92 enum upgrading; // Experimental
94 enum vm-terminate-phase;
95 enum vl-terminate-phase;
101 grouping placement-group-info {
102 list placement-groups-info {
105 Placement groups to which this VDU belongs and its
109 uses manotypes:placement-group-info;
110 uses manotypes:placement-group-input;
114 grouping virtual-interface {
115 container virtual-interface {
117 "Container for the virtual interface properties";
121 "Specifies the type of virtual interface
123 PARAVIRT : Use the default paravirtualized interface for the VIM (virtio, vmxnet3, etc.).
124 VIRTIO : Deprecated! Use the traditional VIRTIO interface.
125 PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
126 SR-IOV : Use SR-IOV interface.";
130 enum PCI-PASSTHROUGH;
137 "Aggregate bandwidth of the NIC.";
143 "Defines if the NIC supports OVS offload.
144 MANDATORY : OVS offload support in the NIC is mandatory.
145 PREFERRED : OVS offload support in the NIC is preferred.";
154 "Specifies the vendor specific id for
155 the device. This is used when a NIC from
156 specific HW vendor is required.";
160 leaf datapath-library {
162 "Specifies the name and version of the datapath
163 library the NIC is expected to support.";
167 leaf provider-network-name {
169 "Name of the provider network to which this
176 grouping associated-virtual-cps {
179 uses vnfd-base:common-connection-point;
183 "IP address assigned to the virtual connection point";
184 type inet:ip-address;
189 "MAC address assigned to the virtual connection point";
193 leaf connection-point-id {
194 description "VIM identifier for connection point";
200 augment "/osm-project:project" {
201 container vnfr-catalog {
202 leaf schema-version {
203 description "Schema version for the VNFR. If unspecified, it assumes v3.0";
211 "Virtual Network Function Record (VNFR).";
216 description "Identifier for the VNFR.";
222 "NS instance identifier.
223 This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id";
227 leaf member-vnf-index-ref {
228 description "Reference to member VNF index in Network service.";
230 path "../../../project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:constituent-vnfd/project-nsd:member-vnf-index";
235 description "Dashboard URL";
240 description "VNFR name.";
245 description "VNFR short name.";
250 description "Vendor of the VNFR.";
255 description "Description of the VNFR.";
260 description "Version of the VNFR";
266 "Creation timestamp of this Virtual Network
267 Function. The timestamp is expressed as
268 seconds since unix epoch - 1970-01-01T00:00:00Z";
275 "Active period of this Virtual Network Function.
276 Uptime is expressed in seconds";
282 description "VNF descriptor used to instantiate this VNF";
283 uses vnfd-base:vnfd-descriptor;
287 description "Reference to VNFD";
289 path "../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
293 // Use parameters provided here to configure this VNF
294 container vnf-configuration {
295 uses manotypes:vca-configuration;
298 // Mainly used by Mon-params & dashboard url
299 container mgmt-interface {
301 type inet:ip-address;
305 type inet:port-number;
309 description "SSH key pair used for this VNF";
311 description "Public key configured on this VNF";
315 leaf private-key-file {
316 description "Path to the private key file";
326 description "Reference to a VLR record in the VLR catalog";
328 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
332 leaf-list internal-connection-point-ref {
334 path "../../vdur/internal-connection-point/id";
339 list connection-point {
342 "List for external connection points. Each VNF has one
343 or more external connection points. As the name
344 implies that external connection points are used for
345 connecting the VNF to other VNFs or to external networks.
346 Each VNF exposes these connection points to the
347 orchestrator. The orchestrator can construct network
348 services by connecting the connection points between
349 different VNFs. The NFVO will use VLDs and VNFFGs at
350 the network service level to construct network services.";
352 uses vnfd-base:common-connection-point;
356 "Reference to the VLR associated with this connection point";
358 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
364 "IP address assigned to the external connection point";
365 type inet:ip-address;
370 "MAC address assigned to the external connection point";
371 // type inet:mac-address;
375 leaf connection-point-id {
379 uses associated-virtual-cps;
383 description "List of Virtual Deployment Units";
388 description "Unique id for the VDU";
393 description "name of the instantiated VDUR";
397 leaf unique-short-name {
398 description "Short Unique name of the VDU
399 This will be of the format NSR name-ShortnedString-VDUname
400 NSR name and VDU name shall be constrained to 10 characters";
406 path "../../vnfd/vdu/id";
411 description "Allocated VM resource id";
416 description "VIM assigned flavor id";
421 description "VIM assigned image id";
426 description "Management IP address";
427 type inet:ip-address;
430 leaf vm-management-ip {
431 description "VM Private Management IP address";
432 type inet:ip-address;
436 description "Console URL for this VDU, if available";
440 uses manotypes:vm-flavor;
441 uses manotypes:guest-epa;
442 uses manotypes:vswitch-epa;
443 uses manotypes:hypervisor-epa;
444 uses manotypes:host-epa;
446 uses manotypes:supplemental-boot-data;
448 container vdu-configuration {
449 uses manotypes:vca-configuration;
452 list monitoring-param {
454 "List of VDU-related monitoring parameters at NFVI level";
457 description "The unique id of the monitoring param at VDU level";
462 description "The associated NFVI metric to be monitored";
463 type manotypes:nfvi-metric-type;
466 leaf interface-name-ref {
468 "Reference to a VDU interface name. Applicable only when the nfvi-metric
469 refers to an interface and not to the VM";
471 path "../../interface/name";
480 description "Name of the disk-volumes, e.g. vda, vdb etc";
485 description "VIM assigned volume id";
489 uses manotypes:volume-info;
492 list internal-connection-point {
495 "List for internal connection points. Each VNFC
496 has zero or more internal connection points.
497 Internal connection points are used for connecting
498 the VNF components internal to the VNF. If a VNF
499 has only one VNFC, it may not have any internal
502 uses vnfd-base:common-connection-point;
506 "IP address assigned to the internal connection point";
507 type inet:ip-address;
512 "MAC address assigned to the internal connection point";
513 // type inet:mac-address;
517 leaf connection-point-id {
521 uses associated-virtual-cps;
526 "List of interfaces (internal and external) for the VNF";
531 "Name of the interface. Note that this
532 name has only local significance to the VDU.";
538 "Explicit Position of the interface within the list";
544 "Type of the Interface";
546 type vnfd-base:interface-type;
550 choice connection-point-type {
552 leaf internal-connection-point-ref {
554 "Leaf Ref to the particular internal connection point";
556 path "../../internal-connection-point/id";
561 leaf external-connection-point-ref {
563 "Leaf Ref to the particular external connection point";
565 path "../../../connection-point/name";
570 uses virtual-interface;
573 leaf operational-status {
575 "The operational status of the VDU
576 init : The VDU has just started.
577 vm-init-phase : The VDUs in the VNF is being created in VIM.
578 vm-alloc-pending : The VM alloc is pending in VIM
579 running : The VDU is active in VM
580 upgrading : The VDU is being upgraded (EXPERIMENTAL)
581 terminate : The VDU is being terminated
582 vm-terminate-phase : The VDU in the VNF is being terminated in VIM.
583 terminated : The VDU is in the terminated state.
584 failed : The VDU instantiation failed.
586 type vdu-operational-status;
589 uses placement-group-info;
592 list monitoring-param {
594 "List of monitoring parameters at the network service level";
604 uses manotypes:monitoring-param-aggregation;
606 choice monitoring-type {
608 "Defines the type of monitoring param to be used:
609 * vdu-monitorin-param: VDU-related metric (from NFVI)
610 * vnf-metric: VNF-related metric (from VCA)
611 * vdu-metric: VDU-related metric (from VCA)
614 case vdu-monitoring-param {
615 description "VDU-related metric from the infrastructure";
616 container vdu-monitoring-param {
619 path "../../../vdur/id";
622 leaf vdu-monitoring-param-ref {
624 path "../../../vdur[id = current()/../vdu-ref]/monitoring-param/id";
631 description "VNF-related metric (from VCA)";
632 container vnf-metric {
633 leaf vnf-metric-name-ref {
635 path "../../../vnf-configuration/metrics/name";
642 description "VDU-related metric (from VCA)";
643 container vdu-metric {
646 path "../../../vdur/id";
649 leaf vdu-metric-name-ref {
651 path "../../../vdur[id = current()/../vdu-ref]/vdu-configuration/metrics/name";
661 leaf operational-status {
663 "The operational status of the VNFR instance
664 pre-init : The VNF before Input Param Substitution.
665 init : The VNF has just started.
666 vl-init-phase : The internal VLs in the VNF are being instantiated.
667 vm-init-phase : The VMs for VDUs in the VNF are being instantiated.
668 running : The VNF is in running state.
669 terminate : The VNF is being terminated.
670 vm-terminate-phase : The VMs in the VNF are being terminated.
671 vl-terminate-phase : The internal VLs in the VNF are being terminated.
672 terminated : The VNF is in the terminated state.
673 failed : The VNF instantiation failed
675 type vnf-operational-status;
680 "The configuration status of the NS instance
681 configuring: At least one of the VNFs in this instance is in configuring state
682 configured: All the VNFs in this NS instance are configured or config-not-needed state
695 enum config-not-needed {
700 uses placement-group-info;
702 container cloud-config {
703 uses manotypes:cloud-config;