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;
78 enum vl-terminate-phase;
84 typedef vnf-operational-status {
92 enum vm-terminate-phase;
93 enum vl-terminate-phase;
99 grouping placement-group-info {
100 list placement-groups-info {
103 Placement groups to which this VDU belongs and its
107 uses manotypes:placement-group-info;
108 uses manotypes:placement-group-input;
112 grouping virtual-interface {
113 container virtual-interface {
115 "Container for the virtual interface properties";
119 "Specifies the type of virtual interface
121 VIRTIO : Use the traditional VIRTIO interface.
122 PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
123 SR-IOV : Use SR-IOV interface.";
126 enum PCI-PASSTHROUGH;
133 "Aggregate bandwidth of the NIC.";
139 "Defines if the NIC supports OVS offload.
140 MANDATORY : OVS offload support in the NIC is mandatory.
141 PREFERRED : OVS offload support in the NIC is preferred.";
150 "Specifies the vendor specific id for
151 the device. This is used when a NIC from
152 specific HW vendor is required.";
156 leaf datapath-library {
158 "Specifies the name and version of the datapath
159 library the NIC is expected to support.";
163 leaf provider-network-name {
165 "Name of the provider network to which this
172 grouping associated-virtual-cps {
175 uses vnfd-base:common-connection-point;
179 "IP address assigned to the virtual connection point";
180 type inet:ip-address;
185 "MAC address assigned to the virtual connection point";
189 leaf connection-point-id {
190 description "VIM identifier for connection point";
196 augment "/rw-project:project" {
197 container vnfr-catalog {
201 "Virtual Network Function Record (VNFR).";
206 description "Identifier for the VNFR.";
212 "NS instance identifier.
213 This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id";
217 leaf member-vnf-index-ref {
218 description "Reference to member VNF index in Network service.";
220 path "../../../project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:constituent-vnfd/project-nsd:member-vnf-index";
225 description "Dashboard URL";
230 description "VNFR name.";
235 description "VNFR short name.";
240 description "Vendor of the VNFR.";
245 description "Description of the VNFR.";
250 description "Version of the VNFR";
256 "Creation timestamp of this Virtual Network
257 Function. The timestamp is expressed as
258 seconds since unix epoch - 1970-01-01T00:00:00Z";
265 "Active period of this Virtual Network Function.
266 Uptime is expressed in seconds";
272 description "VNF descriptor used to instantiate this VNF";
273 uses vnfd-base:vnfd-descriptor;
277 description "Reference to VNFD";
279 path "../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
283 // Use parameters provided here to configure this VNF
284 container vnf-configuration {
285 uses manotypes:vca-configuration;
288 // Mainly used by Mon-params & dashboard url
289 container mgmt-interface {
291 type inet:ip-address;
295 type inet:port-number;
299 description "SSH key pair used for this VNF";
301 description "Public key configured on this VNF";
305 leaf private-key-file {
306 description "Path to the private key file";
316 description "Reference to a VLR record in the VLR catalog";
318 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
322 leaf-list internal-connection-point-ref {
324 path "../../vdur/internal-connection-point/id";
329 list connection-point {
332 "List for external connection points. Each VNF has one
333 or more external connection points. As the name
334 implies that external connection points are used for
335 connecting the VNF to other VNFs or to external networks.
336 Each VNF exposes these connection points to the
337 orchestrator. The orchestrator can construct network
338 services by connecting the connection points between
339 different VNFs. The NFVO will use VLDs and VNFFGs at
340 the network service level to construct network services.";
342 uses vnfd-base:common-connection-point;
346 "Reference to the VLR associated with this connection point";
348 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
354 "IP address assigned to the external connection point";
355 type inet:ip-address;
360 "MAC address assigned to the external connection point";
361 // type inet:mac-address;
365 leaf connection-point-id {
369 uses associated-virtual-cps;
373 description "List of Virtual Deployment Units";
378 description "Unique id for the VDU";
383 description "name of the instantiated VDUR";
387 leaf unique-short-name {
388 description "Short Unique name of the VDU
389 This will be of the format NSR name-ShortnedString-VDUname
390 NSR name and VDU name shall be constrained to 10 characters";
396 path "../../vnfd/vdu/id";
401 description "Allocated VM resource id";
406 description "VIM assigned flavor id";
411 description "VIM assigned image id";
416 description "Management IP address";
417 type inet:ip-address;
420 leaf vm-management-ip {
421 description "VM Private Management IP address";
422 type inet:ip-address;
426 description "Console URL for this VDU, if available";
430 uses manotypes:vm-flavor;
431 uses manotypes:guest-epa;
432 uses manotypes:vswitch-epa;
433 uses manotypes:hypervisor-epa;
434 uses manotypes:host-epa;
436 uses manotypes:supplemental-boot-data;
438 container vdu-configuration {
439 uses manotypes:vca-configuration;
446 description "Name of the disk-volumes, e.g. vda, vdb etc";
451 description "VIM assigned volume id";
455 uses manotypes:volume-info;
458 list internal-connection-point {
461 "List for internal connection points. Each VNFC
462 has zero or more internal connection points.
463 Internal connection points are used for connecting
464 the VNF components internal to the VNF. If a VNF
465 has only one VNFC, it may not have any internal
468 uses vnfd-base:common-connection-point;
472 "IP address assigned to the internal connection point";
473 type inet:ip-address;
478 "MAC address assigned to the internal connection point";
479 // type inet:mac-address;
483 leaf connection-point-id {
487 uses associated-virtual-cps;
492 "List of interfaces (internal and external) for the VNF";
497 "Name of the interface. Note that this
498 name has only local significance to the VDU.";
504 "Explicit Position of the interface within the list";
510 "Type of the Interface";
512 type vnfd-base:interface-type;
516 choice connection-point-type {
518 leaf internal-connection-point-ref {
520 "Leaf Ref to the particular internal connection point";
522 path "../../internal-connection-point/id";
527 leaf external-connection-point-ref {
529 "Leaf Ref to the particular external connection point";
531 path "../../../connection-point/name";
536 uses virtual-interface;
539 leaf operational-status {
541 "The operational status of the VDU
542 init : The VDU has just started.
543 vm-init-phase : The VDUs in the VNF is being created in VIM.
544 vm-alloc-pending : The VM alloc is pending in VIM
545 running : The VDU is active in VM
546 terminate : The VDU is being terminated
547 vm-terminate-phase : The VDU in the VNF is being terminated in VIM.
548 terminated : The VDU is in the terminated state.
549 failed : The VDU instantiation failed.
551 type vdu-operational-status;
554 uses placement-group-info;
557 uses manotypes:monitoring-param;
559 leaf operational-status {
561 "The operational status of the VNFR instance
562 pre-init : The VNF before Input Param Substitution.
563 init : The VNF has just started.
564 vl-init-phase : The internal VLs in the VNF are being instantiated.
565 vm-init-phase : The VMs for VDUs in the VNF are being instantiated.
566 running : The VNF is in running state.
567 terminate : The VNF is being terminated.
568 vm-terminate-phase : The VMs in the VNF are being terminated.
569 vl-terminate-phase : The internal VLs in the VNF are being terminated.
570 terminated : The VNF is in the terminated state.
571 failed : The VNF instantiation failed
573 type vnf-operational-status;
578 "The configuration status of the NS instance
579 configuring: At least one of the VNFs in this instance is in configuring state
580 configured: All the VNFs in this NS instance are configured or config-not-needed state
593 enum config-not-needed {
598 uses placement-group-info;
600 container cloud-config {
601 uses manotypes:cloud-config;