Use common get_instance function in v2 attach_interface

This patch use common get_instance function in v2 attach_interface.
That can make the instance behavior consistent with v2.1 api. Then
v2.1 and v2 can share same unittest.

Change-Id: Id531377d5d34d76a4ffafaa02ecab585cbcb369b
Merge "Use common get_instance function in v2 attach_interface"