backported code to include host_id in port requests