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 parameter";
118 "The value should be dimmed by the UI.
119 Only applies to parameters with default values.";
125 "The value should be hidden by the UI.
126 Only applies to parameters with default values.";
131 grouping ui-primitive-group {
132 list parameter-group {
134 "Grouping of parameters which are logically grouped in UI";
139 "Name of the parameter group";
145 "List of parameters for the service primitive.";
147 uses manotypes:primitive-parameter;
151 description "Is this parameter group mandatory";
158 grouping image-properties {
161 "Image name for the software image.
162 If the image name is found within the VNF package it will
163 be uploaded to all VIM accounts during onboarding process.
164 Otherwise, the image must be added to the VIM account with
165 the same name as entered here.
170 leaf image-checksum {
172 "Image md5sum for the software image.
173 The md5sum, if provided, along with the image name uniquely
174 identifies an image uploaded to the CAL.
179 grouping initial-config {
182 "Sequence number for the configuration primitive.";
188 "Name of the configuration primitive.";
193 leaf user-defined-script {
195 "A user defined script.";
206 description "Value of the configuration primitive.";
212 grouping vnf-configuration {
213 container vnf-configuration {
214 rwpb:msg-new VnfConfiguration;
216 "Information about the VNF configuration. Note:
217 If the NS contains multiple instances of the
218 same VNF, each instance could have a different
221 choice config-method {
223 "Defines the configuration method for the VNF.";
226 "Use NETCONF for configuring the VNF.";
230 "Netconf configuration target";
239 "Protocol to use for NETCONF such as ssh";
248 "Port for the NETCONF server.";
249 type inet:port-number;
256 "Use REST for configuring the VNF.";
260 "Port for the REST server.";
261 type inet:port-number;
268 "Use custom script for configuring the VNF.
269 This script is executed in the context of
270 Orchestrator (The same system and environment
275 "Script type - currently supported : bash, expect";
286 "Configure the VNF through Juju.";
289 description "Juju charm to use with the VNF.";
296 container config-access {
297 leaf mgmt-ip-address {
299 "IP address to be used to configure this VNF,
300 optional if it is possible to resolve dynamically.";
301 type inet:ip-address;
306 "User name for configuration.";
312 "Password for configuration access authentication.";
317 container config-attributes {
319 "Miscellaneous input parameters to be considered
320 while processing the NSD to apply configuration";
322 leaf config-priority {
324 "Configuration priority - order of configuration
325 to be applied to each VNF in this NS ,A low
326 number takes precedence over a high number";
332 "Wait (seconds) before applying the configuration to VNF";
337 list service-primitive {
338 rwpb:msg-new ServicePrimitive;
340 "List of service primitives supported by the
341 configuration agent for this VNF.";
346 "Name of the service primitive.";
352 "List of parameters to the service primitive.";
354 uses primitive-parameter;
358 list initial-config-primitive {
359 rwpb:msg-new InitialConfigPrimitive;
361 "Initial set of configuration primitives.";
366 leaf config-template {
368 "Configuration template for each VNF";
372 } // END - grouping vnf-configuration
374 typedef virtual-link-type {
376 "Type of virtual link
377 ELAN: A multipoint service connecting a set of VNFs
378 // ELINE: For a simple point to point connection
379 // between a VNF and the existing network.
380 // ETREE: A multipoint service connecting one or
381 // more roots and a set of leaves, but
382 // preventing inter-leaf communication.";
390 grouping named-value {
400 typedef http-method {
402 "Type of HTTP operation";
416 "Type of API to fetch monitoring parameters";
425 typedef json-query-method {
427 "The method to extract a value from a JSON response
429 NAMEKEY - Use the name as the key for a non-nested value.
430 JSONPATH - Use jsonpath-rw implementation to extract a value.
431 OBJECTPATH - Use objectpath implementation to extract a value.";
439 typedef param-value-type {
441 "The type of the parameter value";
449 typedef connection-point-type {
451 "Type of connection point
453 // VNIC_ADDR: Virtual NIC Address
454 // PNIC_ADDR: Physical NIC Address
455 // PPORT: Physical Port.";
462 typedef widget-type {
464 "Type of the widget, typically used by the UI.";
475 typedef cpu-feature-type {
477 "Enumeration for CPU features.
479 AES: CPU supports advanced instruction set for
480 AES (Advanced Encryption Standard).
482 CAT: Cache Allocation Technology (CAT) allows
483 an Operating System, Hypervisor, or similar
484 system management agent to specify the amount
485 of L3 cache (currently the last-level cache
486 in most server and client platforms) space an
487 application can fill (as a hint to hardware
488 functionality, certain features such as power
489 management may override CAT settings).
491 CMT: Cache Monitoring Technology (CMT) allows
492 an Operating System, Hypervisor, or similar
493 system management agent to determine the
494 usage of cache based on applications running
495 on the platform. The implementation is
496 directed at L3 cache monitoring (currently
497 the last-level cache in most server and
500 DDIO: Intel Data Direct I/O (DDIO) enables
501 Ethernet server NICs and controllers talk
502 directly to the processor cache without a
503 detour via system memory. This enumeration
504 specifies if the VM requires a DDIO
548 enum REQUIRE_CLFLUSH;
576 enum REQUIRE_PCLMULQDQ;
577 enum PREFER_PCLMULQDQ;
580 enum REQUIRE_MONITOR;
618 enum REQUIRE_TSC_DEADLINE_TIMER;
619 enum PREFER_TSC_DEADLINE_TIMER;
628 enum REQUIRE_FSGSBASE;
629 enum PREFER_FSGSBASE;
642 enum REQUIRE_INVPCID;
658 container vm-flavor {
661 "Number of VCPUs for the VM.";
667 "Amount of memory in MB.";
673 "Amount of disk space in GB.";
677 } //grouping vm-flavor
679 grouping vswitch-epa {
680 container vswitch-epa {
681 leaf ovs-acceleration {
683 "Specifies Open vSwitch acceleration mode.
684 MANDATORY: OVS acceleration is required
685 PREFERRED: OVS acceleration is preferred";
695 "Specifies Open vSwitch hardware offload mode.
696 MANDATORY: OVS offload is required
697 PREFERRED: OVS offload is preferred";
707 grouping hypervisor-epa {
708 container hypervisor-epa {
711 "Specifies the type of hypervisor.
727 description "Specifies the host level EPA attributes.";
730 "Host CPU model. Examples include: SandyBridge,
733 enum PREFER_WESTMERE;
734 enum REQUIRE_WESTMERE;
735 enum PREFER_SANDYBRIDGE;
736 enum REQUIRE_SANDYBRIDGE;
737 enum PREFER_IVYBRIDGE;
738 enum REQUIRE_IVYBRIDGE;
740 enum REQUIRE_HASWELL;
741 enum PREFER_BROADWELL;
742 enum REQUIRE_BROADWELL;
744 enum REQUIRE_NEHALEM;
749 enum PREFER_CORE2DUO;
750 enum REQUIRE_CORE2DUO;
755 description "Host CPU architecture.";
773 description "Host CPU Vendor.";
782 leaf cpu-socket-count {
783 description "Number of sockets on the host.";
787 leaf cpu-core-count {
788 description "Number of cores on the host.";
792 leaf cpu-core-thread-count {
793 description "Number of threads per cores on the host.";
799 description "List of CPU features.";
801 description "CPU feature.";
802 type cpu-feature-type;
807 leaf om-cpu-model-string {
808 description "OpenMANO CPU model string";
812 list om-cpu-feature {
814 description "List of OpenMANO CPU features";
816 description "CPU feature";
824 description "EPA attributes for the guest";
825 container guest-epa {
826 leaf trusted-execution {
827 description "This VM should be allocated from trusted pool";
833 "Memory page allocation size. If a VM requires
834 hugepages, it should choose LARGE or SIZE_2MB
835 or SIZE_1GB. If the VM prefers hugepages it
836 should choose PREFER_LARGE.
837 LARGE : Require hugepages (either 2MB or 1GB)
838 SMALL : Doesn't require hugepages
839 SIZE_2MB : Requires 2MB hugepages
840 SIZE_1GB : Requires 1GB hugepages
841 PREFER_LARGE : Application prefers hugepages";
851 leaf cpu-pinning-policy {
853 "CPU pinning policy describes association
854 between virtual CPUs in guest and the
855 physical CPUs in the host.
856 DEDICATED : Virtual CPUs are pinned to
858 SHARED : Multiple VMs may share the
860 ANY : Any policy is acceptable for the VM";
869 leaf cpu-thread-pinning-policy {
871 "CPU thread pinning policy describes how to
872 place the guest CPUs when the host supports
874 AVOID : Avoids placing a guest on a host
876 SEPARATE: Places vCPUs on separate cores,
877 and avoids placing two vCPUs on
878 two threads of same core.
879 ISOLATE : Places each vCPU on a different core,
880 and places no vCPUs from a different
881 guest on the same core.
882 PREFER : Attempts to place vCPUs on threads
894 "List of pcie passthrough devices.";
898 "Device identifier.";
903 "Number of devices to attach to the VM.";
916 container numa-node-policy {
918 "This policy defines NUMA topology of the
919 guest. Specifically identifies if the guest
920 should be run on a host with one NUMA
921 node or multiple NUMA nodes. As an example
922 a guest might need 8 VCPUs and 4 GB of
923 memory. However, it might need the VCPUs
924 and memory distributed across multiple
925 NUMA nodes. In this scenario, NUMA node
926 1 could run with 6 VCPUs and 3GB, and
927 NUMA node 2 could run with 2 VCPUs and
932 "The number of NUMA nodes to expose to the VM.";
938 "This policy specifies how the memory should
939 be allocated in a multi-node scenario.
940 STRICT : The memory must be allocated
941 strictly from the memory attached
943 PREFERRED : The memory should be allocated
944 preferentially from the memory
945 attached to the NUMA node";
956 "NUMA node identification. Typically
964 "List of VCPUs to allocate on
968 description "List of VCPUs ids to allocate on
975 "Memory size expressed in MB
976 for this NUMA node.";
980 choice om-numa-type {
982 "OpenMANO Numa type selection";
990 case paired-threads {
991 container paired-threads {
992 leaf num-paired-threads {
996 list paired-thread-ids {
998 "List of thread pairs to use in case of paired-thread NUMA";
1026 grouping provider-network {
1027 container provider-network {
1028 description "Container for the provider network.";
1029 leaf physical-network {
1031 "Name of the physical network on which the provider
1038 "Type of the overlay network.
1039 LOCAL - Provider network implemented in a single compute node
1040 FLAT - Provider network shared by all tenants
1041 VLAN - Provider network implemented using 802.1Q tagging
1042 VXLAN - Provider networks implemented using RFC 7348
1043 GRE - Provider networks implemented using GRE tunnels";
1052 leaf segmentation_id {
1054 "ID of segregated virtual networks";
1060 grouping monitoring-param {
1061 list http-endpoint {
1063 "List of http endpoints to be used by monitoring params";
1067 description "The HTTP path on the management server";
1072 description "Pick HTTPS instead of HTTP , Default is false";
1078 description "The HTTP port to connect to";
1079 type inet:port-number;
1083 description "The HTTP basic auth username";
1088 description "The HTTP basic auth password";
1092 leaf polling-interval-secs {
1093 description "The HTTP polling interval in seconds";
1100 "Method that the URI should perform.
1101 Deafult action is GET.";
1103 type manotypes:http-method;
1108 description "Custom HTTP headers to put on HTTP request";
1111 description "HTTP header key";
1116 description "HTTP header value";
1122 list monitoring-param {
1124 "List of monitoring parameters at the network service level";
1134 leaf http-endpoint-ref {
1135 // TODO (Philip): Fix this
1137 // path "../../http-endpoint/path";
1142 leaf json-query-method {
1143 type json-query-method;
1147 container json-query-params {
1150 "The jsonpath to use to extract value from JSON structure";
1155 "The objectpath to use to extract value from JSON structure";
1160 uses monitoring-param-ui-data;
1161 uses monitoring-param-value;
1166 grouping monitoring-param-aggregation {
1167 typedef aggregation-type {
1168 description "aggregation-type";
1178 leaf aggregation-type {
1179 type aggregation-type;
1183 grouping monitoring-param-ui-data {
1189 description "A tag to group monitoring parameters";
1195 description "Defines the UI Display variant of measured counters.";
1196 type manotypes:widget-type;
1200 description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1205 grouping monitoring-param-value {
1207 type param-value-type;
1211 container numeric-constraints {
1214 "Minimum value for the parameter";
1219 "Maximum value for the parameter";
1224 container text-constraints {
1227 "Minimum string length for the parameter";
1232 "Maximum string length for the parameter";
1237 leaf value-integer {
1239 "Current value for an integer parameter";
1243 leaf value-decimal {
1245 "Current value for a decimal parameter";
1253 "Current value for a string parameter";
1258 grouping control-param {
1259 list control-param {
1261 "List of control parameters to manage and
1262 update the running configuration of the VNF";
1278 description "A tag to group control parameters";
1284 "Minimum value for the parameter";
1290 "Maximum value for the parameter";
1294 leaf current-value {
1296 "Current value for the parameter";
1302 "Step value for the parameter";
1311 type manotypes:widget-type;
1316 "This is the URL where the operation should be performed.";
1323 "Method that the URI should perform.
1324 Default Action is POST";
1326 type manotypes:http-method;
1332 "This is the operation payload or payload template as stringified
1333 JSON. This field provides the data to be sent for this operation
1341 grouping action-param {
1344 "List of action parameters to
1360 description "A tag to group monitoring parameter";
1366 "This is the URL where to perform the operation";
1372 "This is the method to be performed at the uri.
1373 POST by default for action";
1375 type manotypes:http-method;
1381 "This is the operation payload or payload template to be sent in
1382 the data for this operation call";
1389 grouping input-parameter {
1390 description "List of input parameters that can be specified when instantiating a network service.";
1392 list input-parameter {
1394 "List of input parameters";
1401 "An xpath that specfies which element in a descriptor is to be
1408 "The value that the element specified by the xpath should take when a
1409 record is created.";
1415 grouping input-parameter-xpath {
1416 list input-parameter-xpath {
1418 "List of xpaths to parameters inside the NSD
1419 the can be customized during the instantiation.";
1424 "An xpath that specifies the element in a descriptor.";
1429 description "A descriptive string";
1433 leaf default-value {
1434 description "/nsd:nsd-catalog/nsd:nsd/nsd:vendor";
1440 grouping nfvi-metrics {
1444 "Label to show in UI";
1451 "The total number of VCPUs available.";
1457 "The VCPU utilization (percentage).";
1468 "Label to show in UI";
1475 "The amount of memory (bytes) currently in use.";
1481 "The amount of memory (bytes) available.";
1487 "The memory utilization (percentage).";
1498 "Label to show in UI";
1505 "The amount of storage (bytes) currently in use.";
1511 "The amount of storage (bytes) available.";
1517 "The storage utilization (percentage).";
1525 container external-ports {
1528 "Label to show in UI";
1530 default "EXTERNAL PORTS";
1535 "The total number of external ports.";
1540 container internal-ports {
1543 "Label to show in UI";
1545 default "INTERNAL PORTS";
1550 "The total number of internal ports.";
1558 "Label to show in UI";
1560 default "NETWORK TRAFFIC";
1563 container incoming {
1566 "Label to show in UI";
1568 default "INCOMING NETWORK TRAFFIC";
1573 "The cumulative number of incoming bytes.";
1579 "The cumulative number of incoming packets.";
1585 "The current incoming byte-rate (bytes per second).";
1593 "The current incoming packet (packets per second).";
1600 container outgoing {
1603 "Label to show in UI";
1605 default "OUTGOING NETWORK TRAFFIC";
1610 "The cumulative number of outgoing bytes.";
1616 "The cumulative number of outgoing packets.";
1622 "The current outgoing byte-rate (bytes per second).";
1630 "The current outgoing packet (packets per second).";
1639 typedef alarm-severity-type {
1640 description "An indication of the importance or urgency of the alarm";
1648 typedef alarm-metric-type {
1649 description "The type of metrics to register the alarm for";
1651 enum CPU_UTILIZATION;
1652 enum MEMORY_UTILIZATION;
1653 enum STORAGE_UTILIZATION;
1657 typedef alarm-statistic-type {
1659 "Statistic type to use to determine threshold crossing
1670 typedef alarm-operation-type {
1672 "The relational operator used to define whether an alarm
1673 should be triggered in certain scenarios, such as if the
1674 metric statistic goes above or below a specified value.";
1676 enum GE; // greater than or equal
1677 enum LE; // less than or equal
1678 enum GT; // greater than
1679 enum LT; // less than
1687 "This field is reserved for the identifier assigned by the VIM provider";
1693 description "A human readable string to identify the alarm";
1698 description "A description of this alarm";
1704 "The identifier of the VDUR that the alarm is associated with";
1716 list insufficient-data {
1733 "This flag indicates whether the alarm should be repeatedly emitted
1734 while the associated threshold has been crossed.";
1742 "This flag indicates whether the alarm has been enabled or
1750 description "A measure of the importance or urgency of the alarm";
1751 type alarm-severity-type;
1755 description "The metric to be tracked by this alarm.";
1756 type alarm-metric-type;
1760 description "The type of metric statistic that is tracked by this alarm";
1761 type alarm-statistic-type;
1766 "The relational operator used to define whether an alarm should be
1767 triggered in certain scenarios, such as if the metric statistic
1768 goes above or below a specified value.";
1769 type alarm-operation-type;
1774 "This value defines the threshold that, if crossed, will trigger
1783 "The period defines the length of time (seconds) that the metric
1784 data are collected over in oreder to evaluate the chosen
1791 "Defines the length of time (seconds) in which metric data are
1792 collected in order to evaluate the chosen statistic.";
1797 typedef cloud-account-type {
1798 description "VIM account type";
1802 enum cloudsim_proxy;
1811 grouping host-aggregate {
1812 list host-aggregate {
1813 description "Name of the Host Aggregate";
1818 "Name of the additional information attached to the host-aggregate";
1821 leaf metadata-value {
1823 "Value of the corresponding metadata-key";
1829 grouping placement-group-input {
1831 type manotypes:cloud-account-type;
1833 choice cloud-provider {
1835 container availability-zone {
1836 description "Name of the Availability Zone";
1841 container server-group {
1842 description "Name of the Affinity/Anti-Affinity Server Group";
1847 uses host-aggregate;
1850 leaf aws-construct {
1855 leaf openmano-construct {
1860 leaf vsphere-construct {
1865 leaf mock-construct {
1870 leaf cloudsim-construct {
1877 grouping placement-group-info {
1882 "Place group construct to define the compute resource placement strategy
1883 in cloud environment";
1888 description "This is free text space used to describe the intent/rationale
1889 behind this placement group. This is for human consumption only";
1895 "Strategy associated with this placement group
1896 Following values are possible
1897 - COLOCATION: Colocation strategy imply intent to share the physical
1898 infrastructure (hypervisor/network) among all members
1900 - ISOLATION: Isolation strategy imply intent to not share the physical
1901 infrastructure (hypervisor/network) among the members
1908 default "COLOCATION";
1912 grouping ip-profile-info {
1913 description "Grouping for IP-Profile";
1914 container ip-profile-params {
1917 type inet:ip-version;
1921 leaf subnet-address {
1922 description "Subnet IP prefix associated with IP Profile";
1923 type inet:ip-prefix;
1926 leaf gateway-address {
1927 description "IP Address of the default gateway associated with IP Profile";
1928 type inet:ip-address;
1931 leaf security-group {
1932 description "Name of the security group";
1939 description "List of DNS Servers associated with IP Profile";
1940 type inet:ip-address;
1944 container dhcp-params {
1946 description "This flag indicates if DHCP is enabled or not";
1951 leaf start-address {
1952 description "Start IP address of the IP-Address range associated with DHCP domain";
1953 type inet:ip-address;
1957 description "Size of the DHCP pool associated with DHCP domain";
1962 leaf subnet-prefix-pool {
1963 description "VIM Specific reference to pre-created subnet prefix";
1969 grouping ip-profile-list {
1972 "List of IP Profiles.
1973 IP Profile describes the IP characteristics for the Virtual-Link";
1978 description "Name of the IP-Profile";
1983 description "Description for IP profile";
1987 uses ip-profile-info;
1991 grouping config-file {
1992 description "Grouping for files needed to be mounted into an additional drive";
1995 "List of configuration files to be written on an additional drive";
1998 description "Name of the configuration file";
2002 description "Full path of the destination in the guest";
2008 grouping supplemental-boot-data {
2009 description "Grouping for custom vim data";
2010 container supplemental-boot-data {
2011 uses manotypes:config-file;
2012 leaf boot-data-drive {
2013 description "Some VIMs implement additional drives to host config-files or meta-data";
2020 grouping volume-info {
2021 description "Grouping for Volume-info";
2024 description "Description for Volume";
2029 description "Size of disk in GB";
2033 choice volume-source {
2035 "Defines the source of the volume. Possible options are
2036 1. Ephemeral -- Empty disk
2037 2. Image -- Refer to image to be used for volume
2038 3. Volume -- Reference of pre-existing volume to be used
2048 uses image-properties;
2054 description "Type of disk-bus on which this disk is exposed to guest";
2064 description "The type of device as exposed to guest";
2075 grouping rpc-project-name {
2079 "Project to which this belongs";
2081 path "/rw-project:project/rw-project:name";