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";
1267 description "A tag to group control parameters";
1273 "Minimum value for the parameter";
1279 "Maximum value for the parameter";
1283 leaf current-value {
1285 "Current value for the parameter";
1291 "Step value for the parameter";
1300 type manotypes:widget-type;
1305 "This is the URL where the operation should be performed.";
1312 "Method that the URI should perform.
1313 Default Action is POST";
1315 type manotypes:http-method;
1321 "This is the operation payload or payload template as stringified
1322 JSON. This field provides the data to be sent for this operation
1330 grouping action-param {
1333 "List of action parameters to
1349 description "A tag to group monitoring parameter";
1355 "This is the URL where to perform the operation";
1361 "This is the method to be performed at the uri.
1362 POST by default for action";
1364 type manotypes:http-method;
1370 "This is the operation payload or payload template to be sent in
1371 the data for this operation call";
1378 grouping input-parameter {
1379 description "List of input parameters that can be specified when instantiating a network service.";
1381 list input-parameter {
1383 "List of input parameters";
1390 "An xpath that specfies which element in a descriptor is to be
1397 "The value that the element specified by the xpath should take when a
1398 record is created.";
1404 grouping input-parameter-xpath {
1405 list input-parameter-xpath {
1407 "List of xpaths to parameters inside the NSD
1408 the can be customized during the instantiation.";
1413 "An xpath that specifies the element in a descriptor.";
1418 description "A descriptive string";
1422 leaf default-value {
1423 description "/nsd:nsd-catalog/nsd:nsd/nsd:vendor";
1429 grouping nfvi-metrics {
1433 "Label to show in UI";
1440 "The total number of VCPUs available.";
1446 "The VCPU utilization (percentage).";
1457 "Label to show in UI";
1464 "The amount of memory (bytes) currently in use.";
1470 "The amount of memory (bytes) available.";
1476 "The memory utilization (percentage).";
1487 "Label to show in UI";
1494 "The amount of storage (bytes) currently in use.";
1500 "The amount of storage (bytes) available.";
1506 "The storage utilization (percentage).";
1514 container external-ports {
1517 "Label to show in UI";
1519 default "EXTERNAL PORTS";
1524 "The total number of external ports.";
1529 container internal-ports {
1532 "Label to show in UI";
1534 default "INTERNAL PORTS";
1539 "The total number of internal ports.";
1547 "Label to show in UI";
1549 default "NETWORK TRAFFIC";
1552 container incoming {
1555 "Label to show in UI";
1557 default "INCOMING NETWORK TRAFFIC";
1562 "The cumulative number of incoming bytes.";
1568 "The cumulative number of incoming packets.";
1574 "The current incoming byte-rate (bytes per second).";
1582 "The current incoming packet (packets per second).";
1589 container outgoing {
1592 "Label to show in UI";
1594 default "OUTGOING NETWORK TRAFFIC";
1599 "The cumulative number of outgoing bytes.";
1605 "The cumulative number of outgoing packets.";
1611 "The current outgoing byte-rate (bytes per second).";
1619 "The current outgoing packet (packets per second).";
1628 typedef alarm-severity-type {
1629 description "An indication of the importance or urgency of the alarm";
1637 typedef alarm-metric-type {
1638 description "The type of metrics to register the alarm for";
1640 enum CPU_UTILIZATION;
1641 enum MEMORY_UTILIZATION;
1642 enum STORAGE_UTILIZATION;
1646 typedef alarm-statistic-type {
1648 "Statistic type to use to determine threshold crossing
1659 typedef alarm-operation-type {
1661 "The relational operator used to define whether an alarm
1662 should be triggered in certain scenarios, such as if the
1663 metric statistic goes above or below a specified value.";
1665 enum GE; // greater than or equal
1666 enum LE; // less than or equal
1667 enum GT; // greater than
1668 enum LT; // less than
1676 "This field is reserved for the identifier assigned by the VIM provider";
1682 description "A human readable string to identify the alarm";
1687 description "A description of this alarm";
1693 "The identifier of the VDUR that the alarm is associated with";
1705 list insufficient-data {
1722 "This flag indicates whether the alarm should be repeatedly emitted
1723 while the associated threshold has been crossed.";
1731 "This flag indicates whether the alarm has been enabled or
1739 description "A measure of the importance or urgency of the alarm";
1740 type alarm-severity-type;
1744 description "The metric to be tracked by this alarm.";
1745 type alarm-metric-type;
1749 description "The type of metric statistic that is tracked by this alarm";
1750 type alarm-statistic-type;
1755 "The relational operator used to define whether an alarm should be
1756 triggered in certain scenarios, such as if the metric statistic
1757 goes above or below a specified value.";
1758 type alarm-operation-type;
1763 "This value defines the threshold that, if crossed, will trigger
1772 "The period defines the length of time (seconds) that the metric
1773 data are collected over in oreder to evaluate the chosen
1780 "Defines the length of time (seconds) in which metric data are
1781 collected in order to evaluate the chosen statistic.";
1786 typedef cloud-account-type {
1787 description "VIM account type";
1791 enum cloudsim_proxy;
1800 grouping host-aggregate {
1801 list host-aggregate {
1802 description "Name of the Host Aggregate";
1807 "Name of the additional information attached to the host-aggregate";
1810 leaf metadata-value {
1812 "Value of the corresponding metadata-key";
1818 grouping placement-group-input {
1820 type manotypes:cloud-account-type;
1822 choice cloud-provider {
1824 container availability-zone {
1825 description "Name of the Availability Zone";
1830 container server-group {
1831 description "Name of the Affinity/Anti-Affinity Server Group";
1836 uses host-aggregate;
1839 leaf aws-construct {
1844 leaf openmano-construct {
1849 leaf vsphere-construct {
1854 leaf mock-construct {
1859 leaf cloudsim-construct {
1866 grouping placement-group-info {
1871 "Place group construct to define the compute resource placement strategy
1872 in cloud environment";
1877 description "This is free text space used to describe the intent/rationale
1878 behind this placement group. This is for human consumption only";
1884 "Strategy associated with this placement group
1885 Following values are possible
1886 - COLOCATION: Colocation strategy imply intent to share the physical
1887 infrastructure (hypervisor/network) among all members
1889 - ISOLATION: Isolation strategy imply intent to not share the physical
1890 infrastructure (hypervisor/network) among the members
1897 default "COLOCATION";
1901 grouping ip-profile-info {
1902 description "Grouping for IP-Profile";
1903 container ip-profile-params {
1906 type inet:ip-version;
1910 leaf subnet-address {
1911 description "Subnet IP prefix associated with IP Profile";
1912 type inet:ip-prefix;
1915 leaf gateway-address {
1916 description "IP Address of the default gateway associated with IP Profile";
1917 type inet:ip-address;
1920 leaf security-group {
1921 description "Name of the security group";
1928 description "List of DNS Servers associated with IP Profile";
1929 type inet:ip-address;
1933 container dhcp-params {
1935 description "This flag indicates if DHCP is enabled or not";
1940 leaf start-address {
1941 description "Start IP address of the IP-Address range associated with DHCP domain";
1942 type inet:ip-address;
1946 description "Size of the DHCP pool associated with DHCP domain";
1951 leaf subnet-prefix-pool {
1952 description "VIM Specific reference to pre-created subnet prefix";
1958 grouping ip-profile-list {
1961 "List of IP Profiles.
1962 IP Profile describes the IP characteristics for the Virtual-Link";
1967 description "Name of the IP-Profile";
1972 description "Description for IP profile";
1976 uses ip-profile-info;
1980 grouping config-file {
1981 description "Grouping for files needed to be mounted into an additional drive";
1984 "List of configuration files to be written on an additional drive";
1987 description "Name of the configuration file";
1991 description "Full path of the destination in the guest";
1997 grouping supplemental-boot-data {
1998 description "Grouping for custom vim data";
1999 container supplemental-boot-data {
2000 uses manotypes:config-file;
2001 leaf boot-data-drive {
2002 description "Some VIMs implement additional drives to host config-files or meta-data";
2009 grouping volume-info {
2010 description "Grouping for Volume-info";
2013 description "Description for Volume";
2018 description "Size of disk in GB";
2022 choice volume-source {
2024 "Defines the source of the volume. Possible options are
2025 1. Ephemeral -- Empty disk
2026 2. Image -- Refer to image to be used for volume
2027 3. Volume -- Reference of pre-existing volume to be used
2037 uses image-properties;
2043 description "Type of disk-bus on which this disk is exposed to guest";
2053 description "The type of device as exposed to guest";