2
0
mirror of https://opendev.org/x/pyghmi synced 2025-02-05 13:32:48 +00:00

1004 Commits

Author SHA1 Message Date
Jarrod Johnson
a01cdc54b3 Fix support for 3DS DIMM capacity
3DS dimms must have logical ranks by modifying ranks
with data from byte 6.

Change-Id: If1fe788302cac07998ca841851c645c8e4694b65
2020-12-10 15:51:32 -05:00
Jarrod Johnson
d61f6d5e6e Switch to faster EFI decompressor
The pure python EFI decompressor was extraordinarily
slow. Dramatically improve performance by switching to
the C version of the function.

Change-Id: Ib931d46a4b5b4937cb8dfc3d37bfa63b92e84ead
2020-12-08 12:54:20 -05:00
Jarrod Johnson
22133c4aca Have TSM use redfish only when needed
TSM only needs to use redfish for UEFI
configuration when used as an IPMI 'extension'.
Restrict use to avoid depending on redfish
when not needed.

Change-Id: I72aece79dc1814124a4a06b48c3266853af9a14e
2020-12-04 08:38:54 -05:00
Jarrod Johnson
dac9f7486a Extend IMM remote media
The classical remote media was incomplete and
further needed fixes for IPv6 web sessions.

Change-Id: Idfa1c06c69c96fdd10fce755fc7d73ebd12ee399
1.5.19
2020-10-26 15:20:13 -04:00
Jarrod Johnson
a976525a53 Workaround IMM header problems
When using IPv6 to IMMv2, the web will reject the fe80::

Set fake 1.2.3.4 headers to always give a pleasant and consistent
result to the IMM.

Change-Id: I56e738841269f24fe1968f77d7a3aa492f6bee23
2020-10-24 11:13:49 -04:00
Jarrod Johnson
ae09f17332 Fix problem with TSM
SMMv2 changes broke TSM inventory.

Change-Id: If8742364c10476adeab49551e9e836aacee1a3c8
2020-10-22 12:05:31 -04:00
Jarrod Johnson
26e2ccdf89 Fix problem with older IBM equipment and python3
Older IBM system path still used a python2-only operation.
Address with a python 2/3 agnostic approach.

Change-Id: I33df26a0b2311682642660a5e0893201b547fb03
2020-10-19 12:32:41 -04:00
Zuul
8265c9dbe7 Merge "Support SMMv2 permission check format" 2020-10-08 18:16:31 +00:00
Jarrod Johnson
e9231cbfad Support SMMv2 permission check format
Change-Id: I3126e5fd6b34a7b74e506772b3dbd377609fb13f
2020-10-08 12:26:50 -04:00
Jarrod Johnson
43d5fc5177 Support SMMv2 variation
SMMv2 is coming and it tweaks some commands to an extent.
Recognize and adapt to the SMM2 variations on the SMM.

Change-Id: I27932158e13fdc1eef302b73f1a931394575eb5a
2020-10-01 13:24:00 -04:00
Jarrod Johnson
2dd0d1e4d2 Fix software sensor data
Software sensors are not in the SDR, and
the owner ID is used to distinguish them.
Incorporate the owner ID to qualify
the sensors.

Change-Id: I984eaab21fd992bfd9bf8eda4e22943f9812a104
1.5.18
2020-09-09 09:04:38 -04:00
Jarrod Johnson
39ed56e94e Fix more SMM issues
Change-Id: I2bed3815ccd4290ddedee4f2266437f84b9696bf
1.5.17
2020-08-21 13:10:59 -04:00
Jarrod Johnson
45c04fce95 Fix NTP configuration of FPC/SMM with py3
Under pythton3, we have another case of one
thing defaulting to bytes and a str. Explicitly
decode from utf8 in such a case.

Change-Id: Icbf6ad375e6398d12656ab4ddc8d0f248fe1cc73
2020-08-21 10:46:27 -04:00
Jarrod Johnson
d0ae49fdf5 Add Cascade Lake OEM sensor to sdr
This allows sane interpretation of a commonly
asserted oem sensor.

Change-Id: I29c1f13bb0039e9eb005dd2b8a55ce8ee1362647
2020-08-18 13:20:12 -04:00
Jarrod Johnson
01b75d78c4 Amend refererer
XCC can struggle with link local addresses. Simplify by just using a
static fake name so that XCC treats
it like maybe some unknown
/etc/hosts entry on the client.

Change-Id: I1c6dc9d3eb86ae876c24441a924bcff4720b53ac
2020-08-05 08:27:09 -04:00
Zuul
51608edee9 Merge "Fix compatibility with FPC for PSU cfg" 2020-08-04 21:15:13 +00:00
Jarrod Johnson
f5d5cdf720 Fix the referer for ipv6
When using ipv6, use [] to denote the address
portion

Change-Id: Ib6ffd2d0c98ab33a5f8b825300543c600f4f5a17
2020-08-04 14:23:12 -04:00
Jarrod Johnson
20f964b9ca Add referer to XCC OEM behaviors
Some XCC firmware depends upon Referer,
thus we set it to an appropriate value.

Change-Id: I7b8ad46363c41377c315db745fdf6b2bd434b3f4
2020-07-30 09:15:29 -04:00
Jarrod Johnson
34a1158732 Fix compatibility with FPC for PSU cfg
PSU configuration was SMM specific, change
to use FPC v. SMM format as needed for this
difference between the two platforms.

Change-Id: Id8f7e2597ca5e867bd0e63dccff35f1cea99a30f
2020-07-28 07:18:48 -04:00
Jarrod Johnson
997e7da2fc Fix FPC configuration support
Change-Id: I6fa71a46954824a45c69bbe692f3001e3643b930
1.5.16
2020-07-27 12:48:01 -04:00
Jarrod Johnson
a30193a974 Coerce to str if bytes in python 3
Nextscale code received bytes but needed str.

Change-Id: Ie2951e9689fb7db1c9ff09d04a96acf0b779d638
2020-07-22 11:58:19 -04:00
Zuul
2f6c3430c6 Merge "Closes-Bug: 1887953" 2020-07-20 20:20:01 +00:00
Logan Blyth
dc98520469 Closes-Bug: 1887953
Change-Id: I057ce1cdf978f6e965e3f7a37950b01a51d7349c
2020-07-20 15:44:36 -04:00
Jarrod Johnson
eb1070462a In python2, we must change to bytes explicitly.
While python 3 is ok, with using a bytearray slice,
for pythton2 we have to explicitly make it bytes.

Change-Id: I7ba4f466d398892715b72695818b09d1cf57a794
2020-07-20 14:50:56 -04:00
Jarrod Johnson
ba05b8f883 Fix python3 issues with FPC interaction
Change-Id: I9ba8a15c07bf1ff03fc5c77ad6dfb5bd8c2693a6
2020-07-17 10:12:31 -04:00
Jarrod Johnson
ff67fc30b6 Add smm_ip setting to XCC devices under IPMI
This will give read-only view to the SMM ip address
when asking the XCC for an smm_ip setting

Change-Id: I40a14d6f27943fc8b18fa18b800e3f8679083f57
2020-07-08 16:12:26 -04:00
Jarrod Johnson
3c1c6edf39 Support newer storage api
Newer XCC firmware changes
the storage API, support the newer api.

Change-Id: I6740fab59098ae825be5f23c5eb28cbf2e85968f
1.5.15
2020-06-22 14:06:17 -04:00
Jarrod Johnson
3150bb8930 Add dateutil requirement for python2 users
python3 pulled in dateutil, but python2 did not

Change-Id: I3006928d21bcae7a34b8cdb1530e1e72733c862a
2020-06-22 10:13:54 -04:00
Jarrod Johnson
583e8418d3 Do not swallow TSM errors
Raise TSM ffdc download errors
if they should occur.

Change-Id: I431f4942164866aec6ffba01c7c4f4c10156f101
2020-06-09 09:32:50 -04:00
Jarrod Johnson
5918fd4c3a Tolerate variant of TSMA without sys OEM
If no OEM element in the sysinfo, check the manager.

Change-Id: I038ae3edcb82acebd33805723f18e1181b3d3d52
2020-06-05 09:21:17 -04:00
Jarrod Johnson
bb0516af93 Fix setting passwords in python3
python3 str/byte differences strike again,
use python2/3 consistent form to fix.

Change-Id: Ia3cb4c900d7f2ceffd4e0e2bfc7cfca487af5721
2020-06-03 13:58:04 -04:00
Zuul
2e6a1d0910 Merge "A redfish device with no OEM should be generic" 2020-06-03 14:50:47 +00:00
Jarrod Johnson
e0b06fe39a A redfish device with no OEM should be generic
Fix the fallback lookup to avoid a stack trace.

Change-Id: Iee2b0891a91687cf13d74936161f548da49c3a6a
2020-06-03 08:55:21 -04:00
Jarrod Johnson
d5621700e9 Ignore 'fault' light for info-only events
There is no action to take for information-only events.

Change-Id: I41b021cb85c7e031bc857808c465895606bda68a
2020-06-03 08:54:10 -04:00
Jarrod Johnson
60f31bb671 Add dateutil dependency
While confluent does pull in dateutil, pyghmi
itself depends upon it, so it should pull it in
as well.

Change-Id: I3af963f14451bf6efac0c74981c6644df9950d05
2020-06-03 07:37:34 -04:00
Jarrod Johnson
9441b9ec79 Fix RDOC upload of large images
Large images take some time before
they can be mounted. Track
the size field to see when the
file is actually done copying.

Change-Id: I23c921798d6be4370e7314822d37fba1cb9faad3
2020-05-22 17:46:50 -04:00
Riccardo Pittau
a5129fbdb3 Update pep8 import order check
Set flake8-import-order version to 0.17.1
Full py3 compatible version.
Add all Python3 modules to stdlib list.

Change-Id: I3ef01e49c0e6822368146434f056ac7a1aa7ce4d
2020-05-11 14:08:17 +02:00
Jarrod Johnson
17d1b79a57 Fix python3 compatibility with older IBM
Older IBM tripped over a problem in energy manager
due to a bytes value not prepended with b.

Change-Id: I81cb68805ddaf5c4ae79eafb08fa4c27672945f2
1.5.14
2020-04-17 13:14:46 -04:00
Jarrod Johnson
2165dfde72 Support newer XCC firmware raid
Newer XCC firmware alters the
API for storage.  Support both
new and old API.

Change-Id: I97e6a7f4c85ab0361758c5328084145cc87d97f5
2020-04-17 10:25:32 -04:00
Jarrod Johnson
ee57e7229d Retry on etag change
During the course of applying
configuration changes, the pending set
may change for some reason.

Repeat the logic if etag triggers an exception.

Change-Id: I3783b4ba45dd0dd57fdd3af80af16223e39fce05
2020-04-16 09:05:23 -04:00
Jarrod Johnson
749189d843 Improve redfish errors and identify
For redfish, store the MessageId
for programattic processing.

For identify, use wildcard for
the identify etag.  While an implementation required
etag for set identify, it permitted wildcard.

It doesn't matter to check etag on something as trivial as
LED control, so just wildcard it.

Change-Id: If3cf600e46f38858551c5f744388a57393b45123
2020-04-15 11:03:10 -04:00
Jarrod Johnson
6d3c032312 Fix KCS on python 2
In python2, cannot directly copy a memoryview to a ctypes
string.  Catch and try with a copy of the memoryview
data for python2.

Change-Id: I6dc0183921e4e888aca131fe7968d820b25dc5d5
2020-04-07 08:52:51 -04:00
Jarrod Johnson
92f1ed7b7d Disable OEM on KCS
When using KCS, OEM extensions are not going
to work well.  For now, disable such extensions.

Change-Id: Ic9668ec00906382f4aba94eff0b33ff270869d6b
2020-04-06 09:16:29 -04:00
Jarrod Johnson
ec3411b492 Fix localsession for python2
Commands without data were causing problems
for python2 ctypes interface.  Skip the
copy attempt when there is no data to
copy.

Change-Id: If115a1145c277992aa4ffbe420a582dc08d0926e
2020-04-02 08:09:02 -04:00
Jarrod Johnson
5391281a7e Give up on etag checking for log clear
Some firmware just gives etags that are random and useless
for guarding log clear.

Change-Id: I16ed712e012f9d5b0092fb3224618cf146e480c8
2020-03-30 18:32:05 -04:00
Zuul
bb2e8a24fc Merge "Bump hacking to 3.0.0" 2020-03-30 15:41:36 +00:00
Riccardo Pittau
b76d3b3cd2 Bump hacking to 3.0.0
The new version enables a lot of standard flake8 checks, so a few
fixes are required. W503 is disabled as it conflicts with W504
and the latter seems to be preferred nowadays.

Change-Id: I0d2fa8c88f081d553ebefb5f764397b2761dc2b5
2020-03-30 16:33:49 +02:00
Jarrod Johnson
1ae0ddcf29 Fix SEL sensor id with LUN
With support for non-zero LUN,
update portions of event log
to be consistent.  PET does not
seem to have LUN in the data,
so for the time being just assume 0 there.

Change-Id: I24b6b27f81fe1c24a516d28788a2c0efc2f9ccbb
2020-03-30 10:22:47 -04:00
Jarrod Johnson
72b092f449 Filter out disabled sensors
When get sensor reading says
a sensor is disabled without
also saying it is unavailable,
mark it as unavailable.

Change-Id: I00c61824f3539373b48223da9b37acfed97f6576
2020-03-27 14:49:02 -04:00
Jarrod Johnson
85b2b6e5ab Fix endless loop with log clear attempt in redfish
Some redfish implementations endlessly mutate
their etag.  This makes it impossible to
fully establish atomicity.

Move the logic as much server side as possible.
There is still a window where entries change
between fetching the entries and the loginfo,
but there is little hope.

Change-Id: I9135b96acf82f06bc8622efb4d53d0bc695d1758
2020-03-26 10:21:39 -04:00