The keystone.common.ldap.fakeldap Module

Fake LDAP server for test harness.

This class does very little error checking, and knows nothing about ldap class definitions. It implements the minimum emulation of the python ldap library to work with nova.

class keystone.common.ldap.fakeldap.FakeLdap(url)

Bases: object

Fake LDAP connection.

add_s(dn, attrs)

Add an object with the specified attributes at dn.

delete_ext_s(dn, serverctrls)

Remove the ldap object at specified dn.

delete_s(dn)

Remove the ldap object at specified dn.

modify_s(dn, attrs)

Modify the object at dn using the attribute list.

Parameters:
  • dn – an LDAP DN
  • attrs – a list of tuples in the following form: ([MOD_ADD | MOD_DELETE | MOD_REPACE], attribute, value)
search_s(dn, scope, query=None, fields=None)

Search for all matching objects under dn using the query.

Args: dn – dn to search under scope – only SCOPE_BASE and SCOPE_SUBTREE are supported query – query to filter objects by fields – fields to return. Returns all fields if not specified

simple_bind_s(dn, password)

This method is ignored, but provided for compatibility.

unbind_s()

This method is ignored, but provided for compatibility.

class keystone.common.ldap.fakeldap.FakeShelve

Bases: dict

classmethod get_instance()
sync()

Previous topic

The keystone.common.ldap.core Module

Next topic

The keystone.common.logging Module

This Page