Naudit / pystorcli2

Python library provides wrapper around storcli tool to manage and control LSI MegaRAID controllers.
BSD 3-Clause "New" or "Revised" License
2 stars 7 forks source link

Drive state setter issue #5

Closed ulmitov closed 1 year ago

ulmitov commented 1 year ago
COMMAND: storcli64 /c0/e252/s15 set offline J
RC:
0
STDOUT:
{
"Controllers":[
{
    "Command Status" : {
        "CLI Version" : "007.2309.0000.0000 Sep 16, 2022",
        "Operating system" : "Linux 5.4.0-99-generic",
        "Controller" : 0,
        "Status" : "Success",
        "Description" : "Set Drive Offline Succeeded."
    }
}
]
}

STDERR:

Start / End / Elapsed    15:40:25.739667 / 15:40:25.941269 / 0:00:00.201602
2023-03-09 15:40:25 [ERROR] [set_drive_state] has an error
Traceback (most recent call last):
  File "/home/umit/dev/dev-tests/testsuites/functional/ssd/test_raid.py", line 358, in set_drive_state
    d.state = 'offline'
  File "/home/umit/.local/lib/python3.10/site-packages/pystorcli/drive.py", line 585, in state
    return common.response_setter(self._run(args))
  File "/home/umit/.local/lib/python3.10/site-packages/pystorcli/common.py", line 57, in response_setter
    return response_cmd(data)['Detailed Status'][0]['Value']
KeyError: 'Detailed Status'
ralequi commented 1 year ago

Bug confirmed.

Bugfix published on branch develop

Please @ulmitov confirm me it is fixed

ulmitov commented 1 year ago

works alright, thanks!