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 {
50 typedef parameter-data-type {
58 grouping primitive-parameter-value {
61 "List of parameters to the configuration primitive.";
65 "Name of the parameter.";
71 "Value associated with the name.";
77 grouping primitive-parameter {
80 "Name of the parameter.";
86 "Data type associated with the name.";
87 type manotypes:parameter-data-type;
91 description "Is this field mandatory";
97 description "The default value for this field";
101 leaf parameter-pool {
102 description "NSD Parameter pool name to use for this paramter";
108 "The value should be greyed out by the UI.
109 Only applies to parameters with default values.";
115 "The value should be hidden by the UI.
116 Only applies to parameters with default values.";
122 grouping image-properties {
125 "Image name for the software image.
126 If the image name is found within the VNF packaage it will
127 be uploaded to all cloud accounts during onboarding process.
128 Otherwise, the image must be added to the cloud account with
129 the same name as entered here.
134 leaf image-checksum {
136 "Image md5sum for the software image.
137 The md5sum, if provided, along with the image name uniquely
138 identifies an image uploaded to the CAL.
144 grouping vnf-configuration {
145 container vnf-configuration {
146 rwpb:msg-new VnfConfiguration;
148 "Information regarding the VNF configuration
149 is captured here. Note that if the NS contains
150 multiple instances of the same VNF, each instance
151 of the VNF may have different configuration";
153 choice config-method {
155 "Defines the configuration method for the VNF.";
158 "Use NETCONF for configuring the VNF.";
162 "Netconf configuration target";
171 "Protocol to use for netconf (e.g. ssh)";
180 "Port for the netconf server.";
181 type inet:port-number;
188 "Use REST for configuring the VNF.";
192 "Port for the REST server.";
193 type inet:port-number;
200 "Use custom script for configuring the VNF.
201 This script is executed in the context of
206 "Script type - currently supported : bash, expect";
217 "Configure the VNF through Juju.";
220 description "Juju charm to use with the VNF.";
227 container config-access {
228 leaf mgmt-ip-address {
230 "IP address to be used to configure this VNF,
231 optional if it is possible to resolve dynamically.";
232 type inet:ip-address;
237 "username for configuration.";
243 "Password for configuration access authentication.";
248 container config-attributes {
250 "Miscelaneous input parameters to be considered
251 while processing the NSD to apply configuration";
253 leaf config-priority {
255 "Configuration priority - order of confgiration
256 to be applied to each VNF in this NS,
257 low number gets precedence over high number";
263 "Wait (seconds) before applying the configuration to VNF";
268 list service-primitive {
269 rwpb:msg-new ServicePrimitive;
271 "List of service primitives supported by the
272 configuration agent for this VNF.";
277 "Name of the service primitive.";
283 "List of parameters to the service primitive.";
285 uses primitive-parameter;
289 list initial-config-primitive {
290 rwpb:msg-new InitialConfigPrimitive;
292 "Initial set of configuration primitives.";
296 "Sequence number for the configuration primitive.";
302 "Name of the configuration primitive.";
318 leaf config-template {
320 "Configuration template for each VNF";
324 } // END - grouping vnf-configuration
326 typedef virtual-link-type {
328 "Type of virtual link
329 ELAN: A multipoint service connecting a set of VNFs
330 // ELINE: For a simple point to point connection
331 // between a VNF and the existing network.
332 // ETREE: A multipoint service connecting one or
333 // more roots and a set of leaves, but
334 // preventing inter-leaf communication.";
342 grouping named-value {
352 typedef http-method {
354 "Type of HTTP operation";
368 "Type of API to fetch monitoring params";
377 typedef json-query-method {
379 "The method to extract a value from a JSON response
381 NAMEKEY - Use the name as the key for a non-nested value.
382 JSONPATH - Use jsonpath-rw implemenation to extract a value.
383 OBJECTPATH - Use objectpath implemenation to extract a value.";
391 typedef param-value-type {
393 "The type of the parameter value";
401 typedef connection-point-type {
403 "Type of connection point
405 // VNIC_ADDR: Virtual NIC Address
406 // PNIC_ADDR: Physical NIC Address
407 // PPORT: Phsical Port.";
414 typedef widget-type {
416 "Type of the widget, typically used by the UI.";
427 typedef cpu-feature-type {
429 "Enumeration for CPU features.
431 AES: CPU supports advanced instruction set for
432 AES (Advanced Encryption Standard).
434 CAT: Cache Allocation Technology (CAT) allows
435 an Operating System, Hypervisor, or similar
436 system management agent to specify the amount
437 of L3 cache (currently the last-level cache
438 in most server and client platforms) space an
439 application can fill (as a hint to hardware
440 functionality, certain features such as power
441 management may override CAT settings).
443 CMT: Cache Monitoring Technology (CMT) allows
444 an Operating System, Hypervisor, or similar
445 system management agent to determine the
446 usage of cache based on applications running
447 on the platform. The implementation is
448 directed at L3 cache monitoring (currently
449 the last-level cache in most server and
452 DDIO: Intel Data Direct I/O (DDIO) enables
453 Ethernet server NICs and controllers talk
454 directly to the processor cache without a
455 detour via system memory. This enumeration
456 specifies if the VM requires a DDIO
500 enum REQUIRE_CLFLUSH;
528 enum REQUIRE_PCLMULQDQ;
529 enum PREFER_PCLMULQDQ;
532 enum REQUIRE_MONITOR;
570 enum REQUIRE_TSC_DEADLINE_TIMER;
571 enum PREFER_TSC_DEADLINE_TIMER;
580 enum REQUIRE_FSGSBASE;
581 enum PREFER_FSGSBASE;
594 enum REQUIRE_INVPCID;
610 container vm-flavor {
613 "Number of vcpus for the VM.";
619 "Amount of memory in MB.";
625 "Amount of disk space in GB.";
629 } //grouping vm-flavor
631 grouping vswitch-epa {
632 container vswitch-epa {
633 leaf ovs-acceleration {
635 "Specifies Open vSwitch acceleration mode.
636 MANDATORY: OVS acceleration is required
637 PREFERRED: OVS acceleration is preferred";
647 "Specifies Open vSwitch hardware offload mode.
648 MANDATORY: OVS offload is required
649 PREFERRED: OVS offload is preferred";
659 grouping hypervisor-epa {
660 container hypervisor-epa {
663 "Specifies the type of hypervisor.
679 description "Specifies the host level EPA attributes.";
682 "Host CPU model. Examples include: SandyBridge,
685 enum PREFER_WESTMERE;
686 enum REQUIRE_WESTMERE;
687 enum PREFER_SANDYBRIDGE;
688 enum REQUIRE_SANDYBRIDGE;
689 enum PREFER_IVYBRIDGE;
690 enum REQUIRE_IVYBRIDGE;
692 enum REQUIRE_HASWELL;
693 enum PREFER_BROADWELL;
694 enum REQUIRE_BROADWELL;
696 enum REQUIRE_NEHALEM;
701 enum PREFER_CORE2DUO;
702 enum REQUIRE_CORE2DUO;
707 description "Host CPU architecture.";
725 description "Host CPU Vendor.";
734 leaf cpu-socket-count {
735 description "Number of sockets on the host.";
739 leaf cpu-core-count {
740 description "Number of cores on the host.";
744 leaf cpu-core-thread-count {
745 description "Number of threads per cores on the host.";
751 description "List of CPU features.";
753 description "CPU feature.";
754 type cpu-feature-type;
759 leaf om-cpu-model-string {
760 description "Openmano CPU model string";
764 list om-cpu-feature {
766 description "List of openmano CPU features";
768 description "CPU feature";
776 description "EPA attributes for the guest";
777 container guest-epa {
778 leaf trusted-execution {
779 description "This VM should be allocated from trusted pool";
785 "Memory page allocation size. If a VM requires
786 hugepages, it should choose LARGE or SIZE_2MB
787 or SIZE_1GB. If the VM prefers hugepages it
788 should chose PREFER_LARGE.
789 LARGE : Require hugepages (either 2MB or 1GB)
790 SMALL : Doesn't require hugepages
791 SIZE_2MB : Requires 2MB hugepages
792 SIZE_1GB : Requires 1GB hugepages
793 PREFER_LARGE : Application perfers hugepages";
803 leaf cpu-pinning-policy {
805 "CPU pinning policy describes association
806 between virtual CPUs in guest and the
807 physical CPUs in the host.
808 DEDICATED : Virtual CPUs are pinned to
810 SHARED : Multiple VMs may share the
812 ANY : Any policy is acceptable for the VM";
821 leaf cpu-thread-pinning-policy {
823 "CPU thread pinning policy describes how to
824 place the guest CPUs when the host supports
826 AVOID : Avoids placing a guest on a host
828 SEPARATE: Places vCPUs on separate cores,
829 and avoids placing two vCPUs on
830 two threads of same core.
831 ISOLATE : Places each vCPU on a different core,
832 and places no vCPUs from a different
833 guest on the same core.
834 PREFER : Attempts to place vCPUs on threads
846 "List of pcie passthrough devices.";
850 "Device identifier.";
855 "Number of devices to attach to the VM.";
868 container numa-node-policy {
870 "This policy defines numa topology of the
871 guest. Specifically identifies if the guest
872 should be run on a host with one numa
873 node or multiple numa nodes. As an example
874 a guest may want 8 vcpus and 4 GB of
875 memory. But may want the vcpus and memory
876 distributed across multiple numa nodes.
877 The NUMA node 1 may run with 6 vcpus and
878 3GB, and NUMA node 2 may run with 2 vcpus
883 "The number of numa nodes to expose to the VM.";
889 "This policy specifies how the memory should
890 be allocated in a multi-node scenario.
891 STRICT : The memory must be allocated
892 strictly from the memory attached
894 PREFERRED : The memory should be allocated
895 perferentially from the memory
896 attached to the NUMA node";
907 "NUMA node identification. Typically
915 "List of vcpus to allocate on
919 description "List of vcpus ids to allocate on
926 "Memory size expressed in MB
927 for this NUMA node.";
931 choice om-numa-type {
933 "Openmano Numa type selection";
941 case paired-threads {
942 container paired-threads {
943 leaf num-paired-threads {
947 list paired-thread-ids {
949 "List of thread pairs to use in case of paired-thread numa";
977 grouping provider-network {
978 container provider-network {
979 description "Container for the provider network.";
980 leaf physical-network {
982 "Name of the phsyical network on which the provider
989 "Type of the overlay network.";
998 leaf segmentation_id {
1006 grouping ns-service-primitive {
1007 list service-primitive {
1009 "Network service level service primitives.";
1015 "Name of the service primitive.";
1021 "List of parameters for the service primitive.";
1024 uses manotypes:primitive-parameter;
1027 list parameter-group {
1029 "Grouping of parameters which are logically grouped in UI";
1034 "Name of the parameter group";
1040 "List of parameters for the service primitive.";
1042 uses manotypes:primitive-parameter;
1046 description "Is this parameter group mandatory";
1052 list vnf-primitive-group {
1054 "List of service primitives grouped by VNF.";
1056 key "member-vnf-index-ref";
1057 leaf member-vnf-index-ref {
1059 "Reference to member-vnf within constituent-vnfds";
1065 "A reference to a vnfd. This is a
1067 ../../../../nsd:constituent-vnfd
1068 + [nsd:id = current()/../nsd:id-ref]
1070 NOTE: An issue with confd is preventing the
1071 use of xpath. Seems to be an issue with leafref
1072 to leafref, whose target is in a different module.
1073 Once that is resovled this will switched to use
1089 description "Index of this primitive";
1094 description "Name of the primitive in the VNF primitive ";
1100 leaf user-defined-script {
1102 "A user defined script.";
1108 grouping monitoring-param {
1109 list http-endpoint {
1111 "List of http endpoints to be used by monitoring params";
1115 description "The HTTP path on the management server";
1120 description "Pick HTTPS instead of HTTP , Default is false";
1126 description "The HTTP port to connect to";
1127 type inet:port-number;
1131 description "The HTTP basic auth username";
1136 description "The HTTP basic auth password";
1140 leaf polling_interval_secs {
1141 description "The HTTP polling interval in seconds";
1148 "This is the method to be performed at the uri.
1149 GET by default for action";
1151 type manotypes:http-method;
1156 description "Custom HTTP headers to put on HTTP request";
1159 description "HTTP header key";
1164 description "HTTP header value";
1170 list monitoring-param {
1172 "List of monitoring parameters at the NS level";
1182 leaf http-endpoint-ref {
1184 path "../../http-endpoint/path";
1188 leaf json-query-method {
1189 type json-query-method;
1193 container json-query-params {
1196 "The jsonpath to use to extract value from JSON structure";
1201 "The objectpath to use to extract value from JSON structure";
1206 uses monitoring-param-ui-data;
1207 uses monitoring-param-value;
1212 grouping monitoring-param-aggregation {
1213 typedef aggregation-type {
1214 description "aggregation-type";
1224 leaf aggregation-type {
1225 type aggregation-type;
1229 grouping monitoring-param-ui-data {
1235 description "A simple tag to group monitoring parameters";
1241 type manotypes:widget-type;
1249 grouping monitoring-param-value {
1251 type param-value-type;
1255 container numeric-constraints {
1258 "Minimum value for the parameter";
1263 "Maxium value for the parameter";
1268 container text-constraints {
1271 "Minimum string length for the parameter";
1276 "Maximum string length for the parameter";
1281 leaf value-integer {
1283 "Current value for an integer parameter";
1287 leaf value-decimal {
1289 "Current value for a decimal parameter";
1297 "Current value for a string parameter";
1302 grouping control-param {
1303 list control-param {
1305 "List of control parameters to manage and
1306 update the running configuration of the VNF";
1322 description "A simple tag to group control parameters";
1328 "Minimum value for the parameter";
1334 "Maxium value for the parameter";
1338 leaf current-value {
1340 "Current value for the parameter";
1346 "Step value for the parameter";
1355 type manotypes:widget-type;
1360 "This is the URL where to perform the operation";
1367 "This is the method to be performed at the uri.
1368 POST by default for action";
1370 type manotypes:http-method;
1376 "This is the operation payload or payload template as stringified
1377 JSON. This field provides the data to be sent for this operation
1385 grouping action-param {
1388 "List of action parameters to
1404 description "A simple tag to group monitoring parameter";
1410 "This is the URL where to perform the operation";
1416 "This is the method to be performed at the uri.
1417 POST by default for action";
1419 type manotypes:http-method;
1425 "This is the operation payload or payload template to be sent in
1426 the data for this operation call";
1433 grouping input-parameter {
1436 list input-parameter {
1438 "List of input parameters";
1445 "A an xpath that specfies which element in a descriptor is to be
1452 "The value that the element specified by the xpath should take when a
1453 record is created.";
1459 grouping input-parameter-xpath {
1460 list input-parameter-xpath {
1462 "List of xpaths to parameters inside the NSD
1463 the can be customized during the instantiation.";
1468 "An xpath that specifies the element in a descriptor.";
1473 description "A descriptive string";
1477 leaf default-value {
1478 description " A default value for this input parameter";
1484 grouping nfvi-metrics {
1488 "Label to show in UI";
1495 "The total number of VCPUs available.";
1501 "The VCPU utilization (percentage).";
1512 "Label to show in UI";
1519 "The amount of memory (bytes) currently in use.";
1525 "The amount of memory (bytes) available.";
1531 "The memory utilization (percentage).";
1542 "Label to show in UI";
1549 "The amount of storage (bytes) currently in use.";
1555 "The amount of storage (bytes) available.";
1561 "The storage utilization (percentage).";
1569 container external-ports {
1572 "Label to show in UI";
1574 default "EXTERNAL PORTS";
1579 "The total number of external ports.";
1584 container internal-ports {
1587 "Label to show in UI";
1589 default "INTERNAL PORTS";
1594 "The total number of internal ports.";
1602 "Label to show in UI";
1604 default "NETWORK TRAFFIC";
1607 container incoming {
1610 "Label to show in UI";
1612 default "INCOMING NETWORK TRAFFIC";
1617 "The cumulative number of incoming bytes.";
1623 "The cumulative number of incoming packets.";
1629 "The current incoming byte-rate (bytes per second).";
1637 "The current incoming packet (packets per second).";
1644 container outgoing {
1647 "Label to show in UI";
1649 default "OUTGOING NETWORK TRAFFIC";
1654 "The cumulative number of outgoing bytes.";
1660 "The cumulative number of outgoing packets.";
1666 "The current outgoing byte-rate (bytes per second).";
1674 "The current outgoing packet (packets per second).";
1683 typedef alarm-severity-type {
1684 description "An indication of the importance or ugency of the alarm";
1692 typedef alarm-metric-type {
1693 description "The type of metrics to register the alarm for";
1695 enum CPU_UTILIZATION;
1696 enum MEMORY_UTILIZATION;
1697 enum STORAGE_UTILIZATION;
1701 typedef alarm-statistic-type {
1703 "The type of statistic to used to measure a metric to determine
1704 threshold crossing for an alarm.";
1714 typedef alarm-operation-type {
1716 "The relational operator used to define whether an alarm should be
1717 triggered when, say, the metric statistic goes above or below a
1720 enum GE; // greater than or equal
1721 enum LE; // less than or equal
1722 enum GT; // greater than
1723 enum LT; // less than
1731 "This field is reserved for the identifier assigned by the cloud
1738 description "A human readable string to identify the alarm";
1743 description "A string containing a description of this alarm";
1749 "The identifier of the VDUR that the alarm is associated with";
1761 list insufficient-data {
1778 "This flag indicates whether the alarm should be repeatedly emitted
1779 while the associated threshold has been crossed.";
1787 "This flag indicates whether the alarm has been enabled or
1795 description "A measure of the important or urgency of the alarm";
1796 type alarm-severity-type;
1800 description "The metric to be tracked by this alarm.";
1801 type alarm-metric-type;
1805 description "The type of metric statistic that is tracked by this alarm";
1806 type alarm-statistic-type;
1811 "The relational operator that defines whether the alarm should be
1812 triggered when the metric statistic is, say, above or below the
1813 specified threshold value.";
1814 type alarm-operation-type;
1819 "This value defines the threshold that, if crossed, will trigger
1828 "The period defines the length of time (seconds) that the metric
1829 data are collected over in oreder to evaluate the chosen
1836 "This is the number of samples of the metric statistic used to
1837 evaluate threshold crossing. Each sample or evaluation is equal to
1838 the metric statistic obtained for a given period. This can be used
1839 to mitigate spikes in the metric that may skew the statistic of
1845 typedef cloud-account-type {
1846 description "cloud account type";
1850 enum cloudsim_proxy;
1859 grouping host-aggregate {
1860 list host-aggregate {
1861 description "Name of the Host Aggregate";
1867 leaf metadata-value {
1873 grouping placement-group-input {
1875 type manotypes:cloud-account-type;
1877 choice cloud-provider {
1879 container availability-zone {
1880 description "Name of the Availability Zone";
1885 container server-group {
1886 description "Name of the Affinity/Anti-Affinity Server Group";
1891 uses host-aggregate;
1894 leaf aws-construct {
1899 leaf openmano-construct {
1904 leaf vsphere-construct {
1909 leaf mock-construct {
1914 leaf cloudsim-construct {
1921 grouping placement-group-info {
1926 "Place group construct to define the compute resource placement strategy
1927 in cloud environment";
1932 description "This is free text space used to describe the intent/rationale
1933 behind this placement group. This is for human consumption only";
1939 "Strategy associated with this placement group
1940 Following values are possible
1941 - COLOCATION: Colocation strategy imply intent to share the physical
1942 infrastructure (hypervisor/network) among all members
1944 - ISOLATION: Isolation strategy imply intent to not share the physical
1945 infrastructure (hypervisor/network) among the members
1952 default "COLOCATION";
1956 grouping ip-profile-info {
1957 description "Grouping for IP-Profile";
1958 container ip-profile-params {
1961 type inet:ip-version;
1965 leaf subnet-address {
1966 description "Subnet IP prefix associated with IP Profile";
1967 type inet:ip-prefix;
1970 leaf gateway-address {
1971 description "IP Address of the default gateway associated with IP Profile";
1972 type inet:ip-address;
1975 leaf security-group {
1976 description "Name of the security group";
1983 description "List of DNS Servers associated with IP Profile";
1984 type inet:ip-address;
1988 container dhcp-params {
1990 description "This flag indicates if DHCP is enabled or not";
1995 leaf start-address {
1996 description "Start IP address of the IP-Address range associated with DHCP domain";
1997 type inet:ip-address;
2001 description "Size of the DHCP pool associated with DHCP domain";
2006 leaf subnet-prefix-pool {
2007 description "VIM Specific reference to pre-created subnet prefix";
2013 grouping ip-profile-list {
2016 "List of IP Profiles.
2017 IP Profile describes the IP characteristics for the Virtual-Link";
2022 description "Name of the IP-Profile";
2027 description "Description for IP profile";
2031 uses ip-profile-info;
2035 grouping custom-config-files {
2036 description "Grouping for files needed to be mounted into an additional drive";
2037 list custom-config-files {
2039 "List of configuration files to be written on an additional drive";
2042 description "Name of the configuration file";
2046 description "Full path of the destination in the guest";
2052 grouping custom-meta-data {
2053 description "Grouping for instance-specific meta data";
2054 list custom-meta-data {
2056 "List of meta-data to be associated with the instance";
2059 description "Name of the meta-data parameter";
2064 description "Data-type the meta-data parameter";
2065 type manotypes:meta-data-type;
2070 description "Value of the meta-data parameter";
2076 grouping custom-boot-data {
2077 description "Grouping for custom vim data";
2078 container custom-boot-data {
2079 uses manotypes:custom-config-files;
2080 uses manotypes:custom-meta-data;
2082 description "Some VIMs implement custom drives to host custom-files or meta-data";
2089 grouping volume-info {
2090 description "Grouping for Volume-info";
2093 description "Description for Volume";
2098 description "Size of disk in GB";
2102 choice volume-source {
2104 "Defines the source of the volume. Possible options are
2105 1. Ephemeral -- Empty disk
2106 2. Image -- Refer to image to be used for volume
2107 3. Volume -- Reference of pre-existing volume to be used
2117 uses image-properties;
2122 description "Reference for pre-existing volume in VIM";
2128 container boot-params {
2130 description "This flag indicates if this is boot volume or not";
2133 leaf boot-priority {
2134 description "Boot priority associated with volume";
2139 container guest-params {
2140 description "Guest virtualization parameter associated with volume";
2143 description "Type of disk-bus on which this disk is exposed to guest";
2153 description "The type of device as exposed to guest";
2162 uses custom-meta-data;