'Return whether mapping is needed.
There are two situations where we must use the mapping:
- this isn\'t the default driver (i.e. multiple backends), or
- we have a single backend that doesn\'t use UUIDs
The exception to the above is that we must honor backward
compatibility if this is the default driver (e.g. to support
current LDAP)'

def _is_mapping_needed(self, driver):

    is_not_default_driver = (driver is not self.driver)
    return (is_not_default_driver or ((not driver.generates_uuids()) and (not CONF.identity_mapping.backward_compatible_ids)))
