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 {
40 "Update model to support projects.";
45 "Initial revision. This YANG file defines
46 the reusable base types for VNF Management
47 and Orchestration (MANO).";
49 "Derived from earlier versions of base YANG files";
52 typedef meta-data-type {
58 typedef package-type {
59 description "Type of descriptor being on-boarded";
66 typedef parameter-data-type {
74 grouping primitive-parameter-value {
77 "List of parameters to the configuration primitive.";
81 "Name of the parameter.";
87 "Value associated with the name.";
93 grouping primitive-parameter {
96 "Name of the parameter.";
102 "Data type associated with the name.";
103 type manotypes:parameter-data-type;
107 description "Is this field mandatory";
113 description "The default value for this field";
117 leaf parameter-pool {
118 description "NSD parameter pool name to use for this parameter";
124 "The value should be dimmed by the UI.
125 Only applies to parameters with default values.";
132 "The value should be hidden by the UI.
133 Only applies to parameters with default values.";
139 grouping ui-primitive-group {
140 list parameter-group {
142 "Grouping of parameters which are logically grouped in UI";
147 "Name of the parameter group";
153 "List of parameters for the service primitive.";
155 uses manotypes:primitive-parameter;
159 description "Is this parameter group mandatory";
166 grouping event-config {
169 "Sequence number for the configuration primitive.";
175 "Name of the configuration primitive.";
180 leaf user-defined-script {
182 "A user defined script.";
193 description "Value of the configuration primitive.";
199 grouping image-properties {
202 "Image name for the software image.
203 If the image name is found within the VNF package it will
204 be uploaded to all VIM accounts during onboarding process.
205 Otherwise, the image must be added to the VIM account with
206 the same name as entered here.
211 leaf image-checksum {
213 "Image md5sum for the software image.
214 The md5sum, if provided, along with the image name uniquely
215 identifies an image uploaded to the CAL.
222 grouping vca-relationships {
223 container vca-relationships {
225 description "List of relations between VCA componets.";
227 key "requires provides";
231 "Name of the required relation.";
237 "Name of the provided relation.";
245 grouping vca-configuration {
247 "Information about the VNF or VDU configuration. Note:
248 If the NS contains multiple instances of the
249 same VNF or VDU, each instance could have a different
252 choice config-method {
254 "Defines the configuration method for the VNF or VDU.";
257 "Use custom script for configuring the VNF or VDU.
258 This script is executed in the context of
259 Orchestrator (The same system and environment
264 "Script type - currently supported - Scripts confirming to Rift CA plugin";
274 "Configure the VNF or VDU through Juju.";
277 description "Juju charm to use with the VNF or VDU.";
280 uses manotypes:vca-relationships;
286 list service-primitive {
287 rwpb:msg-new ServicePrimitive;
289 "List of config primitives supported by the
290 configuration agent for this VNF or VDU.";
295 "Name of the config primitive.";
301 "List of parameters to the config primitive.";
303 uses primitive-parameter;
306 leaf user-defined-script {
308 "A user defined script. If user defined script is defined,
309 the script will be executed using bash";
314 list initial-config-primitive {
315 rwpb:msg-new InitialConfigPrimitive;
317 "Initial set of configuration primitives.";
321 "Sequence number for the configuration primitive.";
325 choice primitive-type {
326 case primitive-definition {
329 "Name of the configuration primitive.";
333 uses primitive-parameter-value;
335 leaf user-defined-script {
337 "A user defined script.";
344 } // END - grouping vca-configuration
346 typedef virtual-link-type {
348 "Type of virtual link
349 ELAN: A multipoint service connecting a set of VNFs
350 ELINE: For a simple point to point connection
351 // between a VNF and the existing network.
352 // ETREE: A multipoint service connecting one or
353 // more roots and a set of leaves, but
354 // preventing inter-leaf communication.";
362 grouping named-value {
372 typedef http-method {
374 "Type of HTTP operation";
388 "Type of API to fetch monitoring parameters";
397 typedef json-query-method {
399 "The method to extract a value from a JSON response
401 NAMEKEY - Use the name as the key for a non-nested value.
402 JSONPATH - Use jsonpath-rw implementation to extract a value.
403 OBJECTPATH - Use objectpath implementation to extract a value.";
411 typedef param-value-type {
413 "The type of the parameter value";
421 typedef connection-point-type {
423 "Type of connection point
425 // VNIC_ADDR: Virtual NIC Address
426 // PNIC_ADDR: Physical NIC Address
427 // PPORT: Physical Port.";
434 typedef widget-type {
436 "Type of the widget, typically used by the UI.";
447 typedef cpu-feature-type {
449 "Enumeration for CPU features.
451 AES: CPU supports advanced instruction set for
452 AES (Advanced Encryption Standard).
454 CAT: Cache Allocation Technology (CAT) allows
455 an Operating System, Hypervisor, or similar
456 system management agent to specify the amount
457 of L3 cache (currently the last-level cache
458 in most server and client platforms) space an
459 application can fill (as a hint to hardware
460 functionality, certain features such as power
461 management may override CAT settings).
463 CMT: Cache Monitoring Technology (CMT) allows
464 an Operating System, Hypervisor, or similar
465 system management agent to determine the
466 usage of cache based on applications running
467 on the platform. The implementation is
468 directed at L3 cache monitoring (currently
469 the last-level cache in most server and
472 DDIO: Intel Data Direct I/O (DDIO) enables
473 Ethernet server NICs and controllers talk
474 directly to the processor cache without a
475 detour via system memory. This enumeration
476 specifies if the VM requires a DDIO
520 enum REQUIRE_CLFLUSH;
548 enum REQUIRE_PCLMULQDQ;
549 enum PREFER_PCLMULQDQ;
552 enum REQUIRE_MONITOR;
590 enum REQUIRE_TSC_DEADLINE_TIMER;
591 enum PREFER_TSC_DEADLINE_TIMER;
600 enum REQUIRE_FSGSBASE;
601 enum PREFER_FSGSBASE;
614 enum REQUIRE_INVPCID;
630 container vm-flavor {
633 "Number of VCPUs for the VM.";
639 "Amount of memory in MB.";
645 "Amount of disk space in GB.";
649 } //grouping vm-flavor
651 grouping vm-flavor-name {
652 leaf vm-flavor-name {
653 description "flavor name to be used while creating vm using cloud account";
658 grouping vswitch-epa {
659 container vswitch-epa {
660 leaf ovs-acceleration {
662 "Specifies Open vSwitch acceleration mode.
663 MANDATORY: OVS acceleration is required
664 PREFERRED: OVS acceleration is preferred";
674 "Specifies Open vSwitch hardware offload mode.
675 MANDATORY: OVS offload is required
676 PREFERRED: OVS offload is preferred";
686 grouping hypervisor-epa {
687 container hypervisor-epa {
690 "Specifies the type of hypervisor.
706 description "Specifies the host level EPA attributes.";
709 "Host CPU model. Examples include: SandyBridge,
712 enum PREFER_WESTMERE;
713 enum REQUIRE_WESTMERE;
714 enum PREFER_SANDYBRIDGE;
715 enum REQUIRE_SANDYBRIDGE;
716 enum PREFER_IVYBRIDGE;
717 enum REQUIRE_IVYBRIDGE;
719 enum REQUIRE_HASWELL;
720 enum PREFER_BROADWELL;
721 enum REQUIRE_BROADWELL;
723 enum REQUIRE_NEHALEM;
728 enum PREFER_CORE2DUO;
729 enum REQUIRE_CORE2DUO;
734 description "Host CPU architecture.";
752 description "Host CPU Vendor.";
761 leaf cpu-socket-count {
762 description "Number of sockets on the host.";
766 leaf cpu-core-count {
767 description "Number of cores on the host.";
771 leaf cpu-core-thread-count {
772 description "Number of threads per cores on the host.";
778 description "List of CPU features.";
780 description "CPU feature.";
781 type cpu-feature-type;
786 leaf om-cpu-model-string {
787 description "OpenMANO CPU model string";
791 list om-cpu-feature {
793 description "List of OpenMANO CPU features";
795 description "CPU feature";
803 description "EPA attributes for the guest";
804 container guest-epa {
805 leaf trusted-execution {
806 description "This VM should be allocated from trusted pool";
812 "Memory page allocation size. If a VM requires
813 hugepages, it should choose LARGE or SIZE_2MB
814 or SIZE_1GB. If the VM prefers hugepages it
815 should choose PREFER_LARGE.
816 LARGE : Require hugepages (either 2MB or 1GB)
817 SMALL : Doesn't require hugepages
818 SIZE_2MB : Requires 2MB hugepages
819 SIZE_1GB : Requires 1GB hugepages
820 PREFER_LARGE : Application prefers hugepages";
830 leaf cpu-pinning-policy {
832 "CPU pinning policy describes association
833 between virtual CPUs in guest and the
834 physical CPUs in the host.
835 DEDICATED : Virtual CPUs are pinned to
837 SHARED : Multiple VMs may share the
839 ANY : Any policy is acceptable for the VM";
848 leaf cpu-thread-pinning-policy {
850 "CPU thread pinning policy describes how to
851 place the guest CPUs when the host supports
853 AVOID : Avoids placing a guest on a host
855 SEPARATE: Places vCPUs on separate cores,
856 and avoids placing two vCPUs on
857 two threads of same core.
858 ISOLATE : Places each vCPU on a different core,
859 and places no vCPUs from a different
860 guest on the same core.
861 PREFER : Attempts to place vCPUs on threads
873 "List of pcie passthrough devices.";
877 "Device identifier.";
882 "Number of devices to attach to the VM.";
895 container numa-node-policy {
897 "This policy defines NUMA topology of the
898 guest. Specifically identifies if the guest
899 should be run on a host with one NUMA
900 node or multiple NUMA nodes. As an example
901 a guest might need 8 VCPUs and 4 GB of
902 memory. However, it might need the VCPUs
903 and memory distributed across multiple
904 NUMA nodes. In this scenario, NUMA node
905 1 could run with 6 VCPUs and 3GB, and
906 NUMA node 2 could run with 2 VCPUs and
911 "The number of NUMA nodes to expose to the VM.";
917 "This policy specifies how the memory should
918 be allocated in a multi-node scenario.
919 STRICT : The memory must be allocated
920 strictly from the memory attached
922 PREFERRED : The memory should be allocated
923 preferentially from the memory
924 attached to the NUMA node";
935 "NUMA node identification. Typically
943 "List of VCPUs to allocate on
947 description "List of VCPUs ids to allocate on
954 "Memory size expressed in MB
955 for this NUMA node.";
959 choice om-numa-type {
961 "OpenMANO Numa type selection";
969 case paired-threads {
970 container paired-threads {
971 leaf num-paired-threads {
975 list paired-thread-ids {
977 "List of thread pairs to use in case of paired-thread NUMA";
1005 grouping provider-network {
1006 container provider-network {
1007 description "Container for the provider network.";
1008 leaf physical-network {
1010 "Name of the physical network on which the provider
1015 leaf segmentation_id {
1017 "ID of segregated virtual networks";
1023 grouping ns-service-primitive {
1024 list service-primitive {
1026 "Network service level service primitives.";
1032 "Name of the service primitive.";
1038 "List of parameters for the service primitive.";
1041 uses manotypes:primitive-parameter;
1044 list parameter-group {
1046 "Grouping of parameters which are logically grouped in UI";
1051 "Name of the parameter group";
1057 "List of parameters for the service primitive.";
1059 uses manotypes:primitive-parameter;
1063 description "Is this parameter group mandatory";
1069 list vnf-primitive-group {
1071 "List of service primitives grouped by VNF.";
1073 key "member-vnf-index-ref";
1074 leaf member-vnf-index-ref {
1076 "Reference to member-vnf within constituent-vnfds";
1082 "A reference to a vnfd. This is a
1084 ../../../../nsd:constituent-vnfd
1085 + [nsd:id = current()/../nsd:id-ref]
1087 NOTE: An issue with confd is preventing the
1088 use of xpath. Seems to be an issue with leafref
1089 to leafref, whose target is in a different module.
1090 Once that is resolved this will switched to use
1106 description "Index of this primitive";
1111 description "Name of the primitive in the VNF primitive ";
1117 leaf user-defined-script {
1119 "A user defined script.";
1125 grouping monitoring-param {
1126 list http-endpoint {
1128 "List of http endpoints to be used by monitoring params";
1132 description "The HTTP path on the management server";
1137 description "Pick HTTPS instead of HTTP , Default is false";
1143 description "The HTTP port to connect to";
1144 type inet:port-number;
1148 description "The HTTP basic auth username";
1153 description "The HTTP basic auth password";
1157 leaf polling-interval-secs {
1158 description "The HTTP polling interval in seconds";
1165 "Method that the URI should perform.
1166 Deafult action is GET.";
1168 type manotypes:http-method;
1173 description "Custom HTTP headers to put on HTTP request";
1176 description "HTTP header key";
1181 description "HTTP header value";
1187 list monitoring-param {
1189 "List of monitoring parameters at the network service level";
1199 leaf http-endpoint-ref {
1201 path "../../http-endpoint/path";
1205 leaf json-query-method {
1206 type json-query-method;
1210 container json-query-params {
1213 "The jsonpath to use to extract value from JSON structure";
1218 "The objectpath to use to extract value from JSON structure";
1223 uses monitoring-param-ui-data;
1224 uses monitoring-param-value;
1229 grouping monitoring-param-aggregation {
1230 typedef aggregation-type {
1231 description "aggregation-type";
1241 leaf aggregation-type {
1242 type aggregation-type;
1246 grouping monitoring-param-ui-data {
1252 description "A tag to group monitoring parameters";
1258 description "Defines the UI Display variant of measured counters.";
1259 type manotypes:widget-type;
1264 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1269 grouping monitoring-param-value {
1271 type param-value-type;
1275 container numeric-constraints {
1278 "Minimum value for the parameter";
1283 "Maximum value for the parameter";
1288 container text-constraints {
1291 "Minimum string length for the parameter";
1296 "Maximum string length for the parameter";
1301 leaf value-integer {
1303 "Current value for an integer parameter";
1307 leaf value-decimal {
1309 "Current value for a decimal parameter";
1317 "Current value for a string parameter";
1322 grouping control-param {
1323 list control-param {
1325 "List of control parameters to manage and
1326 update the running configuration of the VNF";
1330 description "Identifier for control parameter";
1335 description "Name of a control parameter";
1340 description "A description of the control parameter";
1345 description "A tag to group control parameters";
1351 "Minimum value for the parameter";
1357 "Maximum value for the parameter";
1361 leaf current-value {
1363 "Current value for the parameter";
1369 "Step value for the parameter";
1378 type manotypes:widget-type;
1383 "This is the URL where the operation should be performed.";
1390 "Method that the URI should perform.
1391 Default Action is POST";
1393 type manotypes:http-method;
1399 "This is the operation payload or payload template as stringified
1400 JSON. This field provides the data to be sent for this operation
1408 grouping action-param {
1411 "List of action parameters to
1427 description "A tag to group monitoring parameter";
1433 "This is the URL where to perform the operation";
1439 "This is the method to be performed at the uri.
1440 POST by default for action";
1442 type manotypes:http-method;
1448 "This is the operation payload or payload template to be sent in
1449 the data for this operation call";
1456 grouping input-parameter {
1457 description "List of input parameters that can be specified when instantiating a network service.";
1459 list input-parameter {
1461 "List of input parameters";
1468 "An xpath that specfies which element in a descriptor is to be
1475 "The value that the element specified by the xpath should take when a
1476 record is created.";
1482 grouping input-parameter-xpath {
1483 list input-parameter-xpath {
1485 "List of xpaths to parameters inside the NSD
1486 the can be customized during the instantiation.";
1491 "An xpath that specifies the element in a descriptor.";
1496 description "A descriptive string";
1500 leaf default-value {
1501 description "Default Value for the Input Parameter";
1507 grouping nfvi-metrics {
1511 "Label to show in UI";
1518 "The total number of VCPUs available.";
1524 "The VCPU utilization (percentage).";
1535 "Label to show in UI";
1542 "The amount of memory (bytes) currently in use.";
1548 "The amount of memory (bytes) available.";
1554 "The memory utilization (percentage).";
1565 "Label to show in UI";
1572 "The amount of storage (bytes) currently in use.";
1578 "The amount of storage (bytes) available.";
1584 "The storage utilization (percentage).";
1592 container external-ports {
1595 "Label to show in UI";
1597 default "EXTERNAL PORTS";
1602 "The total number of external ports.";
1607 container internal-ports {
1610 "Label to show in UI";
1612 default "INTERNAL PORTS";
1617 "The total number of internal ports.";
1625 "Label to show in UI";
1627 default "NETWORK TRAFFIC";
1630 container incoming {
1633 "Label to show in UI";
1635 default "INCOMING NETWORK TRAFFIC";
1640 "The cumulative number of incoming bytes.";
1646 "The cumulative number of incoming packets.";
1652 "The current incoming byte-rate (bytes per second).";
1660 "The current incoming packet (packets per second).";
1667 container outgoing {
1670 "Label to show in UI";
1672 default "OUTGOING NETWORK TRAFFIC";
1677 "The cumulative number of outgoing bytes.";
1683 "The cumulative number of outgoing packets.";
1689 "The current outgoing byte-rate (bytes per second).";
1697 "The current outgoing packet (packets per second).";
1706 typedef alarm-severity-type {
1707 description "An indication of the importance or urgency of the alarm";
1715 typedef alarm-metric-type {
1716 description "The type of metrics to register the alarm for";
1718 enum CPU_UTILIZATION;
1719 enum MEMORY_UTILIZATION;
1720 enum STORAGE_UTILIZATION;
1724 typedef alarm-statistic-type {
1726 "Statistic type to use to determine threshold crossing
1737 typedef alarm-operation-type {
1739 "The relational operator used to define whether an alarm
1740 should be triggered in certain scenarios, such as if the
1741 metric statistic goes above or below a specified value.";
1743 enum GE; // greater than or equal
1744 enum LE; // less than or equal
1745 enum GT; // greater than
1746 enum LT; // less than
1754 "This field is reserved for the identifier assigned by the VIM provider";
1760 description "A human readable string to identify the alarm";
1765 description "A description of this alarm";
1771 "The identifier of the VDUR that the alarm is associated with";
1783 list insufficient-data {
1800 "This flag indicates whether the alarm should be repeatedly emitted
1801 while the associated threshold has been crossed.";
1809 "This flag indicates whether the alarm has been enabled or
1817 description "A measure of the importance or urgency of the alarm";
1818 type alarm-severity-type;
1822 description "The metric to be tracked by this alarm.";
1823 type alarm-metric-type;
1827 description "The type of metric statistic that is tracked by this alarm";
1828 type alarm-statistic-type;
1833 "The relational operator used to define whether an alarm should be
1834 triggered in certain scenarios, such as if the metric statistic
1835 goes above or below a specified value.";
1836 type alarm-operation-type;
1841 "This value defines the threshold that, if crossed, will trigger
1850 "The period defines the length of time (seconds) that the metric
1851 data are collected over in oreder to evaluate the chosen
1858 "Defines the length of time (seconds) in which metric data are
1859 collected in order to evaluate the chosen statistic.";
1864 typedef cloud-account-type {
1865 description "VIM account type";
1869 enum cloudsim_proxy;
1878 grouping host-aggregate {
1879 list host-aggregate {
1880 description "Name of the Host Aggregate";
1885 "Name of the additional information attached to the host-aggregate";
1888 leaf metadata-value {
1890 "Value of the corresponding metadata-key";
1896 grouping placement-group-input {
1898 type manotypes:cloud-account-type;
1900 choice cloud-provider {
1902 container availability-zone {
1903 description "Name of the Availability Zone";
1908 container server-group {
1909 description "Name of the Affinity/Anti-Affinity Server Group";
1914 uses host-aggregate;
1917 leaf aws-construct {
1922 leaf openmano-construct {
1927 leaf vsphere-construct {
1932 leaf mock-construct {
1937 leaf cloudsim-construct {
1944 grouping cloud-config {
1947 description "Used to configure the list of public keys to be injected as part
1948 of ns instantiation";
1951 description "Name of this key pair";
1956 description "Key associated with this key pair";
1962 rwpb:msg-new CloudConfigUser;
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";