Make own CPU allocation for CaaS default CPU pool
[ta/infra-ansible.git] / roles / allocate_cpu_cores / tasks / make_cpu_sets.yaml
index a128fe7..b11e480 100644 (file)
@@ -1,5 +1,17 @@
 ---
-# Copyright (C) 2019 Nokia
+# Copyright 2019 Nokia
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 
 - name: Set requested CPUs.
   set_fact:
 
 - name: Allocate CPU set.
   set_fact:
-    allocated_cpu_set: "{{ cloud_cpu_topology | cpu_topology_alloc(cpu_request, cpu_set.where) }}"
+    allocated_cpu_set: "{{ cpu_topology | cpu_topology_alloc(cpu_request, cpu_set.where) }}"
 
 - name: Append allocated CPU set.
   set_fact:
-    combined_cpu_set: "{{ allocated_cpu_set | union(cloud_cpu_sets[cpu_set.name] | default([])) | sort }}"
+    combined_cpu_set: "{{ allocated_cpu_set | union(cpu_sets[cpu_set.name] | default([])) | sort }}"
 
 - name: Make CPU set.
   set_fact:
-    cloud_cpu_sets: "{{ cloud_cpu_sets | combine({ cpu_set.name: combined_cpu_set }) }}"
-    cloud_cpu_topology: "{{ cloud_cpu_topology | cpu_topology_trim(cpu_request, cpu_set.where) }}"
+    cpu_sets: "{{ cpu_sets | combine({ cpu_set.name: combined_cpu_set }) }}"
+    cpu_topology: "{{ cpu_topology | cpu_topology_trim(cpu_request, cpu_set.where) }}"
 
 - name: Show created CPU sets.
   debug:
-    var: cloud_cpu_sets
+    var: cpu_sets
 
 - name: Show CPU topology after sets creation.
   debug:
-    var: cloud_cpu_topology
+    var: cpu_topology