Refactored node side  code for getting interfaces

Change-Id: Iaf55345861a161ad10ee177cdbdbaffa890fab7c