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 parameter";
109 "The value should be dimmed 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 package it will
154 be uploaded to all VIM accounts during onboarding process.
155 Otherwise, the image must be added to the VIM 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.";
197 description "Value of the configuration primitive.";
203 grouping vnf-configuration {
204 container vnf-configuration {
205 rwpb:msg-new VnfConfiguration;
207 "Information about the VNF configuration. Note:
208 If the NS contains multiple instances of the
209 same VNF, each instance could have a different
212 choice config-method {
214 "Defines the configuration method for the VNF.";
217 "Use NETCONF for configuring the VNF.";
221 "Netconf configuration target";
230 "Protocol to use for NETCONF, such as ssh";
239 "Port for the NETCONF server.";
240 type inet:port-number;
247 "Use REST for configuring the VNF.";
251 "Port for the REST server.";
252 type inet:port-number;
259 "Use custom script for configuring the VNF.
260 This script is executed in the context of
261 Orchestrator (The same system and environment
266 "Script type - currently supported : bash, expect";
277 "Configure the VNF through Juju.";
280 description "Juju charm to use with the VNF.";
287 container config-access {
288 leaf mgmt-ip-address {
290 "IP address to be used to configure this VNF,
291 optional if it is possible to resolve dynamically.";
292 type inet:ip-address;
297 "User name for configuration.";
303 "Password for configuration access authentication.";
308 container config-attributes {
310 "Miscellaneous input parameters to be considered
311 while processing the NSD to apply configuration";
313 leaf config-priority {
315 "Configuration priority - order of configuration
316 to be applied to each VNF in this NS. A low
317 number takes precedence over a high number";
323 "Wait (seconds) before applying the configuration to VNF";
328 list service-primitive {
329 rwpb:msg-new ServicePrimitive;
331 "List of service primitives supported by the
332 configuration agent for this VNF.";
337 "Name of the service primitive.";
343 "List of parameters to the service primitive.";
345 uses primitive-parameter;
349 list initial-config-primitive {
350 rwpb:msg-new InitialConfigPrimitive;
352 "Initial set of configuration primitives.";
357 leaf config-template {
359 "Configuration template for each VNF";
363 } // END - grouping vnf-configuration
365 typedef virtual-link-type {
367 "Type of virtual link
368 ELAN: A multipoint service connecting a set of VNFs
369 // ELINE: For a simple point to point connection
370 // between a VNF and the existing network.
371 // ETREE: A multipoint service connecting one or
372 // more roots and a set of leaves, but
373 // preventing inter-leaf communication.";
381 grouping named-value {
391 typedef http-method {
393 "Type of HTTP operation";
407 "Type of API to fetch monitoring parameters";
416 typedef json-query-method {
418 "The method to extract a value from a JSON response
420 NAMEKEY - Use the name as the key for a non-nested value.
421 JSONPATH - Use jsonpath-rw implementation to extract a value.
422 OBJECTPATH - Use objectpath implementation to extract a value.";
430 typedef param-value-type {
432 "The type of the parameter value";
440 typedef connection-point-type {
442 "Type of connection point
444 // VNIC_ADDR: Virtual NIC Address
445 // PNIC_ADDR: Physical NIC Address
446 // PPORT: Physical Port.";
453 typedef widget-type {
455 "Type of the widget, typically used by the UI.";
466 typedef cpu-feature-type {
468 "Enumeration for CPU features.
470 AES: CPU supports advanced instruction set for
471 AES (Advanced Encryption Standard).
473 CAT: Cache Allocation Technology (CAT) allows
474 an Operating System, Hypervisor, or similar
475 system management agent to specify the amount
476 of L3 cache (currently the last-level cache
477 in most server and client platforms) space an
478 application can fill (as a hint to hardware
479 functionality, certain features such as power
480 management may override CAT settings).
482 CMT: Cache Monitoring Technology (CMT) allows
483 an Operating System, Hypervisor, or similar
484 system management agent to determine the
485 usage of cache based on applications running
486 on the platform. The implementation is
487 directed at L3 cache monitoring (currently
488 the last-level cache in most server and
491 DDIO: Intel Data Direct I/O (DDIO) enables
492 Ethernet server NICs and controllers talk
493 directly to the processor cache without a
494 detour via system memory. This enumeration
495 specifies if the VM requires a DDIO
539 enum REQUIRE_CLFLUSH;
567 enum REQUIRE_PCLMULQDQ;
568 enum PREFER_PCLMULQDQ;
571 enum REQUIRE_MONITOR;
609 enum REQUIRE_TSC_DEADLINE_TIMER;
610 enum PREFER_TSC_DEADLINE_TIMER;
619 enum REQUIRE_FSGSBASE;
620 enum PREFER_FSGSBASE;
633 enum REQUIRE_INVPCID;
649 container vm-flavor {
652 "Number of VCPUs for the VM.";
658 "Amount of memory in MB.";
664 "Amount of disk space in GB.";
668 } //grouping vm-flavor
670 grouping vswitch-epa {
671 container vswitch-epa {
672 leaf ovs-acceleration {
674 "Specifies Open vSwitch acceleration mode.
675 MANDATORY: OVS acceleration is required
676 PREFERRED: OVS acceleration is preferred";
686 "Specifies Open vSwitch hardware offload mode.
687 MANDATORY: OVS offload is required
688 PREFERRED: OVS offload is preferred";
698 grouping hypervisor-epa {
699 container hypervisor-epa {
702 "Specifies the type of hypervisor.
718 description "Specifies the host level EPA attributes.";
721 "Host CPU model. Examples include: SandyBridge,
724 enum PREFER_WESTMERE;
725 enum REQUIRE_WESTMERE;
726 enum PREFER_SANDYBRIDGE;
727 enum REQUIRE_SANDYBRIDGE;
728 enum PREFER_IVYBRIDGE;
729 enum REQUIRE_IVYBRIDGE;
731 enum REQUIRE_HASWELL;
732 enum PREFER_BROADWELL;
733 enum REQUIRE_BROADWELL;
735 enum REQUIRE_NEHALEM;
740 enum PREFER_CORE2DUO;
741 enum REQUIRE_CORE2DUO;
746 description "Host CPU architecture.";
764 description "Host CPU Vendor.";
773 leaf cpu-socket-count {
774 description "Number of sockets on the host.";
778 leaf cpu-core-count {
779 description "Number of cores on the host.";
783 leaf cpu-core-thread-count {
784 description "Number of threads per cores on the host.";
790 description "List of CPU features.";
792 description "CPU feature.";
793 type cpu-feature-type;
798 leaf om-cpu-model-string {
799 description "OpenMANO CPU model string";
803 list om-cpu-feature {
805 description "List of OpenMANO CPU features";
807 description "CPU feature";
815 description "EPA attributes for the guest";
816 container guest-epa {
817 leaf trusted-execution {
818 description "This VM should be allocated from trusted pool";
824 "Memory page allocation size. If a VM requires
825 hugepages, it should choose LARGE or SIZE_2MB
826 or SIZE_1GB. If the VM prefers hugepages it
827 should choose PREFER_LARGE.
828 LARGE : Require hugepages (either 2MB or 1GB)
829 SMALL : Doesn't require hugepages
830 SIZE_2MB : Requires 2MB hugepages
831 SIZE_1GB : Requires 1GB hugepages
832 PREFER_LARGE : Application prefers hugepages";
842 leaf cpu-pinning-policy {
844 "CPU pinning policy describes association
845 between virtual CPUs in guest and the
846 physical CPUs in the host.
847 DEDICATED : Virtual CPUs are pinned to
849 SHARED : Multiple VMs may share the
851 ANY : Any policy is acceptable for the VM";
860 leaf cpu-thread-pinning-policy {
862 "CPU thread pinning policy describes how to
863 place the guest CPUs when the host supports
865 AVOID : Avoids placing a guest on a host
867 SEPARATE: Places vCPUs on separate cores,
868 and avoids placing two vCPUs on
869 two threads of same core.
870 ISOLATE : Places each vCPU on a different core,
871 and places no vCPUs from a different
872 guest on the same core.
873 PREFER : Attempts to place vCPUs on threads
885 "List of pcie passthrough devices.";
889 "Device identifier.";
894 "Number of devices to attach to the VM.";
907 container numa-node-policy {
909 "This policy defines NUMA topology of the
910 guest. Specifically identifies if the guest
911 should be run on a host with one NUMA
912 node or multiple NUMA nodes. As an example
913 a guest might need 8 VCPUs and 4 GB of
914 memory. However, it might need the VCPUs
915 and memory distributed across multiple
916 NUMA nodes. In this scenario, NUMA node
917 1 could run with 6 VCPUs and 3GB, and
918 NUMA node 2 could run with 2 VCPUs and
923 "The number of NUMA nodes to expose to the VM.";
929 "This policy specifies how the memory should
930 be allocated in a multi-node scenario.
931 STRICT : The memory must be allocated
932 strictly from the memory attached
934 PREFERRED : The memory should be allocated
935 preferentially from the memory
936 attached to the NUMA node";
947 "NUMA node identification. Typically
955 "List of VCPUs to allocate on
959 description "List of VCPUs ids to allocate on
966 "Memory size expressed in MB
967 for this NUMA node.";
971 choice om-numa-type {
973 "OpenMANO Numa type selection";
981 case paired-threads {
982 container paired-threads {
983 leaf num-paired-threads {
987 list paired-thread-ids {
989 "List of thread pairs to use in case of paired-thread NUMA";
1017 grouping provider-network {
1018 container provider-network {
1019 description "Container for the provider network.";
1020 leaf physical-network {
1022 "Name of the physical network on which the provider
1029 "Type of the overlay network.
1030 LOCAL - Provider network implemented in a single compute node
1031 FLAT - Provider network shared by all tenants
1032 VLAN - Provider network implemented using 802.1Q tagging
1033 VXLAN - Provider networks implemented using RFC 7348
1034 GRE - Provider networks implemented using GRE tunnels";
1043 leaf segmentation_id {
1045 "ID of segregated virtual networks";
1051 grouping monitoring-param {
1052 list http-endpoint {
1054 "List of http endpoints to be used by monitoring params";
1058 description "The HTTP path on the management server";
1063 description "Pick HTTPS instead of HTTP , Default is false";
1069 description "The HTTP port to connect to";
1070 type inet:port-number;
1074 description "The HTTP basic auth username";
1079 description "The HTTP basic auth password";
1083 leaf polling-interval-secs {
1084 description "The HTTP polling interval in seconds";
1091 "Method that the URI should perform.
1092 Deafult action is GET.";
1094 type manotypes:http-method;
1099 description "Custom HTTP headers to put on HTTP request";
1102 description "HTTP header key";
1107 description "HTTP header value";
1113 list monitoring-param {
1115 "List of monitoring parameters at the network service level";
1125 leaf http-endpoint-ref {
1127 path "../../http-endpoint/path";
1131 leaf json-query-method {
1132 type json-query-method;
1136 container json-query-params {
1139 "The jsonpath to use to extract value from JSON structure";
1144 "The objectpath to use to extract value from JSON structure";
1149 uses monitoring-param-ui-data;
1150 uses monitoring-param-value;
1155 grouping monitoring-param-aggregation {
1156 typedef aggregation-type {
1157 description "aggregation-type";
1167 leaf aggregation-type {
1168 type aggregation-type;
1172 grouping monitoring-param-ui-data {
1178 description "A tag to group monitoring parameters";
1184 description "Defines the UI Display variant of measured counters.";
1185 type manotypes:widget-type;
1189 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1194 grouping monitoring-param-value {
1196 type param-value-type;
1200 container numeric-constraints {
1203 "Minimum value for the parameter";
1208 "Maximum value for the parameter";
1213 container text-constraints {
1216 "Minimum string length for the parameter";
1221 "Maximum string length for the parameter";
1226 leaf value-integer {
1228 "Current value for an integer parameter";
1232 leaf value-decimal {
1234 "Current value for a decimal parameter";
1242 "Current value for a string parameter";
1247 grouping control-param {
1248 list control-param {
1250 "List of control parameters to manage and
1251 update the running configuration of the VNF";
1255 description "Identifier for control parameter";
1260 description "Name of a control parameter";
1265 description "A description of the control parameter";
1270 description "A tag to group control parameters";
1276 "Minimum value for the parameter";
1282 "Maximum value for the parameter";
1286 leaf current-value {
1288 "Current value for the parameter";
1294 "Step value for the parameter";
1303 type manotypes:widget-type;
1308 "This is the URL where the operation should be performed.";
1315 "Method that the URI should perform.
1316 Default Action is POST";
1318 type manotypes:http-method;
1324 "This is the operation payload or payload template as stringified
1325 JSON. This field provides the data to be sent for this operation
1333 grouping action-param {
1336 "List of action parameters to
1352 description "A tag to group monitoring parameter";
1358 "This is the URL where to perform the operation";
1364 "This is the method to be performed at the uri.
1365 POST by default for action";
1367 type manotypes:http-method;
1373 "This is the operation payload or payload template to be sent in
1374 the data for this operation call";
1381 grouping input-parameter {
1382 description "List of input parameters that can be specified when instantiating a network service.";
1384 list input-parameter {
1386 "List of input parameters";
1393 "An xpath that specfies which element in a descriptor is to be
1400 "The value that the element specified by the xpath should take when a
1401 record is created.";
1407 grouping input-parameter-xpath {
1408 list input-parameter-xpath {
1410 "List of xpaths to parameters inside the NSD
1411 the can be customized during the instantiation.";
1416 "An xpath that specifies the element in a descriptor.";
1421 description "A descriptive string";
1425 leaf default-value {
1426 description "/nsd:nsd-catalog/nsd:nsd/nsd:vendor";
1432 grouping nfvi-metrics {
1436 "Label to show in UI";
1443 "The total number of VCPUs available.";
1449 "The VCPU utilization (percentage).";
1460 "Label to show in UI";
1467 "The amount of memory (bytes) currently in use.";
1473 "The amount of memory (bytes) available.";
1479 "The memory utilization (percentage).";
1490 "Label to show in UI";
1497 "The amount of storage (bytes) currently in use.";
1503 "The amount of storage (bytes) available.";
1509 "The storage utilization (percentage).";
1517 container external-ports {
1520 "Label to show in UI";
1522 default "EXTERNAL PORTS";
1527 "The total number of external ports.";
1532 container internal-ports {
1535 "Label to show in UI";
1537 default "INTERNAL PORTS";
1542 "The total number of internal ports.";
1550 "Label to show in UI";
1552 default "NETWORK TRAFFIC";
1555 container incoming {
1558 "Label to show in UI";
1560 default "INCOMING NETWORK TRAFFIC";
1565 "The cumulative number of incoming bytes.";
1571 "The cumulative number of incoming packets.";
1577 "The current incoming byte-rate (bytes per second).";
1585 "The current incoming packet (packets per second).";
1592 container outgoing {
1595 "Label to show in UI";
1597 default "OUTGOING NETWORK TRAFFIC";
1602 "The cumulative number of outgoing bytes.";
1608 "The cumulative number of outgoing packets.";
1614 "The current outgoing byte-rate (bytes per second).";
1622 "The current outgoing packet (packets per second).";
1631 typedef alarm-severity-type {
1632 description "An indication of the importance or urgency of the alarm";
1640 typedef alarm-metric-type {
1641 description "The type of metrics to register the alarm for";
1643 enum CPU_UTILIZATION;
1644 enum MEMORY_UTILIZATION;
1645 enum STORAGE_UTILIZATION;
1649 typedef alarm-statistic-type {
1651 "Statistic type to use to determine threshold crossing
1662 typedef alarm-operation-type {
1664 "The relational operator used to define whether an alarm
1665 should be triggered in certain scenarios, such as if the
1666 metric statistic goes above or below a specified value.";
1668 enum GE; // greater than or equal
1669 enum LE; // less than or equal
1670 enum GT; // greater than
1671 enum LT; // less than
1679 "This field is reserved for the identifier assigned by the VIM provider";
1685 description "A human readable string to identify the alarm";
1690 description "A description of this alarm";
1696 "The identifier of the VDUR that the alarm is associated with";
1708 list insufficient-data {
1725 "This flag indicates whether the alarm should be repeatedly emitted
1726 while the associated threshold has been crossed.";
1734 "This flag indicates whether the alarm has been enabled or
1742 description "A measure of the importance or urgency of the alarm";
1743 type alarm-severity-type;
1747 description "The metric to be tracked by this alarm.";
1748 type alarm-metric-type;
1752 description "The type of metric statistic that is tracked by this alarm";
1753 type alarm-statistic-type;
1758 "The relational operator used to define whether an alarm should be
1759 triggered in certain scenarios, such as if the metric statistic
1760 goes above or below a specified value.";
1761 type alarm-operation-type;
1766 "This value defines the threshold that, if crossed, will trigger
1775 "The period defines the length of time (seconds) that the metric
1776 data are collected over in oreder to evaluate the chosen
1783 "Defines the length of time (seconds) in which metric data are
1784 collected in order to evaluate the chosen statistic.";
1789 typedef cloud-account-type {
1790 description "VIM account type";
1794 enum cloudsim_proxy;
1803 grouping host-aggregate {
1804 list host-aggregate {
1805 description "Name of the Host Aggregate";
1810 "Name of the additional information attached to the host-aggregate";
1813 leaf metadata-value {
1815 "Value of the corresponding metadata-key";
1821 grouping placement-group-input {
1823 type manotypes:cloud-account-type;
1825 choice cloud-provider {
1827 container availability-zone {
1828 description "Name of the Availability Zone";
1833 container server-group {
1834 description "Name of the Affinity/Anti-Affinity Server Group";
1839 uses host-aggregate;
1842 leaf aws-construct {
1847 leaf openmano-construct {
1852 leaf vsphere-construct {
1857 leaf mock-construct {
1862 leaf cloudsim-construct {
1869 grouping placement-group-info {
1874 "Place group construct to define the compute resource placement strategy
1875 in cloud environment";
1880 description "This is free text space used to describe the intent/rationale
1881 behind this placement group. This is for human consumption only";
1887 "Strategy associated with this placement group
1888 Following values are possible
1889 - COLOCATION: Colocation strategy imply intent to share the physical
1890 infrastructure (hypervisor/network) among all members
1892 - ISOLATION: Isolation strategy imply intent to not share the physical
1893 infrastructure (hypervisor/network) among the members
1900 default "COLOCATION";
1904 grouping ip-profile-info {
1905 description "Grouping for IP-Profile";
1906 container ip-profile-params {
1909 type inet:ip-version;
1913 leaf subnet-address {
1914 description "Subnet IP prefix associated with IP Profile";
1915 type inet:ip-prefix;
1918 leaf gateway-address {
1919 description "IP Address of the default gateway associated with IP Profile";
1920 type inet:ip-address;
1923 leaf security-group {
1924 description "Name of the security group";
1931 description "List of DNS Servers associated with IP Profile";
1932 type inet:ip-address;
1936 container dhcp-params {
1938 description "This flag indicates if DHCP is enabled or not";
1943 leaf start-address {
1944 description "Start IP address of the IP-Address range associated with DHCP domain";
1945 type inet:ip-address;
1949 description "Size of the DHCP pool associated with DHCP domain";
1954 leaf subnet-prefix-pool {
1955 description "VIM Specific reference to pre-created subnet prefix";
1961 grouping ip-profile-list {
1964 "List of IP Profiles.
1965 IP Profile describes the IP characteristics for the Virtual-Link";
1970 description "Name of the IP-Profile";
1975 description "Description for IP profile";
1979 uses ip-profile-info;
1983 grouping config-file {
1984 description "Grouping for files needed to be mounted into an additional drive";
1987 "List of configuration files to be written on an additional drive";
1990 description "Name of the configuration file";
1994 description "Full path of the destination in the guest";
2000 grouping supplemental-boot-data {
2001 description "Grouping for custom vim data";
2002 container supplemental-boot-data {
2003 uses manotypes:config-file;
2004 leaf boot-data-drive {
2005 description "Some VIMs implement additional drives to host config-files or meta-data";
2012 grouping volume-info {
2013 description "Grouping for Volume-info";
2016 description "Description for Volume";
2021 description "Size of disk in GB";
2025 choice volume-source {
2027 "Defines the source of the volume. Possible options are
2028 1. Ephemeral -- Empty disk
2029 2. Image -- Refer to image to be used for volume
2030 3. Volume -- Reference of pre-existing volume to be used
2040 uses image-properties;
2046 description "Type of disk-bus on which this disk is exposed to guest";
2056 description "The type of device as exposed to guest";