2
0
mirror of https://opendev.org/x/pyghmi synced 2025-02-07 14:23:39 +00:00

1031 Commits

Author SHA1 Message Date
Jarrod Johnson
1314c4cb22 Revise strategy for configuration robustness
This has negligible performance impact, but
may confer the same benefit as the slow
workaround done before.

Change-Id: I400646ea1004b21ec381867dab09589e5ee209ed
1.5.22
2021-02-03 08:59:20 -05:00
Jarrod Johnson
6542e7cc20 Slow down setting configuration
Problems may occur if setting configuration in
a script and multiple transactions are attempted
back to back.

Also, it can be confusing to set settings and then readback the old settings.

Address both concerns by only returning from
set when the transaction manifests in the data
returned from the peer system.

Change-Id: I93f360e0e2a3360bed460534bb924df1472d2bfb
2021-02-01 18:50:23 -05:00
Jarrod Johnson
3cfee6d2f2 Add usb alias for floppy and usb for redfish
Particularly in redfish, there is a distinction made
from 'floppy', and some implementations do not implement
floppy correctly.

Change-Id: I983d4ba94579a850b36786f04cbe03af3fce8de2
2021-02-01 08:52:09 -05:00
Jarrod Johnson
ed58cc0d00 Preserve the entire svcdata filename on autoname
Support may want all the data in the filename
that they are accustomed to.

Change-Id: I3c77e10c319c7199be9723c0a13719c96bfb6cca
2021-01-29 14:04:58 -05:00
Zuul
2823ba9a72 Merge "Reconfigure tox" 2021-01-29 17:02:27 +00:00
Riccardo Pittau
16b62119d7 Reconfigure tox
Update minversion of tox to 3.9.0 to allow inline comments.

Add skipsdist and ignore_basepython_conflict for better compatibility
and to use correct python version when specified.

Move pep8 test requirements to tox.ini for easier management and update
requirement versions.

Fix a small typo found with new pep8 deps.

Add py27 constraints file for Python 2.7 tox jobs.

Use wallaby jobs.

Remove lower-constraints (it was not used anyway).

Fix docs job

Change-Id: I1132814a86b46a154b3a8eed5bc3e73ad7950589
2021-01-29 15:36:11 +00:00
Jarrod Johnson
45c82c66b0 Disable retry on cleanup logout
It may occur that the exit logout could get hung
up for one reason or another. Change to opportunistically
trying to logout.

It would have to fail generally around 3 times within a minute
for it to be a problem, so it is unlikely to ever
be a problem should it fail.

Change-Id: Ie32b2ae03618fe078e3965d9ee68dda962206bfe
2021-01-29 08:36:16 -05:00
Jarrod Johnson
9251418f56 Improve robustness of IPMI config for XMM/XCC
Request more forgiving timing for the write filehandle,
and also do not raise error on closing a purged filehandle.

Change-Id: I2a8274f5e2e5b651d8b062433030e75a2bd608eb
2021-01-27 13:15:33 -05:00
Zuul
3a27b3b7fa Merge "Add support for pass complexity and lockout" 1.5.21 2021-01-25 13:33:37 +00:00
Jarrod Johnson
2cfd4a5dce Add support for pass complexity and lockout
The TSM implements these two policies, make them configurable
through the bmc configuration like other Lenovo equipment

Change-Id: Ia5f4a5902af39795394ad4d096ff2c8123a59e0e
2021-01-22 16:43:06 -05:00
Jarrod Johnson
a19f88faf8 Fix SMM account rule retrieval
This check was never updated for Py3

Change-Id: I9cf3ae2e1c366bb4f4ca75cfc69f651863a5f720
2021-01-22 15:44:09 -05:00
Jarrod Johnson
7f1852aa0a Fix py3 bytes mismatch for fromstring
Input comes in as bytes, we need to use bytes
to match.

Change-Id: I73730940569cd2647458ea9ed9401a9488bd9078
2021-01-22 12:45:03 -05:00
Zuul
5db7eebe57 Merge "Mitigate possible XML denial of service" 2021-01-22 14:46:03 +00:00
Jarrod Johnson
22d0489c73 Mitigate possible XML denial of service
None of the XML interfaces we would work with
use !ENTITY, filter it out for more safety.

Change-Id: If1296f5fcfd0d81cd19e8f309a0a11593fe37c22
2021-01-21 19:47:34 -05:00
Jarrod Johnson
e44f309d93 Add DNS configuration of TSMA
This exposes DNS configuration as 'bmc configuration',
which is in line with how they manifest in XCC.

Change-Id: If8cc3ffd76dd1f245c177032ceb1483892952873
2021-01-21 17:11:36 -05:00
Jarrod Johnson
d99e29cd57 Add NTP support to TSMA
The TSMA code for SR635/SR655 now supports
manipulating NTP configuration.

Change-Id: I75885b6a1ea8ed7e751143fc7827b59d53101c12
2021-01-21 15:14:41 -05:00
Jarrod Johnson
dc7e23d324 Fix set_hostname on generic IPMI in Py3
Python3 has encoding requirements, be consistent with them.

Change-Id: I2388dd00f560b8ce29638c5e2c7622afddb7c50f
2021-01-21 12:42:07 -05:00
Zuul
e0d284b404 Merge "Add support for configuring write and read policies when creating a volume." 1.5.20 2021-01-20 16:17:13 +00:00
Jarrod Johnson
c680af66e8 Implement 'IPMI' value for smm setting
Lenovo v2 systems make IPMI optional on the
SMM, provide access to that setting in pyghmi.

Change-Id: I82eebae3639d9388bca3d8ba34e2951d7dd8b841
2021-01-20 08:46:18 -05:00
Vlad Spoiala
5c6fc13632 Add support for configuring write and read policies when creating a volume.
Change-Id: I752d54224afb0d75594bdf71a6dc1a7c27635b08
2021-01-20 15:02:17 +02:00
Jarrod Johnson
21ecd059bf Retry cached data retrieval on 401
Under certain strain, we may unexpectedly
be logged out. Counteract through a single
retry, which seems to overwhelmingly
mitigate the issue.

Change-Id: Ibf72959988a2c143e5479f82db777b39cfa4a9a2
2021-01-19 09:33:13 -05:00
Zuul
b6d95c4eef Merge "Fix XCC use of Redfish in OEM and python3" 2021-01-15 16:12:02 +00:00
Jarrod Johnson
d3de6116f8 Fix XCC use of Redfish in OEM and python3
base64 demands bytes input and puts bytes out, and
we need str in and str out.

Change-Id: I68ab89d63a4d9720e403154a0153cebfc492b4ad
2021-01-15 09:23:23 -05:00
Jarrod Johnson
52a4f281fe Support newer SMMv2 API for PSU
Newer SMM firmware supports 16 bit wide fields instead of 8,
use struct to unpack them to align with the 8-bit wide fields from
before.

Change-Id: I485fa1bc03eb1fd6eaf7f0e800ed2a46ae5ad1ed
2021-01-05 16:16:03 -05:00
Jarrod Johnson
7a2a016233 Fix redfish system config without dependencies
Some firmware has incomplete uefi configuration management,
have the dependency check disable when such a firmware
is encountered.

Change-Id: I08935c87a1c29d2ae2c318426dac16b411c38876
2021-01-04 09:34:08 -05:00
Zuul
8f1635f555 Merge "Fix support for 3DS DIMM capacity" 2020-12-10 22:21:15 +00:00
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
fc7589a9d8 Improve reliability of Lenovo config handling
Instruct the peer device to give a bit more time
to allow for longer idle before closing a file.

This permits operations to work more reliably
against many systems at once.

Change-Id: Ic7e7fa1dd934231bf967b9a82cbd041fb12db613
2020-12-08 16:22:31 -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