diff options
| author | Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> | 2025-08-29 14:05:20 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> | 2025-08-29 14:40:24 +0200 |
| commit | 4a23134e1e5d70a9c8c5857790dbf27585ca3b1f (patch) | |
| tree | c7edff437df88d6d127f8bda0a35d59fc0d3dc68 /wrappers/python | |
| parent | 5461efc826952833fcdecca5d3daa3ee70423a31 (diff) | |
Discovery: Add cache argument and embed unmarshal on startup
Diffstat (limited to 'wrappers/python')
| -rw-r--r-- | wrappers/python/eduvpn_common/loader.py | 4 | ||||
| -rw-r--r-- | wrappers/python/eduvpn_common/main.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/wrappers/python/eduvpn_common/loader.py b/wrappers/python/eduvpn_common/loader.py index 6957c15..870f0b4 100644 --- a/wrappers/python/eduvpn_common/loader.py +++ b/wrappers/python/eduvpn_common/loader.py @@ -49,8 +49,8 @@ def initialize_functions(lib: CDLL) -> None: lib.Deregister.argtypes, lib.Deregister.restype = [], None lib.ExpiryTimes.argtypes, lib.ExpiryTimes.restype = [], DataError lib.FreeString.argtypes, lib.FreeString.restype = [c_void_p], None - lib.DiscoOrganizations.argtypes, lib.DiscoOrganizations.restype = [c_int, c_char_p], DataError - lib.DiscoServers.argtypes, lib.DiscoServers.restype = [c_int, c_char_p], DataError + lib.DiscoOrganizations.argtypes, lib.DiscoOrganizations.restype = [c_int, c_int, c_char_p], DataError + lib.DiscoServers.argtypes, lib.DiscoServers.restype = [c_int, c_int, c_char_p], DataError lib.GetConfig.argtypes, lib.GetConfig.restype = ( [ c_int, diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py index 613dce2..334c8b8 100644 --- a/wrappers/python/eduvpn_common/main.py +++ b/wrappers/python/eduvpn_common/main.py @@ -194,14 +194,14 @@ class EduVPN(object): forwardError(server_err) return server - def get_disco_organizations(self, search="") -> str: - orgs, _ = self.go_cookie_function(self.lib.DiscoOrganizations, search) + def get_disco_organizations(self, cache: bool = False, search="") -> str: + orgs, _ = self.go_cookie_function(self.lib.DiscoOrganizations, cache, search) # We don't log anything here as we want to return a result and we don't want to throw here # we already log for errors in common return orgs - def get_disco_servers(self, search="") -> str: - servers, _ = self.go_cookie_function(self.lib.DiscoServers, search) + def get_disco_servers(self, cache: bool = False, search="") -> str: + servers, _ = self.go_cookie_function(self.lib.DiscoServers, cache, search) # We don't log anything here as we want to return a result and we don't want to throw here # we already log for errors in common return servers |
