Refactoring format_device function

* Algorithm format_device was changed for simplicity extension new
  ip addresses parameters.
* Some prints outputs was replacement by function format_device.

Change-Id: I8565d42fcdb62eeb398c4432bb6f499c27c05cf6
Merge "Refactoring format_device function"