2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-13 11:17:47 +00:00

682 Commits

Author SHA1 Message Date
Jarrod Johnson
3b7d79c5fc Directly reference packages in pbr-free setup
Without pbr, the list has to be manually curated.
There is a setuptools directive that will work and
is used by pbr, but for now use the output with some
modules trimmed.

Change-Id: I772b7bef263639167b3b5c54bc7812e1e8acbaf6
2019-02-07 14:29:49 -05:00
Jarrod Johnson
1721f7b237 Fix typo in the setup.py template
The template for non-pbr builds had a mistake.

Change-Id: Ic79bf1dcbbe851c5664f95cf3cb26f3251d73b35
2019-02-07 10:55:04 -05:00
Zuul
06b8ab4193 Merge "Enable package builds without pbr" 2019-02-04 21:28:47 +00:00
Jarrod Johnson
40c546400e Enable package builds without pbr
There are some build environments we are being asked
to support that pbr does not.  A quick fallback
to handle such environments.

Change-Id: Ie5dac2555c73e80e4cf589932a18f31a530bdf65
2019-02-04 15:59:18 -05:00
Jarrod Johnson
4337179d7e Fix break handling in SOL
When the retry logic was moved to console, it exposed a problem with
the sol handler being called in the midst of transmitting without
clearing the pending payload, resulting in an infinite recursion
of sending the same break.

Resolve by using the common call to sendoutput to have it occur
only after the current head of pending output has been removed.

Change-Id: Iaae86a3bd870c1841530e200ef0f5780a5cc6993
2019-02-01 09:18:12 -05:00
Jarrod Johnson
2c901ac471 Enable SMM user for web access
SMM may not allow a new user to access web.  Make the user_access
extensible and use that to have web privilege follow the ipmi
privilege.

Change-Id: Ib08e0064b3fb402de833a159c471e28579520a5d
2019-01-31 14:12:30 -05:00
Jarrod Johnson
c0d8e2a12c Add UEFI/BIOS configuration to pyghmi redfish
Change-Id: Ie1a697eaf136f75007838d85bf877a262318fd5b
2019-01-28 16:43:44 -05:00
Jarrod Johnson
bd12cd646d Fix lenovo generic fallback
Wrong number of arguments are sent in such a case

Change-Id: Icbb56b8d3ef227e1a00baeedf236bf321841fabf
2019-01-25 09:54:32 -05:00
Jarrod Johnson
eccbf6193b Implement more robust handling of config.efi
XCC may be transiently unable to provide the UEFI configuration.
Implement a retry if the XCC reports that it does not exist.

Change-Id: If0d5f1136087d60b9f834f7970a59f0af61336c3
2019-01-24 10:09:17 -05:00
Jarrod Johnson
6d9a4b98d8 Ensure XCC health sets general level
In the event of an event that is not modeled by the IPMI sensors,
make sure that at least the health summary is correct.  Add in
a known condition that is missed by IPMI sensor modeling for detail
as well.

Change-Id: I207e137c49b4321cf4040188a84de569f55c5707
2019-01-23 10:24:52 -05:00
Jarrod Johnson
f4e3f62ef2 Reduce assertion of bootable media failure
This is almost always a false positive.

Change-Id: I7738f42dd903834f5388ac85d3f049fc95316fd6
2019-01-22 14:12:36 -05:00
Jarrod Johnson
cad67cf751 Add support for XCC License key management
XCC features are managed in keys, support management of those keys.

Change-Id: I10a1e55dd6705cebacb8c49c98f19491bdf9e2d0
2019-01-14 13:53:12 -05:00
Jarrod Johnson
534963553b Avoid stale webclient in XCC client
XCC aggressively ages out a session.  Check last
token refresh before deciding a session is viable,
discarding it if it is too old.

Change-Id: I490263edb4b2a8ddbd91d6b236d4a7e689f410c7
2019-01-11 16:32:46 -05:00
Jarrod Johnson
872f53ab0a Improve error on unexpected scenario
When doing a firmware update, a surprise flow leads to a potentially
misleading exception.  Change to be more clearly obvious that there
is confusion.

Change-Id: Ib9aa2c0f357daf5af0462062733c2c83c7e25079
2019-01-11 11:39:05 -05:00
Jarrod Johnson
7002c1e8f3 Refresh token during validation
XCC may take a while validating, and the token must be
refreshed to avoid chance of expiry.

Change-Id: I0e78008dba6bc214876ca286989b01d2f89733bb
2019-01-10 13:15:40 -05:00
Jarrod Johnson
520b7dbeca Add M.2 Drive Firmware
M.2 drive firmware is held in a different area in the API.  Provide
that data along non-M.2 drives.

Change-Id: I94b85687b2f22bc45d6e37c9da855f7bbd426c2f
2019-01-08 19:07:18 -05:00
Jarrod Johnson
9515a4f7e0 Add OEM support for XCC PSU information
The XCC provides more detailed information.  Augment the inventory
and firmware commands with this information.

Change-Id: Ib2cedc4176f18d82eea3a2a156ac3c7e5a16f3eb
2019-01-07 15:52:40 -05:00
Jarrod Johnson
b810b02b1e Begin redfish implementation in pyghmi
This provides support for the redfish standard.

Change-Id: If2115f612c0f7d352361c31ad1958c102b70b6fc
2019-01-02 15:55:20 -05:00
Jarrod Johnson
ebf33d40bf Restore support for old XCC update API
Oldest XCCs return different data to unsupported APIs, so
modify to support three variants, no return, return 2, and
the latest that require support for the return code.

Change-Id: I8d04cfffa42ff9b70bd4a19e32b353c0c7be5544
2018-12-14 08:07:30 -05:00
Jarrod Johnson
db7f1490f5 Support newer FPC CSRF scheme
CSRF scheme was refactored in recent FPC firmware, support the third
location where the CSRF tokens might be found.

Change-Id: I0a3a9310e399f77d2a40f4b9d815127b9a884d1d
2018-12-12 15:59:59 -05:00
Jarrod Johnson
da5e602cb0 Add support to persist SDR cache to file
This allows a project to persist the frequently expensive SDR
cache run to run.

Change-Id: I8208edec3178fb229db0572b17f4b161ca6d8d1d
2018-12-12 09:28:27 -05:00
Zuul
0cf4cd467b Merge "Share SDR repository info" 2018-12-11 21:13:43 +00:00
Jarrod Johnson
f2a8753a99 Share SDR repository info
This avoids having to fetch SDR for every since instance when
many instances have common SDR.  This improves first-run performance
and reduces memory consumption.

Change-Id: I1283297b8f4635e096af962fa1a49d4c752e80ec
2018-12-11 15:39:32 -05:00
Jarrod Johnson
871316c967 Correct mistake with refactoring JSON calls
The arguments were incorrect.

Change-Id: If1738c6d877b72bf71b28a643042ad3542de9866
2018-12-11 08:52:08 -05:00
Jarrod Johnson
1dc3844ea8 Support empty successful scenario
redfish has a concept of 'no news is good news', and firmware is
changing to use that.  Support both old and new behavior.

Change-Id: I1b85359ee1236c7ad5f26b67640415839ad1073b
2018-12-10 13:37:27 -05:00
Jarrod Johnson
58108b2e5d Fix omission in new API
Do not report a problem on verifystate==1.

Change-Id: I38470f3c0c9b621f45248c0302e562ec33ccd554
2018-12-10 08:27:26 -05:00
Jarrod Johnson
bff08bbe60 Support upcoming XCC update API
Upcoming XCC firmware update has an additional step to support in
order to successfully perform an update.

Change-Id: I08e1fccd25d40b290bbd818bdb57ef74131e76f7
2018-12-07 16:43:52 -05:00
Jarrod Johnson
4f74d4c4f9 Allow SMM downgrade
Call API to allow downgrades when going to apply firmware.

Change-Id: I7953929ef5cb2aa410feeb7dba9d679d5c8ced6b
2018-12-06 15:10:32 -05:00
Jarrod Johnson
3bf7fc543f Fix formatting of SMM/FPC version
The SMM/FPC standard format is 0 padded.  Implement
this in pyghmi.

Change-Id: I21a58678968e7129278bf1fb3ffeb8391e07a4e8
2018-12-05 15:20:21 -05:00
Jarrod Johnson
40a1600f3e Add FPC/SMM description
The get_description call will now help describe the height of current
Lenovo dense portfolio chassis.

Change-Id: I7d7f53b71360f3e2227c08a06cac03ac0d407210
2018-11-14 14:30:13 -05:00
Jarrod Johnson
84924a1f5c Fix python3 incompatibilities
The python3 http support has some differences from python2.  Provide
compatibility for both python 2 and python 3.

Change-Id: Idb8d5815b0a540fc7ae4183bd033a2725d889930
2018-10-30 14:42:01 -04:00
Jarrod Johnson
2367c85f25 Preserve logout on storage failure
If the storage call should fail, carry on logic to allow the situation
to clean out.

Change-Id: I325c0870bdc2ff358ed872697c15b5963ca836a0
1.2.16
2018-10-26 15:44:57 -04:00
Jarrod Johnson
a7db8615aa Fix storage deletion
When multiple controllers are present, it is required to
specify the controller number.

Change-Id: Iab8e7a44c1bcdb65c682c2cd9b9629206300ecd1
2018-10-25 16:29:11 -04:00
Jarrod Johnson
c716dca665 Have storage functions log out of the session
The storage functions were not leaving the web
session viable after a time.  Correct by having
the storage functions logout on completion.

Change-Id: If0ccc40d0525de4a4f3690be478bd5fb0d7dcd3c
2018-10-16 10:09:11 -04:00
ghanshyam
dca0e4001c Gate fix: Cap hacking to avoid gate failure
hacking is not capped in g-r and it is in
blacklist for requirement as hacking new version
can break the gate jobs.

Hacking can break gate jobs because of various
reasons:
- There might be new rule addition in hacking
- Some rules becomes default from non-default
- Updates in pycodestyle etc

That was the main reason it was not added in g-r
auto sync also. Most of the project maintained the
compatible and cap the hacking version in
test-requirements.txt and update to new version when
project is ready. Bumping new version might need code
fix also on project side depends on what new in that
version.

If project does not have cap the hacking version then,
there is possibility of gate failure whenever new hacking
version is released by QA team.

Example of such failure in recent release of hacking 1.1.0
- http://lists.openstack.org/pipermail/openstack-dev/2018-May/130282.html

Change-Id: I5f17ec6f67c7e7addfc5b2b2a3f17719402d9c0b
2018-10-16 11:43:37 +00:00
Jarrod Johnson
78cbbb4ee5 Handle response without unconfiguredDisk
Some adapters do not provide this information explicitly.  Handle
this discrepency by defaulting to an empty list.

Change-Id: I72c2e83a78c821e1d790972b253e9d7026a5f7ad
2018-10-15 16:11:30 -04:00
Jarrod Johnson
d28955e3ef Fix early life mark_broken call
If mark_broken called early, it would incorrectly
fail due to self.socket not existing yet.  Address
this by ensuring the attribute exists earlier and
ignoring the pool accounting if socket is not yet
assigned.

Additionally, fix a problem where the callback for
console could happen before console actually had
the ipmi_session attribute.

Change-Id: Idb93ca23d4a43760698bdc55d19418210daa7a62
2018-10-12 15:17:48 -04:00
Jarrod Johnson
d3fbe9c06c Prefer more specific IMM/XCC check over FPC check
There exists one set of FPCs and IMMs that share id.  Compensate
by using the more direct IMM query first, then falling back
to the fpc id based.

Change-Id: Ibbaea1ffce6e5903523a8467280d168bb080daee
2018-10-12 10:02:53 -04:00
Jarrod Johnson
c0acd75fe1 Fix the mistake in last nights fix
Change-Id: I5af26ca21d6d641b665acebec12ca0552f2faa8e
2018-10-12 09:29:29 -04:00
Jarrod Johnson
4972f01246 Clear lastpayload explicitly in some contexts
It was detected that sometimes lastpayload could get 'stuck',
with no facility to clear it

Change-Id: I0fc0753373233a817926f33c9623b3b5be93b59f
2018-10-11 19:09:00 -04:00
Jarrod Johnson
82e015edb2 Retry OEM lookup if no specific OEM identified
Some devices might experience a problem returning a useful response to
get device id under certain circumstance.  Make failures due to
inability to lock into a device id transient rather than persistent.

Change-Id: Ie11155632c1a627a1c3303555a6ba10926c7efb0
2018-10-10 10:42:53 -04:00
Jarrod Johnson
ba1fc32e76 Fix event data for slot events
Slot events should generically have the Slot/Connector number.
Fix this by clarifying the description and allowing it
for any offset.  Additionally, the USB offset defined in
the spec is added.

Change-Id: I80dcb86ae58f47b794eab1571c292708edf83995
2018-09-28 11:11:31 -04:00
Jarrod Johnson
4a99f18023 Fix typo in error message
The word unavailable was misspelled.

Change-Id: I53ac5b32f803aad0ffc5e24ce573e5437846a703
2018-09-26 10:51:13 -04:00
Jarrod Johnson
cf1f0c25e6 Add 'name' subfield to preserve original names.
For inventory taking, the lack of common names for the same thing
is a problem.  Provide a 'name' field to preserve the original
name that may be duplicate, but indicate multiple instances
of the same thing.

Change-Id: I02e9902f4c2d9d07982fd00b9a17617b96deb1ef
2018-09-07 14:34:11 -04:00
Jarrod Johnson
c87bdf7cef Enrich inventory data on Lenovo IMM/XCC equipment
Fix some data lost in XCC, and flesh out more info, including
info on generic cards.

Change-Id: I810fdaa3f399b0236dfb7e60d4cbd6764248b513
2018-09-06 15:16:06 -04:00
Jarrod Johnson
e5d70b22da Provide 'hardware' inventory for disks
Rework the disk inventory to handle both firmware and hardware
style data, at least for XCC generation.

Change-Id: I195ab395b8f1905f548094bc5014200fb3a39e2a
2018-09-05 10:03:07 -04:00
Jarrod Johnson
576a5f1729 Accept wildcards for settings names
For some settings, it is very helpful to be able to take wildcards.
Honor those and have those potentially replicate across multiple
matches.

Change-Id: I9ebfb2a4686b5f822527be9b05b59ca9df1e3caf
2018-08-30 10:21:30 -04:00
Jarrod Johnson
f9d784f417 Provide feedback if the clear system config attempt fails
Also extend webclient to generically hold on to last error.

Change-Id: Ied9452927260e22708faf4105a2ed3cafe1a6f46
2018-08-30 09:46:12 -04:00
Jarrod Johnson
552609114c Add method to clear system configuration
Reset to factory defaults is a relatively common request, provide
an extensible hook.  Use the standard redfish method on current systems.

Change-Id: I92a17a7434eeab0d8f455cf609ca2db764fe4a17
2018-08-29 15:14:45 -04:00
Jarrod Johnson
dd1dfdb7d5 Fix bay number from IMM property in nextscale chassis
The property is ASCII representation of decimal number that would result
from erroneously evaluating BCD as normal.  Compensate by working back
to the hexadecimal representation and presenting that as a number.

Change-Id: I47ae2fe484c2eaaa4c103eae81c56f9561ac316c
2018-08-29 09:07:00 -04:00