From 7d57146bc4201c9d26de7f7f5a4a834ca0dafa7b Mon Sep 17 00:00:00 2001 From: Kurt Martin Date: Thu, 8 Aug 2013 14:14:56 -0700 Subject: [PATCH] 3PAR drivers creating incorrect comment data The 3PAR volumes created from a shapshot had incorrect comment data that gets added in the comment section of the volumes on the backend. This patch fixes the display name and description by getting the correct data when the volume is created. This patch also fixes the inconsistency in how the keys (name vs. display_name) were used in the comments. Change-Id: I61af8ceb08d862f2b9dea2d9bb44c803e0b75a10 Fixes: bug 1210245 --- cinder/volume/drivers/san/hp/hp_3par_common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cinder/volume/drivers/san/hp/hp_3par_common.py b/cinder/volume/drivers/san/hp/hp_3par_common.py index 9840d52e3..e6e4236a6 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_common.py +++ b/cinder/volume/drivers/san/hp/hp_3par_common.py @@ -899,11 +899,11 @@ exit if vvs_name is None: qos = self._get_qos_by_volume_type(volume_type) - name = snapshot.get('display_name', None) + name = volume.get('display_name', None) if name: - extra['name'] = name + extra['display_name'] = name - description = snapshot.get('display_description', None) + description = volume.get('display_description', None) if description: extra['description'] = description @@ -943,7 +943,7 @@ exit extra['volume_id'] = vol_id try: - extra['name'] = snapshot['display_name'] + extra['display_name'] = snapshot['display_name'] except AttributeError: pass -- 2.45.2