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.";
276 uses manotypes:vca-relationships;
281 list config-primitive {
283 "List of config primitives supported by the
284 configuration agent for this VNF or VDU.";
289 "Name of the config primitive.";
295 "List of parameters to the config primitive.";
297 uses primitive-parameter;
300 leaf user-defined-script {
302 "A user defined script. If user defined script is defined,
303 the script will be executed using bash";
308 list initial-config-primitive {
310 "Initial set of configuration primitives.";
314 "Sequence number for the configuration primitive.";
318 choice primitive-type {
319 case primitive-definition {
322 "Name of the configuration primitive.";
326 uses primitive-parameter-value;
328 leaf user-defined-script {
330 "A user defined script.";
336 } // END - grouping vca-configuration
338 typedef virtual-link-type {
340 "Type of virtual link
341 ELAN: A multipoint service connecting a set of VNFs
342 ELINE: For a simple point to point connection
343 // between a VNF and the existing network.
344 // ETREE: A multipoint service connecting one or
345 // more roots and a set of leaves, but
346 // preventing inter-leaf communication.";
354 grouping named-value {
364 typedef http-method {
366 "Type of HTTP operation";
380 "Type of API to fetch monitoring parameters";
389 typedef json-query-method {
391 "The method to extract a value from a JSON response
393 NAMEKEY - Use the name as the key for a non-nested value.
394 JSONPATH - Use jsonpath-rw implementation to extract a value.
395 OBJECTPATH - Use objectpath implementation to extract a value.";
403 typedef param-value-type {
405 "The type of the parameter value";
413 typedef connection-point-type {
415 "Type of connection point
417 // VNIC_ADDR: Virtual NIC Address
418 // PNIC_ADDR: Physical NIC Address
419 // PPORT: Physical Port.";
426 typedef widget-type {
428 "Type of the widget, typically used by the UI.";
439 typedef cpu-feature-type {
441 "Enumeration for CPU features.
443 AES: CPU supports advanced instruction set for
444 AES (Advanced Encryption Standard).
446 CAT: Cache Allocation Technology (CAT) allows
447 an Operating System, Hypervisor, or similar
448 system management agent to specify the amount
449 of L3 cache (currently the last-level cache
450 in most server and client platforms) space an
451 application can fill (as a hint to hardware
452 functionality, certain features such as power
453 management may override CAT settings).
455 CMT: Cache Monitoring Technology (CMT) allows
456 an Operating System, Hypervisor, or similar
457 system management agent to determine the
458 usage of cache based on applications running
459 on the platform. The implementation is
460 directed at L3 cache monitoring (currently
461 the last-level cache in most server and
464 DDIO: Intel Data Direct I/O (DDIO) enables
465 Ethernet server NICs and controllers talk
466 directly to the processor cache without a
467 detour via system memory. This enumeration
468 specifies if the VM requires a DDIO
512 enum REQUIRE_CLFLUSH;
540 enum REQUIRE_PCLMULQDQ;
541 enum PREFER_PCLMULQDQ;
544 enum REQUIRE_MONITOR;
582 enum REQUIRE_TSC_DEADLINE_TIMER;
583 enum PREFER_TSC_DEADLINE_TIMER;
592 enum REQUIRE_FSGSBASE;
593 enum PREFER_FSGSBASE;
606 enum REQUIRE_INVPCID;
622 container vm-flavor {
625 "Number of VCPUs for the VM.";
631 "Amount of memory in MB.";
637 "Amount of disk space in GB.";
641 } //grouping vm-flavor
643 grouping vm-flavor-name {
644 leaf vm-flavor-name {
645 description "flavor name to be used while creating vm using cloud account";
650 grouping vswitch-epa {
651 container vswitch-epa {
652 leaf ovs-acceleration {
654 "Specifies Open vSwitch acceleration mode.
655 MANDATORY: OVS acceleration is required
656 PREFERRED: OVS acceleration is preferred";
666 "Specifies Open vSwitch hardware offload mode.
667 MANDATORY: OVS offload is required
668 PREFERRED: OVS offload is preferred";
678 grouping hypervisor-epa {
679 container hypervisor-epa {
682 "Specifies the type of hypervisor.
698 description "Specifies the host level EPA attributes.";
701 "Host CPU model. Examples include: SandyBridge,
704 enum PREFER_WESTMERE;
705 enum REQUIRE_WESTMERE;
706 enum PREFER_SANDYBRIDGE;
707 enum REQUIRE_SANDYBRIDGE;
708 enum PREFER_IVYBRIDGE;
709 enum REQUIRE_IVYBRIDGE;
711 enum REQUIRE_HASWELL;
712 enum PREFER_BROADWELL;
713 enum REQUIRE_BROADWELL;
715 enum REQUIRE_NEHALEM;
720 enum PREFER_CORE2DUO;
721 enum REQUIRE_CORE2DUO;
726 description "Host CPU architecture.";
744 description "Host CPU Vendor.";
753 leaf cpu-socket-count {
754 description "Number of sockets on the host.";
758 leaf cpu-core-count {
759 description "Number of cores on the host.";
763 leaf cpu-core-thread-count {
764 description "Number of threads per cores on the host.";
770 description "List of CPU features.";
772 description "CPU feature.";
773 type cpu-feature-type;
778 leaf om-cpu-model-string {
779 description "OpenMANO CPU model string";
783 list om-cpu-feature {
785 description "List of OpenMANO CPU features";
787 description "CPU feature";
795 description "EPA attributes for the guest";
796 container guest-epa {
797 leaf trusted-execution {
798 description "This VM should be allocated from trusted pool";
804 "Memory page allocation size. If a VM requires
805 hugepages, it should choose LARGE or SIZE_2MB
806 or SIZE_1GB. If the VM prefers hugepages it
807 should choose PREFER_LARGE.
808 LARGE : Require hugepages (either 2MB or 1GB)
809 SMALL : Doesn't require hugepages
810 SIZE_2MB : Requires 2MB hugepages
811 SIZE_1GB : Requires 1GB hugepages
812 PREFER_LARGE : Application prefers hugepages";
822 leaf cpu-pinning-policy {
824 "CPU pinning policy describes association
825 between virtual CPUs in guest and the
826 physical CPUs in the host.
827 DEDICATED : Virtual CPUs are pinned to
829 SHARED : Multiple VMs may share the
831 ANY : Any policy is acceptable for the VM";
840 leaf cpu-thread-pinning-policy {
842 "CPU thread pinning policy describes how to
843 place the guest CPUs when the host supports
845 AVOID : Avoids placing a guest on a host
847 SEPARATE: Places vCPUs on separate cores,
848 and avoids placing two vCPUs on
849 two threads of same core.
850 ISOLATE : Places each vCPU on a different core,
851 and places no vCPUs from a different
852 guest on the same core.
853 PREFER : Attempts to place vCPUs on threads
865 "List of pcie passthrough devices.";
869 "Device identifier.";
874 "Number of devices to attach to the VM.";
887 container numa-node-policy {
889 "This policy defines NUMA topology of the
890 guest. Specifically identifies if the guest
891 should be run on a host with one NUMA
892 node or multiple NUMA nodes. As an example
893 a guest might need 8 VCPUs and 4 GB of
894 memory. However, it might need the VCPUs
895 and memory distributed across multiple
896 NUMA nodes. In this scenario, NUMA node
897 1 could run with 6 VCPUs and 3GB, and
898 NUMA node 2 could run with 2 VCPUs and
903 "The number of NUMA nodes to expose to the VM.";
909 "This policy specifies how the memory should
910 be allocated in a multi-node scenario.
911 STRICT : The memory must be allocated
912 strictly from the memory attached
914 PREFERRED : The memory should be allocated
915 preferentially from the memory
916 attached to the NUMA node";
927 "NUMA node identification. Typically
935 "List of VCPUs to allocate on
939 description "List of VCPUs ids to allocate on
946 "Memory size expressed in MB
947 for this NUMA node.";
951 choice om-numa-type {
953 "OpenMANO Numa type selection";
961 case paired-threads {
962 container paired-threads {
963 leaf num-paired-threads {
967 list paired-thread-ids {
969 "List of thread pairs to use in case of paired-thread NUMA";
997 grouping provider-network {
998 container provider-network {
999 description "Container for the provider network.";
1000 leaf physical-network {
1002 "Name of the physical network on which the provider
1007 leaf segmentation_id {
1009 "ID of segregated virtual networks";
1015 grouping ns-service-primitive {
1016 list service-primitive {
1018 "Network service level service primitives.";
1024 "Name of the service primitive.";
1030 "List of parameters for the service primitive.";
1033 uses manotypes:primitive-parameter;
1036 list parameter-group {
1038 "Grouping of parameters which are logically grouped in UI";
1043 "Name of the parameter group";
1049 "List of parameters for the service primitive.";
1051 uses manotypes:primitive-parameter;
1055 description "Is this parameter group mandatory";
1061 list vnf-primitive-group {
1063 "List of service primitives grouped by VNF.";
1065 key "member-vnf-index-ref";
1066 leaf member-vnf-index-ref {
1068 "Reference to member-vnf within constituent-vnfds";
1074 "A reference to a vnfd. This is a
1076 ../../../../nsd:constituent-vnfd
1077 + [nsd:id = current()/../nsd:id-ref]
1079 NOTE: An issue with confd is preventing the
1080 use of xpath. Seems to be an issue with leafref
1081 to leafref, whose target is in a different module.
1082 Once that is resolved this will switched to use
1098 description "Index of this primitive";
1103 description "Name of the primitive in the VNF primitive ";
1109 leaf user-defined-script {
1111 "A user defined script.";
1117 grouping monitoring-param {
1118 list http-endpoint {
1120 "List of http endpoints to be used by monitoring params";
1124 description "The HTTP path on the management server";
1129 description "Pick HTTPS instead of HTTP , Default is false";
1135 description "The HTTP port to connect to";
1136 type inet:port-number;
1140 description "The HTTP basic auth username";
1145 description "The HTTP basic auth password";
1149 leaf polling-interval-secs {
1150 description "The HTTP polling interval in seconds";
1157 "Method that the URI should perform.
1158 Deafult action is GET.";
1160 type manotypes:http-method;
1165 description "Custom HTTP headers to put on HTTP request";
1168 description "HTTP header key";
1173 description "HTTP header value";
1179 list monitoring-param {
1181 "List of monitoring parameters at the network service level";
1191 leaf http-endpoint-ref {
1193 path "../../http-endpoint/path";
1197 leaf json-query-method {
1198 type json-query-method;
1202 container json-query-params {
1205 "The jsonpath to use to extract value from JSON structure";
1210 "The objectpath to use to extract value from JSON structure";
1215 uses monitoring-param-ui-data;
1216 uses monitoring-param-value;
1221 grouping monitoring-param-aggregation {
1222 typedef aggregation-type {
1223 description "aggregation-type";
1233 leaf aggregation-type {
1234 type aggregation-type;
1238 grouping monitoring-param-ui-data {
1244 description "A tag to group monitoring parameters";
1250 description "Defines the UI Display variant of measured counters.";
1251 type manotypes:widget-type;
1256 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1261 grouping monitoring-param-value {
1263 type param-value-type;
1267 container numeric-constraints {
1270 "Minimum value for the parameter";
1275 "Maximum value for the parameter";
1280 container text-constraints {
1283 "Minimum string length for the parameter";
1288 "Maximum string length for the parameter";
1293 leaf value-integer {
1295 "Current value for an integer parameter";
1299 leaf value-decimal {
1301 "Current value for a decimal parameter";
1309 "Current value for a string parameter";
1314 grouping control-param {
1315 list control-param {
1317 "List of control parameters to manage and
1318 update the running configuration of the VNF";
1322 description "Identifier for control parameter";
1327 description "Name of a control parameter";
1332 description "A description of the control parameter";
1337 description "A tag to group control parameters";
1343 "Minimum value for the parameter";
1349 "Maximum value for the parameter";
1353 leaf current-value {
1355 "Current value for the parameter";
1361 "Step value for the parameter";
1370 type manotypes:widget-type;
1375 "This is the URL where the operation should be performed.";
1382 "Method that the URI should perform.
1383 Default Action is POST";
1385 type manotypes:http-method;
1391 "This is the operation payload or payload template as stringified
1392 JSON. This field provides the data to be sent for this operation
1400 grouping action-param {
1403 "List of action parameters to
1419 description "A tag to group monitoring parameter";
1425 "This is the URL where to perform the operation";
1431 "This is the method to be performed at the uri.
1432 POST by default for action";
1434 type manotypes:http-method;
1440 "This is the operation payload or payload template to be sent in
1441 the data for this operation call";
1448 grouping input-parameter {
1449 description "List of input parameters that can be specified when instantiating a network service.";
1451 list input-parameter {
1453 "List of input parameters";
1460 "An xpath that specfies which element in a descriptor is to be
1467 "The value that the element specified by the xpath should take when a
1468 record is created.";
1474 grouping input-parameter-xpath {
1475 list input-parameter-xpath {
1477 "List of xpaths to parameters inside the NSD
1478 the can be customized during the instantiation.";
1483 "An xpath that specifies the element in a descriptor.";
1488 description "A descriptive string";
1492 leaf default-value {
1493 description "Default Value for the Input Parameter";
1499 grouping nfvi-metrics {
1503 "Label to show in UI";
1510 "The total number of VCPUs available.";
1516 "The VCPU utilization (percentage).";
1527 "Label to show in UI";
1534 "The amount of memory (bytes) currently in use.";
1540 "The amount of memory (bytes) available.";
1546 "The memory utilization (percentage).";
1557 "Label to show in UI";
1564 "The amount of storage (bytes) currently in use.";
1570 "The amount of storage (bytes) available.";
1576 "The storage utilization (percentage).";
1584 container external-ports {
1587 "Label to show in UI";
1589 default "EXTERNAL PORTS";
1594 "The total number of external ports.";
1599 container internal-ports {
1602 "Label to show in UI";
1604 default "INTERNAL PORTS";
1609 "The total number of internal ports.";
1617 "Label to show in UI";
1619 default "NETWORK TRAFFIC";
1622 container incoming {
1625 "Label to show in UI";
1627 default "INCOMING NETWORK TRAFFIC";
1632 "The cumulative number of incoming bytes.";
1638 "The cumulative number of incoming packets.";
1644 "The current incoming byte-rate (bytes per second).";
1652 "The current incoming packet (packets per second).";
1659 container outgoing {
1662 "Label to show in UI";
1664 default "OUTGOING NETWORK TRAFFIC";
1669 "The cumulative number of outgoing bytes.";
1675 "The cumulative number of outgoing packets.";
1681 "The current outgoing byte-rate (bytes per second).";
1689 "The current outgoing packet (packets per second).";
1698 typedef alarm-severity-type {
1699 description "An indication of the importance or urgency of the alarm";
1707 typedef alarm-metric-type {
1708 description "The type of metrics to register the alarm for";
1710 enum CPU_UTILIZATION;
1711 enum MEMORY_UTILIZATION;
1712 enum STORAGE_UTILIZATION;
1716 typedef alarm-statistic-type {
1718 "Statistic type to use to determine threshold crossing
1729 typedef alarm-operation-type {
1731 "The relational operator used to define whether an alarm
1732 should be triggered in certain scenarios, such as if the
1733 metric statistic goes above or below a specified value.";
1735 enum GE; // greater than or equal
1736 enum LE; // less than or equal
1737 enum GT; // greater than
1738 enum LT; // less than
1746 "This field is reserved for the identifier assigned by the VIM provider";
1752 description "A human readable string to identify the alarm";
1757 description "A description of this alarm";
1763 "The identifier of the VDUR that the alarm is associated with";
1775 list insufficient-data {
1792 "This flag indicates whether the alarm should be repeatedly emitted
1793 while the associated threshold has been crossed.";
1801 "This flag indicates whether the alarm has been enabled or
1809 description "A measure of the importance or urgency of the alarm";
1810 type alarm-severity-type;
1814 description "The metric to be tracked by this alarm.";
1815 type alarm-metric-type;
1819 description "The type of metric statistic that is tracked by this alarm";
1820 type alarm-statistic-type;
1825 "The relational operator used to define whether an alarm should be
1826 triggered in certain scenarios, such as if the metric statistic
1827 goes above or below a specified value.";
1828 type alarm-operation-type;
1833 "This value defines the threshold that, if crossed, will trigger
1842 "The period defines the length of time (seconds) that the metric
1843 data are collected over in oreder to evaluate the chosen
1850 "Defines the length of time (seconds) in which metric data are
1851 collected in order to evaluate the chosen statistic.";
1856 typedef cloud-account-type {
1857 description "VIM account type";
1861 enum cloudsim_proxy;
1870 grouping host-aggregate {
1871 list host-aggregate {
1872 description "Name of the Host Aggregate";
1877 "Name of the additional information attached to the host-aggregate";
1880 leaf metadata-value {
1882 "Value of the corresponding metadata-key";
1888 grouping placement-group-input {
1890 type manotypes:cloud-account-type;
1892 choice cloud-provider {
1894 container availability-zone {
1895 description "Name of the Availability Zone";
1900 container server-group {
1901 description "Name of the Affinity/Anti-Affinity Server Group";
1906 uses host-aggregate;
1909 leaf aws-construct {
1914 leaf openmano-construct {
1919 leaf vsphere-construct {
1924 leaf mock-construct {
1929 leaf cloudsim-construct {
1936 grouping cloud-config {
1939 description "Used to configure the list of public keys to be injected as part
1940 of ns instantiation";
1943 description "Name of this key pair";
1948 description "Key associated with this key pair";
1955 description "List of users to be added through cloud-config";
1958 description "Name of the user ";
1963 description "The user name's real name";
1969 description "Used to configure the list of public keys to be injected as part
1970 of ns instantiation";
1973 description "Name of this key pair";
1978 description "Key associated with this key pair";
1985 grouping placement-group-info {
1990 "Place group construct to define the compute resource placement strategy
1991 in cloud environment";
1996 description "This is free text space used to describe the intent/rationale
1997 behind this placement group. This is for human consumption only";
2003 "Strategy associated with this placement group
2004 Following values are possible
2005 - COLOCATION: Colocation strategy imply intent to share the physical
2006 infrastructure (hypervisor/network) among all members
2008 - ISOLATION: Isolation strategy imply intent to not share the physical
2009 infrastructure (hypervisor/network) among the members
2016 default "COLOCATION";
2020 grouping ip-profile-info {
2021 description "Grouping for IP-Profile";
2022 container ip-profile-params {
2025 type inet:ip-version;
2029 leaf subnet-address {
2030 description "Subnet IP prefix associated with IP Profile";
2031 type inet:ip-prefix;
2034 leaf gateway-address {
2035 description "IP Address of the default gateway associated with IP Profile";
2036 type inet:ip-address;
2039 leaf security-group {
2040 description "Name of the security group";
2047 description "List of DNS Servers associated with IP Profile";
2048 type inet:ip-address;
2052 container dhcp-params {
2054 description "This flag indicates if DHCP is enabled or not";
2059 leaf start-address {
2060 description "Start IP address of the IP-Address range associated with DHCP domain";
2061 type inet:ip-address;
2065 description "Size of the DHCP pool associated with DHCP domain";
2070 leaf subnet-prefix-pool {
2071 description "VIM Specific reference to pre-created subnet prefix";
2077 grouping ip-profile-list {
2080 "List of IP Profiles.
2081 IP Profile describes the IP characteristics for the Virtual-Link";
2086 description "Name of the IP-Profile";
2091 description "Description for IP profile";
2095 uses ip-profile-info;
2099 grouping config-file {
2100 description "Grouping for files needed to be mounted into an additional drive";
2103 "List of configuration files to be written on an additional drive";
2106 description "Name of the configuration file";
2110 description "Full path of the destination in the guest";
2116 grouping supplemental-boot-data {
2117 description "Grouping for custom vim data";
2118 container supplemental-boot-data {
2119 uses manotypes:config-file;
2120 leaf boot-data-drive {
2121 description "Some VIMs implement additional drives to host config-files or meta-data";
2128 grouping volume-info {
2129 description "Grouping for Volume-info";
2132 description "Description for Volume";
2137 description "Size of disk in GB";
2141 choice volume-source {
2143 "Defines the source of the volume. Possible options are
2144 1. Ephemeral -- Empty disk
2145 2. Image -- Refer to image to be used for volume
2146 3. Volume -- Reference of pre-existing volume to be used
2156 uses image-properties;
2161 description "Type of disk-bus on which this disk is exposed to guest";
2171 description "The type of device as exposed to guest";
2181 grouping rpc-project-name {
2185 "Project to which this belongs";
2187 path "/rw-project:project/rw-project:name";