Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pyghmi for openSUSE:Factory checked in at 2026-06-15 19:43:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyghmi (Old) and /work/SRC/openSUSE:Factory/.python-pyghmi.new.1981 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyghmi" Mon Jun 15 19:43:19 2026 rev:29 rq:1359269 version:1.6.17 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyghmi/python-pyghmi.changes 2026-05-19 17:48:41.412446070 +0200 +++ /work/SRC/openSUSE:Factory/.python-pyghmi.new.1981/python-pyghmi.changes 2026-06-15 19:46:27.342987058 +0200 @@ -1,0 +2,14 @@ +Sun Jun 14 15:49:09 UTC 2026 - Dirk Müller <[email protected]> + +- update to 1.6.17: + * Fix XCC firmware updates + * Add http boot dev + * Fix other redfish update backends + * Make changes for MegaRac + * Remove stray debug output + * More enhancements for generic MegaRAC + * Handle None Gateway value + * Change FPGA to BCD format + * Fix bootsourceoverridemode + +------------------------------------------------------------------- Old: ---- pyghmi-1.6.16.tar.gz New: ---- pyghmi-1.6.17.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyghmi.spec ++++++ --- /var/tmp/diff_new_pack.IKnFsc/_old 2026-06-15 19:46:28.647041707 +0200 +++ /var/tmp/diff_new_pack.IKnFsc/_new 2026-06-15 19:46:28.651041875 +0200 @@ -17,7 +17,7 @@ Name: python-pyghmi -Version: 1.6.16 +Version: 1.6.17 Release: 0 Summary: General Hardware Management Initiative (IPMI and others) License: Apache-2.0 ++++++ pyghmi-1.6.16.tar.gz -> pyghmi-1.6.17.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyghmi-1.6.16/ChangeLog new/pyghmi-1.6.17/ChangeLog --- old/pyghmi-1.6.16/ChangeLog 2026-04-24 19:48:07.000000000 +0200 +++ new/pyghmi-1.6.17/ChangeLog 2026-06-10 15:07:20.000000000 +0200 @@ -1,6 +1,19 @@ CHANGES ======= +1.6.17 +------ + +* Fix XCC firmware updates +* Add http boot dev +* Fix other redfish update backends +* Make changes for MegaRac +* Remove stray debug output +* More enhancements for generic MegaRAC +* Handle None Gateway value +* Change FPGA to BCD format +* Fix bootsourceoverridemode + 1.6.16 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyghmi-1.6.16/PKG-INFO new/pyghmi-1.6.17/PKG-INFO --- old/pyghmi-1.6.16/PKG-INFO 2026-04-24 19:48:08.090955500 +0200 +++ new/pyghmi-1.6.17/PKG-INFO 2026-06-10 15:07:20.236110400 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: pyghmi -Version: 1.6.16 +Version: 1.6.17 Summary: Python General Hardware Management Initiative (IPMI and others) Home-page: http://github.com/openstack/pyghmi/ Author: Jarrod Johnson diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyghmi-1.6.16/pyghmi/ipmi/command.py new/pyghmi-1.6.17/pyghmi/ipmi/command.py --- old/pyghmi-1.6.16/pyghmi/ipmi/command.py 2026-04-24 19:47:21.000000000 +0200 +++ new/pyghmi-1.6.17/pyghmi/ipmi/command.py 2026-06-10 15:06:51.000000000 +0200 @@ -53,6 +53,7 @@ 'net': 4, 'network': 4, 'pxe': 4, + 'http': 4, 'hd': 8, 'safe': 0xc, 'cd': 0x14, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyghmi-1.6.16/pyghmi/ipmi/oem/lenovo/imm.py new/pyghmi-1.6.17/pyghmi/ipmi/oem/lenovo/imm.py --- old/pyghmi-1.6.16/pyghmi/ipmi/oem/lenovo/imm.py 2026-04-24 19:47:21.000000000 +0200 +++ new/pyghmi-1.6.17/pyghmi/ipmi/oem/lenovo/imm.py 2026-06-10 15:06:51.000000000 +0200 @@ -881,7 +881,7 @@ try: fpga = self.ipmicmd.xraw_command(netfn=0x3a, command=0x6b, data=(0,)) - fpga = '{0}.{1}.{2}'.format(*bytearray(fpga['data'])) + fpga = '{0:x}.{1:x}.{2:x}'.format(*bytearray(fpga['data'])) yield ('FPGA', {'version': fpga}) except pygexc.IpmiException as ie: if ie.ipmicode != 193: @@ -1910,7 +1910,7 @@ try: fpga = self.ipmicmd.xraw_command(netfn=0x3a, command=0x6b, data=(0,)) - fpga = '{0}.{1}.{2}'.format( + fpga = '{0:x}.{1:x}.{2:x}'.format( *struct.unpack('BBB', fpga['data'])) yield 'FPGA', {'version': fpga} except pygexc.IpmiException as ie: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyghmi-1.6.16/pyghmi/redfish/command.py new/pyghmi-1.6.17/pyghmi/redfish/command.py --- old/pyghmi-1.6.16/pyghmi/redfish/command.py 2026-04-24 19:47:21.000000000 +0200 +++ new/pyghmi-1.6.17/pyghmi/redfish/command.py 2026-06-10 15:06:51.000000000 +0200 @@ -60,6 +60,7 @@ 'Pxe': 'network', 'Usb': 'usb', 'SDCard': 'sdcard', + 'UefiHttp': 'http', } @@ -1093,7 +1094,7 @@ cidr = _mask_to_cidr(currip['SubnetMask']) retval['ipv4_address'] = '{0}/{1}'.format(currip['Address'], cidr) retval['mac_address'] = netcfg['MACAddress'] - hasgateway = _mask_to_cidr(currip['Gateway']) + hasgateway = _mask_to_cidr(currip['Gateway']) if currip['Gateway'] else None retval['ipv4_gateway'] = currip['Gateway'] if hasgateway else None retval['ipv4_configuration'] = currip['AddressOrigin'] tagged = netcfg.get('VLAN', {}).get('VLANEnable', False) @@ -1486,7 +1487,7 @@ def get_update_status(self): return self.oem.get_update_status() - def update_firmware(self, file, data=None, progress=None, bank=None): + def update_firmware(self, file, data=None, progress=None, bank=None, otherfields=()): """Send file to BMC to perform firmware update :param filename: The filename to upload to the target BMC @@ -1498,7 +1499,7 @@ """ if progress is None: progress = lambda x: True - return self.oem.update_firmware(file, data, progress, bank) + return self.oem.update_firmware(file, data, progress, bank, otherfields) def get_diagnostic_data(self, savefile, progress=None, autosuffix=False): if os.path.exists(savefile) and not os.path.isdir(savefile): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyghmi-1.6.16/pyghmi/redfish/oem/ami/megarac.py new/pyghmi-1.6.17/pyghmi/redfish/oem/ami/megarac.py --- old/pyghmi-1.6.16/pyghmi/redfish/oem/ami/megarac.py 2026-04-24 19:47:21.000000000 +0200 +++ new/pyghmi-1.6.17/pyghmi/redfish/oem/ami/megarac.py 2026-06-10 15:06:51.000000000 +0200 @@ -13,6 +13,9 @@ # limitations under the License. import pyghmi.redfish.oem.generic as generic +import pyghmi.util.webclient as webclient +from urllib.parse import urlencode +import pyghmi.exceptions as pygexc class OEMHandler(generic.OEMHandler): @@ -28,3 +31,77 @@ sysurl = system['@odata.id'] break self._varsysurl = sysurl + self._wc = None + self.bmc = webclient.thehost + self._certverify = webclient._certverify + + def reseat_bay(self, bay): + if bay != -1: + raise pygexc.UnsupportedFunctionality( + 'This is not an enclosure manager') + + self._do_web_request('/redfish/v1/Chassis/Chassis_0/Actions/Oem/NvidiaChassis.AuxPowerReset', { + "ResetType": "AuxPowerCycle" + }) + + def format_messages(self, response): + msgs = response.get('Messages', []) + msgents = [] + for msg in msgs: + msgents.append(self.format_message(msg)) + for msg in response.get('Oem', {}).get('Ami', {}).get('HMCMessages', []): + msgents.append(self.format_messages(msg)) + return ';'.join(msgents) + + def update_firmware(self, filename, data=None, progress=None, bank=None, otherfields=()): + self._do_web_request('/redfish/v1/UpdateService', { + "Oem": { + "AMIUpdateService": { + "@odata.type": "#AMIUpdateService.v1_0_0.AMIUpdateService", + "PreserveConfiguration": { + "Syslog": True, + "NTP": True, + "Network": True, + "Authentication": True, + "EXTLOG": True, + "FRU": True, + "IPMI": True, + "KVM": True, + "REDFISH": True, + "SDR": False, + "SEL": True, + "SNMP": True, + "SSH": True, + "WEB": True + } + }}}, method='PATCH', etag='*') + return super(OEMHandler, self).update_firmware(filename, data=data, progress=progress, bank=bank, otherfields=otherfields) + + @property + def wc(self): + self.fwid = None + if self._wc: + rsp, status = self._wc.grab_json_response_with_status( + '/api/chassis-status') + if status == 200: + return self._wc + authdata = { + 'username': self.username, + 'password': self.password, + } + wc = webclient.SecureHTTPConnection(self.bmc, 443, + verifycallback=self._certverify, + timeout=180) + wc.set_header('Content-Type', 'application/x-www-form-urlencoded') + rsp, status = wc.grab_json_response_with_status( + '/api/session', urlencode(authdata)) + + if status < 200 or status >= 300: + raise Exception('Error establishing web session') + if 'CSRFToken' in rsp: + self.csrftok = rsp['CSRFToken'] + wc.set_header('X-CSRFTOKEN', self.csrftok) + self._wc = wc + return wc + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyghmi-1.6.16/pyghmi/redfish/oem/generic.py new/pyghmi-1.6.17/pyghmi/redfish/oem/generic.py --- old/pyghmi-1.6.16/pyghmi/redfish/oem/generic.py 2026-04-24 19:47:21.000000000 +0200 +++ new/pyghmi-1.6.17/pyghmi/redfish/oem/generic.py 2026-06-10 15:06:51.000000000 +0200 @@ -107,6 +107,7 @@ 'net': 'Pxe', 'network': 'Pxe', 'pxe': 'Pxe', + 'http': 'UefiHttp', 'hd': 'Hdd', 'usb': 'Usb', 'cd': 'Cd', @@ -129,6 +130,7 @@ 'Pxe': 'network', 'Usb': 'usb', 'SDCard': 'sdcard', + 'UefiHttp': 'http', } @@ -658,7 +660,7 @@ procfound = True summary['badreadings'].append(SensorReading(cinfo)) if not procfound: - procinfo = fishclient.sysinfo['ProcessorSummary'] + procinfo = fishclient.sysinfo.get('ProcessorSummary', {}) procinfo['Name'] = 'Processors' summary['badreadings'].append(SensorReading(procinfo)) memsumstatus = fishclient.sysinfo.get( @@ -736,6 +738,10 @@ raise exc.InvalidParameterValue('Unsupported device %s' % repr(bootdev)) bootdev = boot_devices_write.get(bootdev, bootdev) + if bootdev == 'UefiHttp': + allowvals = fishclient.sysinfo.get('Boot', {}).get('[email protected]', []) + if bootdev not in allowvals: + bootdev = 'Pxe' if bootdev == 'None': payload = {'Boot': {'BootSourceOverrideEnabled': 'Disabled'}} else: @@ -746,13 +752,15 @@ }} if uefiboot is not None: uefiboot = 'UEFI' if uefiboot else 'Legacy' - payload['BootSourceOverrideMode'] = uefiboot + payload['Boot']['BootSourceOverrideMode'] = uefiboot try: - fishclient._do_web_request(self.sysurl, payload, - method='PATCH') + fishclient._do_web_request(fishclient.sysurl, payload, + method='PATCH', etag='*') return {'bootdev': reqbootdev} except Exception: - del payload['BootSourceOverrideMode'] + del payload['Boot']['BootSourceOverrideMode'] + else: + payload['Boot']['BootSourceOverrideMode'] = 'UEFI' #thetag = fishclient.sysinfo.get('@odata.etag', None) fishclient._do_web_request(fishclient.sysurl, payload, method='PATCH', etag='*') # thetag) @@ -1393,7 +1401,7 @@ usd, upurl, ismultipart = self.retrieve_firmware_upload_url() try: uploadthread = webclient.FileUploader( - self.webclient, upurl, filename, data, formwrap=ismultipart, + self.webclient, upurl, filename, data, formname='UpdateFile', formwrap=ismultipart, excepterror=False, otherfields=otherfields) uploadthread.start() wc = self.webclient @@ -1427,7 +1435,17 @@ rsp = json.loads(uploadthread.rsp) monitorurl = rsp['@odata.id'] return self.monitor_update_progress(monitorurl, progress) - + + def format_message(self, msg): + try: + return '{}: {}'.format(msg.get('MessageSeverity', msg['Severity']), msg['Message']) + except Exception: + return repr(msg) + + def format_messages(self, response): + msgs = response.get('Messages', []) + return ';'.join(self.format_message(x) for x in msgs) + def monitor_update_progress(self, monitorurl, progress): complete = False phase = "apply" @@ -1452,12 +1470,10 @@ state = pgress[statetype] if state in ('Cancelled', 'Exception', 'Interrupted', 'Suspended'): - raise Exception( - json.dumps(json.dumps(pgress['Messages']))) + + raise Exception(self.format_messages(pgress)) if 'PercentComplete' in pgress: pct = float(pgress['PercentComplete']) - else: - print(repr(pgress)) complete = state == 'Completed' progress({'phase': phase, 'progress': pct}) if complete: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyghmi-1.6.16/pyghmi/redfish/oem/lenovo/tsma.py new/pyghmi-1.6.17/pyghmi/redfish/oem/lenovo/tsma.py --- old/pyghmi-1.6.16/pyghmi/redfish/oem/lenovo/tsma.py 2026-04-24 19:47:21.000000000 +0200 +++ new/pyghmi-1.6.17/pyghmi/redfish/oem/lenovo/tsma.py 2026-06-10 15:06:51.000000000 +0200 @@ -437,7 +437,7 @@ self._wc = wc return wc - def update_firmware(self, filename, data=None, progress=None, bank=None): + def update_firmware(self, filename, data=None, progress=None, bank=None, otherfields=None): wc = self.wc wc.set_header('Content-Type', 'application/json') basefilename = os.path.basename(filename) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyghmi-1.6.16/pyghmi/redfish/oem/lenovo/xcc.py new/pyghmi-1.6.17/pyghmi/redfish/oem/lenovo/xcc.py --- old/pyghmi-1.6.16/pyghmi/redfish/oem/lenovo/xcc.py 2026-04-24 19:47:21.000000000 +0200 +++ new/pyghmi-1.6.17/pyghmi/redfish/oem/lenovo/xcc.py 2026-06-10 15:06:51.000000000 +0200 @@ -1286,7 +1286,7 @@ if progress: progress({'phase': 'complete'}) - def redfish_update_firmware(self, usd, filename, data, progress, bank): + def redfish_update_firmware(self, usd, filename, data, progress, bank, otherfields): if usd['HttpPushUriTargetsBusy']: raise pygexc.TemporaryError('Cannot run multtiple updates to ' 'same target concurrently') @@ -1400,13 +1400,13 @@ '/redfish/v1/UpdateService', {'HttpPushUriTargets': []}, method='PATCH') - def update_firmware(self, filename, data=None, progress=None, bank=None): + def update_firmware(self, filename, data=None, progress=None, bank=None, otherfields=None): result = None usd = self._do_web_request('/redfish/v1/UpdateService') rfishurl = usd.get('HttpPushUri', None) if rfishurl: return self.redfish_update_firmware( - usd, filename, data, progress, bank) + usd, filename, data, progress, bank, otherfields) if self.updating: raise pygexc.TemporaryError('Cannot run multiple updates to same ' 'target concurrently') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyghmi-1.6.16/pyghmi.egg-info/PKG-INFO new/pyghmi-1.6.17/pyghmi.egg-info/PKG-INFO --- old/pyghmi-1.6.16/pyghmi.egg-info/PKG-INFO 2026-04-24 19:48:07.000000000 +0200 +++ new/pyghmi-1.6.17/pyghmi.egg-info/PKG-INFO 2026-06-10 15:07:20.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: pyghmi -Version: 1.6.16 +Version: 1.6.17 Summary: Python General Hardware Management Initiative (IPMI and others) Home-page: http://github.com/openstack/pyghmi/ Author: Jarrod Johnson diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyghmi-1.6.16/pyghmi.egg-info/pbr.json new/pyghmi-1.6.17/pyghmi.egg-info/pbr.json --- old/pyghmi-1.6.16/pyghmi.egg-info/pbr.json 2026-04-24 19:48:07.000000000 +0200 +++ new/pyghmi-1.6.17/pyghmi.egg-info/pbr.json 2026-06-10 15:07:20.000000000 +0200 @@ -1 +1 @@ -{"git_version": "244ef8d", "is_release": true} \ No newline at end of file +{"git_version": "9ed5eea", "is_release": true} \ No newline at end of file
