'Delete map between a volume and a host for FC.'

def disconnect_volume_fc(self, volume, connector):

    wwns = connector['wwpns']
    (lun_id, lun_wwn) = huawei_utils.get_volume_lun_id(self.rmt_client, volume)
    host_name = connector['host']
    left_lunnum = (-1)
    lungroup_id = None
    view_id = None
    LOG.info('terminate_connection_fc:    volume:    %(id)s,    wwpns:    %(wwns)s,    lun_id:    %(lunid)s.', {'id': volume.id, 'wwns': wwns, 'lunid': lun_id})
    hostid = huawei_utils.get_host_id(self.rmt_client, host_name)
    if hostid:
        mapping_view_name = (constants.MAPPING_VIEW_PREFIX + hostid)
        view_id = self.rmt_client.find_mapping_view(mapping_view_name)
        if view_id:
            lungroup_id = self.rmt_client.find_lungroup_from_map(view_id)
    if (lun_id and self.rmt_client.check_lun_exist(lun_id)):
        if lungroup_id:
            lungroup_ids = self.rmt_client.get_lungroupids_by_lunid(lun_id)
            if (lungroup_id in lungroup_ids):
                self.rmt_client.remove_lun_from_lungroup(lungroup_id, lun_id)
            else:
                LOG.warning('Lun    is    not    in    lungroup.    Lun    id:    %(lun_id)s,    lungroup    id:    %(lungroup_id)s', {'lun_id': lun_id, 'lungroup_id': lungroup_id})
    (tgt_port_wwns, init_targ_map) = self.rmt_client.get_init_targ_map(wwns)
    hostid = huawei_utils.get_host_id(self.rmt_client, host_name)
    if hostid:
        mapping_view_name = (constants.MAPPING_VIEW_PREFIX + hostid)
        view_id = self.rmt_client.find_mapping_view(mapping_view_name)
        if view_id:
            lungroup_id = self.rmt_client.find_lungroup_from_map(view_id)
    if lungroup_id:
        left_lunnum = self.rmt_client.get_obj_count_from_lungroup(lungroup_id)
    if (int(left_lunnum) > 0):
        info = {'driver_volume_type': 'fibre_channel', 'data': {}}
    else:
        info = {'driver_volume_type': 'fibre_channel', 'data': {'target_wwn': tgt_port_wwns, 'initiator_target_map': init_targ_map}}
    return info
