Add a function to check if interface exist

Signed-off-by: Yanbing Du <ydu@redhat.com>
Merge pull request #816 from will-Do/iface_exist

Add a function to check if interface exist