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 paramter";
109 "The value should be greyed out 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.";
123 grouping image-properties {
126 "Image name for the software image.
127 If the image name is found within the VNF packaage it will
128 be uploaded to all cloud accounts during onboarding process.
129 Otherwise, the image must be added to the cloud account with
130 the same name as entered here.
135 leaf image-checksum {
137 "Image md5sum for the software image.
138 The md5sum, if provided, along with the image name uniquely
139 identifies an image uploaded to the CAL.
144 grouping initial-config {
147 "Sequence number for the configuration primitive.";
153 "Name of the configuration primitive.";
158 leaf user-defined-script {
160 "A user defined script.";
176 grouping vnf-configuration {
177 container vnf-configuration {
178 rwpb:msg-new VnfConfiguration;
180 "Information regarding the VNF configuration
181 is captured here. Note that if the NS contains
182 multiple instances of the same VNF, each instance
183 of the VNF may have different configuration";
185 choice config-method {
187 "Defines the configuration method for the VNF.";
190 "Use NETCONF for configuring the VNF.";
194 "Netconf configuration target";
203 "Protocol to use for netconf (e.g. ssh)";
212 "Port for the netconf server.";
213 type inet:port-number;
220 "Use REST for configuring the VNF.";
224 "Port for the REST server.";
225 type inet:port-number;
232 "Use custom script for configuring the VNF.
233 This script is executed in the context of
238 "Script type - currently supported : bash, expect";
249 "Configure the VNF through Juju.";
252 description "Juju charm to use with the VNF.";
259 container config-access {
260 leaf mgmt-ip-address {
262 "IP address to be used to configure this VNF,
263 optional if it is possible to resolve dynamically.";
264 type inet:ip-address;
269 "username for configuration.";
275 "Password for configuration access authentication.";
280 container config-attributes {
282 "Miscelaneous input parameters to be considered
283 while processing the NSD to apply configuration";
285 leaf config-priority {
287 "Configuration priority - order of confgiration
288 to be applied to each VNF in this NS,
289 low number gets precedence over high number";
295 "Wait (seconds) before applying the configuration to VNF";
300 list service-primitive {
301 rwpb:msg-new ServicePrimitive;
303 "List of service primitives supported by the
304 configuration agent for this VNF.";
309 "Name of the service primitive.";
315 "List of parameters to the service primitive.";
317 uses primitive-parameter;
321 list initial-config-primitive {
322 rwpb:msg-new InitialConfigPrimitive;
324 "Initial set of configuration primitives.";
329 leaf config-template {
331 "Configuration template for each VNF";
335 } // END - grouping vnf-configuration
337 typedef virtual-link-type {
339 "Type of virtual link
340 ELAN: A multipoint service connecting a set of VNFs
341 // ELINE: For a simple point to point connection
342 // between a VNF and the existing network.
343 // ETREE: A multipoint service connecting one or
344 // more roots and a set of leaves, but
345 // preventing inter-leaf communication.";
353 grouping named-value {
363 typedef http-method {
365 "Type of HTTP operation";
379 "Type of API to fetch monitoring params";
388 typedef json-query-method {
390 "The method to extract a value from a JSON response
392 NAMEKEY - Use the name as the key for a non-nested value.
393 JSONPATH - Use jsonpath-rw implemenation to extract a value.
394 OBJECTPATH - Use objectpath implemenation to extract a value.";
402 typedef param-value-type {
404 "The type of the parameter value";
412 typedef connection-point-type {
414 "Type of connection point
416 // VNIC_ADDR: Virtual NIC Address
417 // PNIC_ADDR: Physical NIC Address
418 // PPORT: Phsical Port.";
425 typedef widget-type {
427 "Type of the widget, typically used by the UI.";
438 typedef cpu-feature-type {
440 "Enumeration for CPU features.
442 AES: CPU supports advanced instruction set for
443 AES (Advanced Encryption Standard).
445 CAT: Cache Allocation Technology (CAT) allows
446 an Operating System, Hypervisor, or similar
447 system management agent to specify the amount
448 of L3 cache (currently the last-level cache
449 in most server and client platforms) space an
450 application can fill (as a hint to hardware
451 functionality, certain features such as power
452 management may override CAT settings).
454 CMT: Cache Monitoring Technology (CMT) allows
455 an Operating System, Hypervisor, or similar
456 system management agent to determine the
457 usage of cache based on applications running
458 on the platform. The implementation is
459 directed at L3 cache monitoring (currently
460 the last-level cache in most server and
463 DDIO: Intel Data Direct I/O (DDIO) enables
464 Ethernet server NICs and controllers talk
465 directly to the processor cache without a
466 detour via system memory. This enumeration
467 specifies if the VM requires a DDIO
511 enum REQUIRE_CLFLUSH;
539 enum REQUIRE_PCLMULQDQ;
540 enum PREFER_PCLMULQDQ;
543 enum REQUIRE_MONITOR;
581 enum REQUIRE_TSC_DEADLINE_TIMER;
582 enum PREFER_TSC_DEADLINE_TIMER;
591 enum REQUIRE_FSGSBASE;
592 enum PREFER_FSGSBASE;
605 enum REQUIRE_INVPCID;
621 container vm-flavor {
624 "Number of vcpus for the VM.";
630 "Amount of memory in MB.";
636 "Amount of disk space in GB.";
640 } //grouping vm-flavor
642 grouping vswitch-epa {
643 container vswitch-epa {
644 leaf ovs-acceleration {
646 "Specifies Open vSwitch acceleration mode.
647 MANDATORY: OVS acceleration is required
648 PREFERRED: OVS acceleration is preferred";
658 "Specifies Open vSwitch hardware offload mode.
659 MANDATORY: OVS offload is required
660 PREFERRED: OVS offload is preferred";
670 grouping hypervisor-epa {
671 container hypervisor-epa {
674 "Specifies the type of hypervisor.
690 description "Specifies the host level EPA attributes.";
693 "Host CPU model. Examples include: SandyBridge,
696 enum PREFER_WESTMERE;
697 enum REQUIRE_WESTMERE;
698 enum PREFER_SANDYBRIDGE;
699 enum REQUIRE_SANDYBRIDGE;
700 enum PREFER_IVYBRIDGE;
701 enum REQUIRE_IVYBRIDGE;
703 enum REQUIRE_HASWELL;
704 enum PREFER_BROADWELL;
705 enum REQUIRE_BROADWELL;
707 enum REQUIRE_NEHALEM;
712 enum PREFER_CORE2DUO;
713 enum REQUIRE_CORE2DUO;
718 description "Host CPU architecture.";
736 description "Host CPU Vendor.";
745 leaf cpu-socket-count {
746 description "Number of sockets on the host.";
750 leaf cpu-core-count {
751 description "Number of cores on the host.";
755 leaf cpu-core-thread-count {
756 description "Number of threads per cores on the host.";
762 description "List of CPU features.";
764 description "CPU feature.";
765 type cpu-feature-type;
770 leaf om-cpu-model-string {
771 description "Openmano CPU model string";
775 list om-cpu-feature {
777 description "List of openmano CPU features";
779 description "CPU feature";
787 description "EPA attributes for the guest";
788 container guest-epa {
789 leaf trusted-execution {
790 description "This VM should be allocated from trusted pool";
796 "Memory page allocation size. If a VM requires
797 hugepages, it should choose LARGE or SIZE_2MB
798 or SIZE_1GB. If the VM prefers hugepages it
799 should chose PREFER_LARGE.
800 LARGE : Require hugepages (either 2MB or 1GB)
801 SMALL : Doesn't require hugepages
802 SIZE_2MB : Requires 2MB hugepages
803 SIZE_1GB : Requires 1GB hugepages
804 PREFER_LARGE : Application perfers hugepages";
814 leaf cpu-pinning-policy {
816 "CPU pinning policy describes association
817 between virtual CPUs in guest and the
818 physical CPUs in the host.
819 DEDICATED : Virtual CPUs are pinned to
821 SHARED : Multiple VMs may share the
823 ANY : Any policy is acceptable for the VM";
832 leaf cpu-thread-pinning-policy {
834 "CPU thread pinning policy describes how to
835 place the guest CPUs when the host supports
837 AVOID : Avoids placing a guest on a host
839 SEPARATE: Places vCPUs on separate cores,
840 and avoids placing two vCPUs on
841 two threads of same core.
842 ISOLATE : Places each vCPU on a different core,
843 and places no vCPUs from a different
844 guest on the same core.
845 PREFER : Attempts to place vCPUs on threads
857 "List of pcie passthrough devices.";
861 "Device identifier.";
866 "Number of devices to attach to the VM.";
879 container numa-node-policy {
881 "This policy defines numa topology of the
882 guest. Specifically identifies if the guest
883 should be run on a host with one numa
884 node or multiple numa nodes. As an example
885 a guest may want 8 vcpus and 4 GB of
886 memory. But may want the vcpus and memory
887 distributed across multiple numa nodes.
888 The NUMA node 1 may run with 6 vcpus and
889 3GB, and NUMA node 2 may run with 2 vcpus
894 "The number of numa nodes to expose to the VM.";
900 "This policy specifies how the memory should
901 be allocated in a multi-node scenario.
902 STRICT : The memory must be allocated
903 strictly from the memory attached
905 PREFERRED : The memory should be allocated
906 perferentially from the memory
907 attached to the NUMA node";
918 "NUMA node identification. Typically
926 "List of vcpus to allocate on
930 description "List of vcpus ids to allocate on
937 "Memory size expressed in MB
938 for this NUMA node.";
942 choice om-numa-type {
944 "Openmano Numa type selection";
952 case paired-threads {
953 container paired-threads {
954 leaf num-paired-threads {
958 list paired-thread-ids {
960 "List of thread pairs to use in case of paired-thread numa";
988 grouping provider-network {
989 container provider-network {
990 description "Container for the provider network.";
991 leaf physical-network {
993 "Name of the phsyical network on which the provider
1000 "Type of the overlay network.";
1009 leaf segmentation_id {
1017 grouping ns-service-primitive {
1018 list service-primitive {
1020 "Network service level service primitives.";
1026 "Name of the service primitive.";
1032 "List of parameters for the service primitive.";
1035 uses manotypes:primitive-parameter;
1038 list parameter-group {
1040 "Grouping of parameters which are logically grouped in UI";
1045 "Name of the parameter group";
1051 "List of parameters for the service primitive.";
1053 uses manotypes:primitive-parameter;
1057 description "Is this parameter group mandatory";
1063 list vnf-primitive-group {
1065 "List of service primitives grouped by VNF.";
1067 key "member-vnf-index-ref";
1068 leaf member-vnf-index-ref {
1070 "Reference to member-vnf within constituent-vnfds";
1076 "A reference to a vnfd. This is a
1078 ../../../../nsd:constituent-vnfd
1079 + [nsd:id = current()/../nsd:id-ref]
1081 NOTE: An issue with confd is preventing the
1082 use of xpath. Seems to be an issue with leafref
1083 to leafref, whose target is in a different module.
1084 Once that is resovled this will switched to use
1100 description "Index of this primitive";
1105 description "Name of the primitive in the VNF primitive ";
1111 leaf user-defined-script {
1113 "A user defined script.";
1119 grouping monitoring-param {
1120 list http-endpoint {
1122 "List of http endpoints to be used by monitoring params";
1126 description "The HTTP path on the management server";
1131 description "Pick HTTPS instead of HTTP , Default is false";
1137 description "The HTTP port to connect to";
1138 type inet:port-number;
1142 description "The HTTP basic auth username";
1147 description "The HTTP basic auth password";
1151 leaf polling_interval_secs {
1152 description "The HTTP polling interval in seconds";
1159 "This is the method to be performed at the uri.
1160 GET by default for action";
1162 type manotypes:http-method;
1167 description "Custom HTTP headers to put on HTTP request";
1170 description "HTTP header key";
1175 description "HTTP header value";
1181 list monitoring-param {
1183 "List of monitoring parameters at the NS level";
1193 leaf http-endpoint-ref {
1195 path "../../http-endpoint/path";
1199 leaf json-query-method {
1200 type json-query-method;
1204 container json-query-params {
1207 "The jsonpath to use to extract value from JSON structure";
1212 "The objectpath to use to extract value from JSON structure";
1217 uses monitoring-param-ui-data;
1218 uses monitoring-param-value;
1223 grouping monitoring-param-aggregation {
1224 typedef aggregation-type {
1225 description "aggregation-type";
1235 leaf aggregation-type {
1236 type aggregation-type;
1240 grouping monitoring-param-ui-data {
1246 description "A simple tag to group monitoring parameters";
1252 type manotypes:widget-type;
1260 grouping monitoring-param-value {
1262 type param-value-type;
1266 container numeric-constraints {
1269 "Minimum value for the parameter";
1274 "Maxium value for the parameter";
1279 container text-constraints {
1282 "Minimum string length for the parameter";
1287 "Maximum string length for the parameter";
1292 leaf value-integer {
1294 "Current value for an integer parameter";
1298 leaf value-decimal {
1300 "Current value for a decimal parameter";
1308 "Current value for a string parameter";
1313 grouping control-param {
1314 list control-param {
1316 "List of control parameters to manage and
1317 update the running configuration of the VNF";
1333 description "A simple tag to group control parameters";
1339 "Minimum value for the parameter";
1345 "Maxium value for the parameter";
1349 leaf current-value {
1351 "Current value for the parameter";
1357 "Step value for the parameter";
1366 type manotypes:widget-type;
1371 "This is the URL where to perform the operation";
1378 "This is the method to be performed at the uri.
1379 POST by default for action";
1381 type manotypes:http-method;
1387 "This is the operation payload or payload template as stringified
1388 JSON. This field provides the data to be sent for this operation
1396 grouping action-param {
1399 "List of action parameters to
1415 description "A simple tag to group monitoring parameter";
1421 "This is the URL where to perform the operation";
1427 "This is the method to be performed at the uri.
1428 POST by default for action";
1430 type manotypes:http-method;
1436 "This is the operation payload or payload template to be sent in
1437 the data for this operation call";
1444 grouping input-parameter {
1447 list input-parameter {
1449 "List of input parameters";
1456 "A an xpath that specfies which element in a descriptor is to be
1463 "The value that the element specified by the xpath should take when a
1464 record is created.";
1470 grouping input-parameter-xpath {
1471 list input-parameter-xpath {
1473 "List of xpaths to parameters inside the NSD
1474 the can be customized during the instantiation.";
1479 "An xpath that specifies the element in a descriptor.";
1484 description "A descriptive string";
1488 leaf default-value {
1489 description " A default value for this input parameter";
1495 grouping nfvi-metrics {
1499 "Label to show in UI";
1506 "The total number of VCPUs available.";
1512 "The VCPU utilization (percentage).";
1523 "Label to show in UI";
1530 "The amount of memory (bytes) currently in use.";
1536 "The amount of memory (bytes) available.";
1542 "The memory utilization (percentage).";
1553 "Label to show in UI";
1560 "The amount of storage (bytes) currently in use.";
1566 "The amount of storage (bytes) available.";
1572 "The storage utilization (percentage).";
1580 container external-ports {
1583 "Label to show in UI";
1585 default "EXTERNAL PORTS";
1590 "The total number of external ports.";
1595 container internal-ports {
1598 "Label to show in UI";
1600 default "INTERNAL PORTS";
1605 "The total number of internal ports.";
1613 "Label to show in UI";
1615 default "NETWORK TRAFFIC";
1618 container incoming {
1621 "Label to show in UI";
1623 default "INCOMING NETWORK TRAFFIC";
1628 "The cumulative number of incoming bytes.";
1634 "The cumulative number of incoming packets.";
1640 "The current incoming byte-rate (bytes per second).";
1648 "The current incoming packet (packets per second).";
1655 container outgoing {
1658 "Label to show in UI";
1660 default "OUTGOING NETWORK TRAFFIC";
1665 "The cumulative number of outgoing bytes.";
1671 "The cumulative number of outgoing packets.";
1677 "The current outgoing byte-rate (bytes per second).";
1685 "The current outgoing packet (packets per second).";
1694 typedef alarm-severity-type {
1695 description "An indication of the importance or ugency of the alarm";
1703 typedef alarm-metric-type {
1704 description "The type of metrics to register the alarm for";
1706 enum CPU_UTILIZATION;
1707 enum MEMORY_UTILIZATION;
1708 enum STORAGE_UTILIZATION;
1712 typedef alarm-statistic-type {
1714 "The type of statistic to used to measure a metric to determine
1715 threshold crossing for an alarm.";
1725 typedef alarm-operation-type {
1727 "The relational operator used to define whether an alarm should be
1728 triggered when, say, the metric statistic goes above or below a
1731 enum GE; // greater than or equal
1732 enum LE; // less than or equal
1733 enum GT; // greater than
1734 enum LT; // less than
1742 "This field is reserved for the identifier assigned by the cloud
1749 description "A human readable string to identify the alarm";
1754 description "A string containing a description of this alarm";
1760 "The identifier of the VDUR that the alarm is associated with";
1772 list insufficient-data {
1789 "This flag indicates whether the alarm should be repeatedly emitted
1790 while the associated threshold has been crossed.";
1798 "This flag indicates whether the alarm has been enabled or
1806 description "A measure of the important or urgency of the alarm";
1807 type alarm-severity-type;
1811 description "The metric to be tracked by this alarm.";
1812 type alarm-metric-type;
1816 description "The type of metric statistic that is tracked by this alarm";
1817 type alarm-statistic-type;
1822 "The relational operator that defines whether the alarm should be
1823 triggered when the metric statistic is, say, above or below the
1824 specified threshold value.";
1825 type alarm-operation-type;
1830 "This value defines the threshold that, if crossed, will trigger
1839 "The period defines the length of time (seconds) that the metric
1840 data are collected over in oreder to evaluate the chosen
1847 "This is the number of samples of the metric statistic used to
1848 evaluate threshold crossing. Each sample or evaluation is equal to
1849 the metric statistic obtained for a given period. This can be used
1850 to mitigate spikes in the metric that may skew the statistic of
1856 typedef cloud-account-type {
1857 description "cloud account type";
1861 enum cloudsim_proxy;
1870 grouping host-aggregate {
1871 list host-aggregate {
1872 description "Name of the Host Aggregate";
1878 leaf metadata-value {
1884 grouping placement-group-input {
1886 type manotypes:cloud-account-type;
1888 choice cloud-provider {
1890 container availability-zone {
1891 description "Name of the Availability Zone";
1896 container server-group {
1897 description "Name of the Affinity/Anti-Affinity Server Group";
1902 uses host-aggregate;
1905 leaf aws-construct {
1910 leaf openmano-construct {
1915 leaf vsphere-construct {
1920 leaf mock-construct {
1925 leaf cloudsim-construct {
1932 grouping placement-group-info {
1937 "Place group construct to define the compute resource placement strategy
1938 in cloud environment";
1943 description "This is free text space used to describe the intent/rationale
1944 behind this placement group. This is for human consumption only";
1950 "Strategy associated with this placement group
1951 Following values are possible
1952 - COLOCATION: Colocation strategy imply intent to share the physical
1953 infrastructure (hypervisor/network) among all members
1955 - ISOLATION: Isolation strategy imply intent to not share the physical
1956 infrastructure (hypervisor/network) among the members
1963 default "COLOCATION";
1967 grouping ip-profile-info {
1968 description "Grouping for IP-Profile";
1969 container ip-profile-params {
1972 type inet:ip-version;
1976 leaf subnet-address {
1977 description "Subnet IP prefix associated with IP Profile";
1978 type inet:ip-prefix;
1981 leaf gateway-address {
1982 description "IP Address of the default gateway associated with IP Profile";
1983 type inet:ip-address;
1986 leaf security-group {
1987 description "Name of the security group";
1994 description "List of DNS Servers associated with IP Profile";
1995 type inet:ip-address;
1999 container dhcp-params {
2001 description "This flag indicates if DHCP is enabled or not";
2006 leaf start-address {
2007 description "Start IP address of the IP-Address range associated with DHCP domain";
2008 type inet:ip-address;
2012 description "Size of the DHCP pool associated with DHCP domain";
2017 leaf subnet-prefix-pool {
2018 description "VIM Specific reference to pre-created subnet prefix";
2024 grouping ip-profile-list {
2027 "List of IP Profiles.
2028 IP Profile describes the IP characteristics for the Virtual-Link";
2033 description "Name of the IP-Profile";
2038 description "Description for IP profile";
2042 uses ip-profile-info;
2046 grouping config-file {
2047 description "Grouping for files needed to be mounted into an additional drive";
2050 "List of configuration files to be written on an additional drive";
2053 description "Name of the configuration file";
2057 description "Full path of the destination in the guest";
2063 grouping supplemental-boot-data {
2064 description "Grouping for custom vim data";
2065 container supplemental-boot-data {
2066 uses manotypes:config-file;
2067 leaf boot-data-drive {
2068 description "Some VIMs implement additional drives to host config-files or meta-data";
2075 grouping volume-info {
2076 description "Grouping for Volume-info";
2079 description "Description for Volume";
2084 description "Size of disk in GB";
2088 choice volume-source {
2090 "Defines the source of the volume. Possible options are
2091 1. Ephemeral -- Empty disk
2092 2. Image -- Refer to image to be used for volume
2093 3. Volume -- Reference of pre-existing volume to be used
2103 uses image-properties;
2109 description "Type of disk-bus on which this disk is exposed to guest";
2119 description "The type of device as exposed to guest";