Adding a function to test connections to UDP and TCP ports from minion.

Adding a function to test connections to UDP and TCP ports from minion.