So of course it turns out that in redfish
multiple firmware developers implemented
another exactly identical behavior with
different requirements.
Accomodate by trying to detect at least two
variants seen in the industry.
Change-Id: I5aec979f12fd775bcf8570fde411eaee787ba9c3
If the caller provides no custom validation, use normal validation.
Historically, this webclient has been used for internal networks where
custom validation was more feasible than normal TLS validation.
However, it is starting to be used to communicate with internet sites,
so a change is required to work with that model sanely.
Change-Id: I31dae103bfbe534aa326a648f9207ad86b86d550
While XCC is aggressive about expiring tokens, sometimes it isn't.
In such a case, throw a logout request to the 'stale' session in case it
isn't to avoid consuming too many session slots.
Change-Id: I01819786755d5d5d29014c58d4dcbe5468c63607
Newest ipmitool expects a reply to get cipher suites. For
now give a static reply that only cipher suite 3 is supported.
Change-Id: I31f77818ffa746954eb86fa95269b1e5a7e09879
The sentinal value would not get hit with
python3 ('' versus b''). Change to use
an easier to use while loop.
Change-Id: I4d7f4b763aff1fdf13e5a53377146606de199a11
Honor rqlun from client, if not zero. There are BMC implementations
that fail to follow the spec and do rqlun of zero, but pyghmi
implements it correctly. In practice I have never seen an
rqlun of non-zero except as an experiment.
Closes-Bug: #1865987
Change-Id: I73e59672ce5e146cf24386c2228fa8dae3bc579c
Some versions of python cannot take bytes
for the json payload. Workaround by explicitly
decoding from utf8 in such a case.
Change-Id: Idb86003fcf6643e5c67e13202de41be6c35607a0
After adding support for non-zero lun, some reports came back of
dropping responses. However, there is at least one platform that
incorrectly puts 0 in rsLun in replies to packet that had 0 in rsLun.
Workaround by masking out the rsLun value in replies before checking for a
match.
Change-Id: I23a46fce23327ce90d2be845a806d6ba0c4b975e
The IO thread is meant to be a background task. Mark it
as such to be treated properly on interpreter exit.
Change-Id: I73003625d014f823d26c55bdd22217e19f6bf1c9
simplesession represents a stripped down session.
For now it doesn't support many bells and whistles, but it
should suffice for one-off command usage.
Caller has to opt-in to the experimental simplesession by
calling select_simplesession() method in command:
import pyghmi.ipmi.command
pyghmi.ipmi.command.select_simplesession()
Change-Id: I3884762621306d4a895f4b56d173fc80526a095c
The supported wheezy platform we are now adding
pyca to. Additionally, the options were wrong for
such old debian build utilites.
Change-Id: If92de1356cd45c5f4a260b6df72144dbbfe70c3d
XCC convention is to zero-pad the minor number
if less than ten. Support this and make it look less odd.
Change-Id: I093019d68d5c47ffe73d49eba736da5c1bd9ce32
The effort to restore pep8 made mistakes and mangled some
data. Additionally correct a python2/3 incompatibility.
Change-Id: I247d00c3214c30d135c2c131d7ab7bd411dfb476
Some implementations use 'Other' since none of the specified
categories are technically Power.
For such a case, when it is in W, Ws, Wm, or Wh, correctly
flag them as power or energy category.
Change-Id: I515f74af6fc0cf3c2d14c6f94b74a295929cf082
If the caller uses bytes, then try
to decode to string using utf-8.
This fixes compatibility with some
scenarios, particularly involving python
2/3 compatibility.
Change-Id: I78692db4f9e8abb885567eaf0e5500908e71a5a0
Keep extended configuration utterly separate to ease confusion
by calling code as to what belongs to which category.
Change-Id: Ic97ad79fa796f63b8825db48059450a4c78f75c9
The use of ord against a bytes object is not supported
in python 3. Change to a bytearray for compatibility
with both python 2 and 3.
Change-Id: I583c83d88c063aac2c085ac6dac8a23211a2f3eb
The pycodestyle fixes that were submitted broke a few things.
One it removed the utf8 declaration for code that had utf8 in it, breaking python2.
It also introduced a circular import by moving an import to
unconditionally import rather than conditionally import.
Fix these two issues.
Change-Id: Ibfeccd5b649bd597b7f879bb6124d8bbcbc3ec69