2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-14 19:57:47 +00:00

844 Commits

Author SHA1 Message Date
Zuul
d99e8fdf1c Merge "Fix problems with unrecognized health" 2019-09-17 13:00:31 +00:00
Zuul
0b043966ff Merge "Add etag to set_system_configuration" 2019-09-17 12:55:24 +00:00
Jarrod Johnson
c12253042f Fix problems with unrecognized health
This fixes problems

Change-Id: I2d198a2b675103ed9c51fd679835c79148ed829e
2019-09-13 14:01:50 -04:00
Jarrod Johnson
43553ea77b Fix typo in ruleset in set_bmc_configuration
IMM handler had a mistake in the variable name.

Change-Id: I051b8b44407d10b685a02af63371fa4af8a9ca40
2019-09-12 08:37:30 -04:00
Jarrod Johnson
b14b0487a8 Add etag to set_system_configuration
Some implementations require an etag here as well.

Change-Id: I821305d63fad52c78c27872f129bbafb601a90f3
2019-09-10 14:28:24 -04:00
Jarrod Johnson
b5dc8a8b9d Add fanspeed to bmc config for SMM
The D2 offers some fanspeed control.  Expose this through extended bmc
configuration.

Change-Id: Ia744538f7d735f54aeaf0404add99c2dce15a1d9
2019-08-30 10:05:12 -04:00
Jarrod Johnson
793d1dcd23 Add SMM password policy to bmc configuration
The SMM has a number of account policies.  Provide these using
the same vocabulary as XCC account policies.

Change-Id: I0fa12f252468aaab8952763b6824a97aea666e19
2019-08-30 09:29:16 -04:00
Jarrod Johnson
795ff2d046 Set warning according to expiry
Since the expiration warning can block expiration, always
set warning when expiration set.

Aim for 8% of the interval.

Change-Id: Iecffb9c26822a21632b22170607bb2019fb52e29
2019-08-30 08:25:47 -04:00
Jarrod Johnson
c711fc5dbe Add password settings to xcc extended attributes
This gives access to the password policy settings to
the xcc, both read and write.

Change-Id: I9a449eee1b46f5cd6856411cc4578ef52fcfcdd4
2019-08-29 15:46:50 -04:00
Jarrod Johnson
ee4219766a Convert integer when advertised
Rather than passing a value through, cast to int
if the registry is available and instructs us to do
so.

Change-Id: I1b057f15278ba0cd0e98d23b073e3333fb896589
2019-08-28 15:50:23 -04:00
Jarrod Johnson
684ffe30da Support instanced configuration
Add suspport for instanced configuration attributes.

Change-Id: Idf5026fddc4318e847f42ac9fd44ce643c463100
2019-08-27 11:29:16 -04:00
Jarrod Johnson
40cb397ae7 Implement extensible BMC configuration
In much the same way system_configuration permits a system to
extensibly describe UEFI/BIOS type configuration, offer OEM modules
a mechanism to do the same for BMC specific settings.

Change-Id: Ic6be1b90247afe9b43af498e90e4d139343a5124
2019-08-26 14:59:37 -04:00
Jarrod Johnson
d5786feede Support report settings on read-only BIOS
Some redfish implementations support reporting the current
settings, but not changing them.

Support these platforms in an expected way.

Change-Id: Iacce6f35019516b57b5de171044653c96a05a892
2019-08-26 09:57:05 -04:00
Jarrod Johnson
414baadea2 Use etag on setting boot device
Some implementations require etag matching for
setting boot device.

Change-Id: Ie8b86c1687b923f885186226185026f160b154f1
2019-08-14 16:13:07 -04:00
Jarrod Johnson
3c1196e3ae Explictly manage Host header when % present
Some implementations do not like the way python preserves
% in the host header.  Workaround by removing it from the
Host header (it has no meaning for the server anyway).

Change-Id: I49942e9c93f02fc4ee600174db4b51fc03d64d8e
2019-08-14 14:53:17 -04:00
Jarrod Johnson
dc121ebd77 Amend to add back a missing portion of partial patch
The previous change was only half of the actual change.

Change-Id: Iaecc0279eb4252af070c925d86466c8a6307b9de
2019-08-08 16:04:07 -04:00
Jarrod Johnson
6a7df11e3c Fix behavior of unavailable sensors in redfish
In IPMI, we provided a reasonably viable result for unavailable sensors.
Set unavailable attribute on the reading to indicate this in redfish.

Change-Id: I841dbc8c9660abd84ee59eab9c3006dc51949de3
2019-08-08 15:10:32 -04:00
Jarrod Johnson
9cb6cebf26 Map subordinate chassis when doing sensors
Some implementations model subchassis.  For those, descend
into the subchassis to get those sensors.

Change-Id: I4ed9b3599edffe897821a8571205a75afb6b49f0
2019-08-07 10:55:48 -04:00
Jarrod Johnson
1682a83622 Allow setting UEFI/BIOS settings without registry
Bypass the dependency and value checking when no registry is
available to provide that capability.  This allows users contending
with lesser implementations to at least get somewhat further.

Change-Id: I5ac47e42cb6c0e5e2c07ae8c8a68b089e5e2e84a
2019-08-06 10:01:46 -04:00
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
bfbe3f41c2 Hardcode SHA1 in BMC side for now
BMC side should properly look at the Open RMCP request
and do the appropriate thing.  For compatibility, just
run things exactly as they were for the moment.

Change-Id: I2b6671e8672bc1f4e9521823db9122a93405863c
1.4.1
2019-07-29 11:32:16 -04:00
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