Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next
Showing
4 changed files
with
17 additions
and
26 deletions
... | @@ -14,6 +14,16 @@ | ... | @@ -14,6 +14,16 @@ |
14 | "attachmentDpid" : "00:00:00:00:00:00:00:a2", | 14 | "attachmentDpid" : "00:00:00:00:00:00:00:a2", |
15 | "attachmentPort" : "1", | 15 | "attachmentPort" : "1", |
16 | "ipAddress" : "192.168.30.1" | 16 | "ipAddress" : "192.168.30.1" |
17 | + }, | ||
18 | + { | ||
19 | + "attachmentDpid" : "00:00:00:00:00:00:00:a6", | ||
20 | + "attachmentPort" : "1", | ||
21 | + "ipAddress" : "192.168.40.1" | ||
22 | + }, | ||
23 | + { | ||
24 | + "attachmentDpid" : "00:00:00:00:00:00:00:a4", | ||
25 | + "attachmentPort" : "4", | ||
26 | + "ipAddress" : "192.168.60.1" | ||
17 | } | 27 | } |
18 | ], | 28 | ], |
19 | "bgpSpeakers" : [ | 29 | "bgpSpeakers" : [ | ... | ... |
... | @@ -197,14 +197,7 @@ public class LinkManager | ... | @@ -197,14 +197,7 @@ public class LinkManager |
197 | checkNotNull(linkDescription, LINK_DESC_NULL); | 197 | checkNotNull(linkDescription, LINK_DESC_NULL); |
198 | checkValidity(); | 198 | checkValidity(); |
199 | 199 | ||
200 | - ConnectPoint src = linkDescription.src(); | ||
201 | - ConnectPoint dst = linkDescription.dst(); | ||
202 | - // if we aren't master for the device associated with the ConnectPoint | ||
203 | - // we probably shouldn't be doing this. | ||
204 | 200 | ||
205 | -// if (deviceService.getRole(dst.deviceId()) != MastershipRole.MASTER) { | ||
206 | -// return; | ||
207 | -// } | ||
208 | LinkEvent event = store.createOrUpdateLink(provider().id(), | 201 | LinkEvent event = store.createOrUpdateLink(provider().id(), |
209 | linkDescription); | 202 | linkDescription); |
210 | if (event != null) { | 203 | if (event != null) { |
... | @@ -232,11 +225,7 @@ public class LinkManager | ... | @@ -232,11 +225,7 @@ public class LinkManager |
232 | public void linksVanished(ConnectPoint connectPoint) { | 225 | public void linksVanished(ConnectPoint connectPoint) { |
233 | checkNotNull(connectPoint, "Connect point cannot be null"); | 226 | checkNotNull(connectPoint, "Connect point cannot be null"); |
234 | checkValidity(); | 227 | checkValidity(); |
235 | - // if we aren't master for the device associated with the ConnectPoint | 228 | + |
236 | - // we probably shouldn't be doing this. | ||
237 | - if (deviceService.getRole(connectPoint.deviceId()) != MastershipRole.MASTER) { | ||
238 | - return; | ||
239 | - } | ||
240 | log.info("Links for connection point {} vanished", connectPoint); | 229 | log.info("Links for connection point {} vanished", connectPoint); |
241 | // FIXME: This will remove links registered by other providers | 230 | // FIXME: This will remove links registered by other providers |
242 | removeLinks(getLinks(connectPoint)); | 231 | removeLinks(getLinks(connectPoint)); |
... | @@ -246,11 +235,7 @@ public class LinkManager | ... | @@ -246,11 +235,7 @@ public class LinkManager |
246 | public void linksVanished(DeviceId deviceId) { | 235 | public void linksVanished(DeviceId deviceId) { |
247 | checkNotNull(deviceId, DEVICE_ID_NULL); | 236 | checkNotNull(deviceId, DEVICE_ID_NULL); |
248 | checkValidity(); | 237 | checkValidity(); |
249 | - // if we aren't master for the device associated with the ConnectPoint | 238 | + |
250 | - // we probably shouldn't be doing this. | ||
251 | - if (deviceService.getRole(deviceId) != MastershipRole.MASTER) { | ||
252 | - return; | ||
253 | - } | ||
254 | log.info("Links for device {} vanished", deviceId); | 239 | log.info("Links for device {} vanished", deviceId); |
255 | removeLinks(getDeviceLinks(deviceId)); | 240 | removeLinks(getDeviceLinks(deviceId)); |
256 | } | 241 | } | ... | ... |
... | @@ -157,16 +157,12 @@ public class StatisticManager implements StatisticService { | ... | @@ -157,16 +157,12 @@ public class StatisticManager implements StatisticService { |
157 | case RULE_UPDATED: | 157 | case RULE_UPDATED: |
158 | if (rule instanceof FlowEntry) { | 158 | if (rule instanceof FlowEntry) { |
159 | statisticStore.addOrUpdateStatistic((FlowEntry) rule); | 159 | statisticStore.addOrUpdateStatistic((FlowEntry) rule); |
160 | - } else { | ||
161 | - log.warn("IT AIN'T A FLOWENTRY"); | ||
162 | } | 160 | } |
163 | break; | 161 | break; |
164 | case RULE_ADD_REQUESTED: | 162 | case RULE_ADD_REQUESTED: |
165 | - log.info("Preparing for stats"); | ||
166 | statisticStore.prepareForStatistics(rule); | 163 | statisticStore.prepareForStatistics(rule); |
167 | break; | 164 | break; |
168 | case RULE_REMOVE_REQUESTED: | 165 | case RULE_REMOVE_REQUESTED: |
169 | - log.info("Removing stats"); | ||
170 | statisticStore.removeFromStatistics(rule); | 166 | statisticStore.removeFromStatistics(rule); |
171 | break; | 167 | break; |
172 | case RULE_REMOVED: | 168 | case RULE_REMOVED: | ... | ... |
... | @@ -90,7 +90,7 @@ public class LinkDiscovery implements TimerTask { | ... | @@ -90,7 +90,7 @@ public class LinkDiscovery implements TimerTask { |
90 | * Instantiates discovery manager for the given physical switch. Creates a | 90 | * Instantiates discovery manager for the given physical switch. Creates a |
91 | * generic LLDP packet that will be customized for the port it is sent out on. | 91 | * generic LLDP packet that will be customized for the port it is sent out on. |
92 | * Starts the the timer for the discovery process. | 92 | * Starts the the timer for the discovery process. |
93 | - * @param device the physical switch | 93 | + * @param device the physical switch |
94 | * @param masterService | 94 | * @param masterService |
95 | * @param useBDDP flag to also use BDDP for discovery | 95 | * @param useBDDP flag to also use BDDP for discovery |
96 | */ | 96 | */ |
... | @@ -217,7 +217,7 @@ public class LinkDiscovery implements TimerTask { | ... | @@ -217,7 +217,7 @@ public class LinkDiscovery implements TimerTask { |
217 | final PortNumber srcPort = PortNumber.portNumber(onoslldp.getPort()); | 217 | final PortNumber srcPort = PortNumber.portNumber(onoslldp.getPort()); |
218 | final DeviceId srcDeviceId = DeviceId.deviceId(onoslldp.getDeviceString()); | 218 | final DeviceId srcDeviceId = DeviceId.deviceId(onoslldp.getDeviceString()); |
219 | final DeviceId dstDeviceId = context.inPacket().receivedFrom().deviceId(); | 219 | final DeviceId dstDeviceId = context.inPacket().receivedFrom().deviceId(); |
220 | - this.ackProbe(srcPort.toLong()); | 220 | + this.ackProbe(dstPort.toLong()); |
221 | ConnectPoint src = new ConnectPoint(srcDeviceId, srcPort); | 221 | ConnectPoint src = new ConnectPoint(srcDeviceId, srcPort); |
222 | ConnectPoint dst = new ConnectPoint(dstDeviceId, dstPort); | 222 | ConnectPoint dst = new ConnectPoint(dstDeviceId, dstPort); |
223 | 223 | ||
... | @@ -245,7 +245,7 @@ public class LinkDiscovery implements TimerTask { | ... | @@ -245,7 +245,7 @@ public class LinkDiscovery implements TimerTask { |
245 | */ | 245 | */ |
246 | @Override | 246 | @Override |
247 | public void run(final Timeout t) { | 247 | public void run(final Timeout t) { |
248 | - this.log.debug("sending probes"); | 248 | + this.log.trace("sending probes"); |
249 | synchronized (this) { | 249 | synchronized (this) { |
250 | final Iterator<Long> fastIterator = this.fastPorts.iterator(); | 250 | final Iterator<Long> fastIterator = this.fastPorts.iterator(); |
251 | Long portNumber; | 251 | Long portNumber; |
... | @@ -256,7 +256,7 @@ public class LinkDiscovery implements TimerTask { | ... | @@ -256,7 +256,7 @@ public class LinkDiscovery implements TimerTask { |
256 | .getAndIncrement(); | 256 | .getAndIncrement(); |
257 | 257 | ||
258 | if (probeCount < LinkDiscovery.MAX_PROBE_COUNT) { | 258 | if (probeCount < LinkDiscovery.MAX_PROBE_COUNT) { |
259 | - this.log.debug("sending fast probe to port"); | 259 | + this.log.trace("sending fast probe to port"); |
260 | sendProbes(portNumber); | 260 | sendProbes(portNumber); |
261 | } else { | 261 | } else { |
262 | // Update fast and slow ports | 262 | // Update fast and slow ports |
... | @@ -278,7 +278,7 @@ public class LinkDiscovery implements TimerTask { | ... | @@ -278,7 +278,7 @@ public class LinkDiscovery implements TimerTask { |
278 | Iterator<Long> slowIterator = this.slowPorts.iterator(); | 278 | Iterator<Long> slowIterator = this.slowPorts.iterator(); |
279 | while (slowIterator.hasNext()) { | 279 | while (slowIterator.hasNext()) { |
280 | portNumber = slowIterator.next(); | 280 | portNumber = slowIterator.next(); |
281 | - this.log.debug("sending slow probe to port {}", portNumber); | 281 | + this.log.trace("sending slow probe to port {}", portNumber); |
282 | 282 | ||
283 | sendProbes(portNumber); | 283 | sendProbes(portNumber); |
284 | 284 | ... | ... |
-
Please register or login to post a comment