2
0
mirror of https://opendev.org/x/pyghmi synced 2025-02-09 23:34:11 +00:00

1318 Commits

Author SHA1 Message Date
Jarrod Johnson
b67912283c Fix typo in error message
Change-Id: I90eb675f253b7499600a333de7e962468e8c69f9
1.5.64
2023-10-13 10:19:41 -04:00
Jarrod Johnson
3c5b03c35f Filter out DPU from systems collection if ambiguous
DPUs may manifest in a Systems collection.

If the caller does not specify sysurl, they are almost certainly wanting
to manage the 'main' system,
not an adapter.

Provide for this expectation by
retrying the collection with DPU
filtered out,
so that if there's exactly one non-DPU
system, then it will still be functional.

Change-Id: I300c47245111121440ae0f037d202b074407c45d
2023-10-02 08:58:24 -04:00
Jarrod Johnson
8ac115a8a7 Restore sane timeout behavior to pyghmi
The change to make sure resources are freed replaced straightforward
message with a weird one.  In the well known context, put the well known
message back in the reasonable path.

Change-Id: Iea17b8bbb7b14255debb05a90d5701f320b5d705
2023-09-20 15:20:49 -04:00
Zuul
b2f46dfdae Merge "Provide generic redfish push update support" 1.5.63 2023-08-24 20:23:13 +00:00
Jarrod Johnson
75fbe74cc1 Provide generic redfish push update support
Avail ourselves of generic redfish push
update support, now that
we have had a few other redfish implementations
to see that it in fact does work genericly.

Change-Id: Id68f5774fba973c6c9b24047d89a3ef6ae90dff3
2023-08-24 15:44:50 -04:00
Jarrod Johnson
6c55b39c28 Return empty tuple rather than None
The ntp_servers is supposed to always return
an iterable, fix to be compliant.

Change-Id: I52b3c377a1ed2f4c1134699ad9e0f4f592c65c33
2023-08-16 08:13:41 -04:00
Jarrod Johnson
a7afc5b0e5 Expect timeout on reseat
When doing a reseat, the target will tend to unplug
itself before a reply.

In such a scenario, be optimistic about the result.

Change-Id: Iae3aac15b48990e04dacabf94dd9149e9c0c1387
1.5.62
2023-07-27 15:59:17 -04:00
Jarrod Johnson
9c84b8ad50 Reset seek on unwrapped zip
If the zip payload is passed through
as-is, then make sure to seek if
the filehandle is open.

Change-Id: I04702da72d63b4edd7841e1b4f55704a92522ba9
2023-07-27 15:19:15 -04:00
Jarrod Johnson
b1a693a0e7 Prefer first PCI device id
The 'base' device id in a multi-function
device may be considered to be the first,
rather than the last.

Change-Id: I4f39b81fb0225b4221aeffc108c12388cf7a7ea1
2023-07-27 14:10:52 -04:00
Jarrod Johnson
7a3eb593d1 Provide error checking using XCC hints
The XCC provides hints as to the valid
format of open ended text.

Apply this as a sanity check before accepting a changeset.

Change-Id: I4a97a5a85e4de69fa13894a46dca568cda447705
2023-07-27 11:32:51 -04:00
Jarrod Johnson
7b62d693c7 Handle unseekable data
We may be given a file-like
that cannot seek.
For example, older 'ZipFileExt'
did not have tell/seek.

For such cases, fallback to memory
hungary behavior of using a BytesIO to
provide a trackable
upload.

Change-Id: I401e2fcc7369f31d0d413909854c8d9224b02023
2023-07-27 10:02:00 -04:00
Jarrod Johnson
85f5c7699b Fix capitilazation consistency
IPMI and redfish had different capitalization, change to be consistent.

Change-Id: I75c4cd597156e7282b10bd52bdaef83a3928cae2
2023-07-27 08:16:48 -04:00
Jarrod Johnson
212f0df227 Trigger unwrapping only with singular update
A compound update may contain multiple updates with
json directions on processing.

Activate uxz unwrapping only
with singular payload that ends
in uxz.

Change-Id: I5fb3d158a33f696a7e2fb5143e703de4c9408e7a
2023-07-26 15:29:18 -04:00
Jarrod Johnson
e2f15bde4d Apply uxz payload rather than whole zip to XCC
XCC updates are now wrapped in .zip for newer platforms,
however the XCC is more robust at handling uxz.

Change-Id: I90d70ab167e44737bc785e4ed88b9f9890a545a7
2023-07-26 13:12:18 -04:00
Jarrod Johnson
9a307a0c4e Implement XCC override for health in redfish
Change-Id: I9bc720e9e10501219aaaa8ea00d22bccabfaffce
2023-07-24 15:40:11 -04:00
Jarrod Johnson
0c5ca9fcdf Avoid error on unexpected shutdown
SMM may reboot at any moment without warning after
finishing an update.

Assume good news if this should happen.

Change-Id: I841780bad9f9ca49b0fbc7c58652e569a3c0a638
2023-07-20 14:55:23 -04:00
Jarrod Johnson
c0927c9f2e Add missing class to generic redfish support
Change-Id: I4d9c2cb163ba0f8f3e4b1c878b1dec26ae8f7422
2023-07-20 08:30:24 -04:00
Jarrod Johnson
ec1720c862 Correct missing lookup in generic OEM redfish
Change-Id: I61efe187ee314ade91a05513d0fe55c614d98e25
2023-07-19 15:14:40 -04:00
Jarrod Johnson
63956d35cb Prepare redfish for OEM health
OEM providers may provide better/faster health
information.

Allow the override, similar to how override is allowed for ipmi.

This paves the way for some more consistent health data as well as doing better than the redfish
health model, which has some gaps.

Change-Id: Ibb237ca10f724f9f8e54d3a446496d8b13234e5a
2023-07-19 10:56:48 -04:00
Jarrod Johnson
5f522fe66b Add deduplicated events and let XCC events control entirely
The event messages may convey more
specific information.  The generic IPMI may
be too vague to know where to proceed next.

Change-Id: I6e0ce8a34d741fa8d4c6c975212f6845755b4f9b
2023-06-02 15:20:17 -04:00
Jarrod Johnson
ab53a6cc3b Fix compatibility with python2
Change-Id: I8dba48cd9724467227c50cfeba7baa96b6e5970f
2023-05-26 11:45:24 -04:00
Jarrod Johnson
ee9c06138b Clear any logonwaiters on broken
A session being marked broken may
maintain a hold on logonwaiters.

Clear those out in
the process of marking it broken

Change-Id: I6e1ad7f34cd541863e8663cc6fed66ab90d6bf95
2023-04-19 10:28:13 -04:00
Jarrod Johnson
78cb1e9e1a Handle non-numeric with 0 number format
The spec declares that if reading type is not threshold and no thresholds declared,
then '0' means the same as '3'.

Change-Id: I1f02ad27af4f2dad286387ed6aa0bdbcc1475fcf
2023-04-17 11:24:06 -04:00
Vlad Spoiala
537fccb8d7 Follow state of validate job when updating firmware.
On v3 systems a job is created to handle the last part of the
firmware update process when using Redfish to update the firmware.
Follow the state of that job for the 'validating' phase.

Change-Id: I0a294b687f4e7665684239239cc2f37ca9c76f0c
1.5.61
2023-04-11 09:39:19 +02:00
Jarrod Johnson
d0718a1566 Handle FRU with blank mac area
Some FRU may omit this feature

Change-Id: Ie76aaf4bfc1af42951d4c2dc433f1d41e8303c7d
2023-04-05 09:58:07 -04:00
Jarrod Johnson
077dbd645b Stage alternate power meter support
It may be redundant with SDR
sensors, but stage it for
easier access should it come up
as a needed approach.

Change-Id: I765bbcbcc6c916da2573008bf53f2e88a2a35baa
2023-03-24 16:29:02 -04:00
Vlad Spoiala
bcfbd8f1c5 Avoid doing extra AddNewVolWithNaAsync calls.
Using a trial and error method to determine the format of
AddNewVolWithNaAsync causes issues on some server models. When
repeatedly deleting and creating the RAID array on Cyborg with
CDI3A2U XCC firmware we occasionally see hanged web sessions and
on rare occasions an incorrectly formatted AddNewVolWithNaAsync
call will return success and not create the array.
To reduce the number of AddNewVolWithNaAsync calls we determine
when GetDefaultVolProp requires the extra controller slot number
argument and in this case we directly use the
AddNewVolWithNaAsync call with the extra controller type argument
as these 2 changes go hand in hand in the XCC firmware. This logic
reduces the amount of AddNewVolWithNaAsync calls by one and the
issues described above can no longer be observed.

Change-Id: Icdaa5ef0fb5629ad965e37cbbecdcf892f6e315f
1.5.60
2023-03-23 10:22:19 +02:00
Vlad Spoiala
65c66422e4 Update storage code to handle 2023 XCC FW.
Change-Id: I2a9d086b9fa792bb37e04ca93d2e18ef94bedabb
2023-03-21 19:53:37 +02:00
Jarrod Johnson
1757bcaca7 Fix for newer SMMv2 firmware
Power policy command has
changed.  Settings
are now relegated
to the last two bytes,
with status for the first two.

Change-Id: I6505d99fef357d7e2023b7393ad9ef8920b620c7
2023-03-15 08:58:45 -04:00
Jarrod Johnson
bb46b94eab Specify wildcard etag during set_bootdevice
The request is sufficiently specific that we
do not care about the larger state of the
resource.  Explicitly declare this by
indicating a wildcard etag.

Change-Id: Ie0529ffea63516bf025f4ce146e39df40bcc768d
1.5.59
2023-03-06 15:55:18 -05:00
Vlad Spoiala
14652e8d84 Add check_storage_configuration to Redfish code.
Change-Id: Id604fdeb19e4dd571f6bad4e9b29276dc7001587
1.5.58
2023-02-21 18:10:05 +02:00
Jarrod Johnson
66e47992a7 Add xClarity Update Manager to firmware
Firmware versions should include the update manager
environment.

Change-Id: Idaf1da439145850185963030fe83dcbd31267fe6
2023-02-17 12:36:17 -05:00
Jarrod Johnson
44733d19b0 Add retry logic to web fetch
While UEFI configuration is always handy,
reads to the IMM section may
require wait and retry.

Change-Id: I7fe97124897fca6e928c3699171bfbe676d699e1
2023-02-08 09:47:34 -05:00
Jarrod Johnson
e4a48e9072 Add decode of DDR5 SPD
New systems have DDR5 ram, and a new
SPD specification to describe them

Change-Id: I06b0b3128b2ebd517cfb0fdda413e806fc939b43
2023-02-07 16:37:30 -05:00
Jarrod Johnson
a3e1595c7e Correct variable name in set_net6_configuration
Change-Id: I93d1f484b7a6cc7b24ebb3209866c5e984a8a1d2
2023-01-31 15:02:22 -05:00
Jarrod Johnson
4c27c21d33 Fix missing attribute on redfish command objects
Change-Id: I429abc1bf3784607c8a4f2f7b688f2285ca9a711
2023-01-31 14:14:01 -05:00
Jarrod Johnson
c6520d56ff Correct the Purley check for config
In the ipmi path, provide a null
dictionary to make the check
viable, and stop assuming that
an unknown system is always purley.

Change-Id: I13f7a9f70d83e5679d90acb83e0df1522f441f41
2023-01-30 15:00:26 -05:00
Jarrod Johnson
79b894c9f5 Allow fast setting retrieval for Purley
While it must not be used with redfish,
it is ok to use the fast path even though
setting requires IPMI.

Change-Id: I57de25e0ed0bb125adab42916429eca1e29f2392
2023-01-24 10:59:56 -05:00
Jarrod Johnson
25a04fd87b Support non-PCI adapter firmware inventory
There are non-PCI adapters that are modeled as 'adapter',
but without corresponding adapter data.

The inventory data is more limited, but we can at least report current
firmware.

Change-Id: I42d17befe1f95fde3b88304418743f1ac456eedd
2023-01-24 10:20:34 -05:00
Jarrod Johnson
7b5e641635 Avoid using broken UEFI configuration on Purley
Purley has a partial implementation, must avoid trying to
use it.

Change-Id: I4291f425bf49b746f07d1204fbf89d650d3308b3
1.5.57
2023-01-17 09:15:33 -05:00
Vlad Spoiala
4a064e7cc6 Fix fnmatch import.
Change-Id: I0256149c169a1f15a4956795f65562d6d3fd5034
2023-01-16 19:03:40 +02:00
Jarrod Johnson
e2b91a240d Add IPv6 configuration for redfish and IPMI
Add basic static configuration hooks
for now.

Change-Id: I754f4cec7127ea9a03bf9101a6a4732eae88d583
2023-01-13 09:56:25 -05:00
Jarrod Johnson
5422e523c2 Validate fapm data availability before use of fapm
Some platforms do not offer fapm data, but offer a successful result
anyway.

Change-Id: I637411148a3f7e4628cc1edcd1712739438102c9
1.5.56
2022-12-13 15:32:48 -05:00
Jarrod Johnson
f94a79a821 Leave Purley generation on the IPMI path
Purley has an incomplete redfish implementation for uefi settings,
blacklist it from the new way of pushing settings.

Reading settings seems fine, however.

Change-Id: Ie8baf50e11b05e2cafa644c414970ceeaaa35dbf
1.5.55
2022-12-01 11:40:26 -05:00
Jarrod Johnson
d669fb33db Fix expectation of return on bmc reset
Change-Id: I59f0b2dff2792ea704ebd7457f1874e050dfc618
2022-12-01 10:20:39 -05:00
Jarrod Johnson
fc9d92da73 Add support for custom role names
While IPMI has well defined
roles and redfish has some well-defined
starter roles, permit management
of users for custom roles.

Change-Id: Id6ff87a8ccbb12491adc37b460765d4eadf2c92d
2022-11-30 15:52:28 -05:00
Jarrod Johnson
2a525bb1e6 Do not expect a reply to bmc reset
Some devices will never reply, be optimistic about the
reset making it through the network

Change-Id: I912dab9c25d4041e2e8b1b1db8dc9d26d5830ea0
2022-11-30 11:26:56 -05:00
Jarrod Johnson
0eef3fcfba Use Lenovo OEM system configuration
For newer systems, provide access
to the richer configuration in
the proprietary Lenovo interface.

Fall back for standard for older platforms that still require IPMI
for that configuration.

Change-Id: Id66515f00116ce3c22fcba80c0003cfb9e6b1a5d
1.5.54
2022-10-31 17:00:13 -04:00
Jarrod Johnson
79ac63f409 Refactor system configuration management to OEM
Permit OEM override of the standard redfish BIOS attribute
mechanism

Change-Id: I26e63d12ed830fb7747fc5786c0c9be955671de0
2022-10-31 15:38:08 -04:00
Zuul
c78d1883e3 Merge "Add support for HTTP access to system configuration" 2022-10-31 17:00:50 +00:00