alshabib

flowrule builder

......@@ -36,6 +36,6 @@ public interface FlowRuleProviderService extends ProviderService<FlowRuleProvide
* @param deviceId device identifier
* @return collection of flow entries
*/
void pushFlowMetrics(Iterable<FlowEntry> flowEntries);
void pushFlowMetrics(Iterable<FlowRule> flowEntries);
}
......
......@@ -75,7 +75,7 @@ public final class Criteria {
* @param vlanPcp vlan pcp value
* @return match criterion
*/
public static Criterion matchVlanId(Byte vlanPcp) {
public static Criterion matchVlanPcp(Byte vlanPcp) {
return new VlanPcpCriterion(vlanPcp);
}
......
......@@ -2,6 +2,7 @@ package org.onlab.onos.provider.of.flow.impl;
import static org.slf4j.LoggerFactory.getLogger;
import java.util.List;
import java.util.Map;
import org.apache.felix.scr.annotations.Activate;
......@@ -34,9 +35,6 @@ import org.slf4j.Logger;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
rt org.slf4j.Logger;
import com.google.common.collect.Maps;
/**
* Provider which uses an OpenFlow controller to detect network
......@@ -152,10 +150,11 @@ public class OpenFlowRuleProvider extends AbstractProvider implements FlowRulePr
return;
}
final OFFlowStatsReply replies = (OFFlowStatsReply) stats;
final List<FlowEntry> entries = Lists.newLinkedList();
final List<FlowRule> entries = Lists.newLinkedList();
for (OFFlowStatsEntry reply : replies.getEntries()) {
entries.add(new FlowRuleBuilder(reply).build());
}
providerService.pushFlowMetrics(entries);
}
......