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 - Scripts confirming to Rift CA plugin";
234 "Configure the VNF through Juju.";
237 description "Juju charm to use with the VNF.";
244 list service-primitive {
245 rwpb:msg-new ServicePrimitive;
247 "List of service primitives supported by the
248 configuration agent for this VNF.";
253 "Name of the service primitive.";
259 "List of parameters to the service primitive.";
261 uses primitive-parameter;
265 list initial-config-primitive {
266 rwpb:msg-new InitialConfigPrimitive;
268 "Initial set of configuration primitives.";
273 } // END - grouping vnf-configuration
275 typedef virtual-link-type {
277 "Type of virtual link
278 ELAN: A multipoint service connecting a set of VNFs
279 // ELINE: For a simple point to point connection
280 // between a VNF and the existing network.
281 // ETREE: A multipoint service connecting one or
282 // more roots and a set of leaves, but
283 // preventing inter-leaf communication.";
291 grouping named-value {
301 typedef http-method {
303 "Type of HTTP operation";
317 "Type of API to fetch monitoring parameters";
326 typedef json-query-method {
328 "The method to extract a value from a JSON response
330 NAMEKEY - Use the name as the key for a non-nested value.
331 JSONPATH - Use jsonpath-rw implementation to extract a value.
332 OBJECTPATH - Use objectpath implementation to extract a value.";
340 typedef param-value-type {
342 "The type of the parameter value";
350 typedef connection-point-type {
352 "Type of connection point
354 // VNIC_ADDR: Virtual NIC Address
355 // PNIC_ADDR: Physical NIC Address
356 // PPORT: Physical Port.";
363 typedef widget-type {
365 "Type of the widget, typically used by the UI.";
376 typedef cpu-feature-type {
378 "Enumeration for CPU features.
380 AES: CPU supports advanced instruction set for
381 AES (Advanced Encryption Standard).
383 CAT: Cache Allocation Technology (CAT) allows
384 an Operating System, Hypervisor, or similar
385 system management agent to specify the amount
386 of L3 cache (currently the last-level cache
387 in most server and client platforms) space an
388 application can fill (as a hint to hardware
389 functionality, certain features such as power
390 management may override CAT settings).
392 CMT: Cache Monitoring Technology (CMT) allows
393 an Operating System, Hypervisor, or similar
394 system management agent to determine the
395 usage of cache based on applications running
396 on the platform. The implementation is
397 directed at L3 cache monitoring (currently
398 the last-level cache in most server and
401 DDIO: Intel Data Direct I/O (DDIO) enables
402 Ethernet server NICs and controllers talk
403 directly to the processor cache without a
404 detour via system memory. This enumeration
405 specifies if the VM requires a DDIO
449 enum REQUIRE_CLFLUSH;
477 enum REQUIRE_PCLMULQDQ;
478 enum PREFER_PCLMULQDQ;
481 enum REQUIRE_MONITOR;
519 enum REQUIRE_TSC_DEADLINE_TIMER;
520 enum PREFER_TSC_DEADLINE_TIMER;
529 enum REQUIRE_FSGSBASE;
530 enum PREFER_FSGSBASE;
543 enum REQUIRE_INVPCID;
559 container vm-flavor {
562 "Number of VCPUs for the VM.";
568 "Amount of memory in MB.";
574 "Amount of disk space in GB.";
578 } //grouping vm-flavor
580 grouping vswitch-epa {
581 container vswitch-epa {
582 leaf ovs-acceleration {
584 "Specifies Open vSwitch acceleration mode.
585 MANDATORY: OVS acceleration is required
586 PREFERRED: OVS acceleration is preferred";
596 "Specifies Open vSwitch hardware offload mode.
597 MANDATORY: OVS offload is required
598 PREFERRED: OVS offload is preferred";
608 grouping hypervisor-epa {
609 container hypervisor-epa {
612 "Specifies the type of hypervisor.
628 description "Specifies the host level EPA attributes.";
631 "Host CPU model. Examples include: SandyBridge,
634 enum PREFER_WESTMERE;
635 enum REQUIRE_WESTMERE;
636 enum PREFER_SANDYBRIDGE;
637 enum REQUIRE_SANDYBRIDGE;
638 enum PREFER_IVYBRIDGE;
639 enum REQUIRE_IVYBRIDGE;
641 enum REQUIRE_HASWELL;
642 enum PREFER_BROADWELL;
643 enum REQUIRE_BROADWELL;
645 enum REQUIRE_NEHALEM;
650 enum PREFER_CORE2DUO;
651 enum REQUIRE_CORE2DUO;
656 description "Host CPU architecture.";
674 description "Host CPU Vendor.";
683 leaf cpu-socket-count {
684 description "Number of sockets on the host.";
688 leaf cpu-core-count {
689 description "Number of cores on the host.";
693 leaf cpu-core-thread-count {
694 description "Number of threads per cores on the host.";
700 description "List of CPU features.";
702 description "CPU feature.";
703 type cpu-feature-type;
708 leaf om-cpu-model-string {
709 description "OpenMANO CPU model string";
713 list om-cpu-feature {
715 description "List of OpenMANO CPU features";
717 description "CPU feature";
725 description "EPA attributes for the guest";
726 container guest-epa {
727 leaf trusted-execution {
728 description "This VM should be allocated from trusted pool";
734 "Memory page allocation size. If a VM requires
735 hugepages, it should choose LARGE or SIZE_2MB
736 or SIZE_1GB. If the VM prefers hugepages it
737 should choose PREFER_LARGE.
738 LARGE : Require hugepages (either 2MB or 1GB)
739 SMALL : Doesn't require hugepages
740 SIZE_2MB : Requires 2MB hugepages
741 SIZE_1GB : Requires 1GB hugepages
742 PREFER_LARGE : Application prefers hugepages";
752 leaf cpu-pinning-policy {
754 "CPU pinning policy describes association
755 between virtual CPUs in guest and the
756 physical CPUs in the host.
757 DEDICATED : Virtual CPUs are pinned to
759 SHARED : Multiple VMs may share the
761 ANY : Any policy is acceptable for the VM";
770 leaf cpu-thread-pinning-policy {
772 "CPU thread pinning policy describes how to
773 place the guest CPUs when the host supports
775 AVOID : Avoids placing a guest on a host
777 SEPARATE: Places vCPUs on separate cores,
778 and avoids placing two vCPUs on
779 two threads of same core.
780 ISOLATE : Places each vCPU on a different core,
781 and places no vCPUs from a different
782 guest on the same core.
783 PREFER : Attempts to place vCPUs on threads
795 "List of pcie passthrough devices.";
799 "Device identifier.";
804 "Number of devices to attach to the VM.";
817 container numa-node-policy {
819 "This policy defines NUMA topology of the
820 guest. Specifically identifies if the guest
821 should be run on a host with one NUMA
822 node or multiple NUMA nodes. As an example
823 a guest might need 8 VCPUs and 4 GB of
824 memory. However, it might need the VCPUs
825 and memory distributed across multiple
826 NUMA nodes. In this scenario, NUMA node
827 1 could run with 6 VCPUs and 3GB, and
828 NUMA node 2 could run with 2 VCPUs and
833 "The number of NUMA nodes to expose to the VM.";
839 "This policy specifies how the memory should
840 be allocated in a multi-node scenario.
841 STRICT : The memory must be allocated
842 strictly from the memory attached
844 PREFERRED : The memory should be allocated
845 preferentially from the memory
846 attached to the NUMA node";
857 "NUMA node identification. Typically
865 "List of VCPUs to allocate on
869 description "List of VCPUs ids to allocate on
876 "Memory size expressed in MB
877 for this NUMA node.";
881 choice om-numa-type {
883 "OpenMANO Numa type selection";
891 case paired-threads {
892 container paired-threads {
893 leaf num-paired-threads {
897 list paired-thread-ids {
899 "List of thread pairs to use in case of paired-thread NUMA";
927 grouping provider-network {
928 container provider-network {
929 description "Container for the provider network.";
930 leaf physical-network {
932 "Name of the physical network on which the provider
939 "Type of the overlay network.
940 LOCAL - Provider network implemented in a single compute node
941 FLAT - Provider network shared by all tenants
942 VLAN - Provider network implemented using 802.1Q tagging
943 VXLAN - Provider networks implemented using RFC 7348
944 GRE - Provider networks implemented using GRE tunnels";
953 leaf segmentation_id {
955 "ID of segregated virtual networks";
961 grouping monitoring-param {
964 "List of http endpoints to be used by monitoring params";
968 description "The HTTP path on the management server";
973 description "Pick HTTPS instead of HTTP , Default is false";
979 description "The HTTP port to connect to";
980 type inet:port-number;
984 description "The HTTP basic auth username";
989 description "The HTTP basic auth password";
993 leaf polling-interval-secs {
994 description "The HTTP polling interval in seconds";
1001 "Method that the URI should perform.
1002 Deafult action is GET.";
1004 type manotypes:http-method;
1009 description "Custom HTTP headers to put on HTTP request";
1012 description "HTTP header key";
1017 description "HTTP header value";
1023 list monitoring-param {
1025 "List of monitoring parameters at the network service level";
1035 leaf http-endpoint-ref {
1037 path "../../http-endpoint/path";
1041 leaf json-query-method {
1042 type json-query-method;
1046 container json-query-params {
1049 "The jsonpath to use to extract value from JSON structure";
1054 "The objectpath to use to extract value from JSON structure";
1059 uses monitoring-param-ui-data;
1060 uses monitoring-param-value;
1065 grouping monitoring-param-aggregation {
1066 typedef aggregation-type {
1067 description "aggregation-type";
1077 leaf aggregation-type {
1078 type aggregation-type;
1082 grouping monitoring-param-ui-data {
1088 description "A tag to group monitoring parameters";
1094 description "Defines the UI Display variant of measured counters.";
1095 type manotypes:widget-type;
1099 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1104 grouping monitoring-param-value {
1106 type param-value-type;
1110 container numeric-constraints {
1113 "Minimum value for the parameter";
1118 "Maximum value for the parameter";
1123 container text-constraints {
1126 "Minimum string length for the parameter";
1131 "Maximum string length for the parameter";
1136 leaf value-integer {
1138 "Current value for an integer parameter";
1142 leaf value-decimal {
1144 "Current value for a decimal parameter";
1152 "Current value for a string parameter";
1157 grouping control-param {
1158 list control-param {
1160 "List of control parameters to manage and
1161 update the running configuration of the VNF";
1165 description "Identifier for control parameter";
1170 description "Name of a control parameter";
1175 description "A description of the control parameter";
1180 description "A tag to group control parameters";
1186 "Minimum value for the parameter";
1192 "Maximum value for the parameter";
1196 leaf current-value {
1198 "Current value for the parameter";
1204 "Step value for the parameter";
1213 type manotypes:widget-type;
1218 "This is the URL where the operation should be performed.";
1225 "Method that the URI should perform.
1226 Default Action is POST";
1228 type manotypes:http-method;
1234 "This is the operation payload or payload template as stringified
1235 JSON. This field provides the data to be sent for this operation
1243 grouping action-param {
1246 "List of action parameters to
1262 description "A tag to group monitoring parameter";
1268 "This is the URL where to perform the operation";
1274 "This is the method to be performed at the uri.
1275 POST by default for action";
1277 type manotypes:http-method;
1283 "This is the operation payload or payload template to be sent in
1284 the data for this operation call";
1291 grouping input-parameter {
1292 description "List of input parameters that can be specified when instantiating a network service.";
1294 list input-parameter {
1296 "List of input parameters";
1303 "An xpath that specfies which element in a descriptor is to be
1310 "The value that the element specified by the xpath should take when a
1311 record is created.";
1317 grouping input-parameter-xpath {
1318 list input-parameter-xpath {
1320 "List of xpaths to parameters inside the NSD
1321 the can be customized during the instantiation.";
1326 "An xpath that specifies the element in a descriptor.";
1331 description "A descriptive string";
1335 leaf default-value {
1336 description "/nsd:nsd-catalog/nsd:nsd/nsd:vendor";
1342 grouping nfvi-metrics {
1346 "Label to show in UI";
1353 "The total number of VCPUs available.";
1359 "The VCPU utilization (percentage).";
1370 "Label to show in UI";
1377 "The amount of memory (bytes) currently in use.";
1383 "The amount of memory (bytes) available.";
1389 "The memory utilization (percentage).";
1400 "Label to show in UI";
1407 "The amount of storage (bytes) currently in use.";
1413 "The amount of storage (bytes) available.";
1419 "The storage utilization (percentage).";
1427 container external-ports {
1430 "Label to show in UI";
1432 default "EXTERNAL PORTS";
1437 "The total number of external ports.";
1442 container internal-ports {
1445 "Label to show in UI";
1447 default "INTERNAL PORTS";
1452 "The total number of internal ports.";
1460 "Label to show in UI";
1462 default "NETWORK TRAFFIC";
1465 container incoming {
1468 "Label to show in UI";
1470 default "INCOMING NETWORK TRAFFIC";
1475 "The cumulative number of incoming bytes.";
1481 "The cumulative number of incoming packets.";
1487 "The current incoming byte-rate (bytes per second).";
1495 "The current incoming packet (packets per second).";
1502 container outgoing {
1505 "Label to show in UI";
1507 default "OUTGOING NETWORK TRAFFIC";
1512 "The cumulative number of outgoing bytes.";
1518 "The cumulative number of outgoing packets.";
1524 "The current outgoing byte-rate (bytes per second).";
1532 "The current outgoing packet (packets per second).";
1541 typedef alarm-severity-type {
1542 description "An indication of the importance or urgency of the alarm";
1550 typedef alarm-metric-type {
1551 description "The type of metrics to register the alarm for";
1553 enum CPU_UTILIZATION;
1554 enum MEMORY_UTILIZATION;
1555 enum STORAGE_UTILIZATION;
1559 typedef alarm-statistic-type {
1561 "Statistic type to use to determine threshold crossing
1572 typedef alarm-operation-type {
1574 "The relational operator used to define whether an alarm
1575 should be triggered in certain scenarios, such as if the
1576 metric statistic goes above or below a specified value.";
1578 enum GE; // greater than or equal
1579 enum LE; // less than or equal
1580 enum GT; // greater than
1581 enum LT; // less than
1589 "This field is reserved for the identifier assigned by the VIM provider";
1595 description "A human readable string to identify the alarm";
1600 description "A description of this alarm";
1606 "The identifier of the VDUR that the alarm is associated with";
1618 list insufficient-data {
1635 "This flag indicates whether the alarm should be repeatedly emitted
1636 while the associated threshold has been crossed.";
1644 "This flag indicates whether the alarm has been enabled or
1652 description "A measure of the importance or urgency of the alarm";
1653 type alarm-severity-type;
1657 description "The metric to be tracked by this alarm.";
1658 type alarm-metric-type;
1662 description "The type of metric statistic that is tracked by this alarm";
1663 type alarm-statistic-type;
1668 "The relational operator used to define whether an alarm should be
1669 triggered in certain scenarios, such as if the metric statistic
1670 goes above or below a specified value.";
1671 type alarm-operation-type;
1676 "This value defines the threshold that, if crossed, will trigger
1685 "The period defines the length of time (seconds) that the metric
1686 data are collected over in oreder to evaluate the chosen
1693 "Defines the length of time (seconds) in which metric data are
1694 collected in order to evaluate the chosen statistic.";
1699 typedef cloud-account-type {
1700 description "VIM account type";
1704 enum cloudsim_proxy;
1713 grouping host-aggregate {
1714 list host-aggregate {
1715 description "Name of the Host Aggregate";
1720 "Name of the additional information attached to the host-aggregate";
1723 leaf metadata-value {
1725 "Value of the corresponding metadata-key";
1731 grouping placement-group-input {
1733 type manotypes:cloud-account-type;
1735 choice cloud-provider {
1737 container availability-zone {
1738 description "Name of the Availability Zone";
1743 container server-group {
1744 description "Name of the Affinity/Anti-Affinity Server Group";
1749 uses host-aggregate;
1752 leaf aws-construct {
1757 leaf openmano-construct {
1762 leaf vsphere-construct {
1767 leaf mock-construct {
1772 leaf cloudsim-construct {
1779 grouping placement-group-info {
1784 "Place group construct to define the compute resource placement strategy
1785 in cloud environment";
1790 description "This is free text space used to describe the intent/rationale
1791 behind this placement group. This is for human consumption only";
1797 "Strategy associated with this placement group
1798 Following values are possible
1799 - COLOCATION: Colocation strategy imply intent to share the physical
1800 infrastructure (hypervisor/network) among all members
1802 - ISOLATION: Isolation strategy imply intent to not share the physical
1803 infrastructure (hypervisor/network) among the members
1810 default "COLOCATION";
1814 grouping ip-profile-info {
1815 description "Grouping for IP-Profile";
1816 container ip-profile-params {
1819 type inet:ip-version;
1823 leaf subnet-address {
1824 description "Subnet IP prefix associated with IP Profile";
1825 type inet:ip-prefix;
1828 leaf gateway-address {
1829 description "IP Address of the default gateway associated with IP Profile";
1830 type inet:ip-address;
1833 leaf security-group {
1834 description "Name of the security group";
1841 description "List of DNS Servers associated with IP Profile";
1842 type inet:ip-address;
1846 container dhcp-params {
1848 description "This flag indicates if DHCP is enabled or not";
1853 leaf start-address {
1854 description "Start IP address of the IP-Address range associated with DHCP domain";
1855 type inet:ip-address;
1859 description "Size of the DHCP pool associated with DHCP domain";
1864 leaf subnet-prefix-pool {
1865 description "VIM Specific reference to pre-created subnet prefix";
1871 grouping ip-profile-list {
1874 "List of IP Profiles.
1875 IP Profile describes the IP characteristics for the Virtual-Link";
1880 description "Name of the IP-Profile";
1885 description "Description for IP profile";
1889 uses ip-profile-info;
1893 grouping config-file {
1894 description "Grouping for files needed to be mounted into an additional drive";
1897 "List of configuration files to be written on an additional drive";
1900 description "Name of the configuration file";
1904 description "Full path of the destination in the guest";
1910 grouping supplemental-boot-data {
1911 description "Grouping for custom vim data";
1912 container supplemental-boot-data {
1913 uses manotypes:config-file;
1914 leaf boot-data-drive {
1915 description "Some VIMs implement additional drives to host config-files or meta-data";
1922 grouping volume-info {
1923 description "Grouping for Volume-info";
1926 description "Description for Volume";
1931 description "Size of disk in GB";
1935 choice volume-source {
1937 "Defines the source of the volume. Possible options are
1938 1. Ephemeral -- Empty disk
1939 2. Image -- Refer to image to be used for volume
1940 3. Volume -- Reference of pre-existing volume to be used
1950 uses image-properties;
1956 description "Type of disk-bus on which this disk is exposed to guest";
1966 description "The type of device as exposed to guest";