diff options
author | Nikolas Hermanns <nikolas.hermanns@ericsson.com> | 2016-03-04 10:01:22 +0100 |
---|---|---|
committer | Szilard Cserey <szilard.cserey@gmail.com> | 2016-03-09 17:44:10 +0000 |
commit | 1ef2a5abcdacf3274e4ed17c612835ae10cb34d8 (patch) | |
tree | 2309fbe29bc86713b44c77e5589d1e0cb14249e8 /deploy/dha_adapters | |
parent | aac8573f454109c98fa2af1e5ed05c1d1b19829b (diff) |
Make number of cpus configurable in dha file
Some compones of openstack produce a lot of CPU load.
With this commit it is possible to
make more use of the Hypervisor where the virtual
nodes runs on.
Change-Id: Ide567dd0823c5526171c29073f2a36aa5f27d4b6
Diffstat (limited to 'deploy/dha_adapters')
-rw-r--r-- | deploy/dha_adapters/hardware_adapter.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/deploy/dha_adapters/hardware_adapter.py b/deploy/dha_adapters/hardware_adapter.py index 2cd5ab842..55bb4002e 100644 --- a/deploy/dha_adapters/hardware_adapter.py +++ b/deploy/dha_adapters/hardware_adapter.py @@ -58,3 +58,8 @@ class HardwareAdapter(object): def get_disks(self): return self.dha_struct['disks'] + + def get_number_cpus(self, role): + role_cpus_dict = self.dha_struct.get('number_cpus') + if role_cpus_dict: + return role_cpus_dict.get(role) |