code: def update_host_mapping(host_id, interface, nexus_ip, new_ch_grp):
      
  
      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
docs: Change channel_group in host/interface mapping data base.