From 4e2fdcb6e82d9fab4ea37749fc3f380430ffb0ff Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Fri, 16 Jul 2010 18:33:46 +0000 Subject: [PATCH] _redis_name wasn't picking up override_type correctly, and _redis_key wasn't using it --- nova/datastore.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/datastore.py b/nova/datastore.py index 8d6272ada285..47ce37992a98 100644 --- a/nova/datastore.py +++ b/nova/datastore.py @@ -105,7 +105,7 @@ class BasicModel(object): @classmethod def _redis_name(cls): - return self.override_type or cls.__name__ + return cls.override_type or cls.__name__ @classmethod def lookup(cls, identifier): @@ -147,7 +147,7 @@ class BasicModel(object): @property def __redis_key(self): - return '%s:%s' % (self.__class__.__name__.lower(), self.identifier) + return '%s:%s' % (self._redis_name(), self.identifier) def __repr__(self): return "<%s:%s>" % (self.__class__.__name__, self.identifier)