~citrix-openstack/nova/xenapi

« back to all changes in this revision

Viewing changes to nova/auth/fakeldap.py

  • Committer: Tarmac
  • Author(s): Todd Willey, root, Vishvananda Ishaya, Joe Heck, root, Andy Smith, Anne Gentle, Dean Troyer, Devin Carlen
  • Date: 2010-11-16 02:34:47 UTC
  • mfrom: (386.2.71 trunkdoc)
  • Revision ID: hudson@openstack.org-20101116023447-pz7n6ps5rf0fnjea
Lots of documentation and docstring updates.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
16
#    License for the specific language governing permissions and limitations
17
17
#    under the License.
18
 
"""
19
 
Fake LDAP server for test harnesses.
 
18
"""Fake LDAP server for test harness, backs to ReDIS.
20
19
 
21
20
This class does very little error checking, and knows nothing about ldap
22
 
class definitions. It implements the minimum emulation of the python ldap
 
21
class definitions.  It implements the minimum emulation of the python ldap
23
22
library to work with nova.
 
23
 
24
24
"""
25
25
 
26
26
import json
77
77
def _match_query(query, attrs):
78
78
    """Match an ldap query to an attribute dictionary.
79
79
 
80
 
    &, |, and ! are supported in the query. No syntax checking is performed,
81
 
    so malformed querys will not work correctly.
82
 
 
 
80
    The characters &, |, and ! are supported in the query. No syntax checking
 
81
    is performed, so malformed querys will not work correctly.
83
82
    """
84
83
    # cut off the parentheses
85
84
    inner = query[1:-1]