tom

Doh! Forgot to ignite SimpleFlowRuleStore as a component. Pingall now works again!

...@@ -3,23 +3,43 @@ package org.onlab.onos.net.trivial.impl; ...@@ -3,23 +3,43 @@ package org.onlab.onos.net.trivial.impl;
3 import com.google.common.collect.HashMultimap; 3 import com.google.common.collect.HashMultimap;
4 import com.google.common.collect.ImmutableSet; 4 import com.google.common.collect.ImmutableSet;
5 import com.google.common.collect.Multimap; 5 import com.google.common.collect.Multimap;
6 +import org.apache.felix.scr.annotations.Activate;
7 +import org.apache.felix.scr.annotations.Component;
8 +import org.apache.felix.scr.annotations.Deactivate;
9 +import org.apache.felix.scr.annotations.Service;
6 import org.onlab.onos.net.DeviceId; 10 import org.onlab.onos.net.DeviceId;
7 import org.onlab.onos.net.flow.DefaultFlowRule; 11 import org.onlab.onos.net.flow.DefaultFlowRule;
8 import org.onlab.onos.net.flow.FlowRule; 12 import org.onlab.onos.net.flow.FlowRule;
9 import org.onlab.onos.net.flow.FlowRuleEvent; 13 import org.onlab.onos.net.flow.FlowRuleEvent;
10 import org.onlab.onos.net.flow.FlowRuleStore; 14 import org.onlab.onos.net.flow.FlowRuleStore;
15 +import org.slf4j.Logger;
11 16
12 import static org.onlab.onos.net.flow.FlowRuleEvent.Type.RULE_ADDED; 17 import static org.onlab.onos.net.flow.FlowRuleEvent.Type.RULE_ADDED;
13 import static org.onlab.onos.net.flow.FlowRuleEvent.Type.RULE_REMOVED; 18 import static org.onlab.onos.net.flow.FlowRuleEvent.Type.RULE_REMOVED;
19 +import static org.slf4j.LoggerFactory.getLogger;
14 20
15 /** 21 /**
16 * Manages inventory of flow rules using trivial in-memory implementation. 22 * Manages inventory of flow rules using trivial in-memory implementation.
17 */ 23 */
24 +@Component(immediate = true)
25 +@Service
18 public class SimpleFlowRuleStore implements FlowRuleStore { 26 public class SimpleFlowRuleStore implements FlowRuleStore {
19 27
28 + private final Logger log = getLogger(getClass());
29 +
20 // store entries as a pile of rules, no info about device tables 30 // store entries as a pile of rules, no info about device tables
21 private final Multimap<DeviceId, FlowRule> flowEntries = HashMultimap.create(); 31 private final Multimap<DeviceId, FlowRule> flowEntries = HashMultimap.create();
22 32
33 + @Activate
34 + public void activate() {
35 + log.info("Started");
36 + }
37 +
38 + @Deactivate
39 + public void deactivate() {
40 + log.info("Stopped");
41 + }
42 +
23 @Override 43 @Override
24 public Iterable<FlowRule> getFlowEntries(DeviceId deviceId) { 44 public Iterable<FlowRule> getFlowEntries(DeviceId deviceId) {
25 return ImmutableSet.copyOf(flowEntries.get(deviceId)); 45 return ImmutableSet.copyOf(flowEntries.get(deviceId));
......
...@@ -88,5 +88,4 @@ ...@@ -88,5 +88,4 @@
88 <bundle>mvn:org.onlab.onos/onos-app-fwd/1.0.0-SNAPSHOT</bundle> 88 <bundle>mvn:org.onlab.onos/onos-app-fwd/1.0.0-SNAPSHOT</bundle>
89 </feature> 89 </feature>
90 90
91 -
92 </features> 91 </features>
......