fix(network): retrieve switch interface using id instead of name

This commit is contained in:
clbu 2024-10-16 10:44:08 +02:00
parent 1429fedb9d
commit e44fd2fe78
No known key found for this signature in database
GPG key ID: 0891443A5398527F

View file

@ -544,7 +544,7 @@ class ServerNetwork(Network):
switch_interface = self.lldp.get_switch_port(nb_server_interface.name)
nb_switch_interface = nb.dcim.interfaces.get(
device=nb_switch,
device_id=nb_switch.id,
name=switch_interface,
)
if nb_switch_interface is None: