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 "Value associated with the name.";
89 grouping primitive-parameter {
92 "Name of the parameter.";
98 "Data type associated with the name.";
99 type manotypes:parameter-data-type;
103 description "Is this field mandatory";
109 description "The default value for this field";
113 leaf parameter-pool {
114 description "NSD parameter pool name to use for this parameter";
120 "The value should be dimmed by the UI.
121 Only applies to parameters with default values.";
128 "The value should be hidden by the UI.
129 Only applies to parameters with default values.";
135 grouping ui-primitive-group {
136 list parameter-group {
138 "Grouping of parameters which are logically grouped in UI";
143 "Name of the parameter group";
149 "List of parameters for the service primitive.";
151 uses manotypes:primitive-parameter;
155 description "Is this parameter group mandatory";
162 grouping event-config {
165 "Sequence number for the configuration primitive.";
171 "Name of the configuration primitive.";
176 leaf user-defined-script {
178 "A user defined script.";
189 description "Value of the configuration primitive.";
195 grouping image-properties {
198 "Image name for the software image.
199 If the image name is found within the VNF package it will
200 be uploaded to all VIM accounts during onboarding process.
201 Otherwise, the image must be added to the VIM account with
202 the same name as entered here.
207 leaf image-checksum {
209 "Image md5sum for the software image.
210 The md5sum, if provided, along with the image name uniquely
211 identifies an image uploaded to the CAL.
218 grouping vca-relationships {
219 container vca-relationships {
221 description "List of relations between VCA componets.";
223 key "requires provides";
227 "Name of the required relation.";
233 "Name of the provided relation.";
240 grouping vca-metrics {
242 "Information about the VNF or VDU metrics";
244 description "List of VCA related metrics";
248 "Name of the metric, as defined in the Juju charm.";
252 } // END - grouping vca-metrics
254 grouping vca-configuration {
256 "Information about the VNF or VDU configuration. Note:
257 If the NS contains multiple instances of the
258 same VNF or VDU, each instance could have a different
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;
299 list config-primitive {
301 "List of config primitives supported by the
302 configuration agent for this VNF or VDU.";
307 "Name of the config primitive.";
313 "List of parameters to the config primitive.";
315 uses primitive-parameter;
318 leaf user-defined-script {
320 "A user defined script. If user defined script is defined,
321 the script will be executed using bash";
326 list initial-config-primitive {
328 "Initial set of configuration primitives.";
332 "Sequence number for the configuration primitive.";
336 choice primitive-type {
337 case primitive-definition {
340 "Name of the configuration primitive.";
344 uses primitive-parameter-value;
346 leaf user-defined-script {
348 "A user defined script.";
355 uses manotypes:vca-metrics;
357 } // END - grouping vca-configuration
359 typedef virtual-link-type {
361 "Type of virtual link
362 ELAN: A multipoint service connecting a set of VNFs
363 ELINE: For a simple point to point connection
364 // between a VNF and the existing network.
365 // ETREE: A multipoint service connecting one or
366 // more roots and a set of leaves, but
367 // preventing inter-leaf communication.";
375 grouping named-value {
385 typedef http-method {
387 "Type of HTTP operation";
401 "Type of API to fetch monitoring parameters";
410 typedef json-query-method {
412 "The method to extract a value from a JSON response
414 NAMEKEY - Use the name as the key for a non-nested value.
415 JSONPATH - Use jsonpath-rw implementation to extract a value.
416 OBJECTPATH - Use objectpath implementation to extract a value.";
424 typedef param-value-type {
426 "The type of the parameter value";
434 typedef connection-point-type {
436 "Type of connection point
438 // VNIC_ADDR: Virtual NIC Address
439 // PNIC_ADDR: Physical NIC Address
440 // PPORT: Physical Port.";
447 typedef widget-type {
449 "Type of the widget, typically used by the UI.";
460 typedef cpu-feature-type {
462 "Enumeration for CPU features.
464 AES: CPU supports advanced instruction set for
465 AES (Advanced Encryption Standard).
467 CAT: Cache Allocation Technology (CAT) allows
468 an Operating System, Hypervisor, or similar
469 system management agent to specify the amount
470 of L3 cache (currently the last-level cache
471 in most server and client platforms) space an
472 application can fill (as a hint to hardware
473 functionality, certain features such as power
474 management may override CAT settings).
476 CMT: Cache Monitoring Technology (CMT) allows
477 an Operating System, Hypervisor, or similar
478 system management agent to determine the
479 usage of cache based on applications running
480 on the platform. The implementation is
481 directed at L3 cache monitoring (currently
482 the last-level cache in most server and
485 DDIO: Intel Data Direct I/O (DDIO) enables
486 Ethernet server NICs and controllers talk
487 directly to the processor cache without a
488 detour via system memory. This enumeration
489 specifies if the VM requires a DDIO
533 enum REQUIRE_CLFLUSH;
561 enum REQUIRE_PCLMULQDQ;
562 enum PREFER_PCLMULQDQ;
565 enum REQUIRE_MONITOR;
603 enum REQUIRE_TSC_DEADLINE_TIMER;
604 enum PREFER_TSC_DEADLINE_TIMER;
613 enum REQUIRE_FSGSBASE;
614 enum PREFER_FSGSBASE;
627 enum REQUIRE_INVPCID;
642 typedef nfvi-metric-type {
643 description "Type of NFVI metric to be monitored";
645 enum cpu_utilization;
646 enum average_memory_utilization;
649 enum disk_read_bytes;
650 enum disk_write_bytes;
652 enum packets_received;
653 enum packets_dropped;
657 typedef scaling-trigger {
668 enum post-scale-out {
674 typedef scaling-policy-type {
685 typedef scaling-criteria-operation {
697 container vm-flavor {
700 "Number of VCPUs for the VM.";
706 "Amount of memory in MB.";
712 "Amount of disk space in GB.";
716 } //grouping vm-flavor
718 grouping vm-flavor-name {
719 leaf vm-flavor-name {
720 description "flavor name to be used while creating vm using cloud account";
725 grouping vswitch-epa {
726 container vswitch-epa {
727 leaf ovs-acceleration {
729 "Specifies Open vSwitch acceleration mode.
730 MANDATORY: OVS acceleration is required
731 PREFERRED: OVS acceleration is preferred";
741 "Specifies Open vSwitch hardware offload mode.
742 MANDATORY: OVS offload is required
743 PREFERRED: OVS offload is preferred";
753 grouping hypervisor-epa {
754 container hypervisor-epa {
757 "Specifies the type of hypervisor.
773 description "Specifies the host level EPA attributes.";
776 "Host CPU model. Examples include: SandyBridge,
779 enum PREFER_WESTMERE;
780 enum REQUIRE_WESTMERE;
781 enum PREFER_SANDYBRIDGE;
782 enum REQUIRE_SANDYBRIDGE;
783 enum PREFER_IVYBRIDGE;
784 enum REQUIRE_IVYBRIDGE;
786 enum REQUIRE_HASWELL;
787 enum PREFER_BROADWELL;
788 enum REQUIRE_BROADWELL;
790 enum REQUIRE_NEHALEM;
795 enum PREFER_CORE2DUO;
796 enum REQUIRE_CORE2DUO;
801 description "Host CPU architecture.";
819 description "Host CPU Vendor.";
828 leaf cpu-socket-count {
829 description "Number of sockets on the host.";
833 leaf cpu-core-count {
834 description "Number of cores on the host.";
838 leaf cpu-core-thread-count {
839 description "Number of threads per cores on the host.";
845 description "List of CPU features.";
847 description "CPU feature.";
848 type cpu-feature-type;
853 leaf om-cpu-model-string {
854 description "OpenMANO CPU model string";
858 list om-cpu-feature {
860 description "List of OpenMANO CPU features";
862 description "CPU feature";
870 description "EPA attributes for the guest";
871 container guest-epa {
872 leaf trusted-execution {
873 description "This VM should be allocated from trusted pool";
879 "Memory page allocation size. If a VM requires
880 hugepages, it should choose LARGE or SIZE_2MB
881 or SIZE_1GB. If the VM prefers hugepages it
882 should choose PREFER_LARGE.
883 LARGE : Require hugepages (either 2MB or 1GB)
884 SMALL : Doesn't require hugepages
885 SIZE_2MB : Requires 2MB hugepages
886 SIZE_1GB : Requires 1GB hugepages
887 PREFER_LARGE : Application prefers hugepages";
897 leaf cpu-pinning-policy {
899 "CPU pinning policy describes association
900 between virtual CPUs in guest and the
901 physical CPUs in the host.
902 DEDICATED : Virtual CPUs are pinned to
904 SHARED : Multiple VMs may share the
906 ANY : Any policy is acceptable for the VM";
915 leaf cpu-thread-pinning-policy {
917 "CPU thread pinning policy describes how to
918 place the guest CPUs when the host supports
920 AVOID : Avoids placing a guest on a host
922 SEPARATE: Places vCPUs on separate cores,
923 and avoids placing two vCPUs on
924 two threads of same core.
925 ISOLATE : Places each vCPU on a different core,
926 and places no vCPUs from a different
927 guest on the same core.
928 PREFER : Attempts to place vCPUs on threads
940 "List of pcie passthrough devices.";
944 "Device identifier.";
949 "Number of devices to attach to the VM.";
962 container numa-node-policy {
964 "This policy defines NUMA topology of the
965 guest. Specifically identifies if the guest
966 should be run on a host with one NUMA
967 node or multiple NUMA nodes. As an example
968 a guest might need 8 VCPUs and 4 GB of
969 memory. However, it might need the VCPUs
970 and memory distributed across multiple
971 NUMA nodes. In this scenario, NUMA node
972 1 could run with 6 VCPUs and 3GB, and
973 NUMA node 2 could run with 2 VCPUs and
978 "The number of NUMA nodes to expose to the VM.";
984 "This policy specifies how the memory should
985 be allocated in a multi-node scenario.
986 STRICT : The memory must be allocated
987 strictly from the memory attached
989 PREFERRED : The memory should be allocated
990 preferentially from the memory
991 attached to the NUMA node";
1002 "NUMA node identification. Typically
1010 "List of VCPUs to allocate on
1014 description "List of VCPUs ids to allocate on
1021 "Memory size expressed in MB
1022 for this NUMA node.";
1026 choice om-numa-type {
1028 "OpenMANO Numa type selection";
1036 case paired-threads {
1037 container paired-threads {
1038 leaf num-paired-threads {
1042 list paired-thread-ids {
1044 "List of thread pairs to use in case of paired-thread NUMA";
1072 grouping provider-network {
1073 container provider-network {
1074 description "Container for the provider network.";
1075 leaf physical-network {
1077 "Name of the physical network on which the provider
1082 leaf segmentation_id {
1084 "ID of segregated virtual networks";
1090 grouping ns-service-primitive {
1091 list service-primitive {
1093 "Network service level service primitives.";
1099 "Name of the service primitive.";
1105 "List of parameters for the service primitive.";
1108 uses manotypes:primitive-parameter;
1111 list parameter-group {
1113 "Grouping of parameters which are logically grouped in UI";
1118 "Name of the parameter group";
1124 "List of parameters for the service primitive.";
1126 uses manotypes:primitive-parameter;
1130 description "Is this parameter group mandatory";
1136 list vnf-primitive-group {
1138 "List of service primitives grouped by VNF.";
1140 key "member-vnf-index-ref";
1141 leaf member-vnf-index-ref {
1143 "Reference to member-vnf within constituent-vnfds";
1149 "A reference to a vnfd. This is a
1151 ../../../../nsd:constituent-vnfd
1152 + [nsd:id = current()/../nsd:id-ref]
1154 NOTE: An issue with confd is preventing the
1155 use of xpath. Seems to be an issue with leafref
1156 to leafref, whose target is in a different module.
1157 Once that is resolved this will switched to use
1173 description "Index of this primitive";
1178 description "Name of the primitive in the VNF primitive ";
1184 leaf user-defined-script {
1186 "A user defined script.";
1192 grouping http-endpoints {
1193 list http-endpoint {
1195 "List of http endpoints to be used by monitoring params";
1199 description "The HTTP path on the management server";
1204 description "Pick HTTPS instead of HTTP , Default is false";
1210 description "The HTTP port to connect to";
1211 type inet:port-number;
1215 description "The HTTP basic auth username";
1220 description "The HTTP basic auth password";
1224 leaf polling-interval-secs {
1225 description "The HTTP polling interval in seconds";
1232 "Method that the URI should perform.
1233 Deafult action is GET.";
1235 type manotypes:http-method;
1240 description "Custom HTTP headers to put on HTTP request";
1243 description "HTTP header key";
1248 description "HTTP header value";
1255 grouping monitoring-param-aggregation {
1256 typedef aggregation-type {
1258 "aggregation-type, indicates the way to aggregate monitoring-params
1259 (e.g. how to aggregate CPU utilisation of all VNFs belonging to the
1260 same VNF group identified by member-vnf-index; or how to aggregate
1261 memory utilisation of all VDUs belonging to the same VDU group
1262 identified by vdu id)";
1272 leaf aggregation-type {
1273 type aggregation-type;
1277 grouping monitoring-param-ui-data {
1283 description "A tag to group monitoring parameters";
1289 description "Defines the UI Display variant of measured counters.";
1290 type manotypes:widget-type;
1295 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1300 grouping monitoring-param-value {
1302 type param-value-type;
1306 container numeric-constraints {
1309 "Minimum value for the parameter";
1314 "Maximum value for the parameter";
1319 container text-constraints {
1322 "Minimum string length for the parameter";
1327 "Maximum string length for the parameter";
1332 leaf value-integer {
1334 "Current value for an integer parameter";
1338 leaf value-decimal {
1340 "Current value for a decimal parameter";
1348 "Current value for a string parameter";
1353 grouping control-param {
1354 list control-param {
1356 "List of control parameters to manage and
1357 update the running configuration of the VNF";
1361 description "Identifier for control parameter";
1366 description "Name of a control parameter";
1371 description "A description of the control parameter";
1376 description "A tag to group control parameters";
1382 "Minimum value for the parameter";
1388 "Maximum value for the parameter";
1392 leaf current-value {
1394 "Current value for the parameter";
1400 "Step value for the parameter";
1409 type manotypes:widget-type;
1414 "This is the URL where the operation should be performed.";
1421 "Method that the URI should perform.
1422 Default Action is POST";
1424 type manotypes:http-method;
1430 "This is the operation payload or payload template as stringified
1431 JSON. This field provides the data to be sent for this operation
1439 grouping action-param {
1442 "List of action parameters to
1458 description "A tag to group monitoring parameter";
1464 "This is the URL where to perform the operation";
1470 "This is the method to be performed at the uri.
1471 POST by default for action";
1473 type manotypes:http-method;
1479 "This is the operation payload or payload template to be sent in
1480 the data for this operation call";
1487 grouping input-parameter {
1488 description "List of input parameters that can be specified when instantiating a network service.";
1490 list input-parameter {
1492 "List of input parameters";
1499 "An xpath that specfies which element in a descriptor is to be
1506 "The value that the element specified by the xpath should take when a
1507 record is created.";
1513 grouping input-parameter-xpath {
1514 list input-parameter-xpath {
1516 "List of xpaths to parameters inside the NSD
1517 the can be customized during the instantiation.";
1522 "An xpath that specifies the element in a descriptor.";
1527 description "A descriptive string";
1531 leaf default-value {
1532 description "Default Value for the Input Parameter";
1538 grouping nfvi-metrics {
1542 "Label to show in UI";
1549 "The total number of VCPUs available.";
1555 "The VCPU utilization (percentage).";
1566 "Label to show in UI";
1573 "The amount of memory (bytes) currently in use.";
1579 "The amount of memory (bytes) available.";
1585 "The memory utilization (percentage).";
1596 "Label to show in UI";
1603 "The amount of storage (bytes) currently in use.";
1609 "The amount of storage (bytes) available.";
1615 "The storage utilization (percentage).";
1623 container external-ports {
1626 "Label to show in UI";
1628 default "EXTERNAL PORTS";
1633 "The total number of external ports.";
1638 container internal-ports {
1641 "Label to show in UI";
1643 default "INTERNAL PORTS";
1648 "The total number of internal ports.";
1656 "Label to show in UI";
1658 default "NETWORK TRAFFIC";
1661 container incoming {
1664 "Label to show in UI";
1666 default "INCOMING NETWORK TRAFFIC";
1671 "The cumulative number of incoming bytes.";
1677 "The cumulative number of incoming packets.";
1683 "The current incoming byte-rate (bytes per second).";
1691 "The current incoming packet (packets per second).";
1698 container outgoing {
1701 "Label to show in UI";
1703 default "OUTGOING NETWORK TRAFFIC";
1708 "The cumulative number of outgoing bytes.";
1714 "The cumulative number of outgoing packets.";
1720 "The current outgoing byte-rate (bytes per second).";
1728 "The current outgoing packet (packets per second).";
1737 typedef alarm-severity-type {
1738 description "An indication of the importance or urgency of the alarm";
1746 typedef alarm-metric-type {
1747 description "The type of metrics to register the alarm for";
1749 enum CPU_UTILIZATION;
1750 enum MEMORY_UTILIZATION;
1751 enum STORAGE_UTILIZATION;
1755 typedef alarm-statistic-type {
1757 "Statistic type to use to determine threshold crossing
1768 typedef relational-operation-type {
1770 "The relational operator used to define whether an alarm,
1771 scaling event, etc. should be triggered in certain scenarios,
1772 such as if the metric statistic goes above or below a specified
1775 enum GE; // greater than or equal
1776 enum LE; // less than or equal
1777 enum GT; // greater than
1778 enum LT; // less than
1786 "This field is reserved for the identifier assigned by the VIM provider";
1792 description "A human readable string to identify the alarm";
1797 description "A description of this alarm";
1803 "The identifier of the VDUR that the alarm is associated with";
1815 list insufficient-data {
1832 "This flag indicates whether the alarm should be repeatedly emitted
1833 while the associated threshold has been crossed.";
1841 "This flag indicates whether the alarm has been enabled or
1849 description "A measure of the importance or urgency of the alarm";
1850 type alarm-severity-type;
1854 description "The metric to be tracked by this alarm.";
1855 type alarm-metric-type;
1859 description "The type of metric statistic that is tracked by this alarm";
1860 type alarm-statistic-type;
1865 "The relational operator used to define whether an alarm should be
1866 triggered in certain scenarios, such as if the metric statistic
1867 goes above or below a specified value.";
1868 type relational-operation-type;
1873 "This value defines the threshold that, if crossed, will trigger
1882 "The period defines the length of time (seconds) that the metric
1883 data are collected over in oreder to evaluate the chosen
1890 "Defines the length of time (seconds) in which metric data are
1891 collected in order to evaluate the chosen statistic.";
1896 typedef cloud-account-type {
1897 description "VIM account type";
1901 enum cloudsim_proxy;
1910 grouping host-aggregate {
1911 list host-aggregate {
1912 description "Name of the Host Aggregate";
1917 "Name of the additional information attached to the host-aggregate";
1920 leaf metadata-value {
1922 "Value of the corresponding metadata-key";
1928 grouping placement-group-input {
1930 type manotypes:cloud-account-type;
1932 choice cloud-provider {
1934 container availability-zone {
1935 description "Name of the Availability Zone";
1940 container server-group {
1941 description "Name of the Affinity/Anti-Affinity Server Group";
1946 uses host-aggregate;
1949 leaf aws-construct {
1954 leaf openmano-construct {
1959 leaf vsphere-construct {
1964 leaf mock-construct {
1969 leaf cloudsim-construct {
1976 grouping cloud-config {
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 description "List of users to be added through cloud-config";
1998 description "Name of the user ";
2003 description "The user name's real name";
2009 description "Used to configure the list of public keys to be injected as part
2010 of ns instantiation";
2013 description "Name of this key pair";
2018 description "Key associated with this key pair";
2025 grouping placement-group-info {
2030 "Place group construct to define the compute resource placement strategy
2031 in cloud environment";
2036 description "This is free text space used to describe the intent/rationale
2037 behind this placement group. This is for human consumption only";
2043 "Strategy associated with this placement group
2044 Following values are possible
2045 - COLOCATION: Colocation strategy imply intent to share the physical
2046 infrastructure (hypervisor/network) among all members
2048 - ISOLATION: Isolation strategy imply intent to not share the physical
2049 infrastructure (hypervisor/network) among the members
2056 default "COLOCATION";
2060 grouping ip-profile-info {
2061 description "Grouping for IP-Profile";
2062 container ip-profile-params {
2065 type inet:ip-version;
2069 leaf subnet-address {
2070 description "Subnet IP prefix associated with IP Profile";
2071 type inet:ip-prefix;
2074 leaf gateway-address {
2075 description "IP Address of the default gateway associated with IP Profile";
2076 type inet:ip-address;
2079 leaf security-group {
2080 description "Name of the security group";
2087 description "List of DNS Servers associated with IP Profile";
2088 type inet:ip-address;
2092 container dhcp-params {
2094 description "This flag indicates if DHCP is enabled or not";
2099 leaf start-address {
2100 description "Start IP address of the IP-Address range associated with DHCP domain";
2101 type inet:ip-address;
2105 description "Size of the DHCP pool associated with DHCP domain";
2110 leaf subnet-prefix-pool {
2111 description "VIM Specific reference to pre-created subnet prefix";
2117 grouping ip-profile-list {
2120 "List of IP Profiles.
2121 IP Profile describes the IP characteristics for the Virtual-Link";
2126 description "Name of the IP-Profile";
2131 description "Description for IP profile";
2135 uses ip-profile-info;
2139 grouping config-file {
2140 description "Grouping for files needed to be mounted into an additional drive";
2143 "List of configuration files to be written on an additional drive";
2146 description "Name of the configuration file";
2150 description "Full path of the destination in the guest";
2156 grouping supplemental-boot-data {
2157 description "Grouping for custom vim data";
2158 container supplemental-boot-data {
2159 uses manotypes:config-file;
2160 leaf boot-data-drive {
2161 description "Some VIMs implement additional drives to host config-files or meta-data";
2168 grouping volume-info {
2169 description "Grouping for Volume-info";
2172 description "Description for Volume";
2177 description "Size of disk in GB";
2181 choice volume-source {
2183 "Defines the source of the volume. Possible options are
2184 1. Ephemeral -- Empty disk
2185 2. Image -- Refer to image to be used for volume
2186 3. Volume -- Reference of pre-existing volume to be used
2196 uses image-properties;
2201 description "Type of disk-bus on which this disk is exposed to guest";
2211 description "The type of device as exposed to guest";
2221 grouping rpc-project-name {
2225 "Project to which this belongs";
2227 path "/rw-project:project/rw-project:name";