Move get_server_or_ip method to common class

Moved to common class duplicate part of code for "get server or IP"
which used in few scenario tests.

Change-Id: I6368c24764e2515dc8bbcd82d1b0623c24bc77cd
5 files changed