summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kraft <george.kraft@calxeda.com>2013-11-05 17:01:07 -0600
committerGeorge Kraft <george.kraft@calxeda.com>2013-11-05 17:01:07 -0600
commit4ce4f00adfb39923773f85e35ad04c6fb01183de (patch)
tree028035abbb6c31d63ff38cc343fe27ddba6b84f1
parentbcc088e727a5a3b8772a04b74e1bbee383412310 (diff)
downloadcxmanage-4ce4f00adfb39923773f85e35ad04c6fb01183de.tar.gz
CXMAN-231: Add PMIC version to get_versions and tspackage
-rw-r--r--cxmanage_api/cli/__init__.py1
-rw-r--r--cxmanage_api/node.py5
-rw-r--r--cxmanage_test/node_test.py3
3 files changed, 9 insertions, 0 deletions
diff --git a/cxmanage_api/cli/__init__.py b/cxmanage_api/cli/__init__.py
index 0d72116..8e6e6f8 100644
--- a/cxmanage_api/cli/__init__.py
+++ b/cxmanage_api/cli/__init__.py
@@ -55,6 +55,7 @@ COMPONENTS = [
("node_eeprom_config", "Node EEPROM config"),
("slot_eeprom_version", "Slot EEPROM version"),
("slot_eeprom_config", "Slot EEPROM config"),
+ ("pmic_version", "PMIC version")
]
diff --git a/cxmanage_api/node.py b/cxmanage_api/node.py
index c92bdc5..66f0d67 100644
--- a/cxmanage_api/node.py
+++ b/cxmanage_api/node.py
@@ -1072,6 +1072,11 @@ communication.
# to continue gracefully if the ECME is out of date.
result.hardware_version = "Unknown"
+ try:
+ result.pmic_version = self.bmc.pmic_get_version()
+ except IpmiError:
+ pass
+
return result
def get_versions_dict(self):
diff --git a/cxmanage_test/node_test.py b/cxmanage_test/node_test.py
index 2f0e83f..1853761 100644
--- a/cxmanage_test/node_test.py
+++ b/cxmanage_test/node_test.py
@@ -1011,6 +1011,9 @@ class DummyBMC(LanBMC):
# Writes a fake FRU image with version "0.0"
fru_image.write("x00" * 516 + "0.0" + "x00"*7673)
+ def pmic_get_version(self):
+ return "0"
+
# pylint: disable=R0913, R0903
class Partition(object):