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";
46 import ietf-yang-types {
50 import ietf-inet-types {
64 "Update model to support projects.";
69 "Initial revision. This YANG file defines
70 the Virtual Network Function Record (VNFR)";
72 "Derived from earlier versions of base YANG files";
75 grouping placement-group-info {
76 list placement-groups-info {
79 Placement groups to which this VDU belongs and its
83 uses manotypes:placement-group-info;
84 uses manotypes:placement-group-input;
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.";
103 enum PCI-PASSTHROUGH;
110 "Aggregate bandwidth of the NIC.";
116 "Defines if the NIC supports OVS offload.
117 MANDATORY : OVS offload support in the NIC is mandatory.
118 PREFERRED : OVS offload support in the NIC is preferred.";
127 "Specifies the vendor specific id for
128 the device. This is used when a NIC from
129 specific HW vendor is required.";
133 leaf datapath-library {
135 "Specifies the name and version of the datapath
136 library the NIC is expected to support.";
140 leaf provider-network-name {
142 "Name of the provider network to which this
149 augment "/rw-project:project" {
150 container vnfr-catalog {
154 "Virtual Network Function Record (VNFR).";
159 description "Identifier for the VNFR.";
165 "NS instance identifier.
166 This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id";
170 leaf member-vnf-index-ref {
171 description "Reference to member VNF index in Network service.";
173 path "../../../project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:constituent-vnfd/project-nsd:member-vnf-index";
178 description "Dashboard URL";
183 description "VNFR name.";
188 description "VNFR short name.";
193 description "Vendor of the VNFR.";
198 description "Description of the VNFR.";
203 description "Version of the VNFR";
209 "Creation timestamp of this Virtual Network
210 Function. The timestamp is expressed as
211 seconds since unix epoch - 1970-01-01T00:00:00Z";
218 "Active period of this Virtual Network Function.
219 Uptime is expressed in seconds";
225 description "VNF descriptor used to instantiate this VNF";
226 uses vnfd-base:vnfd-descriptor;
229 // Use parameters provided here to configure this VNF
230 uses manotypes:vnf-configuration;
232 // Mainly used by Mon-params & dashboard url
233 container mgmt-interface {
235 type inet:ip-address;
238 type inet:port-number;
246 description "Reference to a VLR record in the VLR catalog";
248 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
252 leaf-list internal-connection-point-ref {
254 path "../../vdur/internal-connection-point/id";
259 list connection-point {
262 "List for external connection points. Each VNF has one
263 or more external connection points. As the name
264 implies that external connection points are used for
265 connecting the VNF to other VNFs or to external networks.
266 Each VNF exposes these connection points to the
267 orchestrator. The orchestrator can construct network
268 services by connecting the connection points between
269 different VNFs. The NFVO will use VLDs and VNFFGs at
270 the network service level to construct network services.";
272 uses vnfd-base:common-connection-point;
276 "Reference to the VLR associated with this connection point";
278 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
284 "IP address assigned to the external connection point";
285 type inet:ip-address;
289 "MAC address assigned to the external connection point";
290 // type inet:mac-address;
293 leaf connection-point-id {
294 rwpb:field-inline "true";
295 rwpb:field-string-max 64;
301 description "List of Virtual Deployment Units";
306 description "Unique id for the VDU";
311 description "name of the instantiated VDUR";
317 path "../../vnfd/vdu/id";
322 description "Allocated VM resource id";
327 description "VIM assigned flavor id";
332 description "VIM assigned image id";
337 description "Management IP address";
338 type inet:ip-address;
341 leaf vm-management-ip {
342 description "VM Private Management IP address";
343 type inet:ip-address;
347 description "Console URL for this VDU, if available";
351 uses manotypes:vm-flavor;
352 uses manotypes:guest-epa;
353 uses manotypes:vswitch-epa;
354 uses manotypes:hypervisor-epa;
355 uses manotypes:host-epa;
357 uses manotypes:supplemental-boot-data;
363 description "Name of the disk-volumes, e.g. vda, vdb etc";
368 description "VIM assigned volume id";
372 uses manotypes:volume-info;
377 "A list of the alarms that have been created for this VDU";
380 uses manotypes:alarm;
383 list internal-connection-point {
386 "List for internal connection points. Each VNFC
387 has zero or more internal connection points.
388 Internal connection points are used for connecting
389 the VNF components internal to the VNF. If a VNF
390 has only one VNFC, it may not have any internal
393 uses vnfd-base:common-connection-point;
397 "IP address assigned to the internal connection point";
398 type inet:ip-address;
402 "MAC address assigned to the internal connection point";
403 // type inet:mac-address;
408 list internal-interface {
410 "List of internal interfaces for the VNF";
415 "Name of internal interface. Note that this
416 name has only local significance to the VDU.";
420 leaf vdur-internal-connection-point-ref {
422 path "../../internal-connection-point/id";
425 uses virtual-interface;
428 list external-interface {
430 "List of external interfaces for the VNF.
431 The external interfaces enable sending
432 traffic to and from VNF.";
437 "Name of the external interface. Note that
438 this name has only local significance.";
442 leaf vnfd-connection-point-ref {
444 "Name of the external connection point.";
446 path "../../../connection-point/name";
449 uses virtual-interface;
451 leaf operational-status {
453 "The operational status of the VDU
454 init : The VDU has just started.
455 vm-init-phase : The VDUs in the VNF is being created in VIM.
456 vm-alloc-pending : The VM alloc is pending in VIM
457 running : The VDU is active in VM
458 terminate : The VDU is being terminated
459 vm-terminate-phase : The VDU in the VNF is being terminated in VIM.
460 terminated : The VDU is in the terminated state.
461 failed : The VDU instantiation failed.
465 rwpb:enum-type "VduOperationalStatus";
468 enum vm-alloc-pending;
471 enum vl-terminate-phase;
476 uses placement-group-info;
479 uses manotypes:monitoring-param;
481 leaf operational-status {
483 "The operational status of the VNFR instance
484 init : The VNF has just started.
485 vl-init-phase : The internal VLs in the VNF are being instantiated.
486 vm-init-phase : The VMs for VDUs in the VNF are being instantiated.
487 running : The VNF is in running state.
488 terminate : The VNF is being terminated.
489 vm-terminate-phase : The VMs in the VNF are being terminated.
490 vl-terminate-phase : The internal VLs in the VNF are being terminated.
491 terminated : The VNF is in the terminated state.
492 failed : The VNF instantiation failed
496 rwpb:enum-type "VnfrOperationalStatus";
502 enum vm-terminate-phase;
503 enum vl-terminate-phase;
510 "The configuration status of the NS instance
511 configuring: At least one of the VNFs in this instance is in configuring state
512 configured: All the VNFs in this NS instance are configured or config-not-needed state
525 enum config-not-needed {
530 uses placement-group-info;
536 description "Create an alert for a running VDU";
538 uses manotypes:rpc-project-name;
543 path "/rw-project:project[rw-project:name=current()/../project-name]" +
544 "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";
554 uses manotypes:alarm;
566 description "Destroy an alert that is associated with a running VDU";
568 uses manotypes:rpc-project-name;
573 path "/rw-project:project[rw-project:name=current()/../project-name]" +
574 "/rw-cloud:cloud/rw-cloud:account/rw-cloud:name";