summaryrefslogtreecommitdiffstats
path: root/nova/auth
diff options
context:
space:
mode:
authorJesse Andrews <anotherjesse@gmail.com>2012-03-07 13:05:28 -0800
committerVishvananda Ishaya <vishvananda@gmail.com>2012-03-12 12:37:31 -0700
commit1bcf5f5431d3c9620596f5329d7654872235c7ee (patch)
tree3934fccd4a4fd943a1df72a673e11420d31f519d /nova/auth
parent43b95ca29ec5ad318c771d03d151a9425e138cec (diff)
downloadnova-1bcf5f5431d3c9620596f5329d7654872235c7ee.tar.gz
nova-1bcf5f5431d3c9620596f5329d7654872235c7ee.tar.xz
nova-1bcf5f5431d3c9620596f5329d7654872235c7ee.zip
improve speed of metadata
* don't load every possible answer, only do what is needed * cache instance data for a given address for a 15 seconds using either memcache or fake memcache (in-memory). This means only a single queue/db lookup for multiple calls to metadata service * add cache expirey to fake memcache (don't grow forever) and move it to nova.common.memorycache Addresses Bug #851159 Change-Id: Icf794156e055b18915b8b5be9ba2ab97d2338bbe
Diffstat (limited to 'nova/auth')
-rw-r--r--nova/auth/ldapdriver.py2
-rw-r--r--nova/auth/manager.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/nova/auth/ldapdriver.py b/nova/auth/ldapdriver.py
index 4c9431b8e..91135f1c7 100644
--- a/nova/auth/ldapdriver.py
+++ b/nova/auth/ldapdriver.py
@@ -96,7 +96,7 @@ LOG = logging.getLogger(__name__)
if FLAGS.memcached_servers:
import memcache
else:
- from nova.testing.fake import memcache
+ from nova.common import memorycache as memcache
# TODO(vish): make an abstract base class with the same public methods
diff --git a/nova/auth/manager.py b/nova/auth/manager.py
index ca2a3add5..f03e453b8 100644
--- a/nova/auth/manager.py
+++ b/nova/auth/manager.py
@@ -97,7 +97,7 @@ LOG = logging.getLogger(__name__)
if FLAGS.memcached_servers:
import memcache
else:
- from nova.testing.fake import memcache
+ from nova.common import memorycache as memcache
class AuthBase(object):