4 * Copyright 2016 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 "Initial revision. This YANG file defines
37 the reusable base types for VNF Management
38 and Orchestration (MANO).";
40 "Derived from earlier versions of base YANG files";
43 typedef package-type {
44 description "Type of descriptor being on-boarded";
51 typedef parameter-data-type {
59 grouping primitive-parameter-value {
62 "List of parameters to the configuration primitive.";
66 "Name of the parameter.";
72 "Value associated with the name.";
78 grouping primitive-parameter {
81 "Name of the parameter.";
87 "Data type associated with the name.";
88 type manotypes:parameter-data-type;
92 description "Is this field mandatory";
98 description "The default value for this field";
102 leaf parameter-pool {
103 description "NSD parameter pool name to use for this parameter";
109 "The value should be dimmed by the UI.
110 Only applies to parameters with default values.";
116 "The value should be hidden by the UI.
117 Only applies to parameters with default values.";
122 grouping ui-primitive-group {
123 list parameter-group {
125 "Grouping of parameters which are logically grouped in UI";
130 "Name of the parameter group";
136 "List of parameters for the service primitive.";
138 uses manotypes:primitive-parameter;
142 description "Is this parameter group mandatory";
149 grouping image-properties {
152 "Image name for the software image.
153 If the image name is found within the VNF package it will
154 be uploaded to all VIM accounts during onboarding process.
155 Otherwise, the image must be added to the VIM account with
156 the same name as entered here.
161 leaf image-checksum {
163 "Image md5sum for the software image.
164 The md5sum, if provided, along with the image name uniquely
165 identifies an image uploaded to the CAL.
170 grouping initial-config {
173 "Sequence number for the configuration primitive.";
179 "Name of the configuration primitive.";
184 leaf user-defined-script {
186 "A user defined script.";
197 description "Value of the configuration primitive.";
203 grouping vnf-configuration {
204 container vnf-configuration {
205 rwpb:msg-new VnfConfiguration;
207 "Information about the VNF configuration. Note:
208 If the NS contains multiple instances of the
209 same VNF, each instance could have a different
212 choice config-method {
214 "Defines the configuration method for the VNF.";
217 "Use custom script for configuring the VNF.
218 This script is executed in the context of
219 Orchestrator (The same system and environment
224 "Script type - currently supported : python";
234 "Configure the VNF through Juju.";
237 description "Juju charm to use with the VNF.";
244 container config-attributes {
246 "Miscellaneous input parameters to be considered
247 while processing the NSD to apply configuration";
249 leaf config-priority {
251 "Configuration priority - order of configuration
252 to be applied to each VNF in this NS. A low
253 number takes precedence over a high number";
259 "Wait (seconds) before applying the configuration to VNF";
264 list service-primitive {
265 rwpb:msg-new ServicePrimitive;
267 "List of service primitives supported by the
268 configuration agent for this VNF.";
273 "Name of the service primitive.";
279 "List of parameters to the service primitive.";
281 uses primitive-parameter;
285 list initial-config-primitive {
286 rwpb:msg-new InitialConfigPrimitive;
288 "Initial set of configuration primitives.";
293 } // END - grouping vnf-configuration
295 typedef virtual-link-type {
297 "Type of virtual link
298 ELAN: A multipoint service connecting a set of VNFs
299 // ELINE: For a simple point to point connection
300 // between a VNF and the existing network.
301 // ETREE: A multipoint service connecting one or
302 // more roots and a set of leaves, but
303 // preventing inter-leaf communication.";
311 grouping named-value {
321 typedef http-method {
323 "Type of HTTP operation";
337 "Type of API to fetch monitoring parameters";
346 typedef json-query-method {
348 "The method to extract a value from a JSON response
350 NAMEKEY - Use the name as the key for a non-nested value.
351 JSONPATH - Use jsonpath-rw implementation to extract a value.
352 OBJECTPATH - Use objectpath implementation to extract a value.";
360 typedef param-value-type {
362 "The type of the parameter value";
370 typedef connection-point-type {
372 "Type of connection point
374 // VNIC_ADDR: Virtual NIC Address
375 // PNIC_ADDR: Physical NIC Address
376 // PPORT: Physical Port.";
383 typedef widget-type {
385 "Type of the widget, typically used by the UI.";
396 typedef cpu-feature-type {
398 "Enumeration for CPU features.
400 AES: CPU supports advanced instruction set for
401 AES (Advanced Encryption Standard).
403 CAT: Cache Allocation Technology (CAT) allows
404 an Operating System, Hypervisor, or similar
405 system management agent to specify the amount
406 of L3 cache (currently the last-level cache
407 in most server and client platforms) space an
408 application can fill (as a hint to hardware
409 functionality, certain features such as power
410 management may override CAT settings).
412 CMT: Cache Monitoring Technology (CMT) allows
413 an Operating System, Hypervisor, or similar
414 system management agent to determine the
415 usage of cache based on applications running
416 on the platform. The implementation is
417 directed at L3 cache monitoring (currently
418 the last-level cache in most server and
421 DDIO: Intel Data Direct I/O (DDIO) enables
422 Ethernet server NICs and controllers talk
423 directly to the processor cache without a
424 detour via system memory. This enumeration
425 specifies if the VM requires a DDIO
469 enum REQUIRE_CLFLUSH;
497 enum REQUIRE_PCLMULQDQ;
498 enum PREFER_PCLMULQDQ;
501 enum REQUIRE_MONITOR;
539 enum REQUIRE_TSC_DEADLINE_TIMER;
540 enum PREFER_TSC_DEADLINE_TIMER;
549 enum REQUIRE_FSGSBASE;
550 enum PREFER_FSGSBASE;
563 enum REQUIRE_INVPCID;
579 container vm-flavor {
582 "Number of VCPUs for the VM.";
588 "Amount of memory in MB.";
594 "Amount of disk space in GB.";
598 } //grouping vm-flavor
600 grouping vswitch-epa {
601 container vswitch-epa {
602 leaf ovs-acceleration {
604 "Specifies Open vSwitch acceleration mode.
605 MANDATORY: OVS acceleration is required
606 PREFERRED: OVS acceleration is preferred";
616 "Specifies Open vSwitch hardware offload mode.
617 MANDATORY: OVS offload is required
618 PREFERRED: OVS offload is preferred";
628 grouping hypervisor-epa {
629 container hypervisor-epa {
632 "Specifies the type of hypervisor.
648 description "Specifies the host level EPA attributes.";
651 "Host CPU model. Examples include: SandyBridge,
654 enum PREFER_WESTMERE;
655 enum REQUIRE_WESTMERE;
656 enum PREFER_SANDYBRIDGE;
657 enum REQUIRE_SANDYBRIDGE;
658 enum PREFER_IVYBRIDGE;
659 enum REQUIRE_IVYBRIDGE;
661 enum REQUIRE_HASWELL;
662 enum PREFER_BROADWELL;
663 enum REQUIRE_BROADWELL;
665 enum REQUIRE_NEHALEM;
670 enum PREFER_CORE2DUO;
671 enum REQUIRE_CORE2DUO;
676 description "Host CPU architecture.";
694 description "Host CPU Vendor.";
703 leaf cpu-socket-count {
704 description "Number of sockets on the host.";
708 leaf cpu-core-count {
709 description "Number of cores on the host.";
713 leaf cpu-core-thread-count {
714 description "Number of threads per cores on the host.";
720 description "List of CPU features.";
722 description "CPU feature.";
723 type cpu-feature-type;
728 leaf om-cpu-model-string {
729 description "OpenMANO CPU model string";
733 list om-cpu-feature {
735 description "List of OpenMANO CPU features";
737 description "CPU feature";
745 description "EPA attributes for the guest";
746 container guest-epa {
747 leaf trusted-execution {
748 description "This VM should be allocated from trusted pool";
754 "Memory page allocation size. If a VM requires
755 hugepages, it should choose LARGE or SIZE_2MB
756 or SIZE_1GB. If the VM prefers hugepages it
757 should choose PREFER_LARGE.
758 LARGE : Require hugepages (either 2MB or 1GB)
759 SMALL : Doesn't require hugepages
760 SIZE_2MB : Requires 2MB hugepages
761 SIZE_1GB : Requires 1GB hugepages
762 PREFER_LARGE : Application prefers hugepages";
772 leaf cpu-pinning-policy {
774 "CPU pinning policy describes association
775 between virtual CPUs in guest and the
776 physical CPUs in the host.
777 DEDICATED : Virtual CPUs are pinned to
779 SHARED : Multiple VMs may share the
781 ANY : Any policy is acceptable for the VM";
790 leaf cpu-thread-pinning-policy {
792 "CPU thread pinning policy describes how to
793 place the guest CPUs when the host supports
795 AVOID : Avoids placing a guest on a host
797 SEPARATE: Places vCPUs on separate cores,
798 and avoids placing two vCPUs on
799 two threads of same core.
800 ISOLATE : Places each vCPU on a different core,
801 and places no vCPUs from a different
802 guest on the same core.
803 PREFER : Attempts to place vCPUs on threads
815 "List of pcie passthrough devices.";
819 "Device identifier.";
824 "Number of devices to attach to the VM.";
837 container numa-node-policy {
839 "This policy defines NUMA topology of the
840 guest. Specifically identifies if the guest
841 should be run on a host with one NUMA
842 node or multiple NUMA nodes. As an example
843 a guest might need 8 VCPUs and 4 GB of
844 memory. However, it might need the VCPUs
845 and memory distributed across multiple
846 NUMA nodes. In this scenario, NUMA node
847 1 could run with 6 VCPUs and 3GB, and
848 NUMA node 2 could run with 2 VCPUs and
853 "The number of NUMA nodes to expose to the VM.";
859 "This policy specifies how the memory should
860 be allocated in a multi-node scenario.
861 STRICT : The memory must be allocated
862 strictly from the memory attached
864 PREFERRED : The memory should be allocated
865 preferentially from the memory
866 attached to the NUMA node";
877 "NUMA node identification. Typically
885 "List of VCPUs to allocate on
889 description "List of VCPUs ids to allocate on
896 "Memory size expressed in MB
897 for this NUMA node.";
901 choice om-numa-type {
903 "OpenMANO Numa type selection";
911 case paired-threads {
912 container paired-threads {
913 leaf num-paired-threads {
917 list paired-thread-ids {
919 "List of thread pairs to use in case of paired-thread NUMA";
947 grouping provider-network {
948 container provider-network {
949 description "Container for the provider network.";
950 leaf physical-network {
952 "Name of the physical network on which the provider
959 "Type of the overlay network.
960 LOCAL - Provider network implemented in a single compute node
961 FLAT - Provider network shared by all tenants
962 VLAN - Provider network implemented using 802.1Q tagging
963 VXLAN - Provider networks implemented using RFC 7348
964 GRE - Provider networks implemented using GRE tunnels";
973 leaf segmentation_id {
975 "ID of segregated virtual networks";
981 grouping monitoring-param {
984 "List of http endpoints to be used by monitoring params";
988 description "The HTTP path on the management server";
993 description "Pick HTTPS instead of HTTP , Default is false";
999 description "The HTTP port to connect to";
1000 type inet:port-number;
1004 description "The HTTP basic auth username";
1009 description "The HTTP basic auth password";
1013 leaf polling-interval-secs {
1014 description "The HTTP polling interval in seconds";
1021 "Method that the URI should perform.
1022 Deafult action is GET.";
1024 type manotypes:http-method;
1029 description "Custom HTTP headers to put on HTTP request";
1032 description "HTTP header key";
1037 description "HTTP header value";
1043 list monitoring-param {
1045 "List of monitoring parameters at the network service level";
1055 leaf http-endpoint-ref {
1057 path "../../http-endpoint/path";
1061 leaf json-query-method {
1062 type json-query-method;
1066 container json-query-params {
1069 "The jsonpath to use to extract value from JSON structure";
1074 "The objectpath to use to extract value from JSON structure";
1079 uses monitoring-param-ui-data;
1080 uses monitoring-param-value;
1085 grouping monitoring-param-aggregation {
1086 typedef aggregation-type {
1087 description "aggregation-type";
1097 leaf aggregation-type {
1098 type aggregation-type;
1102 grouping monitoring-param-ui-data {
1108 description "A tag to group monitoring parameters";
1114 description "Defines the UI Display variant of measured counters.";
1115 type manotypes:widget-type;
1119 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1124 grouping monitoring-param-value {
1126 type param-value-type;
1130 container numeric-constraints {
1133 "Minimum value for the parameter";
1138 "Maximum value for the parameter";
1143 container text-constraints {
1146 "Minimum string length for the parameter";
1151 "Maximum string length for the parameter";
1156 leaf value-integer {
1158 "Current value for an integer parameter";
1162 leaf value-decimal {
1164 "Current value for a decimal parameter";
1172 "Current value for a string parameter";
1177 grouping control-param {
1178 list control-param {
1180 "List of control parameters to manage and
1181 update the running configuration of the VNF";
1185 description "Identifier for control parameter";
1190 description "Name of a control parameter";
1195 description "A description of the control parameter";
1200 description "A tag to group control parameters";
1206 "Minimum value for the parameter";
1212 "Maximum value for the parameter";
1216 leaf current-value {
1218 "Current value for the parameter";
1224 "Step value for the parameter";
1233 type manotypes:widget-type;
1238 "This is the URL where the operation should be performed.";
1245 "Method that the URI should perform.
1246 Default Action is POST";
1248 type manotypes:http-method;
1254 "This is the operation payload or payload template as stringified
1255 JSON. This field provides the data to be sent for this operation
1263 grouping action-param {
1266 "List of action parameters to
1282 description "A tag to group monitoring parameter";
1288 "This is the URL where to perform the operation";
1294 "This is the method to be performed at the uri.
1295 POST by default for action";
1297 type manotypes:http-method;
1303 "This is the operation payload or payload template to be sent in
1304 the data for this operation call";
1311 grouping input-parameter {
1312 description "List of input parameters that can be specified when instantiating a network service.";
1314 list input-parameter {
1316 "List of input parameters";
1323 "An xpath that specfies which element in a descriptor is to be
1330 "The value that the element specified by the xpath should take when a
1331 record is created.";
1337 grouping input-parameter-xpath {
1338 list input-parameter-xpath {
1340 "List of xpaths to parameters inside the NSD
1341 the can be customized during the instantiation.";
1346 "An xpath that specifies the element in a descriptor.";
1351 description "A descriptive string";
1355 leaf default-value {
1356 description "/nsd:nsd-catalog/nsd:nsd/nsd:vendor";
1362 grouping nfvi-metrics {
1366 "Label to show in UI";
1373 "The total number of VCPUs available.";
1379 "The VCPU utilization (percentage).";
1390 "Label to show in UI";
1397 "The amount of memory (bytes) currently in use.";
1403 "The amount of memory (bytes) available.";
1409 "The memory utilization (percentage).";
1420 "Label to show in UI";
1427 "The amount of storage (bytes) currently in use.";
1433 "The amount of storage (bytes) available.";
1439 "The storage utilization (percentage).";
1447 container external-ports {
1450 "Label to show in UI";
1452 default "EXTERNAL PORTS";
1457 "The total number of external ports.";
1462 container internal-ports {
1465 "Label to show in UI";
1467 default "INTERNAL PORTS";
1472 "The total number of internal ports.";
1480 "Label to show in UI";
1482 default "NETWORK TRAFFIC";
1485 container incoming {
1488 "Label to show in UI";
1490 default "INCOMING NETWORK TRAFFIC";
1495 "The cumulative number of incoming bytes.";
1501 "The cumulative number of incoming packets.";
1507 "The current incoming byte-rate (bytes per second).";
1515 "The current incoming packet (packets per second).";
1522 container outgoing {
1525 "Label to show in UI";
1527 default "OUTGOING NETWORK TRAFFIC";
1532 "The cumulative number of outgoing bytes.";
1538 "The cumulative number of outgoing packets.";
1544 "The current outgoing byte-rate (bytes per second).";
1552 "The current outgoing packet (packets per second).";
1561 typedef alarm-severity-type {
1562 description "An indication of the importance or urgency of the alarm";
1570 typedef alarm-metric-type {
1571 description "The type of metrics to register the alarm for";
1573 enum CPU_UTILIZATION;
1574 enum MEMORY_UTILIZATION;
1575 enum STORAGE_UTILIZATION;
1579 typedef alarm-statistic-type {
1581 "Statistic type to use to determine threshold crossing
1592 typedef alarm-operation-type {
1594 "The relational operator used to define whether an alarm
1595 should be triggered in certain scenarios, such as if the
1596 metric statistic goes above or below a specified value.";
1598 enum GE; // greater than or equal
1599 enum LE; // less than or equal
1600 enum GT; // greater than
1601 enum LT; // less than
1609 "This field is reserved for the identifier assigned by the VIM provider";
1615 description "A human readable string to identify the alarm";
1620 description "A description of this alarm";
1626 "The identifier of the VDUR that the alarm is associated with";
1638 list insufficient-data {
1655 "This flag indicates whether the alarm should be repeatedly emitted
1656 while the associated threshold has been crossed.";
1664 "This flag indicates whether the alarm has been enabled or
1672 description "A measure of the importance or urgency of the alarm";
1673 type alarm-severity-type;
1677 description "The metric to be tracked by this alarm.";
1678 type alarm-metric-type;
1682 description "The type of metric statistic that is tracked by this alarm";
1683 type alarm-statistic-type;
1688 "The relational operator used to define whether an alarm should be
1689 triggered in certain scenarios, such as if the metric statistic
1690 goes above or below a specified value.";
1691 type alarm-operation-type;
1696 "This value defines the threshold that, if crossed, will trigger
1705 "The period defines the length of time (seconds) that the metric
1706 data are collected over in oreder to evaluate the chosen
1713 "Defines the length of time (seconds) in which metric data are
1714 collected in order to evaluate the chosen statistic.";
1719 typedef cloud-account-type {
1720 description "VIM account type";
1724 enum cloudsim_proxy;
1733 grouping host-aggregate {
1734 list host-aggregate {
1735 description "Name of the Host Aggregate";
1740 "Name of the additional information attached to the host-aggregate";
1743 leaf metadata-value {
1745 "Value of the corresponding metadata-key";
1751 grouping placement-group-input {
1753 type manotypes:cloud-account-type;
1755 choice cloud-provider {
1757 container availability-zone {
1758 description "Name of the Availability Zone";
1763 container server-group {
1764 description "Name of the Affinity/Anti-Affinity Server Group";
1769 uses host-aggregate;
1772 leaf aws-construct {
1777 leaf openmano-construct {
1782 leaf vsphere-construct {
1787 leaf mock-construct {
1792 leaf cloudsim-construct {
1799 grouping placement-group-info {
1804 "Place group construct to define the compute resource placement strategy
1805 in cloud environment";
1810 description "This is free text space used to describe the intent/rationale
1811 behind this placement group. This is for human consumption only";
1817 "Strategy associated with this placement group
1818 Following values are possible
1819 - COLOCATION: Colocation strategy imply intent to share the physical
1820 infrastructure (hypervisor/network) among all members
1822 - ISOLATION: Isolation strategy imply intent to not share the physical
1823 infrastructure (hypervisor/network) among the members
1830 default "COLOCATION";
1834 grouping ip-profile-info {
1835 description "Grouping for IP-Profile";
1836 container ip-profile-params {
1839 type inet:ip-version;
1843 leaf subnet-address {
1844 description "Subnet IP prefix associated with IP Profile";
1845 type inet:ip-prefix;
1848 leaf gateway-address {
1849 description "IP Address of the default gateway associated with IP Profile";
1850 type inet:ip-address;
1853 leaf security-group {
1854 description "Name of the security group";
1861 description "List of DNS Servers associated with IP Profile";
1862 type inet:ip-address;
1866 container dhcp-params {
1868 description "This flag indicates if DHCP is enabled or not";
1873 leaf start-address {
1874 description "Start IP address of the IP-Address range associated with DHCP domain";
1875 type inet:ip-address;
1879 description "Size of the DHCP pool associated with DHCP domain";
1884 leaf subnet-prefix-pool {
1885 description "VIM Specific reference to pre-created subnet prefix";
1891 grouping ip-profile-list {
1894 "List of IP Profiles.
1895 IP Profile describes the IP characteristics for the Virtual-Link";
1900 description "Name of the IP-Profile";
1905 description "Description for IP profile";
1909 uses ip-profile-info;
1913 grouping config-file {
1914 description "Grouping for files needed to be mounted into an additional drive";
1917 "List of configuration files to be written on an additional drive";
1920 description "Name of the configuration file";
1924 description "Full path of the destination in the guest";
1930 grouping supplemental-boot-data {
1931 description "Grouping for custom vim data";
1932 container supplemental-boot-data {
1933 uses manotypes:config-file;
1934 leaf boot-data-drive {
1935 description "Some VIMs implement additional drives to host config-files or meta-data";
1942 grouping volume-info {
1943 description "Grouping for Volume-info";
1946 description "Description for Volume";
1951 description "Size of disk in GB";
1955 choice volume-source {
1957 "Defines the source of the volume. Possible options are
1958 1. Ephemeral -- Empty disk
1959 2. Image -- Refer to image to be used for volume
1960 3. Volume -- Reference of pre-existing volume to be used
1970 uses image-properties;
1976 description "Type of disk-bus on which this disk is exposed to guest";
1986 description "The type of device as exposed to guest";