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 vca-relationships {
204 container vca-relationships {
206 description "List of relations between VCA componets.";
208 key "requires provides";
212 "Name of the required relation.";
218 "Name of the provided relation.";
226 grouping vca-configuration {
228 "Information about the VNF or VDU configuration. Note:
229 If the NS contains multiple instances of the
230 same VNF or VDU, each instance could have a different
233 choice config-method {
235 "Defines the configuration method for the VNF or VDU.";
238 "Use custom script for configuring the VNF or VDU.
239 This script is executed in the context of
240 Orchestrator (The same system and environment
245 "Script type - currently supported - Scripts confirming to Rift CA plugin";
255 "Configure the VNF or VDU through Juju.";
258 description "Juju charm to use with the VNF or VDU.";
261 uses manotypes:vca-relationships;
267 list service-primitive {
268 rwpb:msg-new ServicePrimitive;
270 "List of service primitives supported by the
271 configuration agent for this VNF or VDU.";
276 "Name of the service primitive.";
282 "List of parameters to the service primitive.";
284 uses primitive-parameter;
288 list initial-config-primitive {
289 rwpb:msg-new InitialConfigPrimitive;
291 "Initial set of configuration primitives.";
296 } // END - grouping vca-configuration
298 typedef virtual-link-type {
300 "Type of virtual link
301 ELAN: A multipoint service connecting a set of VNFs
302 // ELINE: For a simple point to point connection
303 // between a VNF and the existing network.
304 // ETREE: A multipoint service connecting one or
305 // more roots and a set of leaves, but
306 // preventing inter-leaf communication.";
314 grouping named-value {
324 typedef http-method {
326 "Type of HTTP operation";
340 "Type of API to fetch monitoring parameters";
349 typedef json-query-method {
351 "The method to extract a value from a JSON response
353 NAMEKEY - Use the name as the key for a non-nested value.
354 JSONPATH - Use jsonpath-rw implementation to extract a value.
355 OBJECTPATH - Use objectpath implementation to extract a value.";
363 typedef param-value-type {
365 "The type of the parameter value";
373 typedef connection-point-type {
375 "Type of connection point
377 // VNIC_ADDR: Virtual NIC Address
378 // PNIC_ADDR: Physical NIC Address
379 // PPORT: Physical Port.";
386 typedef widget-type {
388 "Type of the widget, typically used by the UI.";
399 typedef cpu-feature-type {
401 "Enumeration for CPU features.
403 AES: CPU supports advanced instruction set for
404 AES (Advanced Encryption Standard).
406 CAT: Cache Allocation Technology (CAT) allows
407 an Operating System, Hypervisor, or similar
408 system management agent to specify the amount
409 of L3 cache (currently the last-level cache
410 in most server and client platforms) space an
411 application can fill (as a hint to hardware
412 functionality, certain features such as power
413 management may override CAT settings).
415 CMT: Cache Monitoring Technology (CMT) allows
416 an Operating System, Hypervisor, or similar
417 system management agent to determine the
418 usage of cache based on applications running
419 on the platform. The implementation is
420 directed at L3 cache monitoring (currently
421 the last-level cache in most server and
424 DDIO: Intel Data Direct I/O (DDIO) enables
425 Ethernet server NICs and controllers talk
426 directly to the processor cache without a
427 detour via system memory. This enumeration
428 specifies if the VM requires a DDIO
472 enum REQUIRE_CLFLUSH;
500 enum REQUIRE_PCLMULQDQ;
501 enum PREFER_PCLMULQDQ;
504 enum REQUIRE_MONITOR;
542 enum REQUIRE_TSC_DEADLINE_TIMER;
543 enum PREFER_TSC_DEADLINE_TIMER;
552 enum REQUIRE_FSGSBASE;
553 enum PREFER_FSGSBASE;
566 enum REQUIRE_INVPCID;
582 container vm-flavor {
585 "Number of VCPUs for the VM.";
591 "Amount of memory in MB.";
597 "Amount of disk space in GB.";
601 } //grouping vm-flavor
603 grouping vswitch-epa {
604 container vswitch-epa {
605 leaf ovs-acceleration {
607 "Specifies Open vSwitch acceleration mode.
608 MANDATORY: OVS acceleration is required
609 PREFERRED: OVS acceleration is preferred";
619 "Specifies Open vSwitch hardware offload mode.
620 MANDATORY: OVS offload is required
621 PREFERRED: OVS offload is preferred";
631 grouping hypervisor-epa {
632 container hypervisor-epa {
635 "Specifies the type of hypervisor.
651 description "Specifies the host level EPA attributes.";
654 "Host CPU model. Examples include: SandyBridge,
657 enum PREFER_WESTMERE;
658 enum REQUIRE_WESTMERE;
659 enum PREFER_SANDYBRIDGE;
660 enum REQUIRE_SANDYBRIDGE;
661 enum PREFER_IVYBRIDGE;
662 enum REQUIRE_IVYBRIDGE;
664 enum REQUIRE_HASWELL;
665 enum PREFER_BROADWELL;
666 enum REQUIRE_BROADWELL;
668 enum REQUIRE_NEHALEM;
673 enum PREFER_CORE2DUO;
674 enum REQUIRE_CORE2DUO;
679 description "Host CPU architecture.";
697 description "Host CPU Vendor.";
706 leaf cpu-socket-count {
707 description "Number of sockets on the host.";
711 leaf cpu-core-count {
712 description "Number of cores on the host.";
716 leaf cpu-core-thread-count {
717 description "Number of threads per cores on the host.";
723 description "List of CPU features.";
725 description "CPU feature.";
726 type cpu-feature-type;
731 leaf om-cpu-model-string {
732 description "OpenMANO CPU model string";
736 list om-cpu-feature {
738 description "List of OpenMANO CPU features";
740 description "CPU feature";
748 description "EPA attributes for the guest";
749 container guest-epa {
750 leaf trusted-execution {
751 description "This VM should be allocated from trusted pool";
757 "Memory page allocation size. If a VM requires
758 hugepages, it should choose LARGE or SIZE_2MB
759 or SIZE_1GB. If the VM prefers hugepages it
760 should choose PREFER_LARGE.
761 LARGE : Require hugepages (either 2MB or 1GB)
762 SMALL : Doesn't require hugepages
763 SIZE_2MB : Requires 2MB hugepages
764 SIZE_1GB : Requires 1GB hugepages
765 PREFER_LARGE : Application prefers hugepages";
775 leaf cpu-pinning-policy {
777 "CPU pinning policy describes association
778 between virtual CPUs in guest and the
779 physical CPUs in the host.
780 DEDICATED : Virtual CPUs are pinned to
782 SHARED : Multiple VMs may share the
784 ANY : Any policy is acceptable for the VM";
793 leaf cpu-thread-pinning-policy {
795 "CPU thread pinning policy describes how to
796 place the guest CPUs when the host supports
798 AVOID : Avoids placing a guest on a host
800 SEPARATE: Places vCPUs on separate cores,
801 and avoids placing two vCPUs on
802 two threads of same core.
803 ISOLATE : Places each vCPU on a different core,
804 and places no vCPUs from a different
805 guest on the same core.
806 PREFER : Attempts to place vCPUs on threads
818 "List of pcie passthrough devices.";
822 "Device identifier.";
827 "Number of devices to attach to the VM.";
840 container numa-node-policy {
842 "This policy defines NUMA topology of the
843 guest. Specifically identifies if the guest
844 should be run on a host with one NUMA
845 node or multiple NUMA nodes. As an example
846 a guest might need 8 VCPUs and 4 GB of
847 memory. However, it might need the VCPUs
848 and memory distributed across multiple
849 NUMA nodes. In this scenario, NUMA node
850 1 could run with 6 VCPUs and 3GB, and
851 NUMA node 2 could run with 2 VCPUs and
856 "The number of NUMA nodes to expose to the VM.";
862 "This policy specifies how the memory should
863 be allocated in a multi-node scenario.
864 STRICT : The memory must be allocated
865 strictly from the memory attached
867 PREFERRED : The memory should be allocated
868 preferentially from the memory
869 attached to the NUMA node";
880 "NUMA node identification. Typically
888 "List of VCPUs to allocate on
892 description "List of VCPUs ids to allocate on
899 "Memory size expressed in MB
900 for this NUMA node.";
904 choice om-numa-type {
906 "OpenMANO Numa type selection";
914 case paired-threads {
915 container paired-threads {
916 leaf num-paired-threads {
920 list paired-thread-ids {
922 "List of thread pairs to use in case of paired-thread NUMA";
950 grouping provider-network {
951 container provider-network {
952 description "Container for the provider network.";
953 leaf physical-network {
955 "Name of the physical network on which the provider
962 "Type of the overlay network.
963 LOCAL - Provider network implemented in a single compute node
964 FLAT - Provider network shared by all tenants
965 VLAN - Provider network implemented using 802.1Q tagging
966 VXLAN - Provider networks implemented using RFC 7348
967 GRE - Provider networks implemented using GRE tunnels";
976 leaf segmentation_id {
978 "ID of segregated virtual networks";
984 grouping monitoring-param {
987 "List of http endpoints to be used by monitoring params";
991 description "The HTTP path on the management server";
996 description "Pick HTTPS instead of HTTP , Default is false";
1002 description "The HTTP port to connect to";
1003 type inet:port-number;
1007 description "The HTTP basic auth username";
1012 description "The HTTP basic auth password";
1016 leaf polling-interval-secs {
1017 description "The HTTP polling interval in seconds";
1024 "Method that the URI should perform.
1025 Deafult action is GET.";
1027 type manotypes:http-method;
1032 description "Custom HTTP headers to put on HTTP request";
1035 description "HTTP header key";
1040 description "HTTP header value";
1046 list monitoring-param {
1048 "List of monitoring parameters at the network service level";
1058 leaf http-endpoint-ref {
1060 path "../../http-endpoint/path";
1064 leaf json-query-method {
1065 type json-query-method;
1069 container json-query-params {
1072 "The jsonpath to use to extract value from JSON structure";
1077 "The objectpath to use to extract value from JSON structure";
1082 uses monitoring-param-ui-data;
1083 uses monitoring-param-value;
1088 grouping monitoring-param-aggregation {
1089 typedef aggregation-type {
1090 description "aggregation-type";
1100 leaf aggregation-type {
1101 type aggregation-type;
1105 grouping monitoring-param-ui-data {
1111 description "A tag to group monitoring parameters";
1117 description "Defines the UI Display variant of measured counters.";
1118 type manotypes:widget-type;
1122 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1127 grouping monitoring-param-value {
1129 type param-value-type;
1133 container numeric-constraints {
1136 "Minimum value for the parameter";
1141 "Maximum value for the parameter";
1146 container text-constraints {
1149 "Minimum string length for the parameter";
1154 "Maximum string length for the parameter";
1159 leaf value-integer {
1161 "Current value for an integer parameter";
1165 leaf value-decimal {
1167 "Current value for a decimal parameter";
1175 "Current value for a string parameter";
1180 grouping control-param {
1181 list control-param {
1183 "List of control parameters to manage and
1184 update the running configuration of the VNF";
1188 description "Identifier for control parameter";
1193 description "Name of a control parameter";
1198 description "A description of the control parameter";
1203 description "A tag to group control parameters";
1209 "Minimum value for the parameter";
1215 "Maximum value for the parameter";
1219 leaf current-value {
1221 "Current value for the parameter";
1227 "Step value for the parameter";
1236 type manotypes:widget-type;
1241 "This is the URL where the operation should be performed.";
1248 "Method that the URI should perform.
1249 Default Action is POST";
1251 type manotypes:http-method;
1257 "This is the operation payload or payload template as stringified
1258 JSON. This field provides the data to be sent for this operation
1266 grouping action-param {
1269 "List of action parameters to
1285 description "A tag to group monitoring parameter";
1291 "This is the URL where to perform the operation";
1297 "This is the method to be performed at the uri.
1298 POST by default for action";
1300 type manotypes:http-method;
1306 "This is the operation payload or payload template to be sent in
1307 the data for this operation call";
1314 grouping input-parameter {
1315 description "List of input parameters that can be specified when instantiating a network service.";
1317 list input-parameter {
1319 "List of input parameters";
1326 "An xpath that specfies which element in a descriptor is to be
1333 "The value that the element specified by the xpath should take when a
1334 record is created.";
1340 grouping input-parameter-xpath {
1341 list input-parameter-xpath {
1343 "List of xpaths to parameters inside the NSD
1344 the can be customized during the instantiation.";
1349 "An xpath that specifies the element in a descriptor.";
1354 description "A descriptive string";
1358 leaf default-value {
1359 description "/nsd:nsd-catalog/nsd:nsd/nsd:vendor";
1365 grouping nfvi-metrics {
1369 "Label to show in UI";
1376 "The total number of VCPUs available.";
1382 "The VCPU utilization (percentage).";
1393 "Label to show in UI";
1400 "The amount of memory (bytes) currently in use.";
1406 "The amount of memory (bytes) available.";
1412 "The memory utilization (percentage).";
1423 "Label to show in UI";
1430 "The amount of storage (bytes) currently in use.";
1436 "The amount of storage (bytes) available.";
1442 "The storage utilization (percentage).";
1450 container external-ports {
1453 "Label to show in UI";
1455 default "EXTERNAL PORTS";
1460 "The total number of external ports.";
1465 container internal-ports {
1468 "Label to show in UI";
1470 default "INTERNAL PORTS";
1475 "The total number of internal ports.";
1483 "Label to show in UI";
1485 default "NETWORK TRAFFIC";
1488 container incoming {
1491 "Label to show in UI";
1493 default "INCOMING NETWORK TRAFFIC";
1498 "The cumulative number of incoming bytes.";
1504 "The cumulative number of incoming packets.";
1510 "The current incoming byte-rate (bytes per second).";
1518 "The current incoming packet (packets per second).";
1525 container outgoing {
1528 "Label to show in UI";
1530 default "OUTGOING NETWORK TRAFFIC";
1535 "The cumulative number of outgoing bytes.";
1541 "The cumulative number of outgoing packets.";
1547 "The current outgoing byte-rate (bytes per second).";
1555 "The current outgoing packet (packets per second).";
1564 typedef alarm-severity-type {
1565 description "An indication of the importance or urgency of the alarm";
1573 typedef alarm-metric-type {
1574 description "The type of metrics to register the alarm for";
1576 enum CPU_UTILIZATION;
1577 enum MEMORY_UTILIZATION;
1578 enum STORAGE_UTILIZATION;
1582 typedef alarm-statistic-type {
1584 "Statistic type to use to determine threshold crossing
1595 typedef alarm-operation-type {
1597 "The relational operator used to define whether an alarm
1598 should be triggered in certain scenarios, such as if the
1599 metric statistic goes above or below a specified value.";
1601 enum GE; // greater than or equal
1602 enum LE; // less than or equal
1603 enum GT; // greater than
1604 enum LT; // less than
1612 "This field is reserved for the identifier assigned by the VIM provider";
1618 description "A human readable string to identify the alarm";
1623 description "A description of this alarm";
1629 "The identifier of the VDUR that the alarm is associated with";
1641 list insufficient-data {
1658 "This flag indicates whether the alarm should be repeatedly emitted
1659 while the associated threshold has been crossed.";
1667 "This flag indicates whether the alarm has been enabled or
1675 description "A measure of the importance or urgency of the alarm";
1676 type alarm-severity-type;
1680 description "The metric to be tracked by this alarm.";
1681 type alarm-metric-type;
1685 description "The type of metric statistic that is tracked by this alarm";
1686 type alarm-statistic-type;
1691 "The relational operator used to define whether an alarm should be
1692 triggered in certain scenarios, such as if the metric statistic
1693 goes above or below a specified value.";
1694 type alarm-operation-type;
1699 "This value defines the threshold that, if crossed, will trigger
1708 "The period defines the length of time (seconds) that the metric
1709 data are collected over in oreder to evaluate the chosen
1716 "Defines the length of time (seconds) in which metric data are
1717 collected in order to evaluate the chosen statistic.";
1722 typedef cloud-account-type {
1723 description "VIM account type";
1727 enum cloudsim_proxy;
1736 grouping host-aggregate {
1737 list host-aggregate {
1738 description "Name of the Host Aggregate";
1743 "Name of the additional information attached to the host-aggregate";
1746 leaf metadata-value {
1748 "Value of the corresponding metadata-key";
1754 grouping placement-group-input {
1756 type manotypes:cloud-account-type;
1758 choice cloud-provider {
1760 container availability-zone {
1761 description "Name of the Availability Zone";
1766 container server-group {
1767 description "Name of the Affinity/Anti-Affinity Server Group";
1772 uses host-aggregate;
1775 leaf aws-construct {
1780 leaf openmano-construct {
1785 leaf vsphere-construct {
1790 leaf mock-construct {
1795 leaf cloudsim-construct {
1802 grouping placement-group-info {
1807 "Place group construct to define the compute resource placement strategy
1808 in cloud environment";
1813 description "This is free text space used to describe the intent/rationale
1814 behind this placement group. This is for human consumption only";
1820 "Strategy associated with this placement group
1821 Following values are possible
1822 - COLOCATION: Colocation strategy imply intent to share the physical
1823 infrastructure (hypervisor/network) among all members
1825 - ISOLATION: Isolation strategy imply intent to not share the physical
1826 infrastructure (hypervisor/network) among the members
1833 default "COLOCATION";
1837 grouping ip-profile-info {
1838 description "Grouping for IP-Profile";
1839 container ip-profile-params {
1842 type inet:ip-version;
1846 leaf subnet-address {
1847 description "Subnet IP prefix associated with IP Profile";
1848 type inet:ip-prefix;
1851 leaf gateway-address {
1852 description "IP Address of the default gateway associated with IP Profile";
1853 type inet:ip-address;
1856 leaf security-group {
1857 description "Name of the security group";
1864 description "List of DNS Servers associated with IP Profile";
1865 type inet:ip-address;
1869 container dhcp-params {
1871 description "This flag indicates if DHCP is enabled or not";
1876 leaf start-address {
1877 description "Start IP address of the IP-Address range associated with DHCP domain";
1878 type inet:ip-address;
1882 description "Size of the DHCP pool associated with DHCP domain";
1887 leaf subnet-prefix-pool {
1888 description "VIM Specific reference to pre-created subnet prefix";
1894 grouping ip-profile-list {
1897 "List of IP Profiles.
1898 IP Profile describes the IP characteristics for the Virtual-Link";
1903 description "Name of the IP-Profile";
1908 description "Description for IP profile";
1912 uses ip-profile-info;
1916 grouping config-file {
1917 description "Grouping for files needed to be mounted into an additional drive";
1920 "List of configuration files to be written on an additional drive";
1923 description "Name of the configuration file";
1927 description "Full path of the destination in the guest";
1933 grouping supplemental-boot-data {
1934 description "Grouping for custom vim data";
1935 container supplemental-boot-data {
1936 uses manotypes:config-file;
1937 leaf boot-data-drive {
1938 description "Some VIMs implement additional drives to host config-files or meta-data";
1945 grouping volume-info {
1946 description "Grouping for Volume-info";
1949 description "Description for Volume";
1954 description "Size of disk in GB";
1958 choice volume-source {
1960 "Defines the source of the volume. Possible options are
1961 1. Ephemeral -- Empty disk
1962 2. Image -- Refer to image to be used for volume
1963 3. Volume -- Reference of pre-existing volume to be used
1973 uses image-properties;
1979 description "Type of disk-bus on which this disk is exposed to guest";
1989 description "The type of device as exposed to guest";