Add processor_vcpu fact for Darwin (#30708)

Fix adds fact related to vcpu in Darwin's setup.

Fixes: #30688

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2017-09-23 00:02:59 +05:30 committed by Adrian Likins
parent 12404f470a
commit e1dcfda172

View file

@ -79,6 +79,7 @@ class DarwinHardware(Hardware):
system_profile = self.get_system_profile()
cpu_facts['processor'] = '%s @ %s' % (system_profile['Processor Name'], system_profile['Processor Speed'])
cpu_facts['processor_cores'] = self.sysctl['hw.physicalcpu']
cpu_facts['processor_vcpus'] = self.sysctl.get('hw.logicalcpu') or self.sysctl.get('hw.ncpu') or ''
return cpu_facts