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";
30 import ietf-inet-types {
36 "Initial revision. This YANG file defines
37 the common types for Virtual Network Function
40 "Derived from earlier versions of base YANG files";
43 grouping common-connection-point {
45 description "Name of the connection point";
50 description "Identifier for the internal connection points";
55 description "Short name to appear as label in the UI";
60 description "Type of the connection point.";
61 type manotypes:connection-point-type;
64 leaf port-security-enabled {
65 description "Enables the port security for the port";
70 typedef interface-type {
77 typedef vnf-operational-status {
88 grouping virtual-interface {
89 container virtual-interface {
91 "Container for the virtual interface properties";
95 "Specifies the type of virtual interface
97 VIRTIO : Use the traditional VIRTIO interface.
98 PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
99 SR-IOV : Use SR-IOV interface.
100 E1000 : Emulate E1000 interface.
101 RTL8139 : Emulate RTL8139 interface.
102 PCNET : Emulate PCNET interface.
103 OM-MGMT : Deprecated! Use VIRTIO instead and set the VNF management interface at vnfd:mgmt-interface:cp";
107 enum PCI-PASSTHROUGH;
119 "Specifies the virtual PCI address. Expressed in
120 the following format dddd:dd:dd.d. For example
121 0000:00:12.0. This information can be used to
122 pass as metadata during the VM creation.";
128 "Aggregate bandwidth of the NIC.";
134 grouping vnfd-descriptor {
136 description "Identifier for the VNFD.";
143 description "VNFD name.";
149 description "Short name to appear as label in the UI";
154 description "Vendor of the VNFD.";
160 "Vendor logo for the Virtual Network Function";
165 description "Description of the VNFD.";
170 description "Version of the VNFD";
174 container vnf-configuration {
175 uses manotypes:vca-configuration;
178 leaf operational-status {
180 "The operational status of the VNF
181 init : The VNF has just started.
182 running : The VNF is active in VM
183 upgrading : The VNF is being upgraded (EXPERIMENTAL)
184 terminate : The VNF is being terminated
185 terminated : The VNF is in the terminated state.
186 failed : The VNF instantiation failed.
188 type vnf-operational-status;
191 container mgmt-interface {
193 "Interface over which the VNF is managed.";
195 choice endpoint-type {
197 "Indicates the type of management endpoint.";
201 "Specifies the static IP address for managing the VNF.";
203 type inet:ip-address;
209 "Use the default management interface on this VDU.";
219 "Use the ip address associated with this connection point. This cp is then considered as management.";
222 path "../../connection-point/name";
230 "Port for the management interface.";
231 type inet:port-number;
234 container dashboard-params {
235 description "Parameters for the VNF dashboard";
238 description "The HTTP path for the dashboard";
243 description "Pick HTTPS instead of HTTP , Default is false";
248 description "The HTTP port for the dashboard";
249 type inet:port-number;
257 "List of Internal Virtual Link Descriptors (VLD).
258 The internal VLD describes the basic topology of
259 the connectivity such as E-LAN, E-Line, E-Tree.
260 between internal VNF components of the system.";
263 description "Identifier for the VLD";
268 description "Name of the internal VLD";
273 description "Short name to appear as label in the UI";
282 type manotypes:virtual-link-type;
285 leaf root-bandwidth {
287 "For ELAN this is the aggregate bandwidth.";
291 leaf leaf-bandwidth {
293 "For ELAN this is the bandwidth of branches.";
297 list internal-connection-point {
299 description "List of internal connection points in this VLD";
301 description "reference to the internal connection point id";
303 path "../../../vdu/internal-connection-point/id";
307 description "IP address of the internal connection point";
308 type inet:ip-address;
312 uses manotypes:provider-network;
314 description "Extra parameters for VLD instantiation";
316 case vim-network-ref {
317 leaf vim-network-name {
319 "Name of network in VIM account. This is used to indicate
320 pre-provisioned network name in cloud account.";
325 case vim-network-profile {
326 leaf ip-profile-ref {
327 description "Named reference to IP-profile object";
335 uses manotypes:ip-profile-list;
337 list connection-point {
340 "List for external connection points. Each VNF has one
341 or more external connection points that connect the VNF
342 to other VNFs or to external networks. Each VNF exposes
343 connection points to the orchestrator, which can construct
344 network services by connecting the connection points
345 between different VNFs. The NFVO will use VLDs and VNFFGs
346 at the network service level to construct network services.";
348 uses common-connection-point;
352 description "List of Virtual Deployment Units";
356 description "Unique id for the VDU";
361 description "Unique name for the VDU";
366 description "Description of the VDU.";
371 description "Number of instances of VDU";
377 "Specifies the virtual PCI address. Expressed in
378 the following format dddd:dd:dd.d. For example
379 0000:00:12.0. This information can be used to
380 pass as metadata during the VM creation.";
384 uses manotypes:vm-flavor;
385 uses manotypes:guest-epa;
386 uses manotypes:vswitch-epa;
387 uses manotypes:hypervisor-epa;
388 uses manotypes:host-epa;
393 uses manotypes:alarm;
396 uses manotypes:image-properties;
398 list alternative-images {
401 "List of alternative images per VIM type.
402 Different images can be used for specific types of VIMs instead
403 of the default image. This allows deployments in sites where the
404 image identifier in the VIM is given by the VIM provider and
406 If an alternative image is specified for a VIM type, it will prevail
407 over the default image";
410 description "VIM type: openvim, openstack, vmware, aws, etc.";
414 uses manotypes:image-properties;
417 container vdu-configuration {
418 uses manotypes:vca-configuration;
421 choice cloud-init-input {
423 "Indicates how the contents of cloud-init script are provided.
424 There are 2 choices - inline or in a file";
429 "Contents of cloud-init script, provided inline, in cloud-config format";
435 leaf cloud-init-file {
437 "Name of file with contents of cloud-init script in cloud-config format";
443 uses manotypes:supplemental-boot-data;
445 list internal-connection-point {
448 "List for internal connection points. Each VNFC
449 has zero or more internal connection points.
450 Internal connection points are used for connecting
451 the VNF with components internal to the VNF. If a VNF
452 has only one VNFC, it may not have any internal
455 uses common-connection-point;
457 leaf internal-vld-ref {
459 path "../../../internal-vld/id";
466 "List of Interfaces (external and internal) for the VNF";
471 "Name of the interface. Note that this
472 name has only local significance to the VDU.";
478 "Explicit Position of the interface within the list";
484 "Type of the Interface";
492 "MAC address of the interface.
493 Some VNFs require a specific MAC address to be configured
494 in the interface. While this is not recommended at all in
495 NFV environments, this parameter exists to allow those
497 This parameter will be likely deprecated in the future.";
501 choice connection-point-type {
503 leaf internal-connection-point-ref {
505 "Leaf Ref to the particular internal connection point";
507 path "../../internal-connection-point/id";
512 leaf external-connection-point-ref {
514 "Leaf Ref to the particular external connection point";
516 path "../../../connection-point/name";
522 uses virtual-interface;
530 description "Name of the disk-volumes, e.g. vda, vdb etc";
534 uses manotypes:volume-info;
538 list vdu-dependency {
540 "List of VDU dependencies.";
543 leaf vdu-source-ref {
549 leaf vdu-depends-on-ref {
551 "Reference to the VDU on which
552 the source VDU depends.";
559 leaf service-function-chain {
560 description "Type of node in Service Function Chaining Architecture";
571 leaf service-function-type {
573 "Type of Service Function.
574 NOTE: This needs to map with Service Function Type in ODL to
575 support VNFFG. Service Function Type is mandatory param in ODL
576 SFC. This is temporarily set to string for ease of use";
580 uses manotypes:monitoring-param;
582 list placement-groups {
583 description "List of placement groups at VNF level";
586 uses manotypes:placement-group-info;
591 "List of VDUs that are part of this placement group";
592 key "member-vdu-ref";
594 leaf member-vdu-ref {
596 path "../../../vdu/id";