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:mano-types";
26 import ietf-inet-types {
36 "Update model to support projects.";
41 "Initial revision. This YANG file defines
42 the reusable base types for VNF Management
43 and Orchestration (MANO).";
45 "Derived from earlier versions of base YANG files";
48 typedef meta-data-type {
54 typedef package-type {
55 description "Type of descriptor being on-boarded";
62 typedef parameter-data-type {
70 grouping primitive-parameter-value {
73 "List of parameters to the configuration primitive.";
77 "Name of the parameter.";
83 "Data type associated with the value.";
84 type manotypes:parameter-data-type;
89 "Value associated with the name.";
95 grouping primitive-parameter {
98 "Name of the parameter.";
104 "Data type associated with the name.";
105 type manotypes:parameter-data-type;
109 description "Is this field mandatory";
115 description "The default value for this field";
119 leaf parameter-pool {
120 description "NSD parameter pool name to use for this parameter";
126 "The value should be dimmed by the UI.
127 Only applies to parameters with default values.";
134 "The value should be hidden by the UI.
135 Only applies to parameters with default values.";
141 grouping ui-primitive-group {
142 list parameter-group {
144 "Grouping of parameters which are logically grouped in UI";
149 "Name of the parameter group";
155 "List of parameters for the service primitive.";
157 uses manotypes:primitive-parameter;
161 description "Is this parameter group mandatory";
168 grouping event-config {
171 "Sequence number for the configuration primitive.";
177 "Name of the configuration primitive.";
182 leaf user-defined-script {
184 "A user defined script.";
195 description "Value of the configuration primitive.";
201 grouping image-properties {
204 "Image name for the software image.
205 If the image name is found within the VNF package it will
206 be uploaded to all VIM accounts during onboarding process.
207 Otherwise, the image must be added to the VIM account with
208 the same name as entered here.
213 leaf image-checksum {
215 "Image md5sum for the software image.
216 The md5sum, if provided, along with the image name uniquely
217 identifies an image uploaded to the CAL.
224 grouping vca-relationships {
225 container vca-relationships {
227 description "List of relations between VCA componets.";
229 key "requires provides";
233 "Name of the required relation.";
239 "Name of the provided relation.";
246 grouping vca-metrics {
248 "Information about the VNF or VDU metrics";
250 description "List of VCA related metrics";
254 "Name of the metric, as defined in the Juju charm.";
258 } // END - grouping vca-metrics
260 grouping vca-configuration {
262 "Information about the VNF or VDU configuration. Note:
263 If the NS contains multiple instances of the
264 same VNF or VDU, each instance could have a different
267 choice config-method {
269 "Defines the configuration method for the VNF or VDU.";
272 "Use custom script for configuring the VNF or VDU.
273 This script is executed in the context of
274 Orchestrator (The same system and environment
279 "Script type - currently supported - Scripts confirming to Rift CA plugin";
289 "Configure the VNF or VDU through Juju.";
292 description "Juju charm to use with the VNF or VDU.";
296 description "Is this a proxy charm?";
300 uses manotypes:vca-relationships;
305 list config-primitive {
307 "List of config primitives supported by the
308 configuration agent for this VNF or VDU.";
313 "Name of the config primitive.";
319 "List of parameters to the config primitive.";
321 uses primitive-parameter;
324 leaf user-defined-script {
326 "A user defined script. If user defined script is defined,
327 the script will be executed using bash";
332 list initial-config-primitive {
334 "Initial set of configuration primitives.";
338 "Sequence number for the configuration primitive.";
342 choice primitive-type {
343 case primitive-definition {
346 "Name of the configuration primitive.";
350 uses primitive-parameter-value;
352 leaf user-defined-script {
354 "A user defined script.";
361 uses manotypes:vca-metrics;
363 } // END - grouping vca-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;
648 typedef nfvi-metric-type {
649 description "Type of NFVI metric to be monitored";
651 enum cpu_utilization;
652 enum average_memory_utilization;
655 enum disk_read_bytes;
656 enum disk_write_bytes;
658 enum packets_received;
659 enum packets_dropped;
663 typedef scaling-trigger {
674 enum post-scale-out {
680 typedef scaling-policy-type {
691 typedef scaling-criteria-operation {
703 container vm-flavor {
706 "Number of VCPUs for the VM.";
712 "Amount of memory in MB.";
718 "Amount of disk space in GB.";
722 } //grouping vm-flavor
724 grouping vm-flavor-name {
725 leaf vm-flavor-name {
726 description "flavor name to be used while creating vm using cloud account";
731 grouping vswitch-epa {
732 container vswitch-epa {
733 leaf ovs-acceleration {
735 "Specifies Open vSwitch acceleration mode.
736 MANDATORY: OVS acceleration is required
737 PREFERRED: OVS acceleration is preferred";
747 "Specifies Open vSwitch hardware offload mode.
748 MANDATORY: OVS offload is required
749 PREFERRED: OVS offload is preferred";
759 grouping hypervisor-epa {
760 container hypervisor-epa {
763 "Specifies the type of hypervisor.
779 description "Specifies the host level EPA attributes.";
782 "Host CPU model. Examples include: SandyBridge,
785 enum PREFER_WESTMERE;
786 enum REQUIRE_WESTMERE;
787 enum PREFER_SANDYBRIDGE;
788 enum REQUIRE_SANDYBRIDGE;
789 enum PREFER_IVYBRIDGE;
790 enum REQUIRE_IVYBRIDGE;
792 enum REQUIRE_HASWELL;
793 enum PREFER_BROADWELL;
794 enum REQUIRE_BROADWELL;
796 enum REQUIRE_NEHALEM;
801 enum PREFER_CORE2DUO;
802 enum REQUIRE_CORE2DUO;
807 description "Host CPU architecture.";
825 description "Host CPU Vendor.";
834 leaf cpu-socket-count {
835 description "Number of sockets on the host.";
839 leaf cpu-core-count {
840 description "Number of cores on the host.";
844 leaf cpu-core-thread-count {
845 description "Number of threads per cores on the host.";
851 description "List of CPU features.";
853 description "CPU feature.";
854 type cpu-feature-type;
859 leaf om-cpu-model-string {
860 description "OpenMANO CPU model string";
864 list om-cpu-feature {
866 description "List of OpenMANO CPU features";
868 description "CPU feature";
876 description "EPA attributes for the guest";
877 container guest-epa {
878 leaf trusted-execution {
879 description "This VM should be allocated from trusted pool";
885 "Memory page allocation size. If a VM requires
886 hugepages, it should choose LARGE or SIZE_2MB
887 or SIZE_1GB. If the VM prefers hugepages it
888 should choose PREFER_LARGE.
889 LARGE : Require hugepages (either 2MB or 1GB)
890 SMALL : Doesn't require hugepages
891 SIZE_2MB : Requires 2MB hugepages
892 SIZE_1GB : Requires 1GB hugepages
893 PREFER_LARGE : Application prefers hugepages";
903 leaf cpu-pinning-policy {
905 "CPU pinning policy describes association
906 between virtual CPUs in guest and the
907 physical CPUs in the host.
908 DEDICATED : Virtual CPUs are pinned to
910 SHARED : Multiple VMs may share the
912 ANY : Any policy is acceptable for the VM";
921 leaf cpu-thread-pinning-policy {
923 "CPU thread pinning policy describes how to
924 place the guest CPUs when the host supports
926 AVOID : Avoids placing a guest on a host
928 SEPARATE: Places vCPUs on separate cores,
929 and avoids placing two vCPUs on
930 two threads of same core.
931 ISOLATE : Places each vCPU on a different core,
932 and places no vCPUs from a different
933 guest on the same core.
934 PREFER : Attempts to place vCPUs on threads
946 "List of pcie passthrough devices.";
950 "Device identifier.";
955 "Number of devices to attach to the VM.";
968 container numa-node-policy {
970 "This policy defines NUMA topology of the
971 guest. Specifically identifies if the guest
972 should be run on a host with one NUMA
973 node or multiple NUMA nodes. As an example
974 a guest might need 8 VCPUs and 4 GB of
975 memory. However, it might need the VCPUs
976 and memory distributed across multiple
977 NUMA nodes. In this scenario, NUMA node
978 1 could run with 6 VCPUs and 3GB, and
979 NUMA node 2 could run with 2 VCPUs and
984 "The number of NUMA nodes to expose to the VM.";
990 "This policy specifies how the memory should
991 be allocated in a multi-node scenario.
992 STRICT : The memory must be allocated
993 strictly from the memory attached
995 PREFERRED : The memory should be allocated
996 preferentially from the memory
997 attached to the NUMA node";
1008 "NUMA node identification. Typically
1016 "List of VCPUs to allocate on
1020 description "List of VCPUs ids to allocate on
1027 "Memory size expressed in MB
1028 for this NUMA node.";
1032 choice om-numa-type {
1034 "OpenMANO Numa type selection";
1042 case paired-threads {
1043 container paired-threads {
1044 leaf num-paired-threads {
1048 list paired-thread-ids {
1050 "List of thread pairs to use in case of paired-thread NUMA";
1078 grouping provider-network {
1079 container provider-network {
1080 description "Container for the provider network.";
1081 leaf physical-network {
1083 "Name of the physical network on which the provider
1088 leaf segmentation_id {
1090 "ID of segregated virtual networks";
1096 grouping ns-service-primitive {
1097 list service-primitive {
1099 "Network service level service primitives.";
1105 "Name of the service primitive.";
1111 "List of parameters for the service primitive.";
1114 uses manotypes:primitive-parameter;
1117 list parameter-group {
1119 "Grouping of parameters which are logically grouped in UI";
1124 "Name of the parameter group";
1130 "List of parameters for the service primitive.";
1132 uses manotypes:primitive-parameter;
1136 description "Is this parameter group mandatory";
1142 list vnf-primitive-group {
1144 "List of service primitives grouped by VNF.";
1146 key "member-vnf-index-ref";
1147 leaf member-vnf-index-ref {
1149 "Reference to member-vnf within constituent-vnfds";
1155 "A reference to a vnfd. This is a
1157 ../../../../nsd:constituent-vnfd
1158 + [nsd:id = current()/../nsd:id-ref]
1160 NOTE: An issue with confd is preventing the
1161 use of xpath. Seems to be an issue with leafref
1162 to leafref, whose target is in a different module.
1163 Once that is resolved this will switched to use
1179 description "Index of this primitive";
1184 description "Name of the primitive in the VNF primitive ";
1190 leaf user-defined-script {
1192 "A user defined script.";
1198 grouping http-endpoints {
1199 list http-endpoint {
1201 "List of http endpoints to be used by monitoring params";
1205 description "The HTTP path on the management server";
1210 description "Pick HTTPS instead of HTTP , Default is false";
1216 description "The HTTP port to connect to";
1217 type inet:port-number;
1221 description "The HTTP basic auth username";
1226 description "The HTTP basic auth password";
1230 leaf polling-interval-secs {
1231 description "The HTTP polling interval in seconds";
1238 "Method that the URI should perform.
1239 Deafult action is GET.";
1241 type manotypes:http-method;
1246 description "Custom HTTP headers to put on HTTP request";
1249 description "HTTP header key";
1254 description "HTTP header value";
1261 grouping monitoring-param-aggregation {
1262 typedef aggregation-type {
1264 "aggregation-type, indicates the way to aggregate monitoring-params
1265 (e.g. how to aggregate CPU utilisation of all VNFs belonging to the
1266 same VNF group identified by member-vnf-index; or how to aggregate
1267 memory utilisation of all VDUs belonging to the same VDU group
1268 identified by vdu id)";
1278 leaf aggregation-type {
1279 type aggregation-type;
1283 grouping monitoring-param-ui-data {
1289 description "A tag to group monitoring parameters";
1295 description "Defines the UI Display variant of measured counters.";
1296 type manotypes:widget-type;
1301 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1306 grouping monitoring-param-value {
1308 type param-value-type;
1312 container numeric-constraints {
1315 "Minimum value for the parameter";
1320 "Maximum value for the parameter";
1325 container text-constraints {
1328 "Minimum string length for the parameter";
1333 "Maximum string length for the parameter";
1338 leaf value-integer {
1340 "Current value for an integer parameter";
1344 leaf value-decimal {
1346 "Current value for a decimal parameter";
1354 "Current value for a string parameter";
1359 grouping control-param {
1360 list control-param {
1362 "List of control parameters to manage and
1363 update the running configuration of the VNF";
1367 description "Identifier for control parameter";
1372 description "Name of a control parameter";
1377 description "A description of the control parameter";
1382 description "A tag to group control parameters";
1388 "Minimum value for the parameter";
1394 "Maximum value for the parameter";
1398 leaf current-value {
1400 "Current value for the parameter";
1406 "Step value for the parameter";
1415 type manotypes:widget-type;
1420 "This is the URL where the operation should be performed.";
1427 "Method that the URI should perform.
1428 Default Action is POST";
1430 type manotypes:http-method;
1436 "This is the operation payload or payload template as stringified
1437 JSON. This field provides the data to be sent for this operation
1445 grouping action-param {
1448 "List of action parameters to
1464 description "A tag to group monitoring parameter";
1470 "This is the URL where to perform the operation";
1476 "This is the method to be performed at the uri.
1477 POST by default for action";
1479 type manotypes:http-method;
1485 "This is the operation payload or payload template to be sent in
1486 the data for this operation call";
1493 grouping input-parameter {
1494 description "List of input parameters that can be specified when instantiating a network service.";
1496 list input-parameter {
1498 "List of input parameters";
1505 "An xpath that specfies which element in a descriptor is to be
1512 "The value that the element specified by the xpath should take when a
1513 record is created.";
1519 grouping input-parameter-xpath {
1520 list input-parameter-xpath {
1522 "List of xpaths to parameters inside the NSD
1523 the can be customized during the instantiation.";
1528 "An xpath that specifies the element in a descriptor.";
1533 description "A descriptive string";
1537 leaf default-value {
1538 description "Default Value for the Input Parameter";
1544 grouping nfvi-metrics {
1548 "Label to show in UI";
1555 "The total number of VCPUs available.";
1561 "The VCPU utilization (percentage).";
1572 "Label to show in UI";
1579 "The amount of memory (bytes) currently in use.";
1585 "The amount of memory (bytes) available.";
1591 "The memory utilization (percentage).";
1602 "Label to show in UI";
1609 "The amount of storage (bytes) currently in use.";
1615 "The amount of storage (bytes) available.";
1621 "The storage utilization (percentage).";
1629 container external-ports {
1632 "Label to show in UI";
1634 default "EXTERNAL PORTS";
1639 "The total number of external ports.";
1644 container internal-ports {
1647 "Label to show in UI";
1649 default "INTERNAL PORTS";
1654 "The total number of internal ports.";
1662 "Label to show in UI";
1664 default "NETWORK TRAFFIC";
1667 container incoming {
1670 "Label to show in UI";
1672 default "INCOMING NETWORK TRAFFIC";
1677 "The cumulative number of incoming bytes.";
1683 "The cumulative number of incoming packets.";
1689 "The current incoming byte-rate (bytes per second).";
1697 "The current incoming packet (packets per second).";
1704 container outgoing {
1707 "Label to show in UI";
1709 default "OUTGOING NETWORK TRAFFIC";
1714 "The cumulative number of outgoing bytes.";
1720 "The cumulative number of outgoing packets.";
1726 "The current outgoing byte-rate (bytes per second).";
1734 "The current outgoing packet (packets per second).";
1743 typedef alarm-severity-type {
1744 description "An indication of the importance or urgency of the alarm";
1752 typedef alarm-metric-type {
1753 description "The type of metrics to register the alarm for";
1755 enum CPU_UTILIZATION;
1756 enum MEMORY_UTILIZATION;
1757 enum STORAGE_UTILIZATION;
1761 typedef alarm-statistic-type {
1763 "Statistic type to use to determine threshold crossing
1774 typedef relational-operation-type {
1776 "The relational operator used to define whether an alarm,
1777 scaling event, etc. should be triggered in certain scenarios,
1778 such as if the metric statistic goes above or below a specified
1781 enum GE; // greater than or equal
1782 enum LE; // less than or equal
1783 enum GT; // greater than
1784 enum LT; // less than
1792 "This field is reserved for the identifier assigned by the VIM provider";
1798 description "A human readable string to identify the alarm";
1803 description "A description of this alarm";
1809 "The identifier of the VDUR that the alarm is associated with";
1821 list insufficient-data {
1838 "This flag indicates whether the alarm should be repeatedly emitted
1839 while the associated threshold has been crossed.";
1847 "This flag indicates whether the alarm has been enabled or
1855 description "A measure of the importance or urgency of the alarm";
1856 type alarm-severity-type;
1860 description "The metric to be tracked by this alarm.";
1861 type alarm-metric-type;
1865 description "The type of metric statistic that is tracked by this alarm";
1866 type alarm-statistic-type;
1871 "The relational operator used to define whether an alarm should be
1872 triggered in certain scenarios, such as if the metric statistic
1873 goes above or below a specified value.";
1874 type relational-operation-type;
1879 "This value defines the threshold that, if crossed, will trigger
1888 "The period defines the length of time (seconds) that the metric
1889 data are collected over in oreder to evaluate the chosen
1896 "Defines the length of time (seconds) in which metric data are
1897 collected in order to evaluate the chosen statistic.";
1902 typedef cloud-account-type {
1903 description "VIM account type";
1907 enum cloudsim_proxy;
1916 grouping host-aggregate {
1917 list host-aggregate {
1918 description "Name of the Host Aggregate";
1923 "Name of the additional information attached to the host-aggregate";
1926 leaf metadata-value {
1928 "Value of the corresponding metadata-key";
1934 grouping placement-group-input {
1936 type manotypes:cloud-account-type;
1938 choice cloud-provider {
1940 container availability-zone {
1941 description "Name of the Availability Zone";
1946 container server-group {
1947 description "Name of the Affinity/Anti-Affinity Server Group";
1952 uses host-aggregate;
1955 leaf aws-construct {
1960 leaf openmano-construct {
1965 leaf vsphere-construct {
1970 leaf mock-construct {
1975 leaf cloudsim-construct {
1982 grouping cloud-config {
1985 description "Used to configure the list of public keys to be injected as part
1986 of ns instantiation";
1989 description "Name of this key pair";
1994 description "Key associated with this key pair";
2001 description "List of users to be added through cloud-config";
2004 description "Name of the user ";
2009 description "The user name's real name";
2015 description "Used to configure the list of public keys to be injected as part
2016 of ns instantiation";
2019 description "Name of this key pair";
2024 description "Key associated with this key pair";
2031 grouping placement-group-info {
2036 "Place group construct to define the compute resource placement strategy
2037 in cloud environment";
2042 description "This is free text space used to describe the intent/rationale
2043 behind this placement group. This is for human consumption only";
2049 "Strategy associated with this placement group
2050 Following values are possible
2051 - COLOCATION: Colocation strategy imply intent to share the physical
2052 infrastructure (hypervisor/network) among all members
2054 - ISOLATION: Isolation strategy imply intent to not share the physical
2055 infrastructure (hypervisor/network) among the members
2062 default "COLOCATION";
2066 grouping ip-profile-info {
2067 description "Grouping for IP-Profile";
2068 container ip-profile-params {
2071 type inet:ip-version;
2075 leaf subnet-address {
2076 description "Subnet IP prefix associated with IP Profile";
2077 type inet:ip-prefix;
2080 leaf gateway-address {
2081 description "IP Address of the default gateway associated with IP Profile";
2082 type inet:ip-address;
2085 leaf security-group {
2086 description "Name of the security group";
2093 description "List of DNS Servers associated with IP Profile";
2094 type inet:ip-address;
2098 container dhcp-params {
2100 description "This flag indicates if DHCP is enabled or not";
2105 leaf start-address {
2106 description "Start IP address of the IP-Address range associated with DHCP domain";
2107 type inet:ip-address;
2111 description "Size of the DHCP pool associated with DHCP domain";
2116 leaf subnet-prefix-pool {
2117 description "VIM Specific reference to pre-created subnet prefix";
2123 grouping ip-profile-list {
2126 "List of IP Profiles.
2127 IP Profile describes the IP characteristics for the Virtual-Link";
2132 description "Name of the IP-Profile";
2137 description "Description for IP profile";
2141 uses ip-profile-info;
2145 grouping config-file {
2146 description "Grouping for files needed to be mounted into an additional drive";
2149 "List of configuration files to be written on an additional drive";
2152 description "Name of the configuration file";
2156 description "Full path of the destination in the guest";
2162 grouping supplemental-boot-data {
2163 description "Grouping for custom vim data";
2164 container supplemental-boot-data {
2165 uses manotypes:config-file;
2166 leaf boot-data-drive {
2167 description "Some VIMs implement additional drives to host config-files or meta-data";
2174 grouping volume-info {
2175 description "Grouping for Volume-info";
2178 description "Description for Volume";
2183 description "Size of disk in GB";
2187 choice volume-source {
2189 "Defines the source of the volume. Possible options are
2190 1. Ephemeral -- Empty disk
2191 2. Image -- Refer to image to be used for volume
2192 3. Volume -- Reference of pre-existing volume to be used
2202 uses image-properties;
2207 description "Type of disk-bus on which this disk is exposed to guest";
2217 description "The type of device as exposed to guest";
2227 grouping rpc-project-name {
2231 "Project to which this belongs";
2233 path "/rw-project:project/rw-project:name";