'Gather necessary replication configuration info.
:param rep_device_list: the replication device list from cinder.conf
:returns: rep_config, replication configuration dict'

def get_replication_config(self, rep_device_list):

    rep_config = {}
    if (not rep_device_list):
        return None
    else:
        target = rep_device_list[0]
        try:
            rep_config['array'] = target['target_device_id']
            rep_config['srp'] = target['remote_pool']
            rep_config['rdf_group_label'] = target['rdf_group_label']
            rep_config['portgroup'] = target['remote_port_group']
        except KeyError as ke:
            error_message = (_('Failed    to    retrieve    all    necessary    SRDF    information.    Error    received:    %(ke)s.') % {'ke': six.text_type(ke)})
            LOG.exception(error_message)
            raise exception.VolumeBackendAPIException(data=error_message)
        try:
            allow_extend = target['allow_extend']
            if strutils.bool_from_string(allow_extend):
                rep_config['allow_extend'] = True
            else:
                rep_config['allow_extend'] = False
        except KeyError:
            rep_config['allow_extend'] = False
    return rep_config
