Skip to content

Commit

Permalink
3PAR drivers creating incorrect comment data
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kumartin committed Aug 8, 2013
1 parent ce7e70c commit 7d57146
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cinder/volume/drivers/san/hp/hp_3par_common.py
Expand Up @@ -899,11 +899,11 @@ def create_volume_from_snapshot(self, volume, snapshot):
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

Expand Down Expand Up @@ -943,7 +943,7 @@ def create_snapshot(self, snapshot):
extra['volume_id'] = vol_id

try:
extra['name'] = snapshot['display_name']
extra['display_name'] = snapshot['display_name']
except AttributeError:
pass

Expand Down

0 comments on commit 7d57146

Please sign in to comment.