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.";
109 "The value should be hidden by the UI.
110 Only applies to parameters with default values.";
116 description "If this is an output of the primitive execution";
120 leaf parameter-type {
121 description "Type of this parameter, whether this in IN or OUT";
128 leaf parameter-path {
129 description "A Leafref to the parameter path with the attribute selection.
130 At present only attribute ip-address() is supported.
131 For example, to get the ip address of VNF connection point
132 the xpath would look something along the following lines,
133 /vnfd-catalog/vnfd[id='x']/connection-point[name='cp']/ip-address()";
139 grouping vnf-configuration {
140 container vnf-configuration {
141 rwpb:msg-new VnfConfiguration;
143 "Information regarding the VNF configuration
144 is captured here. Note that if the NS contains
145 multiple instances of the same VNF, each instance
146 of the VNF may have different configuration";
148 choice config-method {
150 "Defines the configuration method for the VNF.";
153 "Use NETCONF for configuring the VNF.";
157 "Netconf configuration target";
166 "Protocol to use for netconf (e.g. ssh)";
175 "Port for the netconf server.";
176 type inet:port-number;
183 "Use REST for configuring the VNF.";
187 "Port for the REST server.";
188 type inet:port-number;
195 "Use custom script for configuring the VNF.
196 This script is executed in the context of
201 "Script type - currently supported : bash, expect";
212 "Configure the VNF through Juju.";
215 description "Juju charm to use with the VNF.";
222 container config-access {
223 leaf mgmt-ip-address {
225 "IP address to be used to configure this VNF,
226 optional if it is possible to resolve dynamically.";
227 type inet:ip-address;
232 "username for configuration.";
238 "Password for configuration access authentication.";
243 container config-attributes {
245 "Miscelaneous input parameters to be considered
246 while processing the NSD to apply configuration";
248 leaf config-priority {
250 "Configuration priority - order of confgiration
251 to be applied to each VNF in this NS,
252 low number gets precedence over high number";
258 "Wait (seconds) before applying the configuration to VNF";
263 list config-primitive {
264 rwpb:msg-new ConfigPrimitive;
266 "List of config primitives supported by the
267 configuration agent for this VNF.";
272 "Name of the config primitive.";
278 "List of parameters to the config primitive.";
280 uses primitive-parameter;
284 list initial-config-primitive {
285 rwpb:msg-new InitialConfigPrimitive;
287 "Initial set of configuration primitives.";
291 "Sequence number for the configuration primitive.";
295 choice primtive-type {
296 case primtive-definition {
299 "Name of the configuration primitive.";
303 uses primitive-parameter-value;
307 leaf config-primtive-ref {
309 "Reference to a config primitive name.
310 NOTE: The config primitive referred should have
311 all the input paramaters predefined either
312 with default values or dependency references.";
314 path "../../config-primitive/name";
321 leaf config-template {
323 "Configuration template for each VNF";
327 } // END - grouping vnf-configuration
329 typedef virtual-link-type {
331 "Type of virtual link
332 ELAN: A multipoint service connecting a set of VNFs
333 // ELINE: For a simple point to point connection
334 // between a VNF and the existing network.
335 // ETREE: A multipoint service connecting one or
336 // more roots and a set of leaves, but
337 // preventing inter-leaf communication.";
345 grouping named-value {
355 typedef http-method {
357 "Type of HTTP operation";
371 "Type of API to fetch monitoring params";
380 typedef json-query-method {
382 "The method to extract a value from a JSON response
384 NAMEKEY - Use the name as the key for a non-nested value.
385 JSONPATH - Use jsonpath-rw implemenation to extract a value.
386 OBJECTPATH - Use objectpath implemenation to extract a value.";
394 typedef param-value-type {
396 "The type of the parameter value";
404 typedef connection-point-type {
406 "Type of connection point
408 // VNIC_ADDR: Virtual NIC Address
409 // PNIC_ADDR: Physical NIC Address
410 // PPORT: Phsical Port.";
417 typedef widget-type {
419 "Type of the widget, typically used by the UI.";
430 typedef cpu-feature-type {
432 "Enumeration for CPU features.
434 AES: CPU supports advanced instruction set for
435 AES (Advanced Encryption Standard).
437 CAT: Cache Allocation Technology (CAT) allows
438 an Operating System, Hypervisor, or similar
439 system management agent to specify the amount
440 of L3 cache (currently the last-level cache
441 in most server and client platforms) space an
442 application can fill (as a hint to hardware
443 functionality, certain features such as power
444 management may override CAT settings).
446 CMT: Cache Monitoring Technology (CMT) allows
447 an Operating System, Hypervisor, or similar
448 system management agent to determine the
449 usage of cache based on applications running
450 on the platform. The implementation is
451 directed at L3 cache monitoring (currently
452 the last-level cache in most server and
455 DDIO: Intel Data Direct I/O (DDIO) enables
456 Ethernet server NICs and controllers talk
457 directly to the processor cache without a
458 detour via system memory. This enumeration
459 specifies if the VM requires a DDIO
503 enum REQUIRE_CLFLUSH;
531 enum REQUIRE_PCLMULQDQ;
532 enum PREFER_PCLMULQDQ;
535 enum REQUIRE_MONITOR;
573 enum REQUIRE_TSC_DEADLINE_TIMER;
574 enum PREFER_TSC_DEADLINE_TIMER;
583 enum REQUIRE_FSGSBASE;
584 enum PREFER_FSGSBASE;
597 enum REQUIRE_INVPCID;
613 container vm-flavor {
616 "Number of vcpus for the VM.";
622 "Amount of memory in MB.";
628 "Amount of disk space in GB.";
632 } //grouping vm-flavor
634 grouping vswitch-epa {
635 container vswitch-epa {
636 leaf ovs-acceleration {
638 "Specifies Open vSwitch acceleration mode.
639 MANDATORY: OVS acceleration is required
640 PREFERRED: OVS acceleration is preferred";
650 "Specifies Open vSwitch hardware offload mode.
651 MANDATORY: OVS offload is required
652 PREFERRED: OVS offload is preferred";
662 grouping hypervisor-epa {
663 container hypervisor-epa {
666 "Specifies the type of hypervisor.
682 description "Specifies the host level EPA attributes.";
685 "Host CPU model. Examples include: SandyBridge,
688 enum PREFER_WESTMERE;
689 enum REQUIRE_WESTMERE;
690 enum PREFER_SANDYBRIDGE;
691 enum REQUIRE_SANDYBRIDGE;
692 enum PREFER_IVYBRIDGE;
693 enum REQUIRE_IVYBRIDGE;
695 enum REQUIRE_HASWELL;
696 enum PREFER_BROADWELL;
697 enum REQUIRE_BROADWELL;
699 enum REQUIRE_NEHALEM;
704 enum PREFER_CORE2DUO;
705 enum REQUIRE_CORE2DUO;
710 description "Host CPU architecture.";
728 description "Host CPU Vendor.";
737 leaf cpu-socket-count {
738 description "Number of sockets on the host.";
742 leaf cpu-core-count {
743 description "Number of cores on the host.";
747 leaf cpu-core-thread-count {
748 description "Number of threads per cores on the host.";
754 description "List of CPU features.";
756 description "CPU feature.";
757 type cpu-feature-type;
762 leaf om-cpu-model-string {
763 description "Openmano CPU model string";
767 list om-cpu-feature {
769 description "List of openmano CPU features";
771 description "CPU feature";
779 description "EPA attributes for the guest";
780 container guest-epa {
781 leaf trusted-execution {
782 description "This VM should be allocated from trusted pool";
788 "Memory page allocation size. If a VM requires
789 hugepages, it should choose LARGE or SIZE_2MB
790 or SIZE_1GB. If the VM prefers hugepages it
791 should chose PREFER_LARGE.
792 LARGE : Require hugepages (either 2MB or 1GB)
793 SMALL : Doesn't require hugepages
794 SIZE_2MB : Requires 2MB hugepages
795 SIZE_1GB : Requires 1GB hugepages
796 PREFER_LARGE : Application perfers hugepages";
806 leaf cpu-pinning-policy {
808 "CPU pinning policy describes association
809 between virtual CPUs in guest and the
810 physical CPUs in the host.
811 DEDICATED : Virtual CPUs are pinned to
813 SHARED : Multiple VMs may share the
815 ANY : Any policy is acceptable for the VM";
824 leaf cpu-thread-pinning-policy {
826 "CPU thread pinning policy describes how to
827 place the guest CPUs when the host supports
829 AVOID : Avoids placing a guest on a host
831 SEPARATE: Places vCPUs on separate cores,
832 and avoids placing two vCPUs on
833 two threads of same core.
834 ISOLATE : Places each vCPU on a different core,
835 and places no vCPUs from a different
836 guest on the same core.
837 PREFER : Attempts to place vCPUs on threads
849 "List of pcie passthrough devices.";
853 "Device identifier.";
858 "Number of devices to attach to the VM.";
871 container numa-node-policy {
873 "This policy defines numa topology of the
874 guest. Specifically identifies if the guest
875 should be run on a host with one numa
876 node or multiple numa nodes. As an example
877 a guest may want 8 vcpus and 4 GB of
878 memory. But may want the vcpus and memory
879 distributed across multiple numa nodes.
880 The NUMA node 1 may run with 6 vcpus and
881 3GB, and NUMA node 2 may run with 2 vcpus
886 "The number of numa nodes to expose to the VM.";
892 "This policy specifies how the memory should
893 be allocated in a multi-node scenario.
894 STRICT : The memory must be allocated
895 strictly from the memory attached
897 PREFERRED : The memory should be allocated
898 perferentially from the memory
899 attached to the NUMA node";
910 "NUMA node identification. Typically
918 "List of vcpus to allocate on
922 description "List of vcpus ids to allocate on
929 "Memory size expressed in MB
930 for this NUMA node.";
934 choice om-numa-type {
936 "Openmano Numa type selection";
944 case paired-threads {
945 container paired-threads {
946 leaf num-paired-threads {
950 list paired-thread-ids {
952 "List of thread pairs to use in case of paired-thread numa";
980 grouping provider-network {
981 container provider-network {
982 description "Container for the provider network.";
983 leaf physical-network {
985 "Name of the phsyical network on which the provider
992 "Type of the overlay network.";
1001 leaf segmentation_id {
1009 grouping ns-service-primitive {
1010 list service-primitive {
1012 "Network service level service primitives.";
1018 "Name of the service primitive.";
1024 "List of parameters for the service primitive.";
1027 uses manotypes:primitive-parameter;
1030 list parameter-group {
1032 "Grouping of parameters which are logically grouped in UI";
1037 "Name of the parameter group";
1043 "List of parameters for the service primitive.";
1045 uses manotypes:primitive-parameter;
1049 description "Is this parameter group mandatory";
1055 list vnf-primitive-group {
1057 "List of service primitives grouped by VNF.";
1059 key "member-vnf-index-ref";
1060 leaf member-vnf-index-ref {
1062 "Reference to member-vnf within constituent-vnfds";
1068 "A reference to a vnfd. This is a
1070 ../../../../nsd:constituent-vnfd
1071 + [nsd:id = current()/../nsd:id-ref]
1073 NOTE: An issue with confd is preventing the
1074 use of xpath. Seems to be an issue with leafref
1075 to leafref, whose target is in a different module.
1076 Once that is resovled this will switched to use
1092 description "Index of this primitive";
1097 description "Name of the primitive in the VNF primitive ";
1103 leaf user-defined-script {
1105 "A user defined script.";
1111 grouping monitoring-param {
1112 list http-endpoint {
1114 "List of http endpoints to be used by monitoring params";
1118 description "The HTTP path on the management server";
1123 description "Pick HTTPS instead of HTTP , Default is false";
1129 description "The HTTP port to connect to";
1130 type inet:port-number;
1134 description "The HTTP basic auth username";
1139 description "The HTTP basic auth password";
1143 leaf polling_interval_secs {
1144 description "The HTTP polling interval in seconds";
1151 "This is the method to be performed at the uri.
1152 GET by default for action";
1154 type manotypes:http-method;
1159 description "Custom HTTP headers to put on HTTP request";
1162 description "HTTP header key";
1167 description "HTTP header value";
1173 list monitoring-param {
1175 "List of monitoring parameters at the NS level";
1185 leaf http-endpoint-ref {
1187 path "../../http-endpoint/path";
1191 leaf json-query-method {
1192 type json-query-method;
1196 container json-query-params {
1199 "The jsonpath to use to extract value from JSON structure";
1204 "The objectpath to use to extract value from JSON structure";
1209 uses monitoring-param-ui-data;
1210 uses monitoring-param-value;
1215 grouping monitoring-param-aggregation {
1216 typedef aggregation-type {
1217 description "aggregation-type";
1227 leaf aggregation-type {
1228 type aggregation-type;
1232 grouping monitoring-param-ui-data {
1238 description "A simple tag to group monitoring parameters";
1244 type manotypes:widget-type;
1252 grouping monitoring-param-value {
1254 type param-value-type;
1258 container numeric-constraints {
1261 "Minimum value for the parameter";
1266 "Maxium value for the parameter";
1271 container text-constraints {
1274 "Minimum string length for the parameter";
1279 "Maximum string length for the parameter";
1284 leaf value-integer {
1286 "Current value for an integer parameter";
1290 leaf value-decimal {
1292 "Current value for a decimal parameter";
1300 "Current value for a string parameter";
1305 grouping control-param {
1306 list control-param {
1308 "List of control parameters to manage and
1309 update the running configuration of the VNF";
1325 description "A simple tag to group control parameters";
1331 "Minimum value for the parameter";
1337 "Maxium value for the parameter";
1341 leaf current-value {
1343 "Current value for the parameter";
1349 "Step value for the parameter";
1358 type manotypes:widget-type;
1363 "This is the URL where to perform the operation";
1370 "This is the method to be performed at the uri.
1371 POST by default for action";
1373 type manotypes:http-method;
1379 "This is the operation payload or payload template as stringified
1380 JSON. This field provides the data to be sent for this operation
1388 grouping action-param {
1391 "List of action parameters to
1407 description "A simple tag to group monitoring parameter";
1413 "This is the URL where to perform the operation";
1419 "This is the method to be performed at the uri.
1420 POST by default for action";
1422 type manotypes:http-method;
1428 "This is the operation payload or payload template to be sent in
1429 the data for this operation call";
1436 grouping input-parameter {
1439 list input-parameter {
1441 "List of input parameters";
1448 "A an xpath that specfies which element in a descriptor is to be
1455 "The value that the element specified by the xpath should take when a
1456 record is created.";
1462 grouping input-parameter-xpath {
1463 list input-parameter-xpath {
1465 "List of xpaths to parameters inside the NSD
1466 the can be customized during the instantiation.";
1471 "An xpath that specifies the element in a descriptor.";
1476 description "A descriptive string";
1480 leaf default-value {
1481 description " A default value for this input parameter";
1487 grouping nfvi-metrics {
1491 "Label to show in UI";
1498 "The total number of VCPUs available.";
1504 "The VCPU utilization (percentage).";
1515 "Label to show in UI";
1522 "The amount of memory (bytes) currently in use.";
1528 "The amount of memory (bytes) available.";
1534 "The memory utilization (percentage).";
1545 "Label to show in UI";
1552 "The amount of storage (bytes) currently in use.";
1558 "The amount of storage (bytes) available.";
1564 "The storage utilization (percentage).";
1572 container external-ports {
1575 "Label to show in UI";
1577 default "EXTERNAL PORTS";
1582 "The total number of external ports.";
1587 container internal-ports {
1590 "Label to show in UI";
1592 default "INTERNAL PORTS";
1597 "The total number of internal ports.";
1605 "Label to show in UI";
1607 default "NETWORK TRAFFIC";
1610 container incoming {
1613 "Label to show in UI";
1615 default "INCOMING NETWORK TRAFFIC";
1620 "The cumulative number of incoming bytes.";
1626 "The cumulative number of incoming packets.";
1632 "The current incoming byte-rate (bytes per second).";
1640 "The current incoming packet (packets per second).";
1647 container outgoing {
1650 "Label to show in UI";
1652 default "OUTGOING NETWORK TRAFFIC";
1657 "The cumulative number of outgoing bytes.";
1663 "The cumulative number of outgoing packets.";
1669 "The current outgoing byte-rate (bytes per second).";
1677 "The current outgoing packet (packets per second).";
1686 typedef alarm-severity-type {
1687 description "An indication of the importance or ugency of the alarm";
1695 typedef alarm-metric-type {
1696 description "The type of metrics to register the alarm for";
1698 enum CPU_UTILIZATION;
1699 enum MEMORY_UTILIZATION;
1700 enum STORAGE_UTILIZATION;
1704 typedef alarm-statistic-type {
1706 "The type of statistic to used to measure a metric to determine
1707 threshold crossing for an alarm.";
1717 typedef alarm-operation-type {
1719 "The relational operator used to define whether an alarm should be
1720 triggered when, say, the metric statistic goes above or below a
1723 enum GE; // greater than or equal
1724 enum LE; // less than or equal
1725 enum GT; // greater than
1726 enum LT; // less than
1734 "This field is reserved for the identifier assigned by the cloud
1741 description "A human readable string to identify the alarm";
1746 description "A string containing a description of this alarm";
1752 "The identifier of the VDUR that the alarm is associated with";
1764 list insufficient-data {
1781 "This flag indicates whether the alarm should be repeatedly emitted
1782 while the associated threshold has been crossed.";
1790 "This flag indicates whether the alarm has been enabled or
1798 description "A measure of the important or urgency of the alarm";
1799 type alarm-severity-type;
1803 description "The metric to be tracked by this alarm.";
1804 type alarm-metric-type;
1808 description "The type of metric statistic that is tracked by this alarm";
1809 type alarm-statistic-type;
1814 "The relational operator that defines whether the alarm should be
1815 triggered when the metric statistic is, say, above or below the
1816 specified threshold value.";
1817 type alarm-operation-type;
1822 "This value defines the threshold that, if crossed, will trigger
1831 "The period defines the length of time (seconds) that the metric
1832 data are collected over in oreder to evaluate the chosen
1839 "This is the number of samples of the metric statistic used to
1840 evaluate threshold crossing. Each sample or evaluation is equal to
1841 the metric statistic obtained for a given period. This can be used
1842 to mitigate spikes in the metric that may skew the statistic of
1848 typedef cloud-account-type {
1849 description "cloud account type";
1853 enum cloudsim_proxy;
1862 grouping host-aggregate {
1863 list host-aggregate {
1864 description "Name of the Host Aggregate";
1870 leaf metadata-value {
1876 grouping placement-group-input {
1878 type manotypes:cloud-account-type;
1880 choice cloud-provider {
1882 container availability-zone {
1883 description "Name of the Availability Zone";
1888 container server-group {
1889 description "Name of the Affinity/Anti-Affinity Server Group";
1894 uses host-aggregate;
1897 leaf aws-construct {
1902 leaf openmano-construct {
1907 leaf vsphere-construct {
1912 leaf mock-construct {
1917 leaf cloudsim-construct {
1924 grouping placement-group-info {
1929 "Place group construct to define the compute resource placement strategy
1930 in cloud environment";
1935 description "This is free text space used to describe the intent/rationale
1936 behind this placement group. This is for human consumption only";
1942 "Strategy associated with this placement group
1943 Following values are possible
1944 - COLOCATION: Colocation strategy imply intent to share the physical
1945 infrastructure (hypervisor/network) among all members
1947 - ISOLATION: Isolation strategy imply intent to not share the physical
1948 infrastructure (hypervisor/network) among the members
1955 default "COLOCATION";
1959 grouping ip-profile-info {
1960 description "Grouping for IP-Profile";
1961 container ip-profile-params {
1964 type inet:ip-version;
1968 leaf subnet-address {
1969 description "Subnet IP prefix associated with IP Profile";
1970 type inet:ip-prefix;
1973 leaf gateway-address {
1974 description "IP Address of the default gateway associated with IP Profile";
1975 type inet:ip-address;
1978 leaf security-group {
1979 description "Name of the security group";
1986 description "List of DNS Servers associated with IP Profile";
1987 type inet:ip-address;
1991 container dhcp-params {
1993 description "This flag indicates if DHCP is enabled or not";
1998 leaf start-address {
1999 description "Start IP address of the IP-Address range associated with DHCP domain";
2000 type inet:ip-address;
2004 description "Size of the DHCP pool associated with DHCP domain";
2009 leaf subnet-prefix-pool {
2010 description "VIM Specific reference to pre-created subnet prefix";
2016 grouping ip-profile-list {
2019 "List of IP Profiles.
2020 IP Profile describes the IP characteristics for the Virtual-Link";
2025 description "Name of the IP-Profile";
2030 description "Description for IP profile";
2034 uses ip-profile-info;