'Create a replication relationship with a target volume.
:param array: the array serial number
:param device_id: the device id
:param rdf_group_no: the rdf group number
:param rep_config: the replication config
:param target_name: the target volume name
:param remote_array: the remote array serial number
:param target_device: the target device id
:param extra_specs: the extra specifications
:returns: rdf_dict'

def enable_rdf(self, array, device_id, rdf_group_no, rep_config, target_name, remote_array, target_device, extra_specs):

    rep_extra_specs = self._get_replication_extra_specs(extra_specs, rep_config)
    try:
        self.masking.remove_and_reset_members(array, device_id, target_name, extra_specs, False)
        self.masking.remove_and_reset_members(remote_array, target_device, target_name, rep_extra_specs, False)
        rdf_dict = self.rest.create_rdf_device_pair(array, device_id, rdf_group_no, target_device, remote_array, target_name, extra_specs)
        LOG.debug('Adding    source    device    to    default    replication    group.')
        self.add_volume_to_replication_group(array, device_id, target_name, extra_specs)
        LOG.debug('Adding    target    device    to    default    replication    group.')
        self.add_volume_to_replication_group(remote_array, target_device, target_name, rep_extra_specs)
    except Exception as e:
        LOG.warning('Remote    replication    failed.    Cleaning    up    the    target    volume    and    returning    source    volume    to    default    storage    group.    Volume    name:    %(name)s    ', {'name': target_name})
        self.masking.remove_and_reset_members(remote_array, target_device, target_name, rep_extra_specs, False)
        self._cleanup_remote_target(array, remote_array, device_id, target_device, rdf_group_no, target_name, rep_extra_specs)
        exception_message = (_('Remote    replication    failed    with    exception:    %(e)s') % {'e': six.text_type(e)})
        LOG.exception(exception_message)
        raise exception.VolumeBackendAPIException(data=exception_message)
    return rdf_dict
