Some chassis managers implement a reseat function, provide access to
this capability with a high level API.
Change-Id: Ie7bbedc34236c95e43b790677b9e637cda893e0a
Adapter updates require a different conversation.
Implement that conversation so that the user need
not be aware.
Change-Id: I865d211b8aad08797b556a077814a3068ae9ea2c
This patch do step 1 in the docs: Move Legacy Jobs to Projects.
Change-Id: I824b28f184c68da6e5ff66b1ca2ee007eb44fbbb
Needed-By: I550188a50554b086a11d35e39927f8b0f8a89bf7
Needed-By: Ib86c59dc309c1e1596013eca42b7e34a4ebfdcd1
The only exception that is somewhat usual is connection refused,
for systems without a web interface at all. Everything else should
be raised.
Change-Id: I2c6bd7f6a25a4728191748b071053112af3a2139
While it was 'Power' for the sake of being convenient to people
about power metrics, it is not strictly accurate. Change to the
accurate description and people will just have to know to look for
Energy rather than Power.
Change-Id: Iaa303b417740015bd35ef0a4d41928a4c40bf933
Energy meters are available through OEM commands for Lenovo enterprise
servers. This enables those data to appear as sensors when enumerated.
Change-Id: I28d59b24cf49642e82d5b71f7c34f94d858796dd
Some DIMMs have short model numbers and pad with NULL. Also tolerate
other common padding (0xff and spaces).
Change-Id: I01550996ade799b2c29d910ae9bb8c5150f94a38
Some systems do not support reporting FPGA version,
for such systems that return 193, ignore the situation.
Change-Id: Ic6f967754741d1789bc293f9489fab0077faf033
The XCC has a primary bank and backup bank that may
be individually managed. Provide access to updating the
backup bank.
Change-Id: Ia9b3b4602d7a0ff62b0269020eeece03844ecaa9
IMM web has now started rejecting http without referer. Provide
a reasonable referer for that situation.
Change-Id: Id6d537252646122005a78a92c8a0122f28d379ae
Windows does not have fcntl, but can work out of
band. Allow out of band on Windows to work even
though localsession cannot.
Change-Id: Ia3c188b33582f2c62bef6cb1f9576ccec314506d
On windows especially, inet_p functions are rare in python. For AF_INET, inet_a functions
do the same thing and are more easily found.
Change-Id: I26f6e1015e9e82aad9b3c05ab7a45af6d11555cb
Previously waitall was used as a way to have wait_for_rsp be able to
call out for specifically keepalive, to prevent a wait_for_rsp from
hanging. The thought was to create a new wait_for_rsp by recursing.
However, if things go really bad with enough systems, it runs afoul of
python's recursion limit. The alternative strategy is to provide a way
to never wait, and asynchronously do cleanup in a callback. This
returns to the original wait_for_rsp instance rather than recursing
to a new one, keeping the stack shallow.
Change-Id: I54450bfc5bf57563a0a8bd986d9aea887bf36e53
Sometimes equipment will not handle some header data, such as 802.1q tag. Other times,
there's a jumbo NIC talking to a BMC that is not jumbo.
Workaround such situations by setting the MSS to 1456 explicitly, which fits in MTU 1500 plus
4 bytes for dot1q tag, if some intermediat device fails to handle that.
Change-Id: I7db1c8feac1c094871723026771792432a3daaf4
Sensor numbers can have a lookup table in SDR without being a sensor.
Support these for eventlog decode, without adding noise to the sensor
enumeration.
Change-Id: If635512616da1a98ab7ca9d2352aea55ea2da5e3
The console code was using a global lock, but the data protected
is per instance. Change to using a local version. I couldn't figure out
a generic way for the decorator approach to dereference 'self'
without creating a specific requirement on the class name, so
I changed to using it as a context manager directly for now.
Change-Id: I304b75572fecd3326723d981fec67207d87d0742
The update process has a number of common errors and a lengthy
validation phase, provide more detail on the process.
Change-Id: I814d512814c132e95bb018cd622cff3c2efdf2c2
A per instance copy of data was kept in scope throughout download
process. Minimize that to once regardless of instances, and have
lifetime of the extra copy be very short.
Change-Id: Ife3c7f83bf9b97925cf079597f014db648b227ba
The stray progress call and/or unexpected token expiry resulted
in failures. Consistently logout on completion or abortion of process
as well.
Change-Id: I862036962cc83e31b2f426a9c7572325da173586
XCC is structurally the same, but vocabulary changed.
Adjust by abstracting vocabulary at the class level.
Change-Id: I7352f089683bbabdb87d86d87a7f399cd8241fc4
At some point, bmc_handlers was mispelled, affecting graceful handling of
detecting a broken port. Correct the mispelling.
Change-Id: I80e86b9d98fb211a3f1195658b93eaa5a2e88c61
For IPMIv2 sessionless data, there is not 13 bytes
to strip out, but instead only 2. I suspect because
reading the sample packet, the last row unique values
were added without looking at the context. Correcting
for context, the IPMIv2 header is only two bytes longer.
Change-Id: I9b99417c39f519dfa68b59a90a3ef7ca0232e97e
A new set of credentials would break existing sessions.
Support concurrent use of multiple users/passwords, since
there are valid use cases.
Change-Id: Ic63364f05ec9270e06656d13bbb02d7c88fd21d4
Multi-thread application like virshbmc can break
Session.keepalive_sessions and Session.waiting_sessions
with their concurrent operations.
This patch adds exclusive locks to avoid the problem.
Change-Id: I191ed066f02fd329da5a210e2383fa72481916ef
Multi-thread application like virshbmc can break
Console.pendingoutput with its concurrent operations.
This patch adds an exclusive lock to avoid the problem.
Change-Id: I776c2a09069e4af129c865acc1bf47ba021b4e39
protect() handles exclusive locks. It can be used as a context
manager and as a decorator. Multi-thread applications like virshbmc
require exclusive locks to protect list operations and references.
Usage:
import threading
from pyghmi.ipmi.private import util
LOCK = threading.Lock()
@util.protect(LOCK)
def foo():
...
or
def foo():
with util.protect(LOCK):
...
Change-Id: I96eb1fac17a519b4e864731f4fa0285ccc2edb08
This patch adds a BMC-side SOL-related class and methods:
console.ServerConsole:
Sub-class of console.Console for BMC
bmc.Bmc.is_active():
returns whether the BMC is active
bmc.Bmc.activate_payload():
activates SOL session
bmc.Bmc.deactive_payload():
deactivates SOL session
See bin/fakebmc and bin/virshbmc for examples.
Change-Id: I0e649ee0e2b45824a34c9634b00fd4f94c46c8de
Pep8 check is necessory for our code, it also makes your
code easy to readable and understandable and beautiful.
Change-Id: I4bb8434db07bf8fe82a4f65dfdfe7f2114b00083
Closes-Bug: #1699298
If a caller does not do a keepalive, but instead
creates new Command objects or similar, accomodate
by ditching the session that was not kept alive
rather than trying to use it.
Change-Id: I94fba08e3b2c03862b053c11aa3ee6b810db6f21
By raising it in the callback, another thread doing wait_for_rsp
might get hit by it. Store the message and then raise in __init__
so that it lands in the correct vicinity.
Change-Id: Id450a4a3f6194d95bb0eac971e0586525c49e490
For channel 0xe, we can skip checking if the channel
is active, since, obviously, we are connected to that
channel. Since *current* active channel cannot be
inactive, assume that is good if seen.
Change-Id: I894bd27e6c76bb9ace0959566117ad6a6f8866ad