Backport v3 api unittest into v2 api for attach_interface extension

On most APIs, the unit test coverage of v3 is better than the one of v2.
This patch ports v3 attach_interface API tests to v2 tests for improving
v2 attach_interface API tests

Change-Id: Ie93175602dbced361d76abbe35a7767a96d9e68e
Merge "Backport v3 api unittest into v2 api for attach_interface extension"