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.
217 grouping vnf-configuration {
218 container vnf-configuration {
220 "Information about the VNF configuration. Note:
221 If the NS contains multiple instances of the
222 same VNF, each instance could have a different
225 choice config-method {
227 "Defines the configuration method for the VNF.";
230 "Use custom script for configuring the VNF.
231 This script is executed in the context of
232 Orchestrator (The same system and environment
237 "Script type - currently supported - Scripts confirming to Rift CA plugin";
247 "Configure the VNF through Juju.";
250 description "Juju charm to use with the VNF.";
257 list config-primitive {
259 "List of config primitives supported by the
260 configuration agent for this VNF.";
265 "Name of the config primitive.";
271 "List of parameters to the config primitive.";
273 uses primitive-parameter;
276 leaf user-defined-script {
278 "A user defined script. If user defined script is defined,
279 the script will be executed using bash";
284 list initial-config-primitive {
286 "Initial set of configuration primitives.";
290 "Sequence number for the configuration primitive.";
294 choice primitive-type {
295 case primitive-definition {
298 "Name of the configuration primitive.";
302 uses primitive-parameter-value;
304 leaf user-defined-script {
306 "A user defined script.";
313 } // END - grouping vnf-configuration
315 typedef virtual-link-type {
317 "Type of virtual link
318 ELAN: A multipoint service connecting a set of VNFs
319 // ELINE: For a simple point to point connection
320 // between a VNF and the existing network.
321 // ETREE: A multipoint service connecting one or
322 // more roots and a set of leaves, but
323 // preventing inter-leaf communication.";
331 grouping named-value {
341 typedef http-method {
343 "Type of HTTP operation";
357 "Type of API to fetch monitoring parameters";
366 typedef json-query-method {
368 "The method to extract a value from a JSON response
370 NAMEKEY - Use the name as the key for a non-nested value.
371 JSONPATH - Use jsonpath-rw implementation to extract a value.
372 OBJECTPATH - Use objectpath implementation to extract a value.";
380 typedef param-value-type {
382 "The type of the parameter value";
390 typedef connection-point-type {
392 "Type of connection point
394 // VNIC_ADDR: Virtual NIC Address
395 // PNIC_ADDR: Physical NIC Address
396 // PPORT: Physical Port.";
403 typedef widget-type {
405 "Type of the widget, typically used by the UI.";
416 typedef cpu-feature-type {
418 "Enumeration for CPU features.
420 AES: CPU supports advanced instruction set for
421 AES (Advanced Encryption Standard).
423 CAT: Cache Allocation Technology (CAT) allows
424 an Operating System, Hypervisor, or similar
425 system management agent to specify the amount
426 of L3 cache (currently the last-level cache
427 in most server and client platforms) space an
428 application can fill (as a hint to hardware
429 functionality, certain features such as power
430 management may override CAT settings).
432 CMT: Cache Monitoring Technology (CMT) allows
433 an Operating System, Hypervisor, or similar
434 system management agent to determine the
435 usage of cache based on applications running
436 on the platform. The implementation is
437 directed at L3 cache monitoring (currently
438 the last-level cache in most server and
441 DDIO: Intel Data Direct I/O (DDIO) enables
442 Ethernet server NICs and controllers talk
443 directly to the processor cache without a
444 detour via system memory. This enumeration
445 specifies if the VM requires a DDIO
489 enum REQUIRE_CLFLUSH;
517 enum REQUIRE_PCLMULQDQ;
518 enum PREFER_PCLMULQDQ;
521 enum REQUIRE_MONITOR;
559 enum REQUIRE_TSC_DEADLINE_TIMER;
560 enum PREFER_TSC_DEADLINE_TIMER;
569 enum REQUIRE_FSGSBASE;
570 enum PREFER_FSGSBASE;
583 enum REQUIRE_INVPCID;
599 container vm-flavor {
602 "Number of VCPUs for the VM.";
608 "Amount of memory in MB.";
614 "Amount of disk space in GB.";
618 } //grouping vm-flavor
620 grouping vm-flavor-name {
621 leaf vm-flavor-name {
622 description "flavor name to be used while creating vm using cloud account";
627 grouping vswitch-epa {
628 container vswitch-epa {
629 leaf ovs-acceleration {
631 "Specifies Open vSwitch acceleration mode.
632 MANDATORY: OVS acceleration is required
633 PREFERRED: OVS acceleration is preferred";
643 "Specifies Open vSwitch hardware offload mode.
644 MANDATORY: OVS offload is required
645 PREFERRED: OVS offload is preferred";
655 grouping hypervisor-epa {
656 container hypervisor-epa {
659 "Specifies the type of hypervisor.
675 description "Specifies the host level EPA attributes.";
678 "Host CPU model. Examples include: SandyBridge,
681 enum PREFER_WESTMERE;
682 enum REQUIRE_WESTMERE;
683 enum PREFER_SANDYBRIDGE;
684 enum REQUIRE_SANDYBRIDGE;
685 enum PREFER_IVYBRIDGE;
686 enum REQUIRE_IVYBRIDGE;
688 enum REQUIRE_HASWELL;
689 enum PREFER_BROADWELL;
690 enum REQUIRE_BROADWELL;
692 enum REQUIRE_NEHALEM;
697 enum PREFER_CORE2DUO;
698 enum REQUIRE_CORE2DUO;
703 description "Host CPU architecture.";
721 description "Host CPU Vendor.";
730 leaf cpu-socket-count {
731 description "Number of sockets on the host.";
735 leaf cpu-core-count {
736 description "Number of cores on the host.";
740 leaf cpu-core-thread-count {
741 description "Number of threads per cores on the host.";
747 description "List of CPU features.";
749 description "CPU feature.";
750 type cpu-feature-type;
755 leaf om-cpu-model-string {
756 description "OpenMANO CPU model string";
760 list om-cpu-feature {
762 description "List of OpenMANO CPU features";
764 description "CPU feature";
772 description "EPA attributes for the guest";
773 container guest-epa {
774 leaf trusted-execution {
775 description "This VM should be allocated from trusted pool";
781 "Memory page allocation size. If a VM requires
782 hugepages, it should choose LARGE or SIZE_2MB
783 or SIZE_1GB. If the VM prefers hugepages it
784 should choose PREFER_LARGE.
785 LARGE : Require hugepages (either 2MB or 1GB)
786 SMALL : Doesn't require hugepages
787 SIZE_2MB : Requires 2MB hugepages
788 SIZE_1GB : Requires 1GB hugepages
789 PREFER_LARGE : Application prefers hugepages";
799 leaf cpu-pinning-policy {
801 "CPU pinning policy describes association
802 between virtual CPUs in guest and the
803 physical CPUs in the host.
804 DEDICATED : Virtual CPUs are pinned to
806 SHARED : Multiple VMs may share the
808 ANY : Any policy is acceptable for the VM";
817 leaf cpu-thread-pinning-policy {
819 "CPU thread pinning policy describes how to
820 place the guest CPUs when the host supports
822 AVOID : Avoids placing a guest on a host
824 SEPARATE: Places vCPUs on separate cores,
825 and avoids placing two vCPUs on
826 two threads of same core.
827 ISOLATE : Places each vCPU on a different core,
828 and places no vCPUs from a different
829 guest on the same core.
830 PREFER : Attempts to place vCPUs on threads
842 "List of pcie passthrough devices.";
846 "Device identifier.";
851 "Number of devices to attach to the VM.";
864 container numa-node-policy {
866 "This policy defines NUMA topology of the
867 guest. Specifically identifies if the guest
868 should be run on a host with one NUMA
869 node or multiple NUMA nodes. As an example
870 a guest might need 8 VCPUs and 4 GB of
871 memory. However, it might need the VCPUs
872 and memory distributed across multiple
873 NUMA nodes. In this scenario, NUMA node
874 1 could run with 6 VCPUs and 3GB, and
875 NUMA node 2 could run with 2 VCPUs and
880 "The number of NUMA nodes to expose to the VM.";
886 "This policy specifies how the memory should
887 be allocated in a multi-node scenario.
888 STRICT : The memory must be allocated
889 strictly from the memory attached
891 PREFERRED : The memory should be allocated
892 preferentially from the memory
893 attached to the NUMA node";
904 "NUMA node identification. Typically
912 "List of VCPUs to allocate on
916 description "List of VCPUs ids to allocate on
923 "Memory size expressed in MB
924 for this NUMA node.";
928 choice om-numa-type {
930 "OpenMANO Numa type selection";
938 case paired-threads {
939 container paired-threads {
940 leaf num-paired-threads {
944 list paired-thread-ids {
946 "List of thread pairs to use in case of paired-thread NUMA";
974 grouping provider-network {
975 container provider-network {
976 description "Container for the provider network.";
977 leaf physical-network {
979 "Name of the physical network on which the provider
986 "Type of the overlay network.
987 LOCAL - Provider network implemented in a single compute node
988 FLAT - Provider network shared by all tenants
989 VLAN - Provider network implemented using 802.1Q tagging
990 VXLAN - Provider networks implemented using RFC 7348
991 GRE - Provider networks implemented using GRE tunnels
992 PORTGROUP - Provider networks implemented for VIO support";
1002 leaf segmentation_id {
1004 "ID of segregated virtual networks";
1010 grouping ns-service-primitive {
1011 list service-primitive {
1013 "Network service level service primitives.";
1019 "Name of the service primitive.";
1025 "List of parameters for the service primitive.";
1028 uses manotypes:primitive-parameter;
1031 list parameter-group {
1033 "Grouping of parameters which are logically grouped in UI";
1038 "Name of the parameter group";
1044 "List of parameters for the service primitive.";
1046 uses manotypes:primitive-parameter;
1050 description "Is this parameter group mandatory";
1056 list vnf-primitive-group {
1058 "List of service primitives grouped by VNF.";
1060 key "member-vnf-index-ref";
1061 leaf member-vnf-index-ref {
1063 "Reference to member-vnf within constituent-vnfds";
1069 "A reference to a vnfd. This is a
1071 ../../../../nsd:constituent-vnfd
1072 + [nsd:id = current()/../nsd:id-ref]
1074 NOTE: An issue with confd is preventing the
1075 use of xpath. Seems to be an issue with leafref
1076 to leafref, whose target is in a different module.
1077 Once that is resolved this will switched to use
1093 description "Index of this primitive";
1098 description "Name of the primitive in the VNF primitive ";
1104 leaf user-defined-script {
1106 "A user defined script.";
1112 grouping monitoring-param {
1113 list http-endpoint {
1115 "List of http endpoints to be used by monitoring params";
1119 description "The HTTP path on the management server";
1124 description "Pick HTTPS instead of HTTP , Default is false";
1130 description "The HTTP port to connect to";
1131 type inet:port-number;
1135 description "The HTTP basic auth username";
1140 description "The HTTP basic auth password";
1144 leaf polling-interval-secs {
1145 description "The HTTP polling interval in seconds";
1152 "Method that the URI should perform.
1153 Deafult action is GET.";
1155 type manotypes:http-method;
1160 description "Custom HTTP headers to put on HTTP request";
1163 description "HTTP header key";
1168 description "HTTP header value";
1174 list monitoring-param {
1176 "List of monitoring parameters at the network service level";
1186 leaf http-endpoint-ref {
1188 path "../../http-endpoint/path";
1192 leaf json-query-method {
1193 type json-query-method;
1197 container json-query-params {
1200 "The jsonpath to use to extract value from JSON structure";
1205 "The objectpath to use to extract value from JSON structure";
1210 uses monitoring-param-ui-data;
1211 uses monitoring-param-value;
1216 grouping monitoring-param-aggregation {
1217 typedef aggregation-type {
1218 description "aggregation-type";
1228 leaf aggregation-type {
1229 type aggregation-type;
1233 grouping monitoring-param-ui-data {
1239 description "A tag to group monitoring parameters";
1245 description "Defines the UI Display variant of measured counters.";
1246 type manotypes:widget-type;
1251 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1256 grouping monitoring-param-value {
1258 type param-value-type;
1262 container numeric-constraints {
1265 "Minimum value for the parameter";
1270 "Maximum value for the parameter";
1275 container text-constraints {
1278 "Minimum string length for the parameter";
1283 "Maximum string length for the parameter";
1288 leaf value-integer {
1290 "Current value for an integer parameter";
1294 leaf value-decimal {
1296 "Current value for a decimal parameter";
1304 "Current value for a string parameter";
1309 grouping control-param {
1310 list control-param {
1312 "List of control parameters to manage and
1313 update the running configuration of the VNF";
1317 description "Identifier for control parameter";
1322 description "Name of a control parameter";
1327 description "A description of the control parameter";
1332 description "A tag to group control parameters";
1338 "Minimum value for the parameter";
1344 "Maximum value for the parameter";
1348 leaf current-value {
1350 "Current value for the parameter";
1356 "Step value for the parameter";
1365 type manotypes:widget-type;
1370 "This is the URL where the operation should be performed.";
1377 "Method that the URI should perform.
1378 Default Action is POST";
1380 type manotypes:http-method;
1386 "This is the operation payload or payload template as stringified
1387 JSON. This field provides the data to be sent for this operation
1395 grouping action-param {
1398 "List of action parameters to
1414 description "A tag to group monitoring parameter";
1420 "This is the URL where to perform the operation";
1426 "This is the method to be performed at the uri.
1427 POST by default for action";
1429 type manotypes:http-method;
1435 "This is the operation payload or payload template to be sent in
1436 the data for this operation call";
1443 grouping input-parameter {
1444 description "List of input parameters that can be specified when instantiating a network service.";
1446 list input-parameter {
1448 "List of input parameters";
1455 "An xpath that specfies which element in a descriptor is to be
1462 "The value that the element specified by the xpath should take when a
1463 record is created.";
1469 grouping input-parameter-xpath {
1470 list input-parameter-xpath {
1472 "List of xpaths to parameters inside the NSD
1473 the can be customized during the instantiation.";
1478 "An xpath that specifies the element in a descriptor.";
1483 description "A descriptive string";
1487 leaf default-value {
1488 description "Default Value for the Input Parameter";
1494 grouping nfvi-metrics {
1498 "Label to show in UI";
1505 "The total number of VCPUs available.";
1511 "The VCPU utilization (percentage).";
1522 "Label to show in UI";
1529 "The amount of memory (bytes) currently in use.";
1535 "The amount of memory (bytes) available.";
1541 "The memory utilization (percentage).";
1552 "Label to show in UI";
1559 "The amount of storage (bytes) currently in use.";
1565 "The amount of storage (bytes) available.";
1571 "The storage utilization (percentage).";
1579 container external-ports {
1582 "Label to show in UI";
1584 default "EXTERNAL PORTS";
1589 "The total number of external ports.";
1594 container internal-ports {
1597 "Label to show in UI";
1599 default "INTERNAL PORTS";
1604 "The total number of internal ports.";
1612 "Label to show in UI";
1614 default "NETWORK TRAFFIC";
1617 container incoming {
1620 "Label to show in UI";
1622 default "INCOMING NETWORK TRAFFIC";
1627 "The cumulative number of incoming bytes.";
1633 "The cumulative number of incoming packets.";
1639 "The current incoming byte-rate (bytes per second).";
1647 "The current incoming packet (packets per second).";
1654 container outgoing {
1657 "Label to show in UI";
1659 default "OUTGOING NETWORK TRAFFIC";
1664 "The cumulative number of outgoing bytes.";
1670 "The cumulative number of outgoing packets.";
1676 "The current outgoing byte-rate (bytes per second).";
1684 "The current outgoing packet (packets per second).";
1693 typedef alarm-severity-type {
1694 description "An indication of the importance or urgency of the alarm";
1702 typedef alarm-metric-type {
1703 description "The type of metrics to register the alarm for";
1705 enum CPU_UTILIZATION;
1706 enum MEMORY_UTILIZATION;
1707 enum STORAGE_UTILIZATION;
1711 typedef alarm-statistic-type {
1713 "Statistic type to use to determine threshold crossing
1724 typedef alarm-operation-type {
1726 "The relational operator used to define whether an alarm
1727 should be triggered in certain scenarios, such as if the
1728 metric statistic goes above or below a specified value.";
1730 enum GE; // greater than or equal
1731 enum LE; // less than or equal
1732 enum GT; // greater than
1733 enum LT; // less than
1741 "This field is reserved for the identifier assigned by the VIM provider";
1747 description "A human readable string to identify the alarm";
1752 description "A description of this alarm";
1758 "The identifier of the VDUR that the alarm is associated with";
1770 list insufficient-data {
1787 "This flag indicates whether the alarm should be repeatedly emitted
1788 while the associated threshold has been crossed.";
1796 "This flag indicates whether the alarm has been enabled or
1804 description "A measure of the importance or urgency of the alarm";
1805 type alarm-severity-type;
1809 description "The metric to be tracked by this alarm.";
1810 type alarm-metric-type;
1814 description "The type of metric statistic that is tracked by this alarm";
1815 type alarm-statistic-type;
1820 "The relational operator used to define whether an alarm should be
1821 triggered in certain scenarios, such as if the metric statistic
1822 goes above or below a specified value.";
1823 type alarm-operation-type;
1828 "This value defines the threshold that, if crossed, will trigger
1837 "The period defines the length of time (seconds) that the metric
1838 data are collected over in oreder to evaluate the chosen
1845 "Defines the length of time (seconds) in which metric data are
1846 collected in order to evaluate the chosen statistic.";
1851 typedef cloud-account-type {
1852 description "VIM account type";
1856 enum cloudsim_proxy;
1865 grouping host-aggregate {
1866 list host-aggregate {
1867 description "Name of the Host Aggregate";
1872 "Name of the additional information attached to the host-aggregate";
1875 leaf metadata-value {
1877 "Value of the corresponding metadata-key";
1883 grouping placement-group-input {
1885 type manotypes:cloud-account-type;
1887 choice cloud-provider {
1889 container availability-zone {
1890 description "Name of the Availability Zone";
1895 container server-group {
1896 description "Name of the Affinity/Anti-Affinity Server Group";
1901 uses host-aggregate;
1904 leaf aws-construct {
1909 leaf openmano-construct {
1914 leaf vsphere-construct {
1919 leaf mock-construct {
1924 leaf cloudsim-construct {
1931 grouping cloud-config {
1934 description "Used to configure the list of public keys to be injected as part
1935 of ns instantiation";
1938 description "Name of this key pair";
1943 description "Key associated with this key pair";
1950 description "List of users to be added through cloud-config";
1953 description "Name of the user ";
1958 description "The user name's real name";
1964 description "Used to configure the list of public keys to be injected as part
1965 of ns instantiation";
1968 description "Name of this key pair";
1973 description "Key associated with this key pair";
1980 grouping placement-group-info {
1985 "Place group construct to define the compute resource placement strategy
1986 in cloud environment";
1991 description "This is free text space used to describe the intent/rationale
1992 behind this placement group. This is for human consumption only";
1998 "Strategy associated with this placement group
1999 Following values are possible
2000 - COLOCATION: Colocation strategy imply intent to share the physical
2001 infrastructure (hypervisor/network) among all members
2003 - ISOLATION: Isolation strategy imply intent to not share the physical
2004 infrastructure (hypervisor/network) among the members
2011 default "COLOCATION";
2015 grouping ip-profile-info {
2016 description "Grouping for IP-Profile";
2017 container ip-profile-params {
2020 type inet:ip-version;
2024 leaf subnet-address {
2025 description "Subnet IP prefix associated with IP Profile";
2026 type inet:ip-prefix;
2029 leaf gateway-address {
2030 description "IP Address of the default gateway associated with IP Profile";
2031 type inet:ip-address;
2034 leaf security-group {
2035 description "Name of the security group";
2042 description "List of DNS Servers associated with IP Profile";
2043 type inet:ip-address;
2047 container dhcp-params {
2049 description "This flag indicates if DHCP is enabled or not";
2054 leaf start-address {
2055 description "Start IP address of the IP-Address range associated with DHCP domain";
2056 type inet:ip-address;
2060 description "Size of the DHCP pool associated with DHCP domain";
2065 leaf subnet-prefix-pool {
2066 description "VIM Specific reference to pre-created subnet prefix";
2072 grouping ip-profile-list {
2075 "List of IP Profiles.
2076 IP Profile describes the IP characteristics for the Virtual-Link";
2081 description "Name of the IP-Profile";
2086 description "Description for IP profile";
2090 uses ip-profile-info;
2094 grouping config-file {
2095 description "Grouping for files needed to be mounted into an additional drive";
2098 "List of configuration files to be written on an additional drive";
2101 description "Name of the configuration file";
2105 description "Full path of the destination in the guest";
2111 grouping supplemental-boot-data {
2112 description "Grouping for custom vim data";
2113 container supplemental-boot-data {
2114 uses manotypes:config-file;
2115 leaf boot-data-drive {
2116 description "Some VIMs implement additional drives to host config-files or meta-data";
2123 grouping volume-info {
2124 description "Grouping for Volume-info";
2127 description "Description for Volume";
2132 description "Size of disk in GB";
2136 choice volume-source {
2138 "Defines the source of the volume. Possible options are
2139 1. Ephemeral -- Empty disk
2140 2. Image -- Refer to image to be used for volume
2141 3. Volume -- Reference of pre-existing volume to be used
2151 uses image-properties;
2156 description "Type of disk-bus on which this disk is exposed to guest";
2166 description "The type of device as exposed to guest";
2176 grouping rpc-project-name {
2180 "Project to which this belongs";
2182 path "/rw-project:project/rw-project:name";