def update_host_mapping(host_id, interface, nexus_ip, new_ch_grp):
    """Change channel_group in host/interface mapping data base."""

    LOG.debug("update_host_mapping called")
    session = bc.get_writer_session()
    mapping = _lookup_one_host_mapping(
                  session=session,
                  host_id=host_id,
                  if_id=interface,
                  switch_ip=nexus_ip)
    mapping.ch_grp = new_ch_grp
    session.merge(mapping)
    session.flush()
    return mapping
Change channel_group in host/interface mapping data base.