added code to print switch port and device vertex