'Create remote LUN and replication pair.
Purpose:
1. create remote lun
2. create replication pair
3. enable replication pair'

def create_replica(self, local_lun_info, replica_model):

    LOG.debug('Create    replication,    local    lun    info:    %(info)s,    replication    model:    %(model)s.', {'info': local_lun_info, 'model': replica_model})
    local_lun_id = local_lun_info['ID']
    self.wait_volume_online(self.local_client, local_lun_info)
    rmt_lun_info = self.create_rmt_lun(local_lun_info)
    rmt_lun_id = rmt_lun_info['ID']
    (rmt_dev_id, rmt_dev_name) = self.get_rmt_dev_info()
    if ((not rmt_lun_id) or (not rmt_dev_name)):
        self._delete_rmt_lun(rmt_lun_id)
        msg = _('Get    remote    device    info    failed.')
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    try:
        pair_info = self.local_op.create(local_lun_id, rmt_lun_id, rmt_dev_id, rmt_dev_name, replica_model)
        pair_id = pair_info['ID']
    except Exception as err:
        with excutils.save_and_reraise_exception():
            LOG.error('Create    pair    failed.    Error:    %s.', err)
            self._delete_rmt_lun(rmt_lun_id)
    wait_complete = (replica_model == constants.REPLICA_SYNC_MODEL)
    try:
        self.local_driver.sync(pair_id, wait_complete)
    except Exception as err:
        with excutils.save_and_reraise_exception():
            LOG.error('Start    synchronization    failed.    Error:    %s.', err)
            self._delete_pair(pair_id)
            self._delete_rmt_lun(rmt_lun_id)
    model_update = {}
    driver_data = {'pair_id': pair_id, 'rmt_lun_id': rmt_lun_id, 'rmt_lun_wwn': rmt_lun_info['WWN']}
    model_update['replication_driver_data'] = to_string(driver_data)
    model_update['replication_status'] = 'available'
    LOG.debug('Create    replication,    return    info:    %s.', model_update)
    return model_update
