2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-31 05:17:39 +00:00

1058 Commits

Author SHA1 Message Date
Jarrod Johnson
78ec0388b2 Reduce average memory of XCC Uefi configuration
The fwo object is fairly large and worth disposing of
when stale, to recover the used memory.

Change-Id: Ic8c003087f61dfd5005b1e73118e6a88209d4097
2021-04-06 09:30:07 -04:00
Jarrod Johnson
0e038cfa12 Remove 2.7 from test
It seems to be not well supported in the test pipeline anywhere.

Change-Id: I931dfdb80bdf348e785b62cce26d7ad5e54e9372
2021-04-05 16:56:16 -04:00
Zuul
5e123f677f Merge "Tolerate spec deviations" 2021-03-26 22:23:33 +00:00
Jarrod Johnson
deb2c6af47 Tolerate spec deviations
There are some popular Redfish implementations
that violate the standard. More gracefully
tolerate the violations.

Change-Id: I52d1bb21a812c8c721a6ee0888dd92b80944fd65
2021-03-26 16:47:30 -04:00
Jarrod Johnson
5494bf50e3 Fix relog attempt
While it would manage to send the first packet of a
relog, it would then go on to report the transient
error.

Change-Id: I9eb39290ffd259fe56c5d923a7ee9ed229f9f6e1
2021-03-26 16:42:27 -04:00
Jarrod Johnson
b4bc1c7245 Fix redfish FFDC name save with autosuffix
Use the code from the IPMI oem enhancer to
be consistent.

Change-Id: I81316bb65e20657e2c48cdec2dc44dc2b890f7ba
2021-03-24 15:27:23 -04:00
Zuul
e498364577 Merge "Fix SMMv2 ffdc download" 1.5.25 2021-03-23 18:33:52 +00:00
Jarrod Johnson
7448c5b256 Fix SMMv2 ffdc download
Change-Id: I6ed9eca50a82d989dcbd679d451dd13ce7833c99
2021-03-23 12:58:54 -04:00
Jarrod Johnson
f0b6160c99 Accept . for _ in redfish names
Prior to ODATA limitations, . was a common delimiter.
If a setting is a good match if substituting . instead
of _, go ahead and consider it a match.

Change-Id: I5da06464f34a1d0d7f4869312ef1c48fe2f858cc
2021-03-23 11:50:09 -04:00
Jarrod Johnson
ce333b3bfc Fix DHCP config logic on static input
Have static address and gateway both clarify
so that the DHCP logic does not get confused.

Change-Id: If1fa41e27c34694fc47d6a805c72ef6922ab38f4
2021-03-23 07:57:23 -04:00
Jarrod Johnson
f42d75ea9d Show LXPM bundle information for TSM
When used as IPMI oem handler, extend the
LXPM info since that is available through
IPMI at least.

Change-Id: Ib3b52b31040ab35c2766f2bbedcc540ae1be0768
1.5.24
2021-03-12 14:23:04 -05:00
Jarrod Johnson
24b3d61a40 Fix TSM LXPM handling
For one, check only basename for
filename conventions.

Secondly, recoginze fw_drv
files as being LXPM class.

Change-Id: I829e4fe0bf1c1eea2d7ec96c5e4aae9a64010a35
2021-03-12 10:45:12 -05:00
Jarrod Johnson
acf837e5ac Fix plain rom update of nextscale
When zipfile checks for zip signatures, it
does not guarantee seek position at end.

Seek to the beginning explicitly after zipfile
is done.

Change-Id: I13d053576ba12ae7cd668d96179c9f435d0fa751
2021-03-05 11:32:26 -05:00
Jarrod Johnson
86845c4e2b Add reseat to redfish command for XCC
This will allow XCC users doing redfish to reseat
using the HTTPS api.

Change-Id: Ib0582f4aafb20cd94972f2080df673fbd3abbab3
2021-03-03 15:23:25 -05:00
Jarrod Johnson
944a239205 Implement support for remote reseat
The v2 generation of Lenovo servers supports remote reseat
for rackmount servers. Expose this as reseating bay '-1'.

Change-Id: Ie6135c030cd5f56970ea9f968f5f5fda8e053341
2021-03-03 13:23:29 -05:00
Zuul
856675b599 Merge "Support passing file obj for media" 2021-03-02 21:58:16 +00:00
Jarrod Johnson
7c5dde9335 Support passing file obj for media
To be consistent with
the file object support, extend
the remote media upload
functions.

Change-Id: I9482644aa2cef032ea891c892e747304142f63df
2021-03-02 15:19:47 -05:00
Jarrod Johnson
f90afb5041 Fix data parameter for apply_license
If passing a file handle, correctly
pass it through to the oem handler.

Change-Id: I6686fe05c3ab7579edaa70a953d0db91ec7ef178
2021-03-02 14:44:33 -05:00
Jarrod Johnson
32f81a8cb8 Fix water cooled get_bmc_configuration
The fanspeed setting does not apply when there are no fans.

Skip querying that setting for environments where it does not exist.

Change-Id: I4343e263612150279c10fe79c4a25904210c4e10
1.5.23
2021-03-02 09:21:33 -05:00
Jarrod Johnson
fce6f12690 Have tsma support fileobject passing
Bring it up to parity with the XCC handling.

Change-Id: I93ce668dbc5baf569508f7d2c1a57499007f0c51
2021-03-01 10:58:41 -05:00
Jarrod Johnson
1b4005ee19 Apply license from file-like object
Allow passing pre-opened files to apply_license.

Change-Id: I83e0e5352b15ef1dc73f65a1a54d0fbe03f10b3a
2021-02-25 14:25:50 -05:00
Jarrod Johnson
ce19aa8034 Support updating from a file-like object
If passed a file-like object, be sure to use that
instead of trying to open filename directly.

Change-Id: I9ac28dc77aa5297ddf81d49cbd9d6cc2c07e74e6
2021-02-25 12:21:47 -05:00
Jarrod Johnson
cfceabaf78 Fix error on long apply phase
Some firmware takes a long time
to apply. Add token refresh to avoid the session
going bad during apply phase.

Change-Id: I9b40cb608adc235d49865a94bf4aef98ca0ac1bc
2021-02-24 13:31:33 -05:00
Jarrod Johnson
fb7c211983 Fix SMM ffdc behavior
The diagnostic data for SMM was not being handled
properly with the new autosuffix behavior.

Change-Id: I08828719ef23f8350d02572d94461e50775a3e19
2021-02-17 15:28:09 -05:00
Jarrod Johnson
bd247bbacc Add remote presence assertion to bmc config
For XCC class systems, expose the presence assertion as a setting

Change-Id: I2bae20c83647289fe5e08d9692875a9ce23906c6
2021-02-08 14:49:31 -05:00
Jarrod Johnson
964224e306 Port fast media list from XCC IPMI plugin
The redfish support may be unacceptably slow for
media list. Add an accelerator for that function in
the redfish oem extension as well.

Change-Id: I066e4e469b6b2a3d534e79cdc8bd061a12b10af0
2021-02-08 11:04:38 -05:00
Jarrod Johnson
619893b097 Move inventory to oem to allow override
Redfish is not the best at inventory. Afford OEM
extensions the ability to override and accelerate
inventory.

Accelerate XCC based systems with this facility.

Change-Id: I3b92961e661d44b4b0f35d497085fc68f76fdcf1
2021-02-05 16:22:10 -05:00
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