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:ietf:params:xml:ns:yang:nfvo: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 VIRTIO : Use the traditional VIRTIO interface.
124 PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
125 SR-IOV : Use SR-IOV interface.";
128 enum PCI-PASSTHROUGH;
135 "Aggregate bandwidth of the NIC.";
141 "Defines if the NIC supports OVS offload.
142 MANDATORY : OVS offload support in the NIC is mandatory.
143 PREFERRED : OVS offload support in the NIC is preferred.";
152 "Specifies the vendor specific id for
153 the device. This is used when a NIC from
154 specific HW vendor is required.";
158 leaf datapath-library {
160 "Specifies the name and version of the datapath
161 library the NIC is expected to support.";
165 leaf provider-network-name {
167 "Name of the provider network to which this
174 grouping associated-virtual-cps {
177 uses vnfd-base:common-connection-point;
181 "IP address assigned to the virtual connection point";
182 type inet:ip-address;
187 "MAC address assigned to the virtual connection point";
191 leaf connection-point-id {
192 description "VIM identifier for connection point";
198 augment "/rw-project:project" {
199 container vnfr-catalog {
200 leaf schema-version {
201 description "Schema version for the VNFR. If unspecified, it assumes v3.0";
209 "Virtual Network Function Record (VNFR).";
214 description "Identifier for the VNFR.";
220 "NS instance identifier.
221 This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id";
225 leaf member-vnf-index-ref {
226 description "Reference to member VNF index in Network service.";
228 path "../../../project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:constituent-vnfd/project-nsd:member-vnf-index";
233 description "Dashboard URL";
238 description "VNFR name.";
243 description "VNFR short name.";
248 description "Vendor of the VNFR.";
253 description "Description of the VNFR.";
258 description "Version of the VNFR";
264 "Creation timestamp of this Virtual Network
265 Function. The timestamp is expressed as
266 seconds since unix epoch - 1970-01-01T00:00:00Z";
273 "Active period of this Virtual Network Function.
274 Uptime is expressed in seconds";
280 description "VNF descriptor used to instantiate this VNF";
281 uses vnfd-base:vnfd-descriptor;
285 description "Reference to VNFD";
287 path "../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
291 // Use parameters provided here to configure this VNF
292 container vnf-configuration {
293 uses manotypes:vca-configuration;
296 // Mainly used by Mon-params & dashboard url
297 container mgmt-interface {
299 type inet:ip-address;
303 type inet:port-number;
307 description "SSH key pair used for this VNF";
309 description "Public key configured on this VNF";
313 leaf private-key-file {
314 description "Path to the private key file";
324 description "Reference to a VLR record in the VLR catalog";
326 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
330 leaf-list internal-connection-point-ref {
332 path "../../vdur/internal-connection-point/id";
337 list connection-point {
340 "List for external connection points. Each VNF has one
341 or more external connection points. As the name
342 implies that external connection points are used for
343 connecting the VNF to other VNFs or to external networks.
344 Each VNF exposes these connection points to the
345 orchestrator. The orchestrator can construct network
346 services by connecting the connection points between
347 different VNFs. The NFVO will use VLDs and VNFFGs at
348 the network service level to construct network services.";
350 uses vnfd-base:common-connection-point;
354 "Reference to the VLR associated with this connection point";
356 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
362 "IP address assigned to the external connection point";
363 type inet:ip-address;
368 "MAC address assigned to the external connection point";
369 // type inet:mac-address;
373 leaf connection-point-id {
377 uses associated-virtual-cps;
381 description "List of Virtual Deployment Units";
386 description "Unique id for the VDU";
391 description "name of the instantiated VDUR";
395 leaf unique-short-name {
396 description "Short Unique name of the VDU
397 This will be of the format NSR name-ShortnedString-VDUname
398 NSR name and VDU name shall be constrained to 10 characters";
404 path "../../vnfd/vdu/id";
409 description "Allocated VM resource id";
414 description "VIM assigned flavor id";
419 description "VIM assigned image id";
424 description "Management IP address";
425 type inet:ip-address;
428 leaf vm-management-ip {
429 description "VM Private Management IP address";
430 type inet:ip-address;
434 description "Console URL for this VDU, if available";
438 uses manotypes:vm-flavor;
439 uses manotypes:guest-epa;
440 uses manotypes:vswitch-epa;
441 uses manotypes:hypervisor-epa;
442 uses manotypes:host-epa;
444 uses manotypes:supplemental-boot-data;
446 container vdu-configuration {
447 uses manotypes:vca-configuration;
454 description "Name of the disk-volumes, e.g. vda, vdb etc";
459 description "VIM assigned volume id";
463 uses manotypes:volume-info;
466 list internal-connection-point {
469 "List for internal connection points. Each VNFC
470 has zero or more internal connection points.
471 Internal connection points are used for connecting
472 the VNF components internal to the VNF. If a VNF
473 has only one VNFC, it may not have any internal
476 uses vnfd-base:common-connection-point;
480 "IP address assigned to the internal connection point";
481 type inet:ip-address;
486 "MAC address assigned to the internal connection point";
487 // type inet:mac-address;
491 leaf connection-point-id {
495 uses associated-virtual-cps;
500 "List of interfaces (internal and external) for the VNF";
505 "Name of the interface. Note that this
506 name has only local significance to the VDU.";
512 "Explicit Position of the interface within the list";
518 "Type of the Interface";
520 type vnfd-base:interface-type;
524 choice connection-point-type {
526 leaf internal-connection-point-ref {
528 "Leaf Ref to the particular internal connection point";
530 path "../../internal-connection-point/id";
535 leaf external-connection-point-ref {
537 "Leaf Ref to the particular external connection point";
539 path "../../../connection-point/name";
544 uses virtual-interface;
547 leaf operational-status {
549 "The operational status of the VDU
550 init : The VDU has just started.
551 vm-init-phase : The VDUs in the VNF is being created in VIM.
552 vm-alloc-pending : The VM alloc is pending in VIM
553 running : The VDU is active in VM
554 upgrading : The VDU is being upgraded (EXPERIMENTAL)
555 terminate : The VDU is being terminated
556 vm-terminate-phase : The VDU in the VNF is being terminated in VIM.
557 terminated : The VDU is in the terminated state.
558 failed : The VDU instantiation failed.
560 type vdu-operational-status;
563 uses placement-group-info;
566 uses manotypes:monitoring-param;
568 leaf operational-status {
570 "The operational status of the VNFR instance
571 pre-init : The VNF before Input Param Substitution.
572 init : The VNF has just started.
573 vl-init-phase : The internal VLs in the VNF are being instantiated.
574 vm-init-phase : The VMs for VDUs in the VNF are being instantiated.
575 running : The VNF is in running state.
576 terminate : The VNF is being terminated.
577 vm-terminate-phase : The VMs in the VNF are being terminated.
578 vl-terminate-phase : The internal VLs in the VNF are being terminated.
579 terminated : The VNF is in the terminated state.
580 failed : The VNF instantiation failed
582 type vnf-operational-status;
587 "The configuration status of the NS instance
588 configuring: At least one of the VNFs in this instance is in configuring state
589 configured: All the VNFs in this NS instance are configured or config-not-needed state
602 enum config-not-needed {
607 uses placement-group-info;
609 container cloud-config {
610 uses manotypes:cloud-config;