Refactor power_on_link and power_off_link methods of xml classes

Change-Id: Ibdc4f2a7db6efc877c67c700eb40110c4f2e4c3c