Showing
3 changed files
with
6 additions
and
7 deletions
... | @@ -36,6 +36,6 @@ public interface FlowRuleProviderService extends ProviderService<FlowRuleProvide | ... | @@ -36,6 +36,6 @@ public interface FlowRuleProviderService extends ProviderService<FlowRuleProvide |
36 | * @param deviceId device identifier | 36 | * @param deviceId device identifier |
37 | * @return collection of flow entries | 37 | * @return collection of flow entries |
38 | */ | 38 | */ |
39 | - void pushFlowMetrics(Iterable<FlowEntry> flowEntries); | 39 | + void pushFlowMetrics(Iterable<FlowRule> flowEntries); |
40 | 40 | ||
41 | } | 41 | } | ... | ... |
... | @@ -75,7 +75,7 @@ public final class Criteria { | ... | @@ -75,7 +75,7 @@ public final class Criteria { |
75 | * @param vlanPcp vlan pcp value | 75 | * @param vlanPcp vlan pcp value |
76 | * @return match criterion | 76 | * @return match criterion |
77 | */ | 77 | */ |
78 | - public static Criterion matchVlanId(Byte vlanPcp) { | 78 | + public static Criterion matchVlanPcp(Byte vlanPcp) { |
79 | return new VlanPcpCriterion(vlanPcp); | 79 | return new VlanPcpCriterion(vlanPcp); |
80 | } | 80 | } |
81 | 81 | ... | ... |
providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java
... | @@ -2,6 +2,7 @@ package org.onlab.onos.provider.of.flow.impl; | ... | @@ -2,6 +2,7 @@ package org.onlab.onos.provider.of.flow.impl; |
2 | 2 | ||
3 | import static org.slf4j.LoggerFactory.getLogger; | 3 | import static org.slf4j.LoggerFactory.getLogger; |
4 | 4 | ||
5 | +import java.util.List; | ||
5 | import java.util.Map; | 6 | import java.util.Map; |
6 | 7 | ||
7 | import org.apache.felix.scr.annotations.Activate; | 8 | import org.apache.felix.scr.annotations.Activate; |
... | @@ -34,9 +35,6 @@ import org.slf4j.Logger; | ... | @@ -34,9 +35,6 @@ import org.slf4j.Logger; |
34 | 35 | ||
35 | import com.google.common.collect.Lists; | 36 | import com.google.common.collect.Lists; |
36 | import com.google.common.collect.Maps; | 37 | import com.google.common.collect.Maps; |
37 | -rt org.slf4j.Logger; | ||
38 | - | ||
39 | -import com.google.common.collect.Maps; | ||
40 | 38 | ||
41 | /** | 39 | /** |
42 | * Provider which uses an OpenFlow controller to detect network | 40 | * Provider which uses an OpenFlow controller to detect network |
... | @@ -152,10 +150,11 @@ public class OpenFlowRuleProvider extends AbstractProvider implements FlowRulePr | ... | @@ -152,10 +150,11 @@ public class OpenFlowRuleProvider extends AbstractProvider implements FlowRulePr |
152 | return; | 150 | return; |
153 | } | 151 | } |
154 | final OFFlowStatsReply replies = (OFFlowStatsReply) stats; | 152 | final OFFlowStatsReply replies = (OFFlowStatsReply) stats; |
155 | - final List<FlowEntry> entries = Lists.newLinkedList(); | 153 | + final List<FlowRule> entries = Lists.newLinkedList(); |
156 | for (OFFlowStatsEntry reply : replies.getEntries()) { | 154 | for (OFFlowStatsEntry reply : replies.getEntries()) { |
157 | - | 155 | + entries.add(new FlowRuleBuilder(reply).build()); |
158 | } | 156 | } |
157 | + providerService.pushFlowMetrics(entries); | ||
159 | 158 | ||
160 | 159 | ||
161 | } | 160 | } | ... | ... |
-
Please register or login to post a comment