2
0
mirror of https://opendev.org/x/pyghmi synced 2026-01-12 03:02:33 +00:00
Commit Graph

1201 Commits

Author SHA1 Message Date
Jarrod Johnson
4cfaf03d6c Add iDrac virtual cd/floppy
iDRAC does not support standard
redfish boot devices, provide oem override
in such case to use the OEM interface.

Change-Id: I53d7bb1d82035e621802c20f46000760cc8631a8
1.5.33
2022-01-06 16:03:25 -05:00
Jarrod Johnson
51eebd39fc Update generic redfish remote media for eject/insert
Certain redfish implementation only allow manipulation
of remote media through Actions.  Detect when relevant
Actions are indicated and use them if offered.

Change-Id: I4eac9e5f4edb111f45551280fd98cdbc9c10c178
1.5.32
2022-01-04 11:00:57 -05:00
Jan-Philipp Litza
e2b2f6806b Refactor oemmap lookup
Previously, looking up an unknown OEM resulted in an exception being
logged:

exception while get_oem_handler, oemid:{'device_id': 32, 'device_revision': 1, 'manufacturer_id': 10876, 'product_id': 2414, 'firmware_version': '1.73'}
Traceback (most recent call last):
  File "/omd/sites/plutex/local/lib/python3/pyghmi/ipmi/oem/lookup.py", line 43, in get_oem_handler
    return (oemmap[oemid['manufacturer_id']].OEMHandler(oemid,
KeyError: 10876

So while I was at it, I also reduced duplicate code.

Signed-off-by: Jan-Philipp Litza <jpl@plutex.de>
Change-Id: Ib2483aeb3f92bcafbaa877eb1c0318a385f97474
1.5.31
2021-12-17 15:45:05 +01:00
Jarrod Johnson
3606780826 Better tolerate issues during pause
Unrelated issue can derail an update process. Make pause
unlikely to throw unexpected issues, but print it out
just in case.

Further, give a hint when one specific scenario comes up that was
seen and hard to debug.

Change-Id: I635d3fc8df10b9bee9fc261d88beb7002b689a7e
1.5.30
2021-12-15 09:39:11 -05:00
Zuul
e5d059e389 Merge "remove wrong used ipmicmd in command.py" 2021-12-14 17:40:51 +00:00
Zuul
5b6f52a770 Merge "Fix bmc network configuration over ipv6 client" 2021-12-09 18:23:09 +00:00
Jarrod Johnson
5345a466c6 Fix bmc network configuration over ipv6 client
Change-Id: I62c6f774085a863e28481918d7072faff8594c5e
2021-12-09 11:41:04 -05:00
luyf5
f1ff0a0242 remove wrong used ipmicmd in command.py
Change-Id: Id535d338569caade6c2a32214f64469b33209b53
2021-12-01 11:11:24 +08:00
Zuul
d86b49c104 Merge "ipmi/command.py: Add bridge_request argument to set|get_power" 2021-11-29 12:23:28 +00:00
Jan-Philipp Litza
813de399b5 Fix size of SDR records becoming a float
While receiving the SDR, when the size is uneven, its division by 2
causes it to become a float instead of an integer, leading to a
TypeError later on:

Traceback (most recent call last):
  File "gipmi/sdr.py", line 634, in __init__
    self.read_info()
  File "gipmi/sdr.py", line 665, in read_info
    self.get_sdr()
  File "gipmi/sdr.py", line 740, in get_sdr
    sdrrec = self.ipmicmd.raw_command(netfn=0x0a, command=0x23,
  File "gipmi/command.py", line 500, in raw_command
    rsp = self.ipmi_session.raw_command(netfn=netfn, command=command,
  File "gipmi/private/session.py", line 779, in raw_command
    self._send_ipmi_net_payload(netfn, command, data,
  File "gipmi/private/session.py", line 819, in _send_ipmi_net_payload
    data = bytearray(data)
TypeError: 'float' object cannot be interpreted as an integer

Change-Id: I3e123487b27ef385823b1a20652195c7588f5d6c
2021-11-24 17:01:34 +01:00
Masayoshi Mizuma
0bba2bc31f ipmi/command.py: Add bridge_request argument to set|get_power
Add bridge_request argument to set_power and get_power so that the
power request can be sent to the remote target.

For example of the usage:
    ipmi_cmd = command.Command(bmc, userid, password)
    ipmi_cmd.get_power(bridge_request={"addr": 0x20})

Change-Id: I80428f8fbbec3fab905537df5000007fa20d2e92
2021-11-16 22:30:30 -05:00
Zuul
1ef6a0cb8b Merge "Fix nonce login" 2021-11-15 22:55:24 +00:00
Zuul
40d8f6c56f Merge "Remove library level logging" 2021-11-15 22:41:34 +00:00
Jarrod Johnson
97dc9cf1b1 Fix nonce login
Redfish needed changes from ipmi side, also
need to tolerate a gzipped reply.

Change-Id: Ib9ffd4be9e4616d5a0b0a5d8ee35b140dd563ace
2021-11-15 16:19:57 -05:00
Jarrod Johnson
ccc313a9bc Remove library level logging
The logging itself was prone to bugs, remove it for now.

Change-Id: I67d69fde378005f27714ae9562472fc11ed0a654
2021-11-15 16:06:06 -05:00
Penghui Cui
3a24fdbd51 Support SDR extention in oem handler
Change-Id: I69f10b90e74cfc6562ad1cbadb49b5b8288a98a3
2021-11-15 21:31:43 +08:00
Penghui Cui
da4120dd21 add **kwargs to support parameter extention
Change-Id: Id680ea1ddac4b99a7efc211ab21063d8e480ff14
2021-11-11 13:41:44 +08:00
Zuul
6de0a7be85 Merge "Fix redfish operation over ipv6 link local" 2021-11-09 19:44:14 +00:00
Jarrod Johnson
a36bbe96e4 Fix redfish operation over ipv6 link local
Change-Id: I50149cc0eeea2affe727ddd6888cd656c52f6c1f
2021-11-09 12:15:05 -05:00
Jarrod Johnson
023bf2e96f Fix power state fetch
A change imposed a one second delay
on get_power_state unconditionally.

Fix by changing back the way it was.

Change-Id: Ib94d9dfe086146c446cd57d0228c13c8d7aa2116
2021-11-09 11:41:25 -05:00
Zuul
630ca9928a Merge "Add channel parameter to add_extra_net_configuration" 2021-11-09 11:36:20 +00:00
luyf5
8a95b954e8 Add channel parameter to add_extra_net_configuration
Change-Id: I9f0b1adb0f305b6a60c9c6b0cb3ae9563b4ec85f
2021-11-09 17:06:35 +08:00
Penghui Cui
bf240626ae remove the check as it may cause RD650 failure
Change-Id: Id5975c124fae533e1dec52721dd1c94e2a9ce8e8
2021-11-09 15:32:45 +08:00
Zuul
3a8fec21fe Merge "Fix construction of pet acknowledgement" 2021-11-08 20:54:37 +00:00
Jarrod Johnson
c894195cb1 Support nonce based web login
Support the newer web loogin procedure that requires a nonce to
get going.

Change-Id: Ia6c532f0e18d2b101ca9cd9ba1c539fdedea2862
2021-11-08 13:25:07 -05:00
Jarrod Johnson
990a526a8d Fix construction of pet acknowledgement
The change to handle lun in decoding broke
construction of the acknowledgemennt in the PET
path, fix to go back to previous PET handling.

Change-Id: Ib20e67cd9462d846cb3d925a5c8989eef6140e8b
2021-11-08 07:26:56 -05:00
Jarrod Johnson
a41f576206 Do not reap refreshing web sessions
If a web session is getting refreshed
by some function, do not weblogout
behind its back.

Wait until no refresh activity is detected
to perform weblogout.

Change-Id: I3fec8ecf84e153169fa5fd10745b1f323950085f
2021-11-05 17:01:35 -04:00
Jarrod Johnson
915a2afbed Detect 'default' nic by matching connection address
This carries forward the configure 'default' nic for
systems that nominally have multiple interfaces.

Change-Id: I5916efde5aa57d7682fe08eff0fdc8864d79aa52
2021-11-05 08:54:47 -04:00
Zuul
f797e95e84 Merge "Recognize another etag message" 2021-11-04 13:59:33 +00:00
Jarrod Johnson
c2bd02e884 Recognize another etag message
Some implementations use a differennt msgid to indicate the etag
mismatch, fix support for those platforms.

Further, it was discovered that if the display label for a setting
changed the setting to no longer match the setting, the retry would
be invalid.  Support checking for mismatched spacing.

Change-Id: I9f83bfcf1c163fa36d6f684dd2685c828bd63507
2021-11-04 07:39:57 -04:00
Penghui Cui
b2ef82a685 Use str as key instead of float to avoid computing problems
Change-Id: I9084e627e1923b27ceb3c5566306782f5ee45280
2021-10-25 15:56:52 +08:00
Jarrod Johnson
6730deaa34 Fix decode_eventdata in events
A partial change failed to cover a calling function.

Change-Id: I61c3d51e7ceb7cd438be7fdea9130d857a779343
2021-10-22 13:49:31 -04:00
Jarrod Johnson
e6fd1be7cc Try to log out of a stale web session
Over time, confluent was inflicting multiple web
sessions, seemingly worse lately.

Change to attempt logout to avoid filling up web sessions.

Change-Id: I1b2e4e1a55bb26b9799973659c444fc15ade059d
2021-10-19 16:04:53 -04:00
Zuul
19ad8680a3 Merge "Improve tests" 2021-10-19 12:15:09 +00:00
Riccardo Pittau
2064aa2f4f Improve tests
Upgrade tox version
Add basic venv environment for tox
Upgrade hacking and pycodestyle versions
Add coverage tests
Move to yoga openstack tests

Change-Id: Ic452ed0ae4075f4b9ece1e49b163b8da5343910e
2021-10-18 14:28:18 +02:00
Penghui Cui
d71188bbd2 Support extention for alert destination handling
Change-Id: I02582ec11a432dac0eba7750750182d6d24addd3
2021-10-14 10:06:40 +08:00
Jarrod Johnson
e00036252b Revert to using the sensor reading
The senser event status is optional, so instead
apply the assertion mask to the reading
as a means of letting assertion mask hide
"don't care" threshold crossing.

Change-Id: I23eb741bc4d9edfbdeba5bcf2e2f970959c4fc8d
2021-10-12 12:35:05 -04:00
Zuul
eb10ef736f Merge "Support alarm level definition extention" 2021-10-12 12:15:59 +00:00
Penghui Cui
0b94605ffd Support alarm level definition extention
Change-Id: I38ec04e46bf5a70dc87991a8f187f5421902b6d5
2021-10-08 19:49:21 +08:00
Penghui Cui
a1c48b6f85 Support extention for set_power/get_power
1. support extention handle in plugins
    2. add log for bug locating
    3. refactor to avoid duplicate code.

Change-Id: I3aa607034d9f3f9f336df3c07f5a7968b6651718
2021-10-08 15:34:43 +08:00
Zuul
edc59e436b Merge "Add optane dimm for XCC systems" 2021-10-06 13:20:04 +00:00
Zuul
14a53d9aa5 Merge "Add method for power capping get/set" 2021-10-06 12:15:10 +00:00
Jarrod Johnson
612d6d998d Add optane dimm for XCC systems
Optane DIMMs are not normal SPD,
use the proprietary API to fetch information.

Change-Id: If4e9cca602f982c35a756f89b02eae9e35545785
2021-10-06 07:56:19 -04:00
Penghui Cui
44e155931b add check to avoid exception and add some fields
Change-Id: Ie8cde288de3af96f4c68f837595afd5ad3b60520
2021-09-28 13:52:03 +08:00
Penghui Cui
7da708b906 Add method for power capping get/set
Change-Id: Icb1e1069d00fc7fa9412c65ac76942bdde765a0a
2021-09-28 09:33:37 +08:00
Zuul
eed3d5b74f Merge "Add extention for get/set asset tag, fix bugs for overriding" 2021-09-27 13:11:32 +00:00
Zuul
49d21bc7da Merge "Support getting net configuration from oem handler" 2021-09-27 13:11:31 +00:00
Zuul
c0a750ba20 Merge "Add handler for kent" 2021-09-27 13:11:30 +00:00
Zuul
de68976bdc Merge "Add firmware version to device_id for some devices change with version" 2021-09-27 12:57:11 +00:00
luyf5
2b0a6d1ed4 Add handler for kent
Changes are from:
25e7ffb995
(111619) [manage] Unable to manage Kent/Riddler and Wild Thing
	1. Add handler for kent.

Change-Id: I4e61d3a99aa1f8e144c6377a82f292ab0e8b9360
2021-09-27 17:36:51 +08:00