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 parameter-data-type {
51 grouping primitive-parameter-value {
54 "List of parameters to the configuration primitive.";
58 "Name of the parameter.";
64 "Value associated with the name.";
70 grouping primitive-parameter {
73 "Name of the parameter.";
79 "Data type associated with the name.";
80 type manotypes:parameter-data-type;
84 description "Is this field mandatory";
90 description "The default value for this field";
95 description "NSD Parameter pool name to use for this paramter";
101 "The value should be greyed out by the UI.
102 Only applies to parameters with default values.";
108 "The value should be hidden by the UI.
109 Only applies to parameters with default values.";
115 grouping vnf-configuration {
116 container vnf-configuration {
117 rwpb:msg-new VnfConfiguration;
119 "Information regarding the VNF configuration
120 is captured here. Note that if the NS contains
121 multiple instances of the same VNF, each instance
122 of the VNF may have different configuration";
124 choice config-method {
126 "Defines the configuration method for the VNF.";
129 "Use NETCONF for configuring the VNF.";
133 "Netconf configuration target";
142 "Protocol to use for netconf (e.g. ssh)";
151 "Port for the netconf server.";
152 type inet:port-number;
159 "Use REST for configuring the VNF.";
163 "Port for the REST server.";
164 type inet:port-number;
171 "Use custom script for configuring the VNF.
172 This script is executed in the context of
177 "Script type - currently supported : bash, expect";
188 "Configure the VNF through Juju.";
191 description "Juju charm to use with the VNF.";
198 container config-access {
199 leaf mgmt-ip-address {
201 "IP address to be used to configure this VNF,
202 optional if it is possible to resolve dynamically.";
203 type inet:ip-address;
208 "username for configuration.";
214 "Password for configuration access authentication.";
219 container config-attributes {
221 "Miscelaneous input parameters to be considered
222 while processing the NSD to apply configuration";
224 leaf config-priority {
226 "Configuration priority - order of confgiration
227 to be applied to each VNF in this NS,
228 low number gets precedence over high number";
234 "Wait (seconds) before applying the configuration to VNF";
239 list service-primitive {
240 rwpb:msg-new ServicePrimitive;
242 "List of service primitives supported by the
243 configuration agent for this VNF.";
248 "Name of the service primitive.";
254 "List of parameters to the service primitive.";
256 uses primitive-parameter;
260 list initial-config-primitive {
261 rwpb:msg-new InitialConfigPrimitive;
263 "Initial set of configuration primitives.";
267 "Sequence number for the configuration primitive.";
273 "Name of the configuration primitive.";
289 leaf config-template {
291 "Configuration template for each VNF";
295 } // END - grouping vnf-configuration
297 typedef virtual-link-type {
299 "Type of virtual link
300 ELAN: A multipoint service connecting a set of VNFs
301 // ELINE: For a simple point to point connection
302 // between a VNF and the existing network.
303 // ETREE: A multipoint service connecting one or
304 // more roots and a set of leaves, but
305 // preventing inter-leaf communication.";
313 grouping named-value {
323 typedef http-method {
325 "Type of HTTP operation";
339 "Type of API to fetch monitoring params";
348 typedef json-query-method {
350 "The method to extract a value from a JSON response
352 NAMEKEY - Use the name as the key for a non-nested value.
353 JSONPATH - Use jsonpath-rw implemenation to extract a value.
354 OBJECTPATH - Use objectpath implemenation to extract a value.";
362 typedef param-value-type {
364 "The type of the parameter value";
372 typedef connection-point-type {
374 "Type of connection point
376 // VNIC_ADDR: Virtual NIC Address
377 // PNIC_ADDR: Physical NIC Address
378 // PPORT: Phsical Port.";
385 typedef widget-type {
387 "Type of the widget, typically used by the UI.";
398 typedef cpu-feature-type {
400 "Enumeration for CPU features.
402 AES: CPU supports advanced instruction set for
403 AES (Advanced Encryption Standard).
405 CAT: Cache Allocation Technology (CAT) allows
406 an Operating System, Hypervisor, or similar
407 system management agent to specify the amount
408 of L3 cache (currently the last-level cache
409 in most server and client platforms) space an
410 application can fill (as a hint to hardware
411 functionality, certain features such as power
412 management may override CAT settings).
414 CMT: Cache Monitoring Technology (CMT) allows
415 an Operating System, Hypervisor, or similar
416 system management agent to determine the
417 usage of cache based on applications running
418 on the platform. The implementation is
419 directed at L3 cache monitoring (currently
420 the last-level cache in most server and
423 DDIO: Intel Data Direct I/O (DDIO) enables
424 Ethernet server NICs and controllers talk
425 directly to the processor cache without a
426 detour via system memory. This enumeration
427 specifies if the VM requires a DDIO
471 enum REQUIRE_CLFLUSH;
499 enum REQUIRE_PCLMULQDQ;
500 enum PREFER_PCLMULQDQ;
503 enum REQUIRE_MONITOR;
541 enum REQUIRE_TSC_DEADLINE_TIMER;
542 enum PREFER_TSC_DEADLINE_TIMER;
551 enum REQUIRE_FSGSBASE;
552 enum PREFER_FSGSBASE;
565 enum REQUIRE_INVPCID;
581 container vm-flavor {
584 "Number of vcpus for the VM.";
590 "Amount of memory in MB.";
596 "Amount of disk space in GB.";
600 } //grouping vm-flavor
602 grouping vswitch-epa {
603 container vswitch-epa {
604 leaf ovs-acceleration {
606 "Specifies Open vSwitch acceleration mode.
607 MANDATORY: OVS acceleration is required
608 PREFERRED: OVS acceleration is preferred";
618 "Specifies Open vSwitch hardware offload mode.
619 MANDATORY: OVS offload is required
620 PREFERRED: OVS offload is preferred";
630 grouping hypervisor-epa {
631 container hypervisor-epa {
634 "Specifies the type of hypervisor.
650 description "Specifies the host level EPA attributes.";
653 "Host CPU model. Examples include: SandyBridge,
656 enum PREFER_WESTMERE;
657 enum REQUIRE_WESTMERE;
658 enum PREFER_SANDYBRIDGE;
659 enum REQUIRE_SANDYBRIDGE;
660 enum PREFER_IVYBRIDGE;
661 enum REQUIRE_IVYBRIDGE;
663 enum REQUIRE_HASWELL;
664 enum PREFER_BROADWELL;
665 enum REQUIRE_BROADWELL;
667 enum REQUIRE_NEHALEM;
672 enum PREFER_CORE2DUO;
673 enum REQUIRE_CORE2DUO;
678 description "Host CPU architecture.";
696 description "Host CPU Vendor.";
705 leaf cpu-socket-count {
706 description "Number of sockets on the host.";
710 leaf cpu-core-count {
711 description "Number of cores on the host.";
715 leaf cpu-core-thread-count {
716 description "Number of threads per cores on the host.";
722 description "List of CPU features.";
724 description "CPU feature.";
725 type cpu-feature-type;
730 leaf om-cpu-model-string {
731 description "Openmano CPU model string";
735 list om-cpu-feature {
737 description "List of openmano CPU features";
739 description "CPU feature";
747 description "EPA attributes for the guest";
748 container guest-epa {
749 leaf trusted-execution {
750 description "This VM should be allocated from trusted pool";
756 "Memory page allocation size. If a VM requires
757 hugepages, it should choose LARGE or SIZE_2MB
758 or SIZE_1GB. If the VM prefers hugepages it
759 should chose PREFER_LARGE.
760 LARGE : Require hugepages (either 2MB or 1GB)
761 SMALL : Doesn't require hugepages
762 SIZE_2MB : Requires 2MB hugepages
763 SIZE_1GB : Requires 1GB hugepages
764 PREFER_LARGE : Application perfers hugepages";
774 leaf cpu-pinning-policy {
776 "CPU pinning policy describes association
777 between virtual CPUs in guest and the
778 physical CPUs in the host.
779 DEDICATED : Virtual CPUs are pinned to
781 SHARED : Multiple VMs may share the
783 ANY : Any policy is acceptable for the VM";
792 leaf cpu-thread-pinning-policy {
794 "CPU thread pinning policy describes how to
795 place the guest CPUs when the host supports
797 AVOID : Avoids placing a guest on a host
799 SEPARATE: Places vCPUs on separate cores,
800 and avoids placing two vCPUs on
801 two threads of same core.
802 ISOLATE : Places each vCPU on a different core,
803 and places no vCPUs from a different
804 guest on the same core.
805 PREFER : Attempts to place vCPUs on threads
817 "List of pcie passthrough devices.";
821 "Device identifier.";
826 "Number of devices to attach to the VM.";
839 container numa-node-policy {
841 "This policy defines numa topology of the
842 guest. Specifically identifies if the guest
843 should be run on a host with one numa
844 node or multiple numa nodes. As an example
845 a guest may want 8 vcpus and 4 GB of
846 memory. But may want the vcpus and memory
847 distributed across multiple numa nodes.
848 The NUMA node 1 may run with 6 vcpus and
849 3GB, and NUMA node 2 may run with 2 vcpus
854 "The number of numa nodes to expose to the VM.";
860 "This policy specifies how the memory should
861 be allocated in a multi-node scenario.
862 STRICT : The memory must be allocated
863 strictly from the memory attached
865 PREFERRED : The memory should be allocated
866 perferentially from the memory
867 attached to the NUMA node";
878 "NUMA node identification. Typically
886 "List of vcpus to allocate on
890 description "List of vcpus ids to allocate on
897 "Memory size expressed in MB
898 for this NUMA node.";
902 choice om-numa-type {
904 "Openmano Numa type selection";
912 case paired-threads {
913 container paired-threads {
914 leaf num-paired-threads {
918 list paired-thread-ids {
920 "List of thread pairs to use in case of paired-thread numa";
948 grouping provider-network {
949 container provider-network {
950 description "Container for the provider network.";
951 leaf physical-network {
953 "Name of the phsyical network on which the provider
960 "Type of the overlay network.";
969 leaf segmentation_id {
977 grouping ns-service-primitive {
978 list service-primitive {
980 "Network service level service primitives.";
986 "Name of the service primitive.";
992 "List of parameters for the service primitive.";
995 uses manotypes:primitive-parameter;
998 list parameter-group {
1000 "Grouping of parameters which are logically grouped in UI";
1005 "Name of the parameter group";
1011 "List of parameters for the service primitive.";
1013 uses manotypes:primitive-parameter;
1017 description "Is this parameter group mandatory";
1023 list vnf-primitive-group {
1025 "List of service primitives grouped by VNF.";
1027 key "member-vnf-index-ref";
1028 leaf member-vnf-index-ref {
1030 "Reference to member-vnf within constituent-vnfds";
1036 "A reference to a vnfd. This is a
1038 ../../../../nsd:constituent-vnfd
1039 + [nsd:id = current()/../nsd:id-ref]
1041 NOTE: An issue with confd is preventing the
1042 use of xpath. Seems to be an issue with leafref
1043 to leafref, whose target is in a different module.
1044 Once that is resovled this will switched to use
1060 description "Index of this primitive";
1065 description "Name of the primitive in the VNF primitive ";
1071 leaf user-defined-script {
1073 "A user defined script.";
1079 grouping monitoring-param {
1080 list http-endpoint {
1082 "List of http endpoints to be used by monitoring params";
1086 description "The HTTP path on the management server";
1091 description "Pick HTTPS instead of HTTP , Default is false";
1097 description "The HTTP port to connect to";
1098 type inet:port-number;
1102 description "The HTTP basic auth username";
1107 description "The HTTP basic auth password";
1111 leaf polling_interval_secs {
1112 description "The HTTP polling interval in seconds";
1119 "This is the method to be performed at the uri.
1120 GET by default for action";
1122 type manotypes:http-method;
1127 description "Custom HTTP headers to put on HTTP request";
1130 description "HTTP header key";
1135 description "HTTP header value";
1141 list monitoring-param {
1143 "List of monitoring parameters at the NS level";
1153 leaf http-endpoint-ref {
1155 path "../../http-endpoint/path";
1159 leaf json-query-method {
1160 type json-query-method;
1164 container json-query-params {
1167 "The jsonpath to use to extract value from JSON structure";
1172 "The objectpath to use to extract value from JSON structure";
1177 uses monitoring-param-ui-data;
1178 uses monitoring-param-value;
1183 grouping monitoring-param-aggregation {
1184 typedef aggregation-type {
1185 description "aggregation-type";
1195 leaf aggregation-type {
1196 type aggregation-type;
1200 grouping monitoring-param-ui-data {
1206 description "A simple tag to group monitoring parameters";
1212 type manotypes:widget-type;
1220 grouping monitoring-param-value {
1222 type param-value-type;
1226 container numeric-constraints {
1229 "Minimum value for the parameter";
1234 "Maxium value for the parameter";
1239 container text-constraints {
1242 "Minimum string length for the parameter";
1247 "Maximum string length for the parameter";
1252 leaf value-integer {
1254 "Current value for an integer parameter";
1258 leaf value-decimal {
1260 "Current value for a decimal parameter";
1268 "Current value for a string parameter";
1273 grouping control-param {
1274 list control-param {
1276 "List of control parameters to manage and
1277 update the running configuration of the VNF";
1293 description "A simple tag to group control parameters";
1299 "Minimum value for the parameter";
1305 "Maxium value for the parameter";
1309 leaf current-value {
1311 "Current value for the parameter";
1317 "Step value for the parameter";
1326 type manotypes:widget-type;
1331 "This is the URL where to perform the operation";
1338 "This is the method to be performed at the uri.
1339 POST by default for action";
1341 type manotypes:http-method;
1347 "This is the operation payload or payload template as stringified
1348 JSON. This field provides the data to be sent for this operation
1356 grouping action-param {
1359 "List of action parameters to
1375 description "A simple tag to group monitoring parameter";
1381 "This is the URL where to perform the operation";
1387 "This is the method to be performed at the uri.
1388 POST by default for action";
1390 type manotypes:http-method;
1396 "This is the operation payload or payload template to be sent in
1397 the data for this operation call";
1404 grouping input-parameter {
1407 list input-parameter {
1409 "List of input parameters";
1416 "A an xpath that specfies which element in a descriptor is to be
1423 "The value that the element specified by the xpath should take when a
1424 record is created.";
1430 grouping input-parameter-xpath {
1431 list input-parameter-xpath {
1433 "List of xpaths to parameters inside the NSD
1434 the can be customized during the instantiation.";
1439 "An xpath that specifies the element in a descriptor.";
1444 description "A descriptive string";
1448 leaf default-value {
1449 description " A default value for this input parameter";
1455 grouping nfvi-metrics {
1459 "Label to show in UI";
1466 "The total number of VCPUs available.";
1472 "The VCPU utilization (percentage).";
1483 "Label to show in UI";
1490 "The amount of memory (bytes) currently in use.";
1496 "The amount of memory (bytes) available.";
1502 "The memory utilization (percentage).";
1513 "Label to show in UI";
1520 "The amount of storage (bytes) currently in use.";
1526 "The amount of storage (bytes) available.";
1532 "The storage utilization (percentage).";
1540 container external-ports {
1543 "Label to show in UI";
1545 default "EXTERNAL PORTS";
1550 "The total number of external ports.";
1555 container internal-ports {
1558 "Label to show in UI";
1560 default "INTERNAL PORTS";
1565 "The total number of internal ports.";
1573 "Label to show in UI";
1575 default "NETWORK TRAFFIC";
1578 container incoming {
1581 "Label to show in UI";
1583 default "INCOMING NETWORK TRAFFIC";
1588 "The cumulative number of incoming bytes.";
1594 "The cumulative number of incoming packets.";
1600 "The current incoming byte-rate (bytes per second).";
1608 "The current incoming packet (packets per second).";
1615 container outgoing {
1618 "Label to show in UI";
1620 default "OUTGOING NETWORK TRAFFIC";
1625 "The cumulative number of outgoing bytes.";
1631 "The cumulative number of outgoing packets.";
1637 "The current outgoing byte-rate (bytes per second).";
1645 "The current outgoing packet (packets per second).";
1654 typedef alarm-severity-type {
1655 description "An indication of the importance or ugency of the alarm";
1663 typedef alarm-metric-type {
1664 description "The type of metrics to register the alarm for";
1666 enum CPU_UTILIZATION;
1667 enum MEMORY_UTILIZATION;
1668 enum STORAGE_UTILIZATION;
1672 typedef alarm-statistic-type {
1674 "The type of statistic to used to measure a metric to determine
1675 threshold crossing for an alarm.";
1685 typedef alarm-operation-type {
1687 "The relational operator used to define whether an alarm should be
1688 triggered when, say, the metric statistic goes above or below a
1691 enum GE; // greater than or equal
1692 enum LE; // less than or equal
1693 enum GT; // greater than
1694 enum LT; // less than
1702 "This field is reserved for the identifier assigned by the cloud
1709 description "A human readable string to identify the alarm";
1714 description "A string containing a description of this alarm";
1720 "The identifier of the VDUR that the alarm is associated with";
1732 list insufficient-data {
1749 "This flag indicates whether the alarm should be repeatedly emitted
1750 while the associated threshold has been crossed.";
1758 "This flag indicates whether the alarm has been enabled or
1766 description "A measure of the important or urgency of the alarm";
1767 type alarm-severity-type;
1771 description "The metric to be tracked by this alarm.";
1772 type alarm-metric-type;
1776 description "The type of metric statistic that is tracked by this alarm";
1777 type alarm-statistic-type;
1782 "The relational operator that defines whether the alarm should be
1783 triggered when the metric statistic is, say, above or below the
1784 specified threshold value.";
1785 type alarm-operation-type;
1790 "This value defines the threshold that, if crossed, will trigger
1799 "The period defines the length of time (seconds) that the metric
1800 data are collected over in oreder to evaluate the chosen
1807 "This is the number of samples of the metric statistic used to
1808 evaluate threshold crossing. Each sample or evaluation is equal to
1809 the metric statistic obtained for a given period. This can be used
1810 to mitigate spikes in the metric that may skew the statistic of
1816 typedef cloud-account-type {
1817 description "cloud account type";
1821 enum cloudsim_proxy;
1830 grouping host-aggregate {
1831 list host-aggregate {
1832 description "Name of the Host Aggregate";
1838 leaf metadata-value {
1844 grouping placement-group-input {
1846 type manotypes:cloud-account-type;
1848 choice cloud-provider {
1850 container availability-zone {
1851 description "Name of the Availability Zone";
1856 container server-group {
1857 description "Name of the Affinity/Anti-Affinity Server Group";
1862 uses host-aggregate;
1865 leaf aws-construct {
1870 leaf openmano-construct {
1875 leaf vsphere-construct {
1880 leaf mock-construct {
1885 leaf cloudsim-construct {
1892 grouping placement-group-info {
1897 "Place group construct to define the compute resource placement strategy
1898 in cloud environment";
1903 description "This is free text space used to describe the intent/rationale
1904 behind this placement group. This is for human consumption only";
1910 "Strategy associated with this placement group
1911 Following values are possible
1912 - COLOCATION: Colocation strategy imply intent to share the physical
1913 infrastructure (hypervisor/network) among all members
1915 - ISOLATION: Isolation strategy imply intent to not share the physical
1916 infrastructure (hypervisor/network) among the members
1923 default "COLOCATION";
1927 grouping ip-profile-info {
1928 description "Grouping for IP-Profile";
1929 container ip-profile-params {
1932 type inet:ip-version;
1936 leaf subnet-address {
1937 description "Subnet IP prefix associated with IP Profile";
1938 type inet:ip-prefix;
1941 leaf gateway-address {
1942 description "IP Address of the default gateway associated with IP Profile";
1943 type inet:ip-address;
1946 leaf security-group {
1947 description "Name of the security group";
1954 description "List of DNS Servers associated with IP Profile";
1955 type inet:ip-address;
1959 container dhcp-params {
1961 description "This flag indicates if DHCP is enabled or not";
1966 leaf start-address {
1967 description "Start IP address of the IP-Address range associated with DHCP domain";
1968 type inet:ip-address;
1972 description "Size of the DHCP pool associated with DHCP domain";
1977 leaf subnet-prefix-pool {
1978 description "VIM Specific reference to pre-created subnet prefix";
1984 grouping ip-profile-list {
1987 "List of IP Profiles.
1988 IP Profile describes the IP characteristics for the Virtual-Link";
1993 description "Name of the IP-Profile";
1998 description "Description for IP profile";
2002 uses ip-profile-info;