Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rnixx committed Dec 21, 2015
2 parents cb3d403 + 3b02319 commit 7272192
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 100 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
/local/
/parts/
/src/node.ext.ldap.egg-info
/pip-selfcheck.json
2 changes: 1 addition & 1 deletion ldap.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parts =
# apt-get install libsasl2-dev libssl-dev libdb-dev
# apt-get build-dep python-ldap
recipe = zc.recipe.cmmi>=1.1.5
url = ftp://gd.tuwien.ac.at/infosys/network/OpenLDAP/openldap-release/openldap-2.4.42.tgz
url = ftp://mirror.switch.ch/mirror/OpenLDAP/openldap-release/openldap-2.4.43.tgz
extra_options = --with-sasl --with-tls --enable-slapd=yes --enable-overlays
#osx-env
#environment =
Expand Down
90 changes: 38 additions & 52 deletions src/node/ext/ldap/_node.py
Original file line number Diff line number Diff line change
@@ -1,58 +1,44 @@
# -*- coding: utf-8 -*-
from ldap import (
MOD_ADD,
MOD_DELETE,
MOD_REPLACE,
NO_SUCH_OBJECT,
INVALID_DN_SYNTAX,
)
from ldap import INVALID_DN_SYNTAX
from ldap import MOD_ADD
from ldap import MOD_DELETE
from ldap import MOD_REPLACE
from ldap import NO_SUCH_OBJECT
from ldap.functions import explode_dn
from zope.interface import implementer
from zope.deprecation import deprecated
from plumber import (
plumbing,
Behavior,
plumb,
default,
finalize,
)
from node.behaviors import (
Nodespaces,
Attributes,
NodeAttributes,
Lifecycle,
AttributesLifecycle,
NodeChildValidate,
Adopt,
Nodify,
OdictStorage,
)
from node.utils import (
encode,
decode,
CHARACTER_ENCODING,
debug,
)
from node.behaviors import Adopt
from node.behaviors import Attributes
from node.behaviors import AttributesLifecycle
from node.behaviors import Lifecycle
from node.behaviors import NodeAttributes
from node.behaviors import NodeChildValidate
from node.behaviors import Nodespaces
from node.behaviors import Nodify
from node.behaviors import OdictStorage
from node.ext.ldap import BASE
from node.ext.ldap import LDAPSession
from node.ext.ldap import ONELEVEL
from node.ext.ldap.events import LDAPNodeAddedEvent
from node.ext.ldap.events import LDAPNodeCreatedEvent
from node.ext.ldap.events import LDAPNodeDetachedEvent
from node.ext.ldap.events import LDAPNodeModifiedEvent
from node.ext.ldap.events import LDAPNodeRemovedEvent
from node.ext.ldap.filter import LDAPDictFilter
from node.ext.ldap.filter import LDAPFilter
from node.ext.ldap.filter import LDAPRelationFilter
from node.ext.ldap.interfaces import ILDAPStorage
from node.ext.ldap.schema import LDAPSchemaInfo
from node.interfaces import IInvalidate
from . import (
BASE,
ONELEVEL,
LDAPSession,
)
from .interfaces import ILDAPStorage
from .events import (
LDAPNodeCreatedEvent,
LDAPNodeAddedEvent,
LDAPNodeModifiedEvent,
LDAPNodeRemovedEvent,
LDAPNodeDetachedEvent
)
from .filter import (
LDAPFilter,
LDAPDictFilter,
LDAPRelationFilter,
)
from .schema import LDAPSchemaInfo
from node.utils import CHARACTER_ENCODING
from node.utils import debug
from node.utils import decode
from node.utils import encode
from plumber import Behavior
from plumber import default
from plumber import finalize
from plumber import plumb
from plumber import plumbing
from zope.deprecation import deprecated
from zope.interface import implementer


ACTION_ADD = 0
Expand Down
8 changes: 3 additions & 5 deletions src/node/ext/ldap/cache.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
from zope.interface import implementer
from bda.cache import (
Memcached,
NullCache,
)
from .interfaces import ICacheProviderFactory
from bda.cache import Memcached
from bda.cache import NullCache
from zope.interface import implementer


def nullcacheProviderFactory():
Expand Down
24 changes: 10 additions & 14 deletions src/node/ext/ldap/events.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
# -*- coding: utf-8 -*-
from node.events import NodeAddedEvent
from node.events import NodeCreatedEvent
from node.events import NodeDetachedEvent
from node.events import NodeModifiedEvent
from node.events import NodeRemovedEvent
from node.ext.ldap.interfaces import ILDAPNodeAddedEvent
from node.ext.ldap.interfaces import ILDAPNodeCreatedEvent
from node.ext.ldap.interfaces import ILDAPNodeDetachedEvent
from node.ext.ldap.interfaces import ILDAPNodeModifiedEvent
from node.ext.ldap.interfaces import ILDAPNodeRemovedEvent
from zope.interface import implementer
from node.events import (
NodeCreatedEvent,
NodeAddedEvent,
NodeModifiedEvent,
NodeRemovedEvent,
NodeDetachedEvent,
)
from .interfaces import (
ILDAPNodeCreatedEvent,
ILDAPNodeAddedEvent,
ILDAPNodeModifiedEvent,
ILDAPNodeRemovedEvent,
ILDAPNodeDetachedEvent,
)


@implementer(ILDAPNodeCreatedEvent)
Expand Down
6 changes: 3 additions & 3 deletions src/node/ext/ldap/main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
from importlib import import_module
from node.ext.ldap import testing
import argparse
import os
import subprocess
import sys
import tempfile
import argparse
from importlib import import_module
from . import testing


# additional LDIF layer containing modules
Expand Down
2 changes: 1 addition & 1 deletion src/node/ext/ldap/properties.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from zope.interface import implementer
from node.ext.ldap.interfaces import ILDAPProps
from zope.interface import implementer


MULTIVALUED_DEFAULTS = set([
Expand Down
6 changes: 2 additions & 4 deletions src/node/ext/ldap/schema.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# -*- coding: utf-8 -*-
from node.ext.ldap import LDAPCommunicator
from node.ext.ldap import LDAPConnector
import ldap
from . import (
LDAPConnector,
LDAPCommunicator,
)


class LDAPSchemaInfo(object):
Expand Down
10 changes: 4 additions & 6 deletions src/node/ext/ldap/session.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# -*- coding: utf-8 -*-
import ldap
from . import (
BASE,
LDAPConnector,
LDAPCommunicator,
)
from .base import testLDAPConnectivity
from node.ext.ldap import BASE
from node.ext.ldap import LDAPCommunicator
from node.ext.ldap import LDAPConnector
import ldap


class LDAPSession(object):
Expand Down
4 changes: 4 additions & 0 deletions src/node/ext/ldap/testing/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# -*- coding: utf-8 -*-
from node.ext.ldap import LDAPProps
from node.ext.ldap import ONELEVEL
from node.ext.ldap import SUBTREE
from node.ext.ldap.properties import LDAPProps
from node.ext.ldap.scope import ONELEVEL
from node.ext.ldap.scope import SUBTREE
Expand All @@ -8,6 +11,7 @@
from pkg_resources import resource_filename
from plone.testing import Layer
from plone.testing import zca
import logging
import os
import shutil
import subprocess
Expand Down
24 changes: 11 additions & 13 deletions src/node/ext/ldap/ugm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from ._api import (
PrincipalsConfig,
UsersConfig,
GroupsConfig,
RolesConfig,
User,
Group,
Users,
Groups,
Role,
Roles,
Ugm,
)
from node.ext.ldap.ugm._api import Group
from node.ext.ldap.ugm._api import Groups
from node.ext.ldap.ugm._api import GroupsConfig
from node.ext.ldap.ugm._api import PrincipalsConfig
from node.ext.ldap.ugm._api import Role
from node.ext.ldap.ugm._api import Roles
from node.ext.ldap.ugm._api import RolesConfig
from node.ext.ldap.ugm._api import Ugm
from node.ext.ldap.ugm._api import User
from node.ext.ldap.ugm._api import Users
from node.ext.ldap.ugm._api import UsersConfig
1 change: 0 additions & 1 deletion src/node/ext/ldap/ugm/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from plumber import plumb
from plumber import plumbing
from zope.interface import implementer

import ldap
import logging
import time
Expand Down

0 comments on commit 7272192

Please sign in to comment.