mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-16 09:51:38 +02:00
flowrule builder
This commit is contained in:
parent
cd2c684652
commit
b45d196713
@ -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;
|
||||
@ -33,9 +34,6 @@ import org.projectfloodlight.openflow.protocol.OFStatsType;
|
||||
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;
|
||||
|
||||
/**
|
||||
@ -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);
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user