2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-15 04:07:48 +00:00

321 Commits

Author SHA1 Message Date
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
Lucio Seki
407c180d70 Add RAID drive and controller to ThinkServer inventory
Change-Id: Icfda252540cf4e2a7da720530889c9d60fbfeeff
2015-08-25 09:44:40 -03:00
Juliana Motira
0fb56d6de9 Changing Lenovo custom get_leds method
Change-Id: I7b57649a40935aa9f525b972c37199b7f3920bb6
2015-08-24 14:39:36 -03:00
Jenkins
6ca968e6bb Merge "Silently ignore broken sensors rather than error" 2015-08-24 17:21:31 +00:00
Juliana Motira
76f5c69e72 Add custom OEM firmware info parsing for Lenovo ThinkServers
Parse Version Info and add a command to retrieve it.

Change-Id: I7c321efb4861392fb4a9151ffd2a64ae2b5b7a42
2015-08-24 09:21:52 -03:00
Jarrod Johnson
4b72e8e769 Silently ignore broken sensors rather than error
Rather than break on bad sensor data from a vendor,
delete the records that are likely to have bad data.

Change-Id: I6417cd60b2f12e8979e25b3240a086a8aa5377ad
2015-08-20 17:03:00 -04:00
Jenkins
037b31ab5b Merge "Lessen degree of admin backoff" 2015-08-20 21:00:28 +00:00
Jarrod Johnson
b003f8f1ce Lessen degree of admin backoff
When completing RAKP, but denied by set session privilege level,
just repeat set session privilege level at lower privilege
rather than trying to go all the way back.

Change-Id: I3cc10320e81b8a3db3ebb7b17026f0d233e0b808
2015-08-20 16:30:26 -04:00
Juliana Motira
70aab7d76d Add disable user command
Change-Id: Ibdbdaa30677b916899b970b4923a65986334f7f6
2015-08-20 11:34:46 -03:00
Allan Vidal
59355018c4 Add LED parsing for Lenovo ThinkServers
Read and parse OEM LED status. Also remove a file that was no longer necessary.

Change-Id: I98b5de64e75eb66919cc6f8476157eb3a341ead1
2015-08-18 17:54:39 -03:00
Allan Vidal
ea3960c226 Add custom OEM inventory parsing for Lenovo ThinkServers
Parse OEM data for CPU, DIMM, PCI, drive and PSU inventory.

Change-Id: Ic75d03fb1b05c13702321d174c8dbb9a96a08ae4
2015-08-14 15:23:15 -03:00
Jarrod Johnson
74f7c4d936 Implement setting IPv4 configuration on target
As a complement to the previous change to read network configuration data, accept configuration
input and submit to the BMC.

Change-Id: I3d29237c98943fc93c160450861ac9c5d8e7758d
2015-08-05 13:04:44 -04:00