Merge "3PAR: Inconsistency in copied and source CG"
This commit is contained in:
commit
8c186565c3
@ -4113,7 +4113,8 @@ class HPE3PARBaseDriver(object):
|
|||||||
mock.ANY,
|
mock.ANY,
|
||||||
self.VOLUME_NAME_3PAR,
|
self.VOLUME_NAME_3PAR,
|
||||||
HPE3PAR_CPG,
|
HPE3PAR_CPG,
|
||||||
{'snapCPG': HPE3PAR_CPG, 'online': True}),
|
{'snapCPG': HPE3PAR_CPG, 'online': True,
|
||||||
|
'tpvv': mock.ANY, 'tdvv': mock.ANY}),
|
||||||
mock.call.addVolumeToVolumeSet(
|
mock.call.addVolumeToVolumeSet(
|
||||||
self.CONSIS_GROUP_NAME,
|
self.CONSIS_GROUP_NAME,
|
||||||
self.VOLUME_NAME_3PAR)]
|
self.VOLUME_NAME_3PAR)]
|
||||||
|
@ -565,7 +565,10 @@ class HPE3PARCommon(object):
|
|||||||
volume_name = self._get_3par_vol_name(volume['id'])
|
volume_name = self._get_3par_vol_name(volume['id'])
|
||||||
type_info = self.get_volume_settings_from_type(volume)
|
type_info = self.get_volume_settings_from_type(volume)
|
||||||
cpg = type_info['cpg']
|
cpg = type_info['cpg']
|
||||||
optional = {'online': True, 'snapCPG': cpg}
|
tpvv = type_info.get('tpvv', False)
|
||||||
|
tdvv = type_info.get('tdvv', False)
|
||||||
|
optional = {'online': True, 'snapCPG': cpg,
|
||||||
|
'tpvv': tpvv, 'tdvv': tdvv}
|
||||||
self.client.copyVolume(snap_name, volume_name, cpg, optional)
|
self.client.copyVolume(snap_name, volume_name, cpg, optional)
|
||||||
self.client.addVolumeToVolumeSet(vvs_name, volume_name)
|
self.client.addVolumeToVolumeSet(vvs_name, volume_name)
|
||||||
|
|
||||||
|
@ -518,6 +518,14 @@ class EntryCreateTask(flow_utils.CinderTask):
|
|||||||
pre-cursor task.
|
pre-cursor task.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
src_volid = kwargs.get('source_volid')
|
||||||
|
src_vol = None
|
||||||
|
if src_volid is not None:
|
||||||
|
src_vol = objects.Volume.get_by_id(context, src_volid)
|
||||||
|
bootable = False
|
||||||
|
if src_vol is not None:
|
||||||
|
bootable = src_vol.bootable
|
||||||
|
|
||||||
volume_properties = {
|
volume_properties = {
|
||||||
'size': kwargs.pop('size'),
|
'size': kwargs.pop('size'),
|
||||||
'user_id': context.user_id,
|
'user_id': context.user_id,
|
||||||
@ -529,6 +537,7 @@ class EntryCreateTask(flow_utils.CinderTask):
|
|||||||
'display_description': kwargs.pop('description'),
|
'display_description': kwargs.pop('description'),
|
||||||
'display_name': kwargs.pop('name'),
|
'display_name': kwargs.pop('name'),
|
||||||
'multiattach': kwargs.pop('multiattach'),
|
'multiattach': kwargs.pop('multiattach'),
|
||||||
|
'bootable': bootable,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Merge in the other required arguments which should provide the rest
|
# Merge in the other required arguments which should provide the rest
|
||||||
|
Loading…
Reference in New Issue
Block a user