The server's port list may contain ids, thus those also need to be
compared.
Change-Id: I2e53c111a22009b6c791abc9e52f28afa96d5b0a
Signed-off-by: schillinge <ablu@mail.uni-paderborn.de>
server_ingress = None
server_egress = None
for server in compute.computeUnits.values():
- if port_pair.ingress.name in server.port_names:
+ if port_pair.ingress.name in server.port_names or port_pair.ingress.id in server.port_names:
server_ingress = server
- elif port_pair.egress.name in server.port_names:
+ elif port_pair.egress.name in server.port_names or port_pair.egress.id in server.port_names:
server_egress = server
# TODO: Not sure, if this should throw an error