2
0
mirror of https://opendev.org/x/pyghmi synced 2026-01-09 17:52:30 +00:00

1447 Commits

Author SHA1 Message Date
Jarrod Johnson
8ccf30f54b Remove six dependency
Change-Id: I0b1578a7c0083d78f864fb21bcd33ac2955a52d5
1.6.11
2025-12-10 11:14:55 -05:00
Jarrod Johnson
072e9a2867 Bail if number of max RDOC already met
For XCC systems, 2 is an imposed maxmum,
detect and abort if this is seen.

Change-Id: I17e0b0916d098a4e14a30e8379766aa53f7a9517
1.6.10
2025-12-09 16:20:31 -05:00
Jarrod Johnson
dc929c9e51 Change multipart boundary
While base64 should generate a valid boundary, some implementations balk at /.

Change to urlsafe alphabet.

Also, technically our boundary was potentially too big depending on readings of standards, reduce so that under any reading we are less than 70 characteres even including added '--' characters.

Change-Id: Id887a03eeb63a8d2bef000ae5e7365d269349906
2025-12-09 15:18:34 -05:00
Jarrod Johnson
fe7a1dbfe7 Avoid media upload to duplicate target
When uploading, check if filename already in use.

Change-Id: Ia0d2bc163e6c143facad61df110808c8184ea210
1.6.9
2025-12-08 16:17:16 -05:00
Jarrod Johnson
6a148fab5f Add AMI to oem modules
Change-Id: I9a19ba279ea790b68339dbfa94deee0e268ded6a
1.6.8
2025-12-04 10:25:11 -05:00
Jarrod Johnson
35d5642d09 Handle systems that model portions as distinct 'Systems' members.
Particularly with HGX systems, it's common to have the GPU subsystem modeled as a somewhat independent entity.

There may be duplication but there's no way to tell, programatically, what things are duplicate or not.

Change-Id: I1b7678800982e012371a004d15bbe9f3b79ac00d
2025-12-04 10:02:12 -05:00
Jarrod Johnson
d5ce67d08a Add recognition of AMI convention of 'Self'
Recognize that in an ambiguous situation, that AMI considers 'Self' to
be 'the' primary element of systems and managers collections.

Change-Id: Ia33fb2b8da357c08b3cf5ce1e5a8550846215a06
2025-12-02 14:04:49 -05:00
Jarrod Johnson
9a2edebea5 Filter out UEFI boot certificates for BMC certificate candidates
Change-Id: Idf836b6d675e429879b164085ff2db84780754fc
1.6.7
2025-10-31 08:45:37 -04:00
Jarrod Johnson
fab4d8e700 Manage BMC certificates
Provide means to get a CSR and install a certificate.

Further, update the webclient to use
python 3.3+ mechanisms, as newest
python removes the compatibility with the old way.

Change-Id: I79ca9408920687cbb56bde5b01a01d166c0a3c02
2025-10-29 16:31:27 -04:00
Jarrod Johnson
3a3734fea8 Handle missing dependencies in a redfish dependency map
If a redfish dependency map has a bug,
then just decline to attempt the requested
override, as we can't make a reasonable evaluation.

Change-Id: I2f5c3ba1627add6ea0ff7b5363b1ccdd05396b48
2025-10-21 16:03:37 -04:00
Jarrod Johnson
bbebfd9b7e Clear likely modified URLs from cache
Change-Id: Id44b60112e87021bebe9695e298f499a13f4e657
1.6.6
2025-10-15 10:08:20 -04:00
Jarrod Johnson
bea7af51e7 Add Manager CA management
Some Managers provide
a mechanism to manipulate certificate authorities.

Wire this up with some function calls.

Change-Id: I035eeea92ccc80c0163677cf8b8e679c11141bab
2025-10-10 07:42:37 -04:00
Jarrod Johnson
33e6212152 Tolerate failure retrieving logs
Some redfish implementations
advertise non-existant logs,
or logs that only exist under certain conditions.

Note these logs and move on.

Change-Id: Id6e39ef53a8882e6e9a6435ab0904f06499ab0bb
2025-10-08 14:01:57 -04:00
Jarrod Johnson
077204c508 Restore generic fallback
When trying for an
early BMC handler,
we can't get bmcinfo sanely.

For now, skip that check
since the generic check only helps
if the managers and systems are ambiguous.

Change-Id: I767ffbf4e0d9dbe5a727a5141124957c89407a82
2025-10-08 11:27:02 -04:00
Jarrod Johnson
7b6c703c9f Enhancements for multi-system, multi-manager
Allow OEMs to describe the 'core'
system and manager.

In systems that start manifesting components as
managers and systems in their own right,
allow OEM to indicate which is the 'real' one.

Usually, extra Managers and Systems are something that
has been modeled as such, but from a usual user perspective are not
what they would consider BMCs
and systems.

Change-Id: Ib04e146a7fb0e988dac94c148005e07e2b487b12
2025-10-08 09:03:36 -04:00
Zuul
e0174b79bc Merge "Make storage layer information retrieval a bit more robust" 2025-10-08 11:54:36 +00:00
Andrei Machedon
b3d08c048b Make storage layer information retrieval a bit more robust
- Sometimes, probably because of FW version, controllers do not have
  'LocationType' key and it can be retrieved also from 'ServiceLabel'
key which usually exists
- Standardize VROC controller by associating slot id 0 to it
- Do not consider 'Direct attached NVME' drives as available for any
  RAID creation

Change-Id: I9edecc846283c64bbcfca18b983e9276795ccec6
2025-10-08 13:21:30 +03:00
Jarrod Johnson
1dd3ad2d63 Add vlan id to net configuration
Allow query and changing of vlan tag

Change-Id: I4e1767993336e579fee6d74a6714b3a843869b2a
2025-10-06 17:20:06 -04:00
Jarrod Johnson
984e7859a7 Enhance vague error messages
Certain scenarios resulted in blank
errors during failure.  Provide a fallback
that preserves some amount of information.

Change-Id: Ib08f3a602f2133d04662ec45c7caf90477ffbb70
2025-09-09 09:12:40 -04:00
Jarrod Johnson
3077140991 Normalize components to a set
Change-Id: Ib7bc0901a120a0e8eec1b6d6366eb56582bdf457
2025-09-03 10:50:34 -04:00
Jarrod Johnson
d482baedfd Initialize variables for disk/adapter fetch
Change-Id: I792f8bfce34822692020b220814ad8e2569313bd
2025-08-30 10:26:35 -04:00
Jarrod Johnson
a79ba0abc7 Implement firmware fetch categories
This is a cleaner way to model categories, and use
the categories to help optimize XCC fetch of
data by category.

Change-Id: I91131d946671b0ac97732ed34a419fe56e0dd0b8
2025-08-29 17:14:19 -04:00
Jarrod Johnson
f56e000a66 Attempt better redfish account deletion
Better redfish implementations offer the sane option of just deleting
the account, try that before trying to hack our way out of a bad implementation.

Change-Id: Icb97a0ae18bdafd3fed3528f5eee6ed6ba40cdac
1.6.5
2025-08-15 16:40:25 -04:00
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