Permalink
Browse files

Raid controller and Physical Drive attributes need to be nullable

This can fail with
AttributeError: 'NoneType' object has no attribute 'strip'
otherwise

Closes-Bug: #1550328
Change-Id: I8eafe606407cddc1e9ea03a33473b65ff3b59384
  • Loading branch information...
anish committed Sep 27, 2016
1 parent 0cfeff4 commit 5804c28b5f13fc7637a2b0216c05a8ed6476929c
Showing with 3 additions and 2 deletions.
  1. +3 −2 dracclient/resources/raid.py
@@ -187,7 +187,8 @@ def _parse_drac_raid_controller(self, drac_controller):
def _get_raid_controller_attr(self, drac_controller, attr_name):
return utils.get_wsman_resource_attr(
drac_controller, uris.DCIM_ControllerView, attr_name)
drac_controller, uris.DCIM_ControllerView, attr_name,
nullable=True)
def list_virtual_disks(self):
"""Returns the list of virtual disks
@@ -290,7 +291,7 @@ def _parse_drac_physical_disk(self, drac_disk):
def _get_physical_disk_attr(self, drac_disk, attr_name):
return utils.get_wsman_resource_attr(
drac_disk, uris.DCIM_PhysicalDiskView, attr_name)
drac_disk, uris.DCIM_PhysicalDiskView, attr_name, nullable=True)
def convert_physical_disks(self, physical_disks, raid_enable):
"""Converts a list of physical disks into or out of RAID mode.

0 comments on commit 5804c28

Please sign in to comment.