Extend hardware manager with data needed for inspector
* Added NetworkInterface.ip4_address * Added HardwareManager.get_bmc_address() * Added Memory.physical_mb This is total memory as reported by dmidecode, and yes, it's different from total, as it includes kernel reserved space. * Added CPU.architecture As a side effect, get_cpus was switched to lscpu. Also fixes problem when get_cpus reported the current frequency instead of maximum one. Change-Id: I4080d4d551eb0bb995a94ef9a300351910c09fb9
This commit is contained in:
ironic_python_agent
requirements.txt@ -64,6 +64,14 @@ def execute(*cmd, **kwargs):
|
||||
return result
|
||||
|
||||
|
||||
def try_execute(*cmd, **kwargs):
|
||||
"""The same as execute but returns None on error."""
|
||||
try:
|
||||
return execute(*cmd, **kwargs)
|
||||
except (processutils.ProcessExecutionError, OSError) as e:
|
||||
LOG.debug('Command failed: %s', e)
|
||||
|
||||
|
||||
def _read_params_from_file(filepath):
|
||||
"""Extract key=value pairs from a file.
|
||||
|
||||
|
Reference in New Issue
Block a user