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 {
121 "List of VNF access points, i.e., the capabilites
124 description "The list of capabilites of this VNF";
128 description "Name of the capability";
135 description " Description of the capability";
139 choice capability-location {
140 case location-xpath {
143 "Location of this capability as an xpath.
145 ../../../mgmt-interface/port";
150 case location-attirbute {
153 "Location of this capability as runtime attribute.
154 The value is <xpath>, <attribute_name>
156 ../../../mgmt-interface, ip-address
157 which retruns the ip-address assigned to the
158 mgmt-interface after VNF instantiation.";
163 case location-primitive-ref {
164 leaf config-primitive-name-ref {
166 "A leafref to configuration primitive.
167 This refers to a config parameter whose
168 output parameter is referred in out-parameter.";
170 path "../../../vnf-configuration/config-primitive/name";
176 "Name of the output parameter in the config primitiive";
179 "../../../vnf-configuration/config-primitive[name=current()/../config-primitive-name-ref]/parameter/name";
184 case location-default {
187 "Value to be used for this capability";
195 description "The list of dependencies for this VNF";
199 description "Name of this dependency";
206 description "IS this dependency mandatory for this VNF";
212 description "Description of this dependency";
216 leaf-list config-primitive-name-ref {
218 "Leafref to configuration primitive where this
219 dependency will be added as a parameter";
221 path "../../../vnf-configuration/config-primitive/name";
228 container vnfd-catalog {
231 "Virtual Network Function Descriptor (VNFD).";
237 description "Identifier for the VNFD.";
242 description "VNFD name.";
248 description "VNFD short name.";
253 description "Vendor of the VNFD.";
259 "Vendor logo for the Virtual Network Function";
264 description "Description of the VNFD.";
269 description "Version of the VNFD";
273 uses manotypes:vnf-configuration;
275 uses vnf-access-point;
277 container mgmt-interface {
279 "Interface over which the VNF is managed.";
281 choice endpoint-type {
283 "Indicates the type of management endpoint.";
287 "Specifies the static IP address for managing the VNF.";
289 type inet:ip-address;
295 "Use the default management interface on this VDU.";
298 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu/vnfd:id";
305 "Use the ip address associated with this connection point.";
308 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:connection-point/vnfd:name";
316 "Port for the management interface.";
317 type inet:port-number;
320 container dashboard-params {
321 description "Parameters for the VNF dashboard";
324 description "The HTTP path for the dashboard";
329 description "Pick HTTPS instead of HTTP , Default is false";
334 description "The HTTP port for the dashboard";
335 type inet:port-number;
343 "List of Internal Virtual Link Descriptors (VLD).
344 The internal VLD describes the basic topology of
345 the connectivity (e.g. E-LAN, E-Line, E-Tree)
346 between internal VNF components of the system.";
349 description "Identifier for the VLD";
354 description "Name of the internal VLD";
359 description "Short name of the internal VLD";
368 type manotypes:virtual-link-type;
371 leaf root-bandwidth {
373 "For ELAN this is the aggregate bandwidth.";
377 leaf leaf-bandwidth {
379 "For ELAN this is the bandwidth of branches.";
383 list internal-connection-point {
385 description "List of internal connection points in this VLD";
387 description "reference to the internal connection point id";
389 path "../../../vdu/internal-connection-point/id";
393 uses manotypes:provider-network;
396 list connection-point {
399 "List for external connection points. Each VNF has one
400 or more external connection points. As the name
401 implies that external connection points are used for
402 connecting the VNF to other VNFs or to external networks.
403 Each VNF exposes these connection points to the
404 orchestrator. The orchestrator can construct network
405 services by connecting the connection points between
406 different VNFs. The NFVO will use VLDs and VNFFGs at
407 the network service level to construct network services.";
409 uses common-connection-point;
413 description "List of Virtual Deployment Units";
417 description "Unique id for the VDU";
422 description "Unique name for the VDU";
427 description "Description of the VDU.";
432 description "Number of instances of VDU";
438 "Specifies the virtual PCI address. Expressed in
439 the following format dddd:dd:dd.d. For example
440 0000:00:12.0. This information can be used to
441 pass as metadata during the VM creation.";
445 uses manotypes:vm-flavor;
446 uses manotypes:guest-epa;
447 uses manotypes:vswitch-epa;
448 uses manotypes:hypervisor-epa;
449 uses manotypes:host-epa;
454 uses manotypes:alarm;
459 "Image name for the software image.
460 If the image name is found within the VNF packaage it will
461 be uploaded to all cloud accounts during onboarding process.
462 Otherwise, the image must be added to the cloud account with
463 the same name as entered here.
469 leaf image-checksum {
471 "Image md5sum for the software image.
472 The md5sum, if provided, along with the image name uniquely
473 identifies an image uploaded to the CAL.
478 choice cloud-init-input {
480 "Indicates how the contents of cloud-init script are provided.
481 There are 2 choices - inline or in a file";
486 "Contents of cloud-init script, provided inline, in cloud-config format";
492 leaf cloud-init-file {
494 "Name of file with contents of cloud-init script in cloud-config format";
500 list internal-connection-point {
503 "List for internal connection points. Each VNFC
504 has zero or more internal connection points.
505 Internal connection points are used for connecting
506 the VNF components internal to the VNF. If a VNF
507 has only one VNFC, it may not have any internal
510 uses common-connection-point;
512 leaf internal-vld-ref {
514 path "../../../internal-vld/id";
519 list internal-interface {
521 "List of internal interfaces for the VNF";
526 "Name of internal interface. Note that this
527 name has only local significance to the VDU.";
531 leaf vdu-internal-connection-point-ref {
533 path "../../internal-connection-point/id";
536 uses virtual-interface;
539 list external-interface {
541 "List of external interfaces for the VNF.
542 The external interfaces enable sending
543 traffic to and from VNF.";
548 "Name of the external interface. Note that
549 this name has only local significance.";
553 leaf vnfd-connection-point-ref {
555 "Name of the external connection point.";
557 path "../../../connection-point/name";
560 uses virtual-interface;
564 list vdu-dependency {
566 "List of VDU dependencies.";
569 leaf vdu-source-ref {
575 leaf vdu-depends-on-ref {
577 "Reference to the VDU that
578 source VDU depends.";
585 leaf service-function-chain {
586 description "Type of node in Service Function Chaining Architecture";
597 leaf service-function-type {
599 "Type of Service Function.
600 NOTE: This needs to map with Service Function Type in ODL to
601 support VNFFG. Service Function Type is manadatory param in ODL
602 SFC. This is temporarily set to string for ease of use";
606 uses manotypes:monitoring-param;
608 list placement-groups {
609 description "List of placement groups at VNF level";
612 uses manotypes:placement-group-info;
617 "List of VDUs that are part of this placement group";
618 key "member-vdu-ref";
620 leaf member-vdu-ref {
622 path "../../../vdu/id";
627 uses vnf-access-point;