mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-05 12:16:13 +02:00
Refactor bindMacAddr function from VPLS app.
Change-Id: I4f484bbc02dae756e60c9fb5e1d2ef8a0f722b85
This commit is contained in:
parent
3bbca2a643
commit
bf8b67ea9b
@ -177,15 +177,14 @@ public class Vpls {
|
||||
VlanId vlanId = e.getKey();
|
||||
ConnectPoint cp = e.getValue();
|
||||
Set<Host> connectedHosts = hostService.getConnectedHosts(cp);
|
||||
if (!connectedHosts.isEmpty()) {
|
||||
connectedHosts.forEach(host -> {
|
||||
if (host.vlan().equals(vlanId)) {
|
||||
confHostPresentCPoint.put(vlanId, Pair.of(cp, host.mac()));
|
||||
} else {
|
||||
confHostPresentCPoint.put(vlanId, Pair.of(cp, null));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
connectedHosts.forEach(host -> {
|
||||
if (host.vlan().equals(vlanId)) {
|
||||
confHostPresentCPoint.put(vlanId, Pair.of(cp, host.mac()));
|
||||
} else {
|
||||
confHostPresentCPoint.put(vlanId, Pair.of(cp, null));
|
||||
}
|
||||
});
|
||||
if (connectedHosts.isEmpty()) {
|
||||
confHostPresentCPoint.put(vlanId, Pair.of(cp, null));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user