@@ -0,0 +1,1695 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4%0A%0A# Copyright 2010 United States Government as represented by the%0A# Administrator of the National Aeronautics and Space Administration.%0A# All Rights Reserved.%0A#%0A#    Licensed under the Apache License, Version 2.0 (the %22License%22); you may%0A#    not use this file except in compliance with the License. You may obtain%0A#    a copy of the License at%0A#%0A#         http://www.apache.org/licenses/LICENSE-2.0%0A#%0A#    Unless required by applicable law or agreed to in writing, software%0A#    distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT%0A#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the%0A#    License for the specific language governing permissions and limitations%0A#    under the License.%0A%0A%22%22%22%0ADatastore:%0A%0AMAKE Sure that ReDIS is running, and your flags are set properly,%0Abefore trying to run this.%0A%22%22%22%0A%0Aimport logging%0Aimport redis%0A%0Afrom nova import flags%0A%0AFLAGS = flags.FLAGS%0Aflags.DEFINE_string('redis_host', '127.0.0.1',%0A                    'Host that redis is running on.')%0Aflags.DEFINE_integer('redis_port', 6379,%0A                    'Port that redis is running on.')%0Aflags.DEFINE_integer('redis_db', 0, 'Multiple DB keeps tests away')%0A%0A%0Aclass Redis(object):%0A    def __init__(self):%0A        if hasattr(self.__class__, '_instance'):%0A            raise Exception('Attempted to instantiate singleton')%0A%0A    @classmethod%0A    def instance(cls):%0A        if not hasattr(cls, '_instance'):%0A            inst = redis.Redis(host=FLAGS.redis_host,%0A                               port=FLAGS.redis_port,%0A                               db=FLAGS.redis_db)%0A            cls._instance = inst%0A        return cls._instance%0A%0A%0A

make the fake-ldap system work again