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
Some have expressed a concern that ipmi is both too generic a term
and too limiting in scope. Change python-ipmi to pyghmi to more
easily allow the project to be specifically be referenced and denote
the likelihood of non-ipmi protocols being supported
Change-Id: I9c96f2154050a2970fc217e0eeae733605a38bde
Change from poll() to select() for the potentially long wait in ipmi
event loop. This is to facilitate interop with being monkey patched
with eventlet, as eventlet does not currently monkey patch poll(), but
does monkey patch select()
Change-Id: I8d6f42193ee82e2c5de7ad112232c2c77ef78825
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
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
After some contemplation, I realized that given the underlying behavior of 'wait_for_rsp', that
synchronous and asynchronous calls play well with each other. The pattern of considering an 'onlogon'
function as running in a sort of greenthread works well and leads to much more comprehensible code
for the average person. While removing those arguments, the module contents were reorganized to
serve as an example of how more straightforward code written in this fashion may be.
Change-Id: I9c83660e4d3c68ad8ae0c016a3377b2a0e7ee6ec
Previously the ipmi session was using time.time(). This means
that retries and keepalives could be thrown off by things like ntp
or manual time corrections.
Ideally, we'd use the baked in time.monotonic(), but that doesn't exist
aside from python 3.3
Change-Id: Ia00026cef6df214f9463909309de44767c3752b5
Assure that a live session shows activity at least once every 25-29.9 seconds.
The interval is randomized to mitigate risk of some synchronized activity
bringing on a wave of activity all at once. The spec indicated timeout is
'about' 60 seconds by default, but an implementation could lower it to 30
seconds within reason within the constraints of the spec.
Change-Id: I74dc78757b11571c23cb309c99eee667787ffc79
I realized that I had never pushed __init__.py for private.
While doing tests locally, I noticed that the pep changes broke at least one
place in code, correct that.
Change-Id: Ia31cb8a75a7109a6d002524e08ef335e1c5018d4
Rename '_pack_payload' in private module to 'send_payload' as it is more
descriptive of what is happening and will be called by console.py
Change-Id: Ifa70d269c8a1e37cc5b6466845931f22cd97d6c3
Ran autopep8 on the four .py files in this module.
Manully fixed many additional pep8 errors as well,
Turned some long-line-comments into proper NOTE lines,
but there are more to do...
Change-Id: I657ba037863860ec3956150931c2c0e41085bd63
Rearranged Sphinx.
Put project under PBR control.
Added tox file.
Added .testr.conf file in anticipation of testr testing.
Change-Id: I55180a6a3d224816c82999bf66156c7874786b17