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-configuration {
242 "Information about the VNF or VDU configuration. Note:
243 If the NS contains multiple instances of the
244 same VNF or VDU, each instance could have a different
247 choice config-method {
249 "Defines the configuration method for the VNF or VDU.";
252 "Use custom script for configuring the VNF or VDU.
253 This script is executed in the context of
254 Orchestrator (The same system and environment
259 "Script type - currently supported - Scripts confirming to Rift CA plugin";
269 "Configure the VNF or VDU through Juju.";
272 description "Juju charm to use with the VNF or VDU.";
275 uses manotypes:vca-relationships;
280 list config-primitive {
282 "List of config primitives supported by the
283 configuration agent for this VNF or VDU.";
288 "Name of the config primitive.";
294 "List of parameters to the config primitive.";
296 uses primitive-parameter;
299 leaf user-defined-script {
301 "A user defined script. If user defined script is defined,
302 the script will be executed using bash";
307 list initial-config-primitive {
309 "Initial set of configuration primitives.";
313 "Sequence number for the configuration primitive.";
317 choice primitive-type {
318 case primitive-definition {
321 "Name of the configuration primitive.";
325 uses primitive-parameter-value;
327 leaf user-defined-script {
329 "A user defined script.";
335 } // END - grouping vca-configuration
337 typedef virtual-link-type {
339 "Type of virtual link
340 ELAN: A multipoint service connecting a set of VNFs
341 ELINE: For a simple point to point connection
342 // between a VNF and the existing network.
343 // ETREE: A multipoint service connecting one or
344 // more roots and a set of leaves, but
345 // preventing inter-leaf communication.";
353 grouping named-value {
363 typedef http-method {
365 "Type of HTTP operation";
379 "Type of API to fetch monitoring parameters";
388 typedef json-query-method {
390 "The method to extract a value from a JSON response
392 NAMEKEY - Use the name as the key for a non-nested value.
393 JSONPATH - Use jsonpath-rw implementation to extract a value.
394 OBJECTPATH - Use objectpath implementation to extract a value.";
402 typedef param-value-type {
404 "The type of the parameter value";
412 typedef connection-point-type {
414 "Type of connection point
416 // VNIC_ADDR: Virtual NIC Address
417 // PNIC_ADDR: Physical NIC Address
418 // PPORT: Physical Port.";
425 typedef widget-type {
427 "Type of the widget, typically used by the UI.";
438 typedef cpu-feature-type {
440 "Enumeration for CPU features.
442 AES: CPU supports advanced instruction set for
443 AES (Advanced Encryption Standard).
445 CAT: Cache Allocation Technology (CAT) allows
446 an Operating System, Hypervisor, or similar
447 system management agent to specify the amount
448 of L3 cache (currently the last-level cache
449 in most server and client platforms) space an
450 application can fill (as a hint to hardware
451 functionality, certain features such as power
452 management may override CAT settings).
454 CMT: Cache Monitoring Technology (CMT) allows
455 an Operating System, Hypervisor, or similar
456 system management agent to determine the
457 usage of cache based on applications running
458 on the platform. The implementation is
459 directed at L3 cache monitoring (currently
460 the last-level cache in most server and
463 DDIO: Intel Data Direct I/O (DDIO) enables
464 Ethernet server NICs and controllers talk
465 directly to the processor cache without a
466 detour via system memory. This enumeration
467 specifies if the VM requires a DDIO
511 enum REQUIRE_CLFLUSH;
539 enum REQUIRE_PCLMULQDQ;
540 enum PREFER_PCLMULQDQ;
543 enum REQUIRE_MONITOR;
581 enum REQUIRE_TSC_DEADLINE_TIMER;
582 enum PREFER_TSC_DEADLINE_TIMER;
591 enum REQUIRE_FSGSBASE;
592 enum PREFER_FSGSBASE;
605 enum REQUIRE_INVPCID;
621 container vm-flavor {
624 "Number of VCPUs for the VM.";
630 "Amount of memory in MB.";
636 "Amount of disk space in GB.";
640 } //grouping vm-flavor
642 grouping vm-flavor-name {
643 leaf vm-flavor-name {
644 description "flavor name to be used while creating vm using cloud account";
649 grouping vswitch-epa {
650 container vswitch-epa {
651 leaf ovs-acceleration {
653 "Specifies Open vSwitch acceleration mode.
654 MANDATORY: OVS acceleration is required
655 PREFERRED: OVS acceleration is preferred";
665 "Specifies Open vSwitch hardware offload mode.
666 MANDATORY: OVS offload is required
667 PREFERRED: OVS offload is preferred";
677 grouping hypervisor-epa {
678 container hypervisor-epa {
681 "Specifies the type of hypervisor.
697 description "Specifies the host level EPA attributes.";
700 "Host CPU model. Examples include: SandyBridge,
703 enum PREFER_WESTMERE;
704 enum REQUIRE_WESTMERE;
705 enum PREFER_SANDYBRIDGE;
706 enum REQUIRE_SANDYBRIDGE;
707 enum PREFER_IVYBRIDGE;
708 enum REQUIRE_IVYBRIDGE;
710 enum REQUIRE_HASWELL;
711 enum PREFER_BROADWELL;
712 enum REQUIRE_BROADWELL;
714 enum REQUIRE_NEHALEM;
719 enum PREFER_CORE2DUO;
720 enum REQUIRE_CORE2DUO;
725 description "Host CPU architecture.";
743 description "Host CPU Vendor.";
752 leaf cpu-socket-count {
753 description "Number of sockets on the host.";
757 leaf cpu-core-count {
758 description "Number of cores on the host.";
762 leaf cpu-core-thread-count {
763 description "Number of threads per cores on the host.";
769 description "List of CPU features.";
771 description "CPU feature.";
772 type cpu-feature-type;
777 leaf om-cpu-model-string {
778 description "OpenMANO CPU model string";
782 list om-cpu-feature {
784 description "List of OpenMANO CPU features";
786 description "CPU feature";
794 description "EPA attributes for the guest";
795 container guest-epa {
796 leaf trusted-execution {
797 description "This VM should be allocated from trusted pool";
803 "Memory page allocation size. If a VM requires
804 hugepages, it should choose LARGE or SIZE_2MB
805 or SIZE_1GB. If the VM prefers hugepages it
806 should choose PREFER_LARGE.
807 LARGE : Require hugepages (either 2MB or 1GB)
808 SMALL : Doesn't require hugepages
809 SIZE_2MB : Requires 2MB hugepages
810 SIZE_1GB : Requires 1GB hugepages
811 PREFER_LARGE : Application prefers hugepages";
821 leaf cpu-pinning-policy {
823 "CPU pinning policy describes association
824 between virtual CPUs in guest and the
825 physical CPUs in the host.
826 DEDICATED : Virtual CPUs are pinned to
828 SHARED : Multiple VMs may share the
830 ANY : Any policy is acceptable for the VM";
839 leaf cpu-thread-pinning-policy {
841 "CPU thread pinning policy describes how to
842 place the guest CPUs when the host supports
844 AVOID : Avoids placing a guest on a host
846 SEPARATE: Places vCPUs on separate cores,
847 and avoids placing two vCPUs on
848 two threads of same core.
849 ISOLATE : Places each vCPU on a different core,
850 and places no vCPUs from a different
851 guest on the same core.
852 PREFER : Attempts to place vCPUs on threads
864 "List of pcie passthrough devices.";
868 "Device identifier.";
873 "Number of devices to attach to the VM.";
886 container numa-node-policy {
888 "This policy defines NUMA topology of the
889 guest. Specifically identifies if the guest
890 should be run on a host with one NUMA
891 node or multiple NUMA nodes. As an example
892 a guest might need 8 VCPUs and 4 GB of
893 memory. However, it might need the VCPUs
894 and memory distributed across multiple
895 NUMA nodes. In this scenario, NUMA node
896 1 could run with 6 VCPUs and 3GB, and
897 NUMA node 2 could run with 2 VCPUs and
902 "The number of NUMA nodes to expose to the VM.";
908 "This policy specifies how the memory should
909 be allocated in a multi-node scenario.
910 STRICT : The memory must be allocated
911 strictly from the memory attached
913 PREFERRED : The memory should be allocated
914 preferentially from the memory
915 attached to the NUMA node";
926 "NUMA node identification. Typically
934 "List of VCPUs to allocate on
938 description "List of VCPUs ids to allocate on
945 "Memory size expressed in MB
946 for this NUMA node.";
950 choice om-numa-type {
952 "OpenMANO Numa type selection";
960 case paired-threads {
961 container paired-threads {
962 leaf num-paired-threads {
966 list paired-thread-ids {
968 "List of thread pairs to use in case of paired-thread NUMA";
996 grouping provider-network {
997 container provider-network {
998 description "Container for the provider network.";
999 leaf physical-network {
1001 "Name of the physical network on which the provider
1006 leaf segmentation_id {
1008 "ID of segregated virtual networks";
1014 grouping ns-service-primitive {
1015 list service-primitive {
1017 "Network service level service primitives.";
1023 "Name of the service primitive.";
1029 "List of parameters for the service primitive.";
1032 uses manotypes:primitive-parameter;
1035 list parameter-group {
1037 "Grouping of parameters which are logically grouped in UI";
1042 "Name of the parameter group";
1048 "List of parameters for the service primitive.";
1050 uses manotypes:primitive-parameter;
1054 description "Is this parameter group mandatory";
1060 list vnf-primitive-group {
1062 "List of service primitives grouped by VNF.";
1064 key "member-vnf-index-ref";
1065 leaf member-vnf-index-ref {
1067 "Reference to member-vnf within constituent-vnfds";
1073 "A reference to a vnfd. This is a
1075 ../../../../nsd:constituent-vnfd
1076 + [nsd:id = current()/../nsd:id-ref]
1078 NOTE: An issue with confd is preventing the
1079 use of xpath. Seems to be an issue with leafref
1080 to leafref, whose target is in a different module.
1081 Once that is resolved this will switched to use
1097 description "Index of this primitive";
1102 description "Name of the primitive in the VNF primitive ";
1108 leaf user-defined-script {
1110 "A user defined script.";
1116 grouping monitoring-param {
1117 list http-endpoint {
1119 "List of http endpoints to be used by monitoring params";
1123 description "The HTTP path on the management server";
1128 description "Pick HTTPS instead of HTTP , Default is false";
1134 description "The HTTP port to connect to";
1135 type inet:port-number;
1139 description "The HTTP basic auth username";
1144 description "The HTTP basic auth password";
1148 leaf polling-interval-secs {
1149 description "The HTTP polling interval in seconds";
1156 "Method that the URI should perform.
1157 Deafult action is GET.";
1159 type manotypes:http-method;
1164 description "Custom HTTP headers to put on HTTP request";
1167 description "HTTP header key";
1172 description "HTTP header value";
1178 list monitoring-param {
1180 "List of monitoring parameters at the network service level";
1190 leaf http-endpoint-ref {
1192 path "../../http-endpoint/path";
1196 leaf json-query-method {
1197 type json-query-method;
1201 container json-query-params {
1204 "The jsonpath to use to extract value from JSON structure";
1209 "The objectpath to use to extract value from JSON structure";
1214 uses monitoring-param-ui-data;
1215 uses monitoring-param-value;
1220 grouping monitoring-param-aggregation {
1221 typedef aggregation-type {
1222 description "aggregation-type";
1232 leaf aggregation-type {
1233 type aggregation-type;
1237 grouping monitoring-param-ui-data {
1243 description "A tag to group monitoring parameters";
1249 description "Defines the UI Display variant of measured counters.";
1250 type manotypes:widget-type;
1255 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1260 grouping monitoring-param-value {
1262 type param-value-type;
1266 container numeric-constraints {
1269 "Minimum value for the parameter";
1274 "Maximum value for the parameter";
1279 container text-constraints {
1282 "Minimum string length for the parameter";
1287 "Maximum string length for the parameter";
1292 leaf value-integer {
1294 "Current value for an integer parameter";
1298 leaf value-decimal {
1300 "Current value for a decimal parameter";
1308 "Current value for a string parameter";
1313 grouping control-param {
1314 list control-param {
1316 "List of control parameters to manage and
1317 update the running configuration of the VNF";
1321 description "Identifier for control parameter";
1326 description "Name of a control parameter";
1331 description "A description of the control parameter";
1336 description "A tag to group control parameters";
1342 "Minimum value for the parameter";
1348 "Maximum value for the parameter";
1352 leaf current-value {
1354 "Current value for the parameter";
1360 "Step value for the parameter";
1369 type manotypes:widget-type;
1374 "This is the URL where the operation should be performed.";
1381 "Method that the URI should perform.
1382 Default Action is POST";
1384 type manotypes:http-method;
1390 "This is the operation payload or payload template as stringified
1391 JSON. This field provides the data to be sent for this operation
1399 grouping action-param {
1402 "List of action parameters to
1418 description "A tag to group monitoring parameter";
1424 "This is the URL where to perform the operation";
1430 "This is the method to be performed at the uri.
1431 POST by default for action";
1433 type manotypes:http-method;
1439 "This is the operation payload or payload template to be sent in
1440 the data for this operation call";
1447 grouping input-parameter {
1448 description "List of input parameters that can be specified when instantiating a network service.";
1450 list input-parameter {
1452 "List of input parameters";
1459 "An xpath that specfies which element in a descriptor is to be
1466 "The value that the element specified by the xpath should take when a
1467 record is created.";
1473 grouping input-parameter-xpath {
1474 list input-parameter-xpath {
1476 "List of xpaths to parameters inside the NSD
1477 the can be customized during the instantiation.";
1482 "An xpath that specifies the element in a descriptor.";
1487 description "A descriptive string";
1491 leaf default-value {
1492 description "Default Value for the Input Parameter";
1498 grouping nfvi-metrics {
1502 "Label to show in UI";
1509 "The total number of VCPUs available.";
1515 "The VCPU utilization (percentage).";
1526 "Label to show in UI";
1533 "The amount of memory (bytes) currently in use.";
1539 "The amount of memory (bytes) available.";
1545 "The memory utilization (percentage).";
1556 "Label to show in UI";
1563 "The amount of storage (bytes) currently in use.";
1569 "The amount of storage (bytes) available.";
1575 "The storage utilization (percentage).";
1583 container external-ports {
1586 "Label to show in UI";
1588 default "EXTERNAL PORTS";
1593 "The total number of external ports.";
1598 container internal-ports {
1601 "Label to show in UI";
1603 default "INTERNAL PORTS";
1608 "The total number of internal ports.";
1616 "Label to show in UI";
1618 default "NETWORK TRAFFIC";
1621 container incoming {
1624 "Label to show in UI";
1626 default "INCOMING NETWORK TRAFFIC";
1631 "The cumulative number of incoming bytes.";
1637 "The cumulative number of incoming packets.";
1643 "The current incoming byte-rate (bytes per second).";
1651 "The current incoming packet (packets per second).";
1658 container outgoing {
1661 "Label to show in UI";
1663 default "OUTGOING NETWORK TRAFFIC";
1668 "The cumulative number of outgoing bytes.";
1674 "The cumulative number of outgoing packets.";
1680 "The current outgoing byte-rate (bytes per second).";
1688 "The current outgoing packet (packets per second).";
1697 typedef alarm-severity-type {
1698 description "An indication of the importance or urgency of the alarm";
1706 typedef alarm-metric-type {
1707 description "The type of metrics to register the alarm for";
1709 enum CPU_UTILIZATION;
1710 enum MEMORY_UTILIZATION;
1711 enum STORAGE_UTILIZATION;
1715 typedef alarm-statistic-type {
1717 "Statistic type to use to determine threshold crossing
1728 typedef alarm-operation-type {
1730 "The relational operator used to define whether an alarm
1731 should be triggered in certain scenarios, such as if the
1732 metric statistic goes above or below a specified value.";
1734 enum GE; // greater than or equal
1735 enum LE; // less than or equal
1736 enum GT; // greater than
1737 enum LT; // less than
1745 "This field is reserved for the identifier assigned by the VIM provider";
1751 description "A human readable string to identify the alarm";
1756 description "A description of this alarm";
1762 "The identifier of the VDUR that the alarm is associated with";
1774 list insufficient-data {
1791 "This flag indicates whether the alarm should be repeatedly emitted
1792 while the associated threshold has been crossed.";
1800 "This flag indicates whether the alarm has been enabled or
1808 description "A measure of the importance or urgency of the alarm";
1809 type alarm-severity-type;
1813 description "The metric to be tracked by this alarm.";
1814 type alarm-metric-type;
1818 description "The type of metric statistic that is tracked by this alarm";
1819 type alarm-statistic-type;
1824 "The relational operator used to define whether an alarm should be
1825 triggered in certain scenarios, such as if the metric statistic
1826 goes above or below a specified value.";
1827 type alarm-operation-type;
1832 "This value defines the threshold that, if crossed, will trigger
1841 "The period defines the length of time (seconds) that the metric
1842 data are collected over in oreder to evaluate the chosen
1849 "Defines the length of time (seconds) in which metric data are
1850 collected in order to evaluate the chosen statistic.";
1855 typedef cloud-account-type {
1856 description "VIM account type";
1860 enum cloudsim_proxy;
1869 grouping host-aggregate {
1870 list host-aggregate {
1871 description "Name of the Host Aggregate";
1876 "Name of the additional information attached to the host-aggregate";
1879 leaf metadata-value {
1881 "Value of the corresponding metadata-key";
1887 grouping placement-group-input {
1889 type manotypes:cloud-account-type;
1891 choice cloud-provider {
1893 container availability-zone {
1894 description "Name of the Availability Zone";
1899 container server-group {
1900 description "Name of the Affinity/Anti-Affinity Server Group";
1905 uses host-aggregate;
1908 leaf aws-construct {
1913 leaf openmano-construct {
1918 leaf vsphere-construct {
1923 leaf mock-construct {
1928 leaf cloudsim-construct {
1935 grouping cloud-config {
1938 description "Used to configure the list of public keys to be injected as part
1939 of ns instantiation";
1942 description "Name of this key pair";
1947 description "Key associated with this key pair";
1954 description "List of users to be added through cloud-config";
1957 description "Name of the user ";
1962 description "The user name's real name";
1968 description "Used to configure the list of public keys to be injected as part
1969 of ns instantiation";
1972 description "Name of this key pair";
1977 description "Key associated with this key pair";
1984 grouping placement-group-info {
1989 "Place group construct to define the compute resource placement strategy
1990 in cloud environment";
1995 description "This is free text space used to describe the intent/rationale
1996 behind this placement group. This is for human consumption only";
2002 "Strategy associated with this placement group
2003 Following values are possible
2004 - COLOCATION: Colocation strategy imply intent to share the physical
2005 infrastructure (hypervisor/network) among all members
2007 - ISOLATION: Isolation strategy imply intent to not share the physical
2008 infrastructure (hypervisor/network) among the members
2015 default "COLOCATION";
2019 grouping ip-profile-info {
2020 description "Grouping for IP-Profile";
2021 container ip-profile-params {
2024 type inet:ip-version;
2028 leaf subnet-address {
2029 description "Subnet IP prefix associated with IP Profile";
2030 type inet:ip-prefix;
2033 leaf gateway-address {
2034 description "IP Address of the default gateway associated with IP Profile";
2035 type inet:ip-address;
2038 leaf security-group {
2039 description "Name of the security group";
2046 description "List of DNS Servers associated with IP Profile";
2047 type inet:ip-address;
2051 container dhcp-params {
2053 description "This flag indicates if DHCP is enabled or not";
2058 leaf start-address {
2059 description "Start IP address of the IP-Address range associated with DHCP domain";
2060 type inet:ip-address;
2064 description "Size of the DHCP pool associated with DHCP domain";
2069 leaf subnet-prefix-pool {
2070 description "VIM Specific reference to pre-created subnet prefix";
2076 grouping ip-profile-list {
2079 "List of IP Profiles.
2080 IP Profile describes the IP characteristics for the Virtual-Link";
2085 description "Name of the IP-Profile";
2090 description "Description for IP profile";
2094 uses ip-profile-info;
2098 grouping config-file {
2099 description "Grouping for files needed to be mounted into an additional drive";
2102 "List of configuration files to be written on an additional drive";
2105 description "Name of the configuration file";
2109 description "Full path of the destination in the guest";
2115 grouping supplemental-boot-data {
2116 description "Grouping for custom vim data";
2117 container supplemental-boot-data {
2118 uses manotypes:config-file;
2119 leaf boot-data-drive {
2120 description "Some VIMs implement additional drives to host config-files or meta-data";
2127 grouping volume-info {
2128 description "Grouping for Volume-info";
2131 description "Description for Volume";
2136 description "Size of disk in GB";
2140 choice volume-source {
2142 "Defines the source of the volume. Possible options are
2143 1. Ephemeral -- Empty disk
2144 2. Image -- Refer to image to be used for volume
2145 3. Volume -- Reference of pre-existing volume to be used
2155 uses image-properties;
2160 description "Type of disk-bus on which this disk is exposed to guest";
2170 description "The type of device as exposed to guest";
2180 grouping rpc-project-name {
2184 "Project to which this belongs";
2186 path "/rw-project:project/rw-project:name";