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
This commit is contained in:
Anish Bhatt 2016-09-26 23:10:49 -07:00
parent 0cfeff4d82
commit 5804c28b5f
1 changed files with 3 additions and 2 deletions

View File

@ -187,7 +187,8 @@ class RAIDManagement(object):
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 @@ class RAIDManagement(object):
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.