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.
208 leaf image-checksum {
210 "Image md5sum for the software image.
211 The md5sum, if provided, along with the image name uniquely
212 identifies an image uploaded to the CAL.
219 grouping vca-relationships {
220 container vca-relationships {
222 description "List of relations between VCA componets.";
224 key "requires provides";
228 "Name of the required relation.";
234 "Name of the provided relation.";
241 grouping vca-configuration {
243 "Information about the VNF or VDU configuration. Note:
244 If the NS contains multiple instances of the
245 same VNF or VDU, each instance could have a different
248 choice config-method {
250 "Defines the configuration method for the VNF or VDU.";
253 "Use custom script for configuring the VNF or VDU.
254 This script is executed in the context of
255 Orchestrator (The same system and environment
260 "Script type - currently supported - Scripts confirming to Rift CA plugin";
270 "Configure the VNF or VDU through Juju.";
273 description "Juju charm to use with the VNF or VDU.";
277 description "Is this a proxy charm?";
281 uses manotypes:vca-relationships;
286 list config-primitive {
288 "List of config primitives supported by the
289 configuration agent for this VNF or VDU.";
294 "Name of the config primitive.";
300 "List of parameters to the config primitive.";
302 uses primitive-parameter;
305 leaf user-defined-script {
307 "A user defined script. If user defined script is defined,
308 the script will be executed using bash";
313 list initial-config-primitive {
315 "Initial set of configuration primitives.";
319 "Sequence number for the configuration primitive.";
323 choice primitive-type {
324 case primitive-definition {
327 "Name of the configuration primitive.";
331 uses primitive-parameter-value;
333 leaf user-defined-script {
335 "A user defined script.";
341 } // END - grouping vca-configuration
343 typedef virtual-link-type {
345 "Type of virtual link
346 ELAN: A multipoint service connecting a set of VNFs
347 ELINE: For a simple point to point connection
348 // between a VNF and the existing network.
349 // ETREE: A multipoint service connecting one or
350 // more roots and a set of leaves, but
351 // preventing inter-leaf communication.";
359 grouping named-value {
369 typedef http-method {
371 "Type of HTTP operation";
385 "Type of API to fetch monitoring parameters";
394 typedef json-query-method {
396 "The method to extract a value from a JSON response
398 NAMEKEY - Use the name as the key for a non-nested value.
399 JSONPATH - Use jsonpath-rw implementation to extract a value.
400 OBJECTPATH - Use objectpath implementation to extract a value.";
408 typedef param-value-type {
410 "The type of the parameter value";
418 typedef connection-point-type {
420 "Type of connection point
422 // VNIC_ADDR: Virtual NIC Address
423 // PNIC_ADDR: Physical NIC Address
424 // PPORT: Physical Port.";
431 typedef widget-type {
433 "Type of the widget, typically used by the UI.";
444 typedef cpu-feature-type {
446 "Enumeration for CPU features.
448 AES: CPU supports advanced instruction set for
449 AES (Advanced Encryption Standard).
451 CAT: Cache Allocation Technology (CAT) allows
452 an Operating System, Hypervisor, or similar
453 system management agent to specify the amount
454 of L3 cache (currently the last-level cache
455 in most server and client platforms) space an
456 application can fill (as a hint to hardware
457 functionality, certain features such as power
458 management may override CAT settings).
460 CMT: Cache Monitoring Technology (CMT) allows
461 an Operating System, Hypervisor, or similar
462 system management agent to determine the
463 usage of cache based on applications running
464 on the platform. The implementation is
465 directed at L3 cache monitoring (currently
466 the last-level cache in most server and
469 DDIO: Intel Data Direct I/O (DDIO) enables
470 Ethernet server NICs and controllers talk
471 directly to the processor cache without a
472 detour via system memory. This enumeration
473 specifies if the VM requires a DDIO
517 enum REQUIRE_CLFLUSH;
545 enum REQUIRE_PCLMULQDQ;
546 enum PREFER_PCLMULQDQ;
549 enum REQUIRE_MONITOR;
587 enum REQUIRE_TSC_DEADLINE_TIMER;
588 enum PREFER_TSC_DEADLINE_TIMER;
597 enum REQUIRE_FSGSBASE;
598 enum PREFER_FSGSBASE;
611 enum REQUIRE_INVPCID;
627 container vm-flavor {
630 "Number of VCPUs for the VM.";
636 "Amount of memory in MB.";
642 "Amount of disk space in GB.";
646 } //grouping vm-flavor
648 grouping vm-flavor-name {
649 leaf vm-flavor-name {
650 description "flavor name to be used while creating vm using cloud account";
655 grouping vswitch-epa {
656 container vswitch-epa {
657 leaf ovs-acceleration {
659 "Specifies Open vSwitch acceleration mode.
660 MANDATORY: OVS acceleration is required
661 PREFERRED: OVS acceleration is preferred";
671 "Specifies Open vSwitch hardware offload mode.
672 MANDATORY: OVS offload is required
673 PREFERRED: OVS offload is preferred";
683 grouping hypervisor-epa {
684 container hypervisor-epa {
687 "Specifies the type of hypervisor.
703 description "Specifies the host level EPA attributes.";
706 "Host CPU model. Examples include: SandyBridge,
709 enum PREFER_WESTMERE;
710 enum REQUIRE_WESTMERE;
711 enum PREFER_SANDYBRIDGE;
712 enum REQUIRE_SANDYBRIDGE;
713 enum PREFER_IVYBRIDGE;
714 enum REQUIRE_IVYBRIDGE;
716 enum REQUIRE_HASWELL;
717 enum PREFER_BROADWELL;
718 enum REQUIRE_BROADWELL;
720 enum REQUIRE_NEHALEM;
725 enum PREFER_CORE2DUO;
726 enum REQUIRE_CORE2DUO;
731 description "Host CPU architecture.";
749 description "Host CPU Vendor.";
758 leaf cpu-socket-count {
759 description "Number of sockets on the host.";
763 leaf cpu-core-count {
764 description "Number of cores on the host.";
768 leaf cpu-core-thread-count {
769 description "Number of threads per cores on the host.";
775 description "List of CPU features.";
777 description "CPU feature.";
778 type cpu-feature-type;
783 leaf om-cpu-model-string {
784 description "OpenMANO CPU model string";
788 list om-cpu-feature {
790 description "List of OpenMANO CPU features";
792 description "CPU feature";
800 description "EPA attributes for the guest";
801 container guest-epa {
802 leaf trusted-execution {
803 description "This VM should be allocated from trusted pool";
809 "Memory page allocation size. If a VM requires
810 hugepages, it should choose LARGE or SIZE_2MB
811 or SIZE_1GB. If the VM prefers hugepages it
812 should choose PREFER_LARGE.
813 LARGE : Require hugepages (either 2MB or 1GB)
814 SMALL : Doesn't require hugepages
815 SIZE_2MB : Requires 2MB hugepages
816 SIZE_1GB : Requires 1GB hugepages
817 PREFER_LARGE : Application prefers hugepages";
827 leaf cpu-pinning-policy {
829 "CPU pinning policy describes association
830 between virtual CPUs in guest and the
831 physical CPUs in the host.
832 DEDICATED : Virtual CPUs are pinned to
834 SHARED : Multiple VMs may share the
836 ANY : Any policy is acceptable for the VM";
845 leaf cpu-thread-pinning-policy {
847 "CPU thread pinning policy describes how to
848 place the guest CPUs when the host supports
850 AVOID : Avoids placing a guest on a host
852 SEPARATE: Places vCPUs on separate cores,
853 and avoids placing two vCPUs on
854 two threads of same core.
855 ISOLATE : Places each vCPU on a different core,
856 and places no vCPUs from a different
857 guest on the same core.
858 PREFER : Attempts to place vCPUs on threads
870 "List of pcie passthrough devices.";
874 "Device identifier.";
879 "Number of devices to attach to the VM.";
892 container numa-node-policy {
894 "This policy defines NUMA topology of the
895 guest. Specifically identifies if the guest
896 should be run on a host with one NUMA
897 node or multiple NUMA nodes. As an example
898 a guest might need 8 VCPUs and 4 GB of
899 memory. However, it might need the VCPUs
900 and memory distributed across multiple
901 NUMA nodes. In this scenario, NUMA node
902 1 could run with 6 VCPUs and 3GB, and
903 NUMA node 2 could run with 2 VCPUs and
908 "The number of NUMA nodes to expose to the VM.";
914 "This policy specifies how the memory should
915 be allocated in a multi-node scenario.
916 STRICT : The memory must be allocated
917 strictly from the memory attached
919 PREFERRED : The memory should be allocated
920 preferentially from the memory
921 attached to the NUMA node";
932 "NUMA node identification. Typically
940 "List of VCPUs to allocate on
944 description "List of VCPUs ids to allocate on
951 "Memory size expressed in MB
952 for this NUMA node.";
956 choice om-numa-type {
958 "OpenMANO Numa type selection";
966 case paired-threads {
967 container paired-threads {
968 leaf num-paired-threads {
972 list paired-thread-ids {
974 "List of thread pairs to use in case of paired-thread NUMA";
1002 grouping provider-network {
1003 container provider-network {
1004 description "Container for the provider network.";
1005 leaf physical-network {
1007 "Name of the physical network on which the provider
1012 leaf segmentation_id {
1014 "ID of segregated virtual networks";
1020 grouping ns-service-primitive {
1021 list service-primitive {
1023 "Network service level service primitives.";
1029 "Name of the service primitive.";
1035 "List of parameters for the service primitive.";
1038 uses manotypes:primitive-parameter;
1041 list parameter-group {
1043 "Grouping of parameters which are logically grouped in UI";
1048 "Name of the parameter group";
1054 "List of parameters for the service primitive.";
1056 uses manotypes:primitive-parameter;
1060 description "Is this parameter group mandatory";
1066 list vnf-primitive-group {
1068 "List of service primitives grouped by VNF.";
1070 key "member-vnf-index-ref";
1071 leaf member-vnf-index-ref {
1073 "Reference to member-vnf within constituent-vnfds";
1079 "A reference to a vnfd. This is a
1081 ../../../../nsd:constituent-vnfd
1082 + [nsd:id = current()/../nsd:id-ref]
1084 NOTE: An issue with confd is preventing the
1085 use of xpath. Seems to be an issue with leafref
1086 to leafref, whose target is in a different module.
1087 Once that is resolved this will switched to use
1103 description "Index of this primitive";
1108 description "Name of the primitive in the VNF primitive ";
1114 leaf user-defined-script {
1116 "A user defined script.";
1122 grouping monitoring-param {
1123 list http-endpoint {
1125 "List of http endpoints to be used by monitoring params";
1129 description "The HTTP path on the management server";
1134 description "Pick HTTPS instead of HTTP , Default is false";
1140 description "The HTTP port to connect to";
1141 type inet:port-number;
1145 description "The HTTP basic auth username";
1150 description "The HTTP basic auth password";
1154 leaf polling-interval-secs {
1155 description "The HTTP polling interval in seconds";
1162 "Method that the URI should perform.
1163 Deafult action is GET.";
1165 type manotypes:http-method;
1170 description "Custom HTTP headers to put on HTTP request";
1173 description "HTTP header key";
1178 description "HTTP header value";
1184 list monitoring-param {
1186 "List of monitoring parameters at the network service level";
1196 leaf http-endpoint-ref {
1198 path "../../http-endpoint/path";
1202 leaf json-query-method {
1203 type json-query-method;
1207 container json-query-params {
1210 "The jsonpath to use to extract value from JSON structure";
1215 "The objectpath to use to extract value from JSON structure";
1220 uses monitoring-param-ui-data;
1221 uses monitoring-param-value;
1226 grouping monitoring-param-aggregation {
1227 typedef aggregation-type {
1228 description "aggregation-type";
1238 leaf aggregation-type {
1239 type aggregation-type;
1243 grouping monitoring-param-ui-data {
1249 description "A tag to group monitoring parameters";
1255 description "Defines the UI Display variant of measured counters.";
1256 type manotypes:widget-type;
1261 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1266 grouping monitoring-param-value {
1268 type param-value-type;
1272 container numeric-constraints {
1275 "Minimum value for the parameter";
1280 "Maximum value for the parameter";
1285 container text-constraints {
1288 "Minimum string length for the parameter";
1293 "Maximum string length for the parameter";
1298 leaf value-integer {
1300 "Current value for an integer parameter";
1304 leaf value-decimal {
1306 "Current value for a decimal parameter";
1314 "Current value for a string parameter";
1319 grouping control-param {
1320 list control-param {
1322 "List of control parameters to manage and
1323 update the running configuration of the VNF";
1327 description "Identifier for control parameter";
1332 description "Name of a control parameter";
1337 description "A description of the control parameter";
1342 description "A tag to group control parameters";
1348 "Minimum value for the parameter";
1354 "Maximum value for the parameter";
1358 leaf current-value {
1360 "Current value for the parameter";
1366 "Step value for the parameter";
1375 type manotypes:widget-type;
1380 "This is the URL where the operation should be performed.";
1387 "Method that the URI should perform.
1388 Default Action is POST";
1390 type manotypes:http-method;
1396 "This is the operation payload or payload template as stringified
1397 JSON. This field provides the data to be sent for this operation
1405 grouping action-param {
1408 "List of action parameters to
1424 description "A tag to group monitoring parameter";
1430 "This is the URL where to perform the operation";
1436 "This is the method to be performed at the uri.
1437 POST by default for action";
1439 type manotypes:http-method;
1445 "This is the operation payload or payload template to be sent in
1446 the data for this operation call";
1453 grouping input-parameter {
1454 description "List of input parameters that can be specified when instantiating a network service.";
1456 list input-parameter {
1458 "List of input parameters";
1465 "An xpath that specfies which element in a descriptor is to be
1472 "The value that the element specified by the xpath should take when a
1473 record is created.";
1479 grouping input-parameter-xpath {
1480 list input-parameter-xpath {
1482 "List of xpaths to parameters inside the NSD
1483 the can be customized during the instantiation.";
1488 "An xpath that specifies the element in a descriptor.";
1493 description "A descriptive string";
1497 leaf default-value {
1498 description "Default Value for the Input Parameter";
1504 grouping nfvi-metrics {
1508 "Label to show in UI";
1515 "The total number of VCPUs available.";
1521 "The VCPU utilization (percentage).";
1532 "Label to show in UI";
1539 "The amount of memory (bytes) currently in use.";
1545 "The amount of memory (bytes) available.";
1551 "The memory utilization (percentage).";
1562 "Label to show in UI";
1569 "The amount of storage (bytes) currently in use.";
1575 "The amount of storage (bytes) available.";
1581 "The storage utilization (percentage).";
1589 container external-ports {
1592 "Label to show in UI";
1594 default "EXTERNAL PORTS";
1599 "The total number of external ports.";
1604 container internal-ports {
1607 "Label to show in UI";
1609 default "INTERNAL PORTS";
1614 "The total number of internal ports.";
1622 "Label to show in UI";
1624 default "NETWORK TRAFFIC";
1627 container incoming {
1630 "Label to show in UI";
1632 default "INCOMING NETWORK TRAFFIC";
1637 "The cumulative number of incoming bytes.";
1643 "The cumulative number of incoming packets.";
1649 "The current incoming byte-rate (bytes per second).";
1657 "The current incoming packet (packets per second).";
1664 container outgoing {
1667 "Label to show in UI";
1669 default "OUTGOING NETWORK TRAFFIC";
1674 "The cumulative number of outgoing bytes.";
1680 "The cumulative number of outgoing packets.";
1686 "The current outgoing byte-rate (bytes per second).";
1694 "The current outgoing packet (packets per second).";
1703 typedef alarm-severity-type {
1704 description "An indication of the importance or urgency of the alarm";
1712 typedef alarm-metric-type {
1713 description "The type of metrics to register the alarm for";
1715 enum CPU_UTILIZATION;
1716 enum MEMORY_UTILIZATION;
1717 enum STORAGE_UTILIZATION;
1721 typedef alarm-statistic-type {
1723 "Statistic type to use to determine threshold crossing
1734 typedef alarm-operation-type {
1736 "The relational operator used to define whether an alarm
1737 should be triggered in certain scenarios, such as if the
1738 metric statistic goes above or below a specified value.";
1740 enum GE; // greater than or equal
1741 enum LE; // less than or equal
1742 enum GT; // greater than
1743 enum LT; // less than
1751 "This field is reserved for the identifier assigned by the VIM provider";
1757 description "A human readable string to identify the alarm";
1762 description "A description of this alarm";
1768 "The identifier of the VDUR that the alarm is associated with";
1780 list insufficient-data {
1797 "This flag indicates whether the alarm should be repeatedly emitted
1798 while the associated threshold has been crossed.";
1806 "This flag indicates whether the alarm has been enabled or
1814 description "A measure of the importance or urgency of the alarm";
1815 type alarm-severity-type;
1819 description "The metric to be tracked by this alarm.";
1820 type alarm-metric-type;
1824 description "The type of metric statistic that is tracked by this alarm";
1825 type alarm-statistic-type;
1830 "The relational operator used to define whether an alarm should be
1831 triggered in certain scenarios, such as if the metric statistic
1832 goes above or below a specified value.";
1833 type alarm-operation-type;
1838 "This value defines the threshold that, if crossed, will trigger
1847 "The period defines the length of time (seconds) that the metric
1848 data are collected over in oreder to evaluate the chosen
1855 "Defines the length of time (seconds) in which metric data are
1856 collected in order to evaluate the chosen statistic.";
1861 typedef cloud-account-type {
1862 description "VIM account type";
1866 enum cloudsim_proxy;
1875 grouping host-aggregate {
1876 list host-aggregate {
1877 description "Name of the Host Aggregate";
1882 "Name of the additional information attached to the host-aggregate";
1885 leaf metadata-value {
1887 "Value of the corresponding metadata-key";
1893 grouping placement-group-input {
1895 type manotypes:cloud-account-type;
1897 choice cloud-provider {
1899 container availability-zone {
1900 description "Name of the Availability Zone";
1905 container server-group {
1906 description "Name of the Affinity/Anti-Affinity Server Group";
1911 uses host-aggregate;
1914 leaf aws-construct {
1919 leaf openmano-construct {
1924 leaf vsphere-construct {
1929 leaf mock-construct {
1934 leaf cloudsim-construct {
1941 grouping cloud-config {
1944 description "Used to configure the list of public keys to be injected as part
1945 of ns instantiation";
1948 description "Name of this key pair";
1953 description "Key associated with this key pair";
1960 description "List of users to be added through cloud-config";
1963 description "Name of the user ";
1968 description "The user name's real name";
1974 description "Used to configure the list of public keys to be injected as part
1975 of ns instantiation";
1978 description "Name of this key pair";
1983 description "Key associated with this key pair";
1990 grouping placement-group-info {
1995 "Place group construct to define the compute resource placement strategy
1996 in cloud environment";
2001 description "This is free text space used to describe the intent/rationale
2002 behind this placement group. This is for human consumption only";
2008 "Strategy associated with this placement group
2009 Following values are possible
2010 - COLOCATION: Colocation strategy imply intent to share the physical
2011 infrastructure (hypervisor/network) among all members
2013 - ISOLATION: Isolation strategy imply intent to not share the physical
2014 infrastructure (hypervisor/network) among the members
2021 default "COLOCATION";
2025 grouping ip-profile-info {
2026 description "Grouping for IP-Profile";
2027 container ip-profile-params {
2030 type inet:ip-version;
2034 leaf subnet-address {
2035 description "Subnet IP prefix associated with IP Profile";
2036 type inet:ip-prefix;
2039 leaf gateway-address {
2040 description "IP Address of the default gateway associated with IP Profile";
2041 type inet:ip-address;
2044 leaf security-group {
2045 description "Name of the security group";
2052 description "List of DNS Servers associated with IP Profile";
2053 type inet:ip-address;
2057 container dhcp-params {
2059 description "This flag indicates if DHCP is enabled or not";
2064 leaf start-address {
2065 description "Start IP address of the IP-Address range associated with DHCP domain";
2066 type inet:ip-address;
2070 description "Size of the DHCP pool associated with DHCP domain";
2075 leaf subnet-prefix-pool {
2076 description "VIM Specific reference to pre-created subnet prefix";
2082 grouping ip-profile-list {
2085 "List of IP Profiles.
2086 IP Profile describes the IP characteristics for the Virtual-Link";
2091 description "Name of the IP-Profile";
2096 description "Description for IP profile";
2100 uses ip-profile-info;
2104 grouping config-file {
2105 description "Grouping for files needed to be mounted into an additional drive";
2108 "List of configuration files to be written on an additional drive";
2111 description "Name of the configuration file";
2115 description "Full path of the destination in the guest";
2121 grouping supplemental-boot-data {
2122 description "Grouping for custom vim data";
2123 container supplemental-boot-data {
2124 uses manotypes:config-file;
2125 leaf boot-data-drive {
2126 description "Some VIMs implement additional drives to host config-files or meta-data";
2133 grouping volume-info {
2134 description "Grouping for Volume-info";
2137 description "Description for Volume";
2142 description "Size of disk in GB";
2146 choice volume-source {
2148 "Defines the source of the volume. Possible options are
2149 1. Ephemeral -- Empty disk
2150 2. Image -- Refer to image to be used for volume
2151 3. Volume -- Reference of pre-existing volume to be used
2161 uses image-properties;
2166 description "Type of disk-bus on which this disk is exposed to guest";
2176 description "The type of device as exposed to guest";
2186 grouping rpc-project-name {
2190 "Project to which this belongs";
2192 path "/rw-project:project/rw-project:name";