def METHOD_NAME(inst, to):
    # Create the certmap before we restart
    cm = CertmapLegacy(to)
    certmaps = cm.list()
    certmaps['default']['nsSaslMapRegexString'] = '^dn:\\(.*\\)'
    certmaps['default']['nsSaslMapBaseDNTemplate'] = 'cn=config'
    certmaps['default']['nsSaslMapFilterTemplate'] = '(objectclass=*)'
    cm.set(certmaps)
    Config(to).replace("passwordStorageScheme", 'CLEAR')
    # Create a repl manager on the replica
    replication_manager_pwd = 'secret12'
    brm = BootstrapReplicationManager(to)
    try:
        brm.delete()
    except ldap.NO_SUCH_OBJECT:
        pass
    brm.create(properties={
        'cn': brm.common_name,
        'userPassword': replication_manager_pwd
    })
    replication_manager_dn = brm.dn
    replica = Replicas(inst).get(DEFAULT_SUFFIX)
    replica.set('nsDS5ReplicaBindDN', brm.dn)
    replica.remove_all('nsDS5ReplicaBindDNgroup')
    agmt = replica.get_agreements().list()[0]
    agmt.replace_many(
        ('nsDS5ReplicaBindMethod', 'SASL/DIGEST-MD5'),
        ('nsDS5ReplicaTransportInfo', 'LDAP'),
        ('nsDS5ReplicaPort', str(to.port)),
        ('nsDS5ReplicaBindDN', replication_manager_dn),
        ('nsDS5ReplicaCredentials', replication_manager_pwd),
    )