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 {
1228 "aggregation-type, indicates the way to aggregate monitoring-params
1229 (e.g. how to aggregate CPU utilisation of all VNFs belonging to the
1230 same VNF group identified by member-vnf-index; or how to aggregate
1231 memory utilisation of all VDUs belonging to the same VDU group
1232 identified by vdu id)";
1242 leaf aggregation-type {
1243 type aggregation-type;
1247 grouping monitoring-param-ui-data {
1253 description "A tag to group monitoring parameters";
1259 description "Defines the UI Display variant of measured counters.";
1260 type manotypes:widget-type;
1265 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1270 grouping monitoring-param-value {
1272 type param-value-type;
1276 container numeric-constraints {
1279 "Minimum value for the parameter";
1284 "Maximum value for the parameter";
1289 container text-constraints {
1292 "Minimum string length for the parameter";
1297 "Maximum string length for the parameter";
1302 leaf value-integer {
1304 "Current value for an integer parameter";
1308 leaf value-decimal {
1310 "Current value for a decimal parameter";
1318 "Current value for a string parameter";
1323 grouping control-param {
1324 list control-param {
1326 "List of control parameters to manage and
1327 update the running configuration of the VNF";
1331 description "Identifier for control parameter";
1336 description "Name of a control parameter";
1341 description "A description of the control parameter";
1346 description "A tag to group control parameters";
1352 "Minimum value for the parameter";
1358 "Maximum value for the parameter";
1362 leaf current-value {
1364 "Current value for the parameter";
1370 "Step value for the parameter";
1379 type manotypes:widget-type;
1384 "This is the URL where the operation should be performed.";
1391 "Method that the URI should perform.
1392 Default Action is POST";
1394 type manotypes:http-method;
1400 "This is the operation payload or payload template as stringified
1401 JSON. This field provides the data to be sent for this operation
1409 grouping action-param {
1412 "List of action parameters to
1428 description "A tag to group monitoring parameter";
1434 "This is the URL where to perform the operation";
1440 "This is the method to be performed at the uri.
1441 POST by default for action";
1443 type manotypes:http-method;
1449 "This is the operation payload or payload template to be sent in
1450 the data for this operation call";
1457 grouping input-parameter {
1458 description "List of input parameters that can be specified when instantiating a network service.";
1460 list input-parameter {
1462 "List of input parameters";
1469 "An xpath that specfies which element in a descriptor is to be
1476 "The value that the element specified by the xpath should take when a
1477 record is created.";
1483 grouping input-parameter-xpath {
1484 list input-parameter-xpath {
1486 "List of xpaths to parameters inside the NSD
1487 the can be customized during the instantiation.";
1492 "An xpath that specifies the element in a descriptor.";
1497 description "A descriptive string";
1501 leaf default-value {
1502 description "Default Value for the Input Parameter";
1508 grouping nfvi-metrics {
1512 "Label to show in UI";
1519 "The total number of VCPUs available.";
1525 "The VCPU utilization (percentage).";
1536 "Label to show in UI";
1543 "The amount of memory (bytes) currently in use.";
1549 "The amount of memory (bytes) available.";
1555 "The memory utilization (percentage).";
1566 "Label to show in UI";
1573 "The amount of storage (bytes) currently in use.";
1579 "The amount of storage (bytes) available.";
1585 "The storage utilization (percentage).";
1593 container external-ports {
1596 "Label to show in UI";
1598 default "EXTERNAL PORTS";
1603 "The total number of external ports.";
1608 container internal-ports {
1611 "Label to show in UI";
1613 default "INTERNAL PORTS";
1618 "The total number of internal ports.";
1626 "Label to show in UI";
1628 default "NETWORK TRAFFIC";
1631 container incoming {
1634 "Label to show in UI";
1636 default "INCOMING NETWORK TRAFFIC";
1641 "The cumulative number of incoming bytes.";
1647 "The cumulative number of incoming packets.";
1653 "The current incoming byte-rate (bytes per second).";
1661 "The current incoming packet (packets per second).";
1668 container outgoing {
1671 "Label to show in UI";
1673 default "OUTGOING NETWORK TRAFFIC";
1678 "The cumulative number of outgoing bytes.";
1684 "The cumulative number of outgoing packets.";
1690 "The current outgoing byte-rate (bytes per second).";
1698 "The current outgoing packet (packets per second).";
1707 typedef alarm-severity-type {
1708 description "An indication of the importance or urgency of the alarm";
1716 typedef alarm-metric-type {
1717 description "The type of metrics to register the alarm for";
1719 enum CPU_UTILIZATION;
1720 enum MEMORY_UTILIZATION;
1721 enum STORAGE_UTILIZATION;
1725 typedef alarm-statistic-type {
1727 "Statistic type to use to determine threshold crossing
1738 typedef alarm-operation-type {
1740 "The relational operator used to define whether an alarm
1741 should be triggered in certain scenarios, such as if the
1742 metric statistic goes above or below a specified value.";
1744 enum GE; // greater than or equal
1745 enum LE; // less than or equal
1746 enum GT; // greater than
1747 enum LT; // less than
1755 "This field is reserved for the identifier assigned by the VIM provider";
1761 description "A human readable string to identify the alarm";
1766 description "A description of this alarm";
1772 "The identifier of the VDUR that the alarm is associated with";
1784 list insufficient-data {
1801 "This flag indicates whether the alarm should be repeatedly emitted
1802 while the associated threshold has been crossed.";
1810 "This flag indicates whether the alarm has been enabled or
1818 description "A measure of the importance or urgency of the alarm";
1819 type alarm-severity-type;
1823 description "The metric to be tracked by this alarm.";
1824 type alarm-metric-type;
1828 description "The type of metric statistic that is tracked by this alarm";
1829 type alarm-statistic-type;
1834 "The relational operator used to define whether an alarm should be
1835 triggered in certain scenarios, such as if the metric statistic
1836 goes above or below a specified value.";
1837 type alarm-operation-type;
1842 "This value defines the threshold that, if crossed, will trigger
1851 "The period defines the length of time (seconds) that the metric
1852 data are collected over in oreder to evaluate the chosen
1859 "Defines the length of time (seconds) in which metric data are
1860 collected in order to evaluate the chosen statistic.";
1865 typedef cloud-account-type {
1866 description "VIM account type";
1870 enum cloudsim_proxy;
1879 grouping host-aggregate {
1880 list host-aggregate {
1881 description "Name of the Host Aggregate";
1886 "Name of the additional information attached to the host-aggregate";
1889 leaf metadata-value {
1891 "Value of the corresponding metadata-key";
1897 grouping placement-group-input {
1899 type manotypes:cloud-account-type;
1901 choice cloud-provider {
1903 container availability-zone {
1904 description "Name of the Availability Zone";
1909 container server-group {
1910 description "Name of the Affinity/Anti-Affinity Server Group";
1915 uses host-aggregate;
1918 leaf aws-construct {
1923 leaf openmano-construct {
1928 leaf vsphere-construct {
1933 leaf mock-construct {
1938 leaf cloudsim-construct {
1945 grouping cloud-config {
1948 description "Used to configure the list of public keys to be injected as part
1949 of ns instantiation";
1952 description "Name of this key pair";
1957 description "Key associated with this key pair";
1964 description "List of users to be added through cloud-config";
1967 description "Name of the user ";
1972 description "The user name's real name";
1978 description "Used to configure the list of public keys to be injected as part
1979 of ns instantiation";
1982 description "Name of this key pair";
1987 description "Key associated with this key pair";
1994 grouping placement-group-info {
1999 "Place group construct to define the compute resource placement strategy
2000 in cloud environment";
2005 description "This is free text space used to describe the intent/rationale
2006 behind this placement group. This is for human consumption only";
2012 "Strategy associated with this placement group
2013 Following values are possible
2014 - COLOCATION: Colocation strategy imply intent to share the physical
2015 infrastructure (hypervisor/network) among all members
2017 - ISOLATION: Isolation strategy imply intent to not share the physical
2018 infrastructure (hypervisor/network) among the members
2025 default "COLOCATION";
2029 grouping ip-profile-info {
2030 description "Grouping for IP-Profile";
2031 container ip-profile-params {
2034 type inet:ip-version;
2038 leaf subnet-address {
2039 description "Subnet IP prefix associated with IP Profile";
2040 type inet:ip-prefix;
2043 leaf gateway-address {
2044 description "IP Address of the default gateway associated with IP Profile";
2045 type inet:ip-address;
2048 leaf security-group {
2049 description "Name of the security group";
2056 description "List of DNS Servers associated with IP Profile";
2057 type inet:ip-address;
2061 container dhcp-params {
2063 description "This flag indicates if DHCP is enabled or not";
2068 leaf start-address {
2069 description "Start IP address of the IP-Address range associated with DHCP domain";
2070 type inet:ip-address;
2074 description "Size of the DHCP pool associated with DHCP domain";
2079 leaf subnet-prefix-pool {
2080 description "VIM Specific reference to pre-created subnet prefix";
2086 grouping ip-profile-list {
2089 "List of IP Profiles.
2090 IP Profile describes the IP characteristics for the Virtual-Link";
2095 description "Name of the IP-Profile";
2100 description "Description for IP profile";
2104 uses ip-profile-info;
2108 grouping config-file {
2109 description "Grouping for files needed to be mounted into an additional drive";
2112 "List of configuration files to be written on an additional drive";
2115 description "Name of the configuration file";
2119 description "Full path of the destination in the guest";
2125 grouping supplemental-boot-data {
2126 description "Grouping for custom vim data";
2127 container supplemental-boot-data {
2128 uses manotypes:config-file;
2129 leaf boot-data-drive {
2130 description "Some VIMs implement additional drives to host config-files or meta-data";
2137 grouping volume-info {
2138 description "Grouping for Volume-info";
2141 description "Description for Volume";
2146 description "Size of disk in GB";
2150 choice volume-source {
2152 "Defines the source of the volume. Possible options are
2153 1. Ephemeral -- Empty disk
2154 2. Image -- Refer to image to be used for volume
2155 3. Volume -- Reference of pre-existing volume to be used
2165 uses image-properties;
2170 description "Type of disk-bus on which this disk is exposed to guest";
2180 description "The type of device as exposed to guest";
2190 grouping rpc-project-name {
2194 "Project to which this belongs";
2196 path "/rw-project:project/rw-project:name";