def stop_vpn(running_connection): if running_connection == OPENVPN_CONNECTION_STRING: subprocess.call(["sudo", "killall", "openvpn"]) elif running_connection == IPSEC_CONNECTION_STRING: ikev2_disconnect() elif running_connection == NM_CONNECTION_STRING: nm_disconnect() return
def stop_vpn(running_connection): if running_connection == OPENVPN_CONNECTION_STRING: openvpn_stop() elif running_connection == IPSEC_CONNECTION_STRING: ikev2_disconnect() elif running_connection == NM_CONNECTION_STRING: nm_disconnect() return
def test_ipsec_disconnection(): ikev2.ikev2_disconnect() assert ip_show() == initial_ip