'Clear domain_id details if driver is not domain aware.'

def _clear_domain_id_if_domain_unaware(self, driver, ref):

    if ((not driver.is_domain_aware()) and ('domain_id' in ref)):
        ref = ref.copy()
        ref.pop('domain_id')
    return ref
