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:etsi:osm:yang: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 vca-configuration {
302 "Common information in the descriptors for NS, VNF or VDU configuration.
303 Note: If the NS contains multiple instances of the
304 same VNF or VDU, each instance could have a different
307 uses manotypes:configuration-method;
309 list config-primitive {
311 "List of config primitives supported by the
312 configuration agent for this VNF or VDU.";
317 "Name of the config primitive.";
323 "List of parameters to the config primitive.";
325 uses primitive-parameter;
328 leaf user-defined-script {
330 "A user defined script. If user defined script is defined,
331 the script will be executed using bash";
336 list initial-config-primitive {
338 "Initial set of configuration primitives.";
342 "Sequence number for the configuration primitive.";
346 choice primitive-type {
347 case primitive-definition {
350 "Name of the configuration primitive.";
354 uses primitive-parameter-value;
356 leaf user-defined-script {
358 "A user defined script.";
365 list terminate-config-primitive {
367 "Terminate set of configuration primitives.";
371 "Sequence number for the configuration primitive.";
376 "Name of the configuration primitive.";
380 uses primitive-parameter-value;
382 leaf user-defined-script {
384 "A user defined script.";
388 uses manotypes:vca-metrics;
390 } // END - grouping vca-configuration
392 typedef virtual-link-type {
394 "Type of virtual link
395 ELAN: A multipoint service connecting a set of VNFs
396 ELINE: For a simple point to point connection
397 // between a VNF and the existing network.
398 // ETREE: A multipoint service connecting one or
399 // more roots and a set of leaves, but
400 // preventing inter-leaf communication.";
408 grouping named-value {
418 typedef http-method {
420 "Type of HTTP operation";
434 "Type of API to fetch monitoring parameters";
443 typedef json-query-method {
445 "The method to extract a value from a JSON response
447 NAMEKEY - Use the name as the key for a non-nested value.
448 JSONPATH - Use jsonpath-rw implementation to extract a value.
449 OBJECTPATH - Use objectpath implementation to extract a value.";
457 typedef param-value-type {
459 "The type of the parameter value";
467 typedef connection-point-type {
469 "Type of connection point
471 // VNIC_ADDR: Virtual NIC Address
472 // PNIC_ADDR: Physical NIC Address
473 // PPORT: Physical Port.";
480 typedef widget-type {
482 "Type of the widget, typically used by the UI.";
493 typedef cpu-feature-type {
495 "Enumeration for CPU features.
497 AES: CPU supports advanced instruction set for
498 AES (Advanced Encryption Standard).
500 CAT: Cache Allocation Technology (CAT) allows
501 an Operating System, Hypervisor, or similar
502 system management agent to specify the amount
503 of L3 cache (currently the last-level cache
504 in most server and client platforms) space an
505 application can fill (as a hint to hardware
506 functionality, certain features such as power
507 management may override CAT settings).
509 CMT: Cache Monitoring Technology (CMT) allows
510 an Operating System, Hypervisor, or similar
511 system management agent to determine the
512 usage of cache based on applications running
513 on the platform. The implementation is
514 directed at L3 cache monitoring (currently
515 the last-level cache in most server and
518 DDIO: Intel Data Direct I/O (DDIO) enables
519 Ethernet server NICs and controllers talk
520 directly to the processor cache without a
521 detour via system memory. This enumeration
522 specifies if the VM requires a DDIO
566 enum REQUIRE_CLFLUSH;
594 enum REQUIRE_PCLMULQDQ;
595 enum PREFER_PCLMULQDQ;
598 enum REQUIRE_MONITOR;
636 enum REQUIRE_TSC_DEADLINE_TIMER;
637 enum PREFER_TSC_DEADLINE_TIMER;
646 enum REQUIRE_FSGSBASE;
647 enum PREFER_FSGSBASE;
660 enum REQUIRE_INVPCID;
675 typedef nfvi-metric-type {
676 description "Type of NFVI metric to be monitored";
678 enum cpu_utilization;
679 enum average_memory_utilization;
682 enum disk_read_bytes;
683 enum disk_write_bytes;
685 enum packets_received;
686 enum packets_in_dropped;
687 enum packets_out_dropped;
691 typedef scaling-trigger {
702 enum post-scale-out {
708 typedef scaling-policy-type {
719 typedef scaling-criteria-operation {
731 container vm-flavor {
734 "Number of VCPUs for the VM.";
740 "Amount of memory in MB.";
746 "Amount of disk space in GB.";
750 } //grouping vm-flavor
752 grouping vm-flavor-name {
753 leaf vm-flavor-name {
754 description "flavor name to be used while creating vm using cloud account";
759 grouping vswitch-epa {
760 container vswitch-epa {
761 leaf ovs-acceleration {
763 "Specifies Open vSwitch acceleration mode.
764 MANDATORY: OVS acceleration is required
765 PREFERRED: OVS acceleration is preferred";
775 "Specifies Open vSwitch hardware offload mode.
776 MANDATORY: OVS offload is required
777 PREFERRED: OVS offload is preferred";
787 grouping hypervisor-epa {
788 container hypervisor-epa {
791 "Specifies the type of hypervisor.
807 description "Specifies the host level EPA attributes.";
810 "Host CPU model. Examples include: SandyBridge,
813 enum PREFER_WESTMERE;
814 enum REQUIRE_WESTMERE;
815 enum PREFER_SANDYBRIDGE;
816 enum REQUIRE_SANDYBRIDGE;
817 enum PREFER_IVYBRIDGE;
818 enum REQUIRE_IVYBRIDGE;
820 enum REQUIRE_HASWELL;
821 enum PREFER_BROADWELL;
822 enum REQUIRE_BROADWELL;
824 enum REQUIRE_NEHALEM;
829 enum PREFER_CORE2DUO;
830 enum REQUIRE_CORE2DUO;
835 description "Host CPU architecture.";
853 description "Host CPU Vendor.";
862 leaf cpu-socket-count {
863 description "Number of sockets on the host.";
867 leaf cpu-core-count {
868 description "Number of cores on the host.";
872 leaf cpu-core-thread-count {
873 description "Number of threads per cores on the host.";
879 description "List of CPU features.";
881 description "CPU feature.";
882 type cpu-feature-type;
886 leaf om-cpu-model-string {
887 description "OpenMANO CPU model string";
891 list om-cpu-feature {
893 description "List of OpenMANO CPU features";
895 description "CPU feature";
904 description "EPA attributes for the guest";
905 container guest-epa {
906 leaf trusted-execution {
907 description "This VM should be allocated from trusted pool";
913 "Memory page allocation size. If a VM requires
914 hugepages, it should choose LARGE or SIZE_2MB
915 or SIZE_1GB. If the VM prefers hugepages it
916 should choose PREFER_LARGE.
917 LARGE : Require hugepages (either 2MB or 1GB)
918 SMALL : Doesn't require hugepages
919 SIZE_2MB : Requires 2MB hugepages
920 SIZE_1GB : Requires 1GB hugepages
921 PREFER_LARGE : Application prefers hugepages";
933 leaf cpu-pinning-policy {
935 "CPU pinning policy describes association
936 between virtual CPUs in guest and the
937 physical CPUs in the host.
938 DEDICATED : Virtual CPUs are pinned to
940 SHARED : Multiple VMs may share the
942 ANY : Any policy is acceptable for the VM";
950 leaf cpu-thread-pinning-policy {
952 "CPU thread pinning policy describes how to
953 place the guest CPUs when the host supports
955 AVOID : Avoids placing a guest on a host
957 SEPARATE: Places vCPUs on separate cores,
958 and avoids placing two vCPUs on
959 two threads of same core.
960 ISOLATE : Places each vCPU on a different core,
961 and places no vCPUs from a different
962 guest on the same core.
963 PREFER : Attempts to place vCPUs on threads
975 container cpu-quota {
976 description "CPU quota describes the CPU resource allocation policy.
977 Limit and Reserve values are defined in MHz";
978 uses allocation-properties;
983 container mem-quota {
984 description "Memory quota describes the memory resource allocation policy.
985 Limit and Reserve values are defined in MB";
986 uses allocation-properties;
989 container disk-io-quota {
990 description "Disk IO quota describes the disk IO operations resource allocation policy.
991 Limit and Reserve values are defined in IOPS";
992 uses allocation-properties;
995 container vif-quota {
996 description "Virtual interfaces quota describes the virtual interface bandwidth resource allocation policy.
997 Limit and Reserve values are defined in Mbps";
998 uses allocation-properties;
1003 "List of pcie passthrough devices.";
1007 "Device identifier.";
1012 "Number of devices to attach to the VM.";
1017 choice numa-policy {
1025 container numa-node-policy {
1027 "This policy defines NUMA topology of the
1028 guest. Specifically identifies if the guest
1029 should be run on a host with one NUMA
1030 node or multiple NUMA nodes. As an example
1031 a guest might need 8 VCPUs and 4 GB of
1032 memory. However, it might need the VCPUs
1033 and memory distributed across multiple
1034 NUMA nodes. In this scenario, NUMA node
1035 1 could run with 6 VCPUs and 3GB, and
1036 NUMA node 2 could run with 2 VCPUs and
1041 "The number of NUMA nodes to expose to the VM.";
1047 "This policy specifies how the memory should
1048 be allocated in a multi-node scenario.
1049 STRICT : The memory must be allocated
1050 strictly from the memory attached
1052 PREFERRED : The memory should be allocated
1053 preferentially from the memory
1054 attached to the NUMA node";
1065 "NUMA node identification. Typically
1073 "List of VCPUs to allocate on
1077 description "List of VCPUs ids to allocate on
1084 "Memory size expressed in MB
1085 for this NUMA node.";
1089 choice om-numa-type {
1091 "OpenMANO Numa type selection";
1099 case paired-threads {
1100 container paired-threads {
1101 leaf num-paired-threads {
1105 list paired-thread-ids {
1107 "List of thread pairs to use in case of paired-thread NUMA";
1135 grouping allocation-properties {
1137 description "Defines the maximum allocation. The value 0 indicates that usage is not limited.
1138 This parameter ensures that the instance never uses more than the defined amount of resource.";
1143 description "Defines the guaranteed minimum reservation.
1144 If needed, the machine will definitely get allocated the reserved amount of resources.";
1149 description "Number of shares allocated.
1150 Specifies the proportional weighted share for the domain.
1151 If this element is omitted, the service defaults to the OS provided defaults";
1156 grouping provider-network {
1157 container provider-network {
1158 description "Container for the provider network.";
1159 leaf physical-network {
1161 "Name of the physical network on which the provider
1166 leaf segmentation_id {
1168 "ID of segregated virtual networks";
1174 grouping http-endpoints {
1175 list http-endpoint {
1177 "List of http endpoints to be used by monitoring params";
1181 description "The HTTP path on the management server";
1186 description "Pick HTTPS instead of HTTP , Default is false";
1192 description "The HTTP port to connect to";
1193 type inet:port-number;
1197 description "The HTTP basic auth username";
1202 description "The HTTP basic auth password";
1206 leaf polling-interval-secs {
1207 description "The HTTP polling interval in seconds";
1214 "Method that the URI should perform.
1215 Deafult action is GET.";
1217 type manotypes:http-method;
1222 description "Custom HTTP headers to put on HTTP request";
1225 description "HTTP header key";
1230 description "HTTP header value";
1237 grouping monitoring-param-aggregation {
1238 typedef aggregation-type {
1240 "aggregation-type, indicates the way to aggregate monitoring-params
1241 (e.g. how to aggregate CPU utilisation of all VNFs belonging to the
1242 same VNF group identified by member-vnf-index; or how to aggregate
1243 memory utilisation of all VDUs belonging to the same VDU group
1244 identified by vdu id)";
1254 leaf aggregation-type {
1255 type aggregation-type;
1259 grouping monitoring-param-ui-data {
1265 description "A tag to group monitoring parameters";
1271 description "Defines the UI Display variant of measured counters.";
1272 type manotypes:widget-type;
1277 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1282 grouping monitoring-param-value {
1284 type param-value-type;
1288 container numeric-constraints {
1291 "Minimum value for the parameter";
1296 "Maximum value for the parameter";
1301 container text-constraints {
1304 "Minimum string length for the parameter";
1309 "Maximum string length for the parameter";
1314 leaf value-integer {
1316 "Current value for an integer parameter";
1320 leaf value-decimal {
1322 "Current value for a decimal parameter";
1330 "Current value for a string parameter";
1335 grouping control-param {
1336 list control-param {
1338 "List of control parameters to manage and
1339 update the running configuration of the VNF";
1343 description "Identifier for control parameter";
1348 description "Name of a control parameter";
1353 description "A description of the control parameter";
1358 description "A tag to group control parameters";
1364 "Minimum value for the parameter";
1370 "Maximum value for the parameter";
1374 leaf current-value {
1376 "Current value for the parameter";
1382 "Step value for the parameter";
1391 type manotypes:widget-type;
1396 "This is the URL where the operation should be performed.";
1403 "Method that the URI should perform.
1404 Default Action is POST";
1406 type manotypes:http-method;
1412 "This is the operation payload or payload template as stringified
1413 JSON. This field provides the data to be sent for this operation
1421 grouping action-param {
1424 "List of action parameters to
1440 description "A tag to group monitoring parameter";
1446 "This is the URL where to perform the operation";
1452 "This is the method to be performed at the uri.
1453 POST by default for action";
1455 type manotypes:http-method;
1461 "This is the operation payload or payload template to be sent in
1462 the data for this operation call";
1469 grouping input-parameter {
1470 description "List of input parameters that can be specified when instantiating a network service.";
1472 list input-parameter {
1474 "List of input parameters";
1481 "An xpath that specfies which element in a descriptor is to be
1488 "The value that the element specified by the xpath should take when a
1489 record is created.";
1495 grouping input-parameter-xpath {
1496 list input-parameter-xpath {
1498 "List of xpaths to parameters inside the NSD
1499 the can be customized during the instantiation.";
1504 "An xpath that specifies the element in a descriptor.";
1509 description "A descriptive string";
1513 leaf default-value {
1514 description "Default Value for the Input Parameter";
1520 grouping nfvi-metrics {
1524 "Label to show in UI";
1531 "The total number of VCPUs available.";
1537 "The VCPU utilization (percentage).";
1548 "Label to show in UI";
1555 "The amount of memory (bytes) currently in use.";
1561 "The amount of memory (bytes) available.";
1567 "The memory utilization (percentage).";
1578 "Label to show in UI";
1585 "The amount of storage (bytes) currently in use.";
1591 "The amount of storage (bytes) available.";
1597 "The storage utilization (percentage).";
1605 container external-ports {
1608 "Label to show in UI";
1610 default "EXTERNAL PORTS";
1615 "The total number of external ports.";
1620 container internal-ports {
1623 "Label to show in UI";
1625 default "INTERNAL PORTS";
1630 "The total number of internal ports.";
1638 "Label to show in UI";
1640 default "NETWORK TRAFFIC";
1643 container incoming {
1646 "Label to show in UI";
1648 default "INCOMING NETWORK TRAFFIC";
1653 "The cumulative number of incoming bytes.";
1659 "The cumulative number of incoming packets.";
1665 "The current incoming byte-rate (bytes per second).";
1673 "The current incoming packet (packets per second).";
1680 container outgoing {
1683 "Label to show in UI";
1685 default "OUTGOING NETWORK TRAFFIC";
1690 "The cumulative number of outgoing bytes.";
1696 "The cumulative number of outgoing packets.";
1702 "The current outgoing byte-rate (bytes per second).";
1710 "The current outgoing packet (packets per second).";
1719 typedef alarm-severity-type {
1720 description "An indication of the importance or urgency of the alarm";
1728 typedef alarm-metric-type {
1729 description "The type of metrics to register the alarm for";
1731 enum CPU_UTILIZATION;
1732 enum MEMORY_UTILIZATION;
1733 enum STORAGE_UTILIZATION;
1737 typedef alarm-statistic-type {
1739 "Statistic type to use to determine threshold crossing
1750 typedef relational-operation-type {
1752 "The relational operator used to define whether an alarm,
1753 scaling event, etc. should be triggered in certain scenarios,
1754 such as if the metric statistic goes above or below a specified
1757 enum GE; // greater than or equal
1758 enum LE; // less than or equal
1759 enum GT; // greater than
1760 enum LT; // less than
1765 grouping alarm-properties {
1767 description "A human readable string to identify the alarm";
1772 description "A description of this alarm";
1778 "The identifier of the VDUR that the alarm is associated with";
1790 list insufficient-data {
1807 "This flag indicates whether the alarm should be repeatedly emitted
1808 while the associated threshold has been crossed.";
1816 "This flag indicates whether the alarm has been enabled or
1824 description "A measure of the importance or urgency of the alarm";
1825 type alarm-severity-type;
1829 description "The type of metric statistic that is tracked by this alarm";
1830 type alarm-statistic-type;
1835 "The relational operator used to define whether an alarm should be
1836 triggered in certain scenarios, such as if the metric statistic
1837 goes above or below a specified value.";
1838 type relational-operation-type;
1843 "This value defines the threshold that, if crossed, will trigger
1852 "The period defines the length of time (seconds) that the metric
1853 data are collected over in oreder to evaluate the chosen
1860 "Defines the length of time (seconds) in which metric data are
1861 collected in order to evaluate the chosen statistic.";
1866 typedef cloud-account-type {
1867 description "VIM account type";
1871 enum cloudsim_proxy;
1880 grouping host-aggregate {
1881 list host-aggregate {
1882 description "Name of the Host Aggregate";
1887 "Name of the additional information attached to the host-aggregate";
1890 leaf metadata-value {
1892 "Value of the corresponding metadata-key";
1898 grouping placement-group-input {
1900 type manotypes:cloud-account-type;
1902 choice cloud-provider {
1904 container availability-zone {
1905 description "Name of the Availability Zone";
1910 container server-group {
1911 description "Name of the Affinity/Anti-Affinity Server Group";
1916 uses host-aggregate;
1919 leaf aws-construct {
1924 leaf openmano-construct {
1929 leaf vsphere-construct {
1934 leaf mock-construct {
1939 leaf cloudsim-construct {
1946 grouping cloud-config {
1949 description "Used to configure the list of public keys to be injected as part
1950 of ns instantiation";
1953 description "Name of this key pair";
1958 description "Key associated with this key pair";
1965 description "List of users to be added through cloud-config";
1968 description "Name of the user ";
1973 description "The user name's real name";
1979 description "Used to configure the list of public keys to be injected as part
1980 of ns instantiation";
1983 description "Name of this key pair";
1988 description "Key associated with this key pair";
1995 grouping placement-group-info {
2000 "Place group construct to define the compute resource placement strategy
2001 in cloud environment";
2006 description "This is free text space used to describe the intent/rationale
2007 behind this placement group. This is for human consumption only";
2013 "Strategy associated with this placement group
2014 Following values are possible
2015 - COLOCATION: Colocation strategy imply intent to share the physical
2016 infrastructure (hypervisor/network) among all members
2018 - ISOLATION: Isolation strategy imply intent to not share the physical
2019 infrastructure (hypervisor/network) among the members
2026 default "COLOCATION";
2030 grouping ip-profile-info {
2031 description "Grouping for IP-Profile";
2032 container ip-profile-params {
2035 type inet:ip-version;
2039 leaf subnet-address {
2040 description "Subnet IP prefix associated with IP Profile";
2041 type inet:ip-prefix;
2044 leaf gateway-address {
2045 description "IP Address of the default gateway associated with IP Profile";
2046 type inet:ip-address;
2049 leaf security-group {
2050 description "Name of the security group";
2057 description "List of DNS Servers associated with IP Profile";
2058 type inet:ip-address;
2062 container dhcp-params {
2064 description "This flag indicates if DHCP is enabled or not";
2069 leaf start-address {
2070 description "Start IP address of the IP-Address range associated with DHCP domain";
2071 type inet:ip-address;
2075 description "Size of the DHCP pool associated with DHCP domain";
2080 leaf subnet-prefix-pool {
2081 description "VIM Specific reference to pre-created subnet prefix";
2087 grouping ip-profile-list {
2090 "List of IP Profiles.
2091 IP Profile describes the IP characteristics for the Virtual-Link";
2096 description "Name of the IP-Profile";
2101 description "Description for IP profile";
2105 uses ip-profile-info;
2109 grouping config-file {
2110 description "Grouping for files needed to be mounted into an additional drive";
2113 "List of configuration files to be written on an additional drive";
2116 description "Name of the configuration file";
2120 description "Full path of the destination in the guest";
2126 grouping supplemental-boot-data {
2127 description "Grouping for custom vim data";
2128 container supplemental-boot-data {
2129 // uses manotypes:config-file;
2130 leaf boot-data-drive {
2131 description "Some VIMs implement additional drives to host config-files or meta-data";
2138 grouping volume-info {
2139 description "Grouping for Volume-info";
2142 description "Description for Volume";
2147 description "Size of disk in GB";
2151 choice volume-source {
2153 "Defines the source of the volume. Possible options are
2154 1. Ephemeral -- Empty disk
2155 2. Image -- Refer to image to be used for volume
2156 3. Volume -- Reference of pre-existing volume to be used
2166 uses image-properties;
2171 description "Type of disk-bus on which this disk is exposed to guest";
2181 description "The type of device as exposed to guest";
2191 grouping rpc-project-name {
2195 "Project to which this belongs";
2197 path "/osm-project:project/osm-project:name";