From 5804c28b5f13fc7637a2b0216c05a8ed6476929c Mon Sep 17 00:00:00 2001 From: Anish Bhatt Date: Mon, 26 Sep 2016 23:10:49 -0700 Subject: [PATCH] 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 --- dracclient/resources/raid.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dracclient/resources/raid.py b/dracclient/resources/raid.py index 85c8742..9dda612 100644 --- a/dracclient/resources/raid.py +++ b/dracclient/resources/raid.py @@ -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.