diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index 67d41e21..43b80e0c 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -1322,12 +1322,18 @@ class Command(object): :returns: The asset tag """ + self.oem_init() + if hasattr(self._oem, 'get_asset_tag'): + return self._oem.get_asset_tag() return self._chunkwise_dcmi_fetch(6) def set_asset_tag(self, tag): """Set the asset tag value """ + self.oem_init() + if hasattr(self._oem, 'set_asset_tag'): + return self._oem.set_asset_tag(tag) return self._chunkwise_dcmi_set(8, tag) def _chunkwise_dcmi_fetch(self, command): @@ -1355,6 +1361,9 @@ class Command(object): chunk = bytearray(chunk) cmddata = bytearray((0xdc, offset, len(chunk))) cmddata += chunk + # set offset, otherwise the last setting will override + # the previous setting + offset += len(chunk) self.xraw_command(netfn=0x2c, command=command, data=cmddata) def set_channel_access(self, channel=None,