core: fix mishap in PublicInterface vs Interface
This commit is contained in:
parent
b9a1ca0063
commit
4919d1c49b
|
@ -85,7 +85,7 @@ def main():
|
|||
for host in interface.hosts:
|
||||
print(f' @ {host.name}:')
|
||||
wg_peers = {p.name: p for p in host.get_peers(interface.interface_name) or []}
|
||||
for peer in find_interface_other_peers(interface):
|
||||
for peer in find_interface_other_peers(interface.to_public()):
|
||||
if peer.interface.public_key not in wg_peers:
|
||||
print(f' {peer.name}: expected but not found')
|
||||
success = False
|
||||
|
|
|
@ -393,7 +393,7 @@ class WeegeePeer(WeegeeBase):
|
|||
|
||||
@classmethod
|
||||
def find_for_interfaces(cls, ctx: WeegeeContext, interfaces: set[WeegeePublicInterface]) -> set['WeegeePeer']:
|
||||
return set(p for p in cls.find_all(ctx) if p.interface in interfaces)
|
||||
return set(p for p in cls.find_all(ctx) if p.interface.to_public() in interfaces)
|
||||
|
||||
@classmethod
|
||||
def create(cls, ctx: WeegeeContext, name: str, interface: WeegeePublicInterface, routes: list[IPNetwork], host: O[str] = None, port: O[int] = None, extra: O[list[str]] = None) -> 'WeegeePeer':
|
||||
|
|
Loading…
Reference in New Issue