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

299 Commits

Author SHA1 Message Date
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
Jarrod Johnson
1cfc4bf4ac Implement read of IPv4 network configuration
Use standard IPv4 related configuration parameters
to fetch relevant data for basic network connectivity.

Change-Id: I2b93da5be0196ff5f15e240ed8f8e0fd819ddd54
2015-08-03 15:00:45 -04:00
Jarrod Johnson
abb453015a Reword some event/sensor text
The physical security related events/sensors
were confusing.  Reword them for better
understanding.

Change-Id: I033b07195848123494d30d9826f441bba140fd10
2015-07-20 11:35:59 -04:00
Jenkins
786eddeb18 Merge "Support 20 byte passwords" 2015-07-20 14:49:09 +00:00
Jarrod Johnson
4e9784b185 Provide numeric key data in state description
Sensor readings have new fields added, allowing some callers
to use easier comparison and lookups.  For example some
may want to have a full setence string for permutation of
reading types, sensor types, and specific event.

Change-Id: I743a32777259516f8febf5a0a62757ce5a4cee59
2015-07-15 16:20:23 -04:00
Jarrod Johnson
9dbb24236f Support 20 byte passwords
The IPMI 2.0 spec allows 20 byte passwords.
If a password is less than 16 bytes, then use
the 1.5 scheme as before.  If between 16 and 21,
then attempt IPMI 2.0 scheme.  Raise when over 20.

Change-Id: I25016b8608d9dbf5d436afd75bd07f0d4eed6d81
2015-07-15 14:19:33 -04:00
Jarrod Johnson
d89be6b894 Provide time data in alert decode
When an alert is received, decode the
provided timestamp.  Additionally apply
the time correction logic as used on the
event log data.

Change-Id: I2534f3b8288739e1b50fd335d878e9c4b5458b28
2015-07-13 09:49:27 -04:00
Jenkins
590faabd4c Merge "Extend and document user_delete in ipmi.command" 2015-07-07 17:57:53 +00:00
Jenkins
098ef93113 Merge "Have session.py work better in Windows" 2015-07-07 14:48:24 +00:00
Jarrod Johnson
cf01aa5fdb Extend and document user_delete in ipmi.command
User deletion has some limitations making the function a best effort.
Document this and provide at least one additional attempt at deleting
a user to cover more vendors.  This still does not cover all vendors,
and OEM extensibility is likely to be the answer to allow this to
cover more implementations.

Change-Id: I6af3f761c587f9eb8b58b3408052d6585847f7d6
2015-07-07 10:47:59 -04:00
Jarrod Johnson
02c058ee06 Have session.py work better in Windows
Have monotonic_time reworked to use Windows function
when available.  Eliminate use of an os.pipe to break
into the select.  When we want to interrupt the select,
use the first udp socket as the angle to break in.
Additionally, provide a Windows friendly value for
IPPROTO_IPV6 should the socket module fail us.

Change-Id: I8f566543c8da28eb7ed76f1cb80ff4cb2dcbba96
2015-07-02 16:26:25 -04:00
Jarrod Johnson
5b7bd84895 Fix PET acknowledge errors
The PET acknowledge code was incorrect.  Fix it by
properly extracting the fields by index and fixing reference
to self._ipmicmd and also do not treat a failure on acknowledge as
an error for now.

Change-Id: Icafc21807a59e53acf3249170450bf4dbeee9e5d
2015-06-30 10:54:16 -04:00
Jarrod Johnson
180288fe51 Provide useful error on bad username
When a bad username was supplied, an attempt to start over
was done without resetting the state machine of the retransmit
facility.  As a consequence, it failed to actually proceed in
restarting the process and would time out rather than returning
the appropriate error.

Change-Id: Ib3207c214fcf96f0dcdb8c4ca3b5387fb58ce1ae
2015-06-23 09:36:21 -04:00
Jenkins
20cbbf2470 Merge "Acknowledge PET alert on decode" 2015-06-18 12:52:07 +00:00
Jarrod Johnson
7ba12de874 Gather Thinkserver CPU and Memory independently
If CPU inventory is unavalible, proceed to get memory inventory.
If memory inventory is unavailable, cleanly omit the data.

Change-Id: If9d5eec1aa5dcc7a2800e30636ff4cedee48a311
2015-06-11 14:33:12 -04:00
Jarrod Johnson
59d7945957 Handle Lenovo Thinkserver lacking OEM inventory
If a Thinkserver responds negatively to request for OEM
inventory data, gracefully drop out and return empty
information rather than passing it up the stack.

Change-Id: I16d176606bb95d56244dfea43f9d828ff046bbc1
2015-06-11 13:36:31 -04:00
Jarrod Johnson
d6f0a2797a Add record id to SEL data
Provide calling code with the identifier number for a particular event.

Change-Id: Icc274e5475b7a266c1ff36bdc796197e98256a8c
2015-06-10 13:46:12 -04:00
Jarrod Johnson
26942c7860 Provide extensibility to sensors by OEM
OEMs frequently employ special commands for data that logically
would be expected to manifest as a sensor.  Provide a facility
for OEMs to make up sensors and provide data in the form of a
'sensor' without requiring SDR.

Change-Id: I6bce99680ff64ffe2dbc0898d193a17dde066b9c
2015-06-09 11:11:02 -04:00
Jarrod Johnson
275288cf79 Acknowledge PET alert on decode
In case a PET emitter wants acknowledgement,
submit a PET acknowledge back to the relevant
BMC when decoding a PET event.

Change-Id: Ifd3038fec2f72161b48bbf7095d2a0e2100b4d91
2015-06-08 14:22:31 -04:00
Jarrod Johnson
9e64b16291 Provide interface for decoding PET alerts
Enable a python application tasked with decoding PET
coming in via SNMP to decode it in the same manner
an event log entry is decoded.

Change-Id: If8272989ba5d9062183e5decab959729dda85d62
0.8.0
2015-06-08 09:55:40 -04:00
Jarrod Johnson
249ea5dda2 Handle unknown entity ids
Vendors can do other entitiy ids.  Have a catch all
that provides the raw value in case there
is no better lookup for the number.

Change-Id: I66a226e1b38f6b31b95bfe58e044875decae09a8
2015-06-05 13:55:30 -04:00
Jenkins
aeece54e4c Merge "Tolerate alternative return code for FRU size" 2015-06-05 15:29:39 +00:00
Jarrod Johnson
6cfa823ea9 Tolerate alternative return code for FRU size
202 means 'Cannot return number of request bytes', which is pretty on the nose
for the scenario at hand.  Include that in the conditions to reduce the request size.
Thanks to Rafael Debarros for this.

Change-Id: I833faf2559a93e468748a72db29e6967bc800207
2015-06-05 11:00:25 -04:00