summaryrefslogtreecommitdiff
path: root/ironic/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'ironic/drivers')
-rw-r--r--ironic/drivers/base.py4
-rw-r--r--ironic/drivers/modules/drac/inspect.py14
-rw-r--r--ironic/drivers/modules/drac/raid.py2
-rw-r--r--ironic/drivers/modules/irmc/inspect.py2
-rw-r--r--ironic/drivers/modules/redfish/inspect.py4
5 files changed, 5 insertions, 21 deletions
diff --git a/ironic/drivers/base.py b/ironic/drivers/base.py
index bdd017b91..953ac056e 100644
--- a/ironic/drivers/base.py
+++ b/ironic/drivers/base.py
@@ -1224,7 +1224,7 @@ class InspectInterface(BaseInterface):
"""Interface for inspection-related actions."""
interface_type = 'inspect'
- ESSENTIAL_PROPERTIES = {'memory_mb', 'local_gb', 'cpus', 'cpu_arch'}
+ ESSENTIAL_PROPERTIES = {'memory_mb', 'local_gb', 'cpu_arch'}
"""The properties required by scheduler/deploy."""
@abc.abstractmethod
@@ -1662,7 +1662,7 @@ class NetworkInterface(BaseInterface):
"""
def need_power_on(self, task):
- """Check if ironic node must be powered on before applying network changes
+ """Check if node must be powered on before applying network changes
:param task: A TaskManager instance.
:returns: Boolean.
diff --git a/ironic/drivers/modules/drac/inspect.py b/ironic/drivers/modules/drac/inspect.py
index 8ba0be088..c9c58fbe9 100644
--- a/ironic/drivers/modules/drac/inspect.py
+++ b/ironic/drivers/modules/drac/inspect.py
@@ -176,8 +176,6 @@ class DracWSManInspect(base.InspectInterface):
[memory.size_mb for memory in client.list_memory()])
cpus = client.list_cpus()
if cpus:
- properties['cpus'] = sum(
- [self._calculate_cpus(cpu) for cpu in cpus])
properties['cpu_arch'] = 'x86_64' if cpus[0].arch64 else 'x86'
bios_settings = client.list_bios_settings()
@@ -264,18 +262,6 @@ class DracWSManInspect(base.InspectInterface):
if disk.size_mb >= min_size_required_mb:
return disk
- def _calculate_cpus(self, cpu):
- """Find actual CPU count.
-
- :param cpu: Pass cpu.
-
- :returns: returns total cpu count.
- """
- if cpu.ht_enabled:
- return cpu.cores * 2
- else:
- return cpu.cores
-
def _calculate_gpus(self, video_controllers):
"""Find actual GPU count.
diff --git a/ironic/drivers/modules/drac/raid.py b/ironic/drivers/modules/drac/raid.py
index 8bad02bba..404222f5d 100644
--- a/ironic/drivers/modules/drac/raid.py
+++ b/ironic/drivers/modules/drac/raid.py
@@ -1022,7 +1022,7 @@ def _commit_to_controllers(node, controllers, substep="completed"):
# all realtime controllers
all_realtime = all(
(cntlr['is_reboot_required'] == optional)
- and not(cntlr.get('is_ehba_mode'))
+ and not (cntlr.get('is_ehba_mode'))
for cntlr in controllers)
# check any controller with ehba mode
diff --git a/ironic/drivers/modules/irmc/inspect.py b/ironic/drivers/modules/irmc/inspect.py
index f7c2ad7ba..64708ff9b 100644
--- a/ironic/drivers/modules/irmc/inspect.py
+++ b/ironic/drivers/modules/irmc/inspect.py
@@ -236,7 +236,7 @@ def _inspect_hardware(node, existing_traits=None, **kwargs):
"with the server, please check if you have set them "
"correctly.")
error = (_("Inspection failed for node %(node_id)s "
- "with the following error: %(error)s. (advice)s") %
+ "with the following error: %(error)s. %(advice)s") %
{'node_id': node.uuid, 'error': e, 'advice': advice})
raise exception.HardwareInspectionFailure(error=error)
diff --git a/ironic/drivers/modules/redfish/inspect.py b/ironic/drivers/modules/redfish/inspect.py
index 4c5f7c344..c514df4fe 100644
--- a/ironic/drivers/modules/redfish/inspect.py
+++ b/ironic/drivers/modules/redfish/inspect.py
@@ -108,9 +108,7 @@ class RedfishInspect(base.InspectInterface):
system.memory_summary.size_gib * units.Ki)
if system.processors and system.processors.summary:
- cpus, arch = system.processors.summary
- if cpus:
- inspected_properties['cpus'] = cpus
+ arch = system.processors.summary[1]
if arch:
try: