From a445107c7f797c23f256ab409cf4638f9046d58c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 19 Aug 2022 09:10:52 -0400 Subject: [PATCH] Fix setting privilege level alone for ipmi The logic incorrectly had it depend on password also being present. --- .../confluent/plugins/hardwaremanagement/ipmi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index bd50bd64..3c1cf047 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -807,10 +807,10 @@ class IpmiHandler(object): password=user['password']) self.ipmicmd.set_user_password(uid=user['uid'], mode='enable', password=user['password']) - if 'privilege_level' in user: - self.ipmicmd.set_user_access(uid=user['uid'], - privilege_level=user[ - 'privilege_level']) + if 'privilege_level' in user: + self.ipmicmd.set_user_access(uid=user['uid'], + privilege_level=user[ + 'privilege_level']) if 'enabled' in user: if user['enabled'] == 'yes': mode = 'enable'