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.";
112 leaf parameter-type {
113 description "Type of this parameter, whether this in IN or OUT";
120 leaf parameter-path {
121 description "A Leafref to the parameter path with the attribute selection.
122 At present only attribute ip-address() is supported.
123 For example, to get the ip address of VNF connection point
124 the xpath would look something along the following lines,
125 /vnfd-catalog/vnfd[id='x']/connection-point[name='cp']/ip-address()";
131 grouping vnf-configuration {
132 container vnf-configuration {
133 rwpb:msg-new VnfConfiguration;
135 "Information regarding the VNF configuration
136 is captured here. Note that if the NS contains
137 multiple instances of the same VNF, each instance
138 of the VNF may have different configuration";
140 choice config-method {
142 "Defines the configuration method for the VNF.";
145 "Use NETCONF for configuring the VNF.";
149 "Netconf configuration target";
158 "Protocol to use for netconf (e.g. ssh)";
167 "Port for the netconf server.";
168 type inet:port-number;
175 "Use REST for configuring the VNF.";
179 "Port for the REST server.";
180 type inet:port-number;
187 "Use custom script for configuring the VNF.
188 This script is executed in the context of
193 "Script type - currently supported : bash, expect";
204 "Configure the VNF through Juju.";
207 description "Juju charm to use with the VNF.";
214 container config-access {
215 leaf mgmt-ip-address {
217 "IP address to be used to configure this VNF,
218 optional if it is possible to resolve dynamically.";
219 type inet:ip-address;
224 "username for configuration.";
230 "Password for configuration access authentication.";
235 container config-attributes {
237 "Miscelaneous input parameters to be considered
238 while processing the NSD to apply configuration";
240 leaf config-priority {
242 "Configuration priority - order of confgiration
243 to be applied to each VNF in this NS,
244 low number gets precedence over high number";
250 "Wait (seconds) before applying the configuration to VNF";
255 list service-primitive {
256 rwpb:msg-new ServicePrimitive;
258 "List of service primitives supported by the
259 configuration agent for this VNF.";
264 "Name of the service primitive.";
270 "List of parameters to the service primitive.";
272 uses primitive-parameter;
276 list initial-config-primitive {
277 rwpb:msg-new InitialConfigPrimitive;
279 "Initial set of configuration primitives.";
283 "Sequence number for the configuration primitive.";
289 "Name of the configuration primitive.";
305 leaf config-template {
307 "Configuration template for each VNF";
311 } // END - grouping vnf-configuration
313 typedef virtual-link-type {
315 "Type of virtual link
316 ELAN: A multipoint service connecting a set of VNFs
317 // ELINE: For a simple point to point connection
318 // between a VNF and the existing network.
319 // ETREE: A multipoint service connecting one or
320 // more roots and a set of leaves, but
321 // preventing inter-leaf communication.";
329 grouping named-value {
339 typedef http-method {
341 "Type of HTTP operation";
355 "Type of API to fetch monitoring params";
364 typedef json-query-method {
366 "The method to extract a value from a JSON response
368 NAMEKEY - Use the name as the key for a non-nested value.
369 JSONPATH - Use jsonpath-rw implemenation to extract a value.
370 OBJECTPATH - Use objectpath implemenation to extract a value.";
378 typedef param-value-type {
380 "The type of the parameter value";
388 typedef connection-point-type {
390 "Type of connection point
392 // VNIC_ADDR: Virtual NIC Address
393 // PNIC_ADDR: Physical NIC Address
394 // PPORT: Phsical Port.";
401 typedef widget-type {
403 "Type of the widget, typically used by the UI.";
414 typedef cpu-feature-type {
416 "Enumeration for CPU features.
418 AES: CPU supports advanced instruction set for
419 AES (Advanced Encryption Standard).
421 CAT: Cache Allocation Technology (CAT) allows
422 an Operating System, Hypervisor, or similar
423 system management agent to specify the amount
424 of L3 cache (currently the last-level cache
425 in most server and client platforms) space an
426 application can fill (as a hint to hardware
427 functionality, certain features such as power
428 management may override CAT settings).
430 CMT: Cache Monitoring Technology (CMT) allows
431 an Operating System, Hypervisor, or similar
432 system management agent to determine the
433 usage of cache based on applications running
434 on the platform. The implementation is
435 directed at L3 cache monitoring (currently
436 the last-level cache in most server and
439 DDIO: Intel Data Direct I/O (DDIO) enables
440 Ethernet server NICs and controllers talk
441 directly to the processor cache without a
442 detour via system memory. This enumeration
443 specifies if the VM requires a DDIO
487 enum REQUIRE_CLFLUSH;
515 enum REQUIRE_PCLMULQDQ;
516 enum PREFER_PCLMULQDQ;
519 enum REQUIRE_MONITOR;
557 enum REQUIRE_TSC_DEADLINE_TIMER;
558 enum PREFER_TSC_DEADLINE_TIMER;
567 enum REQUIRE_FSGSBASE;
568 enum PREFER_FSGSBASE;
581 enum REQUIRE_INVPCID;
597 container vm-flavor {
600 "Number of vcpus for the VM.";
606 "Amount of memory in MB.";
612 "Amount of disk space in GB.";
616 } //grouping vm-flavor
618 grouping vswitch-epa {
619 container vswitch-epa {
620 leaf ovs-acceleration {
622 "Specifies Open vSwitch acceleration mode.
623 MANDATORY: OVS acceleration is required
624 PREFERRED: OVS acceleration is preferred";
634 "Specifies Open vSwitch hardware offload mode.
635 MANDATORY: OVS offload is required
636 PREFERRED: OVS offload is preferred";
646 grouping hypervisor-epa {
647 container hypervisor-epa {
650 "Specifies the type of hypervisor.
666 description "Specifies the host level EPA attributes.";
669 "Host CPU model. Examples include: SandyBridge,
672 enum PREFER_WESTMERE;
673 enum REQUIRE_WESTMERE;
674 enum PREFER_SANDYBRIDGE;
675 enum REQUIRE_SANDYBRIDGE;
676 enum PREFER_IVYBRIDGE;
677 enum REQUIRE_IVYBRIDGE;
679 enum REQUIRE_HASWELL;
680 enum PREFER_BROADWELL;
681 enum REQUIRE_BROADWELL;
683 enum REQUIRE_NEHALEM;
688 enum PREFER_CORE2DUO;
689 enum REQUIRE_CORE2DUO;
694 description "Host CPU architecture.";
712 description "Host CPU Vendor.";
721 leaf cpu-socket-count {
722 description "Number of sockets on the host.";
726 leaf cpu-core-count {
727 description "Number of cores on the host.";
731 leaf cpu-core-thread-count {
732 description "Number of threads per cores on the host.";
738 description "List of CPU features.";
740 description "CPU feature.";
741 type cpu-feature-type;
746 leaf om-cpu-model-string {
747 description "Openmano CPU model string";
751 list om-cpu-feature {
753 description "List of openmano CPU features";
755 description "CPU feature";
763 description "EPA attributes for the guest";
764 container guest-epa {
765 leaf trusted-execution {
766 description "This VM should be allocated from trusted pool";
772 "Memory page allocation size. If a VM requires
773 hugepages, it should choose LARGE or SIZE_2MB
774 or SIZE_1GB. If the VM prefers hugepages it
775 should chose PREFER_LARGE.
776 LARGE : Require hugepages (either 2MB or 1GB)
777 SMALL : Doesn't require hugepages
778 SIZE_2MB : Requires 2MB hugepages
779 SIZE_1GB : Requires 1GB hugepages
780 PREFER_LARGE : Application perfers hugepages";
790 leaf cpu-pinning-policy {
792 "CPU pinning policy describes association
793 between virtual CPUs in guest and the
794 physical CPUs in the host.
795 DEDICATED : Virtual CPUs are pinned to
797 SHARED : Multiple VMs may share the
799 ANY : Any policy is acceptable for the VM";
808 leaf cpu-thread-pinning-policy {
810 "CPU thread pinning policy describes how to
811 place the guest CPUs when the host supports
813 AVOID : Avoids placing a guest on a host
815 SEPARATE: Places vCPUs on separate cores,
816 and avoids placing two vCPUs on
817 two threads of same core.
818 ISOLATE : Places each vCPU on a different core,
819 and places no vCPUs from a different
820 guest on the same core.
821 PREFER : Attempts to place vCPUs on threads
833 "List of pcie passthrough devices.";
837 "Device identifier.";
842 "Number of devices to attach to the VM.";
855 container numa-node-policy {
857 "This policy defines numa topology of the
858 guest. Specifically identifies if the guest
859 should be run on a host with one numa
860 node or multiple numa nodes. As an example
861 a guest may want 8 vcpus and 4 GB of
862 memory. But may want the vcpus and memory
863 distributed across multiple numa nodes.
864 The NUMA node 1 may run with 6 vcpus and
865 3GB, and NUMA node 2 may run with 2 vcpus
870 "The number of numa nodes to expose to the VM.";
876 "This policy specifies how the memory should
877 be allocated in a multi-node scenario.
878 STRICT : The memory must be allocated
879 strictly from the memory attached
881 PREFERRED : The memory should be allocated
882 perferentially from the memory
883 attached to the NUMA node";
894 "NUMA node identification. Typically
902 "List of vcpus to allocate on
906 description "List of vcpus ids to allocate on
913 "Memory size expressed in MB
914 for this NUMA node.";
918 choice om-numa-type {
920 "Openmano Numa type selection";
928 case paired-threads {
929 container paired-threads {
930 leaf num-paired-threads {
934 list paired-thread-ids {
936 "List of thread pairs to use in case of paired-thread numa";
964 grouping provider-network {
965 container provider-network {
966 description "Container for the provider network.";
967 leaf physical-network {
969 "Name of the phsyical network on which the provider
976 "Type of the overlay network.";
985 leaf segmentation_id {
993 grouping ns-service-primitive {
994 list service-primitive {
996 "Network service level service primitives.";
1002 "Name of the service primitive.";
1008 "List of parameters for the service primitive.";
1011 uses manotypes:primitive-parameter;
1014 list parameter-group {
1016 "Grouping of parameters which are logically grouped in UI";
1021 "Name of the parameter group";
1027 "List of parameters for the service primitive.";
1029 uses manotypes:primitive-parameter;
1033 description "Is this parameter group mandatory";
1039 list vnf-primitive-group {
1041 "List of service primitives grouped by VNF.";
1043 key "member-vnf-index-ref";
1044 leaf member-vnf-index-ref {
1046 "Reference to member-vnf within constituent-vnfds";
1052 "A reference to a vnfd. This is a
1054 ../../../../nsd:constituent-vnfd
1055 + [nsd:id = current()/../nsd:id-ref]
1057 NOTE: An issue with confd is preventing the
1058 use of xpath. Seems to be an issue with leafref
1059 to leafref, whose target is in a different module.
1060 Once that is resovled this will switched to use
1076 description "Index of this primitive";
1081 description "Name of the primitive in the VNF primitive ";
1087 leaf user-defined-script {
1089 "A user defined script.";
1095 grouping monitoring-param {
1096 list http-endpoint {
1098 "List of http endpoints to be used by monitoring params";
1102 description "The HTTP path on the management server";
1107 description "Pick HTTPS instead of HTTP , Default is false";
1113 description "The HTTP port to connect to";
1114 type inet:port-number;
1118 description "The HTTP basic auth username";
1123 description "The HTTP basic auth password";
1127 leaf polling_interval_secs {
1128 description "The HTTP polling interval in seconds";
1135 "This is the method to be performed at the uri.
1136 GET by default for action";
1138 type manotypes:http-method;
1143 description "Custom HTTP headers to put on HTTP request";
1146 description "HTTP header key";
1151 description "HTTP header value";
1157 list monitoring-param {
1159 "List of monitoring parameters at the NS level";
1169 leaf http-endpoint-ref {
1171 path "../../http-endpoint/path";
1175 leaf json-query-method {
1176 type json-query-method;
1180 container json-query-params {
1183 "The jsonpath to use to extract value from JSON structure";
1188 "The objectpath to use to extract value from JSON structure";
1193 uses monitoring-param-ui-data;
1194 uses monitoring-param-value;
1199 grouping monitoring-param-aggregation {
1200 typedef aggregation-type {
1201 description "aggregation-type";
1211 leaf aggregation-type {
1212 type aggregation-type;
1216 grouping monitoring-param-ui-data {
1222 description "A simple tag to group monitoring parameters";
1228 type manotypes:widget-type;
1236 grouping monitoring-param-value {
1238 type param-value-type;
1242 container numeric-constraints {
1245 "Minimum value for the parameter";
1250 "Maxium value for the parameter";
1255 container text-constraints {
1258 "Minimum string length for the parameter";
1263 "Maximum string length for the parameter";
1268 leaf value-integer {
1270 "Current value for an integer parameter";
1274 leaf value-decimal {
1276 "Current value for a decimal parameter";
1284 "Current value for a string parameter";
1289 grouping control-param {
1290 list control-param {
1292 "List of control parameters to manage and
1293 update the running configuration of the VNF";
1309 description "A simple tag to group control parameters";
1315 "Minimum value for the parameter";
1321 "Maxium value for the parameter";
1325 leaf current-value {
1327 "Current value for the parameter";
1333 "Step value for the parameter";
1342 type manotypes:widget-type;
1347 "This is the URL where to perform the operation";
1354 "This is the method to be performed at the uri.
1355 POST by default for action";
1357 type manotypes:http-method;
1363 "This is the operation payload or payload template as stringified
1364 JSON. This field provides the data to be sent for this operation
1372 grouping action-param {
1375 "List of action parameters to
1391 description "A simple tag to group monitoring parameter";
1397 "This is the URL where to perform the operation";
1403 "This is the method to be performed at the uri.
1404 POST by default for action";
1406 type manotypes:http-method;
1412 "This is the operation payload or payload template to be sent in
1413 the data for this operation call";
1420 grouping input-parameter {
1423 list input-parameter {
1425 "List of input parameters";
1432 "A an xpath that specfies which element in a descriptor is to be
1439 "The value that the element specified by the xpath should take when a
1440 record is created.";
1446 grouping input-parameter-xpath {
1447 list input-parameter-xpath {
1449 "List of xpaths to parameters inside the NSD
1450 the can be customized during the instantiation.";
1455 "An xpath that specifies the element in a descriptor.";
1460 description "A descriptive string";
1464 leaf default-value {
1465 description " A default value for this input parameter";
1471 grouping nfvi-metrics {
1475 "Label to show in UI";
1482 "The total number of VCPUs available.";
1488 "The VCPU utilization (percentage).";
1499 "Label to show in UI";
1506 "The amount of memory (bytes) currently in use.";
1512 "The amount of memory (bytes) available.";
1518 "The memory utilization (percentage).";
1529 "Label to show in UI";
1536 "The amount of storage (bytes) currently in use.";
1542 "The amount of storage (bytes) available.";
1548 "The storage utilization (percentage).";
1556 container external-ports {
1559 "Label to show in UI";
1561 default "EXTERNAL PORTS";
1566 "The total number of external ports.";
1571 container internal-ports {
1574 "Label to show in UI";
1576 default "INTERNAL PORTS";
1581 "The total number of internal ports.";
1589 "Label to show in UI";
1591 default "NETWORK TRAFFIC";
1594 container incoming {
1597 "Label to show in UI";
1599 default "INCOMING NETWORK TRAFFIC";
1604 "The cumulative number of incoming bytes.";
1610 "The cumulative number of incoming packets.";
1616 "The current incoming byte-rate (bytes per second).";
1624 "The current incoming packet (packets per second).";
1631 container outgoing {
1634 "Label to show in UI";
1636 default "OUTGOING NETWORK TRAFFIC";
1641 "The cumulative number of outgoing bytes.";
1647 "The cumulative number of outgoing packets.";
1653 "The current outgoing byte-rate (bytes per second).";
1661 "The current outgoing packet (packets per second).";
1670 typedef alarm-severity-type {
1671 description "An indication of the importance or ugency of the alarm";
1679 typedef alarm-metric-type {
1680 description "The type of metrics to register the alarm for";
1682 enum CPU_UTILIZATION;
1683 enum MEMORY_UTILIZATION;
1684 enum STORAGE_UTILIZATION;
1688 typedef alarm-statistic-type {
1690 "The type of statistic to used to measure a metric to determine
1691 threshold crossing for an alarm.";
1701 typedef alarm-operation-type {
1703 "The relational operator used to define whether an alarm should be
1704 triggered when, say, the metric statistic goes above or below a
1707 enum GE; // greater than or equal
1708 enum LE; // less than or equal
1709 enum GT; // greater than
1710 enum LT; // less than
1718 "This field is reserved for the identifier assigned by the cloud
1725 description "A human readable string to identify the alarm";
1730 description "A string containing a description of this alarm";
1736 "The identifier of the VDUR that the alarm is associated with";
1748 list insufficient-data {
1765 "This flag indicates whether the alarm should be repeatedly emitted
1766 while the associated threshold has been crossed.";
1774 "This flag indicates whether the alarm has been enabled or
1782 description "A measure of the important or urgency of the alarm";
1783 type alarm-severity-type;
1787 description "The metric to be tracked by this alarm.";
1788 type alarm-metric-type;
1792 description "The type of metric statistic that is tracked by this alarm";
1793 type alarm-statistic-type;
1798 "The relational operator that defines whether the alarm should be
1799 triggered when the metric statistic is, say, above or below the
1800 specified threshold value.";
1801 type alarm-operation-type;
1806 "This value defines the threshold that, if crossed, will trigger
1815 "The period defines the length of time (seconds) that the metric
1816 data are collected over in oreder to evaluate the chosen
1823 "This is the number of samples of the metric statistic used to
1824 evaluate threshold crossing. Each sample or evaluation is equal to
1825 the metric statistic obtained for a given period. This can be used
1826 to mitigate spikes in the metric that may skew the statistic of
1832 typedef cloud-account-type {
1833 description "cloud account type";
1837 enum cloudsim_proxy;
1846 grouping host-aggregate {
1847 list host-aggregate {
1848 description "Name of the Host Aggregate";
1854 leaf metadata-value {
1860 grouping placement-group-input {
1862 type manotypes:cloud-account-type;
1864 choice cloud-provider {
1866 container availability-zone {
1867 description "Name of the Availability Zone";
1872 container server-group {
1873 description "Name of the Affinity/Anti-Affinity Server Group";
1878 uses host-aggregate;
1881 leaf aws-construct {
1886 leaf openmano-construct {
1891 leaf vsphere-construct {
1896 leaf mock-construct {
1901 leaf cloudsim-construct {
1908 grouping placement-group-info {
1913 "Place group construct to define the compute resource placement strategy
1914 in cloud environment";
1919 description "This is free text space used to describe the intent/rationale
1920 behind this placement group. This is for human consumption only";
1926 "Strategy associated with this placement group
1927 Following values are possible
1928 - COLOCATION: Colocation strategy imply intent to share the physical
1929 infrastructure (hypervisor/network) among all members
1931 - ISOLATION: Isolation strategy imply intent to not share the physical
1932 infrastructure (hypervisor/network) among the members
1939 default "COLOCATION";
1943 grouping ip-profile-info {
1944 description "Grouping for IP-Profile";
1945 container ip-profile-params {
1948 type inet:ip-version;
1952 leaf subnet-address {
1953 description "Subnet IP prefix associated with IP Profile";
1954 type inet:ip-prefix;
1957 leaf gateway-address {
1958 description "IP Address of the default gateway associated with IP Profile";
1959 type inet:ip-address;
1962 leaf security-group {
1963 description "Name of the security group";
1970 description "List of DNS Servers associated with IP Profile";
1971 type inet:ip-address;
1975 container dhcp-params {
1977 description "This flag indicates if DHCP is enabled or not";
1982 leaf start-address {
1983 description "Start IP address of the IP-Address range associated with DHCP domain";
1984 type inet:ip-address;
1988 description "Size of the DHCP pool associated with DHCP domain";
1993 leaf subnet-prefix-pool {
1994 description "VIM Specific reference to pre-created subnet prefix";
2000 grouping ip-profile-list {
2003 "List of IP Profiles.
2004 IP Profile describes the IP characteristics for the Virtual-Link";
2009 description "Name of the IP-Profile";
2014 description "Description for IP profile";
2018 uses ip-profile-info;