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 {
1203 // TODO (Philip): Fix this
1205 // path "../../http-endpoint/path";
1210 leaf json-query-method {
1211 type json-query-method;
1215 container json-query-params {
1218 "The jsonpath to use to extract value from JSON structure";
1223 "The objectpath to use to extract value from JSON structure";
1228 uses monitoring-param-ui-data;
1229 uses monitoring-param-value;
1234 grouping monitoring-param-aggregation {
1235 typedef aggregation-type {
1236 description "aggregation-type";
1246 leaf aggregation-type {
1247 type aggregation-type;
1251 grouping monitoring-param-ui-data {
1257 description "A simple tag to group monitoring parameters";
1263 type manotypes:widget-type;
1271 grouping monitoring-param-value {
1273 type param-value-type;
1277 container numeric-constraints {
1280 "Minimum value for the parameter";
1285 "Maxium value for the parameter";
1290 container text-constraints {
1293 "Minimum string length for the parameter";
1298 "Maximum string length for the parameter";
1303 leaf value-integer {
1305 "Current value for an integer parameter";
1309 leaf value-decimal {
1311 "Current value for a decimal parameter";
1319 "Current value for a string parameter";
1324 grouping control-param {
1325 list control-param {
1327 "List of control parameters to manage and
1328 update the running configuration of the VNF";
1344 description "A simple tag to group control parameters";
1350 "Minimum value for the parameter";
1356 "Maxium value for the parameter";
1360 leaf current-value {
1362 "Current value for the parameter";
1368 "Step value for the parameter";
1377 type manotypes:widget-type;
1382 "This is the URL where to perform the operation";
1389 "This is the method to be performed at the uri.
1390 POST by default for action";
1392 type manotypes:http-method;
1398 "This is the operation payload or payload template as stringified
1399 JSON. This field provides the data to be sent for this operation
1407 grouping action-param {
1410 "List of action parameters to
1426 description "A simple tag to group monitoring parameter";
1432 "This is the URL where to perform the operation";
1438 "This is the method to be performed at the uri.
1439 POST by default for action";
1441 type manotypes:http-method;
1447 "This is the operation payload or payload template to be sent in
1448 the data for this operation call";
1455 grouping input-parameter {
1458 list input-parameter {
1460 "List of input parameters";
1467 "A an xpath that specfies which element in a descriptor is to be
1474 "The value that the element specified by the xpath should take when a
1475 record is created.";
1481 grouping input-parameter-xpath {
1482 list input-parameter-xpath {
1484 "List of xpaths to parameters inside the NSD
1485 the can be customized during the instantiation.";
1490 "An xpath that specifies the element in a descriptor.";
1495 description "A descriptive string";
1499 leaf default-value {
1500 description " A default value for this input parameter";
1506 grouping nfvi-metrics {
1510 "Label to show in UI";
1517 "The total number of VCPUs available.";
1523 "The VCPU utilization (percentage).";
1534 "Label to show in UI";
1541 "The amount of memory (bytes) currently in use.";
1547 "The amount of memory (bytes) available.";
1553 "The memory utilization (percentage).";
1564 "Label to show in UI";
1571 "The amount of storage (bytes) currently in use.";
1577 "The amount of storage (bytes) available.";
1583 "The storage utilization (percentage).";
1591 container external-ports {
1594 "Label to show in UI";
1596 default "EXTERNAL PORTS";
1601 "The total number of external ports.";
1606 container internal-ports {
1609 "Label to show in UI";
1611 default "INTERNAL PORTS";
1616 "The total number of internal ports.";
1624 "Label to show in UI";
1626 default "NETWORK TRAFFIC";
1629 container incoming {
1632 "Label to show in UI";
1634 default "INCOMING NETWORK TRAFFIC";
1639 "The cumulative number of incoming bytes.";
1645 "The cumulative number of incoming packets.";
1651 "The current incoming byte-rate (bytes per second).";
1659 "The current incoming packet (packets per second).";
1666 container outgoing {
1669 "Label to show in UI";
1671 default "OUTGOING NETWORK TRAFFIC";
1676 "The cumulative number of outgoing bytes.";
1682 "The cumulative number of outgoing packets.";
1688 "The current outgoing byte-rate (bytes per second).";
1696 "The current outgoing packet (packets per second).";
1705 typedef alarm-severity-type {
1706 description "An indication of the importance or ugency of the alarm";
1714 typedef alarm-metric-type {
1715 description "The type of metrics to register the alarm for";
1717 enum CPU_UTILIZATION;
1718 enum MEMORY_UTILIZATION;
1719 enum STORAGE_UTILIZATION;
1723 typedef alarm-statistic-type {
1725 "The type of statistic to used to measure a metric to determine
1726 threshold crossing for an alarm.";
1736 typedef alarm-operation-type {
1738 "The relational operator used to define whether an alarm should be
1739 triggered when, say, the metric statistic goes above or below a
1742 enum GE; // greater than or equal
1743 enum LE; // less than or equal
1744 enum GT; // greater than
1745 enum LT; // less than
1753 "This field is reserved for the identifier assigned by the cloud
1760 description "A human readable string to identify the alarm";
1765 description "A string containing a description of this alarm";
1771 "The identifier of the VDUR that the alarm is associated with";
1783 list insufficient-data {
1800 "This flag indicates whether the alarm should be repeatedly emitted
1801 while the associated threshold has been crossed.";
1809 "This flag indicates whether the alarm has been enabled or
1817 description "A measure of the important or urgency of the alarm";
1818 type alarm-severity-type;
1822 description "The metric to be tracked by this alarm.";
1823 type alarm-metric-type;
1827 description "The type of metric statistic that is tracked by this alarm";
1828 type alarm-statistic-type;
1833 "The relational operator that defines whether the alarm should be
1834 triggered when the metric statistic is, say, above or below the
1835 specified threshold value.";
1836 type alarm-operation-type;
1841 "This value defines the threshold that, if crossed, will trigger
1850 "The period defines the length of time (seconds) that the metric
1851 data are collected over in oreder to evaluate the chosen
1858 "This is the number of samples of the metric statistic used to
1859 evaluate threshold crossing. Each sample or evaluation is equal to
1860 the metric statistic obtained for a given period. This can be used
1861 to mitigate spikes in the metric that may skew the statistic of
1867 typedef cloud-account-type {
1868 description "cloud account type";
1872 enum cloudsim_proxy;
1881 grouping host-aggregate {
1882 list host-aggregate {
1883 description "Name of the Host Aggregate";
1889 leaf metadata-value {
1895 grouping placement-group-input {
1897 type manotypes:cloud-account-type;
1899 choice cloud-provider {
1901 container availability-zone {
1902 description "Name of the Availability Zone";
1907 container server-group {
1908 description "Name of the Affinity/Anti-Affinity Server Group";
1913 uses host-aggregate;
1916 leaf aws-construct {
1921 leaf openmano-construct {
1926 leaf vsphere-construct {
1931 leaf mock-construct {
1936 leaf cloudsim-construct {
1943 grouping placement-group-info {
1948 "Place group construct to define the compute resource placement strategy
1949 in cloud environment";
1954 description "This is free text space used to describe the intent/rationale
1955 behind this placement group. This is for human consumption only";
1961 "Strategy associated with this placement group
1962 Following values are possible
1963 - COLOCATION: Colocation strategy imply intent to share the physical
1964 infrastructure (hypervisor/network) among all members
1966 - ISOLATION: Isolation strategy imply intent to not share the physical
1967 infrastructure (hypervisor/network) among the members
1974 default "COLOCATION";
1978 grouping ip-profile-info {
1979 description "Grouping for IP-Profile";
1980 container ip-profile-params {
1983 type inet:ip-version;
1987 leaf subnet-address {
1988 description "Subnet IP prefix associated with IP Profile";
1989 type inet:ip-prefix;
1992 leaf gateway-address {
1993 description "IP Address of the default gateway associated with IP Profile";
1994 type inet:ip-address;
1997 leaf security-group {
1998 description "Name of the security group";
2005 description "List of DNS Servers associated with IP Profile";
2006 type inet:ip-address;
2010 container dhcp-params {
2012 description "This flag indicates if DHCP is enabled or not";
2017 leaf start-address {
2018 description "Start IP address of the IP-Address range associated with DHCP domain";
2019 type inet:ip-address;
2023 description "Size of the DHCP pool associated with DHCP domain";
2028 leaf subnet-prefix-pool {
2029 description "VIM Specific reference to pre-created subnet prefix";
2035 grouping ip-profile-list {
2038 "List of IP Profiles.
2039 IP Profile describes the IP characteristics for the Virtual-Link";
2044 description "Name of the IP-Profile";
2049 description "Description for IP profile";
2053 uses ip-profile-info;
2057 grouping config-file {
2058 description "Grouping for files needed to be mounted into an additional drive";
2061 "List of configuration files to be written on an additional drive";
2064 description "Name of the configuration file";
2068 description "Full path of the destination in the guest";
2074 grouping supplemental-boot-data {
2075 description "Grouping for custom vim data";
2076 container supplemental-boot-data {
2077 uses manotypes:config-file;
2078 leaf boot-data-drive {
2079 description "Some VIMs implement additional drives to host config-files or meta-data";
2086 grouping volume-info {
2087 description "Grouping for Volume-info";
2090 description "Description for Volume";
2095 description "Size of disk in GB";
2099 choice volume-source {
2101 "Defines the source of the volume. Possible options are
2102 1. Ephemeral -- Empty disk
2103 2. Image -- Refer to image to be used for volume
2104 3. Volume -- Reference of pre-existing volume to be used
2114 uses image-properties;
2120 description "Type of disk-bus on which this disk is exposed to guest";
2130 description "The type of device as exposed to guest";
2141 grouping rpc-project-name {
2145 "Project to which this belongs";
2147 path "/rw-project:project/rw-project:name";