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
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
extra['volume_id'] = vol_id
try:
- extra['name'] = snapshot['display_name']
+ extra['display_name'] = snapshot['display_name']
except AttributeError:
pass