From 4ce4f00adfb39923773f85e35ad04c6fb01183de Mon Sep 17 00:00:00 2001 From: George Kraft Date: Tue, 5 Nov 2013 17:01:07 -0600 Subject: CXMAN-231: Add PMIC version to get_versions and tspackage --- cxmanage_api/cli/__init__.py | 1 + cxmanage_api/node.py | 5 +++++ cxmanage_test/node_test.py | 3 +++ 3 files changed, 9 insertions(+) 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): -- cgit v1.2.1