From: Tom Swanson Date: Tue, 24 Mar 2015 17:57:22 +0000 (-0500) Subject: Dell Storage Center API change fails init_conn X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=cbc9fe5d61c6ea4aa3ca0fd97b9ccebd4bb2fe30;p=openstack-build%2Fcinder-build.git Dell Storage Center API change fails init_conn An attribute in the dell storage center REST API containing the world wide name of the target device changed. This meant that on intialize connection we were returning None instead of the wwn. The driver has been changed to look for the new attribute and to fall back to the old. If neither is found it will not return a target wwn of None. Change-Id: I6ae6870d46937089bd6ed8799895f7068eebf01d Closes-Bug: 1435935 --- diff --git a/cinder/volume/drivers/dell/dell_storagecenter_api.py b/cinder/volume/drivers/dell/dell_storagecenter_api.py index 1f5869a44..31f6428f4 100644 --- a/cinder/volume/drivers/dell/dell_storagecenter_api.py +++ b/cinder/volume/drivers/dell/dell_storagecenter_api.py @@ -765,9 +765,14 @@ class StorageCenterApi(object): controllerport = self._find_controller_port( self._get_id(cport)) if controllerport is not None: - wwn = controllerport.get('WWN') + # This changed case at one point or another. + # Look for both keys. + wwn = controllerport.get('wwn', + controllerport.get('WWN')) + if wwn is None: + LOG.error(_LE('Find_wwns: Unable to find port wwn')) serverhba = mapping.get('serverHba') - if serverhba is not None: + if wwn is not None and serverhba is not None: hbaname = serverhba.get('instanceName') if hbaname in initiators: if itmap.get(hbaname) is None: