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
Madan Jampani
2014-10-24 11:42:07 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
719b3c505e3c7a89eacf995beb7f5d73cf48e86f
719b3c50
1 parent
6a45616d
FlowRuleStore no longer supports applicationId based APIs
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
36 deletions
core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleStore.java
core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java
core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleFlowRuleStore.java
core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleStore.java
View file @
719b3c5
...
...
@@ -20,7 +20,6 @@ package org.onlab.onos.net.flow;
import
java.util.concurrent.Future
;
import
org.onlab.onos.ApplicationId
;
import
org.onlab.onos.net.DeviceId
;
import
org.onlab.onos.store.Store
;
...
...
@@ -53,14 +52,6 @@ public interface FlowRuleStore extends Store<FlowRuleBatchEvent, FlowRuleStoreDe
Iterable
<
FlowEntry
>
getFlowEntries
(
DeviceId
deviceId
);
/**
* Returns the flow entries associated with an application.
*
* @param appId the application id
* @return the flow entries
*/
Iterable
<
FlowRule
>
getFlowRulesByAppId
(
ApplicationId
appId
);
/**
// TODO: Better description of method behavior.
* Stores a new flow rule without generating events.
*
...
...
core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java
View file @
719b3c5
...
...
@@ -26,7 +26,6 @@ import org.apache.felix.scr.annotations.Deactivate;
import
org.apache.felix.scr.annotations.Reference
;
import
org.apache.felix.scr.annotations.ReferenceCardinality
;
import
org.apache.felix.scr.annotations.Service
;
import
org.onlab.onos.ApplicationId
;
import
org.onlab.onos.cluster.ClusterService
;
import
org.onlab.onos.net.Device
;
import
org.onlab.onos.net.DeviceId
;
...
...
@@ -265,15 +264,6 @@ public class DistributedFlowRuleStore
}
@Override
public
synchronized
Iterable
<
FlowRule
>
getFlowRulesByAppId
(
ApplicationId
appId
)
{
Collection
<
FlowRule
>
rules
=
flowEntriesById
.
get
(
appId
.
id
());
if
(
rules
==
null
)
{
return
Collections
.
emptyList
();
}
return
ImmutableSet
.
copyOf
(
rules
);
}
@Override
public
void
storeFlowRule
(
FlowRule
rule
)
{
storeBatch
(
new
FlowRuleBatchOperation
(
Arrays
.
asList
(
new
FlowRuleBatchEntry
(
FlowRuleOperation
.
ADD
,
rule
))));
}
...
...
core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleFlowRuleStore.java
View file @
719b3c5
...
...
@@ -7,7 +7,6 @@ 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.ApplicationId
;
import
org.onlab.onos.net.DeviceId
;
import
org.onlab.onos.net.flow.CompletedBatchOperation
;
import
org.onlab.onos.net.flow.DefaultFlowEntry
;
...
...
@@ -31,9 +30,7 @@ import org.slf4j.Logger;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentMap
;
import
java.util.concurrent.CopyOnWriteArrayList
;
...
...
@@ -143,20 +140,6 @@ public class SimpleFlowRuleStore
}
@Override
public
Iterable
<
FlowRule
>
getFlowRulesByAppId
(
ApplicationId
appId
)
{
Set
<
FlowRule
>
rules
=
new
HashSet
<>();
for
(
DeviceId
did
:
flowEntries
.
keySet
())
{
for
(
FlowEntry
fe
:
getFlowEntries
(
did
))
{
if
(
fe
.
appId
()
==
appId
.
id
())
{
rules
.
add
(
fe
);
}
}
}
return
rules
;
}
@Override
public
void
storeFlowRule
(
FlowRule
rule
)
{
storeFlowRuleInternal
(
rule
);
}
...
...
Please
register
or
login
to post a comment