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 {
54 "Name of the parameter.";
60 "Data type associated with the name.";
61 type manotypes:parameter-data-type;
65 description "Is this field mandatory";
71 description "The default value for this field";
76 description "NSD Parameter pool name to use for this paramter";
82 "The value should be greyed out by the UI.
83 Only applies to parameters with default values.";
89 "The value should be hidden by the UI.
90 Only applies to parameters with default values.";
96 grouping vnf-configuration {
97 container vnf-configuration {
98 ////rwpb:msg-new VnfConfiguration;
100 "Information regarding the VNF configuration
103 choice config-method {
105 "Defines the configuration method for the VNF.";
108 "Use NETCONF for configuring the VNF.";
112 "Netconf configuration target";
121 "Protocol to use for netconf (e.g. ssh)";
130 "Port for the netconf server.";
131 type inet:port-number;
138 "Use REST for configuring the VNF.";
142 "Port for the REST server.";
143 type inet:port-number;
150 "Use custom script for configuring the VNF.
151 This script is executed in the context of
156 "Script type - currently supported : bash, expect";
167 "Configure the VNF through Juju.";
170 description "Juju charm to use with the VNF.";
177 container config-access {
178 leaf mgmt-ip-address {
180 "IP address to be used to configure this VNF,
181 optional if it is possible to resolve dynamically.";
182 type inet:ip-address;
187 "username for configuration.";
193 "Password for configuration access authentication.";
198 container config-attributes {
200 "Miscelaneous input parameters to be considered
201 while processing the NSD to apply configuration";
203 leaf config-priority {
205 "Configuration priority - order of confgiration
206 to be applied to each VNF in this NS,
207 low number gets precedence over high number";
213 "Wait (seconds) before applying the configuration to VNF";
218 list config-primitive {
219 ////rwpb:msg-new ConfigPrimitive;
221 "List of configuration primitives supported by the
222 configuration agent for this VNF.";
227 "Name of the configuration primitive.";
233 "List of parameters to the configuration primitive.";
235 uses primitive-parameter;
239 list initial-config-primitive {
240 ////rwpb:msg-new InitialConfigPrimitive;
242 "Initial set of configuration primitives.";
246 "Sequence number for the configuration primitive.";
252 "Name of the configuration primitive.";
268 leaf config-template {
270 "Configuration template for each VNF";
274 } // END - grouping vnf-configuration
276 typedef virtual-link-type {
278 "Type of virtual link
279 ELAN: A multipoint service connecting a set of VNFs
280 // ELINE: For a simple point to point connection
281 // between a VNF and the existing network.
282 // ETREE: A multipoint service connecting one or
283 // more roots and a set of leaves, but
284 // preventing inter-leaf communication.";
292 grouping named-value {
302 typedef http-method {
304 "Type of HTTP operation";
318 "Type of API to fetch monitoring params";
327 typedef json-query-method {
329 "The method to extract a value from a JSON response
331 NAMEKEY - Use the name as the key for a non-nested value.
332 JSONPATH - Use jsonpath-rw implemenation to extract a value.
333 OBJECTPATH - Use objectpath implemenation to extract a value.";
341 typedef param-value-type {
343 "The type of the parameter value";
351 typedef connection-point-type {
353 "Type of connection point
355 // VNIC_ADDR: Virtual NIC Address
356 // PNIC_ADDR: Physical NIC Address
357 // PPORT: Phsical Port.";
364 typedef widget-type {
366 "Type of the widget, typically used by the UI.";
377 typedef cpu-feature-type {
379 "Enumeration for CPU features.
381 AES: CPU supports advanced instruction set for
382 AES (Advanced Encryption Standard).
384 CAT: Cache Allocation Technology (CAT) allows
385 an Operating System, Hypervisor, or similar
386 system management agent to specify the amount
387 of L3 cache (currently the last-level cache
388 in most server and client platforms) space an
389 application can fill (as a hint to hardware
390 functionality, certain features such as power
391 management may override CAT settings).
393 CMT: Cache Monitoring Technology (CMT) allows
394 an Operating System, Hypervisor, or similar
395 system management agent to determine the
396 usage of cache based on applications running
397 on the platform. The implementation is
398 directed at L3 cache monitoring (currently
399 the last-level cache in most server and
402 DDIO: Intel Data Direct I/O (DDIO) enables
403 Ethernet server NICs and controllers talk
404 directly to the processor cache without a
405 detour via system memory. This enumeration
406 specifies if the VM requires a DDIO
450 enum REQUIRE_CLFLUSH;
478 enum REQUIRE_PCLMULQDQ;
479 enum PREFER_PCLMULQDQ;
482 enum REQUIRE_MONITOR;
520 enum REQUIRE_TSC_DEADLINE_TIMER;
521 enum PREFER_TSC_DEADLINE_TIMER;
530 enum REQUIRE_FSGSBASE;
531 enum PREFER_FSGSBASE;
544 enum REQUIRE_INVPCID;
560 container vm-flavor {
563 "Number of vcpus for the VM.";
569 "Amount of memory in MB.";
575 "Amount of disk space in GB.";
579 } //grouping vm-flavor
581 grouping vswitch-epa {
582 container vswitch-epa {
583 leaf ovs-acceleration {
585 "Specifies Open vSwitch acceleration mode.
586 MANDATORY: OVS acceleration is required
587 PREFERRED: OVS acceleration is preferred";
597 "Specifies Open vSwitch hardware offload mode.
598 MANDATORY: OVS offload is required
599 PREFERRED: OVS offload is preferred";
609 grouping hypervisor-epa {
610 container hypervisor-epa {
613 "Specifies the type of hypervisor.
629 description "Specifies the host level EPA attributes.";
632 "Host CPU model. Examples include: SandyBridge,
635 enum PREFER_WESTMERE;
636 enum REQUIRE_WESTMERE;
637 enum PREFER_SANDYBRIDGE;
638 enum REQUIRE_SANDYBRIDGE;
639 enum PREFER_IVYBRIDGE;
640 enum REQUIRE_IVYBRIDGE;
642 enum REQUIRE_HASWELL;
643 enum PREFER_BROADWELL;
644 enum REQUIRE_BROADWELL;
646 enum REQUIRE_NEHALEM;
651 enum PREFER_CORE2DUO;
652 enum REQUIRE_CORE2DUO;
657 description "Host CPU architecture.";
675 description "Host CPU Vendor.";
684 leaf cpu-socket-count {
685 description "Number of sockets on the host.";
689 leaf cpu-core-count {
690 description "Number of cores on the host.";
694 leaf cpu-core-thread-count {
695 description "Number of threads per cores on the host.";
699 leaf-list cpu-feature {
701 "List of CPU features.";
702 type manotypes:cpu-feature-type;
706 leaf om-cpu-model-string {
707 description "Openmano CPU model string";
711 leaf-list om-cpu-feature {
712 description "Openmano CPU features";
719 description "EPA attributes for the guest";
720 container guest-epa {
721 leaf trusted-execution {
722 description "This VM should be allocated from trusted pool";
728 "Memory page allocation size. If a VM requires
729 hugepages, it should choose LARGE or SIZE_2MB
730 or SIZE_1GB. If the VM prefers hugepages it
731 should chose PREFER_LARGE.
732 LARGE : Require hugepages (either 2MB or 1GB)
733 SMALL : Doesn't require hugepages
734 SIZE_2MB : Requires 2MB hugepages
735 SIZE_1GB : Requires 1GB hugepages
736 PREFER_LARGE : Application perfers hugepages";
746 leaf cpu-pinning-policy {
748 "CPU pinning policy describes association
749 between virtual CPUs in guest and the
750 physical CPUs in the host.
751 DEDICATED : Virtual CPUs are pinned to
753 SHARED : Multiple VMs may share the
755 ANY : Any policy is acceptable for the VM";
764 leaf cpu-thread-pinning-policy {
766 "CPU thread pinning policy describes how to
767 place the guest CPUs when the host supports
769 AVOID : Avoids placing a guest on a host
771 SEPARATE: Places vCPUs on separate cores,
772 and avoids placing two vCPUs on
773 two threads of same core.
774 ISOLATE : Places each vCPU on a different core,
775 and places no vCPUs from a different
776 guest on the same core.
777 PREFER : Attempts to place vCPUs on threads
789 "List of pcie passthrough devices.";
793 "Device identifier.";
798 "Number of devices to attach to the VM.";
811 container numa-node-policy {
813 "This policy defines numa topology of the
814 guest. Specifically identifies if the guest
815 should be run on a host with one numa
816 node or multiple numa nodes. As an example
817 a guest may want 8 vcpus and 4 GB of
818 memory. But may want the vcpus and memory
819 distributed across multiple numa nodes.
820 The NUMA node 1 may run with 6 vcpus and
821 3GB, and NUMA node 2 may run with 2 vcpus
826 "The number of numa nodes to expose to the VM.";
832 "This policy specifies how the memory should
833 be allocated in a multi-node scenario.
834 STRICT : The memory must be allocated
835 strictly from the memory attached
837 PREFERRED : The memory should be allocated
838 perferentially from the memory
839 attached to the NUMA node";
850 "NUMA node identification. Typically
857 "List of vcpus to allocate on
864 "Memory size expressed in MB
865 for this NUMA node.";
869 choice om-numa-type {
871 "Openmano Numa type selection";
879 case paired-threads {
880 container paired-threads {
881 leaf num-paired-threads {
885 list paired-thread-ids {
887 "List of thread pairs to use in case of paired-thread numa";
915 grouping provider-network {
916 container provider-network {
917 description "Container for the provider network.";
918 leaf physical-network {
920 "Name of the phsyical network on which the provider
927 "Type of the overlay network.";
936 leaf segmentation_id {
943 grouping config-primitive {
944 list config-primitive {
946 "Network service level configuration primitives.";
952 "Name of the configuration primitive.";
958 "List of parameters to the configuration primitive.";
961 uses manotypes:primitive-parameter;
964 list parameter-group {
966 "Grouping of parameters which are logically grouped in UI";
971 "Name of the parameter group";
977 "List of parameters to the configuration primitive.";
979 uses manotypes:primitive-parameter;
983 description "Is this parameter group mandatory";
989 list vnf-primitive-group {
991 "List of configuration primitives grouped by VNF.";
993 key "member-vnf-index-ref";
994 leaf member-vnf-index-ref {
996 "Reference to member-vnf within constituent-vnfds";
1002 "A reference to a vnfd. This is a
1004 ../../../../nsd:constituent-vnfd
1005 + [nsd:id = current()/../nsd:id-ref]
1007 NOTE: An issue with confd is preventing the
1008 use of xpath. Seems to be an issue with leafref
1009 to leafref, whose target is in a different module.
1010 Once that is resovled this will switched to use
1026 description "Index of this primitive";
1031 description "Name of the primitive in the VNF primitive ";
1037 leaf user-defined-script {
1039 "A user defined script.";
1045 grouping monitoring-param {
1046 list http-endpoint {
1048 "List of http endpoints to be used by monitoring params";
1052 description "The HTTP path on the management server";
1057 description "Pick HTTPS instead of HTTP , Default is false";
1063 description "The HTTP port to connect to";
1064 type inet:port-number;
1068 description "The HTTP basic auth username";
1073 description "The HTTP basic auth password";
1077 leaf polling_interval_secs {
1078 description "The HTTP polling interval in seconds";
1085 "This is the method to be performed at the uri.
1086 GET by default for action";
1088 type manotypes:http-method;
1093 description "Custom HTTP headers to put on HTTP request";
1096 description "HTTP header key";
1101 description "HTTP header value";
1107 list monitoring-param {
1109 "List of monitoring parameters at the NS level";
1119 leaf http-endpoint-ref {
1121 path "../../http-endpoint/path";
1125 leaf json-query-method {
1126 type manotypes:json-query-method;
1130 container json-query-params {
1133 "The jsonpath to use to extract value from JSON structure";
1138 "The objectpath to use to extract value from JSON structure";
1148 description "A simple tag to group monitoring parameters";
1153 type manotypes:param-value-type;
1157 container numeric-constraints {
1160 "Minimum value for the parameter";
1165 "Maxium value for the parameter";
1170 container text-constraints {
1173 "Minimum string length for the parameter";
1178 "Maximum string length for the parameter";
1183 leaf value-integer {
1185 "Current value for an integer parameter";
1189 leaf value-decimal {
1191 "Current value for a decimal parameter";
1199 "Current value for a string parameter";
1204 type manotypes:widget-type;
1213 grouping control-param {
1214 list control-param {
1216 "List of control parameters to manage and
1217 update the running configuration of the VNF";
1233 description "A simple tag to group control parameters";
1239 "Minimum value for the parameter";
1245 "Maxium value for the parameter";
1249 leaf current-value {
1251 "Current value for the parameter";
1257 "Step value for the parameter";
1266 type manotypes:widget-type;
1271 "This is the URL where to perform the operation";
1278 "This is the method to be performed at the uri.
1279 POST by default for action";
1281 type manotypes:http-method;
1287 "This is the operation payload or payload template as stringified
1288 JSON. This field provides the data to be sent for this operation
1296 grouping action-param {
1299 "List of action parameters to
1315 description "A simple tag to group monitoring parameter";
1321 "This is the URL where to perform the operation";
1327 "This is the method to be performed at the uri.
1328 POST by default for action";
1330 type manotypes:http-method;
1336 "This is the operation payload or payload template to be sent in
1337 the data for this operation call";
1344 grouping input-parameter {
1347 list input-parameter {
1349 "List of input parameters";
1356 "A an xpath that specfies which element in a descriptor is to be
1363 "The value that the element specified by the xpath should take when a
1364 record is created.";
1370 grouping input-parameter-xpath {
1371 list input-parameter-xpath {
1373 "List of xpaths to parameters inside the NSD
1374 the can be customized during the instantiation.";
1379 "An xpath that specifies the element in a descriptor.";
1384 description "A descriptive string";
1388 leaf default-value {
1389 description " A default value for this input parameter";
1395 grouping nfvi-metrics {
1399 "Label to show in UI";
1406 "The total number of VCPUs available.";
1412 "The VCPU utilization (percentage).";
1423 "Label to show in UI";
1430 "The amount of memory (bytes) currently in use.";
1436 "The amount of memory (bytes) available.";
1442 "The memory utilization (percentage).";
1453 "Label to show in UI";
1460 "The amount of storage (bytes) currently in use.";
1466 "The amount of storage (bytes) available.";
1472 "The storage utilization (percentage).";
1480 container external-ports {
1483 "Label to show in UI";
1485 default "EXTERNAL PORTS";
1490 "The total number of external ports.";
1495 container internal-ports {
1498 "Label to show in UI";
1500 default "INTERNAL PORTS";
1505 "The total number of internal ports.";
1513 "Label to show in UI";
1515 default "NETWORK TRAFFIC";
1518 container incoming {
1521 "Label to show in UI";
1523 default "INCOMING NETWORK TRAFFIC";
1528 "The cumulative number of incoming bytes.";
1534 "The cumulative number of incoming packets.";
1540 "The current incoming byte-rate (bytes per second).";
1548 "The current incoming packet (packets per second).";
1555 container outgoing {
1558 "Label to show in UI";
1560 default "OUTGOING NETWORK TRAFFIC";
1565 "The cumulative number of outgoing bytes.";
1571 "The cumulative number of outgoing packets.";
1577 "The current outgoing byte-rate (bytes per second).";
1585 "The current outgoing packet (packets per second).";
1594 typedef alarm-severity-type {
1595 description "An indication of the importance or ugency of the alarm";
1603 typedef alarm-metric-type {
1604 description "The type of metrics to register the alarm for";
1606 enum CPU_UTILIZATION;
1607 enum MEMORY_UTILIZATION;
1608 enum STORAGE_UTILIZATION;
1612 typedef alarm-statistic-type {
1614 "The type of statistic to used to measure a metric to determine
1615 threshold crossing for an alarm.";
1625 typedef alarm-operation-type {
1627 "The relational operator used to define whether an alarm should be
1628 triggered when, say, the metric statistic goes above or below a
1631 enum GE; // greater than or equal
1632 enum LE; // less than or equal
1633 enum GT; // greater than
1634 enum LT; // less than
1642 "This field is reserved for the identifier assigned by the cloud
1649 description "A human readable string to identify the alarm";
1654 description "A string containing a description of this alarm";
1660 "The identifier of the VDUR that the alarm is associated with";
1672 list insufficient-data {
1689 "This flag indicates whether the alarm should be repeatedly emitted
1690 while the associated threshold has been crossed.";
1698 "This flag indicates whether the alarm has been enabled or
1706 description "A measure of the important or urgency of the alarm";
1707 type manotypes:alarm-severity-type;
1711 description "The metric to be tracked by this alarm.";
1712 type manotypes:alarm-metric-type;
1716 description "The type of metric statistic that is tracked by this alarm";
1717 type manotypes:alarm-statistic-type;
1722 "The relational operator that defines whether the alarm should be
1723 triggered when the metric statistic is, say, above or below the
1724 specified threshold value.";
1725 type manotypes:alarm-operation-type;
1730 "This value defines the threshold that, if crossed, will trigger
1739 "The period defines the length of time (seconds) that the metric
1740 data are collected over in oreder to evaluate the chosen
1747 "This is the number of samples of the metric statistic used to
1748 evaluate threshold crossing. Each sample or evaluation is equal to
1749 the metric statistic obtained for a given period. This can be used
1750 to mitigate spikes in the metric that may skew the statistic of
1756 typedef cloud-account-type {
1757 description "cloud account type";
1761 enum cloudsim_proxy;
1769 grouping host-aggregate {
1770 list host-aggregate {
1771 description "Name of the Host Aggregate";
1777 leaf metadata-value {
1783 grouping placement-group-input {
1785 type manotypes:cloud-account-type;
1787 choice cloud-provider {
1789 container availability-zone {
1790 description "Name of the Availability Zone";
1795 container server-group {
1796 description "Name of the Affinity/Anti-Affinity Server Group";
1801 uses host-aggregate;
1804 leaf aws-construct {
1809 leaf openmano-construct {
1814 leaf vsphere-construct {
1819 leaf mock-construct {
1824 leaf cloudsim-construct {
1831 grouping placement-group-info {
1836 "Place group construct to define the compute resource placement strategy
1837 in cloud environment";
1842 description "This is free text space used to describe the intent/rationale
1843 behind this placement group. This is for human consumption only";
1849 "Strategy associated with this placement group
1850 Following values are possible
1851 - COLOCATION: Colocation strategy imply intent to share the physical
1852 infrastructure (hypervisor/network) among all members
1854 - ISOLATION: Isolation strategy imply intent to not share the physical
1855 infrastructure (hypervisor/network) among the members
1862 default "COLOCATION";