2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-28 03:48:09 +00:00

332 Commits

Author SHA1 Message Date
Jarrod Johnson
bb9436aa2e Fix 'uptime' time correction attempt
When doing the attempt to correct time, the sense of comparison was
incorrect and the timestamp field was neglected.  Correct this
mistake and oversight.

Change-Id: Ia3ff187d0eaedcfea9f3b7d2c8f292162bb3bb50
0.9.9
2016-03-01 15:25:48 -05:00
Jenkins
02d13366ee Merge "Deprecated tox -downloadcache option removed" 2016-02-11 21:44:24 +00:00
Jarrod Johnson
709e35c103 Add OEM sensors for Lenovo Nextscale
Nextscale Fan/Power Controllers have several data
sources that would normally be considered 'sensors',
but are implemented through proprietary commands.
Extend the sensors data from these sources.

Change-Id: Ieaaae54b3edb409fac8f3932d51175c61ebdc44f
2016-01-11 15:10:22 -05:00
Ondřej Nový
59150c8c30 Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: I0eec04a73e98048ea705bba01fd8d84b605b874e
2015-12-11 23:20:31 +01:00
Jarrod Johnson
f8d77ac2cc Add license parameter to setup.py
In order to have bdist_rpm output serviceable,
add the license field.  This results in an rpm
that has all the fields desired.

Change-Id: I18f75f89385ac5022050372925c19f46206244f9
2015-12-01 14:30:01 -05:00
Jarrod Johnson
25165b68a6 Point to more specific page for pyghmi
Rather than pointing to generic xcat, point to the
github page for pyghmi

Change-Id: Ic07ad5db1e39d3a37a3ce24ff77c76bffbb4ee72
2015-12-01 13:18:53 -05:00
Jarrod Johnson
5341960c0b Update my email
My email is no longer us.ibm.com.  Point to my Lenovo address instead.

Change-Id: I08143249032ca46ea96b36aad03c57cad443040c
2015-12-01 09:44:35 -05:00
Jarrod Johnson
03e3da529b Add TLS support and TSM remote video (WIP)
Provide a method for applications to evaluate target
certificates.  Force them to do so if such a thing is
needed.  Use this to support TSM remote graphics, which
sholud be over https for sake of security.

Change-Id: Ie67b629b0021c356d2ea001e24c72ad196e5460d
2015-11-20 13:48:10 -05:00
Jenkins
4cc75b4736 Merge "Avoid abandoning retry when SOL packet is not ACK" 0.9.8 2015-11-10 19:51:22 +00:00
Jarrod Johnson
fbd95bc3b3 Avoid abandoning retry when SOL packet is not ACK
The design was to abandon retry when data comes in,
ACK or not.  This became a problem when console.py
retried under frantic conditions, confusing some
BMC implementations, and so that was removed.
With that removed, BMC traffic was still cancelling
the retry, but nothing was reinstated in retry anymore.
Fix by having session.py understand a few bits of SOL
payload enough to identify at least if it is *an* ACK
at all.  If it's one of the 'weird' ACK scenarios,
sol handler still must handle, but simple no-ACK scenario
now contained in session.py.

Change-Id: I609ff783cd6cc2bf431271280bb55da4126f2cfc
2015-11-10 14:42:13 -05:00
Allan Vidal
37c4eb42c6 Change DIMM SN parsing in TS to match WebUI
Change-Id: Ia506ca9945db98e1facaddc973cf43f2b9dd0f36
2015-11-09 17:09:12 -02:00
Steve Baker
035dfb2fa4 Allow bind address to be specified
This change allows IpmiServer objects to be created with bind addresses
other than ::. It is useful when multiple BMC processes are running on a
single server, with each bound to a different nic.

Change-Id: Ice82bf788269a31819e4495e15b9ce19a1dd057b
0.9.7
2015-11-05 15:53:06 +13:00
Steve Baker
df19985878 Only bind on tmpsocket once
Since change I8f566543c8da28eb7ed76f1cb80ff4cb2dcbba96 openstackbmc has
failed to start with the error:

  socket.error: [Errno 22] Invalid argument

Moving the early bind so that it is only done when there is no server
specified has fixed the regression for openstackbmc.

Change-Id: Icb16cdc386fb08b54f28b7dff235eb697f1450ee
2015-11-05 15:52:55 +13:00
Jarrod Johnson
1b5ae5d8e0 Fix exception on logout
When logging out, the session is obviously not logged
after the request to logout has been processed.  If
retry is False, do not be surprised we don't have a 'lastresponse'.

Change-Id: Ia5cbdab3736148fa36ced8835bd8d9fdca1dc12d
0.9.6
2015-10-30 15:56:30 -04:00
Jenkins
50d6b2bce1 Merge "Fix TSM detection" 0.9.5 2015-10-30 18:05:11 +00:00
Jarrod Johnson
c5902bb0c8 Fix TSM detection
As of recent System X hardware releases, the mfg/device id
values are now ambiguous.  Go deeper in the tsm detection
to assure the system is indeed a TSM system rather than IMM
or other.

Change-Id: Id63d015bf03e9ea9501503543effd31e01691b31
2015-10-30 11:28:05 -04:00
Allan Vidal
ac5bdc9c71 Add device ID fields to FRU 0
Change-Id: I4287d7a7732ffff00e708c05485d5b0afb37fd2d
0.9.4
2015-10-30 11:37:29 -02:00
Jarrod Johnson
f6386e42fa Fix raw_command hang when externally 'broken' or 'logged out'
When something requests logout in the middle of a command request,
bail out with 'session no longer connected' rather than infinite loop
waiting for lastresponse which should never come.

Change-Id: I9a8592a72b687f90bc044bbe48fd87d79b35d780
0.9.3
2015-10-28 10:36:49 -04:00
Jarrod Johnson
9b6e6b9ba0 Do not raise on bad/unsupported FRU data
If a FRU device presents data that pyghmi does not understand,
treat it the same way as if it were not present, do not decode.
Some systems simply do not have usable FRU data despite having a
pointer to a FRU device.

Change-Id: I440cee3366b5da4555b67b41492fa017dbe3dcef
0.9.2
2015-10-26 10:08:21 -04:00
Jenkins
d25caa1aad Merge "Implement custom timeout and apply to TSM NTP" 2015-10-26 13:42:37 +00:00
Jenkins
7b444a496f Merge "Handle missing UUID" 2015-10-26 13:38:41 +00:00
Jarrod Johnson
f41fee099b Implement custom timeout and apply to TSM NTP
TSM NTP enable retry could trigger the TSM to lose its
mind.  Workaround by having a large, custom timeout for
NTP, to either get positive acknowledgement or timeout,
even though no retransmit would occur.

Change-Id: I3f83e5a1f1e1957bad119951c7e73ade5154b351
2015-10-26 09:30:51 -04:00
Jarrod Johnson
68c7979349 Handle missing UUID
Some TSM FRU elements do not have a FRU entry.  They may
be marked by all spaces, all 0xff, or all 0x00.  Skip UUID
if it is one of these obviously invalid values.

Change-Id: I90c8bbe3c66754bcb6d6200b63a2ff2c29ae63ec
2015-10-23 16:17:12 -04:00
Jenkins
f9702d902f Merge "Workaround likely spec deviations and fix parsing" 2015-10-23 20:11:59 +00:00
Jarrod Johnson
3411537228 Workaround likely spec deviations and fix parsing
For one, was doing UTF-8, though the encoding strictly speaking
per speac should be ISO-8859-1.  Corrected that mistake.  Also
workaround an issue when FRU may be programmed with 0x0 or 0xff
bytes to terminate, or spaces.  The spec actually doesn't speak
to a strategy to pad strings (presumably because they assumed
implementation would avail itself of the capacity for variable
strings and not need to deal with silly fixed length fields).
Handle this by trimming out trailing spaces, 0x0, or 0xff.  This
strictly speaking violates the spec if they want to use one or more
ÿ to end a field, but will take the risk that no one actually would
want to do that.

Change-Id: I7d7e3aa9f3fd2b1e1af75f98cabd49ca374755c0
2015-10-23 15:47:24 -04:00
Allan Vidal
c692005b5a Fix crash on missing "board_extra" field in FRU response
Change-Id: I9fc95282926ef9a7f3847f38116736dabea5c3bb
2015-10-23 10:25:35 -02:00
Jenkins
e96bd8f67c Merge "Stop spurious retry on incoming data" 0.9.1 2015-10-21 19:14:03 +00:00
Jarrod Johnson
cf351d1806 Stop spurious retry on incoming data
When data came in from a BMC before acking a recent
transmit, pyghmi would pessimistically take that as
a cue that the data was missed in transit.  However,
if the data happens to be on the wire before an ack
that is coming, this is a senseless retry.  This
retry happens typically within a few milliseconds of
the original.  Fix this by ignoring the non-ACK related
data as a cue for doing a retransmit.

Change-Id: I871377da0265a5e258baf922252ae86df6c578b0
2015-10-21 15:07:38 -04:00
Jarrod Johnson
2a7d6f3662 Fix chunk length when unicode on MCI
Unicode data probably won't work, but to the extent it could
work, it would be incorrect to do length on the unicode rather
than length of the utf-8 encoded data.

Change-Id: Id39484abff603fdaab421f3395063b17edd3ae15
0.9.0
2015-10-20 13:25:27 -04:00
Jarrod Johnson
9103d554e0 Handle unicode DCMI data incoming
If unicode string data is submitted, pass
it along as utf-8 encoded bytes.

Change-Id: I00adc7aff4dcf06061a9fad69ed33cd784e7fe1b
2015-10-19 16:35:17 -04:00
Jenkins
45b4afa1da Merge "Update .gitreview for new namespace" 2015-10-19 20:22:19 +00:00
Jeremy Stanley
5d924099a4 Update .gitreview for new namespace
Change-Id: I7866226f74c5efdff8912afa4d351e9d2101edac
2015-10-17 22:36:04 +00:00
Juliana Motira
c85a0f3c77 Fixing fru date
Change-Id: I1f9a5e5f7bd317e5f54cdbbaaf093938b164a8b4
2015-10-16 14:42:01 -03:00
Jenkins
0378a45ae4 Merge "Fix TS inventory parsing bugs (DIMM, PSU)" 2015-10-15 13:43:37 +00:00
Allan Vidal
d560e17389 Fix TS inventory parsing bugs (DIMM, PSU)
Change-Id: I4c1eb83db7950aba542a5931e172232b1395239f
2015-10-15 09:17:53 -03:00
Allan Vidal
e3a077a853 Change acknowledgement_timeout to acknowledge_timeout
Change return value key for get operation to match the name used in
the set operation.

Change-Id: Ie53910e3049618475478df2ebc93edf465d6b0e3
2015-10-14 17:12:27 -03:00
Jenkins
c2238a8587 Merge "Fix attempt to get LED against System X" 2015-09-28 17:11:37 +00:00
Jarrod Johnson
e189c43f73 Fix attempt to fetch firmware on System X
Return empty iterable if System X to be consistent
with generic for now.

Change-Id: Id08dd7fa0d18aa69aec1f0389226f67935d81bde
2015-09-28 11:43:28 -04:00
Jarrod Johnson
36404cc934 Fix attempt to get LED against System X
The lenovo oem handler was erroneously unconditionally applying
Thinkserver LED queries to system x.  Correct by checking for a
TSM prior to making the request.

Change-Id: I202942743a1040516f80ea5a2655037d19a5c59a
2015-09-28 11:32:29 -04:00
Jenkins
d4ed291e69 Merge "Use alert set 1 unconditionally" 2015-09-25 13:52:57 +00:00
Jarrod Johnson
ed700d6603 Use alert set 1 unconditionally
The 'policy number' appears to be indicating a set rather
than a specific rule.  Since PEF from various manufacturers
tend to use alert set 1, use alert set 1 for now when creating
a new policy.

Change-Id: I646c81baa3167f3fc076140494f7e8e564e7c0bd
2015-09-25 09:24:41 -04:00
Juliana Motira
494e6af9f2 Add custom OEM domain name command for Lenovo ThinkServers
Change-Id: Ied2e330badfdb0168fc359685684316f25aacf2d
2015-09-17 07:44:12 -03:00
Juliana Motira
2b8aa23676 Add custom OEM get remote KVM availability
for Lenovo ThinkServers

Change-Id: Ic62d8c4b64eb76f355403ad55ee34c32aa436d82
2015-09-11 15:12:08 -03:00
Jarrod Johnson
9b16aba8a8 Implement NTP support for Lenovo Thinkserver
Provide a framework for augmenting configuration with NTP data
and implement it for Lenovo thinkservers

Change-Id: I87dc79549619b8d912425a26d56d73f515630981
2015-09-10 10:23:11 -04:00
Jenkins
79d23bd4c6 Merge "Implement get/set of DCMI asset tag and MCI" 2015-09-08 13:18:47 +00:00
Jarrod Johnson
5f42788179 Implement get/set of DCMI asset tag and MCI
DCMI provides standard commands for accessing/setting asset tag and
BMC identifier.  Provide access to those facilities

Change-Id: If3f99d308e5b37ff3e99f19fd804f00a74bbb561
2015-09-04 16:37:28 -04:00
Juliana Motira
8dfc6c1a4d Add custom OEM PSU Based Power Capping config
for Lenovo ThinkServers

Change-Id: I0ee2d42d3c066befe7abbf958df3952c1b43e0a6
2015-09-04 08:42:44 -03:00
Jarrod Johnson
658c59f885 Autoenable alert policy for a destination
If an alert destination is set, there is no guarantee an
alert policy will actually use it.  Have the set_alert_destination
go through the alert policy table checking for an entry that references
the most recently set value, creating one if no match found.

Change-Id: I6bef40dddb18ababb3d85bb02e5d0ae73c82df2f
2015-09-02 10:02:36 -04:00
Juliana Motira
9d7782692a Add reset bmc command
Change-Id: I3d027303667ade4ad3790c5c614ea01f2ead6e39
2015-08-27 12:11:45 -03:00
Lucio Seki
41db3b8866 Add NMI diag command
Change-Id: Ie1e3b1033eff61b77df76b5261824748ed089b90
2015-08-27 09:05:11 -03:00