summaryrefslogtreecommitdiffstats
path: root/nova/auth
diff options
context:
space:
mode:
authorRyan Lane <laner@controller>2010-11-24 15:46:22 +0000
committerRyan Lane <laner@controller>2010-11-24 15:46:22 +0000
commit7d462fd04cf799689bcbea0b926f0bd38e64869c (patch)
tree1e032a18194694783dfe5475a782a56a75c746d0 /nova/auth
parentebffd9cb35af4257a085f85abf64e0c2baf31ff0 (diff)
parent6e349f6ea1846c104f620aa68a26cfc753e8977d (diff)
Merge from main branch
Diffstat (limited to 'nova/auth')
-rw-r--r--nova/auth/fakeldap.py11
-rw-r--r--nova/auth/manager.py3
2 files changed, 6 insertions, 8 deletions
diff --git a/nova/auth/fakeldap.py b/nova/auth/fakeldap.py
index cf3a84a5d..46e0135b4 100644
--- a/nova/auth/fakeldap.py
+++ b/nova/auth/fakeldap.py
@@ -15,12 +15,12 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-"""
-Fake LDAP server for test harnesses.
+"""Fake LDAP server for test harness, backs to ReDIS.
This class does very little error checking, and knows nothing about ldap
-class definitions. It implements the minimum emulation of the python ldap
+class definitions. It implements the minimum emulation of the python ldap
library to work with nova.
+
"""
import json
@@ -77,9 +77,8 @@ def initialize(_uri):
def _match_query(query, attrs):
"""Match an ldap query to an attribute dictionary.
- &, |, and ! are supported in the query. No syntax checking is performed,
- so malformed querys will not work correctly.
-
+ The characters &, |, and ! are supported in the query. No syntax checking
+ is performed, so malformed querys will not work correctly.
"""
# cut off the parentheses
inner = query[1:-1]
diff --git a/nova/auth/manager.py b/nova/auth/manager.py
index 001a96875..7b2b68161 100644
--- a/nova/auth/manager.py
+++ b/nova/auth/manager.py
@@ -84,12 +84,11 @@ class AuthBase(object):
@classmethod
def safe_id(cls, obj):
- """Safe get object id
+ """Safely get object id.
This method will return the id of the object if the object
is of this class, otherwise it will return the original object.
This allows methods to accept objects or ids as paramaters.
-
"""
if isinstance(obj, cls):
return obj.id