diff --git a/confluent_server/aiohmi/ipmi/command.py b/confluent_server/aiohmi/ipmi/command.py index 8cdc0ca9..63fc9854 100644 --- a/confluent_server/aiohmi/ipmi/command.py +++ b/confluent_server/aiohmi/ipmi/command.py @@ -859,9 +859,10 @@ class Command(object): else: raise Exception("Unrecognized data format " + repr(fetchdata)) - async def get_extended_bmc_configuration(self): + async def get_extended_bmc_configuration(self, hideadvanced=True): await self.oem_init() - return await self._oem.get_extended_bmc_configuration() + return await self._oem.get_extended_bmc_configuration( + hideadvanced=hideadvanced) async def get_bmc_configuration(self): await self.oem_init() @@ -2037,9 +2038,15 @@ class Command(object): names = {} max_ids = await self.get_channel_max_user_count(channel) for uid in range(1, max_ids + 1): - name = await self.get_user_name(uid=uid) - if await self._oem.is_valid(name): - names[uid] = await self.get_user(uid=uid, channel=channel) + # A single slot that the bmc refuses to describe must not take the + # whole user list with it, as some bmcs leave a slot in a state + # where reading it returns an error rather than an empty name + try: + name = await self.get_user_name(uid=uid) + if await self._oem.is_valid(name): + names[uid] = await self.get_user(uid=uid, channel=channel) + except exc.IpmiException: + continue return names async def create_user(self, uid, name, password, channel=None, callback=False, diff --git a/confluent_server/aiohmi/ipmi/oem/generic.py b/confluent_server/aiohmi/ipmi/oem/generic.py index 2b5019e9..01adb3ca 100644 --- a/confluent_server/aiohmi/ipmi/oem/generic.py +++ b/confluent_server/aiohmi/ipmi/oem/generic.py @@ -455,7 +455,7 @@ class OEMHandler(object): """ return False - async def get_extended_bmc_configuration(self): + async def get_extended_bmc_configuration(self, hideadvanced=True): """Get extended bmc configuration In the case of potentially redundant/slow diff --git a/confluent_server/aiohmi/ipmi/oem/lenovo/handler.py b/confluent_server/aiohmi/ipmi/oem/lenovo/handler.py index e566ee45..867e3566 100755 --- a/confluent_server/aiohmi/ipmi/oem/lenovo/handler.py +++ b/confluent_server/aiohmi/ipmi/oem/lenovo/handler.py @@ -1223,10 +1223,12 @@ class OEMHandler(generic.OEMHandler): return {'height': self._fpc_variant & 0xf, 'slot': 0} return await super(OEMHandler, self).get_description() - async def get_extended_bmc_configuration(self): + async def get_extended_bmc_configuration(self, hideadvanced=True): if await self.has_xcc(): - return await self.immhandler.get_extended_bmc_configuration() - return await super(OEMHandler, self).get_extended_bmc_configuration() + return await self.immhandler.get_extended_bmc_configuration( + hideadvanced=hideadvanced) + return await super(OEMHandler, self).get_extended_bmc_configuration( + hideadvanced=hideadvanced) async def get_bmc_configuration(self): if await self.has_xcc(): diff --git a/confluent_server/aiohmi/ipmi/oem/lenovo/imm.py b/confluent_server/aiohmi/ipmi/oem/lenovo/imm.py index 50fd68d0..c7c7c0c5 100644 --- a/confluent_server/aiohmi/ipmi/oem/lenovo/imm.py +++ b/confluent_server/aiohmi/ipmi/oem/lenovo/imm.py @@ -1026,7 +1026,7 @@ class XCCClient(IMMClient): return {} return {'height': int(dsc['u-height']), 'slot': int(dsc['slot'])} - async def get_extended_bmc_configuration(self): + async def get_extended_bmc_configuration(self, hideadvanced=True): immsettings = await self.get_system_configuration(fetchimm=True) for setting in list(immsettings): if not setting.startswith('IMM.'): diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index 1e28a187..084a01f6 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -808,7 +808,7 @@ class IpmiHandler: privilege_level=user['privilege_level']) # A list of users await self.output.put(msg.ChildCollection('all')) - async for user in self.ipmicmd.get_users(): + for user in await self.ipmicmd.get_users(): await self.output.put(msg.ChildCollection(user, candelete=True)) return # List all users diff --git a/confluent_server/confluent/plugins/hardwaremanagement/redfish.py b/confluent_server/confluent/plugins/hardwaremanagement/redfish.py index bcdf8bee..1ec337f4 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/redfish.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/redfish.py @@ -881,8 +881,10 @@ class IpmiHandler: await self.output.put(msg.ConfluentTargetTimeout(self.node)) async def list_inventory(self): + components = [] try: - components = await self.ipmicmd.get_inventory_descriptions() + async for component in self.ipmicmd.get_inventory_descriptions(): + components.append(component) except pygexc.IpmiException: await self.output.put(msg.ConfluentTargetTimeout(self.node)) return