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:mano-types";
26 import ietf-inet-types {
36 "Initial revision. This YANG file defines
37 the reusable base types for VNF Management
38 and Orchestration (MANO).";
40 "Derived from earlier versions of base YANG files";
43 typedef package-type {
44 description "Type of descriptor being on-boarded";
51 typedef parameter-data-type {
59 grouping primitive-parameter-value {
62 "List of parameters to the configuration primitive.";
66 "Name of the parameter.";
72 "Value associated with the name.";
78 grouping primitive-parameter {
81 "Name of the parameter.";
87 "Data type associated with the name.";
88 type manotypes:parameter-data-type;
92 description "Is this field mandatory";
98 description "The default value for this field";
102 leaf parameter-pool {
103 description "NSD parameter pool name to use for this parameter";
109 "The value should be dimmed by the UI.
110 Only applies to parameters with default values.";
116 "The value should be hidden by the UI.
117 Only applies to parameters with default values.";
122 grouping ui-primitive-group {
123 list parameter-group {
125 "Grouping of parameters which are logically grouped in UI";
130 "Name of the parameter group";
136 "List of parameters for the service primitive.";
138 uses manotypes:primitive-parameter;
142 description "Is this parameter group mandatory";
149 grouping image-properties {
152 "Image name for the software image.
153 If the image name is found within the VNF package it will
154 be uploaded to all VIM accounts during onboarding process.
155 Otherwise, the image must be added to the VIM account with
156 the same name as entered here.
161 leaf image-checksum {
163 "Image md5sum for the software image.
164 The md5sum, if provided, along with the image name uniquely
165 identifies an image uploaded to the CAL.
170 grouping initial-config {
173 "Sequence number for the configuration primitive.";
179 "Name of the configuration primitive.";
184 leaf user-defined-script {
186 "A user defined script.";
197 description "Value of the configuration primitive.";
203 grouping vnf-configuration {
204 container vnf-configuration {
205 rwpb:msg-new VnfConfiguration;
207 "Information about the VNF configuration. Note:
208 If the NS contains multiple instances of the
209 same VNF, each instance could have a different
212 choice config-method {
214 "Defines the configuration method for the VNF.";
217 "Use NETCONF for configuring the VNF.";
221 "Netconf configuration target";
230 "Protocol to use for NETCONF such as ssh";
239 "Port for the NETCONF server.";
240 type inet:port-number;
247 "Use REST for configuring the VNF.";
251 "Port for the REST server.";
252 type inet:port-number;
259 "Use custom script for configuring the VNF.
260 This script is executed in the context of
261 Orchestrator (The same system and environment
266 "Script type - currently supported : bash, expect";
277 "Configure the VNF through Juju.";
280 description "Juju charm to use with the VNF.";
287 container config-access {
288 leaf mgmt-ip-address {
290 "IP address to be used to configure this VNF,
291 optional if it is possible to resolve dynamically.";
292 type inet:ip-address;
297 "User name for configuration.";
303 "Password for configuration access authentication.";
308 container config-attributes {
310 "Miscellaneous input parameters to be considered
311 while processing the NSD to apply configuration";
313 leaf config-priority {
315 "Configuration priority - order of configuration
316 to be applied to each VNF in this NS ,A low
317 number takes precedence over a high number";
323 "Wait (seconds) before applying the configuration to VNF";
328 list service-primitive {
329 rwpb:msg-new ServicePrimitive;
331 "List of service primitives supported by the
332 configuration agent for this VNF.";
337 "Name of the service primitive.";
343 "List of parameters to the service primitive.";
345 uses primitive-parameter;
349 list initial-config-primitive {
350 rwpb:msg-new InitialConfigPrimitive;
352 "Initial set of configuration primitives.";
357 leaf config-template {
359 "Configuration template for each VNF";
363 } // END - grouping vnf-configuration
365 typedef virtual-link-type {
367 "Type of virtual link
368 ELAN: A multipoint service connecting a set of VNFs
369 // ELINE: For a simple point to point connection
370 // between a VNF and the existing network.
371 // ETREE: A multipoint service connecting one or
372 // more roots and a set of leaves, but
373 // preventing inter-leaf communication.";
381 grouping named-value {
391 typedef http-method {
393 "Type of HTTP operation";
407 "Type of API to fetch monitoring parameters";
416 typedef json-query-method {
418 "The method to extract a value from a JSON response
420 NAMEKEY - Use the name as the key for a non-nested value.
421 JSONPATH - Use jsonpath-rw implementation to extract a value.
422 OBJECTPATH - Use objectpath implementation to extract a value.";
430 typedef param-value-type {
432 "The type of the parameter value";
440 typedef connection-point-type {
442 "Type of connection point
444 // VNIC_ADDR: Virtual NIC Address
445 // PNIC_ADDR: Physical NIC Address
446 // PPORT: Physical Port.";
453 typedef widget-type {
455 "Type of the widget, typically used by the UI.";
466 typedef cpu-feature-type {
468 "Enumeration for CPU features.
470 AES: CPU supports advanced instruction set for
471 AES (Advanced Encryption Standard).
473 CAT: Cache Allocation Technology (CAT) allows
474 an Operating System, Hypervisor, or similar
475 system management agent to specify the amount
476 of L3 cache (currently the last-level cache
477 in most server and client platforms) space an
478 application can fill (as a hint to hardware
479 functionality, certain features such as power
480 management may override CAT settings).
482 CMT: Cache Monitoring Technology (CMT) allows
483 an Operating System, Hypervisor, or similar
484 system management agent to determine the
485 usage of cache based on applications running
486 on the platform. The implementation is
487 directed at L3 cache monitoring (currently
488 the last-level cache in most server and
491 DDIO: Intel Data Direct I/O (DDIO) enables
492 Ethernet server NICs and controllers talk
493 directly to the processor cache without a
494 detour via system memory. This enumeration
495 specifies if the VM requires a DDIO
539 enum REQUIRE_CLFLUSH;
567 enum REQUIRE_PCLMULQDQ;
568 enum PREFER_PCLMULQDQ;
571 enum REQUIRE_MONITOR;
609 enum REQUIRE_TSC_DEADLINE_TIMER;
610 enum PREFER_TSC_DEADLINE_TIMER;
619 enum REQUIRE_FSGSBASE;
620 enum PREFER_FSGSBASE;
633 enum REQUIRE_INVPCID;
649 container vm-flavor {
652 "Number of VCPUs for the VM.";
658 "Amount of memory in MB.";
664 "Amount of disk space in GB.";
668 } //grouping vm-flavor
670 grouping vswitch-epa {
671 container vswitch-epa {
672 leaf ovs-acceleration {
674 "Specifies Open vSwitch acceleration mode.
675 MANDATORY: OVS acceleration is required
676 PREFERRED: OVS acceleration is preferred";
686 "Specifies Open vSwitch hardware offload mode.
687 MANDATORY: OVS offload is required
688 PREFERRED: OVS offload is preferred";
698 grouping hypervisor-epa {
699 container hypervisor-epa {
702 "Specifies the type of hypervisor.
718 description "Specifies the host level EPA attributes.";
721 "Host CPU model. Examples include: SandyBridge,
724 enum PREFER_WESTMERE;
725 enum REQUIRE_WESTMERE;
726 enum PREFER_SANDYBRIDGE;
727 enum REQUIRE_SANDYBRIDGE;
728 enum PREFER_IVYBRIDGE;
729 enum REQUIRE_IVYBRIDGE;
731 enum REQUIRE_HASWELL;
732 enum PREFER_BROADWELL;
733 enum REQUIRE_BROADWELL;
735 enum REQUIRE_NEHALEM;
740 enum PREFER_CORE2DUO;
741 enum REQUIRE_CORE2DUO;
746 description "Host CPU architecture.";
764 description "Host CPU Vendor.";
773 leaf cpu-socket-count {
774 description "Number of sockets on the host.";
778 leaf cpu-core-count {
779 description "Number of cores on the host.";
783 leaf cpu-core-thread-count {
784 description "Number of threads per cores on the host.";
790 description "List of CPU features.";
792 description "CPU feature.";
793 type cpu-feature-type;
798 leaf om-cpu-model-string {
799 description "OpenMANO CPU model string";
803 list om-cpu-feature {
805 description "List of OpenMANO CPU features";
807 description "CPU feature";
815 description "EPA attributes for the guest";
816 container guest-epa {
817 leaf trusted-execution {
818 description "This VM should be allocated from trusted pool";
824 "Memory page allocation size. If a VM requires
825 hugepages, it should choose LARGE or SIZE_2MB
826 or SIZE_1GB. If the VM prefers hugepages it
827 should choose PREFER_LARGE.
828 LARGE : Require hugepages (either 2MB or 1GB)
829 SMALL : Doesn't require hugepages
830 SIZE_2MB : Requires 2MB hugepages
831 SIZE_1GB : Requires 1GB hugepages
832 PREFER_LARGE : Application prefers hugepages";
842 leaf cpu-pinning-policy {
844 "CPU pinning policy describes association
845 between virtual CPUs in guest and the
846 physical CPUs in the host.
847 DEDICATED : Virtual CPUs are pinned to
849 SHARED : Multiple VMs may share the
851 ANY : Any policy is acceptable for the VM";
860 leaf cpu-thread-pinning-policy {
862 "CPU thread pinning policy describes how to
863 place the guest CPUs when the host supports
865 AVOID : Avoids placing a guest on a host
867 SEPARATE: Places vCPUs on separate cores,
868 and avoids placing two vCPUs on
869 two threads of same core.
870 ISOLATE : Places each vCPU on a different core,
871 and places no vCPUs from a different
872 guest on the same core.
873 PREFER : Attempts to place vCPUs on threads
885 "List of pcie passthrough devices.";
889 "Device identifier.";
894 "Number of devices to attach to the VM.";
907 container numa-node-policy {
909 "This policy defines NUMA topology of the
910 guest. Specifically identifies if the guest
911 should be run on a host with one NUMA
912 node or multiple NUMA nodes. As an example
913 a guest might need 8 VCPUs and 4 GB of
914 memory. However, it might need the VCPUs
915 and memory distributed across multiple
916 NUMA nodes. In this scenario, NUMA node
917 1 could run with 6 VCPUs and 3GB, and
918 NUMA node 2 could run with 2 VCPUs and
923 "The number of NUMA nodes to expose to the VM.";
929 "This policy specifies how the memory should
930 be allocated in a multi-node scenario.
931 STRICT : The memory must be allocated
932 strictly from the memory attached
934 PREFERRED : The memory should be allocated
935 preferentially from the memory
936 attached to the NUMA node";
947 "NUMA node identification. Typically
955 "List of VCPUs to allocate on
959 description "List of VCPUs ids to allocate on
966 "Memory size expressed in MB
967 for this NUMA node.";
971 choice om-numa-type {
973 "OpenMANO Numa type selection";
981 case paired-threads {
982 container paired-threads {
983 leaf num-paired-threads {
987 list paired-thread-ids {
989 "List of thread pairs to use in case of paired-thread NUMA";
1017 grouping provider-network {
1018 container provider-network {
1019 description "Container for the provider network.";
1020 leaf physical-network {
1022 "Name of the physical network on which the provider
1029 "Type of the overlay network.";
1038 leaf segmentation_id {
1040 "ID of segregated virtual networks";
1046 grouping monitoring-param {
1047 list http-endpoint {
1049 "List of http endpoints to be used by monitoring params";
1053 description "The HTTP path on the management server";
1058 description "Pick HTTPS instead of HTTP , Default is false";
1064 description "The HTTP port to connect to";
1065 type inet:port-number;
1069 description "The HTTP basic auth username";
1074 description "The HTTP basic auth password";
1078 leaf polling-interval-secs {
1079 description "The HTTP polling interval in seconds";
1086 "Method that the URI should perform.
1087 Deafult action is GET.";
1089 type manotypes:http-method;
1094 description "Custom HTTP headers to put on HTTP request";
1097 description "HTTP header key";
1102 description "HTTP header value";
1108 list monitoring-param {
1110 "List of monitoring parameters at the network service level";
1120 leaf http-endpoint-ref {
1122 path "../../http-endpoint/path";
1126 leaf json-query-method {
1127 type json-query-method;
1131 container json-query-params {
1134 "The jsonpath to use to extract value from JSON structure";
1139 "The objectpath to use to extract value from JSON structure";
1144 uses monitoring-param-ui-data;
1145 uses monitoring-param-value;
1150 grouping monitoring-param-aggregation {
1151 typedef aggregation-type {
1152 description "aggregation-type";
1162 leaf aggregation-type {
1163 type aggregation-type;
1167 grouping monitoring-param-ui-data {
1173 description "A tag to group monitoring parameters";
1179 description "Defines the UI Display variant of measured counters.";
1180 type manotypes:widget-type;
1184 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1189 grouping monitoring-param-value {
1191 type param-value-type;
1195 container numeric-constraints {
1198 "Minimum value for the parameter";
1203 "Maximum value for the parameter";
1208 container text-constraints {
1211 "Minimum string length for the parameter";
1216 "Maximum string length for the parameter";
1221 leaf value-integer {
1223 "Current value for an integer parameter";
1227 leaf value-decimal {
1229 "Current value for a decimal parameter";
1237 "Current value for a string parameter";
1242 grouping control-param {
1243 list control-param {
1245 "List of control parameters to manage and
1246 update the running configuration of the VNF";
1262 description "A tag to group control parameters";
1268 "Minimum value for the parameter";
1274 "Maximum value for the parameter";
1278 leaf current-value {
1280 "Current value for the parameter";
1286 "Step value for the parameter";
1295 type manotypes:widget-type;
1300 "This is the URL where the operation should be performed.";
1307 "Method that the URI should perform.
1308 Default Action is POST";
1310 type manotypes:http-method;
1316 "This is the operation payload or payload template as stringified
1317 JSON. This field provides the data to be sent for this operation
1325 grouping action-param {
1328 "List of action parameters to
1344 description "A tag to group monitoring parameter";
1350 "This is the URL where to perform the operation";
1356 "This is the method to be performed at the uri.
1357 POST by default for action";
1359 type manotypes:http-method;
1365 "This is the operation payload or payload template to be sent in
1366 the data for this operation call";
1373 grouping input-parameter {
1374 description "List of input parameters that can be specified when instantiating a network service.";
1376 list input-parameter {
1378 "List of input parameters";
1385 "An xpath that specfies which element in a descriptor is to be
1392 "The value that the element specified by the xpath should take when a
1393 record is created.";
1399 grouping input-parameter-xpath {
1400 list input-parameter-xpath {
1402 "List of xpaths to parameters inside the NSD
1403 the can be customized during the instantiation.";
1408 "An xpath that specifies the element in a descriptor.";
1413 description "A descriptive string";
1417 leaf default-value {
1418 description "/nsd:nsd-catalog/nsd:nsd/nsd:vendor";
1424 grouping nfvi-metrics {
1428 "Label to show in UI";
1435 "The total number of VCPUs available.";
1441 "The VCPU utilization (percentage).";
1452 "Label to show in UI";
1459 "The amount of memory (bytes) currently in use.";
1465 "The amount of memory (bytes) available.";
1471 "The memory utilization (percentage).";
1482 "Label to show in UI";
1489 "The amount of storage (bytes) currently in use.";
1495 "The amount of storage (bytes) available.";
1501 "The storage utilization (percentage).";
1509 container external-ports {
1512 "Label to show in UI";
1514 default "EXTERNAL PORTS";
1519 "The total number of external ports.";
1524 container internal-ports {
1527 "Label to show in UI";
1529 default "INTERNAL PORTS";
1534 "The total number of internal ports.";
1542 "Label to show in UI";
1544 default "NETWORK TRAFFIC";
1547 container incoming {
1550 "Label to show in UI";
1552 default "INCOMING NETWORK TRAFFIC";
1557 "The cumulative number of incoming bytes.";
1563 "The cumulative number of incoming packets.";
1569 "The current incoming byte-rate (bytes per second).";
1577 "The current incoming packet (packets per second).";
1584 container outgoing {
1587 "Label to show in UI";
1589 default "OUTGOING NETWORK TRAFFIC";
1594 "The cumulative number of outgoing bytes.";
1600 "The cumulative number of outgoing packets.";
1606 "The current outgoing byte-rate (bytes per second).";
1614 "The current outgoing packet (packets per second).";
1623 typedef alarm-severity-type {
1624 description "An indication of the importance or urgency of the alarm";
1632 typedef alarm-metric-type {
1633 description "The type of metrics to register the alarm for";
1635 enum CPU_UTILIZATION;
1636 enum MEMORY_UTILIZATION;
1637 enum STORAGE_UTILIZATION;
1641 typedef alarm-statistic-type {
1643 "Statistic type to use to determine threshold crossing
1654 typedef alarm-operation-type {
1656 "The relational operator used to define whether an alarm
1657 should be triggered in certain scenarios, such as if the
1658 metric statistic goes above or below a specified value.";
1660 enum GE; // greater than or equal
1661 enum LE; // less than or equal
1662 enum GT; // greater than
1663 enum LT; // less than
1671 "This field is reserved for the identifier assigned by the VIM provider";
1677 description "A human readable string to identify the alarm";
1682 description "A description of this alarm";
1688 "The identifier of the VDUR that the alarm is associated with";
1700 list insufficient-data {
1717 "This flag indicates whether the alarm should be repeatedly emitted
1718 while the associated threshold has been crossed.";
1726 "This flag indicates whether the alarm has been enabled or
1734 description "A measure of the importance or urgency of the alarm";
1735 type alarm-severity-type;
1739 description "The metric to be tracked by this alarm.";
1740 type alarm-metric-type;
1744 description "The type of metric statistic that is tracked by this alarm";
1745 type alarm-statistic-type;
1750 "The relational operator used to define whether an alarm should be
1751 triggered in certain scenarios, such as if the metric statistic
1752 goes above or below a specified value.";
1753 type alarm-operation-type;
1758 "This value defines the threshold that, if crossed, will trigger
1767 "The period defines the length of time (seconds) that the metric
1768 data are collected over in oreder to evaluate the chosen
1775 "Defines the length of time (seconds) in which metric data are
1776 collected in order to evaluate the chosen statistic.";
1781 typedef cloud-account-type {
1782 description "VIM account type";
1786 enum cloudsim_proxy;
1795 grouping host-aggregate {
1796 list host-aggregate {
1797 description "Name of the Host Aggregate";
1802 "Name of the additional information attached to the host-aggregate";
1805 leaf metadata-value {
1807 "Value of the corresponding metadata-key";
1813 grouping placement-group-input {
1815 type manotypes:cloud-account-type;
1817 choice cloud-provider {
1819 container availability-zone {
1820 description "Name of the Availability Zone";
1825 container server-group {
1826 description "Name of the Affinity/Anti-Affinity Server Group";
1831 uses host-aggregate;
1834 leaf aws-construct {
1839 leaf openmano-construct {
1844 leaf vsphere-construct {
1849 leaf mock-construct {
1854 leaf cloudsim-construct {
1861 grouping placement-group-info {
1866 "Place group construct to define the compute resource placement strategy
1867 in cloud environment";
1872 description "This is free text space used to describe the intent/rationale
1873 behind this placement group. This is for human consumption only";
1879 "Strategy associated with this placement group
1880 Following values are possible
1881 - COLOCATION: Colocation strategy imply intent to share the physical
1882 infrastructure (hypervisor/network) among all members
1884 - ISOLATION: Isolation strategy imply intent to not share the physical
1885 infrastructure (hypervisor/network) among the members
1892 default "COLOCATION";
1896 grouping ip-profile-info {
1897 description "Grouping for IP-Profile";
1898 container ip-profile-params {
1901 type inet:ip-version;
1905 leaf subnet-address {
1906 description "Subnet IP prefix associated with IP Profile";
1907 type inet:ip-prefix;
1910 leaf gateway-address {
1911 description "IP Address of the default gateway associated with IP Profile";
1912 type inet:ip-address;
1915 leaf security-group {
1916 description "Name of the security group";
1923 description "List of DNS Servers associated with IP Profile";
1924 type inet:ip-address;
1928 container dhcp-params {
1930 description "This flag indicates if DHCP is enabled or not";
1935 leaf start-address {
1936 description "Start IP address of the IP-Address range associated with DHCP domain";
1937 type inet:ip-address;
1941 description "Size of the DHCP pool associated with DHCP domain";
1946 leaf subnet-prefix-pool {
1947 description "VIM Specific reference to pre-created subnet prefix";
1953 grouping ip-profile-list {
1956 "List of IP Profiles.
1957 IP Profile describes the IP characteristics for the Virtual-Link";
1962 description "Name of the IP-Profile";
1967 description "Description for IP profile";
1971 uses ip-profile-info;
1975 grouping config-file {
1976 description "Grouping for files needed to be mounted into an additional drive";
1979 "List of configuration files to be written on an additional drive";
1982 description "Name of the configuration file";
1986 description "Full path of the destination in the guest";
1992 grouping supplemental-boot-data {
1993 description "Grouping for custom vim data";
1994 container supplemental-boot-data {
1995 uses manotypes:config-file;
1996 leaf boot-data-drive {
1997 description "Some VIMs implement additional drives to host config-files or meta-data";
2004 grouping volume-info {
2005 description "Grouping for Volume-info";
2008 description "Description for Volume";
2013 description "Size of disk in GB";
2017 choice volume-source {
2019 "Defines the source of the volume. Possible options are
2020 1. Ephemeral -- Empty disk
2021 2. Image -- Refer to image to be used for volume
2022 3. Volume -- Reference of pre-existing volume to be used
2032 uses image-properties;
2038 description "Type of disk-bus on which this disk is exposed to guest";
2048 description "The type of device as exposed to guest";