4 * Copyright 2016 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 {
56 "Initial revision. This YANG file defines
57 the Virtual Network Function Record (VNFR)";
59 "Derived from earlier versions of base YANG files";
62 grouping placement-group-info {
63 list placement-groups-info {
66 Placement groups to which this VDU belongs and its
70 uses manotypes:placement-group-info;
71 uses manotypes:placement-group-input;
76 grouping virtual-interface {
77 container virtual-interface {
79 "Container for the virtual interface properties";
83 "Specifies the type of virtual interface
85 VIRTIO : Use the traditional VIRTIO interface.
86 PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
87 SR-IOV : Use SR-IOV interface.";
97 "Aggregate bandwidth of the NIC.";
103 "Defines if the NIC supports OVS offload.
104 MANDATORY : OVS offload support in the NIC is mandatory.
105 PREFERRED : OVS offload support in the NIC is preferred.";
114 "Specifies the vendor specific id for
115 the device. This is used when a NIC from
116 specific HW vendor is required.";
120 leaf datapath-library {
122 "Specifies the name and version of the datapath
123 library the NIC is expected to support.";
127 leaf provider-network-name {
129 "Name of the provider network to which this
136 container vnfr-catalog {
140 "Virtual Network Function Record (VNFR).";
145 description "Identifier for the VNFR.";
151 "NS instance identifier.
152 This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id";
156 leaf member-vnf-index-ref {
157 description "Reference to member VNF index in Network service.";
159 path "/nsd:nsd-catalog/nsd:nsd/nsd:constituent-vnfd/nsd:member-vnf-index";
164 description "Dashboard URL";
169 description "VNFR name.";
174 description "VNFR short name.";
179 description "Vendor of the VNFR.";
184 description "Description of the VNFR.";
189 description "Version of the VNFR";
195 "Creation timestamp of this Virtual Network
196 Function. The timestamp is expressed as
197 seconds since unix epoch - 1970-01-01T00:00:00Z";
204 "Active period of this Virtual Network Function.
205 Uptime is expressed in seconds";
211 description "VNF descriptor used to instantiate this VNF";
212 uses vnfd:vnfd-descriptor;
215 // Use parameters provided here to configure this VNF
216 uses manotypes:vnf-configuration;
218 // Mainly used by Mon-params & dashboard url
219 container mgmt-interface {
221 type inet:ip-address;
224 type inet:port-number;
232 description "Reference to a VLR record in the VLR catalog";
234 path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
238 leaf-list internal-connection-point-ref {
240 path "../../vdur/internal-connection-point/id";
245 list connection-point {
248 "List for external connection points. Each VNF has one
249 or more external connection points. As the name
250 implies that external connection points are used for
251 connecting the VNF to other VNFs or to external networks.
252 Each VNF exposes these connection points to the
253 orchestrator. The orchestrator can construct network
254 services by connecting the connection points between
255 different VNFs. The NFVO will use VLDs and VNFFGs at
256 the network service level to construct network services.";
258 uses vnfd:common-connection-point;
262 "Reference to the VLR associated with this connection point";
264 path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
270 "IP address assigned to the external connection point";
271 type inet:ip-address;
275 "MAC address assigned to the external connection point";
276 // type inet:mac-address;
279 leaf connection-point-id {
280 rwpb:field-inline "true";
281 rwpb:field-string-max 64;
287 description "List of Virtual Deployment Units";
292 description "Unique id for the VDU";
297 description "name of the instantiated VDUR";
301 leaf unique-short-name {
302 description "Short Unique name of the VDU
303 This will be of the format NSR name-ShortnedString-VDUname
304 NSR name and VDU name shall be constrained to 10 characters";
305 rwpb:field-inline "true";
306 rwpb:field-string-max 64;
312 path "../../vnfd/vdu/id";
317 description "Allocated VM resource id";
322 description "VIM assigned flavor id";
327 description "VIM assigned image id";
332 description "Management IP address";
333 type inet:ip-address;
336 leaf vm-management-ip {
337 description "VM Private Management IP address";
338 type inet:ip-address;
342 description "Console URL for this VDU, if available";
346 uses manotypes:vm-flavor;
347 uses manotypes:guest-epa;
348 uses manotypes:vswitch-epa;
349 uses manotypes:hypervisor-epa;
350 uses manotypes:host-epa;
352 uses manotypes:supplemental-boot-data;
358 description "Name of the disk-volumes, e.g. vda, vdb etc";
363 description "VIM assigned volume id";
367 uses manotypes:volume-info;
372 "A list of the alarms that have been created for this VDU";
375 uses manotypes:alarm;
378 list internal-connection-point {
381 "List for internal connection points. Each VNFC
382 has zero or more internal connection points.
383 Internal connection points are used for connecting
384 the VNF components internal to the VNF. If a VNF
385 has only one VNFC, it may not have any internal
388 uses vnfd:common-connection-point;
392 "IP address assigned to the internal connection point";
393 type inet:ip-address;
397 "MAC address assigned to the internal connection point";
398 // type inet:mac-address;
403 list internal-interface {
405 "List of internal interfaces for the VNF";
410 "Name of internal interface. Note that this
411 name has only local significance to the VDU.";
415 leaf vdur-internal-connection-point-ref {
417 path "../../internal-connection-point/id";
420 uses virtual-interface;
423 list external-interface {
425 "List of external interfaces for the VNF.
426 The external interfaces enable sending
427 traffic to and from VNF.";
432 "Name of the external interface. Note that
433 this name has only local significance.";
437 leaf vnfd-connection-point-ref {
439 "Name of the external connection point.";
441 path "../../../connection-point/name";
444 uses virtual-interface;
446 leaf operational-status {
448 "The operational status of the VDU
449 init : The VDU has just started.
450 vm-init-phase : The VDUs in the VNF is being created in VIM.
451 vm-alloc-pending : The VM alloc is pending in VIM
452 running : The VDU is active in VM
453 terminate : The VDU is being terminated
454 vm-terminate-phase : The VDU in the VNF is being terminated in VIM.
455 terminated : The VDU is in the terminated state.
456 failed : The VDU instantiation failed.
460 rwpb:enum-type "VduOperationalStatus";
463 enum vm-alloc-pending;
466 enum vl-terminate-phase;
471 uses placement-group-info;
474 uses manotypes:monitoring-param;
476 leaf operational-status {
478 "The operational status of the VNFR instance
479 init : The VNF has just started.
480 vl-init-phase : The internal VLs in the VNF are being instantiated.
481 vm-init-phase : The VMs for VDUs in the VNF are being instantiated.
482 running : The VNF is in running state.
483 terminate : The VNF is being terminated.
484 vm-terminate-phase : The VMs in the VNF are being terminated.
485 vl-terminate-phase : The internal VLs in the VNF are being terminated.
486 terminated : The VNF is in the terminated state.
487 failed : The VNF instantiation failed
491 rwpb:enum-type "VnfrOperationalStatus";
497 enum vm-terminate-phase;
498 enum vl-terminate-phase;
505 "The configuration status of the NS instance
506 configuring: At least one of the VNFs in this instance is in configuring state
507 configured: All the VNFs in this NS instance are configured or config-not-needed state
520 enum config-not-needed {
525 uses placement-group-info;
530 description "Create an alert for a running VDU";
543 uses manotypes:alarm;
555 description "Destroy an alert that is associated with a running VDU";