From 825d19abd1fc23c611c122422ad45c4fb3f02924 Mon Sep 17 00:00:00 2001 From: melanie witt Date: Thu, 1 Feb 2018 01:12:08 +0000 Subject: [PATCH] Drop extra loop which modifies Cinder volume status There is an existing loop which sets the proper value for status and attach_status right above, so this is doing nothing other than changing it to the incorrect value. Co-Authored-By: Mohammed Naser Change-Id: Iea0c1ea0a699b9519f66977391202956f17aac66 (cherry picked from commit 8cd64670ea23484fd1e1a8883e9841486169363e) --- nova/tests/fixtures.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/nova/tests/fixtures.py b/nova/tests/fixtures.py index 4dc2c892c441..f21c85e6953c 100644 --- a/nova/tests/fixtures.py +++ b/nova/tests/fixtures.py @@ -1387,12 +1387,6 @@ class CinderFixture(fixtures.Fixture): 'size': 1 } - # update the status based on existing attachments - has_attachment = any( - [volume['id'] in attachments - for attachments in self.attachments.values()]) - volume['status'] = 'attached' if has_attachment else 'detached' - # Check for our special image-backed volume. if volume_id == self.IMAGE_BACKED_VOL: # Make it a bootable volume. @@ -1567,12 +1561,6 @@ class CinderFixtureNewAttachFlow(fixtures.Fixture): 'size': 1 } - # update the status based on existing attachments - has_attachment = any( - [volume['id'] in attachments - for attachments in self.attachments.values()]) - volume['status'] = 'attached' if has_attachment else 'detached' - # Check for our special image-backed volume. if volume_id == self.IMAGE_BACKED_VOL: # Make it a bootable volume.