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.";
720 leaf-list cpu-feature {
722 "List of CPU features.";
723 type cpu-feature-type;
727 leaf om-cpu-model-string {
728 description "Openmano CPU model string";
732 leaf-list om-cpu-feature {
733 description "Openmano CPU features";
740 description "EPA attributes for the guest";
741 container guest-epa {
742 leaf trusted-execution {
743 description "This VM should be allocated from trusted pool";
749 "Memory page allocation size. If a VM requires
750 hugepages, it should choose LARGE or SIZE_2MB
751 or SIZE_1GB. If the VM prefers hugepages it
752 should chose PREFER_LARGE.
753 LARGE : Require hugepages (either 2MB or 1GB)
754 SMALL : Doesn't require hugepages
755 SIZE_2MB : Requires 2MB hugepages
756 SIZE_1GB : Requires 1GB hugepages
757 PREFER_LARGE : Application perfers hugepages";
767 leaf cpu-pinning-policy {
769 "CPU pinning policy describes association
770 between virtual CPUs in guest and the
771 physical CPUs in the host.
772 DEDICATED : Virtual CPUs are pinned to
774 SHARED : Multiple VMs may share the
776 ANY : Any policy is acceptable for the VM";
785 leaf cpu-thread-pinning-policy {
787 "CPU thread pinning policy describes how to
788 place the guest CPUs when the host supports
790 AVOID : Avoids placing a guest on a host
792 SEPARATE: Places vCPUs on separate cores,
793 and avoids placing two vCPUs on
794 two threads of same core.
795 ISOLATE : Places each vCPU on a different core,
796 and places no vCPUs from a different
797 guest on the same core.
798 PREFER : Attempts to place vCPUs on threads
810 "List of pcie passthrough devices.";
814 "Device identifier.";
819 "Number of devices to attach to the VM.";
832 container numa-node-policy {
834 "This policy defines numa topology of the
835 guest. Specifically identifies if the guest
836 should be run on a host with one numa
837 node or multiple numa nodes. As an example
838 a guest may want 8 vcpus and 4 GB of
839 memory. But may want the vcpus and memory
840 distributed across multiple numa nodes.
841 The NUMA node 1 may run with 6 vcpus and
842 3GB, and NUMA node 2 may run with 2 vcpus
847 "The number of numa nodes to expose to the VM.";
853 "This policy specifies how the memory should
854 be allocated in a multi-node scenario.
855 STRICT : The memory must be allocated
856 strictly from the memory attached
858 PREFERRED : The memory should be allocated
859 perferentially from the memory
860 attached to the NUMA node";
871 "NUMA node identification. Typically
878 "List of vcpus to allocate on
885 "Memory size expressed in MB
886 for this NUMA node.";
890 choice om-numa-type {
892 "Openmano Numa type selection";
900 case paired-threads {
901 container paired-threads {
902 leaf num-paired-threads {
906 list paired-thread-ids {
908 "List of thread pairs to use in case of paired-thread numa";
936 grouping provider-network {
937 container provider-network {
938 description "Container for the provider network.";
939 leaf physical-network {
941 "Name of the phsyical network on which the provider
948 "Type of the overlay network.";
957 leaf segmentation_id {
965 grouping ns-service-primitive {
966 list service-primitive {
968 "Network service level service primitives.";
974 "Name of the service primitive.";
980 "List of parameters for the service primitive.";
983 uses manotypes:primitive-parameter;
986 list parameter-group {
988 "Grouping of parameters which are logically grouped in UI";
993 "Name of the parameter group";
999 "List of parameters for the service primitive.";
1001 uses manotypes:primitive-parameter;
1005 description "Is this parameter group mandatory";
1011 list vnf-primitive-group {
1013 "List of service primitives grouped by VNF.";
1015 key "member-vnf-index-ref";
1016 leaf member-vnf-index-ref {
1018 "Reference to member-vnf within constituent-vnfds";
1024 "A reference to a vnfd. This is a
1026 ../../../../nsd:constituent-vnfd
1027 + [nsd:id = current()/../nsd:id-ref]
1029 NOTE: An issue with confd is preventing the
1030 use of xpath. Seems to be an issue with leafref
1031 to leafref, whose target is in a different module.
1032 Once that is resovled this will switched to use
1048 description "Index of this primitive";
1053 description "Name of the primitive in the VNF primitive ";
1059 leaf user-defined-script {
1061 "A user defined script.";
1067 grouping monitoring-param {
1068 list http-endpoint {
1070 "List of http endpoints to be used by monitoring params";
1074 description "The HTTP path on the management server";
1079 description "Pick HTTPS instead of HTTP , Default is false";
1085 description "The HTTP port to connect to";
1086 type inet:port-number;
1090 description "The HTTP basic auth username";
1095 description "The HTTP basic auth password";
1099 leaf polling_interval_secs {
1100 description "The HTTP polling interval in seconds";
1107 "This is the method to be performed at the uri.
1108 GET by default for action";
1110 type manotypes:http-method;
1115 description "Custom HTTP headers to put on HTTP request";
1118 description "HTTP header key";
1123 description "HTTP header value";
1129 list monitoring-param {
1131 "List of monitoring parameters at the NS level";
1141 leaf http-endpoint-ref {
1143 path "../../http-endpoint/path";
1147 leaf json-query-method {
1148 type json-query-method;
1152 container json-query-params {
1155 "The jsonpath to use to extract value from JSON structure";
1160 "The objectpath to use to extract value from JSON structure";
1165 uses monitoring-param-ui-data;
1166 uses monitoring-param-value;
1171 grouping monitoring-param-aggregation {
1172 typedef aggregation-type {
1173 description "aggregation-type";
1183 leaf aggregation-type {
1184 type aggregation-type;
1188 grouping monitoring-param-ui-data {
1194 description "A simple tag to group monitoring parameters";
1200 type manotypes:widget-type;
1208 grouping monitoring-param-value {
1210 type param-value-type;
1214 container numeric-constraints {
1217 "Minimum value for the parameter";
1222 "Maxium value for the parameter";
1227 container text-constraints {
1230 "Minimum string length for the parameter";
1235 "Maximum string length for the parameter";
1240 leaf value-integer {
1242 "Current value for an integer parameter";
1246 leaf value-decimal {
1248 "Current value for a decimal parameter";
1256 "Current value for a string parameter";
1261 grouping control-param {
1262 list control-param {
1264 "List of control parameters to manage and
1265 update the running configuration of the VNF";
1281 description "A simple tag to group control parameters";
1287 "Minimum value for the parameter";
1293 "Maxium value for the parameter";
1297 leaf current-value {
1299 "Current value for the parameter";
1305 "Step value for the parameter";
1314 type manotypes:widget-type;
1319 "This is the URL where to perform the operation";
1326 "This is the method to be performed at the uri.
1327 POST by default for action";
1329 type manotypes:http-method;
1335 "This is the operation payload or payload template as stringified
1336 JSON. This field provides the data to be sent for this operation
1344 grouping action-param {
1347 "List of action parameters to
1363 description "A simple tag to group monitoring parameter";
1369 "This is the URL where to perform the operation";
1375 "This is the method to be performed at the uri.
1376 POST by default for action";
1378 type manotypes:http-method;
1384 "This is the operation payload or payload template to be sent in
1385 the data for this operation call";
1392 grouping input-parameter {
1395 list input-parameter {
1397 "List of input parameters";
1404 "A an xpath that specfies which element in a descriptor is to be
1411 "The value that the element specified by the xpath should take when a
1412 record is created.";
1418 grouping input-parameter-xpath {
1419 list input-parameter-xpath {
1421 "List of xpaths to parameters inside the NSD
1422 the can be customized during the instantiation.";
1427 "An xpath that specifies the element in a descriptor.";
1432 description "A descriptive string";
1436 leaf default-value {
1437 description " A default value for this input parameter";
1443 grouping nfvi-metrics {
1447 "Label to show in UI";
1454 "The total number of VCPUs available.";
1460 "The VCPU utilization (percentage).";
1471 "Label to show in UI";
1478 "The amount of memory (bytes) currently in use.";
1484 "The amount of memory (bytes) available.";
1490 "The memory utilization (percentage).";
1501 "Label to show in UI";
1508 "The amount of storage (bytes) currently in use.";
1514 "The amount of storage (bytes) available.";
1520 "The storage utilization (percentage).";
1528 container external-ports {
1531 "Label to show in UI";
1533 default "EXTERNAL PORTS";
1538 "The total number of external ports.";
1543 container internal-ports {
1546 "Label to show in UI";
1548 default "INTERNAL PORTS";
1553 "The total number of internal ports.";
1561 "Label to show in UI";
1563 default "NETWORK TRAFFIC";
1566 container incoming {
1569 "Label to show in UI";
1571 default "INCOMING NETWORK TRAFFIC";
1576 "The cumulative number of incoming bytes.";
1582 "The cumulative number of incoming packets.";
1588 "The current incoming byte-rate (bytes per second).";
1596 "The current incoming packet (packets per second).";
1603 container outgoing {
1606 "Label to show in UI";
1608 default "OUTGOING NETWORK TRAFFIC";
1613 "The cumulative number of outgoing bytes.";
1619 "The cumulative number of outgoing packets.";
1625 "The current outgoing byte-rate (bytes per second).";
1633 "The current outgoing packet (packets per second).";
1642 typedef alarm-severity-type {
1643 description "An indication of the importance or ugency of the alarm";
1651 typedef alarm-metric-type {
1652 description "The type of metrics to register the alarm for";
1654 enum CPU_UTILIZATION;
1655 enum MEMORY_UTILIZATION;
1656 enum STORAGE_UTILIZATION;
1660 typedef alarm-statistic-type {
1662 "The type of statistic to used to measure a metric to determine
1663 threshold crossing for an alarm.";
1673 typedef alarm-operation-type {
1675 "The relational operator used to define whether an alarm should be
1676 triggered when, say, the metric statistic goes above or below a
1679 enum GE; // greater than or equal
1680 enum LE; // less than or equal
1681 enum GT; // greater than
1682 enum LT; // less than
1690 "This field is reserved for the identifier assigned by the cloud
1697 description "A human readable string to identify the alarm";
1702 description "A string containing a description of this alarm";
1708 "The identifier of the VDUR that the alarm is associated with";
1720 list insufficient-data {
1737 "This flag indicates whether the alarm should be repeatedly emitted
1738 while the associated threshold has been crossed.";
1746 "This flag indicates whether the alarm has been enabled or
1754 description "A measure of the important or urgency of the alarm";
1755 type alarm-severity-type;
1759 description "The metric to be tracked by this alarm.";
1760 type alarm-metric-type;
1764 description "The type of metric statistic that is tracked by this alarm";
1765 type alarm-statistic-type;
1770 "The relational operator that defines whether the alarm should be
1771 triggered when the metric statistic is, say, above or below the
1772 specified threshold value.";
1773 type alarm-operation-type;
1778 "This value defines the threshold that, if crossed, will trigger
1787 "The period defines the length of time (seconds) that the metric
1788 data are collected over in oreder to evaluate the chosen
1795 "This is the number of samples of the metric statistic used to
1796 evaluate threshold crossing. Each sample or evaluation is equal to
1797 the metric statistic obtained for a given period. This can be used
1798 to mitigate spikes in the metric that may skew the statistic of
1804 typedef cloud-account-type {
1805 description "cloud account type";
1809 enum cloudsim_proxy;
1818 grouping host-aggregate {
1819 list host-aggregate {
1820 description "Name of the Host Aggregate";
1826 leaf metadata-value {
1832 grouping placement-group-input {
1834 type manotypes:cloud-account-type;
1836 choice cloud-provider {
1838 container availability-zone {
1839 description "Name of the Availability Zone";
1844 container server-group {
1845 description "Name of the Affinity/Anti-Affinity Server Group";
1850 uses host-aggregate;
1853 leaf aws-construct {
1858 leaf openmano-construct {
1863 leaf vsphere-construct {
1868 leaf mock-construct {
1873 leaf cloudsim-construct {
1880 grouping placement-group-info {
1885 "Place group construct to define the compute resource placement strategy
1886 in cloud environment";
1891 description "This is free text space used to describe the intent/rationale
1892 behind this placement group. This is for human consumption only";
1898 "Strategy associated with this placement group
1899 Following values are possible
1900 - COLOCATION: Colocation strategy imply intent to share the physical
1901 infrastructure (hypervisor/network) among all members
1903 - ISOLATION: Isolation strategy imply intent to not share the physical
1904 infrastructure (hypervisor/network) among the members
1911 default "COLOCATION";
1915 grouping ip-profile-info {
1916 description "Grouping for IP-Profile";
1917 container ip-profile-params {
1920 type inet:ip-version;
1924 leaf subnet-address {
1925 description "Subnet IP prefix associated with IP Profile";
1926 type inet:ip-prefix;
1929 leaf gateway-address {
1930 description "IP Address of the default gateway associated with IP Profile";
1931 type inet:ip-address;
1934 leaf security-group {
1935 description "Name of the security group";
1942 description "List of DNS Servers associated with IP Profile";
1943 type inet:ip-address;
1947 container dhcp-params {
1949 description "This flag indicates if DHCP is enabled or not";
1954 leaf start-address {
1955 description "Start IP address of the IP-Address range associated with DHCP domain";
1956 type inet:ip-address;
1960 description "Size of the DHCP pool associated with DHCP domain";
1965 leaf subnet-prefix-pool {
1966 description "VIM Specific reference to pre-created subnet prefix";
1972 grouping ip-profile-list {
1975 "List of IP Profiles.
1976 IP Profile describes the IP characteristics for the Virtual-Link";
1981 description "Name of the IP-Profile";
1986 description "Description for IP profile";
1990 uses ip-profile-info;