'This method is called when the LDAP server has started up and is empty.
By default, this method adds the two initial objects,
the domain object and the root user object.'

def started(self):

    assert self.get_dn_suffix().startswith('dc=')
    suffix_dc = self.get_dn_suffix().split(',')[0][3:]
    assert self.get_root_dn().startswith('cn=')
    assert self.get_root_dn().endswith((',' + self.get_dn_suffix()))
    root_cn = self.get_root_dn().split(',')[0][3:]
    self._log.debug('adding    %s    and    %s', self.get_dn_suffix(), self.get_root_dn())
    self.ldapadd('\n'.join([('dn:    ' + self.get_dn_suffix()), 'objectClass:    dcObject', 'objectClass:    organization', ('dc:    ' + suffix_dc), ('o:    ' + suffix_dc), '', ('dn:    ' + self.get_root_dn()), 'objectClass:    organizationalRole', ('cn:    ' + root_cn), '']))
