From dbeb5e089385a60b26418bb8c11ac92a2c1d5bad Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 26 Feb 2025 15:36:52 -0500 Subject: [PATCH] Fix SMMv3 model disploy in inventory Change-Id: I41d6e2f5e37465085ad0d57e042d65bdbdbfd4be --- pyghmi/redfish/oem/lenovo/smm3.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyghmi/redfish/oem/lenovo/smm3.py b/pyghmi/redfish/oem/lenovo/smm3.py index f2d19bdb..d35a30e5 100644 --- a/pyghmi/redfish/oem/lenovo/smm3.py +++ b/pyghmi/redfish/oem/lenovo/smm3.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import copy import os import pyghmi.redfish.oem.generic as generic import pyghmi.constants as pygconst @@ -115,9 +116,10 @@ class OEMHandler(generic.OEMHandler): if len(chassismembs) == 1: chassisurl = chassismembs[0]['@odata.id'] nodeinfo = self._do_web_request(chassisurl) - nodeinfo['SKU'] = nodeinfo['Model'] - nodeinfo['Model'] = 'N1380 Enclosure' - return nodeinfo + newnodeinfo = copy.deepcopy(nodeinfo) + newnodeinfo['SKU'] = nodeinfo['Model'] + newnodeinfo['Model'] = 'N1380 Enclosure' + return newnodeinfo def reseat_bay(self, bay): bayid = _baytolabel(bay)