Feat: SiLA Server Discovery find all available SiLA servers with "all" paramter -> SiLADiscovery.find_servers(all=True) - to turn it into a real, convenient SiLAbrowser
The Server Discovery (and Client generator) could be generally used to very elegantly make a real "SiLA browser", e.g. for applications that want to show all available SiLAServers (a simple version of the universal SiLA client). Currently one needs to overwrite the find_server method of the SilaDiscoveryBrowser to achieve this, because it is limited to finding a server by name or UUID, like
from sila2.discovery.browser import SilaDiscoveryBrowser
class MySilaDiscoveryBrowser(SilaDiscoveryBrowser):
def __init__(self, insecure) -> None:
super().__init__(insecure=insecure)
def find_server(self, timeout=3):
# giving Zeroconfig some time to find servers ....
time.sleep(timeout)
return self.listener.services
if we would add an optional boolean "all" parameter, we could turn it into a very nice real SiLA browser to detect all SiLA servers without much effort and no breaking changes.
Edited by mark doerr