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 package-type {
44 description "Type of descriptor being on-boarded";
51 typedef parameter-data-type {
59 grouping primitive-parameter-value {
62 "List of parameters to the configuration primitive.";
66 "Name of the parameter.";
72 "Value associated with the name.";
78 grouping primitive-parameter {
81 "Name of the parameter.";
87 "Data type associated with the name.";
88 type manotypes:parameter-data-type;
92 description "Is this field mandatory";
98 description "The default value for this field";
102 leaf parameter-pool {
103 description "NSD Parameter pool name to use for this paramter";
109 "The value should be greyed out by the UI.
110 Only applies to parameters with default values.";
116 "The value should be hidden by the UI.
117 Only applies to parameters with default values.";
122 grouping ui-primitive-group {
123 list parameter-group {
125 "Grouping of parameters which are logically grouped in UI";
130 "Name of the parameter group";
136 "List of parameters for the service primitive.";
138 uses manotypes:primitive-parameter;
142 description "Is this parameter group mandatory";
149 grouping image-properties {
152 "Image name for the software image.
153 If the image name is found within the VNF packaage it will
154 be uploaded to all cloud accounts during onboarding process.
155 Otherwise, the image must be added to the cloud account with
156 the same name as entered here.
161 leaf image-checksum {
163 "Image md5sum for the software image.
164 The md5sum, if provided, along with the image name uniquely
165 identifies an image uploaded to the CAL.
170 grouping initial-config {
173 "Sequence number for the configuration primitive.";
179 "Name of the configuration primitive.";
184 leaf user-defined-script {
186 "A user defined script.";
202 grouping vnf-configuration {
203 container vnf-configuration {
204 rwpb:msg-new VnfConfiguration;
206 "Information regarding the VNF configuration
207 is captured here. Note that if the NS contains
208 multiple instances of the same VNF, each instance
209 of the VNF may have different configuration";
211 choice config-method {
213 "Defines the configuration method for the VNF.";
216 "Use NETCONF for configuring the VNF.";
220 "Netconf configuration target";
229 "Protocol to use for netconf (e.g. ssh)";
238 "Port for the netconf server.";
239 type inet:port-number;
246 "Use REST for configuring the VNF.";
250 "Port for the REST server.";
251 type inet:port-number;
258 "Use custom script for configuring the VNF.
259 This script is executed in the context of
264 "Script type - currently supported : bash, expect";
275 "Configure the VNF through Juju.";
278 description "Juju charm to use with the VNF.";
285 container config-access {
286 leaf mgmt-ip-address {
288 "IP address to be used to configure this VNF,
289 optional if it is possible to resolve dynamically.";
290 type inet:ip-address;
295 "username for configuration.";
301 "Password for configuration access authentication.";
306 container config-attributes {
308 "Miscelaneous input parameters to be considered
309 while processing the NSD to apply configuration";
311 leaf config-priority {
313 "Configuration priority - order of confgiration
314 to be applied to each VNF in this NS,
315 low number gets precedence over high number";
321 "Wait (seconds) before applying the configuration to VNF";
326 list service-primitive {
327 rwpb:msg-new ServicePrimitive;
329 "List of service primitives supported by the
330 configuration agent for this VNF.";
335 "Name of the service primitive.";
341 "List of parameters to the service primitive.";
343 uses primitive-parameter;
347 list initial-config-primitive {
348 rwpb:msg-new InitialConfigPrimitive;
350 "Initial set of configuration primitives.";
355 leaf config-template {
357 "Configuration template for each VNF";
361 } // END - grouping vnf-configuration
363 typedef virtual-link-type {
365 "Type of virtual link
366 ELAN: A multipoint service connecting a set of VNFs
367 // ELINE: For a simple point to point connection
368 // between a VNF and the existing network.
369 // ETREE: A multipoint service connecting one or
370 // more roots and a set of leaves, but
371 // preventing inter-leaf communication.";
379 grouping named-value {
389 typedef http-method {
391 "Type of HTTP operation";
405 "Type of API to fetch monitoring params";
414 typedef json-query-method {
416 "The method to extract a value from a JSON response
418 NAMEKEY - Use the name as the key for a non-nested value.
419 JSONPATH - Use jsonpath-rw implemenation to extract a value.
420 OBJECTPATH - Use objectpath implemenation to extract a value.";
428 typedef param-value-type {
430 "The type of the parameter value";
438 typedef connection-point-type {
440 "Type of connection point
442 // VNIC_ADDR: Virtual NIC Address
443 // PNIC_ADDR: Physical NIC Address
444 // PPORT: Phsical Port.";
451 typedef widget-type {
453 "Type of the widget, typically used by the UI.";
464 typedef cpu-feature-type {
466 "Enumeration for CPU features.
468 AES: CPU supports advanced instruction set for
469 AES (Advanced Encryption Standard).
471 CAT: Cache Allocation Technology (CAT) allows
472 an Operating System, Hypervisor, or similar
473 system management agent to specify the amount
474 of L3 cache (currently the last-level cache
475 in most server and client platforms) space an
476 application can fill (as a hint to hardware
477 functionality, certain features such as power
478 management may override CAT settings).
480 CMT: Cache Monitoring Technology (CMT) allows
481 an Operating System, Hypervisor, or similar
482 system management agent to determine the
483 usage of cache based on applications running
484 on the platform. The implementation is
485 directed at L3 cache monitoring (currently
486 the last-level cache in most server and
489 DDIO: Intel Data Direct I/O (DDIO) enables
490 Ethernet server NICs and controllers talk
491 directly to the processor cache without a
492 detour via system memory. This enumeration
493 specifies if the VM requires a DDIO
537 enum REQUIRE_CLFLUSH;
565 enum REQUIRE_PCLMULQDQ;
566 enum PREFER_PCLMULQDQ;
569 enum REQUIRE_MONITOR;
607 enum REQUIRE_TSC_DEADLINE_TIMER;
608 enum PREFER_TSC_DEADLINE_TIMER;
617 enum REQUIRE_FSGSBASE;
618 enum PREFER_FSGSBASE;
631 enum REQUIRE_INVPCID;
647 container vm-flavor {
650 "Number of vcpus for the VM.";
656 "Amount of memory in MB.";
662 "Amount of disk space in GB.";
666 } //grouping vm-flavor
668 grouping vswitch-epa {
669 container vswitch-epa {
670 leaf ovs-acceleration {
672 "Specifies Open vSwitch acceleration mode.
673 MANDATORY: OVS acceleration is required
674 PREFERRED: OVS acceleration is preferred";
684 "Specifies Open vSwitch hardware offload mode.
685 MANDATORY: OVS offload is required
686 PREFERRED: OVS offload is preferred";
696 grouping hypervisor-epa {
697 container hypervisor-epa {
700 "Specifies the type of hypervisor.
716 description "Specifies the host level EPA attributes.";
719 "Host CPU model. Examples include: SandyBridge,
722 enum PREFER_WESTMERE;
723 enum REQUIRE_WESTMERE;
724 enum PREFER_SANDYBRIDGE;
725 enum REQUIRE_SANDYBRIDGE;
726 enum PREFER_IVYBRIDGE;
727 enum REQUIRE_IVYBRIDGE;
729 enum REQUIRE_HASWELL;
730 enum PREFER_BROADWELL;
731 enum REQUIRE_BROADWELL;
733 enum REQUIRE_NEHALEM;
738 enum PREFER_CORE2DUO;
739 enum REQUIRE_CORE2DUO;
744 description "Host CPU architecture.";
762 description "Host CPU Vendor.";
771 leaf cpu-socket-count {
772 description "Number of sockets on the host.";
776 leaf cpu-core-count {
777 description "Number of cores on the host.";
781 leaf cpu-core-thread-count {
782 description "Number of threads per cores on the host.";
788 description "List of CPU features.";
790 description "CPU feature.";
791 type cpu-feature-type;
796 leaf om-cpu-model-string {
797 description "Openmano CPU model string";
801 list om-cpu-feature {
803 description "List of openmano CPU features";
805 description "CPU feature";
813 description "EPA attributes for the guest";
814 container guest-epa {
815 leaf trusted-execution {
816 description "This VM should be allocated from trusted pool";
822 "Memory page allocation size. If a VM requires
823 hugepages, it should choose LARGE or SIZE_2MB
824 or SIZE_1GB. If the VM prefers hugepages it
825 should chose PREFER_LARGE.
826 LARGE : Require hugepages (either 2MB or 1GB)
827 SMALL : Doesn't require hugepages
828 SIZE_2MB : Requires 2MB hugepages
829 SIZE_1GB : Requires 1GB hugepages
830 PREFER_LARGE : Application perfers hugepages";
840 leaf cpu-pinning-policy {
842 "CPU pinning policy describes association
843 between virtual CPUs in guest and the
844 physical CPUs in the host.
845 DEDICATED : Virtual CPUs are pinned to
847 SHARED : Multiple VMs may share the
849 ANY : Any policy is acceptable for the VM";
858 leaf cpu-thread-pinning-policy {
860 "CPU thread pinning policy describes how to
861 place the guest CPUs when the host supports
863 AVOID : Avoids placing a guest on a host
865 SEPARATE: Places vCPUs on separate cores,
866 and avoids placing two vCPUs on
867 two threads of same core.
868 ISOLATE : Places each vCPU on a different core,
869 and places no vCPUs from a different
870 guest on the same core.
871 PREFER : Attempts to place vCPUs on threads
883 "List of pcie passthrough devices.";
887 "Device identifier.";
892 "Number of devices to attach to the VM.";
905 container numa-node-policy {
907 "This policy defines numa topology of the
908 guest. Specifically identifies if the guest
909 should be run on a host with one numa
910 node or multiple numa nodes. As an example
911 a guest may want 8 vcpus and 4 GB of
912 memory. But may want the vcpus and memory
913 distributed across multiple numa nodes.
914 The NUMA node 1 may run with 6 vcpus and
915 3GB, and NUMA node 2 may run with 2 vcpus
920 "The number of numa nodes to expose to the VM.";
926 "This policy specifies how the memory should
927 be allocated in a multi-node scenario.
928 STRICT : The memory must be allocated
929 strictly from the memory attached
931 PREFERRED : The memory should be allocated
932 perferentially from the memory
933 attached to the NUMA node";
944 "NUMA node identification. Typically
952 "List of vcpus to allocate on
956 description "List of vcpus ids to allocate on
963 "Memory size expressed in MB
964 for this NUMA node.";
968 choice om-numa-type {
970 "Openmano Numa type selection";
978 case paired-threads {
979 container paired-threads {
980 leaf num-paired-threads {
984 list paired-thread-ids {
986 "List of thread pairs to use in case of paired-thread numa";
1014 grouping provider-network {
1015 container provider-network {
1016 description "Container for the provider network.";
1017 leaf physical-network {
1019 "Name of the phsyical network on which the provider
1026 "Type of the overlay network.";
1035 leaf segmentation_id {
1043 grouping monitoring-param {
1044 list http-endpoint {
1046 "List of http endpoints to be used by monitoring params";
1050 description "The HTTP path on the management server";
1055 description "Pick HTTPS instead of HTTP , Default is false";
1061 description "The HTTP port to connect to";
1062 type inet:port-number;
1066 description "The HTTP basic auth username";
1071 description "The HTTP basic auth password";
1075 leaf polling-interval-secs {
1076 description "The HTTP polling interval in seconds";
1083 "This is the method to be performed at the uri.
1084 GET by default for action";
1086 type manotypes:http-method;
1091 description "Custom HTTP headers to put on HTTP request";
1094 description "HTTP header key";
1099 description "HTTP header value";
1105 list monitoring-param {
1107 "List of monitoring parameters at the NS level";
1117 leaf http-endpoint-ref {
1119 path "../../http-endpoint/path";
1123 leaf json-query-method {
1124 type json-query-method;
1128 container json-query-params {
1131 "The jsonpath to use to extract value from JSON structure";
1136 "The objectpath to use to extract value from JSON structure";
1141 uses monitoring-param-ui-data;
1142 uses monitoring-param-value;
1147 grouping monitoring-param-aggregation {
1148 typedef aggregation-type {
1149 description "aggregation-type";
1159 leaf aggregation-type {
1160 type aggregation-type;
1164 grouping monitoring-param-ui-data {
1170 description "A simple tag to group monitoring parameters";
1176 type manotypes:widget-type;
1184 grouping monitoring-param-value {
1186 type param-value-type;
1190 container numeric-constraints {
1193 "Minimum value for the parameter";
1198 "Maxium value for the parameter";
1203 container text-constraints {
1206 "Minimum string length for the parameter";
1211 "Maximum string length for the parameter";
1216 leaf value-integer {
1218 "Current value for an integer parameter";
1222 leaf value-decimal {
1224 "Current value for a decimal parameter";
1232 "Current value for a string parameter";
1237 grouping control-param {
1238 list control-param {
1240 "List of control parameters to manage and
1241 update the running configuration of the VNF";
1257 description "A simple tag to group control parameters";
1263 "Minimum value for the parameter";
1269 "Maxium value for the parameter";
1273 leaf current-value {
1275 "Current value for the parameter";
1281 "Step value for the parameter";
1290 type manotypes:widget-type;
1295 "This is the URL where to perform the operation";
1302 "This is the method to be performed at the uri.
1303 POST by default for action";
1305 type manotypes:http-method;
1311 "This is the operation payload or payload template as stringified
1312 JSON. This field provides the data to be sent for this operation
1320 grouping action-param {
1323 "List of action parameters to
1339 description "A simple tag to group monitoring parameter";
1345 "This is the URL where to perform the operation";
1351 "This is the method to be performed at the uri.
1352 POST by default for action";
1354 type manotypes:http-method;
1360 "This is the operation payload or payload template to be sent in
1361 the data for this operation call";
1368 grouping input-parameter {
1371 list input-parameter {
1373 "List of input parameters";
1380 "A an xpath that specfies which element in a descriptor is to be
1387 "The value that the element specified by the xpath should take when a
1388 record is created.";
1394 grouping input-parameter-xpath {
1395 list input-parameter-xpath {
1397 "List of xpaths to parameters inside the NSD
1398 the can be customized during the instantiation.";
1403 "An xpath that specifies the element in a descriptor.";
1408 description "A descriptive string";
1412 leaf default-value {
1413 description " A default value for this input parameter";
1419 grouping nfvi-metrics {
1423 "Label to show in UI";
1430 "The total number of VCPUs available.";
1436 "The VCPU utilization (percentage).";
1447 "Label to show in UI";
1454 "The amount of memory (bytes) currently in use.";
1460 "The amount of memory (bytes) available.";
1466 "The memory utilization (percentage).";
1477 "Label to show in UI";
1484 "The amount of storage (bytes) currently in use.";
1490 "The amount of storage (bytes) available.";
1496 "The storage utilization (percentage).";
1504 container external-ports {
1507 "Label to show in UI";
1509 default "EXTERNAL PORTS";
1514 "The total number of external ports.";
1519 container internal-ports {
1522 "Label to show in UI";
1524 default "INTERNAL PORTS";
1529 "The total number of internal ports.";
1537 "Label to show in UI";
1539 default "NETWORK TRAFFIC";
1542 container incoming {
1545 "Label to show in UI";
1547 default "INCOMING NETWORK TRAFFIC";
1552 "The cumulative number of incoming bytes.";
1558 "The cumulative number of incoming packets.";
1564 "The current incoming byte-rate (bytes per second).";
1572 "The current incoming packet (packets per second).";
1579 container outgoing {
1582 "Label to show in UI";
1584 default "OUTGOING NETWORK TRAFFIC";
1589 "The cumulative number of outgoing bytes.";
1595 "The cumulative number of outgoing packets.";
1601 "The current outgoing byte-rate (bytes per second).";
1609 "The current outgoing packet (packets per second).";
1618 typedef alarm-severity-type {
1619 description "An indication of the importance or ugency of the alarm";
1627 typedef alarm-metric-type {
1628 description "The type of metrics to register the alarm for";
1630 enum CPU_UTILIZATION;
1631 enum MEMORY_UTILIZATION;
1632 enum STORAGE_UTILIZATION;
1636 typedef alarm-statistic-type {
1638 "The type of statistic to used to measure a metric to determine
1639 threshold crossing for an alarm.";
1649 typedef alarm-operation-type {
1651 "The relational operator used to define whether an alarm should be
1652 triggered when, say, the metric statistic goes above or below a
1655 enum GE; // greater than or equal
1656 enum LE; // less than or equal
1657 enum GT; // greater than
1658 enum LT; // less than
1666 "This field is reserved for the identifier assigned by the cloud
1673 description "A human readable string to identify the alarm";
1678 description "A string containing a description of this alarm";
1684 "The identifier of the VDUR that the alarm is associated with";
1696 list insufficient-data {
1713 "This flag indicates whether the alarm should be repeatedly emitted
1714 while the associated threshold has been crossed.";
1722 "This flag indicates whether the alarm has been enabled or
1730 description "A measure of the important or urgency of the alarm";
1731 type alarm-severity-type;
1735 description "The metric to be tracked by this alarm.";
1736 type alarm-metric-type;
1740 description "The type of metric statistic that is tracked by this alarm";
1741 type alarm-statistic-type;
1746 "The relational operator that defines whether the alarm should be
1747 triggered when the metric statistic is, say, above or below the
1748 specified threshold value.";
1749 type alarm-operation-type;
1754 "This value defines the threshold that, if crossed, will trigger
1763 "The period defines the length of time (seconds) that the metric
1764 data are collected over in oreder to evaluate the chosen
1771 "This is the number of samples of the metric statistic used to
1772 evaluate threshold crossing. Each sample or evaluation is equal to
1773 the metric statistic obtained for a given period. This can be used
1774 to mitigate spikes in the metric that may skew the statistic of
1780 typedef cloud-account-type {
1781 description "cloud account type";
1785 enum cloudsim_proxy;
1794 grouping host-aggregate {
1795 list host-aggregate {
1796 description "Name of the Host Aggregate";
1802 leaf metadata-value {
1808 grouping placement-group-input {
1810 type manotypes:cloud-account-type;
1812 choice cloud-provider {
1814 container availability-zone {
1815 description "Name of the Availability Zone";
1820 container server-group {
1821 description "Name of the Affinity/Anti-Affinity Server Group";
1826 uses host-aggregate;
1829 leaf aws-construct {
1834 leaf openmano-construct {
1839 leaf vsphere-construct {
1844 leaf mock-construct {
1849 leaf cloudsim-construct {
1856 grouping placement-group-info {
1861 "Place group construct to define the compute resource placement strategy
1862 in cloud environment";
1867 description "This is free text space used to describe the intent/rationale
1868 behind this placement group. This is for human consumption only";
1874 "Strategy associated with this placement group
1875 Following values are possible
1876 - COLOCATION: Colocation strategy imply intent to share the physical
1877 infrastructure (hypervisor/network) among all members
1879 - ISOLATION: Isolation strategy imply intent to not share the physical
1880 infrastructure (hypervisor/network) among the members
1887 default "COLOCATION";
1891 grouping ip-profile-info {
1892 description "Grouping for IP-Profile";
1893 container ip-profile-params {
1896 type inet:ip-version;
1900 leaf subnet-address {
1901 description "Subnet IP prefix associated with IP Profile";
1902 type inet:ip-prefix;
1905 leaf gateway-address {
1906 description "IP Address of the default gateway associated with IP Profile";
1907 type inet:ip-address;
1910 leaf security-group {
1911 description "Name of the security group";
1918 description "List of DNS Servers associated with IP Profile";
1919 type inet:ip-address;
1923 container dhcp-params {
1925 description "This flag indicates if DHCP is enabled or not";
1930 leaf start-address {
1931 description "Start IP address of the IP-Address range associated with DHCP domain";
1932 type inet:ip-address;
1936 description "Size of the DHCP pool associated with DHCP domain";
1941 leaf subnet-prefix-pool {
1942 description "VIM Specific reference to pre-created subnet prefix";
1948 grouping ip-profile-list {
1951 "List of IP Profiles.
1952 IP Profile describes the IP characteristics for the Virtual-Link";
1957 description "Name of the IP-Profile";
1962 description "Description for IP profile";
1966 uses ip-profile-info;
1970 grouping config-file {
1971 description "Grouping for files needed to be mounted into an additional drive";
1974 "List of configuration files to be written on an additional drive";
1977 description "Name of the configuration file";
1981 description "Full path of the destination in the guest";
1987 grouping supplemental-boot-data {
1988 description "Grouping for custom vim data";
1989 container supplemental-boot-data {
1990 uses manotypes:config-file;
1991 leaf boot-data-drive {
1992 description "Some VIMs implement additional drives to host config-files or meta-data";
1999 grouping volume-info {
2000 description "Grouping for Volume-info";
2003 description "Description for Volume";
2008 description "Size of disk in GB";
2012 choice volume-source {
2014 "Defines the source of the volume. Possible options are
2015 1. Ephemeral -- Empty disk
2016 2. Image -- Refer to image to be used for volume
2017 3. Volume -- Reference of pre-existing volume to be used
2027 uses image-properties;
2033 description "Type of disk-bus on which this disk is exposed to guest";
2043 description "The type of device as exposed to guest";