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";
203 description "Reference to VNFD";
205 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
209 // Use parameters provided here to configure this VNF
210 uses manotypes:vnf-configuration;
212 // Mainly used by Mon-params & dashboard url
213 container mgmt-interface {
215 type inet:ip-address;
218 type inet:port-number;
226 description "Reference to a VLR record in the VLR catalog";
228 path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
232 leaf-list internal-connection-point-ref {
234 path "../../vdur/internal-connection-point/id";
239 list connection-point {
242 "List for external connection points. Each VNF has one
243 or more external connection points. As the name
244 implies that external connection points are used for
245 connecting the VNF to other VNFs or to external networks.
246 Each VNF exposes these connection points to the
247 orchestrator. The orchestrator can construct network
248 services by connecting the connection points between
249 different VNFs. The NFVO will use VLDs and VNFFGs at
250 the network service level to construct network services.";
252 uses vnfd:common-connection-point;
256 "Reference to the VLR associated with this connection point";
258 path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
264 "IP address assigned to the external connection point";
265 type inet:ip-address;
267 leaf connection-point-id {
268 rwpb:field-inline "true";
269 rwpb:field-string-max 64;
275 description "List of Virtual Deployment Units";
280 description "Unique id for the VDU";
285 description "name of the instantiated VDUR";
291 path "/vnfd:vnfd-catalog/vnfd:vnfd"
292 + "[vnfd:id = current()/../../vnfr:vnfd-ref]"
293 + "/vnfd:vdu/vnfd:id";
298 description "Allocated VM resource id";
303 description "VIM assigned flavor id";
308 description "VIM assigned image id";
313 description "Management IP address";
314 type inet:ip-address;
317 leaf vm-management-ip {
318 description "VM Private Management IP address";
319 type inet:ip-address;
323 description "Console URL for this VDU, if available";
327 uses manotypes:vm-flavor;
328 uses manotypes:guest-epa;
329 uses manotypes:vswitch-epa;
330 uses manotypes:hypervisor-epa;
331 uses manotypes:host-epa;
335 "A list of the alarms that have been created for this VDU";
338 uses manotypes:alarm;
341 list internal-connection-point {
344 "List for internal connection points. Each VNFC
345 has zero or more internal connection points.
346 Internal connection points are used for connecting
347 the VNF components internal to the VNF. If a VNF
348 has only one VNFC, it may not have any internal
351 uses vnfd:common-connection-point;
355 "IP address assigned to the external connection point";
356 type inet:ip-address;
360 list internal-interface {
362 "List of internal interfaces for the VNF";
367 "Name of internal interface. Note that this
368 name has only local significance to the VDU.";
372 leaf vdur-internal-connection-point-ref {
374 path "../../internal-connection-point/id";
377 uses virtual-interface;
380 list external-interface {
382 "List of external interfaces for the VNF.
383 The external interfaces enable sending
384 traffic to and from VNF.";
389 "Name of the external interface. Note that
390 this name has only local significance.";
394 leaf vnfd-connection-point-ref {
396 "Name of the external connection point.";
398 path "../../../connection-point/name";
401 uses virtual-interface;
403 leaf operational-status {
405 "The operational status of the VDU
406 init : The VDU has just started.
407 vm-init-phase : The VDUs in the VNF is being created in VIM.
408 vm-alloc-pending : The VM alloc is pending in VIM
409 running : The VDU is active in VM
410 terminate : The VDU is being terminated
411 vm-terminate-phase : The VDU in the VNF is being terminated in VIM.
412 terminated : The VDU is in the terminated state.
413 failed : The VDU instantiation failed.
417 rwpb:enum-type "VduOperationalStatus";
420 enum vm-alloc-pending;
423 enum vl-terminate-phase;
428 uses placement-group-info;
431 uses manotypes:monitoring-param;
433 leaf operational-status {
435 "The operational status of the VNFR instance
436 init : The VNF has just started.
437 vl-init-phase : The internal VLs in the VNF are being instantiated.
438 vm-init-phase : The VMs for VDUs in the VNF are being instantiated.
439 running : The VNF is in running state.
440 terminate : The VNF is being terminated.
441 vm-terminate-phase : The VMs in the VNF are being terminated.
442 vl-terminate-phase : The internal VLs in the VNF are being terminated.
443 terminated : The VNF is in the terminated state.
444 failed : The VNF instantiation failed
448 rwpb:enum-type "VnfrOperationalStatus";
454 enum vm-terminate-phase;
455 enum vl-terminate-phase;
462 "The configuration status of the NS instance
463 configuring: At least one of the VNFs in this instance is in configuring state
464 configured: All the VNFs in this NS instance are configured or config-not-needed state
477 enum config-not-needed {
482 uses placement-group-info;
487 description "Create an alert for a running VDU";
500 uses manotypes:alarm;
512 description "Destroy an alert that is associated with a running VDU";