updated switchDetail to fetch port data