2
0
mirror of https://opendev.org/x/pyghmi synced 2025-10-26 17:05:30 +00:00
Commit Graph

63 Commits

Author SHA1 Message Date
Jarrod Johnson
bc98dd61b9 Revamp redfish get_health
Check ProcessorSummary before going into each processor.

For each component, skip if Absent.

If the system provides no health info, warn that the health
information is unavailable.

Change-Id: I7cc020ae0ae8a958b0d474a9012921d022979511
2019-08-06 09:38:44 -04:00
Jarrod Johnson
196e70b447 Fix redfish issues
Fix the remote media generic path to actually try to work.  This
required adding a stub attach function to the generic oemhandler class.

Fix adapter health checks being skipped if no memory errors are seen.

Change-Id: I3c6bc2c32fa63545a89cd005b4fbb2a271dacfbe
2019-08-02 08:25:25 -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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Jarrod Johnson
f064774ddd Add redfish log support
Change-Id: I7b0ad31da8a178acaffb3c61d189f12d5d0143ac
2019-04-18 17:00:49 -04:00
Jarrod Johnson
f710b1d30a Add OEM extensibility framework to pyghmi redfish
This enables OEM specific override for enhancements beyond the specification
when avaible.

Change-Id: I6a10f1fa58a425b2abfbeb9c85dd72c3b7d4cbba
2019-04-18 13:58:24 -04:00
Jarrod Johnson
a05c044874 Add clear system configuration to redfish
Implement clear uefi configuration for redfish targets

Change-Id: Id85c13b773597ae331902ae91ad3d8bcc0b9982b
2019-04-15 14:22:11 -04:00
Zuul
ce62bdda95 Merge "Implement redfish set_net_configuration" 2019-04-11 13:04:12 +00:00