Implemented a list ports operation.