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 configuration-method {
261 choice config-method {
263 "Defines the configuration method for the VNF or VDU.";
266 "Use custom script for configuring the VNF or VDU.
267 This script is executed in the context of
268 Orchestrator (The same system and environment
273 "Script type - currently supported - Scripts confirming to Rift CA plugin";
283 "Configure the VNF or VDU through Juju.";
286 description "Juju charm to use with the VNF or VDU.";
290 description "Is this a proxy charm?";
294 uses manotypes:vca-relationships;
300 grouping ns-configuration {
302 "Information about NS configuration. Note:
303 In the future this should be equivalent to vca-configuration
306 uses manotypes:configuration-method;
309 grouping vca-configuration {
311 "Information about the VNF or VDU configuration. Note:
312 If the NS contains multiple instances of the
313 same VNF or VDU, each instance could have a different
316 uses manotypes:configuration-method;
318 list config-primitive {
320 "List of config primitives supported by the
321 configuration agent for this VNF or VDU.";
326 "Name of the config primitive.";
332 "List of parameters to the config primitive.";
334 uses primitive-parameter;
337 leaf user-defined-script {
339 "A user defined script. If user defined script is defined,
340 the script will be executed using bash";
345 list initial-config-primitive {
347 "Initial set of configuration primitives.";
351 "Sequence number for the configuration primitive.";
355 choice primitive-type {
356 case primitive-definition {
359 "Name of the configuration primitive.";
363 uses primitive-parameter-value;
365 leaf user-defined-script {
367 "A user defined script.";
374 uses manotypes:vca-metrics;
376 } // END - grouping vca-configuration
378 typedef virtual-link-type {
380 "Type of virtual link
381 ELAN: A multipoint service connecting a set of VNFs
382 ELINE: For a simple point to point connection
383 // between a VNF and the existing network.
384 // ETREE: A multipoint service connecting one or
385 // more roots and a set of leaves, but
386 // preventing inter-leaf communication.";
394 grouping named-value {
404 typedef http-method {
406 "Type of HTTP operation";
420 "Type of API to fetch monitoring parameters";
429 typedef json-query-method {
431 "The method to extract a value from a JSON response
433 NAMEKEY - Use the name as the key for a non-nested value.
434 JSONPATH - Use jsonpath-rw implementation to extract a value.
435 OBJECTPATH - Use objectpath implementation to extract a value.";
443 typedef param-value-type {
445 "The type of the parameter value";
453 typedef connection-point-type {
455 "Type of connection point
457 // VNIC_ADDR: Virtual NIC Address
458 // PNIC_ADDR: Physical NIC Address
459 // PPORT: Physical Port.";
466 typedef widget-type {
468 "Type of the widget, typically used by the UI.";
479 typedef cpu-feature-type {
481 "Enumeration for CPU features.
483 AES: CPU supports advanced instruction set for
484 AES (Advanced Encryption Standard).
486 CAT: Cache Allocation Technology (CAT) allows
487 an Operating System, Hypervisor, or similar
488 system management agent to specify the amount
489 of L3 cache (currently the last-level cache
490 in most server and client platforms) space an
491 application can fill (as a hint to hardware
492 functionality, certain features such as power
493 management may override CAT settings).
495 CMT: Cache Monitoring Technology (CMT) allows
496 an Operating System, Hypervisor, or similar
497 system management agent to determine the
498 usage of cache based on applications running
499 on the platform. The implementation is
500 directed at L3 cache monitoring (currently
501 the last-level cache in most server and
504 DDIO: Intel Data Direct I/O (DDIO) enables
505 Ethernet server NICs and controllers talk
506 directly to the processor cache without a
507 detour via system memory. This enumeration
508 specifies if the VM requires a DDIO
552 enum REQUIRE_CLFLUSH;
580 enum REQUIRE_PCLMULQDQ;
581 enum PREFER_PCLMULQDQ;
584 enum REQUIRE_MONITOR;
622 enum REQUIRE_TSC_DEADLINE_TIMER;
623 enum PREFER_TSC_DEADLINE_TIMER;
632 enum REQUIRE_FSGSBASE;
633 enum PREFER_FSGSBASE;
646 enum REQUIRE_INVPCID;
661 typedef nfvi-metric-type {
662 description "Type of NFVI metric to be monitored";
664 enum cpu_utilization;
665 enum average_memory_utilization;
668 enum disk_read_bytes;
669 enum disk_write_bytes;
671 enum packets_received;
672 enum packets_dropped;
676 typedef scaling-trigger {
687 enum post-scale-out {
693 typedef scaling-policy-type {
704 typedef scaling-criteria-operation {
716 container vm-flavor {
719 "Number of VCPUs for the VM.";
725 "Amount of memory in MB.";
731 "Amount of disk space in GB.";
735 } //grouping vm-flavor
737 grouping vm-flavor-name {
738 leaf vm-flavor-name {
739 description "flavor name to be used while creating vm using cloud account";
744 grouping vswitch-epa {
745 container vswitch-epa {
746 leaf ovs-acceleration {
748 "Specifies Open vSwitch acceleration mode.
749 MANDATORY: OVS acceleration is required
750 PREFERRED: OVS acceleration is preferred";
760 "Specifies Open vSwitch hardware offload mode.
761 MANDATORY: OVS offload is required
762 PREFERRED: OVS offload is preferred";
772 grouping hypervisor-epa {
773 container hypervisor-epa {
776 "Specifies the type of hypervisor.
792 description "Specifies the host level EPA attributes.";
795 "Host CPU model. Examples include: SandyBridge,
798 enum PREFER_WESTMERE;
799 enum REQUIRE_WESTMERE;
800 enum PREFER_SANDYBRIDGE;
801 enum REQUIRE_SANDYBRIDGE;
802 enum PREFER_IVYBRIDGE;
803 enum REQUIRE_IVYBRIDGE;
805 enum REQUIRE_HASWELL;
806 enum PREFER_BROADWELL;
807 enum REQUIRE_BROADWELL;
809 enum REQUIRE_NEHALEM;
814 enum PREFER_CORE2DUO;
815 enum REQUIRE_CORE2DUO;
820 description "Host CPU architecture.";
838 description "Host CPU Vendor.";
847 leaf cpu-socket-count {
848 description "Number of sockets on the host.";
852 leaf cpu-core-count {
853 description "Number of cores on the host.";
857 leaf cpu-core-thread-count {
858 description "Number of threads per cores on the host.";
864 description "List of CPU features.";
866 description "CPU feature.";
867 type cpu-feature-type;
872 leaf om-cpu-model-string {
873 description "OpenMANO CPU model string";
877 list om-cpu-feature {
879 description "List of OpenMANO CPU features";
881 description "CPU feature";
889 description "EPA attributes for the guest";
890 container guest-epa {
891 leaf trusted-execution {
892 description "This VM should be allocated from trusted pool";
898 "Memory page allocation size. If a VM requires
899 hugepages, it should choose LARGE or SIZE_2MB
900 or SIZE_1GB. If the VM prefers hugepages it
901 should choose PREFER_LARGE.
902 LARGE : Require hugepages (either 2MB or 1GB)
903 SMALL : Doesn't require hugepages
904 SIZE_2MB : Requires 2MB hugepages
905 SIZE_1GB : Requires 1GB hugepages
906 PREFER_LARGE : Application prefers hugepages";
916 leaf cpu-pinning-policy {
918 "CPU pinning policy describes association
919 between virtual CPUs in guest and the
920 physical CPUs in the host.
921 DEDICATED : Virtual CPUs are pinned to
923 SHARED : Multiple VMs may share the
925 ANY : Any policy is acceptable for the VM";
934 leaf cpu-thread-pinning-policy {
936 "CPU thread pinning policy describes how to
937 place the guest CPUs when the host supports
939 AVOID : Avoids placing a guest on a host
941 SEPARATE: Places vCPUs on separate cores,
942 and avoids placing two vCPUs on
943 two threads of same core.
944 ISOLATE : Places each vCPU on a different core,
945 and places no vCPUs from a different
946 guest on the same core.
947 PREFER : Attempts to place vCPUs on threads
959 "List of pcie passthrough devices.";
963 "Device identifier.";
968 "Number of devices to attach to the VM.";
981 container numa-node-policy {
983 "This policy defines NUMA topology of the
984 guest. Specifically identifies if the guest
985 should be run on a host with one NUMA
986 node or multiple NUMA nodes. As an example
987 a guest might need 8 VCPUs and 4 GB of
988 memory. However, it might need the VCPUs
989 and memory distributed across multiple
990 NUMA nodes. In this scenario, NUMA node
991 1 could run with 6 VCPUs and 3GB, and
992 NUMA node 2 could run with 2 VCPUs and
997 "The number of NUMA nodes to expose to the VM.";
1003 "This policy specifies how the memory should
1004 be allocated in a multi-node scenario.
1005 STRICT : The memory must be allocated
1006 strictly from the memory attached
1008 PREFERRED : The memory should be allocated
1009 preferentially from the memory
1010 attached to the NUMA node";
1021 "NUMA node identification. Typically
1029 "List of VCPUs to allocate on
1033 description "List of VCPUs ids to allocate on
1040 "Memory size expressed in MB
1041 for this NUMA node.";
1045 choice om-numa-type {
1047 "OpenMANO Numa type selection";
1055 case paired-threads {
1056 container paired-threads {
1057 leaf num-paired-threads {
1061 list paired-thread-ids {
1063 "List of thread pairs to use in case of paired-thread NUMA";
1091 grouping provider-network {
1092 container provider-network {
1093 description "Container for the provider network.";
1094 leaf physical-network {
1096 "Name of the physical network on which the provider
1101 leaf segmentation_id {
1103 "ID of segregated virtual networks";
1109 grouping ns-service-primitive {
1110 list service-primitive {
1112 "Network service level service primitives.";
1118 "Name of the service primitive.";
1124 "List of parameters for the service primitive.";
1127 uses manotypes:primitive-parameter;
1130 list parameter-group {
1132 "Grouping of parameters which are logically grouped in UI";
1137 "Name of the parameter group";
1143 "List of parameters for the service primitive.";
1145 uses manotypes:primitive-parameter;
1149 description "Is this parameter group mandatory";
1155 list vnf-primitive-group {
1157 "List of service primitives grouped by VNF.";
1159 key "member-vnf-index-ref";
1160 leaf member-vnf-index-ref {
1162 "Reference to member-vnf within constituent-vnfds";
1168 "A reference to a vnfd. This is a
1170 ../../../../nsd:constituent-vnfd
1171 + [nsd:id = current()/../nsd:id-ref]
1173 NOTE: An issue with confd is preventing the
1174 use of xpath. Seems to be an issue with leafref
1175 to leafref, whose target is in a different module.
1176 Once that is resolved this will switched to use
1192 description "Index of this primitive";
1197 description "Name of the primitive in the VNF primitive ";
1203 leaf user-defined-script {
1205 "A user defined script.";
1211 grouping http-endpoints {
1212 list http-endpoint {
1214 "List of http endpoints to be used by monitoring params";
1218 description "The HTTP path on the management server";
1223 description "Pick HTTPS instead of HTTP , Default is false";
1229 description "The HTTP port to connect to";
1230 type inet:port-number;
1234 description "The HTTP basic auth username";
1239 description "The HTTP basic auth password";
1243 leaf polling-interval-secs {
1244 description "The HTTP polling interval in seconds";
1251 "Method that the URI should perform.
1252 Deafult action is GET.";
1254 type manotypes:http-method;
1259 description "Custom HTTP headers to put on HTTP request";
1262 description "HTTP header key";
1267 description "HTTP header value";
1274 grouping monitoring-param-aggregation {
1275 typedef aggregation-type {
1277 "aggregation-type, indicates the way to aggregate monitoring-params
1278 (e.g. how to aggregate CPU utilisation of all VNFs belonging to the
1279 same VNF group identified by member-vnf-index; or how to aggregate
1280 memory utilisation of all VDUs belonging to the same VDU group
1281 identified by vdu id)";
1291 leaf aggregation-type {
1292 type aggregation-type;
1296 grouping monitoring-param-ui-data {
1302 description "A tag to group monitoring parameters";
1308 description "Defines the UI Display variant of measured counters.";
1309 type manotypes:widget-type;
1314 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1319 grouping monitoring-param-value {
1321 type param-value-type;
1325 container numeric-constraints {
1328 "Minimum value for the parameter";
1333 "Maximum value for the parameter";
1338 container text-constraints {
1341 "Minimum string length for the parameter";
1346 "Maximum string length for the parameter";
1351 leaf value-integer {
1353 "Current value for an integer parameter";
1357 leaf value-decimal {
1359 "Current value for a decimal parameter";
1367 "Current value for a string parameter";
1372 grouping control-param {
1373 list control-param {
1375 "List of control parameters to manage and
1376 update the running configuration of the VNF";
1380 description "Identifier for control parameter";
1385 description "Name of a control parameter";
1390 description "A description of the control parameter";
1395 description "A tag to group control parameters";
1401 "Minimum value for the parameter";
1407 "Maximum value for the parameter";
1411 leaf current-value {
1413 "Current value for the parameter";
1419 "Step value for the parameter";
1428 type manotypes:widget-type;
1433 "This is the URL where the operation should be performed.";
1440 "Method that the URI should perform.
1441 Default Action is POST";
1443 type manotypes:http-method;
1449 "This is the operation payload or payload template as stringified
1450 JSON. This field provides the data to be sent for this operation
1458 grouping action-param {
1461 "List of action parameters to
1477 description "A tag to group monitoring parameter";
1483 "This is the URL where to perform the operation";
1489 "This is the method to be performed at the uri.
1490 POST by default for action";
1492 type manotypes:http-method;
1498 "This is the operation payload or payload template to be sent in
1499 the data for this operation call";
1506 grouping input-parameter {
1507 description "List of input parameters that can be specified when instantiating a network service.";
1509 list input-parameter {
1511 "List of input parameters";
1518 "An xpath that specfies which element in a descriptor is to be
1525 "The value that the element specified by the xpath should take when a
1526 record is created.";
1532 grouping input-parameter-xpath {
1533 list input-parameter-xpath {
1535 "List of xpaths to parameters inside the NSD
1536 the can be customized during the instantiation.";
1541 "An xpath that specifies the element in a descriptor.";
1546 description "A descriptive string";
1550 leaf default-value {
1551 description "Default Value for the Input Parameter";
1557 grouping nfvi-metrics {
1561 "Label to show in UI";
1568 "The total number of VCPUs available.";
1574 "The VCPU utilization (percentage).";
1585 "Label to show in UI";
1592 "The amount of memory (bytes) currently in use.";
1598 "The amount of memory (bytes) available.";
1604 "The memory utilization (percentage).";
1615 "Label to show in UI";
1622 "The amount of storage (bytes) currently in use.";
1628 "The amount of storage (bytes) available.";
1634 "The storage utilization (percentage).";
1642 container external-ports {
1645 "Label to show in UI";
1647 default "EXTERNAL PORTS";
1652 "The total number of external ports.";
1657 container internal-ports {
1660 "Label to show in UI";
1662 default "INTERNAL PORTS";
1667 "The total number of internal ports.";
1675 "Label to show in UI";
1677 default "NETWORK TRAFFIC";
1680 container incoming {
1683 "Label to show in UI";
1685 default "INCOMING NETWORK TRAFFIC";
1690 "The cumulative number of incoming bytes.";
1696 "The cumulative number of incoming packets.";
1702 "The current incoming byte-rate (bytes per second).";
1710 "The current incoming packet (packets per second).";
1717 container outgoing {
1720 "Label to show in UI";
1722 default "OUTGOING NETWORK TRAFFIC";
1727 "The cumulative number of outgoing bytes.";
1733 "The cumulative number of outgoing packets.";
1739 "The current outgoing byte-rate (bytes per second).";
1747 "The current outgoing packet (packets per second).";
1756 typedef alarm-severity-type {
1757 description "An indication of the importance or urgency of the alarm";
1765 typedef alarm-metric-type {
1766 description "The type of metrics to register the alarm for";
1768 enum CPU_UTILIZATION;
1769 enum MEMORY_UTILIZATION;
1770 enum STORAGE_UTILIZATION;
1774 typedef alarm-statistic-type {
1776 "Statistic type to use to determine threshold crossing
1787 typedef relational-operation-type {
1789 "The relational operator used to define whether an alarm,
1790 scaling event, etc. should be triggered in certain scenarios,
1791 such as if the metric statistic goes above or below a specified
1794 enum GE; // greater than or equal
1795 enum LE; // less than or equal
1796 enum GT; // greater than
1797 enum LT; // less than
1805 "This field is reserved for the identifier assigned by the VIM provider";
1811 description "A human readable string to identify the alarm";
1816 description "A description of this alarm";
1822 "The identifier of the VDUR that the alarm is associated with";
1834 list insufficient-data {
1851 "This flag indicates whether the alarm should be repeatedly emitted
1852 while the associated threshold has been crossed.";
1860 "This flag indicates whether the alarm has been enabled or
1868 description "A measure of the importance or urgency of the alarm";
1869 type alarm-severity-type;
1873 description "The metric to be tracked by this alarm.";
1874 type alarm-metric-type;
1878 description "The type of metric statistic that is tracked by this alarm";
1879 type alarm-statistic-type;
1884 "The relational operator used to define whether an alarm should be
1885 triggered in certain scenarios, such as if the metric statistic
1886 goes above or below a specified value.";
1887 type relational-operation-type;
1892 "This value defines the threshold that, if crossed, will trigger
1901 "The period defines the length of time (seconds) that the metric
1902 data are collected over in oreder to evaluate the chosen
1909 "Defines the length of time (seconds) in which metric data are
1910 collected in order to evaluate the chosen statistic.";
1915 typedef cloud-account-type {
1916 description "VIM account type";
1920 enum cloudsim_proxy;
1929 grouping host-aggregate {
1930 list host-aggregate {
1931 description "Name of the Host Aggregate";
1936 "Name of the additional information attached to the host-aggregate";
1939 leaf metadata-value {
1941 "Value of the corresponding metadata-key";
1947 grouping placement-group-input {
1949 type manotypes:cloud-account-type;
1951 choice cloud-provider {
1953 container availability-zone {
1954 description "Name of the Availability Zone";
1959 container server-group {
1960 description "Name of the Affinity/Anti-Affinity Server Group";
1965 uses host-aggregate;
1968 leaf aws-construct {
1973 leaf openmano-construct {
1978 leaf vsphere-construct {
1983 leaf mock-construct {
1988 leaf cloudsim-construct {
1995 grouping cloud-config {
1998 description "Used to configure the list of public keys to be injected as part
1999 of ns instantiation";
2002 description "Name of this key pair";
2007 description "Key associated with this key pair";
2014 description "List of users to be added through cloud-config";
2017 description "Name of the user ";
2022 description "The user name's real name";
2028 description "Used to configure the list of public keys to be injected as part
2029 of ns instantiation";
2032 description "Name of this key pair";
2037 description "Key associated with this key pair";
2044 grouping placement-group-info {
2049 "Place group construct to define the compute resource placement strategy
2050 in cloud environment";
2055 description "This is free text space used to describe the intent/rationale
2056 behind this placement group. This is for human consumption only";
2062 "Strategy associated with this placement group
2063 Following values are possible
2064 - COLOCATION: Colocation strategy imply intent to share the physical
2065 infrastructure (hypervisor/network) among all members
2067 - ISOLATION: Isolation strategy imply intent to not share the physical
2068 infrastructure (hypervisor/network) among the members
2075 default "COLOCATION";
2079 grouping ip-profile-info {
2080 description "Grouping for IP-Profile";
2081 container ip-profile-params {
2084 type inet:ip-version;
2088 leaf subnet-address {
2089 description "Subnet IP prefix associated with IP Profile";
2090 type inet:ip-prefix;
2093 leaf gateway-address {
2094 description "IP Address of the default gateway associated with IP Profile";
2095 type inet:ip-address;
2098 leaf security-group {
2099 description "Name of the security group";
2106 description "List of DNS Servers associated with IP Profile";
2107 type inet:ip-address;
2111 container dhcp-params {
2113 description "This flag indicates if DHCP is enabled or not";
2118 leaf start-address {
2119 description "Start IP address of the IP-Address range associated with DHCP domain";
2120 type inet:ip-address;
2124 description "Size of the DHCP pool associated with DHCP domain";
2129 leaf subnet-prefix-pool {
2130 description "VIM Specific reference to pre-created subnet prefix";
2136 grouping ip-profile-list {
2139 "List of IP Profiles.
2140 IP Profile describes the IP characteristics for the Virtual-Link";
2145 description "Name of the IP-Profile";
2150 description "Description for IP profile";
2154 uses ip-profile-info;
2158 grouping config-file {
2159 description "Grouping for files needed to be mounted into an additional drive";
2162 "List of configuration files to be written on an additional drive";
2165 description "Name of the configuration file";
2169 description "Full path of the destination in the guest";
2175 grouping supplemental-boot-data {
2176 description "Grouping for custom vim data";
2177 container supplemental-boot-data {
2178 // uses manotypes:config-file;
2179 leaf boot-data-drive {
2180 description "Some VIMs implement additional drives to host config-files or meta-data";
2187 grouping volume-info {
2188 description "Grouping for Volume-info";
2191 description "Description for Volume";
2196 description "Size of disk in GB";
2200 choice volume-source {
2202 "Defines the source of the volume. Possible options are
2203 1. Ephemeral -- Empty disk
2204 2. Image -- Refer to image to be used for volume
2205 3. Volume -- Reference of pre-existing volume to be used
2215 uses image-properties;
2220 description "Type of disk-bus on which this disk is exposed to guest";
2230 description "The type of device as exposed to guest";
2240 grouping rpc-project-name {
2244 "Project to which this belongs";
2246 path "/rw-project:project/rw-project:name";