'Prepares the target data for Nova.
:param storage_group: object of `storops` storage group.
:param host: `common.Host` object with initiator information.
:param volume: `common.Volume` object with volume information.
:param hlu: the HLU number assigned to volume.'

def prepare_target_data(self, storage_group, host, volume, hlu):

    if (self.lookup_service is None):
        registed_ports = []
        for wwn in host.initiators:
            registed_ports.extend(storage_group.get_ports(wwn))
        reg_port_white_list = utils.sift_port_white_list(self.allowed_ports, registed_ports)
        if (not reg_port_white_list):
            msg = (_('Failed    to    find    available    FC    targets    for    %s.') % storage_group.name)
            raise exception.VolumeBackendAPIException(data=msg)
        target_wwns = [utils.truncate_fc_port_wwn(port.wwn) for port in reg_port_white_list]
        return common.FCTargetData(volume.id, True, wwn=target_wwns, lun=hlu).to_dict()
    else:
        (target_wwns, initiator_target_map) = self._get_tgt_list_and_initiator_tgt_map(storage_group, host, True)
        return common.FCTargetData(volume.id, True, wwn=target_wwns, lun=hlu, initiator_target_map=initiator_target_map).to_dict()
