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.";
276 description "Is this a proxy charm?";
280 uses manotypes:vca-relationships;
285 list config-primitive {
287 "List of config primitives supported by the
288 configuration agent for this VNF or VDU.";
293 "Name of the config primitive.";
299 "List of parameters to the config primitive.";
301 uses primitive-parameter;
304 leaf user-defined-script {
306 "A user defined script. If user defined script is defined,
307 the script will be executed using bash";
312 list initial-config-primitive {
314 "Initial set of configuration primitives.";
318 "Sequence number for the configuration primitive.";
322 choice primitive-type {
323 case primitive-definition {
326 "Name of the configuration primitive.";
330 uses primitive-parameter-value;
332 leaf user-defined-script {
334 "A user defined script.";
340 } // END - grouping vca-configuration
342 typedef virtual-link-type {
344 "Type of virtual link
345 ELAN: A multipoint service connecting a set of VNFs
346 ELINE: For a simple point to point connection
347 // between a VNF and the existing network.
348 // ETREE: A multipoint service connecting one or
349 // more roots and a set of leaves, but
350 // preventing inter-leaf communication.";
358 grouping named-value {
368 typedef http-method {
370 "Type of HTTP operation";
384 "Type of API to fetch monitoring parameters";
393 typedef json-query-method {
395 "The method to extract a value from a JSON response
397 NAMEKEY - Use the name as the key for a non-nested value.
398 JSONPATH - Use jsonpath-rw implementation to extract a value.
399 OBJECTPATH - Use objectpath implementation to extract a value.";
407 typedef param-value-type {
409 "The type of the parameter value";
417 typedef connection-point-type {
419 "Type of connection point
421 // VNIC_ADDR: Virtual NIC Address
422 // PNIC_ADDR: Physical NIC Address
423 // PPORT: Physical Port.";
430 typedef widget-type {
432 "Type of the widget, typically used by the UI.";
443 typedef cpu-feature-type {
445 "Enumeration for CPU features.
447 AES: CPU supports advanced instruction set for
448 AES (Advanced Encryption Standard).
450 CAT: Cache Allocation Technology (CAT) allows
451 an Operating System, Hypervisor, or similar
452 system management agent to specify the amount
453 of L3 cache (currently the last-level cache
454 in most server and client platforms) space an
455 application can fill (as a hint to hardware
456 functionality, certain features such as power
457 management may override CAT settings).
459 CMT: Cache Monitoring Technology (CMT) allows
460 an Operating System, Hypervisor, or similar
461 system management agent to determine the
462 usage of cache based on applications running
463 on the platform. The implementation is
464 directed at L3 cache monitoring (currently
465 the last-level cache in most server and
468 DDIO: Intel Data Direct I/O (DDIO) enables
469 Ethernet server NICs and controllers talk
470 directly to the processor cache without a
471 detour via system memory. This enumeration
472 specifies if the VM requires a DDIO
516 enum REQUIRE_CLFLUSH;
544 enum REQUIRE_PCLMULQDQ;
545 enum PREFER_PCLMULQDQ;
548 enum REQUIRE_MONITOR;
586 enum REQUIRE_TSC_DEADLINE_TIMER;
587 enum PREFER_TSC_DEADLINE_TIMER;
596 enum REQUIRE_FSGSBASE;
597 enum PREFER_FSGSBASE;
610 enum REQUIRE_INVPCID;
626 container vm-flavor {
629 "Number of VCPUs for the VM.";
635 "Amount of memory in MB.";
641 "Amount of disk space in GB.";
645 } //grouping vm-flavor
647 grouping vm-flavor-name {
648 leaf vm-flavor-name {
649 description "flavor name to be used while creating vm using cloud account";
654 grouping vswitch-epa {
655 container vswitch-epa {
656 leaf ovs-acceleration {
658 "Specifies Open vSwitch acceleration mode.
659 MANDATORY: OVS acceleration is required
660 PREFERRED: OVS acceleration is preferred";
670 "Specifies Open vSwitch hardware offload mode.
671 MANDATORY: OVS offload is required
672 PREFERRED: OVS offload is preferred";
682 grouping hypervisor-epa {
683 container hypervisor-epa {
686 "Specifies the type of hypervisor.
702 description "Specifies the host level EPA attributes.";
705 "Host CPU model. Examples include: SandyBridge,
708 enum PREFER_WESTMERE;
709 enum REQUIRE_WESTMERE;
710 enum PREFER_SANDYBRIDGE;
711 enum REQUIRE_SANDYBRIDGE;
712 enum PREFER_IVYBRIDGE;
713 enum REQUIRE_IVYBRIDGE;
715 enum REQUIRE_HASWELL;
716 enum PREFER_BROADWELL;
717 enum REQUIRE_BROADWELL;
719 enum REQUIRE_NEHALEM;
724 enum PREFER_CORE2DUO;
725 enum REQUIRE_CORE2DUO;
730 description "Host CPU architecture.";
748 description "Host CPU Vendor.";
757 leaf cpu-socket-count {
758 description "Number of sockets on the host.";
762 leaf cpu-core-count {
763 description "Number of cores on the host.";
767 leaf cpu-core-thread-count {
768 description "Number of threads per cores on the host.";
774 description "List of CPU features.";
776 description "CPU feature.";
777 type cpu-feature-type;
782 leaf om-cpu-model-string {
783 description "OpenMANO CPU model string";
787 list om-cpu-feature {
789 description "List of OpenMANO CPU features";
791 description "CPU feature";
799 description "EPA attributes for the guest";
800 container guest-epa {
801 leaf trusted-execution {
802 description "This VM should be allocated from trusted pool";
808 "Memory page allocation size. If a VM requires
809 hugepages, it should choose LARGE or SIZE_2MB
810 or SIZE_1GB. If the VM prefers hugepages it
811 should choose PREFER_LARGE.
812 LARGE : Require hugepages (either 2MB or 1GB)
813 SMALL : Doesn't require hugepages
814 SIZE_2MB : Requires 2MB hugepages
815 SIZE_1GB : Requires 1GB hugepages
816 PREFER_LARGE : Application prefers hugepages";
826 leaf cpu-pinning-policy {
828 "CPU pinning policy describes association
829 between virtual CPUs in guest and the
830 physical CPUs in the host.
831 DEDICATED : Virtual CPUs are pinned to
833 SHARED : Multiple VMs may share the
835 ANY : Any policy is acceptable for the VM";
844 leaf cpu-thread-pinning-policy {
846 "CPU thread pinning policy describes how to
847 place the guest CPUs when the host supports
849 AVOID : Avoids placing a guest on a host
851 SEPARATE: Places vCPUs on separate cores,
852 and avoids placing two vCPUs on
853 two threads of same core.
854 ISOLATE : Places each vCPU on a different core,
855 and places no vCPUs from a different
856 guest on the same core.
857 PREFER : Attempts to place vCPUs on threads
869 "List of pcie passthrough devices.";
873 "Device identifier.";
878 "Number of devices to attach to the VM.";
891 container numa-node-policy {
893 "This policy defines NUMA topology of the
894 guest. Specifically identifies if the guest
895 should be run on a host with one NUMA
896 node or multiple NUMA nodes. As an example
897 a guest might need 8 VCPUs and 4 GB of
898 memory. However, it might need the VCPUs
899 and memory distributed across multiple
900 NUMA nodes. In this scenario, NUMA node
901 1 could run with 6 VCPUs and 3GB, and
902 NUMA node 2 could run with 2 VCPUs and
907 "The number of NUMA nodes to expose to the VM.";
913 "This policy specifies how the memory should
914 be allocated in a multi-node scenario.
915 STRICT : The memory must be allocated
916 strictly from the memory attached
918 PREFERRED : The memory should be allocated
919 preferentially from the memory
920 attached to the NUMA node";
931 "NUMA node identification. Typically
939 "List of VCPUs to allocate on
943 description "List of VCPUs ids to allocate on
950 "Memory size expressed in MB
951 for this NUMA node.";
955 choice om-numa-type {
957 "OpenMANO Numa type selection";
965 case paired-threads {
966 container paired-threads {
967 leaf num-paired-threads {
971 list paired-thread-ids {
973 "List of thread pairs to use in case of paired-thread NUMA";
1001 grouping provider-network {
1002 container provider-network {
1003 description "Container for the provider network.";
1004 leaf physical-network {
1006 "Name of the physical network on which the provider
1011 leaf segmentation_id {
1013 "ID of segregated virtual networks";
1019 grouping ns-service-primitive {
1020 list service-primitive {
1022 "Network service level service primitives.";
1028 "Name of the service primitive.";
1034 "List of parameters for the service primitive.";
1037 uses manotypes:primitive-parameter;
1040 list parameter-group {
1042 "Grouping of parameters which are logically grouped in UI";
1047 "Name of the parameter group";
1053 "List of parameters for the service primitive.";
1055 uses manotypes:primitive-parameter;
1059 description "Is this parameter group mandatory";
1065 list vnf-primitive-group {
1067 "List of service primitives grouped by VNF.";
1069 key "member-vnf-index-ref";
1070 leaf member-vnf-index-ref {
1072 "Reference to member-vnf within constituent-vnfds";
1078 "A reference to a vnfd. This is a
1080 ../../../../nsd:constituent-vnfd
1081 + [nsd:id = current()/../nsd:id-ref]
1083 NOTE: An issue with confd is preventing the
1084 use of xpath. Seems to be an issue with leafref
1085 to leafref, whose target is in a different module.
1086 Once that is resolved this will switched to use
1102 description "Index of this primitive";
1107 description "Name of the primitive in the VNF primitive ";
1113 leaf user-defined-script {
1115 "A user defined script.";
1121 grouping monitoring-param {
1122 list http-endpoint {
1124 "List of http endpoints to be used by monitoring params";
1128 description "The HTTP path on the management server";
1133 description "Pick HTTPS instead of HTTP , Default is false";
1139 description "The HTTP port to connect to";
1140 type inet:port-number;
1144 description "The HTTP basic auth username";
1149 description "The HTTP basic auth password";
1153 leaf polling-interval-secs {
1154 description "The HTTP polling interval in seconds";
1161 "Method that the URI should perform.
1162 Deafult action is GET.";
1164 type manotypes:http-method;
1169 description "Custom HTTP headers to put on HTTP request";
1172 description "HTTP header key";
1177 description "HTTP header value";
1183 list monitoring-param {
1185 "List of monitoring parameters at the network service level";
1195 leaf http-endpoint-ref {
1197 path "../../http-endpoint/path";
1201 leaf json-query-method {
1202 type json-query-method;
1206 container json-query-params {
1209 "The jsonpath to use to extract value from JSON structure";
1214 "The objectpath to use to extract value from JSON structure";
1219 uses monitoring-param-ui-data;
1220 uses monitoring-param-value;
1225 grouping monitoring-param-aggregation {
1226 typedef aggregation-type {
1227 description "aggregation-type";
1237 leaf aggregation-type {
1238 type aggregation-type;
1242 grouping monitoring-param-ui-data {
1248 description "A tag to group monitoring parameters";
1254 description "Defines the UI Display variant of measured counters.";
1255 type manotypes:widget-type;
1260 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1265 grouping monitoring-param-value {
1267 type param-value-type;
1271 container numeric-constraints {
1274 "Minimum value for the parameter";
1279 "Maximum value for the parameter";
1284 container text-constraints {
1287 "Minimum string length for the parameter";
1292 "Maximum string length for the parameter";
1297 leaf value-integer {
1299 "Current value for an integer parameter";
1303 leaf value-decimal {
1305 "Current value for a decimal parameter";
1313 "Current value for a string parameter";
1318 grouping control-param {
1319 list control-param {
1321 "List of control parameters to manage and
1322 update the running configuration of the VNF";
1326 description "Identifier for control parameter";
1331 description "Name of a control parameter";
1336 description "A description of the control parameter";
1341 description "A tag to group control parameters";
1347 "Minimum value for the parameter";
1353 "Maximum value for the parameter";
1357 leaf current-value {
1359 "Current value for the parameter";
1365 "Step value for the parameter";
1374 type manotypes:widget-type;
1379 "This is the URL where the operation should be performed.";
1386 "Method that the URI should perform.
1387 Default Action is POST";
1389 type manotypes:http-method;
1395 "This is the operation payload or payload template as stringified
1396 JSON. This field provides the data to be sent for this operation
1404 grouping action-param {
1407 "List of action parameters to
1423 description "A tag to group monitoring parameter";
1429 "This is the URL where to perform the operation";
1435 "This is the method to be performed at the uri.
1436 POST by default for action";
1438 type manotypes:http-method;
1444 "This is the operation payload or payload template to be sent in
1445 the data for this operation call";
1452 grouping input-parameter {
1453 description "List of input parameters that can be specified when instantiating a network service.";
1455 list input-parameter {
1457 "List of input parameters";
1464 "An xpath that specfies which element in a descriptor is to be
1471 "The value that the element specified by the xpath should take when a
1472 record is created.";
1478 grouping input-parameter-xpath {
1479 list input-parameter-xpath {
1481 "List of xpaths to parameters inside the NSD
1482 the can be customized during the instantiation.";
1487 "An xpath that specifies the element in a descriptor.";
1492 description "A descriptive string";
1496 leaf default-value {
1497 description "Default Value for the Input Parameter";
1503 grouping nfvi-metrics {
1507 "Label to show in UI";
1514 "The total number of VCPUs available.";
1520 "The VCPU utilization (percentage).";
1531 "Label to show in UI";
1538 "The amount of memory (bytes) currently in use.";
1544 "The amount of memory (bytes) available.";
1550 "The memory utilization (percentage).";
1561 "Label to show in UI";
1568 "The amount of storage (bytes) currently in use.";
1574 "The amount of storage (bytes) available.";
1580 "The storage utilization (percentage).";
1588 container external-ports {
1591 "Label to show in UI";
1593 default "EXTERNAL PORTS";
1598 "The total number of external ports.";
1603 container internal-ports {
1606 "Label to show in UI";
1608 default "INTERNAL PORTS";
1613 "The total number of internal ports.";
1621 "Label to show in UI";
1623 default "NETWORK TRAFFIC";
1626 container incoming {
1629 "Label to show in UI";
1631 default "INCOMING NETWORK TRAFFIC";
1636 "The cumulative number of incoming bytes.";
1642 "The cumulative number of incoming packets.";
1648 "The current incoming byte-rate (bytes per second).";
1656 "The current incoming packet (packets per second).";
1663 container outgoing {
1666 "Label to show in UI";
1668 default "OUTGOING NETWORK TRAFFIC";
1673 "The cumulative number of outgoing bytes.";
1679 "The cumulative number of outgoing packets.";
1685 "The current outgoing byte-rate (bytes per second).";
1693 "The current outgoing packet (packets per second).";
1702 typedef alarm-severity-type {
1703 description "An indication of the importance or urgency of the alarm";
1711 typedef alarm-metric-type {
1712 description "The type of metrics to register the alarm for";
1714 enum CPU_UTILIZATION;
1715 enum MEMORY_UTILIZATION;
1716 enum STORAGE_UTILIZATION;
1720 typedef alarm-statistic-type {
1722 "Statistic type to use to determine threshold crossing
1733 typedef alarm-operation-type {
1735 "The relational operator used to define whether an alarm
1736 should be triggered in certain scenarios, such as if the
1737 metric statistic goes above or below a specified value.";
1739 enum GE; // greater than or equal
1740 enum LE; // less than or equal
1741 enum GT; // greater than
1742 enum LT; // less than
1750 "This field is reserved for the identifier assigned by the VIM provider";
1756 description "A human readable string to identify the alarm";
1761 description "A description of this alarm";
1767 "The identifier of the VDUR that the alarm is associated with";
1779 list insufficient-data {
1796 "This flag indicates whether the alarm should be repeatedly emitted
1797 while the associated threshold has been crossed.";
1805 "This flag indicates whether the alarm has been enabled or
1813 description "A measure of the importance or urgency of the alarm";
1814 type alarm-severity-type;
1818 description "The metric to be tracked by this alarm.";
1819 type alarm-metric-type;
1823 description "The type of metric statistic that is tracked by this alarm";
1824 type alarm-statistic-type;
1829 "The relational operator used to define whether an alarm should be
1830 triggered in certain scenarios, such as if the metric statistic
1831 goes above or below a specified value.";
1832 type alarm-operation-type;
1837 "This value defines the threshold that, if crossed, will trigger
1846 "The period defines the length of time (seconds) that the metric
1847 data are collected over in oreder to evaluate the chosen
1854 "Defines the length of time (seconds) in which metric data are
1855 collected in order to evaluate the chosen statistic.";
1860 typedef cloud-account-type {
1861 description "VIM account type";
1865 enum cloudsim_proxy;
1874 grouping host-aggregate {
1875 list host-aggregate {
1876 description "Name of the Host Aggregate";
1881 "Name of the additional information attached to the host-aggregate";
1884 leaf metadata-value {
1886 "Value of the corresponding metadata-key";
1892 grouping placement-group-input {
1894 type manotypes:cloud-account-type;
1896 choice cloud-provider {
1898 container availability-zone {
1899 description "Name of the Availability Zone";
1904 container server-group {
1905 description "Name of the Affinity/Anti-Affinity Server Group";
1910 uses host-aggregate;
1913 leaf aws-construct {
1918 leaf openmano-construct {
1923 leaf vsphere-construct {
1928 leaf mock-construct {
1933 leaf cloudsim-construct {
1940 grouping cloud-config {
1943 description "Used to configure the list of public keys to be injected as part
1944 of ns instantiation";
1947 description "Name of this key pair";
1952 description "Key associated with this key pair";
1959 description "List of users to be added through cloud-config";
1962 description "Name of the user ";
1967 description "The user name's real name";
1973 description "Used to configure the list of public keys to be injected as part
1974 of ns instantiation";
1977 description "Name of this key pair";
1982 description "Key associated with this key pair";
1989 grouping placement-group-info {
1994 "Place group construct to define the compute resource placement strategy
1995 in cloud environment";
2000 description "This is free text space used to describe the intent/rationale
2001 behind this placement group. This is for human consumption only";
2007 "Strategy associated with this placement group
2008 Following values are possible
2009 - COLOCATION: Colocation strategy imply intent to share the physical
2010 infrastructure (hypervisor/network) among all members
2012 - ISOLATION: Isolation strategy imply intent to not share the physical
2013 infrastructure (hypervisor/network) among the members
2020 default "COLOCATION";
2024 grouping ip-profile-info {
2025 description "Grouping for IP-Profile";
2026 container ip-profile-params {
2029 type inet:ip-version;
2033 leaf subnet-address {
2034 description "Subnet IP prefix associated with IP Profile";
2035 type inet:ip-prefix;
2038 leaf gateway-address {
2039 description "IP Address of the default gateway associated with IP Profile";
2040 type inet:ip-address;
2043 leaf security-group {
2044 description "Name of the security group";
2051 description "List of DNS Servers associated with IP Profile";
2052 type inet:ip-address;
2056 container dhcp-params {
2058 description "This flag indicates if DHCP is enabled or not";
2063 leaf start-address {
2064 description "Start IP address of the IP-Address range associated with DHCP domain";
2065 type inet:ip-address;
2069 description "Size of the DHCP pool associated with DHCP domain";
2074 leaf subnet-prefix-pool {
2075 description "VIM Specific reference to pre-created subnet prefix";
2081 grouping ip-profile-list {
2084 "List of IP Profiles.
2085 IP Profile describes the IP characteristics for the Virtual-Link";
2090 description "Name of the IP-Profile";
2095 description "Description for IP profile";
2099 uses ip-profile-info;
2103 grouping config-file {
2104 description "Grouping for files needed to be mounted into an additional drive";
2107 "List of configuration files to be written on an additional drive";
2110 description "Name of the configuration file";
2114 description "Full path of the destination in the guest";
2120 grouping supplemental-boot-data {
2121 description "Grouping for custom vim data";
2122 container supplemental-boot-data {
2123 uses manotypes:config-file;
2124 leaf boot-data-drive {
2125 description "Some VIMs implement additional drives to host config-files or meta-data";
2132 grouping volume-info {
2133 description "Grouping for Volume-info";
2136 description "Description for Volume";
2141 description "Size of disk in GB";
2145 choice volume-source {
2147 "Defines the source of the volume. Possible options are
2148 1. Ephemeral -- Empty disk
2149 2. Image -- Refer to image to be used for volume
2150 3. Volume -- Reference of pre-existing volume to be used
2160 uses image-properties;
2165 description "Type of disk-bus on which this disk is exposed to guest";
2175 description "The type of device as exposed to guest";
2185 grouping rpc-project-name {
2189 "Project to which this belongs";
2191 path "/rw-project:project/rw-project:name";