diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-11 10:19:56 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-11 12:42:11 +0200 |
| commit | 565237c14a303a46d62d240b35c6f0082424256a (patch) | |
| tree | 522f2aeb441a3eb22b6d5e05e66ef348241b2e66 /wrappers/python/eduvpn_common/main.py | |
| parent | 17e261dd224bc67f031b80930490768ea54353db (diff) | |
Client: Refactor out adding a Server from getting a config
Diffstat (limited to 'wrappers/python/eduvpn_common/main.py')
| -rw-r--r-- | wrappers/python/eduvpn_common/main.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py index 03e1045..382f356 100644 --- a/wrappers/python/eduvpn_common/main.py +++ b/wrappers/python/eduvpn_common/main.py @@ -121,6 +121,25 @@ class EduVPN(object): if remove_err: raise remove_err + def add_institute_access(self, url: str): + add_err = self.go_function(self.lib.AddInstituteAccess, url) + + if add_err: + raise add_err + + def add_secure_internet_home(self, org_id: str): + self.location_event = threading.Event() + add_err = self.go_function(self.lib.AddSecureInternetHomeServer, org_id) + + if add_err: + raise add_err + + def add_custom_server(self, url: str): + add_err = self.go_function(self.lib.AddCustomServer, url) + + if add_err: + raise add_err + def remove_institute_access(self, url: str): remove_err = self.go_function(self.lib.RemoveInstituteAccess, url) @@ -162,7 +181,6 @@ class EduVPN(object): def get_config_secure_internet( self, url: str, prefer_tcp: bool = False ) -> Tuple[str, str]: - self.location_event = threading.Event() return self.get_config(url, self.lib.GetConfigSecureInternet, prefer_tcp) def go_back(self) -> None: |
