Parameterize get_reseravtion_as_ip so you can pass an array of host names.