4 * Copyright 2016-2017 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 {
40 "Update model to support projects.";
45 "Initial revision. This YANG file defines
46 the reusable base types for VNF Management
47 and Orchestration (MANO).";
49 "Derived from earlier versions of base YANG files";
52 typedef package-type {
53 description "Type of descriptor being on-boarded";
60 typedef parameter-data-type {
68 grouping primitive-parameter-value {
71 "List of parameters to the configuration primitive.";
75 "Name of the parameter.";
81 "Value associated with the name.";
87 grouping primitive-parameter {
90 "Name of the parameter.";
96 "Data type associated with the name.";
97 type manotypes:parameter-data-type;
101 description "Is this field mandatory";
107 description "The default value for this field";
111 leaf parameter-pool {
112 description "NSD Parameter pool name to use for this paramter";
118 "The value should be greyed out by the UI.
119 Only applies to parameters with default values.";
125 "The value should be hidden by the UI.
126 Only applies to parameters with default values.";
131 grouping ui-primitive-group {
132 list parameter-group {
134 "Grouping of parameters which are logically grouped in UI";
139 "Name of the parameter group";
145 "List of parameters for the service primitive.";
147 uses manotypes:primitive-parameter;
151 description "Is this parameter group mandatory";
158 grouping image-properties {
161 "Image name for the software image.
162 If the image name is found within the VNF packaage it will
163 be uploaded to all cloud accounts during onboarding process.
164 Otherwise, the image must be added to the cloud account with
165 the same name as entered here.
170 leaf image-checksum {
172 "Image md5sum for the software image.
173 The md5sum, if provided, along with the image name uniquely
174 identifies an image uploaded to the CAL.
179 grouping initial-config {
182 "Sequence number for the configuration primitive.";
188 "Name of the configuration primitive.";
193 leaf user-defined-script {
195 "A user defined script.";
211 grouping vnf-configuration {
212 container vnf-configuration {
213 rwpb:msg-new VnfConfiguration;
215 "Information regarding the VNF configuration
216 is captured here. Note that if the NS contains
217 multiple instances of the same VNF, each instance
218 of the VNF may have different configuration";
220 choice config-method {
222 "Defines the configuration method for the VNF.";
225 "Use NETCONF for configuring the VNF.";
229 "Netconf configuration target";
238 "Protocol to use for netconf (e.g. ssh)";
247 "Port for the netconf server.";
248 type inet:port-number;
255 "Use REST for configuring the VNF.";
259 "Port for the REST server.";
260 type inet:port-number;
267 "Use custom script for configuring the VNF.
268 This script is executed in the context of
273 "Script type - currently supported : bash, expect";
284 "Configure the VNF through Juju.";
287 description "Juju charm to use with the VNF.";
294 container config-access {
295 leaf mgmt-ip-address {
297 "IP address to be used to configure this VNF,
298 optional if it is possible to resolve dynamically.";
299 type inet:ip-address;
304 "username for configuration.";
310 "Password for configuration access authentication.";
315 container config-attributes {
317 "Miscelaneous input parameters to be considered
318 while processing the NSD to apply configuration";
320 leaf config-priority {
322 "Configuration priority - order of confgiration
323 to be applied to each VNF in this NS,
324 low number gets precedence over high number";
330 "Wait (seconds) before applying the configuration to VNF";
335 list service-primitive {
336 rwpb:msg-new ServicePrimitive;
338 "List of service primitives supported by the
339 configuration agent for this VNF.";
344 "Name of the service primitive.";
350 "List of parameters to the service primitive.";
352 uses primitive-parameter;
356 list initial-config-primitive {
357 rwpb:msg-new InitialConfigPrimitive;
359 "Initial set of configuration primitives.";
364 leaf config-template {
366 "Configuration template for each VNF";
370 } // END - grouping vnf-configuration
372 typedef virtual-link-type {
374 "Type of virtual link
375 ELAN: A multipoint service connecting a set of VNFs
376 // ELINE: For a simple point to point connection
377 // between a VNF and the existing network.
378 // ETREE: A multipoint service connecting one or
379 // more roots and a set of leaves, but
380 // preventing inter-leaf communication.";
388 grouping named-value {
398 typedef http-method {
400 "Type of HTTP operation";
414 "Type of API to fetch monitoring params";
423 typedef json-query-method {
425 "The method to extract a value from a JSON response
427 NAMEKEY - Use the name as the key for a non-nested value.
428 JSONPATH - Use jsonpath-rw implemenation to extract a value.
429 OBJECTPATH - Use objectpath implemenation to extract a value.";
437 typedef param-value-type {
439 "The type of the parameter value";
447 typedef connection-point-type {
449 "Type of connection point
451 // VNIC_ADDR: Virtual NIC Address
452 // PNIC_ADDR: Physical NIC Address
453 // PPORT: Phsical Port.";
460 typedef widget-type {
462 "Type of the widget, typically used by the UI.";
473 typedef cpu-feature-type {
475 "Enumeration for CPU features.
477 AES: CPU supports advanced instruction set for
478 AES (Advanced Encryption Standard).
480 CAT: Cache Allocation Technology (CAT) allows
481 an Operating System, Hypervisor, or similar
482 system management agent to specify the amount
483 of L3 cache (currently the last-level cache
484 in most server and client platforms) space an
485 application can fill (as a hint to hardware
486 functionality, certain features such as power
487 management may override CAT settings).
489 CMT: Cache Monitoring Technology (CMT) allows
490 an Operating System, Hypervisor, or similar
491 system management agent to determine the
492 usage of cache based on applications running
493 on the platform. The implementation is
494 directed at L3 cache monitoring (currently
495 the last-level cache in most server and
498 DDIO: Intel Data Direct I/O (DDIO) enables
499 Ethernet server NICs and controllers talk
500 directly to the processor cache without a
501 detour via system memory. This enumeration
502 specifies if the VM requires a DDIO
546 enum REQUIRE_CLFLUSH;
574 enum REQUIRE_PCLMULQDQ;
575 enum PREFER_PCLMULQDQ;
578 enum REQUIRE_MONITOR;
616 enum REQUIRE_TSC_DEADLINE_TIMER;
617 enum PREFER_TSC_DEADLINE_TIMER;
626 enum REQUIRE_FSGSBASE;
627 enum PREFER_FSGSBASE;
640 enum REQUIRE_INVPCID;
656 container vm-flavor {
659 "Number of vcpus for the VM.";
665 "Amount of memory in MB.";
671 "Amount of disk space in GB.";
675 } //grouping vm-flavor
677 grouping vswitch-epa {
678 container vswitch-epa {
679 leaf ovs-acceleration {
681 "Specifies Open vSwitch acceleration mode.
682 MANDATORY: OVS acceleration is required
683 PREFERRED: OVS acceleration is preferred";
693 "Specifies Open vSwitch hardware offload mode.
694 MANDATORY: OVS offload is required
695 PREFERRED: OVS offload is preferred";
705 grouping hypervisor-epa {
706 container hypervisor-epa {
709 "Specifies the type of hypervisor.
725 description "Specifies the host level EPA attributes.";
728 "Host CPU model. Examples include: SandyBridge,
731 enum PREFER_WESTMERE;
732 enum REQUIRE_WESTMERE;
733 enum PREFER_SANDYBRIDGE;
734 enum REQUIRE_SANDYBRIDGE;
735 enum PREFER_IVYBRIDGE;
736 enum REQUIRE_IVYBRIDGE;
738 enum REQUIRE_HASWELL;
739 enum PREFER_BROADWELL;
740 enum REQUIRE_BROADWELL;
742 enum REQUIRE_NEHALEM;
747 enum PREFER_CORE2DUO;
748 enum REQUIRE_CORE2DUO;
753 description "Host CPU architecture.";
771 description "Host CPU Vendor.";
780 leaf cpu-socket-count {
781 description "Number of sockets on the host.";
785 leaf cpu-core-count {
786 description "Number of cores on the host.";
790 leaf cpu-core-thread-count {
791 description "Number of threads per cores on the host.";
797 description "List of CPU features.";
799 description "CPU feature.";
800 type cpu-feature-type;
805 leaf om-cpu-model-string {
806 description "Openmano CPU model string";
810 list om-cpu-feature {
812 description "List of openmano CPU features";
814 description "CPU feature";
822 description "EPA attributes for the guest";
823 container guest-epa {
824 leaf trusted-execution {
825 description "This VM should be allocated from trusted pool";
831 "Memory page allocation size. If a VM requires
832 hugepages, it should choose LARGE or SIZE_2MB
833 or SIZE_1GB. If the VM prefers hugepages it
834 should chose PREFER_LARGE.
835 LARGE : Require hugepages (either 2MB or 1GB)
836 SMALL : Doesn't require hugepages
837 SIZE_2MB : Requires 2MB hugepages
838 SIZE_1GB : Requires 1GB hugepages
839 PREFER_LARGE : Application perfers hugepages";
849 leaf cpu-pinning-policy {
851 "CPU pinning policy describes association
852 between virtual CPUs in guest and the
853 physical CPUs in the host.
854 DEDICATED : Virtual CPUs are pinned to
856 SHARED : Multiple VMs may share the
858 ANY : Any policy is acceptable for the VM";
867 leaf cpu-thread-pinning-policy {
869 "CPU thread pinning policy describes how to
870 place the guest CPUs when the host supports
872 AVOID : Avoids placing a guest on a host
874 SEPARATE: Places vCPUs on separate cores,
875 and avoids placing two vCPUs on
876 two threads of same core.
877 ISOLATE : Places each vCPU on a different core,
878 and places no vCPUs from a different
879 guest on the same core.
880 PREFER : Attempts to place vCPUs on threads
892 "List of pcie passthrough devices.";
896 "Device identifier.";
901 "Number of devices to attach to the VM.";
914 container numa-node-policy {
916 "This policy defines numa topology of the
917 guest. Specifically identifies if the guest
918 should be run on a host with one numa
919 node or multiple numa nodes. As an example
920 a guest may want 8 vcpus and 4 GB of
921 memory. But may want the vcpus and memory
922 distributed across multiple numa nodes.
923 The NUMA node 1 may run with 6 vcpus and
924 3GB, and NUMA node 2 may run with 2 vcpus
929 "The number of numa nodes to expose to the VM.";
935 "This policy specifies how the memory should
936 be allocated in a multi-node scenario.
937 STRICT : The memory must be allocated
938 strictly from the memory attached
940 PREFERRED : The memory should be allocated
941 perferentially from the memory
942 attached to the NUMA node";
953 "NUMA node identification. Typically
961 "List of vcpus to allocate on
965 description "List of vcpus ids to allocate on
972 "Memory size expressed in MB
973 for this NUMA node.";
977 choice om-numa-type {
979 "Openmano Numa type selection";
987 case paired-threads {
988 container paired-threads {
989 leaf num-paired-threads {
993 list paired-thread-ids {
995 "List of thread pairs to use in case of paired-thread numa";
1023 grouping provider-network {
1024 container provider-network {
1025 description "Container for the provider network.";
1026 leaf physical-network {
1028 "Name of the phsyical network on which the provider
1035 "Type of the overlay network.";
1044 leaf segmentation_id {
1052 grouping monitoring-param {
1053 list http-endpoint {
1055 "List of http endpoints to be used by monitoring params";
1059 description "The HTTP path on the management server";
1064 description "Pick HTTPS instead of HTTP , Default is false";
1070 description "The HTTP port to connect to";
1071 type inet:port-number;
1075 description "The HTTP basic auth username";
1080 description "The HTTP basic auth password";
1084 leaf polling-interval-secs {
1085 description "The HTTP polling interval in seconds";
1092 "This is the method to be performed at the uri.
1093 GET by default for action";
1095 type manotypes:http-method;
1100 description "Custom HTTP headers to put on HTTP request";
1103 description "HTTP header key";
1108 description "HTTP header value";
1114 list monitoring-param {
1116 "List of monitoring parameters at the NS level";
1126 leaf http-endpoint-ref {
1127 // TODO (Philip): Fix this
1129 // path "../../http-endpoint/path";
1134 leaf json-query-method {
1135 type json-query-method;
1139 container json-query-params {
1142 "The jsonpath to use to extract value from JSON structure";
1147 "The objectpath to use to extract value from JSON structure";
1152 uses monitoring-param-ui-data;
1153 uses monitoring-param-value;
1158 grouping monitoring-param-aggregation {
1159 typedef aggregation-type {
1160 description "aggregation-type";
1170 leaf aggregation-type {
1171 type aggregation-type;
1175 grouping monitoring-param-ui-data {
1181 description "A simple tag to group monitoring parameters";
1187 type manotypes:widget-type;
1195 grouping monitoring-param-value {
1197 type param-value-type;
1201 container numeric-constraints {
1204 "Minimum value for the parameter";
1209 "Maxium value for the parameter";
1214 container text-constraints {
1217 "Minimum string length for the parameter";
1222 "Maximum string length for the parameter";
1227 leaf value-integer {
1229 "Current value for an integer parameter";
1233 leaf value-decimal {
1235 "Current value for a decimal parameter";
1243 "Current value for a string parameter";
1248 grouping control-param {
1249 list control-param {
1251 "List of control parameters to manage and
1252 update the running configuration of the VNF";
1268 description "A simple tag to group control parameters";
1274 "Minimum value for the parameter";
1280 "Maxium value for the parameter";
1284 leaf current-value {
1286 "Current value for the parameter";
1292 "Step value for the parameter";
1301 type manotypes:widget-type;
1306 "This is the URL where to perform the operation";
1313 "This is the method to be performed at the uri.
1314 POST by default for action";
1316 type manotypes:http-method;
1322 "This is the operation payload or payload template as stringified
1323 JSON. This field provides the data to be sent for this operation
1331 grouping action-param {
1334 "List of action parameters to
1350 description "A simple tag to group monitoring parameter";
1356 "This is the URL where to perform the operation";
1362 "This is the method to be performed at the uri.
1363 POST by default for action";
1365 type manotypes:http-method;
1371 "This is the operation payload or payload template to be sent in
1372 the data for this operation call";
1379 grouping input-parameter {
1382 list input-parameter {
1384 "List of input parameters";
1391 "A an xpath that specfies which element in a descriptor is to be
1398 "The value that the element specified by the xpath should take when a
1399 record is created.";
1405 grouping input-parameter-xpath {
1406 list input-parameter-xpath {
1408 "List of xpaths to parameters inside the NSD
1409 the can be customized during the instantiation.";
1414 "An xpath that specifies the element in a descriptor.";
1419 description "A descriptive string";
1423 leaf default-value {
1424 description " A default value for this input parameter";
1430 grouping nfvi-metrics {
1434 "Label to show in UI";
1441 "The total number of VCPUs available.";
1447 "The VCPU utilization (percentage).";
1458 "Label to show in UI";
1465 "The amount of memory (bytes) currently in use.";
1471 "The amount of memory (bytes) available.";
1477 "The memory utilization (percentage).";
1488 "Label to show in UI";
1495 "The amount of storage (bytes) currently in use.";
1501 "The amount of storage (bytes) available.";
1507 "The storage utilization (percentage).";
1515 container external-ports {
1518 "Label to show in UI";
1520 default "EXTERNAL PORTS";
1525 "The total number of external ports.";
1530 container internal-ports {
1533 "Label to show in UI";
1535 default "INTERNAL PORTS";
1540 "The total number of internal ports.";
1548 "Label to show in UI";
1550 default "NETWORK TRAFFIC";
1553 container incoming {
1556 "Label to show in UI";
1558 default "INCOMING NETWORK TRAFFIC";
1563 "The cumulative number of incoming bytes.";
1569 "The cumulative number of incoming packets.";
1575 "The current incoming byte-rate (bytes per second).";
1583 "The current incoming packet (packets per second).";
1590 container outgoing {
1593 "Label to show in UI";
1595 default "OUTGOING NETWORK TRAFFIC";
1600 "The cumulative number of outgoing bytes.";
1606 "The cumulative number of outgoing packets.";
1612 "The current outgoing byte-rate (bytes per second).";
1620 "The current outgoing packet (packets per second).";
1629 typedef alarm-severity-type {
1630 description "An indication of the importance or ugency of the alarm";
1638 typedef alarm-metric-type {
1639 description "The type of metrics to register the alarm for";
1641 enum CPU_UTILIZATION;
1642 enum MEMORY_UTILIZATION;
1643 enum STORAGE_UTILIZATION;
1647 typedef alarm-statistic-type {
1649 "The type of statistic to used to measure a metric to determine
1650 threshold crossing for an alarm.";
1660 typedef alarm-operation-type {
1662 "The relational operator used to define whether an alarm should be
1663 triggered when, say, the metric statistic goes above or below a
1666 enum GE; // greater than or equal
1667 enum LE; // less than or equal
1668 enum GT; // greater than
1669 enum LT; // less than
1677 "This field is reserved for the identifier assigned by the cloud
1684 description "A human readable string to identify the alarm";
1689 description "A string containing a description of this alarm";
1695 "The identifier of the VDUR that the alarm is associated with";
1707 list insufficient-data {
1724 "This flag indicates whether the alarm should be repeatedly emitted
1725 while the associated threshold has been crossed.";
1733 "This flag indicates whether the alarm has been enabled or
1741 description "A measure of the important or urgency of the alarm";
1742 type alarm-severity-type;
1746 description "The metric to be tracked by this alarm.";
1747 type alarm-metric-type;
1751 description "The type of metric statistic that is tracked by this alarm";
1752 type alarm-statistic-type;
1757 "The relational operator that defines whether the alarm should be
1758 triggered when the metric statistic is, say, above or below the
1759 specified threshold value.";
1760 type alarm-operation-type;
1765 "This value defines the threshold that, if crossed, will trigger
1774 "The period defines the length of time (seconds) that the metric
1775 data are collected over in oreder to evaluate the chosen
1782 "This is the number of samples of the metric statistic used to
1783 evaluate threshold crossing. Each sample or evaluation is equal to
1784 the metric statistic obtained for a given period. This can be used
1785 to mitigate spikes in the metric that may skew the statistic of
1791 typedef cloud-account-type {
1792 description "cloud account type";
1796 enum cloudsim_proxy;
1805 grouping host-aggregate {
1806 list host-aggregate {
1807 description "Name of the Host Aggregate";
1813 leaf metadata-value {
1819 grouping placement-group-input {
1821 type manotypes:cloud-account-type;
1823 choice cloud-provider {
1825 container availability-zone {
1826 description "Name of the Availability Zone";
1831 container server-group {
1832 description "Name of the Affinity/Anti-Affinity Server Group";
1837 uses host-aggregate;
1840 leaf aws-construct {
1845 leaf openmano-construct {
1850 leaf vsphere-construct {
1855 leaf mock-construct {
1860 leaf cloudsim-construct {
1867 grouping placement-group-info {
1872 "Place group construct to define the compute resource placement strategy
1873 in cloud environment";
1878 description "This is free text space used to describe the intent/rationale
1879 behind this placement group. This is for human consumption only";
1885 "Strategy associated with this placement group
1886 Following values are possible
1887 - COLOCATION: Colocation strategy imply intent to share the physical
1888 infrastructure (hypervisor/network) among all members
1890 - ISOLATION: Isolation strategy imply intent to not share the physical
1891 infrastructure (hypervisor/network) among the members
1898 default "COLOCATION";
1902 grouping ip-profile-info {
1903 description "Grouping for IP-Profile";
1904 container ip-profile-params {
1907 type inet:ip-version;
1911 leaf subnet-address {
1912 description "Subnet IP prefix associated with IP Profile";
1913 type inet:ip-prefix;
1916 leaf gateway-address {
1917 description "IP Address of the default gateway associated with IP Profile";
1918 type inet:ip-address;
1921 leaf security-group {
1922 description "Name of the security group";
1929 description "List of DNS Servers associated with IP Profile";
1930 type inet:ip-address;
1934 container dhcp-params {
1936 description "This flag indicates if DHCP is enabled or not";
1941 leaf start-address {
1942 description "Start IP address of the IP-Address range associated with DHCP domain";
1943 type inet:ip-address;
1947 description "Size of the DHCP pool associated with DHCP domain";
1952 leaf subnet-prefix-pool {
1953 description "VIM Specific reference to pre-created subnet prefix";
1959 grouping ip-profile-list {
1962 "List of IP Profiles.
1963 IP Profile describes the IP characteristics for the Virtual-Link";
1968 description "Name of the IP-Profile";
1973 description "Description for IP profile";
1977 uses ip-profile-info;
1981 grouping config-file {
1982 description "Grouping for files needed to be mounted into an additional drive";
1985 "List of configuration files to be written on an additional drive";
1988 description "Name of the configuration file";
1992 description "Full path of the destination in the guest";
1998 grouping supplemental-boot-data {
1999 description "Grouping for custom vim data";
2000 container supplemental-boot-data {
2001 uses manotypes:config-file;
2002 leaf boot-data-drive {
2003 description "Some VIMs implement additional drives to host config-files or meta-data";
2010 grouping volume-info {
2011 description "Grouping for Volume-info";
2014 description "Description for Volume";
2019 description "Size of disk in GB";
2023 choice volume-source {
2025 "Defines the source of the volume. Possible options are
2026 1. Ephemeral -- Empty disk
2027 2. Image -- Refer to image to be used for volume
2028 3. Volume -- Reference of pre-existing volume to be used
2038 uses image-properties;
2044 description "Type of disk-bus on which this disk is exposed to guest";
2054 description "The type of device as exposed to guest";
2065 grouping rpc-project-name {
2069 "Project to which this belongs";
2071 path "/rw-project:project/rw-project:name";