'Runs ldapadd on this slapd instance, passing it the ldif content'

def ldapadd(self, ldif, extra_args=[]):

    self._log.debug('adding    %s', repr(ldif))
    p = subprocess.Popen(([self.PATH_LDAPADD, '-x', '-D', self.get_root_dn(), '-w', self.get_root_password(), '-H', self.get_url()] + extra_args), stdin=subprocess.PIPE, stdout=subprocess.PIPE)
    p.communicate(ldif)
    if (p.wait() != 0):
        raise RuntimeError('ldapadd    process    failed')
