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.";
132 grouping image-properties {
135 "Image name for the software image.
136 If the image name is found within the VNF packaage it will
137 be uploaded to all cloud accounts during onboarding process.
138 Otherwise, the image must be added to the cloud account with
139 the same name as entered here.
144 leaf image-checksum {
146 "Image md5sum for the software image.
147 The md5sum, if provided, along with the image name uniquely
148 identifies an image uploaded to the CAL.
153 grouping initial-config {
156 "Sequence number for the configuration primitive.";
162 "Name of the configuration primitive.";
167 leaf user-defined-script {
169 "A user defined script.";
185 grouping vnf-configuration {
186 container vnf-configuration {
187 rwpb:msg-new VnfConfiguration;
189 "Information regarding the VNF configuration
190 is captured here. Note that if the NS contains
191 multiple instances of the same VNF, each instance
192 of the VNF may have different configuration";
194 choice config-method {
196 "Defines the configuration method for the VNF.";
199 "Use NETCONF for configuring the VNF.";
203 "Netconf configuration target";
212 "Protocol to use for netconf (e.g. ssh)";
221 "Port for the netconf server.";
222 type inet:port-number;
229 "Use REST for configuring the VNF.";
233 "Port for the REST server.";
234 type inet:port-number;
241 "Use custom script for configuring the VNF.
242 This script is executed in the context of
247 "Script type - currently supported : bash, expect";
258 "Configure the VNF through Juju.";
261 description "Juju charm to use with the VNF.";
268 container config-access {
269 leaf mgmt-ip-address {
271 "IP address to be used to configure this VNF,
272 optional if it is possible to resolve dynamically.";
273 type inet:ip-address;
278 "username for configuration.";
284 "Password for configuration access authentication.";
289 container config-attributes {
291 "Miscelaneous input parameters to be considered
292 while processing the NSD to apply configuration";
294 leaf config-priority {
296 "Configuration priority - order of confgiration
297 to be applied to each VNF in this NS,
298 low number gets precedence over high number";
304 "Wait (seconds) before applying the configuration to VNF";
309 list service-primitive {
310 rwpb:msg-new ServicePrimitive;
312 "List of service primitives supported by the
313 configuration agent for this VNF.";
318 "Name of the service primitive.";
324 "List of parameters to the service primitive.";
326 uses primitive-parameter;
330 list initial-config-primitive {
331 rwpb:msg-new InitialConfigPrimitive;
333 "Initial set of configuration primitives.";
338 leaf config-template {
340 "Configuration template for each VNF";
344 } // END - grouping vnf-configuration
346 typedef virtual-link-type {
348 "Type of virtual link
349 ELAN: A multipoint service connecting a set of VNFs
350 // ELINE: For a simple point to point connection
351 // between a VNF and the existing network.
352 // ETREE: A multipoint service connecting one or
353 // more roots and a set of leaves, but
354 // preventing inter-leaf communication.";
362 grouping named-value {
372 typedef http-method {
374 "Type of HTTP operation";
388 "Type of API to fetch monitoring params";
397 typedef json-query-method {
399 "The method to extract a value from a JSON response
401 NAMEKEY - Use the name as the key for a non-nested value.
402 JSONPATH - Use jsonpath-rw implemenation to extract a value.
403 OBJECTPATH - Use objectpath implemenation to extract a value.";
411 typedef param-value-type {
413 "The type of the parameter value";
421 typedef connection-point-type {
423 "Type of connection point
425 // VNIC_ADDR: Virtual NIC Address
426 // PNIC_ADDR: Physical NIC Address
427 // PPORT: Phsical Port.";
434 typedef widget-type {
436 "Type of the widget, typically used by the UI.";
447 typedef cpu-feature-type {
449 "Enumeration for CPU features.
451 AES: CPU supports advanced instruction set for
452 AES (Advanced Encryption Standard).
454 CAT: Cache Allocation Technology (CAT) allows
455 an Operating System, Hypervisor, or similar
456 system management agent to specify the amount
457 of L3 cache (currently the last-level cache
458 in most server and client platforms) space an
459 application can fill (as a hint to hardware
460 functionality, certain features such as power
461 management may override CAT settings).
463 CMT: Cache Monitoring Technology (CMT) allows
464 an Operating System, Hypervisor, or similar
465 system management agent to determine the
466 usage of cache based on applications running
467 on the platform. The implementation is
468 directed at L3 cache monitoring (currently
469 the last-level cache in most server and
472 DDIO: Intel Data Direct I/O (DDIO) enables
473 Ethernet server NICs and controllers talk
474 directly to the processor cache without a
475 detour via system memory. This enumeration
476 specifies if the VM requires a DDIO
520 enum REQUIRE_CLFLUSH;
548 enum REQUIRE_PCLMULQDQ;
549 enum PREFER_PCLMULQDQ;
552 enum REQUIRE_MONITOR;
590 enum REQUIRE_TSC_DEADLINE_TIMER;
591 enum PREFER_TSC_DEADLINE_TIMER;
600 enum REQUIRE_FSGSBASE;
601 enum PREFER_FSGSBASE;
614 enum REQUIRE_INVPCID;
630 container vm-flavor {
633 "Number of vcpus for the VM.";
639 "Amount of memory in MB.";
645 "Amount of disk space in GB.";
649 } //grouping vm-flavor
651 grouping vswitch-epa {
652 container vswitch-epa {
653 leaf ovs-acceleration {
655 "Specifies Open vSwitch acceleration mode.
656 MANDATORY: OVS acceleration is required
657 PREFERRED: OVS acceleration is preferred";
667 "Specifies Open vSwitch hardware offload mode.
668 MANDATORY: OVS offload is required
669 PREFERRED: OVS offload is preferred";
679 grouping hypervisor-epa {
680 container hypervisor-epa {
683 "Specifies the type of hypervisor.
699 description "Specifies the host level EPA attributes.";
702 "Host CPU model. Examples include: SandyBridge,
705 enum PREFER_WESTMERE;
706 enum REQUIRE_WESTMERE;
707 enum PREFER_SANDYBRIDGE;
708 enum REQUIRE_SANDYBRIDGE;
709 enum PREFER_IVYBRIDGE;
710 enum REQUIRE_IVYBRIDGE;
712 enum REQUIRE_HASWELL;
713 enum PREFER_BROADWELL;
714 enum REQUIRE_BROADWELL;
716 enum REQUIRE_NEHALEM;
721 enum PREFER_CORE2DUO;
722 enum REQUIRE_CORE2DUO;
727 description "Host CPU architecture.";
745 description "Host CPU Vendor.";
754 leaf cpu-socket-count {
755 description "Number of sockets on the host.";
759 leaf cpu-core-count {
760 description "Number of cores on the host.";
764 leaf cpu-core-thread-count {
765 description "Number of threads per cores on the host.";
771 description "List of CPU features.";
773 description "CPU feature.";
774 type cpu-feature-type;
779 leaf om-cpu-model-string {
780 description "Openmano CPU model string";
784 list om-cpu-feature {
786 description "List of openmano CPU features";
788 description "CPU feature";
796 description "EPA attributes for the guest";
797 container guest-epa {
798 leaf trusted-execution {
799 description "This VM should be allocated from trusted pool";
805 "Memory page allocation size. If a VM requires
806 hugepages, it should choose LARGE or SIZE_2MB
807 or SIZE_1GB. If the VM prefers hugepages it
808 should chose PREFER_LARGE.
809 LARGE : Require hugepages (either 2MB or 1GB)
810 SMALL : Doesn't require hugepages
811 SIZE_2MB : Requires 2MB hugepages
812 SIZE_1GB : Requires 1GB hugepages
813 PREFER_LARGE : Application perfers hugepages";
823 leaf cpu-pinning-policy {
825 "CPU pinning policy describes association
826 between virtual CPUs in guest and the
827 physical CPUs in the host.
828 DEDICATED : Virtual CPUs are pinned to
830 SHARED : Multiple VMs may share the
832 ANY : Any policy is acceptable for the VM";
841 leaf cpu-thread-pinning-policy {
843 "CPU thread pinning policy describes how to
844 place the guest CPUs when the host supports
846 AVOID : Avoids placing a guest on a host
848 SEPARATE: Places vCPUs on separate cores,
849 and avoids placing two vCPUs on
850 two threads of same core.
851 ISOLATE : Places each vCPU on a different core,
852 and places no vCPUs from a different
853 guest on the same core.
854 PREFER : Attempts to place vCPUs on threads
866 "List of pcie passthrough devices.";
870 "Device identifier.";
875 "Number of devices to attach to the VM.";
888 container numa-node-policy {
890 "This policy defines numa topology of the
891 guest. Specifically identifies if the guest
892 should be run on a host with one numa
893 node or multiple numa nodes. As an example
894 a guest may want 8 vcpus and 4 GB of
895 memory. But may want the vcpus and memory
896 distributed across multiple numa nodes.
897 The NUMA node 1 may run with 6 vcpus and
898 3GB, and NUMA node 2 may run with 2 vcpus
903 "The number of numa nodes to expose to the VM.";
909 "This policy specifies how the memory should
910 be allocated in a multi-node scenario.
911 STRICT : The memory must be allocated
912 strictly from the memory attached
914 PREFERRED : The memory should be allocated
915 perferentially from the memory
916 attached to the NUMA node";
927 "NUMA node identification. Typically
935 "List of vcpus to allocate on
939 description "List of vcpus ids to allocate on
946 "Memory size expressed in MB
947 for this NUMA node.";
951 choice om-numa-type {
953 "Openmano Numa type selection";
961 case paired-threads {
962 container paired-threads {
963 leaf num-paired-threads {
967 list paired-thread-ids {
969 "List of thread pairs to use in case of paired-thread numa";
997 grouping provider-network {
998 container provider-network {
999 description "Container for the provider network.";
1000 leaf physical-network {
1002 "Name of the phsyical network on which the provider
1009 "Type of the overlay network.";
1018 leaf segmentation_id {
1026 grouping ns-service-primitive {
1027 list service-primitive {
1029 "Network service level service primitives.";
1035 "Name of the service primitive.";
1041 "List of parameters for the service primitive.";
1044 uses manotypes:primitive-parameter;
1047 list parameter-group {
1049 "Grouping of parameters which are logically grouped in UI";
1054 "Name of the parameter group";
1060 "List of parameters for the service primitive.";
1062 uses manotypes:primitive-parameter;
1066 description "Is this parameter group mandatory";
1072 list vnf-primitive-group {
1074 "List of service primitives grouped by VNF.";
1076 key "member-vnf-index-ref";
1077 leaf member-vnf-index-ref {
1079 "Reference to member-vnf within constituent-vnfds";
1085 "A reference to a vnfd. This is a
1087 ../../../../nsd:constituent-vnfd
1088 + [nsd:id = current()/../nsd:id-ref]
1090 NOTE: An issue with confd is preventing the
1091 use of xpath. Seems to be an issue with leafref
1092 to leafref, whose target is in a different module.
1093 Once that is resovled this will switched to use
1109 description "Index of this primitive";
1114 description "Name of the primitive in the VNF primitive ";
1120 leaf user-defined-script {
1122 "A user defined script.";
1128 grouping monitoring-param {
1129 list http-endpoint {
1131 "List of http endpoints to be used by monitoring params";
1135 description "The HTTP path on the management server";
1140 description "Pick HTTPS instead of HTTP , Default is false";
1146 description "The HTTP port to connect to";
1147 type inet:port-number;
1151 description "The HTTP basic auth username";
1156 description "The HTTP basic auth password";
1160 leaf polling_interval_secs {
1161 description "The HTTP polling interval in seconds";
1168 "This is the method to be performed at the uri.
1169 GET by default for action";
1171 type manotypes:http-method;
1176 description "Custom HTTP headers to put on HTTP request";
1179 description "HTTP header key";
1184 description "HTTP header value";
1190 list monitoring-param {
1192 "List of monitoring parameters at the NS level";
1202 leaf http-endpoint-ref {
1204 path "../../http-endpoint/path";
1208 leaf json-query-method {
1209 type json-query-method;
1213 container json-query-params {
1216 "The jsonpath to use to extract value from JSON structure";
1221 "The objectpath to use to extract value from JSON structure";
1226 uses monitoring-param-ui-data;
1227 uses monitoring-param-value;
1232 grouping monitoring-param-aggregation {
1233 typedef aggregation-type {
1234 description "aggregation-type";
1244 leaf aggregation-type {
1245 type aggregation-type;
1249 grouping monitoring-param-ui-data {
1255 description "A simple tag to group monitoring parameters";
1261 type manotypes:widget-type;
1269 grouping monitoring-param-value {
1271 type param-value-type;
1275 container numeric-constraints {
1278 "Minimum value for the parameter";
1283 "Maxium value for the parameter";
1288 container text-constraints {
1291 "Minimum string length for the parameter";
1296 "Maximum string length for the parameter";
1301 leaf value-integer {
1303 "Current value for an integer parameter";
1307 leaf value-decimal {
1309 "Current value for a decimal parameter";
1317 "Current value for a string parameter";
1322 grouping control-param {
1323 list control-param {
1325 "List of control parameters to manage and
1326 update the running configuration of the VNF";
1342 description "A simple tag to group control parameters";
1348 "Minimum value for the parameter";
1354 "Maxium value for the parameter";
1358 leaf current-value {
1360 "Current value for the parameter";
1366 "Step value for the parameter";
1375 type manotypes:widget-type;
1380 "This is the URL where to perform the operation";
1387 "This is the method to be performed at the uri.
1388 POST by default for action";
1390 type manotypes:http-method;
1396 "This is the operation payload or payload template as stringified
1397 JSON. This field provides the data to be sent for this operation
1405 grouping action-param {
1408 "List of action parameters to
1424 description "A simple tag to group monitoring parameter";
1430 "This is the URL where to perform the operation";
1436 "This is the method to be performed at the uri.
1437 POST by default for action";
1439 type manotypes:http-method;
1445 "This is the operation payload or payload template to be sent in
1446 the data for this operation call";
1453 grouping input-parameter {
1456 list input-parameter {
1458 "List of input parameters";
1465 "A an xpath that specfies which element in a descriptor is to be
1472 "The value that the element specified by the xpath should take when a
1473 record is created.";
1479 grouping input-parameter-xpath {
1480 list input-parameter-xpath {
1482 "List of xpaths to parameters inside the NSD
1483 the can be customized during the instantiation.";
1488 "An xpath that specifies the element in a descriptor.";
1493 description "A descriptive string";
1497 leaf default-value {
1498 description " A default value for this input parameter";
1504 grouping nfvi-metrics {
1508 "Label to show in UI";
1515 "The total number of VCPUs available.";
1521 "The VCPU utilization (percentage).";
1532 "Label to show in UI";
1539 "The amount of memory (bytes) currently in use.";
1545 "The amount of memory (bytes) available.";
1551 "The memory utilization (percentage).";
1562 "Label to show in UI";
1569 "The amount of storage (bytes) currently in use.";
1575 "The amount of storage (bytes) available.";
1581 "The storage utilization (percentage).";
1589 container external-ports {
1592 "Label to show in UI";
1594 default "EXTERNAL PORTS";
1599 "The total number of external ports.";
1604 container internal-ports {
1607 "Label to show in UI";
1609 default "INTERNAL PORTS";
1614 "The total number of internal ports.";
1622 "Label to show in UI";
1624 default "NETWORK TRAFFIC";
1627 container incoming {
1630 "Label to show in UI";
1632 default "INCOMING NETWORK TRAFFIC";
1637 "The cumulative number of incoming bytes.";
1643 "The cumulative number of incoming packets.";
1649 "The current incoming byte-rate (bytes per second).";
1657 "The current incoming packet (packets per second).";
1664 container outgoing {
1667 "Label to show in UI";
1669 default "OUTGOING NETWORK TRAFFIC";
1674 "The cumulative number of outgoing bytes.";
1680 "The cumulative number of outgoing packets.";
1686 "The current outgoing byte-rate (bytes per second).";
1694 "The current outgoing packet (packets per second).";
1703 typedef alarm-severity-type {
1704 description "An indication of the importance or ugency of the alarm";
1712 typedef alarm-metric-type {
1713 description "The type of metrics to register the alarm for";
1715 enum CPU_UTILIZATION;
1716 enum MEMORY_UTILIZATION;
1717 enum STORAGE_UTILIZATION;
1721 typedef alarm-statistic-type {
1723 "The type of statistic to used to measure a metric to determine
1724 threshold crossing for an alarm.";
1734 typedef alarm-operation-type {
1736 "The relational operator used to define whether an alarm should be
1737 triggered when, say, the metric statistic goes above or below a
1740 enum GE; // greater than or equal
1741 enum LE; // less than or equal
1742 enum GT; // greater than
1743 enum LT; // less than
1751 "This field is reserved for the identifier assigned by the cloud
1758 description "A human readable string to identify the alarm";
1763 description "A string containing a description of this alarm";
1769 "The identifier of the VDUR that the alarm is associated with";
1781 list insufficient-data {
1798 "This flag indicates whether the alarm should be repeatedly emitted
1799 while the associated threshold has been crossed.";
1807 "This flag indicates whether the alarm has been enabled or
1815 description "A measure of the important or urgency of the alarm";
1816 type alarm-severity-type;
1820 description "The metric to be tracked by this alarm.";
1821 type alarm-metric-type;
1825 description "The type of metric statistic that is tracked by this alarm";
1826 type alarm-statistic-type;
1831 "The relational operator that defines whether the alarm should be
1832 triggered when the metric statistic is, say, above or below the
1833 specified threshold value.";
1834 type alarm-operation-type;
1839 "This value defines the threshold that, if crossed, will trigger
1848 "The period defines the length of time (seconds) that the metric
1849 data are collected over in oreder to evaluate the chosen
1856 "This is the number of samples of the metric statistic used to
1857 evaluate threshold crossing. Each sample or evaluation is equal to
1858 the metric statistic obtained for a given period. This can be used
1859 to mitigate spikes in the metric that may skew the statistic of
1865 typedef cloud-account-type {
1866 description "cloud account type";
1870 enum cloudsim_proxy;
1879 grouping host-aggregate {
1880 list host-aggregate {
1881 description "Name of the Host Aggregate";
1887 leaf metadata-value {
1893 grouping placement-group-input {
1895 type manotypes:cloud-account-type;
1897 choice cloud-provider {
1899 container availability-zone {
1900 description "Name of the Availability Zone";
1905 container server-group {
1906 description "Name of the Affinity/Anti-Affinity Server Group";
1911 uses host-aggregate;
1914 leaf aws-construct {
1919 leaf openmano-construct {
1924 leaf vsphere-construct {
1929 leaf mock-construct {
1934 leaf cloudsim-construct {
1941 grouping placement-group-info {
1946 "Place group construct to define the compute resource placement strategy
1947 in cloud environment";
1952 description "This is free text space used to describe the intent/rationale
1953 behind this placement group. This is for human consumption only";
1959 "Strategy associated with this placement group
1960 Following values are possible
1961 - COLOCATION: Colocation strategy imply intent to share the physical
1962 infrastructure (hypervisor/network) among all members
1964 - ISOLATION: Isolation strategy imply intent to not share the physical
1965 infrastructure (hypervisor/network) among the members
1972 default "COLOCATION";
1976 grouping ip-profile-info {
1977 description "Grouping for IP-Profile";
1978 container ip-profile-params {
1981 type inet:ip-version;
1985 leaf subnet-address {
1986 description "Subnet IP prefix associated with IP Profile";
1987 type inet:ip-prefix;
1990 leaf gateway-address {
1991 description "IP Address of the default gateway associated with IP Profile";
1992 type inet:ip-address;
1995 leaf security-group {
1996 description "Name of the security group";
2003 description "List of DNS Servers associated with IP Profile";
2004 type inet:ip-address;
2008 container dhcp-params {
2010 description "This flag indicates if DHCP is enabled or not";
2015 leaf start-address {
2016 description "Start IP address of the IP-Address range associated with DHCP domain";
2017 type inet:ip-address;
2021 description "Size of the DHCP pool associated with DHCP domain";
2026 leaf subnet-prefix-pool {
2027 description "VIM Specific reference to pre-created subnet prefix";
2033 grouping ip-profile-list {
2036 "List of IP Profiles.
2037 IP Profile describes the IP characteristics for the Virtual-Link";
2042 description "Name of the IP-Profile";
2047 description "Description for IP profile";
2051 uses ip-profile-info;
2055 grouping config-file {
2056 description "Grouping for files needed to be mounted into an additional drive";
2059 "List of configuration files to be written on an additional drive";
2062 description "Name of the configuration file";
2066 description "Full path of the destination in the guest";
2072 grouping supplemental-boot-data {
2073 description "Grouping for custom vim data";
2074 container supplemental-boot-data {
2075 uses manotypes:config-file;
2076 leaf boot-data-drive {
2077 description "Some VIMs implement additional drives to host config-files or meta-data";
2084 grouping volume-info {
2085 description "Grouping for Volume-info";
2088 description "Description for Volume";
2093 description "Size of disk in GB";
2097 choice volume-source {
2099 "Defines the source of the volume. Possible options are
2100 1. Ephemeral -- Empty disk
2101 2. Image -- Refer to image to be used for volume
2102 3. Volume -- Reference of pre-existing volume to be used
2112 uses image-properties;
2118 description "Type of disk-bus on which this disk is exposed to guest";
2128 description "The type of device as exposed to guest";
2139 grouping rpc-project-name {
2143 "Project to which this belongs";
2145 path "/rw-project:project/rw-project:name";