]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add declare for xiv driver in fake_flags
authorJohn Griffith <john.griffith@solidfire.com>
Fri, 17 Aug 2012 17:27:21 +0000 (11:27 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Fri, 17 Aug 2012 19:50:31 +0000 (13:50 -0600)
  fixes bug 1038183

Change-Id: I324a8e4df61782c903146cc8e0bb1d1bbae46c2f

cinder/tests/fake_flags.py
cinder/tests/test_xiv.py

index 5c247302a8ca193735e933b0fa7d81603d606c79..15f17114c5e1b80a8f185a3970dbd03ddc04d776 100644 (file)
@@ -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):
index 6328fa94eb75c3f3e18a63a96b1e3b4bc2e8bffa..842cda4bee5ea3c5dc2fffca0eb35942258ebac1 100644 (file)
@@ -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: