mirror of
https://github.com/xcat2/confluent.git
synced 2026-04-06 00:46:27 +00:00
Fix user management with redfish
This commit is contained in:
@@ -215,7 +215,7 @@ class IpmiCommandWrapper(ipmicommand.Command):
|
||||
self.cfm.remove_watcher(self._attribwatcher)
|
||||
self._attribwatcher = None
|
||||
|
||||
def _attribschanged(self, nodeattribs, configmanager, **kwargs):
|
||||
async def _attribschanged(self, nodeattribs, configmanager, **kwargs):
|
||||
try:
|
||||
await self.ipmi_session._mark_broken()
|
||||
except AttributeError:
|
||||
|
||||
@@ -736,13 +736,15 @@ 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():
|
||||
usersfrombmc = await self.ipmicmd.get_users()
|
||||
for user in usersfrombmc:
|
||||
await self.output.put(msg.ChildCollection(user, candelete=True))
|
||||
return
|
||||
# List all users
|
||||
elif len(self.element) == 4 and self.element[-1] == 'all':
|
||||
users = []
|
||||
async for user in self.ipmicmd.get_users():
|
||||
usersfrombmc = await self.ipmicmd.get_users()
|
||||
for user in usersfrombmc:
|
||||
users.append(await self.ipmicmd.get_user(uid=user))
|
||||
await self.output.put(msg.UserCollection(users=users, name=self.node))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user