From bace7fb1b6596c44c500468f689b9b1ef4ad5222 Mon Sep 17 00:00:00 2001 From: John Griffith Date: Fri, 17 Aug 2012 11:27:21 -0600 Subject: [PATCH] Add declare for xiv driver in fake_flags fixes bug 1038183 Change-Id: I324a8e4df61782c903146cc8e0bb1d1bbae46c2f --- cinder/tests/fake_flags.py | 1 + cinder/tests/test_xiv.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cinder/tests/fake_flags.py b/cinder/tests/fake_flags.py index 5c247302a..15f17114c 100644 --- a/cinder/tests/fake_flags.py +++ b/cinder/tests/fake_flags.py @@ -23,6 +23,7 @@ FLAGS = flags.FLAGS flags.DECLARE('iscsi_num_targets', 'cinder.volume.driver') flags.DECLARE('policy_file', 'cinder.policy') flags.DECLARE('volume_driver', 'cinder.volume.manager') +flags.DECLARE('xiv_proxy', 'cinder.volume.xiv') def set_defaults(conf): diff --git a/cinder/tests/test_xiv.py b/cinder/tests/test_xiv.py index 6328fa94e..842cda4be 100644 --- a/cinder/tests/test_xiv.py +++ b/cinder/tests/test_xiv.py @@ -27,6 +27,7 @@ from cinder.volume import xiv FLAGS = flags.FLAGS + FAKE = "fake" VOLUME = { 'size': 16, @@ -68,7 +69,7 @@ class XIVFakeProxyDriver(object): self.volumes[volume['name']] = volume def volume_exists(self, volume): - return self.volumes.get(volume['name'], None) != None + return self.volumes.get(volume['name'], None) is not None def delete_volume(self, volume): if self.volumes.get(volume['name'], None) is not None: -- 2.45.2