2
0
mirror of https://opendev.org/x/pyghmi synced 2026-03-31 07:13:35 +00:00
Commit Graph

11 Commits

Author SHA1 Message Date
Jarrod Johnson
6e58eae301 Move previous fix out to command and console
console at least needed the assignment to the session to occur
prior to its callback working.  Move the responsibility of the
mandatory loop iteration up a layer so that pyghmi won't break,
but calling code won't have to worry about this either.

Change-Id: I6711acf97574581bb389259563e82e4430bb3f98
2014-02-06 10:04:54 -05:00
Fengqian Gao
c1d4252743 Add BMC bridge request extension
Support BMC bridge request, users can specify
target slave address and channel number for the command

Change-Id: Idf4c4567013e769ab71350db4cea947b2dc820ed
2014-01-21 14:46:54 +08:00
Jarrod Johnson
7ac880f3f8 Add 'get_health' to Command class
Provide a convenience function that summarizes the overall health
of the managed system based.  Currently, it just enumerates all
SDR indicated sensors seeking unhealthy readings.

Change-Id: Ifce6d05623acc86b6bf42ceb57824b65eefa36ae
2014-01-20 18:31:40 -05:00
Jarrod Johnson
fe7539ab83 Add 'get_sensor_data' to Command class
Have Command class provide access to the sensor data
as enabled by the SDR commit.

Change-Id: I2eede764597cff74409370230cc5d3f120c4ed65
2014-01-20 15:54:25 -05:00
Jarrod Johnson
ffe493df0f Use distinct exceptions for many cases
Caller is likely going to want to catch certain conditions.  For those,
use more specific exception classes.  Exceptions indicating either TODO
or usage errors are being left as 'Exception' for the time being.

Change-Id: I4d68a2dbc394b534d54586b9f770160c1409f720
2013-09-25 09:04:43 -04:00
Jarrod Johnson
bdbb6aa018 Expose wait_for_rsp class method via public classes.
In complicated uses of pyghmi, it becomes useful to call into the
otherwise private event loop iteration.  This exposes the
wait_for_rsp method so that it may be consumed without violating
the expectations of private.

Change-Id: Iee64615f0577b00895f8c3db25676c877107b0be
2013-09-11 16:34:10 -04:00
Jarrod Johnson
c13a5a375d Add support for non standard ports.
It is possible and in some cases required for an implementation to deviate
from the IPMI standard port of 623.  This enables the library to actually
support that case.

Change-Id: I62e322410924153cebde9827d7ba0d0583aa1d83
2013-08-22 16:04:48 -04:00
Jarrod Johnson
3ed2ef8494 Fix raw handling by ipmictl.py
The test harness was incorrectly throwing string values at the library.
Correct that by explicitly converting from hex string to int.

Additionally, command.py was failing to pass data through.

Change-Id: Iceda4c3b4a382992d445f90dfbc19f6c75b528df
2013-08-15 13:58:29 -04:00
Jarrod Johnson
04a9b89d15 Rework set_power handling of errors and noops
set_power failed to raise when error encountered.  The behavior is
amended to be consistent with other functions.

set_power requested on/off state even if system already was in requested
state.  Change to simply report success in that scenario.

Change-Id: I6feb8f4384705136a5ab1fae0899ea27b2d3511c
2013-08-12 16:10:00 -04:00
Jarrod Johnson
939ebea0f3 Enhance wait behavior of set_power
Previously, wait would always be indefinite and act in many ways like
a busy wait.  The check for completion now takes one second between
every check.  The default behavior now goes for 300 seconds, but
wait can now take an int to indicate a different preference by the
caller.  300 seconds may seem like a lot, but the 'softoff' request
in particular suggests waiting for OS shutdown process to complete.

Additionally, some bugs in the retry logic were noted in the process
of having the retry timer drive the delay and are corrected.

Change-Id: Ibe34e87c2a58f13981d60e5f80b4b636e67ac3f9
2013-08-08 14:08:35 -04:00
Jarrod Johnson
7371a58aba Rename to pyghmi
It has been expressed as a concern that 'ipmi' is too generic a name.
Additionally, it is also the case that non-ipmi capability is likely
to be incorporated as it goes along (e.g. Enclosure management and
virtual media are frequently not IPMI based).

Move existing content under the 'pyghmi' namespace.  pyghmi stands for
'python general hardware management infrastructure' and is pronounced
'pygmy'

Change-Id: Ib549a9f5b7dd549c7dc5ddbab251a2e06c572e41
2013-08-07 13:51:05 -04:00