Remove force option from create_snapshots_in_db()
Removing force option from create_snapshots_in_db() since it is not needed because this function is only used by create_cgsnapshot() and the force flag is always True. Change-Id: I04f67334168651a9e1da06179b0cf93b640c95ca Signed-off-by: Nitin Madhok <nmadhok@g.clemson.edu>
This commit is contained in:
parent
fb3a51a2b4
commit
729d86d365
@ -731,7 +731,7 @@ class API(base.Base):
|
||||
snap_desc = cgsnapshot.description
|
||||
with group.obj_as_admin():
|
||||
self.volume_api.create_snapshots_in_db(
|
||||
context, group.volumes, snap_name, snap_desc, True,
|
||||
context, group.volumes, snap_name, snap_desc,
|
||||
cgsnapshot_id)
|
||||
|
||||
except Exception:
|
||||
|
@ -3177,7 +3177,6 @@ class VolumeTestCase(BaseVolumeTestCase):
|
||||
[test_volume],
|
||||
'fake_name',
|
||||
'fake_description',
|
||||
False,
|
||||
fake.CONSISTENCY_GROUP_ID)
|
||||
|
||||
def test_cannot_delete_volume_in_use(self):
|
||||
|
@ -793,10 +793,10 @@ class API(base.Base):
|
||||
def create_snapshots_in_db(self, context,
|
||||
volume_list,
|
||||
name, description,
|
||||
force, cgsnapshot_id):
|
||||
cgsnapshot_id):
|
||||
snapshot_list = []
|
||||
for volume in volume_list:
|
||||
self._create_snapshot_in_db_validate(context, volume, force)
|
||||
self._create_snapshot_in_db_validate(context, volume, True)
|
||||
if volume['status'] == 'error':
|
||||
msg = _("The snapshot cannot be created when the volume is "
|
||||
"in error status.")
|
||||
|
Loading…
Reference in New Issue
Block a user