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 parameter-data-type {
51 grouping primitive-parameter-value {
54 "List of parameters to the configuration primitive.";
58 "Name of the parameter.";
64 "Value associated with the name.";
70 grouping primitive-parameter {
73 "Name of the parameter.";
79 "Data type associated with the name.";
80 type manotypes:parameter-data-type;
84 description "Is this field mandatory";
90 description "The default value for this field";
95 description "NSD Parameter pool name to use for this paramter";
101 "The value should be greyed out by the UI.
102 Only applies to parameters with default values.";
108 "The value should be hidden by the UI.
109 Only applies to parameters with default values.";
115 grouping image-properties {
118 "Image name for the software image.
119 If the image name is found within the VNF packaage it will
120 be uploaded to all cloud accounts during onboarding process.
121 Otherwise, the image must be added to the cloud account with
122 the same name as entered here.
127 leaf image-checksum {
129 "Image md5sum for the software image.
130 The md5sum, if provided, along with the image name uniquely
131 identifies an image uploaded to the CAL.
137 grouping vnf-configuration {
138 container vnf-configuration {
139 rwpb:msg-new VnfConfiguration;
141 "Information regarding the VNF configuration
142 is captured here. Note that if the NS contains
143 multiple instances of the same VNF, each instance
144 of the VNF may have different configuration";
146 choice config-method {
148 "Defines the configuration method for the VNF.";
151 "Use NETCONF for configuring the VNF.";
155 "Netconf configuration target";
164 "Protocol to use for netconf (e.g. ssh)";
173 "Port for the netconf server.";
174 type inet:port-number;
181 "Use REST for configuring the VNF.";
185 "Port for the REST server.";
186 type inet:port-number;
193 "Use custom script for configuring the VNF.
194 This script is executed in the context of
199 "Script type - currently supported : bash, expect";
210 "Configure the VNF through Juju.";
213 description "Juju charm to use with the VNF.";
220 container config-access {
221 leaf mgmt-ip-address {
223 "IP address to be used to configure this VNF,
224 optional if it is possible to resolve dynamically.";
225 type inet:ip-address;
230 "username for configuration.";
236 "Password for configuration access authentication.";
241 container config-attributes {
243 "Miscelaneous input parameters to be considered
244 while processing the NSD to apply configuration";
246 leaf config-priority {
248 "Configuration priority - order of confgiration
249 to be applied to each VNF in this NS,
250 low number gets precedence over high number";
256 "Wait (seconds) before applying the configuration to VNF";
261 list service-primitive {
262 rwpb:msg-new ServicePrimitive;
264 "List of service primitives supported by the
265 configuration agent for this VNF.";
270 "Name of the service primitive.";
276 "List of parameters to the service primitive.";
278 uses primitive-parameter;
282 list initial-config-primitive {
283 rwpb:msg-new InitialConfigPrimitive;
285 "Initial set of configuration primitives.";
289 "Sequence number for the configuration primitive.";
295 "Name of the configuration primitive.";
311 leaf config-template {
313 "Configuration template for each VNF";
317 } // END - grouping vnf-configuration
319 typedef virtual-link-type {
321 "Type of virtual link
322 ELAN: A multipoint service connecting a set of VNFs
323 // ELINE: For a simple point to point connection
324 // between a VNF and the existing network.
325 // ETREE: A multipoint service connecting one or
326 // more roots and a set of leaves, but
327 // preventing inter-leaf communication.";
335 grouping named-value {
345 typedef http-method {
347 "Type of HTTP operation";
361 "Type of API to fetch monitoring params";
370 typedef json-query-method {
372 "The method to extract a value from a JSON response
374 NAMEKEY - Use the name as the key for a non-nested value.
375 JSONPATH - Use jsonpath-rw implemenation to extract a value.
376 OBJECTPATH - Use objectpath implemenation to extract a value.";
384 typedef param-value-type {
386 "The type of the parameter value";
394 typedef connection-point-type {
396 "Type of connection point
398 // VNIC_ADDR: Virtual NIC Address
399 // PNIC_ADDR: Physical NIC Address
400 // PPORT: Phsical Port.";
407 typedef widget-type {
409 "Type of the widget, typically used by the UI.";
420 typedef cpu-feature-type {
422 "Enumeration for CPU features.
424 AES: CPU supports advanced instruction set for
425 AES (Advanced Encryption Standard).
427 CAT: Cache Allocation Technology (CAT) allows
428 an Operating System, Hypervisor, or similar
429 system management agent to specify the amount
430 of L3 cache (currently the last-level cache
431 in most server and client platforms) space an
432 application can fill (as a hint to hardware
433 functionality, certain features such as power
434 management may override CAT settings).
436 CMT: Cache Monitoring Technology (CMT) allows
437 an Operating System, Hypervisor, or similar
438 system management agent to determine the
439 usage of cache based on applications running
440 on the platform. The implementation is
441 directed at L3 cache monitoring (currently
442 the last-level cache in most server and
445 DDIO: Intel Data Direct I/O (DDIO) enables
446 Ethernet server NICs and controllers talk
447 directly to the processor cache without a
448 detour via system memory. This enumeration
449 specifies if the VM requires a DDIO
493 enum REQUIRE_CLFLUSH;
521 enum REQUIRE_PCLMULQDQ;
522 enum PREFER_PCLMULQDQ;
525 enum REQUIRE_MONITOR;
563 enum REQUIRE_TSC_DEADLINE_TIMER;
564 enum PREFER_TSC_DEADLINE_TIMER;
573 enum REQUIRE_FSGSBASE;
574 enum PREFER_FSGSBASE;
587 enum REQUIRE_INVPCID;
603 container vm-flavor {
606 "Number of vcpus for the VM.";
612 "Amount of memory in MB.";
618 "Amount of disk space in GB.";
622 } //grouping vm-flavor
624 grouping vswitch-epa {
625 container vswitch-epa {
626 leaf ovs-acceleration {
628 "Specifies Open vSwitch acceleration mode.
629 MANDATORY: OVS acceleration is required
630 PREFERRED: OVS acceleration is preferred";
640 "Specifies Open vSwitch hardware offload mode.
641 MANDATORY: OVS offload is required
642 PREFERRED: OVS offload is preferred";
652 grouping hypervisor-epa {
653 container hypervisor-epa {
656 "Specifies the type of hypervisor.
672 description "Specifies the host level EPA attributes.";
675 "Host CPU model. Examples include: SandyBridge,
678 enum PREFER_WESTMERE;
679 enum REQUIRE_WESTMERE;
680 enum PREFER_SANDYBRIDGE;
681 enum REQUIRE_SANDYBRIDGE;
682 enum PREFER_IVYBRIDGE;
683 enum REQUIRE_IVYBRIDGE;
685 enum REQUIRE_HASWELL;
686 enum PREFER_BROADWELL;
687 enum REQUIRE_BROADWELL;
689 enum REQUIRE_NEHALEM;
694 enum PREFER_CORE2DUO;
695 enum REQUIRE_CORE2DUO;
700 description "Host CPU architecture.";
718 description "Host CPU Vendor.";
727 leaf cpu-socket-count {
728 description "Number of sockets on the host.";
732 leaf cpu-core-count {
733 description "Number of cores on the host.";
737 leaf cpu-core-thread-count {
738 description "Number of threads per cores on the host.";
744 description "List of CPU features.";
746 description "CPU feature.";
747 type cpu-feature-type;
752 leaf om-cpu-model-string {
753 description "Openmano CPU model string";
757 list om-cpu-feature {
759 description "List of openmano CPU features";
761 description "CPU feature";
769 description "EPA attributes for the guest";
770 container guest-epa {
771 leaf trusted-execution {
772 description "This VM should be allocated from trusted pool";
778 "Memory page allocation size. If a VM requires
779 hugepages, it should choose LARGE or SIZE_2MB
780 or SIZE_1GB. If the VM prefers hugepages it
781 should chose PREFER_LARGE.
782 LARGE : Require hugepages (either 2MB or 1GB)
783 SMALL : Doesn't require hugepages
784 SIZE_2MB : Requires 2MB hugepages
785 SIZE_1GB : Requires 1GB hugepages
786 PREFER_LARGE : Application perfers hugepages";
796 leaf cpu-pinning-policy {
798 "CPU pinning policy describes association
799 between virtual CPUs in guest and the
800 physical CPUs in the host.
801 DEDICATED : Virtual CPUs are pinned to
803 SHARED : Multiple VMs may share the
805 ANY : Any policy is acceptable for the VM";
814 leaf cpu-thread-pinning-policy {
816 "CPU thread pinning policy describes how to
817 place the guest CPUs when the host supports
819 AVOID : Avoids placing a guest on a host
821 SEPARATE: Places vCPUs on separate cores,
822 and avoids placing two vCPUs on
823 two threads of same core.
824 ISOLATE : Places each vCPU on a different core,
825 and places no vCPUs from a different
826 guest on the same core.
827 PREFER : Attempts to place vCPUs on threads
839 "List of pcie passthrough devices.";
843 "Device identifier.";
848 "Number of devices to attach to the VM.";
861 container numa-node-policy {
863 "This policy defines numa topology of the
864 guest. Specifically identifies if the guest
865 should be run on a host with one numa
866 node or multiple numa nodes. As an example
867 a guest may want 8 vcpus and 4 GB of
868 memory. But may want the vcpus and memory
869 distributed across multiple numa nodes.
870 The NUMA node 1 may run with 6 vcpus and
871 3GB, and NUMA node 2 may run with 2 vcpus
876 "The number of numa nodes to expose to the VM.";
882 "This policy specifies how the memory should
883 be allocated in a multi-node scenario.
884 STRICT : The memory must be allocated
885 strictly from the memory attached
887 PREFERRED : The memory should be allocated
888 perferentially from the memory
889 attached to the NUMA node";
900 "NUMA node identification. Typically
908 "List of vcpus to allocate on
912 description "List of vcpus ids to allocate on
919 "Memory size expressed in MB
920 for this NUMA node.";
924 choice om-numa-type {
926 "Openmano Numa type selection";
934 case paired-threads {
935 container paired-threads {
936 leaf num-paired-threads {
940 list paired-thread-ids {
942 "List of thread pairs to use in case of paired-thread numa";
970 grouping provider-network {
971 container provider-network {
972 description "Container for the provider network.";
973 leaf physical-network {
975 "Name of the phsyical network on which the provider
982 "Type of the overlay network.";
991 leaf segmentation_id {
999 grouping ns-service-primitive {
1000 list service-primitive {
1002 "Network service level service primitives.";
1008 "Name of the service primitive.";
1014 "List of parameters for the service primitive.";
1017 uses manotypes:primitive-parameter;
1020 list parameter-group {
1022 "Grouping of parameters which are logically grouped in UI";
1027 "Name of the parameter group";
1033 "List of parameters for the service primitive.";
1035 uses manotypes:primitive-parameter;
1039 description "Is this parameter group mandatory";
1045 list vnf-primitive-group {
1047 "List of service primitives grouped by VNF.";
1049 key "member-vnf-index-ref";
1050 leaf member-vnf-index-ref {
1052 "Reference to member-vnf within constituent-vnfds";
1058 "A reference to a vnfd. This is a
1060 ../../../../nsd:constituent-vnfd
1061 + [nsd:id = current()/../nsd:id-ref]
1063 NOTE: An issue with confd is preventing the
1064 use of xpath. Seems to be an issue with leafref
1065 to leafref, whose target is in a different module.
1066 Once that is resovled this will switched to use
1082 description "Index of this primitive";
1087 description "Name of the primitive in the VNF primitive ";
1093 leaf user-defined-script {
1095 "A user defined script.";
1101 grouping monitoring-param {
1102 list http-endpoint {
1104 "List of http endpoints to be used by monitoring params";
1108 description "The HTTP path on the management server";
1113 description "Pick HTTPS instead of HTTP , Default is false";
1119 description "The HTTP port to connect to";
1120 type inet:port-number;
1124 description "The HTTP basic auth username";
1129 description "The HTTP basic auth password";
1133 leaf polling_interval_secs {
1134 description "The HTTP polling interval in seconds";
1141 "This is the method to be performed at the uri.
1142 GET by default for action";
1144 type manotypes:http-method;
1149 description "Custom HTTP headers to put on HTTP request";
1152 description "HTTP header key";
1157 description "HTTP header value";
1163 list monitoring-param {
1165 "List of monitoring parameters at the NS level";
1175 leaf http-endpoint-ref {
1177 path "../../http-endpoint/path";
1181 leaf json-query-method {
1182 type json-query-method;
1186 container json-query-params {
1189 "The jsonpath to use to extract value from JSON structure";
1194 "The objectpath to use to extract value from JSON structure";
1199 uses monitoring-param-ui-data;
1200 uses monitoring-param-value;
1205 grouping monitoring-param-aggregation {
1206 typedef aggregation-type {
1207 description "aggregation-type";
1217 leaf aggregation-type {
1218 type aggregation-type;
1222 grouping monitoring-param-ui-data {
1228 description "A simple tag to group monitoring parameters";
1234 type manotypes:widget-type;
1242 grouping monitoring-param-value {
1244 type param-value-type;
1248 container numeric-constraints {
1251 "Minimum value for the parameter";
1256 "Maxium value for the parameter";
1261 container text-constraints {
1264 "Minimum string length for the parameter";
1269 "Maximum string length for the parameter";
1274 leaf value-integer {
1276 "Current value for an integer parameter";
1280 leaf value-decimal {
1282 "Current value for a decimal parameter";
1290 "Current value for a string parameter";
1295 grouping control-param {
1296 list control-param {
1298 "List of control parameters to manage and
1299 update the running configuration of the VNF";
1315 description "A simple tag to group control parameters";
1321 "Minimum value for the parameter";
1327 "Maxium value for the parameter";
1331 leaf current-value {
1333 "Current value for the parameter";
1339 "Step value for the parameter";
1348 type manotypes:widget-type;
1353 "This is the URL where to perform the operation";
1360 "This is the method to be performed at the uri.
1361 POST by default for action";
1363 type manotypes:http-method;
1369 "This is the operation payload or payload template as stringified
1370 JSON. This field provides the data to be sent for this operation
1378 grouping action-param {
1381 "List of action parameters to
1397 description "A simple tag to group monitoring parameter";
1403 "This is the URL where to perform the operation";
1409 "This is the method to be performed at the uri.
1410 POST by default for action";
1412 type manotypes:http-method;
1418 "This is the operation payload or payload template to be sent in
1419 the data for this operation call";
1426 grouping input-parameter {
1429 list input-parameter {
1431 "List of input parameters";
1438 "A an xpath that specfies which element in a descriptor is to be
1445 "The value that the element specified by the xpath should take when a
1446 record is created.";
1452 grouping input-parameter-xpath {
1453 list input-parameter-xpath {
1455 "List of xpaths to parameters inside the NSD
1456 the can be customized during the instantiation.";
1461 "An xpath that specifies the element in a descriptor.";
1466 description "A descriptive string";
1470 leaf default-value {
1471 description " A default value for this input parameter";
1477 grouping nfvi-metrics {
1481 "Label to show in UI";
1488 "The total number of VCPUs available.";
1494 "The VCPU utilization (percentage).";
1505 "Label to show in UI";
1512 "The amount of memory (bytes) currently in use.";
1518 "The amount of memory (bytes) available.";
1524 "The memory utilization (percentage).";
1535 "Label to show in UI";
1542 "The amount of storage (bytes) currently in use.";
1548 "The amount of storage (bytes) available.";
1554 "The storage utilization (percentage).";
1562 container external-ports {
1565 "Label to show in UI";
1567 default "EXTERNAL PORTS";
1572 "The total number of external ports.";
1577 container internal-ports {
1580 "Label to show in UI";
1582 default "INTERNAL PORTS";
1587 "The total number of internal ports.";
1595 "Label to show in UI";
1597 default "NETWORK TRAFFIC";
1600 container incoming {
1603 "Label to show in UI";
1605 default "INCOMING NETWORK TRAFFIC";
1610 "The cumulative number of incoming bytes.";
1616 "The cumulative number of incoming packets.";
1622 "The current incoming byte-rate (bytes per second).";
1630 "The current incoming packet (packets per second).";
1637 container outgoing {
1640 "Label to show in UI";
1642 default "OUTGOING NETWORK TRAFFIC";
1647 "The cumulative number of outgoing bytes.";
1653 "The cumulative number of outgoing packets.";
1659 "The current outgoing byte-rate (bytes per second).";
1667 "The current outgoing packet (packets per second).";
1676 typedef alarm-severity-type {
1677 description "An indication of the importance or ugency of the alarm";
1685 typedef alarm-metric-type {
1686 description "The type of metrics to register the alarm for";
1688 enum CPU_UTILIZATION;
1689 enum MEMORY_UTILIZATION;
1690 enum STORAGE_UTILIZATION;
1694 typedef alarm-statistic-type {
1696 "The type of statistic to used to measure a metric to determine
1697 threshold crossing for an alarm.";
1707 typedef alarm-operation-type {
1709 "The relational operator used to define whether an alarm should be
1710 triggered when, say, the metric statistic goes above or below a
1713 enum GE; // greater than or equal
1714 enum LE; // less than or equal
1715 enum GT; // greater than
1716 enum LT; // less than
1724 "This field is reserved for the identifier assigned by the cloud
1731 description "A human readable string to identify the alarm";
1736 description "A string containing a description of this alarm";
1742 "The identifier of the VDUR that the alarm is associated with";
1754 list insufficient-data {
1771 "This flag indicates whether the alarm should be repeatedly emitted
1772 while the associated threshold has been crossed.";
1780 "This flag indicates whether the alarm has been enabled or
1788 description "A measure of the important or urgency of the alarm";
1789 type alarm-severity-type;
1793 description "The metric to be tracked by this alarm.";
1794 type alarm-metric-type;
1798 description "The type of metric statistic that is tracked by this alarm";
1799 type alarm-statistic-type;
1804 "The relational operator that defines whether the alarm should be
1805 triggered when the metric statistic is, say, above or below the
1806 specified threshold value.";
1807 type alarm-operation-type;
1812 "This value defines the threshold that, if crossed, will trigger
1821 "The period defines the length of time (seconds) that the metric
1822 data are collected over in oreder to evaluate the chosen
1829 "This is the number of samples of the metric statistic used to
1830 evaluate threshold crossing. Each sample or evaluation is equal to
1831 the metric statistic obtained for a given period. This can be used
1832 to mitigate spikes in the metric that may skew the statistic of
1838 typedef cloud-account-type {
1839 description "cloud account type";
1843 enum cloudsim_proxy;
1852 grouping host-aggregate {
1853 list host-aggregate {
1854 description "Name of the Host Aggregate";
1860 leaf metadata-value {
1866 grouping placement-group-input {
1868 type manotypes:cloud-account-type;
1870 choice cloud-provider {
1872 container availability-zone {
1873 description "Name of the Availability Zone";
1878 container server-group {
1879 description "Name of the Affinity/Anti-Affinity Server Group";
1884 uses host-aggregate;
1887 leaf aws-construct {
1892 leaf openmano-construct {
1897 leaf vsphere-construct {
1902 leaf mock-construct {
1907 leaf cloudsim-construct {
1914 grouping placement-group-info {
1919 "Place group construct to define the compute resource placement strategy
1920 in cloud environment";
1925 description "This is free text space used to describe the intent/rationale
1926 behind this placement group. This is for human consumption only";
1932 "Strategy associated with this placement group
1933 Following values are possible
1934 - COLOCATION: Colocation strategy imply intent to share the physical
1935 infrastructure (hypervisor/network) among all members
1937 - ISOLATION: Isolation strategy imply intent to not share the physical
1938 infrastructure (hypervisor/network) among the members
1945 default "COLOCATION";
1949 grouping ip-profile-info {
1950 description "Grouping for IP-Profile";
1951 container ip-profile-params {
1954 type inet:ip-version;
1958 leaf subnet-address {
1959 description "Subnet IP prefix associated with IP Profile";
1960 type inet:ip-prefix;
1963 leaf gateway-address {
1964 description "IP Address of the default gateway associated with IP Profile";
1965 type inet:ip-address;
1968 leaf security-group {
1969 description "Name of the security group";
1976 description "List of DNS Servers associated with IP Profile";
1977 type inet:ip-address;
1981 container dhcp-params {
1983 description "This flag indicates if DHCP is enabled or not";
1988 leaf start-address {
1989 description "Start IP address of the IP-Address range associated with DHCP domain";
1990 type inet:ip-address;
1994 description "Size of the DHCP pool associated with DHCP domain";
1999 leaf subnet-prefix-pool {
2000 description "VIM Specific reference to pre-created subnet prefix";
2006 grouping ip-profile-list {
2009 "List of IP Profiles.
2010 IP Profile describes the IP characteristics for the Virtual-Link";
2015 description "Name of the IP-Profile";
2020 description "Description for IP profile";
2024 uses ip-profile-info;
2028 grouping volume-info {
2029 description "Grouping for Volume-info";
2032 description "Description for Volume";
2037 description "Size of disk in GB";
2041 choice volume-source {
2043 "Defines the source of the volume. Possible options are
2044 1. Ephemeral -- Empty disk
2045 2. Image -- Refer to image to be used for volume
2046 3. Volume -- Reference of pre-existing volume to be used
2056 uses image-properties;
2061 description "Reference for pre-existing volume in VIM";
2067 container boot-params {
2069 description "This flag indicates if this is boot volume or not";
2072 leaf boot-priority {
2073 description "Boot priority associated with volume";
2078 container guest-params {
2079 description "Guest virtualization parameter associated with volume";
2082 description "Type of disk-bus on which this disk is exposed to guest";
2092 description "The type of device as exposed to guest";