diff --git a/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py b/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py index b1a699f05..77d055ac0 100644 --- a/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py +++ b/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py @@ -4113,7 +4113,8 @@ class HPE3PARBaseDriver(object): mock.ANY, self.VOLUME_NAME_3PAR, HPE3PAR_CPG, - {'snapCPG': HPE3PAR_CPG, 'online': True}), + {'snapCPG': HPE3PAR_CPG, 'online': True, + 'tpvv': mock.ANY, 'tdvv': mock.ANY}), mock.call.addVolumeToVolumeSet( self.CONSIS_GROUP_NAME, self.VOLUME_NAME_3PAR)] diff --git a/cinder/volume/drivers/hpe/hpe_3par_common.py b/cinder/volume/drivers/hpe/hpe_3par_common.py index edbb62f61..a421e0645 100644 --- a/cinder/volume/drivers/hpe/hpe_3par_common.py +++ b/cinder/volume/drivers/hpe/hpe_3par_common.py @@ -565,7 +565,10 @@ class HPE3PARCommon(object): volume_name = self._get_3par_vol_name(volume['id']) type_info = self.get_volume_settings_from_type(volume) 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.addVolumeToVolumeSet(vvs_name, volume_name) diff --git a/cinder/volume/flows/api/create_volume.py b/cinder/volume/flows/api/create_volume.py index 6b4f2bf1c..54daa2224 100644 --- a/cinder/volume/flows/api/create_volume.py +++ b/cinder/volume/flows/api/create_volume.py @@ -518,6 +518,14 @@ class EntryCreateTask(flow_utils.CinderTask): 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 = { 'size': kwargs.pop('size'), 'user_id': context.user_id, @@ -529,6 +537,7 @@ class EntryCreateTask(flow_utils.CinderTask): 'display_description': kwargs.pop('description'), 'display_name': kwargs.pop('name'), 'multiattach': kwargs.pop('multiattach'), + 'bootable': bootable, } # Merge in the other required arguments which should provide the rest