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 meta-data-type {
49 typedef package-type {
50 description "Type of descriptor being on-boarded";
57 typedef parameter-data-type {
65 grouping primitive-parameter-value {
68 "List of parameters to the configuration primitive.";
72 "Name of the parameter.";
78 "Value associated with the name.";
84 grouping primitive-parameter {
87 "Name of the parameter.";
93 "Data type associated with the name.";
94 type manotypes:parameter-data-type;
98 description "Is this field mandatory";
104 description "The default value for this field";
108 leaf parameter-pool {
109 description "NSD Parameter pool name to use for this paramter";
115 "The value should be greyed out by the UI.
116 Only applies to parameters with default values.";
122 "The value should be hidden by the UI.
123 Only applies to parameters with default values.";
129 grouping image-properties {
132 "Image name for the software image.
133 If the image name is found within the VNF packaage it will
134 be uploaded to all cloud accounts during onboarding process.
135 Otherwise, the image must be added to the cloud account with
136 the same name as entered here.
141 leaf image-checksum {
143 "Image md5sum for the software image.
144 The md5sum, if provided, along with the image name uniquely
145 identifies an image uploaded to the CAL.
150 grouping initial-config {
153 "Sequence number for the configuration primitive.";
159 "Name of the configuration primitive.";
164 leaf user-defined-script {
166 "A user defined script.";
182 grouping vnf-configuration {
183 container vnf-configuration {
184 rwpb:msg-new VnfConfiguration;
186 "Information regarding the VNF configuration
187 is captured here. Note that if the NS contains
188 multiple instances of the same VNF, each instance
189 of the VNF may have different configuration";
191 choice config-method {
193 "Defines the configuration method for the VNF.";
196 "Use NETCONF for configuring the VNF.";
200 "Netconf configuration target";
209 "Protocol to use for netconf (e.g. ssh)";
218 "Port for the netconf server.";
219 type inet:port-number;
226 "Use REST for configuring the VNF.";
230 "Port for the REST server.";
231 type inet:port-number;
238 "Use custom script for configuring the VNF.
239 This script is executed in the context of
244 "Script type - currently supported : bash, expect";
255 "Configure the VNF through Juju.";
258 description "Juju charm to use with the VNF.";
265 container config-access {
266 leaf mgmt-ip-address {
268 "IP address to be used to configure this VNF,
269 optional if it is possible to resolve dynamically.";
270 type inet:ip-address;
275 "username for configuration.";
281 "Password for configuration access authentication.";
286 container config-attributes {
288 "Miscelaneous input parameters to be considered
289 while processing the NSD to apply configuration";
291 leaf config-priority {
293 "Configuration priority - order of confgiration
294 to be applied to each VNF in this NS,
295 low number gets precedence over high number";
301 "Wait (seconds) before applying the configuration to VNF";
306 list service-primitive {
307 rwpb:msg-new ServicePrimitive;
309 "List of service primitives supported by the
310 configuration agent for this VNF.";
315 "Name of the service primitive.";
321 "List of parameters to the service primitive.";
323 uses primitive-parameter;
327 list initial-config-primitive {
328 rwpb:msg-new InitialConfigPrimitive;
330 "Initial set of configuration primitives.";
335 leaf config-template {
337 "Configuration template for each VNF";
341 } // END - grouping vnf-configuration
343 typedef virtual-link-type {
345 "Type of virtual link
346 ELAN: A multipoint service connecting a set of VNFs
347 // ELINE: For a simple point to point connection
348 // between a VNF and the existing network.
349 // ETREE: A multipoint service connecting one or
350 // more roots and a set of leaves, but
351 // preventing inter-leaf communication.";
359 grouping named-value {
369 typedef http-method {
371 "Type of HTTP operation";
385 "Type of API to fetch monitoring params";
394 typedef json-query-method {
396 "The method to extract a value from a JSON response
398 NAMEKEY - Use the name as the key for a non-nested value.
399 JSONPATH - Use jsonpath-rw implemenation to extract a value.
400 OBJECTPATH - Use objectpath implemenation to extract a value.";
408 typedef param-value-type {
410 "The type of the parameter value";
418 typedef connection-point-type {
420 "Type of connection point
422 // VNIC_ADDR: Virtual NIC Address
423 // PNIC_ADDR: Physical NIC Address
424 // PPORT: Phsical Port.";
431 typedef widget-type {
433 "Type of the widget, typically used by the UI.";
444 typedef cpu-feature-type {
446 "Enumeration for CPU features.
448 AES: CPU supports advanced instruction set for
449 AES (Advanced Encryption Standard).
451 CAT: Cache Allocation Technology (CAT) allows
452 an Operating System, Hypervisor, or similar
453 system management agent to specify the amount
454 of L3 cache (currently the last-level cache
455 in most server and client platforms) space an
456 application can fill (as a hint to hardware
457 functionality, certain features such as power
458 management may override CAT settings).
460 CMT: Cache Monitoring Technology (CMT) allows
461 an Operating System, Hypervisor, or similar
462 system management agent to determine the
463 usage of cache based on applications running
464 on the platform. The implementation is
465 directed at L3 cache monitoring (currently
466 the last-level cache in most server and
469 DDIO: Intel Data Direct I/O (DDIO) enables
470 Ethernet server NICs and controllers talk
471 directly to the processor cache without a
472 detour via system memory. This enumeration
473 specifies if the VM requires a DDIO
517 enum REQUIRE_CLFLUSH;
545 enum REQUIRE_PCLMULQDQ;
546 enum PREFER_PCLMULQDQ;
549 enum REQUIRE_MONITOR;
587 enum REQUIRE_TSC_DEADLINE_TIMER;
588 enum PREFER_TSC_DEADLINE_TIMER;
597 enum REQUIRE_FSGSBASE;
598 enum PREFER_FSGSBASE;
611 enum REQUIRE_INVPCID;
627 container vm-flavor {
630 "Number of vcpus for the VM.";
636 "Amount of memory in MB.";
642 "Amount of disk space in GB.";
646 } //grouping vm-flavor
648 grouping vswitch-epa {
649 container vswitch-epa {
650 leaf ovs-acceleration {
652 "Specifies Open vSwitch acceleration mode.
653 MANDATORY: OVS acceleration is required
654 PREFERRED: OVS acceleration is preferred";
664 "Specifies Open vSwitch hardware offload mode.
665 MANDATORY: OVS offload is required
666 PREFERRED: OVS offload is preferred";
676 grouping hypervisor-epa {
677 container hypervisor-epa {
680 "Specifies the type of hypervisor.
696 description "Specifies the host level EPA attributes.";
699 "Host CPU model. Examples include: SandyBridge,
702 enum PREFER_WESTMERE;
703 enum REQUIRE_WESTMERE;
704 enum PREFER_SANDYBRIDGE;
705 enum REQUIRE_SANDYBRIDGE;
706 enum PREFER_IVYBRIDGE;
707 enum REQUIRE_IVYBRIDGE;
709 enum REQUIRE_HASWELL;
710 enum PREFER_BROADWELL;
711 enum REQUIRE_BROADWELL;
713 enum REQUIRE_NEHALEM;
718 enum PREFER_CORE2DUO;
719 enum REQUIRE_CORE2DUO;
724 description "Host CPU architecture.";
742 description "Host CPU Vendor.";
751 leaf cpu-socket-count {
752 description "Number of sockets on the host.";
756 leaf cpu-core-count {
757 description "Number of cores on the host.";
761 leaf cpu-core-thread-count {
762 description "Number of threads per cores on the host.";
768 description "List of CPU features.";
770 description "CPU feature.";
771 type cpu-feature-type;
776 leaf om-cpu-model-string {
777 description "Openmano CPU model string";
781 list om-cpu-feature {
783 description "List of openmano CPU features";
785 description "CPU feature";
793 description "EPA attributes for the guest";
794 container guest-epa {
795 leaf trusted-execution {
796 description "This VM should be allocated from trusted pool";
802 "Memory page allocation size. If a VM requires
803 hugepages, it should choose LARGE or SIZE_2MB
804 or SIZE_1GB. If the VM prefers hugepages it
805 should chose PREFER_LARGE.
806 LARGE : Require hugepages (either 2MB or 1GB)
807 SMALL : Doesn't require hugepages
808 SIZE_2MB : Requires 2MB hugepages
809 SIZE_1GB : Requires 1GB hugepages
810 PREFER_LARGE : Application perfers hugepages";
820 leaf cpu-pinning-policy {
822 "CPU pinning policy describes association
823 between virtual CPUs in guest and the
824 physical CPUs in the host.
825 DEDICATED : Virtual CPUs are pinned to
827 SHARED : Multiple VMs may share the
829 ANY : Any policy is acceptable for the VM";
838 leaf cpu-thread-pinning-policy {
840 "CPU thread pinning policy describes how to
841 place the guest CPUs when the host supports
843 AVOID : Avoids placing a guest on a host
845 SEPARATE: Places vCPUs on separate cores,
846 and avoids placing two vCPUs on
847 two threads of same core.
848 ISOLATE : Places each vCPU on a different core,
849 and places no vCPUs from a different
850 guest on the same core.
851 PREFER : Attempts to place vCPUs on threads
863 "List of pcie passthrough devices.";
867 "Device identifier.";
872 "Number of devices to attach to the VM.";
885 container numa-node-policy {
887 "This policy defines numa topology of the
888 guest. Specifically identifies if the guest
889 should be run on a host with one numa
890 node or multiple numa nodes. As an example
891 a guest may want 8 vcpus and 4 GB of
892 memory. But may want the vcpus and memory
893 distributed across multiple numa nodes.
894 The NUMA node 1 may run with 6 vcpus and
895 3GB, and NUMA node 2 may run with 2 vcpus
900 "The number of numa nodes to expose to the VM.";
906 "This policy specifies how the memory should
907 be allocated in a multi-node scenario.
908 STRICT : The memory must be allocated
909 strictly from the memory attached
911 PREFERRED : The memory should be allocated
912 perferentially from the memory
913 attached to the NUMA node";
924 "NUMA node identification. Typically
932 "List of vcpus to allocate on
936 description "List of vcpus ids to allocate on
943 "Memory size expressed in MB
944 for this NUMA node.";
948 choice om-numa-type {
950 "Openmano Numa type selection";
958 case paired-threads {
959 container paired-threads {
960 leaf num-paired-threads {
964 list paired-thread-ids {
966 "List of thread pairs to use in case of paired-thread numa";
994 grouping provider-network {
995 container provider-network {
996 description "Container for the provider network.";
997 leaf physical-network {
999 "Name of the phsyical network on which the provider
1006 "Type of the overlay network.";
1015 leaf segmentation_id {
1023 grouping ns-service-primitive {
1024 list service-primitive {
1026 "Network service level service primitives.";
1032 "Name of the service primitive.";
1038 "List of parameters for the service primitive.";
1041 uses manotypes:primitive-parameter;
1044 list parameter-group {
1046 "Grouping of parameters which are logically grouped in UI";
1051 "Name of the parameter group";
1057 "List of parameters for the service primitive.";
1059 uses manotypes:primitive-parameter;
1063 description "Is this parameter group mandatory";
1069 list vnf-primitive-group {
1071 "List of service primitives grouped by VNF.";
1073 key "member-vnf-index-ref";
1074 leaf member-vnf-index-ref {
1076 "Reference to member-vnf within constituent-vnfds";
1082 "A reference to a vnfd. This is a
1084 ../../../../nsd:constituent-vnfd
1085 + [nsd:id = current()/../nsd:id-ref]
1087 NOTE: An issue with confd is preventing the
1088 use of xpath. Seems to be an issue with leafref
1089 to leafref, whose target is in a different module.
1090 Once that is resovled this will switched to use
1106 description "Index of this primitive";
1111 description "Name of the primitive in the VNF primitive ";
1117 leaf user-defined-script {
1119 "A user defined script.";
1125 grouping monitoring-param {
1126 list http-endpoint {
1128 "List of http endpoints to be used by monitoring params";
1132 description "The HTTP path on the management server";
1137 description "Pick HTTPS instead of HTTP , Default is false";
1143 description "The HTTP port to connect to";
1144 type inet:port-number;
1148 description "The HTTP basic auth username";
1153 description "The HTTP basic auth password";
1157 leaf polling_interval_secs {
1158 description "The HTTP polling interval in seconds";
1165 "This is the method to be performed at the uri.
1166 GET by default for action";
1168 type manotypes:http-method;
1173 description "Custom HTTP headers to put on HTTP request";
1176 description "HTTP header key";
1181 description "HTTP header value";
1187 list monitoring-param {
1189 "List of monitoring parameters at the NS level";
1199 leaf http-endpoint-ref {
1201 path "../../http-endpoint/path";
1205 leaf json-query-method {
1206 type json-query-method;
1210 container json-query-params {
1213 "The jsonpath to use to extract value from JSON structure";
1218 "The objectpath to use to extract value from JSON structure";
1223 uses monitoring-param-ui-data;
1224 uses monitoring-param-value;
1229 grouping monitoring-param-aggregation {
1230 typedef aggregation-type {
1231 description "aggregation-type";
1241 leaf aggregation-type {
1242 type aggregation-type;
1246 grouping monitoring-param-ui-data {
1252 description "A simple tag to group monitoring parameters";
1258 type manotypes:widget-type;
1266 grouping monitoring-param-value {
1268 type param-value-type;
1272 container numeric-constraints {
1275 "Minimum value for the parameter";
1280 "Maxium value for the parameter";
1285 container text-constraints {
1288 "Minimum string length for the parameter";
1293 "Maximum string length for the parameter";
1298 leaf value-integer {
1300 "Current value for an integer parameter";
1304 leaf value-decimal {
1306 "Current value for a decimal parameter";
1314 "Current value for a string parameter";
1319 grouping control-param {
1320 list control-param {
1322 "List of control parameters to manage and
1323 update the running configuration of the VNF";
1339 description "A simple tag to group control parameters";
1345 "Minimum value for the parameter";
1351 "Maxium value for the parameter";
1355 leaf current-value {
1357 "Current value for the parameter";
1363 "Step value for the parameter";
1372 type manotypes:widget-type;
1377 "This is the URL where to perform the operation";
1384 "This is the method to be performed at the uri.
1385 POST by default for action";
1387 type manotypes:http-method;
1393 "This is the operation payload or payload template as stringified
1394 JSON. This field provides the data to be sent for this operation
1402 grouping action-param {
1405 "List of action parameters to
1421 description "A simple tag to group monitoring parameter";
1427 "This is the URL where to perform the operation";
1433 "This is the method to be performed at the uri.
1434 POST by default for action";
1436 type manotypes:http-method;
1442 "This is the operation payload or payload template to be sent in
1443 the data for this operation call";
1450 grouping input-parameter {
1453 list input-parameter {
1455 "List of input parameters";
1462 "A an xpath that specfies which element in a descriptor is to be
1469 "The value that the element specified by the xpath should take when a
1470 record is created.";
1476 grouping input-parameter-xpath {
1477 list input-parameter-xpath {
1479 "List of xpaths to parameters inside the NSD
1480 the can be customized during the instantiation.";
1485 "An xpath that specifies the element in a descriptor.";
1490 description "A descriptive string";
1494 leaf default-value {
1495 description " A default value for this input parameter";
1501 grouping nfvi-metrics {
1505 "Label to show in UI";
1512 "The total number of VCPUs available.";
1518 "The VCPU utilization (percentage).";
1529 "Label to show in UI";
1536 "The amount of memory (bytes) currently in use.";
1542 "The amount of memory (bytes) available.";
1548 "The memory utilization (percentage).";
1559 "Label to show in UI";
1566 "The amount of storage (bytes) currently in use.";
1572 "The amount of storage (bytes) available.";
1578 "The storage utilization (percentage).";
1586 container external-ports {
1589 "Label to show in UI";
1591 default "EXTERNAL PORTS";
1596 "The total number of external ports.";
1601 container internal-ports {
1604 "Label to show in UI";
1606 default "INTERNAL PORTS";
1611 "The total number of internal ports.";
1619 "Label to show in UI";
1621 default "NETWORK TRAFFIC";
1624 container incoming {
1627 "Label to show in UI";
1629 default "INCOMING NETWORK TRAFFIC";
1634 "The cumulative number of incoming bytes.";
1640 "The cumulative number of incoming packets.";
1646 "The current incoming byte-rate (bytes per second).";
1654 "The current incoming packet (packets per second).";
1661 container outgoing {
1664 "Label to show in UI";
1666 default "OUTGOING NETWORK TRAFFIC";
1671 "The cumulative number of outgoing bytes.";
1677 "The cumulative number of outgoing packets.";
1683 "The current outgoing byte-rate (bytes per second).";
1691 "The current outgoing packet (packets per second).";
1700 typedef alarm-severity-type {
1701 description "An indication of the importance or ugency of the alarm";
1709 typedef alarm-metric-type {
1710 description "The type of metrics to register the alarm for";
1712 enum CPU_UTILIZATION;
1713 enum MEMORY_UTILIZATION;
1714 enum STORAGE_UTILIZATION;
1718 typedef alarm-statistic-type {
1720 "The type of statistic to used to measure a metric to determine
1721 threshold crossing for an alarm.";
1731 typedef alarm-operation-type {
1733 "The relational operator used to define whether an alarm should be
1734 triggered when, say, the metric statistic goes above or below a
1737 enum GE; // greater than or equal
1738 enum LE; // less than or equal
1739 enum GT; // greater than
1740 enum LT; // less than
1748 "This field is reserved for the identifier assigned by the cloud
1755 description "A human readable string to identify the alarm";
1760 description "A string containing a description of this alarm";
1766 "The identifier of the VDUR that the alarm is associated with";
1778 list insufficient-data {
1795 "This flag indicates whether the alarm should be repeatedly emitted
1796 while the associated threshold has been crossed.";
1804 "This flag indicates whether the alarm has been enabled or
1812 description "A measure of the important or urgency of the alarm";
1813 type alarm-severity-type;
1817 description "The metric to be tracked by this alarm.";
1818 type alarm-metric-type;
1822 description "The type of metric statistic that is tracked by this alarm";
1823 type alarm-statistic-type;
1828 "The relational operator that defines whether the alarm should be
1829 triggered when the metric statistic is, say, above or below the
1830 specified threshold value.";
1831 type alarm-operation-type;
1836 "This value defines the threshold that, if crossed, will trigger
1845 "The period defines the length of time (seconds) that the metric
1846 data are collected over in oreder to evaluate the chosen
1853 "This is the number of samples of the metric statistic used to
1854 evaluate threshold crossing. Each sample or evaluation is equal to
1855 the metric statistic obtained for a given period. This can be used
1856 to mitigate spikes in the metric that may skew the statistic of
1862 typedef cloud-account-type {
1863 description "cloud account type";
1867 enum cloudsim_proxy;
1876 grouping host-aggregate {
1877 list host-aggregate {
1878 description "Name of the Host Aggregate";
1884 leaf metadata-value {
1890 grouping placement-group-input {
1892 type manotypes:cloud-account-type;
1894 choice cloud-provider {
1896 container availability-zone {
1897 description "Name of the Availability Zone";
1902 container server-group {
1903 description "Name of the Affinity/Anti-Affinity Server Group";
1908 uses host-aggregate;
1911 leaf aws-construct {
1916 leaf openmano-construct {
1921 leaf vsphere-construct {
1926 leaf mock-construct {
1931 leaf cloudsim-construct {
1938 grouping placement-group-info {
1943 "Place group construct to define the compute resource placement strategy
1944 in cloud environment";
1949 description "This is free text space used to describe the intent/rationale
1950 behind this placement group. This is for human consumption only";
1956 "Strategy associated with this placement group
1957 Following values are possible
1958 - COLOCATION: Colocation strategy imply intent to share the physical
1959 infrastructure (hypervisor/network) among all members
1961 - ISOLATION: Isolation strategy imply intent to not share the physical
1962 infrastructure (hypervisor/network) among the members
1969 default "COLOCATION";
1973 grouping ip-profile-info {
1974 description "Grouping for IP-Profile";
1975 container ip-profile-params {
1978 type inet:ip-version;
1982 leaf subnet-address {
1983 description "Subnet IP prefix associated with IP Profile";
1984 type inet:ip-prefix;
1987 leaf gateway-address {
1988 description "IP Address of the default gateway associated with IP Profile";
1989 type inet:ip-address;
1992 leaf security-group {
1993 description "Name of the security group";
2000 description "List of DNS Servers associated with IP Profile";
2001 type inet:ip-address;
2005 container dhcp-params {
2007 description "This flag indicates if DHCP is enabled or not";
2012 leaf start-address {
2013 description "Start IP address of the IP-Address range associated with DHCP domain";
2014 type inet:ip-address;
2018 description "Size of the DHCP pool associated with DHCP domain";
2023 leaf subnet-prefix-pool {
2024 description "VIM Specific reference to pre-created subnet prefix";
2030 grouping ip-profile-list {
2033 "List of IP Profiles.
2034 IP Profile describes the IP characteristics for the Virtual-Link";
2039 description "Name of the IP-Profile";
2044 description "Description for IP profile";
2048 uses ip-profile-info;
2052 grouping config-file {
2053 description "Grouping for files needed to be mounted into an additional drive";
2056 "List of configuration files to be written on an additional drive";
2059 description "Name of the configuration file";
2063 description "Full path of the destination in the guest";
2069 grouping custom-meta-data {
2070 description "Grouping for instance-specific meta data";
2071 list custom-meta-data {
2073 "List of meta-data to be associated with the instance";
2076 description "Name of the meta-data parameter";
2081 description "Data-type the meta-data parameter";
2082 type manotypes:meta-data-type;
2087 description "Value of the meta-data parameter";
2093 grouping supplemental-boot-data {
2094 description "Grouping for custom vim data";
2095 container supplemental-boot-data {
2096 uses manotypes:config-file;
2097 uses manotypes:custom-meta-data;
2098 leaf boot-data-drive {
2099 description "Some VIMs implement additional drives to host config-files or meta-data";
2106 grouping volume-info {
2107 description "Grouping for Volume-info";
2110 description "Description for Volume";
2115 description "Size of disk in GB";
2119 choice volume-source {
2121 "Defines the source of the volume. Possible options are
2122 1. Ephemeral -- Empty disk
2123 2. Image -- Refer to image to be used for volume
2124 3. Volume -- Reference of pre-existing volume to be used
2134 uses image-properties;
2139 description "Reference for pre-existing volume in VIM";
2146 description "This flag indicates if this is boot volume or not";
2150 leaf boot-priority {
2151 description "Boot priority associated with volume";
2157 description "Type of disk-bus on which this disk is exposed to guest";
2167 description "The type of device as exposed to guest";
2176 uses custom-meta-data;