2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-15 12:17:44 +00:00

793 Commits

Author SHA1 Message Date
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
Jarrod Johnson
3b8a8b93c3 Update the unusable stripsize
The stripsize was formally unusably
difficult and incorrectly named.  Fix both problems.

Change-Id: I05da211b6a629cea29b3760731c67d699824ba83
2019-06-04 16:22:38 -04:00
Jarrod Johnson
0fac38cdf3 Fix xcc breaking the standard webclient
The XCC requires a different auth header for non-redfish calls.  Isolate
xcc changes to the xcc usage.

Change-Id: I9891a0a3e79cbe119da96f6db6e12725ca86f3bd
2019-06-03 15:18:18 -04:00
Jarrod Johnson
9b9c37277b Add redfish list_media
Use redfish mechanism to list all
remote media in a system.

Change-Id: I254ef71f025fdb6272fcf1fbf8ed0c099e2c2467
2019-05-31 15:17:55 -04:00
Zuul
ea5309ce54 Merge "Fix redfish event log" 2019-05-28 14:38:40 +00:00
Zuul
4331faaca1 Merge "Add month/day/year to parse" 2019-05-28 14:32:46 +00:00
Jarrod Johnson
caa03393fb Fix redfish event log
The date parsing refactor missed an
occurance of a call to parse_time.

Change-Id: I58cd5589b2ac9a2e8dd79976086cdf5a532a2cf1
2019-05-28 10:09:37 -04:00
Jarrod Johnson
7d3eb11407 Add month/day/year to parse
Some fields come with this format timestamp rather than ISO format.

Change-Id: I9e361a97f4ba42da6b0aab0ac4d9ae126a58c255
2019-05-28 09:47:18 -04:00
Andreas Jaeger
d9134528fc Remove unneeded empty .zuul.yaml
There's no need to have an empty file here, the configuration is in
zuul.d directory. Remove the file.

Change-Id: I721f5bbbfa35517ff57bfe8b2f4a8d210f47851c
2019-05-27 16:38:24 +02:00
Jarrod Johnson
710b12658c Add OEM Lenovo Firmware
For Lenovo equipment, improve compatibility
with the ipmi interface and provide
more info than redfish provides.

Change-Id: I1b5ad99c89d8dec0abd18b1f794dabdb0aed13c3
2019-05-24 13:47:31 -04:00
Zuul
2879867002 Merge "Update docs job" 2019-05-22 21:57:45 +00:00
Jarrod Johnson
66973bfd0c Add disk hardware information
Use the storage management capabilities
to provide information about disk hardware.

Change-Id: Ide2cc01ece07f7ca7839bc0bb5f1b877d65bc80d
2019-05-21 13:19:26 -04:00
Andreas Jaeger
cdbdfa63d7 Update docs job
Replace obsolete sphinx-build job with tox-docs job, use
a template for this.

The newer job uses "tox -e docs" directly.

Add sphinx requirements for python 3.

Change-Id: I1acc55a470ebacce812ba6840663302d759f69b7
2019-05-20 09:12:31 +02:00
Jarrod Johnson
012d8f18b7 Fallback to MessageId
If an implementation provides no message, at least use the MessageID.

Longer term this would be consulting the redfish registry to get the
correct message with messageargs interpolated, but for the short term,
at least provide this.

Change-Id: I099745e929dbfa5b11d630966308f6986eef41e5
2019-05-16 10:02:37 -04:00
Jarrod Johnson
775efe6f57 Fallback BootSourceOverrideMode for older systems
Older redfish implementations did not support this request attribute.  Try
with the attribute and if it fails, just don't try injecting the attribute.

Change-Id: I80b2e725822f0de9a6dd12df17b5c7347b094431
2019-05-16 09:42:53 -04:00
Jarrod Johnson
33db8cdfeb Add mandated client headers
Since we added gzip support due to a non-compliant
implementation firing gzip at us anyway, advertise
so that we have the benefit for compliant implementations.

Also add the OData-Version header.  This is required but
mostly not needed, except one implementation that uses it
to enter standard compliant mode and is non-compliant
without that in the client.

Change-Id: Ie2fdb95fa12f2ddef46506ca531e5188b6019227
2019-05-16 09:21:19 -04:00
Jarrod Johnson
5a15c6b604 Fix system_configuration
Some redfish implementations may use a trailing slash in registries.

Additionally, any json may be gzipped.

Support these two scenarios.

Change-Id: I6437af21c927d13a74e8d914ed261412c1a3afa1
2019-05-14 16:51:52 -04:00
Jarrod Johnson
904a2428c7 Add fallbacks for more redfish implementations
Redfish implementations can get dodgy about some things
and use different names for the same thing and different
mappings depending on vendor opinion...

Change-Id: I7ec5f1754fcfeca3933dd22a91d1a2daa037e501
2019-05-14 15:30:10 -04:00
Jarrod Johnson
61e5a9967b Add get_inventory_of_component
redfish did not have a compatible function for the ipmi get_inventory_of_component.
For now, only provide fastpath for system,
other components are difficult to have shortcuts for.

Change-Id: I1998186340b206a997fd0c062bec02fcb0af5ebe
2019-05-13 15:18:17 -04:00
Jarrod Johnson
ee63d83dac Allow caller to opt out of some behaviors
For keepalive, there are applications that can self heal and
would rather close an idle session instead of keeping it alive.

If the caller knows exactly that it wants to be administrator,
then do not automatically allow the session to downgrade to
operator.

Change-Id: Iefaf04387e28da9d7f2c613d567cd83ce69c2c03
2019-05-13 09:03:54 -04:00
Jarrod Johnson
0f115fdb02 More clearly indicate bad credentials
When used with invalid credentials, present a more clear
exception rather than a missed member of a dictionary.

Change-Id: I1e5bda9368673db62dce3ca2fd321cd79c62cb9c
2019-05-07 16:20:48 -04:00
Jarrod Johnson
70bf3cf165 Cleanly degrade on bad BMC time format
If a BMC provided a time, but the format was not compliant,
it caused an exception.  Now gracefully degrade to not
doing time correction if time cannot be parsed.

Change-Id: I5ab45d51913232016bb55d3595ea30188bbfe2e7
2019-05-07 10:08:48 -04:00
Jarrod Johnson
b8254fb5b9 Use dependency information for error checking
This uses the Dependencies section to perform validation
of data provided by the caller.  This produces more informative
error messages without having to reboot to examine why.

Change-Id: I6360b8a2694e42d7b848de9ce45466c88e722c91
2019-05-07 08:44:25 -04:00
Jarrod Johnson
a55dacf1d8 Provide better messages when redfish provides
This provides a more informative behavior in the clients.

Change-Id: I7cecc39c3928aac6ee2d9b86ed53159dcdf3dde5
2019-05-01 11:45:16 -04:00
Jarrod Johnson
5c2c5d797f Get pending settings with current
To be consistent with the ipmi settings, present the pending
as the 'value' and 'active' for the current value for pending
settings.

Change-Id: Ia99374732f05509d2796b5e2166c686716e93c69
2019-05-01 11:06:02 -04:00
Jarrod Johnson
1988c09d48 Use the registry info to help set
Provide support for wildcards in settings and attributes,
as well as case insensitivity.  This brings set nearly to
parity with the XCC configuration set in the ipmi half.

Change-Id: I6eef01af8e9e3bb7be03538509a606728c3c33da
2019-05-01 10:41:17 -04:00
Jarrod Johnson
e073e078a8 Have get_system_configuration get detail
Use the bios attribute registry to flesh out detail
when available.

Change-Id: I43cdc8ad6cefef83f45787000259f4962f9e1b37
2019-05-01 09:49:01 -04:00
Jarrod Johnson
42c21cfb3e Add sensor data to redfish
Redfish models a moderate amount of data that can map to sensors.
Provide a preliminary partially compatible sensor model.

Change-Id: I10cadac5871497ef89f14b95924a5f4c3be52b01
2019-04-23 16:20:38 -04:00
Jarrod Johnson
13c7d6d3b5 Convert to localtime
The IPMI module returned localtime, be consistent with that behavior.

Change-Id: I7a787ffb4b9aac81e54cc20707e97087a97d5d16
2019-04-22 15:54:26 -04:00
Jarrod Johnson
5979a2b215 Add log clear to redfish log
This permits log clear while ensuring
that the log data did not change between retrieval and deletion.

Change-Id: I15ef6bb330612b83a6acb1dcf3663eb60bb8363b
2019-04-22 15:28:21 -04:00