4 * Copyright 2016-2017 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 {
48 "Update model to support projects.";
53 "Initial revision. This YANG file defines
54 the Virtual Network Function (VNF)";
56 "Derived from earlier versions of base YANG files";
59 grouping common-connection-point {
61 description "Name of the connection point";
66 description "Identifier for the internal connection points";
71 description "Short name of the connection point";
76 description "Type of the connection point.";
77 type manotypes:connection-point-type;
79 leaf port-security-enabled {
80 description "Enables the port security for the port";
85 grouping virtual-interface {
86 container virtual-interface {
88 "Container for the virtual interface properties";
92 "Specifies the type of virtual interface
94 VIRTIO : Use the traditional VIRTIO interface.
95 PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
96 SR-IOV : Use SR-IOV interface.
97 E1000 : Emulate E1000 interface.
98 RTL8139 : Emulate RTL8139 interface.
99 PCNET : Emulate PCNET interface.
100 OM-MGMT : Used to specify openmano mgmt external-connection type";
104 enum PCI-PASSTHROUGH;
116 "Specifies the virtual PCI address. Expressed in
117 the following format dddd:dd:dd.d. For example
118 0000:00:12.0. This information can be used to
119 pass as metadata during the VM creation.";
125 "Aggregate bandwidth of the NIC.";
131 grouping vnfd-descriptor {
133 description "Identifier for the VNFD.";
138 description "VNFD name.";
144 description "VNFD short name.";
149 description "Vendor of the VNFD.";
155 "Vendor logo for the Virtual Network Function";
160 description "Description of the VNFD.";
165 description "Version of the VNFD";
169 uses manotypes:vnf-configuration;
171 container mgmt-interface {
173 "Interface over which the VNF is managed.";
175 choice endpoint-type {
177 "Indicates the type of management endpoint.";
181 "Specifies the static IP address for managing the VNF.";
183 type inet:ip-address;
189 "Use the default management interface on this VDU.";
199 "Use the ip address associated with this connection point.";
202 path "../../connection-point/name";
210 "Port for the management interface.";
211 type inet:port-number;
214 container dashboard-params {
215 description "Parameters for the VNF dashboard";
218 description "The HTTP path for the dashboard";
223 description "Pick HTTPS instead of HTTP , Default is false";
228 description "The HTTP port for the dashboard";
229 type inet:port-number;
237 "List of Internal Virtual Link Descriptors (VLD).
238 The internal VLD describes the basic topology of
239 the connectivity (e.g. E-LAN, E-Line, E-Tree)
240 between internal VNF components of the system.";
243 description "Identifier for the VLD";
248 description "Name of the internal VLD";
253 description "Short name of the internal VLD";
262 type manotypes:virtual-link-type;
265 leaf root-bandwidth {
267 "For ELAN this is the aggregate bandwidth.";
271 leaf leaf-bandwidth {
273 "For ELAN this is the bandwidth of branches.";
277 list internal-connection-point {
279 description "List of internal connection points in this VLD";
281 description "reference to the internal connection point id";
283 path "../../../vdu/internal-connection-point/id";
287 uses manotypes:provider-network;
289 description "Extra parameters for VLD instantiation";
291 case vim-network-ref {
292 leaf vim-network-name {
294 "Name of network in VIM account. This is used to indicate
295 pre-provisioned network name in cloud account.";
300 case vim-network-profile {
301 leaf ip-profile-ref {
302 description "Named reference to IP-profile object";
310 uses manotypes:ip-profile-list;
312 list connection-point {
315 "List for external connection points. Each VNF has one
316 or more external connection points. As the name
317 implies that external connection points are used for
318 connecting the VNF to other VNFs or to external networks.
319 Each VNF exposes these connection points to the
320 orchestrator. The orchestrator can construct network
321 services by connecting the connection points between
322 different VNFs. The NFVO will use VLDs and VNFFGs at
323 the network service level to construct network services.";
325 uses common-connection-point;
329 description "List of Virtual Deployment Units";
333 description "Unique id for the VDU";
338 description "Unique name for the VDU";
343 description "Description of the VDU.";
348 description "Number of instances of VDU";
354 "Specifies the virtual PCI address. Expressed in
355 the following format dddd:dd:dd.d. For example
356 0000:00:12.0. This information can be used to
357 pass as metadata during the VM creation.";
361 uses manotypes:vm-flavor;
362 uses manotypes:guest-epa;
363 uses manotypes:vswitch-epa;
364 uses manotypes:hypervisor-epa;
365 uses manotypes:host-epa;
370 uses manotypes:alarm;
373 uses manotypes:image-properties;
375 choice cloud-init-input {
377 "Indicates how the contents of cloud-init script are provided.
378 There are 2 choices - inline or in a file";
383 "Contents of cloud-init script, provided inline, in cloud-config format";
389 leaf cloud-init-file {
391 "Name of file with contents of cloud-init script in cloud-config format";
397 uses manotypes:supplemental-boot-data;
399 list internal-connection-point {
402 "List for internal connection points. Each VNFC
403 has zero or more internal connection points.
404 Internal connection points are used for connecting
405 the VNF components internal to the VNF. If a VNF
406 has only one VNFC, it may not have any internal
409 uses common-connection-point;
411 leaf internal-vld-ref {
413 path "../../../internal-vld/id";
418 list internal-interface {
420 "List of internal interfaces for the VNF";
425 "Name of internal interface. Note that this
426 name has only local significance to the VDU.";
430 leaf vdu-internal-connection-point-ref {
432 path "../../internal-connection-point/id";
435 uses virtual-interface;
438 list external-interface {
440 "List of external interfaces for the VNF.
441 The external interfaces enable sending
442 traffic to and from VNF.";
447 "Name of the external interface. Note that
448 this name has only local significance.";
452 leaf vnfd-connection-point-ref {
454 "Name of the external connection point.";
456 path "../../../connection-point/name";
459 uses virtual-interface;
466 description "Name of the disk-volumes, e.g. vda, vdb etc";
470 uses manotypes:volume-info;
474 list vdu-dependency {
476 "List of VDU dependencies.";
479 leaf vdu-source-ref {
485 leaf vdu-depends-on-ref {
487 "Reference to the VDU that
488 source VDU depends.";
495 leaf service-function-chain {
496 description "Type of node in Service Function Chaining Architecture";
507 leaf service-function-type {
509 "Type of Service Function.
510 NOTE: This needs to map with Service Function Type in ODL to
511 support VNFFG. Service Function Type is manadatory param in ODL
512 SFC. This is temporarily set to string for ease of use";
516 uses manotypes:monitoring-param;
518 list placement-groups {
519 description "List of placement groups at VNF level";
522 uses manotypes:placement-group-info;
527 "List of VDUs that are part of this placement group";
528 key "member-vdu-ref";
530 leaf member-vdu-ref {
532 path "../../../vdu/id";
539 augment "/rw-project:project" {
540 container vnfd-catalog {
542 "Virtual Network Function Descriptor (VNFD).";
547 uses vnfd-descriptor;