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
tom
2014-09-19 19:25:47 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
85c612bb8addcdf63304b5d50a8dfad621fcdc02
85c612bb
1 parent
202175ad
Doh! Forgot to ignite SimpleFlowRuleStore as a component. Pingall now works again!
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletions
core/trivial/src/main/java/org/onlab/onos/net/trivial/impl/SimpleFlowRuleStore.java
features/features.xml
core/trivial/src/main/java/org/onlab/onos/net/trivial/impl/SimpleFlowRuleStore.java
View file @
85c612b
...
...
@@ -3,23 +3,43 @@ package org.onlab.onos.net.trivial.impl;
import
com.google.common.collect.HashMultimap
;
import
com.google.common.collect.ImmutableSet
;
import
com.google.common.collect.Multimap
;
import
org.apache.felix.scr.annotations.Activate
;
import
org.apache.felix.scr.annotations.Component
;
import
org.apache.felix.scr.annotations.Deactivate
;
import
org.apache.felix.scr.annotations.Service
;
import
org.onlab.onos.net.DeviceId
;
import
org.onlab.onos.net.flow.DefaultFlowRule
;
import
org.onlab.onos.net.flow.FlowRule
;
import
org.onlab.onos.net.flow.FlowRuleEvent
;
import
org.onlab.onos.net.flow.FlowRuleStore
;
import
org.slf4j.Logger
;
import
static
org
.
onlab
.
onos
.
net
.
flow
.
FlowRuleEvent
.
Type
.
RULE_ADDED
;
import
static
org
.
onlab
.
onos
.
net
.
flow
.
FlowRuleEvent
.
Type
.
RULE_REMOVED
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
/**
* Manages inventory of flow rules using trivial in-memory implementation.
*/
@Component
(
immediate
=
true
)
@Service
public
class
SimpleFlowRuleStore
implements
FlowRuleStore
{
private
final
Logger
log
=
getLogger
(
getClass
());
// store entries as a pile of rules, no info about device tables
private
final
Multimap
<
DeviceId
,
FlowRule
>
flowEntries
=
HashMultimap
.
create
();
@Activate
public
void
activate
()
{
log
.
info
(
"Started"
);
}
@Deactivate
public
void
deactivate
()
{
log
.
info
(
"Stopped"
);
}
@Override
public
Iterable
<
FlowRule
>
getFlowEntries
(
DeviceId
deviceId
)
{
return
ImmutableSet
.
copyOf
(
flowEntries
.
get
(
deviceId
));
...
...
features/features.xml
View file @
85c612b
...
...
@@ -88,5 +88,4 @@
<bundle>
mvn:org.onlab.onos/onos-app-fwd/1.0.0-SNAPSHOT
</bundle>
</feature>
</features>
...
...
Please
register
or
login
to post a comment