Add a function to control NetworkManager service

Signed-off-by: Yanbing Du <ydu@redhat.com>