Esempio n. 1
0
    def _commit_success(self, msg):
        assert isinstance(msg, pureldap.LDAPModifyResponse)
        assert msg.referral is None  # TODO
        if msg.resultCode != ldaperrors.Success.resultCode:
            raise ldaperrors.get(msg.resultCode, msg.errorMessage)

        self._assertMatchedDN(msg.matchedDN)

        self._remoteData = entry.EditableLDAPEntry(self.dn, self)
        self._journal = []
        return self
Esempio n. 2
0
    def __init__(self, client, dn, attributes={}, complete=0):
        """

        Initialize the object.

        @param client: The LDAP client connection this object belongs
        to.

        @param dn: Distinguished Name of the object, as a string.

        @param attributes: Attributes of the object. A dictionary of
        attribute types to list of attribute values.

        """

        super(LDAPEntryWithClient, self).__init__(dn, attributes)
        self.client = client
        self.complete = complete

        self._journal = []

        self._remoteData = entry.EditableLDAPEntry(dn, attributes)
        self._state = 'ready'