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 {
120 description "List of VNF access points";
123 description "Name of the vnf access point";
129 description "A description of this VNF access point";
133 description "The List of capabilities of this VNF access point";
136 description "Name of the capability";
142 description "A description of the capability";
145 choice capability-location {
148 description "Location of this capaibility as an xpath.
149 This field points to an element within vnfd
150 with the xpath notation and additionally
151 provides the flexibility to choose attributes
152 within the instantiated version of this object.
154 /vnfd-catalog/vnfd[id='xyz']/connection-point[name='cp1']/ip_address()
155 refers to the ip address of the connection point with name 'cp1'
156 in VNFD with id 'xyz'.";
160 case location-primitive-ref {
161 leaf config-primitive-name-ref {
162 description "A leafref to configuration primitive.
163 This field contains a link to the config primitive
164 the output paramaters of which will satisfy this requirement.";
166 path "/vnfd:vnfd-catalog/vnfd/vnf-configuration/service-primitive/name";
173 description "User input for this capability";
175 description "Name of this input";
179 description "Value of this input";
187 description "The List of depenencies of this VNF access point";
190 description "Name of this VNF access point";
196 description "Is this dependcy mandatory for this dependency";
200 description "A description of the dependency";
203 leaf config-primitive-name-ref {
204 description "A leafref to configuration primitive.
205 This field contains a link to the config primitive
206 the input paramaters of which will satisfy this requirement.";
208 path "/vnfd:vnfd-catalog/vnfd/vnf-configuration/service-primitive/name";
215 container vnfd-catalog {
218 "Virtual Network Function Descriptor (VNFD).";
224 description "Identifier for the VNFD.";
229 description "VNFD name.";
235 description "VNFD short name.";
240 description "Vendor of the VNFD.";
246 "Vendor logo for the Virtual Network Function";
251 description "Description of the VNFD.";
256 description "Version of the VNFD";
260 uses manotypes:vnf-configuration;
262 container mgmt-interface {
264 "Interface over which the VNF is managed.";
266 choice endpoint-type {
268 "Indicates the type of management endpoint.";
272 "Specifies the static IP address for managing the VNF.";
274 type inet:ip-address;
280 "Use the default management interface on this VDU.";
283 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu/vnfd:id";
290 "Use the ip address associated with this connection point.";
293 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:connection-point/vnfd:name";
301 "Port for the management interface.";
302 type inet:port-number;
305 container dashboard-params {
306 description "Parameters for the VNF dashboard";
309 description "The HTTP path for the dashboard";
314 description "Pick HTTPS instead of HTTP , Default is false";
319 description "The HTTP port for the dashboard";
320 type inet:port-number;
328 "List of Internal Virtual Link Descriptors (VLD).
329 The internal VLD describes the basic topology of
330 the connectivity (e.g. E-LAN, E-Line, E-Tree)
331 between internal VNF components of the system.";
334 description "Identifier for the VLD";
339 description "Name of the internal VLD";
344 description "Short name of the internal VLD";
353 type manotypes:virtual-link-type;
356 leaf root-bandwidth {
358 "For ELAN this is the aggregate bandwidth.";
362 leaf leaf-bandwidth {
364 "For ELAN this is the bandwidth of branches.";
368 list internal-connection-point {
370 description "List of internal connection points in this VLD";
372 description "reference to the internal connection point id";
374 path "../../../vdu/internal-connection-point/id";
378 uses manotypes:provider-network;
381 list connection-point {
384 "List for external connection points. Each VNF has one
385 or more external connection points. As the name
386 implies that external connection points are used for
387 connecting the VNF to other VNFs or to external networks.
388 Each VNF exposes these connection points to the
389 orchestrator. The orchestrator can construct network
390 services by connecting the connection points between
391 different VNFs. The NFVO will use VLDs and VNFFGs at
392 the network service level to construct network services.";
394 uses common-connection-point;
398 description "List of Virtual Deployment Units";
402 description "Unique id for the VDU";
407 description "Unique name for the VDU";
412 description "Description of the VDU.";
417 description "Number of instances of VDU";
423 "Specifies the virtual PCI address. Expressed in
424 the following format dddd:dd:dd.d. For example
425 0000:00:12.0. This information can be used to
426 pass as metadata during the VM creation.";
430 uses manotypes:vm-flavor;
431 uses manotypes:guest-epa;
432 uses manotypes:vswitch-epa;
433 uses manotypes:hypervisor-epa;
434 uses manotypes:host-epa;
439 uses manotypes:alarm;
444 "Image name for the software image.
445 If the image name is found within the VNF packaage it will
446 be uploaded to all cloud accounts during onboarding process.
447 Otherwise, the image must be added to the cloud account with
448 the same name as entered here.
454 leaf image-checksum {
456 "Image md5sum for the software image.
457 The md5sum, if provided, along with the image name uniquely
458 identifies an image uploaded to the CAL.
463 choice cloud-init-input {
465 "Indicates how the contents of cloud-init script are provided.
466 There are 2 choices - inline or in a file";
471 "Contents of cloud-init script, provided inline, in cloud-config format";
477 leaf cloud-init-file {
479 "Name of file with contents of cloud-init script in cloud-config format";
485 list internal-connection-point {
488 "List for internal connection points. Each VNFC
489 has zero or more internal connection points.
490 Internal connection points are used for connecting
491 the VNF components internal to the VNF. If a VNF
492 has only one VNFC, it may not have any internal
495 uses common-connection-point;
497 leaf internal-vld-ref {
499 path "../../../internal-vld/id";
504 list internal-interface {
506 "List of internal interfaces for the VNF";
511 "Name of internal interface. Note that this
512 name has only local significance to the VDU.";
516 leaf vdu-internal-connection-point-ref {
518 path "../../internal-connection-point/id";
521 uses virtual-interface;
524 list external-interface {
526 "List of external interfaces for the VNF.
527 The external interfaces enable sending
528 traffic to and from VNF.";
533 "Name of the external interface. Note that
534 this name has only local significance.";
538 leaf vnfd-connection-point-ref {
540 "Name of the external connection point.";
542 path "../../../connection-point/name";
545 uses virtual-interface;
549 list vdu-dependency {
551 "List of VDU dependencies.";
554 leaf vdu-source-ref {
560 leaf vdu-depends-on-ref {
562 "Reference to the VDU that
563 source VDU depends.";
570 leaf service-function-chain {
571 description "Type of node in Service Function Chaining Architecture";
582 leaf service-function-type {
584 "Type of Service Function.
585 NOTE: This needs to map with Service Function Type in ODL to
586 support VNFFG. Service Function Type is manadatory param in ODL
587 SFC. This is temporarily set to string for ease of use";
591 uses manotypes:monitoring-param;
593 list placement-groups {
594 description "List of placement groups at VNF level";
597 uses manotypes:placement-group-info;
602 "List of VDUs that are part of this placement group";
603 key "member-vdu-ref";
605 leaf member-vdu-ref {
607 path "../../../vdu/id";
612 uses vnf-access-point;