Showing
4 changed files
with
6 additions
and
24 deletions
| ... | @@ -7,6 +7,7 @@ import org.onlab.onos.net.flow.FlowRuleService; | ... | @@ -7,6 +7,7 @@ import org.onlab.onos.net.flow.FlowRuleService; |
| 7 | import org.onlab.onos.net.host.HostService; | 7 | import org.onlab.onos.net.host.HostService; |
| 8 | import org.onlab.onos.net.intent.IntentService; | 8 | import org.onlab.onos.net.intent.IntentService; |
| 9 | import org.onlab.onos.net.link.LinkService; | 9 | import org.onlab.onos.net.link.LinkService; |
| 10 | +import org.onlab.onos.net.topology.Topology; | ||
| 10 | import org.onlab.onos.net.topology.TopologyService; | 11 | import org.onlab.onos.net.topology.TopologyService; |
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| ... | @@ -19,12 +20,14 @@ public class SummaryCommand extends AbstractShellCommand { | ... | @@ -19,12 +20,14 @@ public class SummaryCommand extends AbstractShellCommand { |
| 19 | @Override | 20 | @Override |
| 20 | protected void execute() { | 21 | protected void execute() { |
| 21 | TopologyService topologyService = get(TopologyService.class); | 22 | TopologyService topologyService = get(TopologyService.class); |
| 22 | - print("nodes=%d, devices=%d, links=%d, hosts=%d, clusters=%s, flows=%d, intents=%d", | 23 | + Topology topology = topologyService.currentTopology(); |
| 24 | + print("nodes=%d, devices=%d, links=%d, hosts=%d, clusters=%s, paths=%d, flows=%d, intents=%d", | ||
| 23 | get(ClusterService.class).getNodes().size(), | 25 | get(ClusterService.class).getNodes().size(), |
| 24 | get(DeviceService.class).getDeviceCount(), | 26 | get(DeviceService.class).getDeviceCount(), |
| 25 | get(LinkService.class).getLinkCount(), | 27 | get(LinkService.class).getLinkCount(), |
| 26 | get(HostService.class).getHostCount(), | 28 | get(HostService.class).getHostCount(), |
| 27 | - topologyService.getClusters(topologyService.currentTopology()).size(), | 29 | + topologyService.getClusters(topology).size(), |
| 30 | + topology.pathCount(), | ||
| 28 | get(FlowRuleService.class).getFlowRuleCount(), | 31 | get(FlowRuleService.class).getFlowRuleCount(), |
| 29 | get(IntentService.class).getIntentCount()); | 32 | get(IntentService.class).getIntentCount()); |
| 30 | } | 33 | } | ... | ... |
| ... | @@ -115,12 +115,7 @@ public class FlowTracker implements FlowTrackerService { | ... | @@ -115,12 +115,7 @@ public class FlowTracker implements FlowTrackerService { |
| 115 | for (Event reason : event.reasons()) { | 115 | for (Event reason : event.reasons()) { |
| 116 | if (reason instanceof LinkEvent) { | 116 | if (reason instanceof LinkEvent) { |
| 117 | LinkEvent linkEvent = (LinkEvent) reason; | 117 | LinkEvent linkEvent = (LinkEvent) reason; |
| 118 | - if (linkEvent.type() == LinkEvent.Type.LINK_ADDED || | 118 | + delegate.bumpIntents(intentsByLink.get(new LinkKey(linkEvent.subject()))); |
| 119 | - linkEvent.type() == LinkEvent.Type.LINK_UPDATED) { | ||
| 120 | - delegate.bumpIntents(intentsByLink.get(new LinkKey(linkEvent.subject()))); | ||
| 121 | - } else if (linkEvent.type() == LinkEvent.Type.LINK_REMOVED) { | ||
| 122 | - delegate.failIntents(intentsByLink.get(new LinkKey(linkEvent.subject()))); | ||
| 123 | - } | ||
| 124 | } | 119 | } |
| 125 | } | 120 | } |
| 126 | } | 121 | } | ... | ... |
| ... | @@ -359,13 +359,5 @@ public class IntentManager | ... | @@ -359,13 +359,5 @@ public class IntentManager |
| 359 | } | 359 | } |
| 360 | } | 360 | } |
| 361 | 361 | ||
| 362 | - @Override | ||
| 363 | - public void failIntents(Iterable<IntentId> intentIds) { | ||
| 364 | - for (IntentId intentId : intentIds) { | ||
| 365 | - Intent intent = getIntent(intentId); | ||
| 366 | - uninstallIntent(intent); | ||
| 367 | - compileIntent(intent); | ||
| 368 | - } | ||
| 369 | - } | ||
| 370 | } | 362 | } |
| 371 | } | 363 | } | ... | ... |
| ... | @@ -15,12 +15,4 @@ public interface TopologyChangeDelegate { | ... | @@ -15,12 +15,4 @@ public interface TopologyChangeDelegate { |
| 15 | */ | 15 | */ |
| 16 | void bumpIntents(Iterable<IntentId> intentIds); | 16 | void bumpIntents(Iterable<IntentId> intentIds); |
| 17 | 17 | ||
| 18 | - /** | ||
| 19 | - * Notifies that topology has changed in such a way that the specified | ||
| 20 | - * intents should be marked failed and then recompiled. | ||
| 21 | - * | ||
| 22 | - * @param intentIds intents that should be failed and recompiled | ||
| 23 | - */ | ||
| 24 | - void failIntents(Iterable<IntentId> intentIds); | ||
| 25 | - | ||
| 26 | } | 18 | } | ... | ... |
-
Please register or login to post a comment