2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-15 04:07:48 +00:00

822 Commits

Author SHA1 Message Date
Jarrod Johnson
eb73628360 Support HMAC SHA256 in IPMI
While SHA1 is technically secure in an HMAC, some implementations
no longer allow it by default.  Try for SHA256, and if that should
fail, fallback to SHA1 for implementations lacking support.

Change-Id: I6380e042fbe959af4059e63a5620f6289263737c
1.4.0
2019-07-26 11:40:55 -04:00
Jarrod Johnson
f1e9ecf15c Fix event log date processing
Event log was incorrectly processing.

Change-Id: Ibaac463eb9ca537daa818ac60da1539f41e72c61
2019-07-25 14:39:13 -04:00
Jarrod Johnson
9d028dbde5 Add log_id to redfish logs
Since the get_event_log is combining the logs,
provide log_id for calling software to optionally
include to categorize.

Change-Id: Ifafc456b689eb76588ee1102bd7a2c4d9c639ac4
2019-07-25 13:21:32 -04:00
Zuul
2f961f6c5f Merge "Graceful error on no https in get_health" 2019-07-25 17:15:36 +00:00
Zuul
21504338a5 Merge "Provide get_event_log even when time unparseable" 2019-07-25 17:15:06 +00:00
Jarrod Johnson
ace29963d6 Graceful error on no https in get_health
Rather than timeout, provide a more informative
health message.

Change-Id: Ideb0d86c84a4e702ad38a4d5a1ac51c6e610b57d
2019-07-25 12:45:51 -04:00
Jarrod Johnson
a578d783f7 Provide get_event_log even when time unparseable
If a format that is not supported appears, at least
pass through the value.

Change-Id: I96d2ef6cb36bdfe9d993a3c046105589cd101000
2019-07-25 12:43:45 -04:00
Jarrod Johnson
4350b50afd Better error message on no License for XCC
The XCC manifests inadequate license in listing fewer slots.
Provide a more descriptive error message.

Change-Id: I27c77dfee700fc288af8bd5c6b7df65ec64616d1
2019-07-25 10:04:25 -04:00
Jarrod Johnson
142ff10cb2 Support setting BMC hostname in redfish
Provide write access to this currently read only property.

Change-Id: I4e4fb7dc836e6657add73205ec2a95977111ffe1
2019-07-22 15:06:17 -04:00
Jarrod Johnson
5860b3796a Fallback to direct ipv4addresses manipulation
A redfish implementation may forbid writing to it,
however others allow only writing to it.

Change-Id: If4e1f6a737cb6b1460d73cbe9faf30c18951f890
2019-07-22 13:42:37 -04:00
Jarrod Johnson
b6fb57dfa5 Relay errors on invalid licenses
License errors are now raised to the caller.

Change-Id: I0fc107525b4d009dfd6c7ad52ab356a9dcaac5c0
2019-07-22 11:12:19 -04:00
Jarrod Johnson
64b6c078d6 Fix memory health
Mem is an odata dictionary, fix by referencing the correct
element.

Change-Id: I6e90a5f0b689283019a09b4766257f294fbc1402
2019-07-19 16:02:39 -04:00
Jarrod Johnson
f26fc5401d Check XCC HTTP service health
If the service is unreachable, emit an error
explaining the situation more clearly.

Change-Id: I5cc04d7fbec31869e9248936718543e480e60e29
2019-07-19 15:16:42 -04:00
Jarrod Johnson
cfb50d0598 Change bmc restart type to graceful
Generally speaking, this is all BMCs know to do anyway.
Some make the distinction and refuse the Force variant,
so go for the Graceful.

Change-Id: I093261e46b8ce7305d8be9938e45579cfc367110
2019-07-10 13:41:22 -04:00
Jarrod Johnson
4097248917 Add user expiration info to redfish
Port forward the IPMI support.

Change-Id: Ic0d211d003001c0b1ef2ce5b275c513dcf9034e8
2019-07-09 13:22:46 -04:00
Jarrod Johnson
c832f63883 Add ability to retrieve user expiry
This allows a common piece of XCC information to be
provided.

Change-Id: Ia1f3aaa04acbcf30ecd58b9e037e21c427145282
2019-07-09 12:43:38 -04:00
Zuul
06cf9a89ee Merge "Try generic method for media attach" 2019-07-01 18:48:36 +00:00
Zuul
320d08df2e Merge "Support no-image media in list" 2019-07-01 18:46:46 +00:00
Jarrod Johnson
77daf6817e Try generic method for media attach
If OEM does not handle the mount, try a generic way instead.

Change-Id: I19ce70796d270f32718e1d41c01388afe9795a0d
2019-07-01 14:26:05 -04:00
Jarrod Johnson
ed590d518b Support no-image media in list
list_media will now use imagename when inserted
media is detected without an image.

Change-Id: I72126c99650671d50c6e57405314adc1f6c45e23
2019-07-01 14:21:16 -04:00
Jarrod Johnson
0d366f7ad5 Make roles case insensitive
Users are likely to botch the role
capitalization.  Accomodate that scenario.

Change-Id: Icc745526167909a71decc5ebfe626ba44d701493
2019-07-01 13:47:47 -04:00
Jarrod Johnson
ea676265a1 Fix set system configuration
The displaytoval mapping was not consulted,
resulting in incorrect values being
requested.

Change-Id: Iad88b7976f3f986009fcb939b68bbc7902204804
2019-06-28 11:24:27 -04:00
Zuul
e864f4fd19 Merge "Fix incorrect call to weblogout" 2019-06-25 20:32:54 +00:00
Jarrod Johnson
f9ec1deed4 Fix incorrect call to weblogout
In redfish path, this is not used.

Change-Id: Icc2048ad5ea0991cbdfe74f89deaee4631b0503c
2019-06-25 16:18:41 -04:00
Jarrod Johnson
1b58e5ea01 Carry Redfish error logic to oem
OEM will now relay the generic redfish errors when possible.

Change-Id: I31ac6cd9f2949e853e05b55f12d77341cee0d698
2019-06-25 16:07:15 -04:00
Zuul
771b1781c9 Merge "Fix typo in startswith call" 2019-06-21 19:32:49 +00:00
Jarrod Johnson
eee43aa6bc Fix typo in startswith call
Inadvertently checked in a typo.

Change-Id: Id8f303501da31eafa9d1415b36e9d4a49e3bd22d
2019-06-21 15:03:23 -04:00
Jarrod Johnson
06e2723fe0 Improve date parsing performance
strptime attempts are moderately
expensive.  Detect one common
scenario using quicker mechanisms.

Change-Id: Id9346678f7def12981417da4d2e6374f457967c5
2019-06-21 14:42:10 -04:00
Jarrod Johnson
79e1df669d Improve eventlog performance
The tz calls were very expensive.  Reduce calls by a large factor
by calling only once per call rather than once per entry.

Change-Id: Ie22ee09d0abd120543a007a01cf61123e7d16d35
2019-06-21 13:57:25 -04:00
Jarrod Johnson
2d5d72eaf7 Fix SD650 Redfish
SD650 was not detected as a Lenovo
system.

Change-Id: Ie0e0213058749c25840120447373e457e10aa5aa
2019-06-21 11:26:22 -04:00
Jarrod Johnson
ae0cc2d516 Add license status
Also provide explanation for inactive
licenses.

Change-Id: Iaf11bad639973ac577c724683e6a4166b7f265fb
2019-06-21 10:03:31 -04:00
Jarrod Johnson
79830da7d1 Fix instances with no agentless update adapter
Some XCC platforms and all IMM platforms cannot use the
firmware update url.

Change-Id: If6395df9f087626427118d73abbd33e20ecb7b0f
2019-06-21 09:08:20 -04:00
Jarrod Johnson
8257aa0279 Add support for deleting licenses from XCC
Complete the XCC license management capabilities by
adding deletion of licenses.

Change-Id: I4c023858263934e63c73b81af13713aad4b066aa
2019-06-19 16:09:23 -04:00
Jarrod Johnson
575663e638 Offer save_licenses to backup license
Lenovo XCC offers ability to save off license keys.  Expose API for it.

Change-Id: If6c1311f4801c9dde4aebb0d9480eb3eaa4b04fe
2019-06-19 14:25:00 -04:00
Jarrod Johnson
131030a823 Add retrieval of diagnostic data for SMM
The Lenovo SMM also support service data, provide
a backend to support that.

Change-Id: I3f44b6bca5fd243334d28e7932c124f1800c4a4f
2019-06-17 14:24:39 -04:00
Jarrod Johnson
e5bc31aeb7 Fix download when nominally accepting gzip
The progress indicator and the format of the file may
be poorly impacted if the server implementation decides to
automatically gzip all return data.

Change-Id: I4a4eda14a1fe4fdd7c8f60216e0b0a7905f10b42
2019-06-17 09:24:03 -04:00
Jarrod Johnson
434f21ed31 Implement redfish user management
Provide a close approximation of the
ipmi module api with redfish backing.

Change-Id: I60e448f67175959f381b4d9c6eacb9b5b4e22931
2019-06-13 15:02:03 -04:00
Jarrod Johnson
92c1088cd1 Add license check and install
Port the IPMI capabilities for license management for Lenovo XCC
systems.

Change-Id: Idd9b0e6131161fbafebf760922b5731e1d0e76f7
2019-06-12 14:14:23 -04:00
Jarrod Johnson
622d0dfca0 Implement diagnostic data retrieval
Port forward the IPMI oem diagnostic data
retrieval for Lenovo equipment.

Change-Id: Ic4a4e3566771046b4edf7f0d50fcea5b7f49d197
2019-06-12 10:52:48 -04:00
Jarrod Johnson
c9420984b9 Add lenovo firmware update to redfish
The redfish plugin receives a port of the Lenovo
OEM implementation for now.

Change-Id: I5c175cef0199031b3b4cd03f9e34581899c1e6c6
2019-06-11 15:19:41 -04:00
Jarrod Johnson
a75fd118b7 Add attach and detach media
While detach can be standards based,
for now use Lenovo specific
attach due to inability to implement
the pyghmi api against standard so far.

Change-Id: Ib3d0b13f95d22bbe793b4b5ef7aeb94b30cdb415
2019-06-10 16:06:12 -04:00
Jarrod Johnson
a9d8882773 Implement upload_media for Lenovo
Implement the Lenovo OEM mechanism
for media upload under redfish command object.

Change-Id: I47f7b8ba5751741a1c6fb322366b18a9120f7db3
2019-06-10 14:06:36 -04:00
Jarrod Johnson
963d8b40c1 Have upload auto-ungzip
If the server replies with gzip, automatically uncompress it.

Change-Id: I3f0f5e9bdabf36b0fecd17b1ebd1a5b4d3734636
2019-06-10 11:50:24 -04:00
Zuul
24d424d89b Merge "Fix get_oem_sensor_names" 2019-06-07 22:01:02 +00:00
Jarrod Johnson
b1a430cf3b Provide better error handling for XCC/IMM
The UEFI configuration can fail out.

Change-Id: I0e6fc5630f6bb9df02512b8d3a3818e5f1d283a0
2019-06-07 17:02:28 -04:00
Jarrod Johnson
67071582de Fix get_oem_sensor_names
Two mistakes were made in this function.

Change-Id: I5be38e4595b496fe8a120ef474a3d19027653e6b
2019-06-07 16:41:13 -04:00
Jarrod Johnson
f24d199b7b Correct typo in import
Change-Id: I40ebc51dc23e7c7360b50b8fb760ca6e88196ea1
2019-06-07 13:08:35 -04:00
Jarrod Johnson
c56b9bbabb Add Proprietary fetch of DIMM in XCC
XCC does not present DIMM temperatures using the standard,
instead provide the data from propietary interface.

Change-Id: I3c8ab0b5560b31134fbdcf041dc9fc2cd72ebcce
2019-06-07 10:36:13 -04:00
Jarrod Johnson
a78a0c9cff Add missing import to the Lenovo OEM
Lenovo OEM redfish requires the math module.

Change-Id: I12a9c09c4a7765dd5a4fbc24c8b295f4c1749da7
2019-06-07 08:58:36 -04:00
Jarrod Johnson
4b204ee1c9 Add XCC storage management
Provide entry point and port the
XCC storage management from the ipmi backend.

Change-Id: Id599063dd9542aecbb58bab1953831501dd14e3d
2019-06-06 16:09:22 -04:00