Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
alshabib
2014-09-18 14:25:45 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b45d19671324997dd5a42ec10d2cb7280cacc1cc
b45d1967
1 parent
cd2c6846
flowrule builder
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProviderService.java
core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java
providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java
core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProviderService.java
View file @
b45d196
...
...
@@ -36,6 +36,6 @@ public interface FlowRuleProviderService extends ProviderService<FlowRuleProvide
* @param deviceId device identifier
* @return collection of flow entries
*/
void
pushFlowMetrics
(
Iterable
<
Flow
Entry
>
flowEntries
);
void
pushFlowMetrics
(
Iterable
<
Flow
Rule
>
flowEntries
);
}
...
...
core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java
View file @
b45d196
...
...
@@ -75,7 +75,7 @@ public final class Criteria {
* @param vlanPcp vlan pcp value
* @return match criterion
*/
public
static
Criterion
matchVlan
Id
(
Byte
vlanPcp
)
{
public
static
Criterion
matchVlan
Pcp
(
Byte
vlanPcp
)
{
return
new
VlanPcpCriterion
(
vlanPcp
);
}
...
...
providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java
View file @
b45d196
...
...
@@ -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
<
Flow
Entry
>
entries
=
Lists
.
newLinkedList
();
final
List
<
Flow
Rule
>
entries
=
Lists
.
newLinkedList
();
for
(
OFFlowStatsEntry
reply
:
replies
.
getEntries
())
{
entries
.
add
(
new
FlowRuleBuilder
(
reply
).
build
());
}
providerService
.
pushFlowMetrics
(
entries
);
}
...
...
Please
register
or
login
to post a comment