From f24019eed432a1fa8975ac7706d64a9327fc52d9 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 18 Sep 2019 11:03:20 -0400 Subject: [PATCH] Fix incorrect rules scope for SMM The SMM ruleset erroneously emptied array each pass. Fix by moving to the correct scope. Change-Id: I3e8984c89bf4297883bd6dbd9e478774fd032ebf --- pyghmi/ipmi/oem/lenovo/nextscale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/nextscale.py b/pyghmi/ipmi/oem/lenovo/nextscale.py index 44522d68..bc7d46b5 100644 --- a/pyghmi/ipmi/oem/lenovo/nextscale.py +++ b/pyghmi/ipmi/oem/lenovo/nextscale.py @@ -300,11 +300,11 @@ class SMMClient(object): def set_bmc_configuration(self, changeset): + rules = [] for key in changeset: if (isinstance(changeset[key], str) or isinstance(changeset[key], unicode)): changeset[key] = {'value': changeset[key]} - rules = [] if key.lower() in self.rulemap: rules.append('{0}:{1}'.format( self.rulemap[key.lower()], changeset[key]['value']))