2
0
mirror of https://opendev.org/x/pyghmi synced 2026-01-11 02:32:31 +00:00

1424 Commits

Author SHA1 Message Date
Jarrod Johnson
99af22b694 Correct issue with multiple uploads of same file to distinct targets
The boundary randomization code failed to account for potential sharing,
producing a mismatch of headers and data.

Change-Id: I74de90b86edf6edd9a20ce07f7d277de75022413
1.6.4
2025-08-15 15:32:49 -04:00
Jarrod Johnson
131d71d788 Fix redfish account creation
Target the collection with a POST if uid does not exist, which
is the usual scenario of creating a new user.

Change-Id: Ib9b89e7ac6c65e9c48dc7aca656041c8a84eb5cd
2025-08-15 13:30:54 -04:00
Jarrod Johnson
a70194cd39 Fix SMM3 update process
First, break up the generic update into
distinct pieces.

For SMMv3, first supersede getting the upload url, as
multipart is advertised, but doesn't work, but simpleupdate (deprecated) works.

Then after upload,
switch to hard coded logic specific to SMMv3 to determine how to start the update and where to monitor results.

Then hand back over to generic to finish out monitoring.

Change-Id: I33b2e67603400b920aca4aa11047c11978c3c6f6
2025-08-13 12:49:20 -04:00
Jarrod Johnson
89d06043c5 Fix webclient upload
The os import was missing.

Further, the call to urandom creates a yield if monkey patched that may have _upbuffer not existing.

Change-Id: Ie8a1f17600df3fa21139430d39efbea2e9169bd9
2025-08-12 09:15:23 -04:00
Jarrod Johnson
514ec63d1b Fix BMC change handling in XCC3
Change-Id: I32e6fea282172690df3f529844ae71ec4a2f466e
2025-08-05 14:52:45 -04:00
Jarrod Johnson
58cf3ce085 Fixes to XCC3 module
- Fix a class cache to be instance level
- Update MAC address retrieval to handle multiple addresses and add support for InfiniBand port GUIDs.
- Have XCC3 manifest BMC setttings as extended BMC settings

Change-Id: I5d6551c19f073f5c0c871b54687b35355c7241ab
1.6.3
2025-08-05 09:23:01 -04:00
Jarrod Johnson
a39b4d3c9e Randomize boundary
Avoid potential for payload to predict and break up parameters.

Change-Id: Iff93287327c2ac9aa56e0ef26f1d60d59aee0306
2025-07-28 17:05:18 -04:00
Jarrod Johnson
3ebce04cfc Increase buffer size
In large environments doing massive requests, give
a better chance for the receive socket to retain data on
our behalf.

Change-Id: I54ef64f7dba19c167f2377164465ece2bc0210de
2025-07-01 15:48:50 -04:00
Andrei Machedon
6bf4e17b2a Translate non-XCC3 volume policies values to Redfish
Added check_storage_configuration method to ensure when storage configuration actions are possible (booted to setup or OS) and added translation for read/write policies and default initialization to make sure that software that worked for non-XCC3 works as intended on XCC3 also without any changes required by Redfish

Change-Id: I4d0809f561db0c280c39ae53a4daf3c3ea6fa88f
1.6.2
2025-06-25 15:16:38 +03:00
Jarrod Johnson
be7eedaf0f Rework the XCC3 changes
On inventory, remove the cpu/memory special functions
and revert to the generic.

For the rest, ensure that we stay with lower case in
contexts where we have established a lower case norm.

Change-Id: I732b7501158ddbef4b8170ac70b5ee259d5b8173
2025-05-27 15:26:26 -04:00
Andrei Machedon
36ddef3293 Add support for XCC3
Change-Id: I97a65ac20de444bedba5c6dc4a247bec985338dd
2025-05-23 09:52:20 +03:00
Jarrod Johnson
33cff21882 Switch to atomic fetch of password in serversession
Give an implementation a guarantee of atomic access
of the password so that something strange can't happen
between the initial check and actual use of the value.

Change-Id: I48ae5d8a9c3fb3fea5ec2deeb14fec39aac86ed8
1.6.1
2025-05-05 08:53:53 -04:00
Jarrod Johnson
3fada0442c Replace set_power manual call to grab_json_response
The manual call is more work and missing some common handling
like for the authentication token.

Change-Id: Ia9b3d8aec6a672a0fb2cf10cb4c81761892c9580
2025-04-30 11:24:38 -04:00
Jarrod Johnson
4826c58fb1 Add SMM3 identify light manipulation
The SMM3 owing to not having a 'System' places
identify in an Oem location.

Change-Id: I741991a92c701ff951eaff91f2e7d26a6211875d
2025-04-29 16:33:50 -04:00
Jarrod Johnson
4b5fbf55c2 Invalidate media cache an attach/detach
If we attach or detach, trigger uncached read
of potentially cached urls.

Change-Id: I85ae49cd83ca8053b971e5d79cae1fe2f098d7a5
1.6.0
2025-04-21 10:07:07 -04:00
Jarrod Johnson
e074eb1470 Prefer pkg_version
Use the pkg_version where available, it seems to match more.

Change-Id: Ib419539adff86334454bca838a970691604fc104
2025-04-17 15:58:27 -04:00
Jarrod Johnson
6ec04d585a Tolerate timeout on reseat
A server reseating itself will unplug itself potentially
before replying. Tolerate this and be optimistic and assume success.

Change-Id: Ic021cb539b59d1f6cf287033a1146151ced95eda
2025-04-16 16:15:18 -04:00
Jarrod Johnson
2bade4a2a7 Force token refresh on screenshot for XCC3
The screenshot call will return an error if used with
a stale xauth token. To be safe, just always refresh
the token, since this is never going to be a super fast
request anyway.

Change-Id: Icb06352a94f20eadc635656a2cd2827aeb55a214
2025-04-15 15:43:19 -04:00
Jarrod Johnson
ae19b05df4 Tolerate a few timeouts while trying to monitor an update
Very long lived updates may incur hundreds of status checks, and we need to
tolerate a few.

Change-Id: Id4347d0c854679cde60da42c4cf1921ef53e2a20
2025-04-15 09:12:22 -04:00
Jarrod Johnson
e87d8e334b Add pending FPGA version information for XCC3
When an FPGA is waiting, use OEM API call
to get the additional data.

Change-Id: I942694f109ebab7e51c3b33c885de16696b1ef8c
2025-04-11 15:33:23 -04:00
Jarrod Johnson
0a4201829a Reword the message again
Change-Id: Iaecee780c465a1f60c4eedae31498a7f4358d0c4
2025-04-10 16:07:24 -04:00
Jarrod Johnson
406f61715f Reword error message for clarity
Change-Id: Idc3c582023655782a21b2915fdd915ffc58636ad
2025-04-10 15:49:58 -04:00
Jarrod Johnson
056bd21394 Make a copy of changeset before fixup
If a retry occurs, the post-fixup changeset may fail
the validity checks, which are based on displayname
rather than name.

Make the underlying function make a dedicated copy before modification.

Change-Id: I9ead92a90dc102788f7e55945148405dda3d9397
2025-04-10 08:44:14 -04:00
Jarrod Johnson
c7aa9ebce6 Detect attempts to reset whole SMM3 chassis and reject
Change-Id: Id82f05e6b306653f314f1f94fce6d38f1c00073f
2025-04-09 16:34:27 -04:00
Jarrod Johnson
9a5b0ccce2 Provide specific error when querying a bad bay in sharedio
Change-Id: Id64fa502ac319d6671aaf15cf1cce927e3762d1a
2025-04-09 15:42:59 -04:00
Jarrod Johnson
afac5284ab Fallback to intense fixup of bad binary XML data
If the XML parser fails, attempt to replace binary data
to try again.

Change-Id: I659aec451b3ac596dc090c125939370bb251a62a
2025-04-08 18:17:50 -04:00
Jarrod Johnson
1a1e449965 Recognize and add thermal_log to XCC2
If an XCC refuses to FFDC due to missing thermal_log,
apply that parameter.

Change-Id: Iaf0c4884d8915b12253a20c78176d0320ed69358
2025-04-08 10:08:01 -04:00
Zuul
a9d393c229 Merge "Add get screenshot capability" 2025-04-05 17:46:25 +00:00
Jarrod Johnson
db29760efd Add get screenshot capability
This can get image files from the BMCs representing the current graphical console.

Change-Id: Ibe45e9584cb5445b92139bd563372180b630b219
2025-04-05 13:40:17 -04:00
Jarrod Johnson
0cedc68573 Report ready for more redfish update
Some services do not contain a Health attribute,
try to make do with the ServiceEnabled field.

Change-Id: I85f526dd0a2ebde56059980ca582a2c09de5e42b
2025-03-19 17:59:54 -04:00
Jarrod Johnson
b8e6a1f8ae Add facility to check update status
Firmware has mechanism to advertise the
health of the updateservice.  Provide this as a function.

Change-Id: Iaa1f2055bfea1eef3c8307a56a68098ce136fcb1
2025-03-19 15:29:31 -04:00
Jarrod Johnson
4e19aa985c Add facility for managing ikvm launch
Change-Id: I7db63b95d5740b3fa94ab70da0e7a4db56a5690c
2025-03-13 15:43:28 -04:00
Zuul
c392b76b37 Merge "Fix password epiration set in xcc3" 2025-03-06 20:19:49 +00:00
Jarrod Johnson
9128758502 Fix password epiration set in xcc3
Change-Id: Ifc534c97963127b60fdb7b153cf22e7f8c0ab401
2025-03-06 15:09:00 -05:00
Jarrod Johnson
c70cc5f6a5 Provide build id values for SMMV3 firmware
Provide an OEM method to get Oem data from firmware into
the normalized form, and use that to hook the SMM
firmware information.

Change-Id: I7028c510afebf103fb6e0aaabdf085de3472eef2
2025-03-04 09:06:13 -05:00
Jarrod Johnson
949cf8ea9b Catch more core firmware oddities in the firmware version fixup for XCC3
Change-Id: I4846444da464e3fdfc7352eb17bb8fe8ee632b63
2025-02-26 15:54:39 -05:00
Jarrod Johnson
dbeb5e0893 Fix SMMv3 model disploy in inventory
Change-Id: I41d6e2f5e37465085ad0d57e042d65bdbdbfd4be
2025-02-26 15:36:52 -05:00
Jarrod Johnson
94693b705e Add FFDC retrieval to SMM3
Change-Id: I59ed0828dc105d3fae2e47f253c3b101da366325
2025-02-25 15:31:39 -05:00
Jarrod Johnson
4bbf63c96b Fix numeric indexs into configuration
Settings may dictate the index, and we must preserve that.

Change-Id: Idd010e81013df26bcddb12f1654f259175e4dd70
1.5.77
2025-02-21 12:23:35 -05:00
Jarrod Johnson
345fd8b44e Handle redfish modeling of some IB adapters
IB adapters may be modeled with 'None' Ethernet elements.

Handle this and also check for InfiniBand instead.

Change-Id: I80b6769b3bb4c5f478cb48b261f5666dfd6a97e0
1.5.76
2025-02-07 15:15:48 -05:00
Jarrod Johnson
2cde74a34f Add XCC3 specific health check
The active events interface is more useful and informative than
generic redfish.

Change-Id: I20af532f32dfde1b596ac8c974ba1089705b5aae
2025-02-07 14:51:51 -05:00
Jarrod Johnson
2a91bb3f80 General fixup for sensor handling
Fixup more sensor scenarios.

Give OEM a mechanism to opt out of generic sensors. If, for example, the
platform is unreasonably slow at servicing the sensors.

Change-Id: Ie8668ac219fc5d90f95dd980ffecd73a09ddd0cd
2025-02-07 11:42:13 -05:00
Jarrod Johnson
d17eef9b2a Suspend use of token for remote media attach
Some implementations forcibly detach on token expiry,
switch to basic authentication to persist remote media mount.

Change-Id: I39231e257156c48a8b4f21ea73aa8fcdcfe879c2
2025-02-07 11:22:10 -05:00
Jarrod Johnson
8666417d61 Add standard NTP handling to redfish
Map the IPMI API to redfish behavior for generic redfish
manipulation.

Also, have the SMM3 handler explicitly indicate that system config
does not apply.

Change-Id: I1bbb16507b6e76bb460217c63d326c8e45155d89
1.5.75
2025-02-04 14:43:58 -05:00
Jarrod Johnson
7482692cdd Attempt to get half-working sysurl if broken
For identify, there are implementations with
partially broken system urls that are not good for general
operation, but are still the only target for identify.

Change-Id: I82f77e667974a57ee857082e6cbc98b78b818ccd
2025-02-04 14:08:03 -05:00
Jarrod Johnson
1bf95406b5 Handle inventory for systemless redfish endpoint
If an endpoint has no system, use chassis for data.

Further, for SMM3, do some fixup on 'Model' versus 'SKU'.

Change-Id: Ibf8d72381057d43f9ad59469078fd4899330c74f
2025-02-04 11:55:16 -05:00
Jarrod Johnson
5bb678229c Prefer generic sensors and handle system-less
When generic sensors are available, use them over the older,
more limited CPU and thermal data.

Also, if an endpoint has no viable system, allow sensors to
dig into chassis anyway, for enclosure type endpoints.

Change-Id: Ifd575797381801c60cff6e4dc2053f4e25002a15
2025-02-04 11:27:34 -05:00
Jarrod Johnson
1a6bfbdbf1 Relocate event log to oem, override for SMMv3
SMMv3 does something a bit peculiar, and to accomodate it,
provide a way for the OEM code to describe additional
log services not attached to the BMC resource.

Change-Id: I01a6ba50ac462840749eeb6b07400b66930beb1d
2025-02-04 09:51:52 -05:00
Jarrod Johnson
ca0b100fbb Add reseat for SMMv3
Add reseat functionality for SMMv3

Change-Id: I0c78ba2fe68a37ece5154601b22d26a09d22cc8b
2025-02-04 09:01:55 -05:00
Jarrod Johnson
8106eed782 Fix coordinate calculation for XCC3 in new DWC chassis
Change-Id: Ic4f9836b50f584d1616a3b2a9e9b9849cf7a5386
2025-01-30 10:04:59 -05:00