Skip to content

Commit

Permalink
Fetch primary_status from raid controller
Browse files Browse the repository at this point in the history
This is already being polled but just not returned. This also
bring parity with standard racadm output.

Change-Id: Ia5f1c49b46463f4872960d2f652a7406b79101eb
  • Loading branch information
anish committed Oct 23, 2016
1 parent 0cfeff4 commit b6009a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dracclient/resources/raid.py
Expand Up @@ -106,7 +106,7 @@ def raid_state(self):


RAIDController = collections.namedtuple( RAIDController = collections.namedtuple(
'RAIDController', ['id', 'description', 'manufacturer', 'model', 'RAIDController', ['id', 'description', 'manufacturer', 'model',
'firmware_version']) 'primary_status', 'firmware_version'])


VirtualDiskTuple = collections.namedtuple( VirtualDiskTuple = collections.namedtuple(
'VirtualDisk', 'VirtualDisk',
Expand Down Expand Up @@ -182,6 +182,9 @@ def _parse_drac_raid_controller(self, drac_controller):
drac_controller, 'DeviceCardManufacturer'), drac_controller, 'DeviceCardManufacturer'),
model=self._get_raid_controller_attr( model=self._get_raid_controller_attr(
drac_controller, 'ProductName'), drac_controller, 'ProductName'),
primary_status=constants.PRIMARY_STATUS[
self._get_raid_controller_attr(drac_controller,
'PrimaryStatus')],
firmware_version=self._get_raid_controller_attr( firmware_version=self._get_raid_controller_attr(
drac_controller, 'ControllerFirmwareVersion')) drac_controller, 'ControllerFirmwareVersion'))


Expand Down
1 change: 1 addition & 0 deletions dracclient/tests/test_raid.py
Expand Up @@ -40,6 +40,7 @@ def test_list_raid_controllers(self, mock_requests):
description='Integrated RAID Controller 1', description='Integrated RAID Controller 1',
manufacturer='DELL', manufacturer='DELL',
model='PERC H710 Mini', model='PERC H710 Mini',
primary_status='ok',
firmware_version='21.3.0-0009') firmware_version='21.3.0-0009')


mock_requests.post( mock_requests.post(
Expand Down

0 comments on commit b6009a0

Please sign in to comment.