2 Copyright 2020 Whitestack LLC
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 See the License for the specific language governing permissions and
15 limitations under the License.
20 namespace "urn:etsi:osm:yang:augments:epa";
23 import etsi-nfv-vnfd {
27 grouping allocation-properties {
30 "Defines the maximum allocation. The value 0 indicates that usage is not limited.
31 This parameter ensures that the instance never uses more than the defined amount of resource.";
37 "Defines the guaranteed minimum reservation.
38 If needed, the machine will definitely get allocated the reserved amount of resources.";
44 "Number of shares allocated.
45 Specifies the proportional weighted share for the domain.
46 If this element is omitted, the service defaults to the OS provided defaults";
51 grouping extended-mem-quota {
54 "Memory quota describes the memory resource allocation policy.
55 Limit and Reserve values are defined in MB";
56 uses allocation-properties;
60 grouping extended-vif-quota {
63 "Virtual interfaces quota describes the virtual interface bandwidth resource allocation policy.
64 Limit and Reserve values are defined in Mbps";
65 uses allocation-properties;
69 grouping extended-disk-io-quota {
70 container disk-io-quota {
72 "Disk IO quota describes the disk IO operations resource allocation policy.
73 Limit and Reserve values are defined in IOPS";
74 uses allocation-properties;
78 grouping extended-cpu-quota {
81 "CPU quota describes the CPU resource allocation policy.
82 Limit and Reserve values are defined in MHz";
83 uses allocation-properties;
87 grouping extended-cpu-policy {
90 "CPU thread pinning policy describes how to
91 place the guest CPUs when the host supports
93 AVOID : Avoids placing a guest on a host
95 SEPARATE: Places vCPUs on separate cores,
96 and avoids placing two vCPUs on
97 two threads of same core.
98 ISOLATE : Places each vCPU on a different core,
99 and places no vCPUs from a different
100 guest on the same core.
101 PREFER : Attempts to place vCPUs on threads
112 grouping extended-mempage-size {
115 "Memory page allocation size. If a VM requires
116 hugepages, it should choose LARGE or SIZE_2MB
117 or SIZE_1GB. If the VM prefers hugepages it
118 should choose PREFER_LARGE.
119 LARGE : Require hugepages (either 2MB or 1GB)
120 SMALL : Doesn't require hugepages
121 SIZE_2MB : Requires 2MB hugepages
122 SIZE_1GB : Requires 1GB hugepages
123 PREFER_LARGE : Application prefers hugepages";
133 grouping extended-numa {
134 container numa-node-policy {
136 "This policy defines NUMA topology of the
137 guest. Specifically identifies if the guest
138 should be run on a host with one NUMA
139 node or multiple NUMA nodes. As an example
140 a guest might need 8 VCPUs and 4 GB of
141 memory. However, it might need the VCPUs
142 and memory distributed across multiple
143 NUMA nodes. In this scenario, NUMA node
144 1 could run with 6 VCPUs and 3GB, and
145 NUMA node 2 could run with 2 VCPUs and
150 "The number of NUMA nodes to expose to the VM.";
156 "This policy specifies how the memory should
157 be allocated in a multi-node scenario.
158 STRICT : The memory must be allocated
159 strictly from the memory attached
161 PREFERRED : The memory should be allocated
162 preferentially from the memory
163 attached to the NUMA node";
174 "NUMA node identification. Typically
182 "List of VCPUs to allocate on
187 "List of VCPUs ids to allocate on
194 "Memory size expressed in MB
195 for this NUMA node.";
199 choice om-numa-type {
201 "OpenMANO Numa type selection";
209 case paired-threads {
210 container paired-threads {
211 leaf num-paired-threads {
215 list paired-thread-ids {
217 "List of thread pairs to use in case of paired-thread NUMA";
241 augment "/vnfd:vnfd/vnfd:virtual-compute-desc/vnfd:virtual-memory" {
243 uses extended-mempage-size;
244 uses extended-mem-quota;
247 augment "/vnfd:vnfd/vnfd:virtual-compute-desc/vnfd:virtual-cpu/vnfd:pinning" {
248 uses extended-cpu-policy;
251 augment "/vnfd:vnfd/vnfd:virtual-compute-desc/vnfd:virtual-cpu" {
252 uses extended-cpu-quota;
255 augment "/vnfd:vnfd/vnfd:virtual-storage-desc" {
256 uses extended-disk-io-quota;
259 augment "/vnfd:vnfd/vnfd:vdu/vnfd:int-cpd/vnfd:virtual-network-interface-requirement" {
260 uses extended-vif-quota;