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:vnfd";
34 import ietf-yang-types {
38 import ietf-inet-types {
44 "Initial revision. This YANG file defines
45 the Virtual Network Function (VNF)";
47 "Derived from earlier versions of base YANG files";
50 grouping common-connection-point {
52 description "Name of the connection point";
57 description "Identifier for the internal connection points";
62 description "Short name of the connection point";
67 description "Type of the connection point.";
68 type manotypes:connection-point-type;
72 grouping virtual-interface {
73 container virtual-interface {
75 "Container for the virtual interface properties";
79 "Specifies the type of virtual interface
81 VIRTIO : Use the traditional VIRTIO interface.
82 PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
83 SR-IOV : Use SR-IOV interface.
84 E1000 : Emulate E1000 interface.
85 RTL8139 : Emulate RTL8139 interface.
86 PCNET : Emulate PCNET interface.
87 OM-MGMT : Used to specify openmano mgmt external-connection type";
103 "Specifies the virtual PCI address. Expressed in
104 the following format dddd:dd:dd.d. For example
105 0000:00:12.0. This information can be used to
106 pass as metadata during the VM creation.";
112 "Aggregate bandwidth of the NIC.";
118 grouping vnf-access-point {
122 "List of VNF access points, i.e., the capabilites
125 description "The list of capabilites of this VNF";
129 description "Name of the capability";
136 description " Description of the capability";
140 choice capability-location {
141 case location-xpath {
144 "Location of this capability as an xpath.
146 ../../../mgmt-interface/port";
151 case location-attirbute {
154 "Location of this capability as runtime attribute.
155 The value is <xpath>, <attribute_name>
157 ../../../mgmt-interface, ip-address
158 which retruns the ip-address assigned to the
159 mgmt-interface after VNF instantiation.";
164 case location-primitive-ref {
165 leaf config-primitive-name-ref {
167 "A leafref to configuration primitive.
168 This refers to a config parameter whose
169 output parameter is referred in out-parameter.";
171 path "../../../vnf-configuration/config-primitive/name";
177 "Name of the output parameter in the config primitiive";
180 "../../../vnf-configuration/config-primitive[name=current()/../config-primitive-name-ref]/parameter/name";
185 case location-default {
188 "Value to be used for this capability";
196 description "The list of dependencies for this VNF";
200 description "Name of this dependency";
207 description "IS this dependency mandatory for this VNF";
213 description "Description of this dependency";
217 leaf-list config-primitive-name-ref {
219 "Leafref to configuration primitive where this
220 dependency will be added as a parameter";
222 path "../../../vnf-configuration/config-primitive/name";
229 container vnfd-catalog {
232 "Virtual Network Function Descriptor (VNFD).";
238 description "Identifier for the VNFD.";
243 description "VNFD name.";
249 description "VNFD short name.";
254 description "Vendor of the VNFD.";
260 "Vendor logo for the Virtual Network Function";
265 description "Description of the VNFD.";
270 description "Version of the VNFD";
274 uses manotypes:vnf-configuration;
276 uses vnf-access-point;
278 container mgmt-interface {
280 "Interface over which the VNF is managed.";
282 choice endpoint-type {
284 "Indicates the type of management endpoint.";
288 "Specifies the static IP address for managing the VNF.";
290 type inet:ip-address;
296 "Use the default management interface on this VDU.";
299 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu/vnfd:id";
306 "Use the ip address associated with this connection point.";
309 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:connection-point/vnfd:name";
317 "Port for the management interface.";
318 type inet:port-number;
321 container dashboard-params {
322 description "Parameters for the VNF dashboard";
325 description "The HTTP path for the dashboard";
330 description "Pick HTTPS instead of HTTP , Default is false";
335 description "The HTTP port for the dashboard";
336 type inet:port-number;
344 "List of Internal Virtual Link Descriptors (VLD).
345 The internal VLD describes the basic topology of
346 the connectivity (e.g. E-LAN, E-Line, E-Tree)
347 between internal VNF components of the system.";
350 description "Identifier for the VLD";
355 description "Name of the internal VLD";
360 description "Short name of the internal VLD";
369 type manotypes:virtual-link-type;
372 leaf root-bandwidth {
374 "For ELAN this is the aggregate bandwidth.";
378 leaf leaf-bandwidth {
380 "For ELAN this is the bandwidth of branches.";
384 list internal-connection-point {
386 description "List of internal connection points in this VLD";
388 description "reference to the internal connection point id";
390 path "../../../vdu/internal-connection-point/id";
394 uses manotypes:provider-network;
397 list connection-point {
400 "List for external connection points. Each VNF has one
401 or more external connection points. As the name
402 implies that external connection points are used for
403 connecting the VNF to other VNFs or to external networks.
404 Each VNF exposes these connection points to the
405 orchestrator. The orchestrator can construct network
406 services by connecting the connection points between
407 different VNFs. The NFVO will use VLDs and VNFFGs at
408 the network service level to construct network services.";
410 uses common-connection-point;
414 description "List of Virtual Deployment Units";
418 description "Unique id for the VDU";
423 description "Unique name for the VDU";
428 description "Description of the VDU.";
433 description "Number of instances of VDU";
439 "Specifies the virtual PCI address. Expressed in
440 the following format dddd:dd:dd.d. For example
441 0000:00:12.0. This information can be used to
442 pass as metadata during the VM creation.";
446 uses manotypes:vm-flavor;
447 uses manotypes:guest-epa;
448 uses manotypes:vswitch-epa;
449 uses manotypes:hypervisor-epa;
450 uses manotypes:host-epa;
455 uses manotypes:alarm;
460 "Image name for the software image.
461 If the image name is found within the VNF packaage it will
462 be uploaded to all cloud accounts during onboarding process.
463 Otherwise, the image must be added to the cloud account with
464 the same name as entered here.
470 leaf image-checksum {
472 "Image md5sum for the software image.
473 The md5sum, if provided, along with the image name uniquely
474 identifies an image uploaded to the CAL.
479 choice cloud-init-input {
481 "Indicates how the contents of cloud-init script are provided.
482 There are 2 choices - inline or in a file";
487 "Contents of cloud-init script, provided inline, in cloud-config format";
493 leaf cloud-init-file {
495 "Name of file with contents of cloud-init script in cloud-config format";
501 list internal-connection-point {
504 "List for internal connection points. Each VNFC
505 has zero or more internal connection points.
506 Internal connection points are used for connecting
507 the VNF components internal to the VNF. If a VNF
508 has only one VNFC, it may not have any internal
511 uses common-connection-point;
513 leaf internal-vld-ref {
515 path "../../../internal-vld/id";
520 list internal-interface {
522 "List of internal interfaces for the VNF";
527 "Name of internal interface. Note that this
528 name has only local significance to the VDU.";
532 leaf vdu-internal-connection-point-ref {
534 path "../../internal-connection-point/id";
537 uses virtual-interface;
540 list external-interface {
542 "List of external interfaces for the VNF.
543 The external interfaces enable sending
544 traffic to and from VNF.";
549 "Name of the external interface. Note that
550 this name has only local significance.";
554 leaf vnfd-connection-point-ref {
556 "Name of the external connection point.";
558 path "../../../connection-point/name";
561 uses virtual-interface;
565 list vdu-dependency {
567 "List of VDU dependencies.";
570 leaf vdu-source-ref {
576 leaf vdu-depends-on-ref {
578 "Reference to the VDU that
579 source VDU depends.";
586 leaf service-function-chain {
587 description "Type of node in Service Function Chaining Architecture";
598 leaf service-function-type {
600 "Type of Service Function.
601 NOTE: This needs to map with Service Function Type in ODL to
602 support VNFFG. Service Function Type is manadatory param in ODL
603 SFC. This is temporarily set to string for ease of use";
607 uses manotypes:monitoring-param;
609 list placement-groups {
610 description "List of placement groups at VNF level";
613 uses manotypes:placement-group-info;
618 "List of VDUs that are part of this placement group";
619 key "member-vdu-ref";
621 leaf member-vdu-ref {
623 path "../../../vdu/id";
628 uses vnf-access-point;