4 * Copyright 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 "http://riftio.com/ns/riftware-1.0/vnfd-base";
34 import ietf-yang-types {
38 import ietf-inet-types {
44 "Initial revision. This YANG file defines
45 the common types for Virtual Network Function
48 "Derived from earlier versions of base YANG files";
51 grouping common-connection-point {
53 description "Name of the connection point";
58 description "Identifier for the internal connection points";
63 description "Short name of the connection point";
68 description "Type of the connection point.";
69 type manotypes:connection-point-type;
71 leaf port-security-enabled {
72 description "Enables the port security for the port";
77 grouping virtual-interface {
78 container virtual-interface {
80 "Container for the virtual interface properties";
84 "Specifies the type of virtual interface
86 VIRTIO : Use the traditional VIRTIO interface.
87 PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
88 SR-IOV : Use SR-IOV interface.
89 E1000 : Emulate E1000 interface.
90 RTL8139 : Emulate RTL8139 interface.
91 PCNET : Emulate PCNET interface.
92 OM-MGMT : Used to specify openmano mgmt external-connection type";
108 "Specifies the virtual PCI address. Expressed in
109 the following format dddd:dd:dd.d. For example
110 0000:00:12.0. This information can be used to
111 pass as metadata during the VM creation.";
117 "Aggregate bandwidth of the NIC.";
123 grouping vnfd-descriptor {
125 description "Identifier for the VNFD.";
130 description "VNFD name.";
136 description "VNFD short name.";
141 description "Vendor of the VNFD.";
147 "Vendor logo for the Virtual Network Function";
152 description "Description of the VNFD.";
157 description "Version of the VNFD";
161 uses manotypes:vnf-configuration;
163 container mgmt-interface {
165 "Interface over which the VNF is managed.";
167 choice endpoint-type {
169 "Indicates the type of management endpoint.";
173 "Specifies the static IP address for managing the VNF.";
175 type inet:ip-address;
181 "Use the default management interface on this VDU.";
191 "Use the ip address associated with this connection point.";
194 path "../../connection-point/name";
202 "Port for the management interface.";
203 type inet:port-number;
206 container dashboard-params {
207 description "Parameters for the VNF dashboard";
210 description "The HTTP path for the dashboard";
215 description "Pick HTTPS instead of HTTP , Default is false";
220 description "The HTTP port for the dashboard";
221 type inet:port-number;
229 "List of Internal Virtual Link Descriptors (VLD).
230 The internal VLD describes the basic topology of
231 the connectivity (e.g. E-LAN, E-Line, E-Tree)
232 between internal VNF components of the system.";
235 description "Identifier for the VLD";
240 description "Name of the internal VLD";
245 description "Short name of the internal VLD";
254 type manotypes:virtual-link-type;
257 leaf root-bandwidth {
259 "For ELAN this is the aggregate bandwidth.";
263 leaf leaf-bandwidth {
265 "For ELAN this is the bandwidth of branches.";
269 list internal-connection-point {
271 description "List of internal connection points in this VLD";
273 description "reference to the internal connection point id";
275 path "../../../vdu/internal-connection-point/id";
279 uses manotypes:provider-network;
281 description "Extra parameters for VLD instantiation";
283 case vim-network-ref {
284 leaf vim-network-name {
286 "Name of network in VIM account. This is used to indicate
287 pre-provisioned network name in cloud account.";
292 case vim-network-profile {
293 leaf ip-profile-ref {
294 description "Named reference to IP-profile object";
302 uses manotypes:ip-profile-list;
304 list connection-point {
307 "List for external connection points. Each VNF has one
308 or more external connection points. As the name
309 implies that external connection points are used for
310 connecting the VNF to other VNFs or to external networks.
311 Each VNF exposes these connection points to the
312 orchestrator. The orchestrator can construct network
313 services by connecting the connection points between
314 different VNFs. The NFVO will use VLDs and VNFFGs at
315 the network service level to construct network services.";
317 uses common-connection-point;
321 description "List of Virtual Deployment Units";
325 description "Unique id for the VDU";
330 description "Unique name for the VDU";
335 description "Description of the VDU.";
340 description "Number of instances of VDU";
346 "Specifies the virtual PCI address. Expressed in
347 the following format dddd:dd:dd.d. For example
348 0000:00:12.0. This information can be used to
349 pass as metadata during the VM creation.";
353 uses manotypes:vm-flavor;
354 uses manotypes:guest-epa;
355 uses manotypes:vswitch-epa;
356 uses manotypes:hypervisor-epa;
357 uses manotypes:host-epa;
362 uses manotypes:alarm;
365 uses manotypes:image-properties;
367 choice cloud-init-input {
369 "Indicates how the contents of cloud-init script are provided.
370 There are 2 choices - inline or in a file";
375 "Contents of cloud-init script, provided inline, in cloud-config format";
381 leaf cloud-init-file {
383 "Name of file with contents of cloud-init script in cloud-config format";
389 uses manotypes:supplemental-boot-data;
391 list internal-connection-point {
394 "List for internal connection points. Each VNFC
395 has zero or more internal connection points.
396 Internal connection points are used for connecting
397 the VNF components internal to the VNF. If a VNF
398 has only one VNFC, it may not have any internal
401 uses common-connection-point;
403 leaf internal-vld-ref {
405 path "../../../internal-vld/id";
410 list internal-interface {
412 "List of internal interfaces for the VNF";
417 "Name of internal interface. Note that this
418 name has only local significance to the VDU.";
422 leaf vdu-internal-connection-point-ref {
424 path "../../internal-connection-point/id";
427 uses virtual-interface;
430 list external-interface {
432 "List of external interfaces for the VNF.
433 The external interfaces enable sending
434 traffic to and from VNF.";
439 "Name of the external interface. Note that
440 this name has only local significance.";
444 leaf vnfd-connection-point-ref {
446 "Name of the external connection point.";
448 path "../../../connection-point/name";
451 uses virtual-interface;
458 description "Name of the disk-volumes, e.g. vda, vdb etc";
462 uses manotypes:volume-info;
466 list vdu-dependency {
468 "List of VDU dependencies.";
471 leaf vdu-source-ref {
477 leaf vdu-depends-on-ref {
479 "Reference to the VDU that
480 source VDU depends.";
487 leaf service-function-chain {
488 description "Type of node in Service Function Chaining Architecture";
499 leaf service-function-type {
501 "Type of Service Function.
502 NOTE: This needs to map with Service Function Type in ODL to
503 support VNFFG. Service Function Type is manadatory param in ODL
504 SFC. This is temporarily set to string for ease of use";
508 uses manotypes:monitoring-param;
510 list placement-groups {
511 description "List of placement groups at VNF level";
514 uses manotypes:placement-group-info;
519 "List of VDUs that are part of this placement group";
520 key "member-vdu-ref";
522 leaf member-vdu-ref {
524 path "../../../vdu/id";