From 5cbc00ab7f90c130401e9a4ec42b612c066f4740 Mon Sep 17 00:00:00 2001 From: lkuchlan Date: Sun, 26 Mar 2017 11:49:54 +0300 Subject: [PATCH] Remove name checking for api version 1 Since cinder api version 1 is deprecated, it's redundant to check 'display_name' field. Change-Id: I17f610994f496da246dae0c5b77c20ab32f19218 --- tempest/scenario/manager.py | 7 +------ tempest/scenario/test_stamp_pattern.py | 5 +---- tempest/scenario/test_volume_boot_pattern.py | 8 +------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py index 727afd6959..6aa2a8397c 100644 --- a/tempest/scenario/manager.py +++ b/tempest/scenario/manager.py @@ -235,12 +235,7 @@ class ScenarioTest(tempest.test.BaseTestCase): volume['id']) self.addCleanup(test_utils.call_and_ignore_notfound_exc, self.volumes_client.delete_volume, volume['id']) - - # NOTE(e0ne): Cinder API v2 uses name instead of display_name - if 'display_name' in volume: - self.assertEqual(name, volume['display_name']) - else: - self.assertEqual(name, volume['name']) + self.assertEqual(name, volume['name']) waiters.wait_for_volume_resource_status(self.volumes_client, volume['id'], 'available') # The volume retrieved on creation has a non-up-to-date status. diff --git a/tempest/scenario/test_stamp_pattern.py b/tempest/scenario/test_stamp_pattern.py index 96b423d62e..5f5d70150a 100644 --- a/tempest/scenario/test_stamp_pattern.py +++ b/tempest/scenario/test_stamp_pattern.py @@ -68,10 +68,7 @@ class TestStampPattern(manager.ScenarioTest): volume['id'], 'available') waiters.wait_for_volume_resource_status(self.snapshots_client, snapshot['id'], 'available') - if 'display_name' in snapshot: - self.assertEqual(snapshot_name, snapshot['display_name']) - else: - self.assertEqual(snapshot_name, snapshot['name']) + self.assertEqual(snapshot_name, snapshot['name']) return snapshot def _wait_for_volume_available_on_the_system(self, ip_address, diff --git a/tempest/scenario/test_volume_boot_pattern.py b/tempest/scenario/test_volume_boot_pattern.py index ae0230e542..888bff2c94 100644 --- a/tempest/scenario/test_volume_boot_pattern.py +++ b/tempest/scenario/test_volume_boot_pattern.py @@ -81,13 +81,7 @@ class TestVolumeBootPattern(manager.ScenarioTest): self.addCleanup(self.snapshots_client.delete_snapshot, snap['id']) waiters.wait_for_volume_resource_status(self.snapshots_client, snap['id'], 'available') - - # NOTE(e0ne): Cinder API v2 uses name instead of display_name - if 'display_name' in snap: - self.assertEqual(snap_name, snap['display_name']) - else: - self.assertEqual(snap_name, snap['name']) - + self.assertEqual(snap_name, snap['name']) return snap def _delete_server(self, server):