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;
283 leaf user-defined-script {
285 "A user defined script. If user defined script is defined,
286 the script will be executed using bash";
291 list initial-config-primitive {
292 rwpb:msg-new InitialConfigPrimitive;
294 "Initial set of configuration primitives.";
298 "Sequence number for the configuration primitive.";
302 choice primtive-type {
303 case primtive-definition {
306 "Name of the configuration primitive.";
310 uses primitive-parameter-value;
314 leaf config-primitive-ref {
316 "Reference to a config primitive name.
317 NOTE: The config primitive referred should have
318 all the input paramaters predefined either
319 with default values or dependency references.";
321 path "../../config-primitive/name";
328 leaf config-template {
330 "Configuration template for each VNF";
334 } // END - grouping vnf-configuration
336 typedef virtual-link-type {
338 "Type of virtual link
339 ELAN: A multipoint service connecting a set of VNFs
340 // ELINE: For a simple point to point connection
341 // between a VNF and the existing network.
342 // ETREE: A multipoint service connecting one or
343 // more roots and a set of leaves, but
344 // preventing inter-leaf communication.";
352 grouping named-value {
362 typedef http-method {
364 "Type of HTTP operation";
378 "Type of API to fetch monitoring params";
387 typedef json-query-method {
389 "The method to extract a value from a JSON response
391 NAMEKEY - Use the name as the key for a non-nested value.
392 JSONPATH - Use jsonpath-rw implemenation to extract a value.
393 OBJECTPATH - Use objectpath implemenation to extract a value.";
401 typedef param-value-type {
403 "The type of the parameter value";
411 typedef connection-point-type {
413 "Type of connection point
415 // VNIC_ADDR: Virtual NIC Address
416 // PNIC_ADDR: Physical NIC Address
417 // PPORT: Phsical Port.";
424 typedef widget-type {
426 "Type of the widget, typically used by the UI.";
437 typedef cpu-feature-type {
439 "Enumeration for CPU features.
441 AES: CPU supports advanced instruction set for
442 AES (Advanced Encryption Standard).
444 CAT: Cache Allocation Technology (CAT) allows
445 an Operating System, Hypervisor, or similar
446 system management agent to specify the amount
447 of L3 cache (currently the last-level cache
448 in most server and client platforms) space an
449 application can fill (as a hint to hardware
450 functionality, certain features such as power
451 management may override CAT settings).
453 CMT: Cache Monitoring Technology (CMT) allows
454 an Operating System, Hypervisor, or similar
455 system management agent to determine the
456 usage of cache based on applications running
457 on the platform. The implementation is
458 directed at L3 cache monitoring (currently
459 the last-level cache in most server and
462 DDIO: Intel Data Direct I/O (DDIO) enables
463 Ethernet server NICs and controllers talk
464 directly to the processor cache without a
465 detour via system memory. This enumeration
466 specifies if the VM requires a DDIO
510 enum REQUIRE_CLFLUSH;
538 enum REQUIRE_PCLMULQDQ;
539 enum PREFER_PCLMULQDQ;
542 enum REQUIRE_MONITOR;
580 enum REQUIRE_TSC_DEADLINE_TIMER;
581 enum PREFER_TSC_DEADLINE_TIMER;
590 enum REQUIRE_FSGSBASE;
591 enum PREFER_FSGSBASE;
604 enum REQUIRE_INVPCID;
620 container vm-flavor {
623 "Number of vcpus for the VM.";
629 "Amount of memory in MB.";
635 "Amount of disk space in GB.";
639 } //grouping vm-flavor
641 grouping vswitch-epa {
642 container vswitch-epa {
643 leaf ovs-acceleration {
645 "Specifies Open vSwitch acceleration mode.
646 MANDATORY: OVS acceleration is required
647 PREFERRED: OVS acceleration is preferred";
657 "Specifies Open vSwitch hardware offload mode.
658 MANDATORY: OVS offload is required
659 PREFERRED: OVS offload is preferred";
669 grouping hypervisor-epa {
670 container hypervisor-epa {
673 "Specifies the type of hypervisor.
689 description "Specifies the host level EPA attributes.";
692 "Host CPU model. Examples include: SandyBridge,
695 enum PREFER_WESTMERE;
696 enum REQUIRE_WESTMERE;
697 enum PREFER_SANDYBRIDGE;
698 enum REQUIRE_SANDYBRIDGE;
699 enum PREFER_IVYBRIDGE;
700 enum REQUIRE_IVYBRIDGE;
702 enum REQUIRE_HASWELL;
703 enum PREFER_BROADWELL;
704 enum REQUIRE_BROADWELL;
706 enum REQUIRE_NEHALEM;
711 enum PREFER_CORE2DUO;
712 enum REQUIRE_CORE2DUO;
717 description "Host CPU architecture.";
735 description "Host CPU Vendor.";
744 leaf cpu-socket-count {
745 description "Number of sockets on the host.";
749 leaf cpu-core-count {
750 description "Number of cores on the host.";
754 leaf cpu-core-thread-count {
755 description "Number of threads per cores on the host.";
761 description "List of CPU features.";
763 description "CPU feature.";
764 type cpu-feature-type;
769 leaf om-cpu-model-string {
770 description "Openmano CPU model string";
774 list om-cpu-feature {
776 description "List of openmano CPU features";
778 description "CPU feature";
786 description "EPA attributes for the guest";
787 container guest-epa {
788 leaf trusted-execution {
789 description "This VM should be allocated from trusted pool";
795 "Memory page allocation size. If a VM requires
796 hugepages, it should choose LARGE or SIZE_2MB
797 or SIZE_1GB. If the VM prefers hugepages it
798 should chose PREFER_LARGE.
799 LARGE : Require hugepages (either 2MB or 1GB)
800 SMALL : Doesn't require hugepages
801 SIZE_2MB : Requires 2MB hugepages
802 SIZE_1GB : Requires 1GB hugepages
803 PREFER_LARGE : Application perfers hugepages";
813 leaf cpu-pinning-policy {
815 "CPU pinning policy describes association
816 between virtual CPUs in guest and the
817 physical CPUs in the host.
818 DEDICATED : Virtual CPUs are pinned to
820 SHARED : Multiple VMs may share the
822 ANY : Any policy is acceptable for the VM";
831 leaf cpu-thread-pinning-policy {
833 "CPU thread pinning policy describes how to
834 place the guest CPUs when the host supports
836 AVOID : Avoids placing a guest on a host
838 SEPARATE: Places vCPUs on separate cores,
839 and avoids placing two vCPUs on
840 two threads of same core.
841 ISOLATE : Places each vCPU on a different core,
842 and places no vCPUs from a different
843 guest on the same core.
844 PREFER : Attempts to place vCPUs on threads
856 "List of pcie passthrough devices.";
860 "Device identifier.";
865 "Number of devices to attach to the VM.";
878 container numa-node-policy {
880 "This policy defines numa topology of the
881 guest. Specifically identifies if the guest
882 should be run on a host with one numa
883 node or multiple numa nodes. As an example
884 a guest may want 8 vcpus and 4 GB of
885 memory. But may want the vcpus and memory
886 distributed across multiple numa nodes.
887 The NUMA node 1 may run with 6 vcpus and
888 3GB, and NUMA node 2 may run with 2 vcpus
893 "The number of numa nodes to expose to the VM.";
899 "This policy specifies how the memory should
900 be allocated in a multi-node scenario.
901 STRICT : The memory must be allocated
902 strictly from the memory attached
904 PREFERRED : The memory should be allocated
905 perferentially from the memory
906 attached to the NUMA node";
917 "NUMA node identification. Typically
925 "List of vcpus to allocate on
929 description "List of vcpus ids to allocate on
936 "Memory size expressed in MB
937 for this NUMA node.";
941 choice om-numa-type {
943 "Openmano Numa type selection";
951 case paired-threads {
952 container paired-threads {
953 leaf num-paired-threads {
957 list paired-thread-ids {
959 "List of thread pairs to use in case of paired-thread numa";
987 grouping provider-network {
988 container provider-network {
989 description "Container for the provider network.";
990 leaf physical-network {
992 "Name of the phsyical network on which the provider
999 "Type of the overlay network.";
1008 leaf segmentation_id {
1016 grouping ns-service-primitive {
1017 list service-primitive {
1019 "Network service level service primitives.";
1025 "Name of the service primitive.";
1031 "List of parameters for the service primitive.";
1034 uses manotypes:primitive-parameter;
1037 list parameter-group {
1039 "Grouping of parameters which are logically grouped in UI";
1044 "Name of the parameter group";
1050 "List of parameters for the service primitive.";
1052 uses manotypes:primitive-parameter;
1056 description "Is this parameter group mandatory";
1062 list vnf-primitive-group {
1064 "List of service primitives grouped by VNF.";
1066 key "member-vnf-index-ref";
1067 leaf member-vnf-index-ref {
1069 "Reference to member-vnf within constituent-vnfds";
1075 "A reference to a vnfd. This is a
1077 ../../../../nsd:constituent-vnfd
1078 + [nsd:id = current()/../nsd:id-ref]
1080 NOTE: An issue with confd is preventing the
1081 use of xpath. Seems to be an issue with leafref
1082 to leafref, whose target is in a different module.
1083 Once that is resovled this will switched to use
1099 description "Index of this primitive";
1104 description "Name of the primitive in the VNF primitive ";
1110 leaf user-defined-script {
1112 "A user defined script.";
1118 grouping monitoring-param {
1119 list http-endpoint {
1121 "List of http endpoints to be used by monitoring params";
1125 description "The HTTP path on the management server";
1130 description "Pick HTTPS instead of HTTP , Default is false";
1136 description "The HTTP port to connect to";
1137 type inet:port-number;
1141 description "The HTTP basic auth username";
1146 description "The HTTP basic auth password";
1150 leaf polling_interval_secs {
1151 description "The HTTP polling interval in seconds";
1158 "This is the method to be performed at the uri.
1159 GET by default for action";
1161 type manotypes:http-method;
1166 description "Custom HTTP headers to put on HTTP request";
1169 description "HTTP header key";
1174 description "HTTP header value";
1180 list monitoring-param {
1182 "List of monitoring parameters at the NS level";
1192 leaf http-endpoint-ref {
1194 path "../../http-endpoint/path";
1198 leaf json-query-method {
1199 type json-query-method;
1203 container json-query-params {
1206 "The jsonpath to use to extract value from JSON structure";
1211 "The objectpath to use to extract value from JSON structure";
1216 uses monitoring-param-ui-data;
1217 uses monitoring-param-value;
1222 grouping monitoring-param-aggregation {
1223 typedef aggregation-type {
1224 description "aggregation-type";
1234 leaf aggregation-type {
1235 type aggregation-type;
1239 grouping monitoring-param-ui-data {
1245 description "A simple tag to group monitoring parameters";
1251 type manotypes:widget-type;
1259 grouping monitoring-param-value {
1261 type param-value-type;
1265 container numeric-constraints {
1268 "Minimum value for the parameter";
1273 "Maxium value for the parameter";
1278 container text-constraints {
1281 "Minimum string length for the parameter";
1286 "Maximum string length for the parameter";
1291 leaf value-integer {
1293 "Current value for an integer parameter";
1297 leaf value-decimal {
1299 "Current value for a decimal parameter";
1307 "Current value for a string parameter";
1312 grouping control-param {
1313 list control-param {
1315 "List of control parameters to manage and
1316 update the running configuration of the VNF";
1332 description "A simple tag to group control parameters";
1338 "Minimum value for the parameter";
1344 "Maxium value for the parameter";
1348 leaf current-value {
1350 "Current value for the parameter";
1356 "Step value for the parameter";
1365 type manotypes:widget-type;
1370 "This is the URL where to perform the operation";
1377 "This is the method to be performed at the uri.
1378 POST by default for action";
1380 type manotypes:http-method;
1386 "This is the operation payload or payload template as stringified
1387 JSON. This field provides the data to be sent for this operation
1395 grouping action-param {
1398 "List of action parameters to
1414 description "A simple tag to group monitoring parameter";
1420 "This is the URL where to perform the operation";
1426 "This is the method to be performed at the uri.
1427 POST by default for action";
1429 type manotypes:http-method;
1435 "This is the operation payload or payload template to be sent in
1436 the data for this operation call";
1443 grouping input-parameter {
1446 list input-parameter {
1448 "List of input parameters";
1455 "A an xpath that specfies which element in a descriptor is to be
1462 "The value that the element specified by the xpath should take when a
1463 record is created.";
1469 grouping input-parameter-xpath {
1470 list input-parameter-xpath {
1472 "List of xpaths to parameters inside the NSD
1473 the can be customized during the instantiation.";
1478 "An xpath that specifies the element in a descriptor.";
1483 description "A descriptive string";
1487 leaf default-value {
1488 description " A default value for this input parameter";
1494 grouping nfvi-metrics {
1498 "Label to show in UI";
1505 "The total number of VCPUs available.";
1511 "The VCPU utilization (percentage).";
1522 "Label to show in UI";
1529 "The amount of memory (bytes) currently in use.";
1535 "The amount of memory (bytes) available.";
1541 "The memory utilization (percentage).";
1552 "Label to show in UI";
1559 "The amount of storage (bytes) currently in use.";
1565 "The amount of storage (bytes) available.";
1571 "The storage utilization (percentage).";
1579 container external-ports {
1582 "Label to show in UI";
1584 default "EXTERNAL PORTS";
1589 "The total number of external ports.";
1594 container internal-ports {
1597 "Label to show in UI";
1599 default "INTERNAL PORTS";
1604 "The total number of internal ports.";
1612 "Label to show in UI";
1614 default "NETWORK TRAFFIC";
1617 container incoming {
1620 "Label to show in UI";
1622 default "INCOMING NETWORK TRAFFIC";
1627 "The cumulative number of incoming bytes.";
1633 "The cumulative number of incoming packets.";
1639 "The current incoming byte-rate (bytes per second).";
1647 "The current incoming packet (packets per second).";
1654 container outgoing {
1657 "Label to show in UI";
1659 default "OUTGOING NETWORK TRAFFIC";
1664 "The cumulative number of outgoing bytes.";
1670 "The cumulative number of outgoing packets.";
1676 "The current outgoing byte-rate (bytes per second).";
1684 "The current outgoing packet (packets per second).";
1693 typedef alarm-severity-type {
1694 description "An indication of the importance or ugency of the alarm";
1702 typedef alarm-metric-type {
1703 description "The type of metrics to register the alarm for";
1705 enum CPU_UTILIZATION;
1706 enum MEMORY_UTILIZATION;
1707 enum STORAGE_UTILIZATION;
1711 typedef alarm-statistic-type {
1713 "The type of statistic to used to measure a metric to determine
1714 threshold crossing for an alarm.";
1724 typedef alarm-operation-type {
1726 "The relational operator used to define whether an alarm should be
1727 triggered when, say, the metric statistic goes above or below a
1730 enum GE; // greater than or equal
1731 enum LE; // less than or equal
1732 enum GT; // greater than
1733 enum LT; // less than
1741 "This field is reserved for the identifier assigned by the cloud
1748 description "A human readable string to identify the alarm";
1753 description "A string containing a description of this alarm";
1759 "The identifier of the VDUR that the alarm is associated with";
1771 list insufficient-data {
1788 "This flag indicates whether the alarm should be repeatedly emitted
1789 while the associated threshold has been crossed.";
1797 "This flag indicates whether the alarm has been enabled or
1805 description "A measure of the important or urgency of the alarm";
1806 type alarm-severity-type;
1810 description "The metric to be tracked by this alarm.";
1811 type alarm-metric-type;
1815 description "The type of metric statistic that is tracked by this alarm";
1816 type alarm-statistic-type;
1821 "The relational operator that defines whether the alarm should be
1822 triggered when the metric statistic is, say, above or below the
1823 specified threshold value.";
1824 type alarm-operation-type;
1829 "This value defines the threshold that, if crossed, will trigger
1838 "The period defines the length of time (seconds) that the metric
1839 data are collected over in oreder to evaluate the chosen
1846 "This is the number of samples of the metric statistic used to
1847 evaluate threshold crossing. Each sample or evaluation is equal to
1848 the metric statistic obtained for a given period. This can be used
1849 to mitigate spikes in the metric that may skew the statistic of
1855 typedef cloud-account-type {
1856 description "cloud account type";
1860 enum cloudsim_proxy;
1869 grouping host-aggregate {
1870 list host-aggregate {
1871 description "Name of the Host Aggregate";
1877 leaf metadata-value {
1883 grouping placement-group-input {
1885 type manotypes:cloud-account-type;
1887 choice cloud-provider {
1889 container availability-zone {
1890 description "Name of the Availability Zone";
1895 container server-group {
1896 description "Name of the Affinity/Anti-Affinity Server Group";
1901 uses host-aggregate;
1904 leaf aws-construct {
1909 leaf openmano-construct {
1914 leaf vsphere-construct {
1919 leaf mock-construct {
1924 leaf cloudsim-construct {
1931 grouping placement-group-info {
1936 "Place group construct to define the compute resource placement strategy
1937 in cloud environment";
1942 description "This is free text space used to describe the intent/rationale
1943 behind this placement group. This is for human consumption only";
1949 "Strategy associated with this placement group
1950 Following values are possible
1951 - COLOCATION: Colocation strategy imply intent to share the physical
1952 infrastructure (hypervisor/network) among all members
1954 - ISOLATION: Isolation strategy imply intent to not share the physical
1955 infrastructure (hypervisor/network) among the members
1962 default "COLOCATION";
1966 grouping ip-profile-info {
1967 description "Grouping for IP-Profile";
1968 container ip-profile-params {
1971 type inet:ip-version;
1975 leaf subnet-address {
1976 description "Subnet IP prefix associated with IP Profile";
1977 type inet:ip-prefix;
1980 leaf gateway-address {
1981 description "IP Address of the default gateway associated with IP Profile";
1982 type inet:ip-address;
1985 leaf security-group {
1986 description "Name of the security group";
1993 description "List of DNS Servers associated with IP Profile";
1994 type inet:ip-address;
1998 container dhcp-params {
2000 description "This flag indicates if DHCP is enabled or not";
2005 leaf start-address {
2006 description "Start IP address of the IP-Address range associated with DHCP domain";
2007 type inet:ip-address;
2011 description "Size of the DHCP pool associated with DHCP domain";
2016 leaf subnet-prefix-pool {
2017 description "VIM Specific reference to pre-created subnet prefix";
2023 grouping ip-profile-list {
2026 "List of IP Profiles.
2027 IP Profile describes the IP characteristics for the Virtual-Link";
2032 description "Name of the IP-Profile";
2037 description "Description for IP profile";
2041 uses ip-profile-info;