Committed by
Gerrit Code Review
Refactor bindMacAddr function from VPLS app.
Change-Id: I4f484bbc02dae756e60c9fb5e1d2ef8a0f722b85
Showing
1 changed file
with
1 additions
and
2 deletions
... | @@ -177,7 +177,6 @@ public class Vpls { | ... | @@ -177,7 +177,6 @@ public class Vpls { |
177 | VlanId vlanId = e.getKey(); | 177 | VlanId vlanId = e.getKey(); |
178 | ConnectPoint cp = e.getValue(); | 178 | ConnectPoint cp = e.getValue(); |
179 | Set<Host> connectedHosts = hostService.getConnectedHosts(cp); | 179 | Set<Host> connectedHosts = hostService.getConnectedHosts(cp); |
180 | - if (!connectedHosts.isEmpty()) { | ||
181 | connectedHosts.forEach(host -> { | 180 | connectedHosts.forEach(host -> { |
182 | if (host.vlan().equals(vlanId)) { | 181 | if (host.vlan().equals(vlanId)) { |
183 | confHostPresentCPoint.put(vlanId, Pair.of(cp, host.mac())); | 182 | confHostPresentCPoint.put(vlanId, Pair.of(cp, host.mac())); |
... | @@ -185,7 +184,7 @@ public class Vpls { | ... | @@ -185,7 +184,7 @@ public class Vpls { |
185 | confHostPresentCPoint.put(vlanId, Pair.of(cp, null)); | 184 | confHostPresentCPoint.put(vlanId, Pair.of(cp, null)); |
186 | } | 185 | } |
187 | }); | 186 | }); |
188 | - } else { | 187 | + if (connectedHosts.isEmpty()) { |
189 | confHostPresentCPoint.put(vlanId, Pair.of(cp, null)); | 188 | confHostPresentCPoint.put(vlanId, Pair.of(cp, null)); |
190 | } | 189 | } |
191 | } | 190 | } | ... | ... |
-
Please register or login to post a comment