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
Sho SHIMIZU
2016-08-31 15:17:44 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b212b1f91e4cbf0cc95d31489e5d611d0c6c0667
b212b1f9
1 parent
546bb0f2
Reformat code
Change-Id: Icde0d7e8806f59da99082089a83dda26b23d12a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
15 deletions
core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
View file @
b212b1f
...
...
@@ -521,14 +521,11 @@ public class FlowRuleManager
request
.
ops
().
stream
().
forEach
(
op
->
{
switch
(
op
.
operator
())
{
case
ADD:
post
(
new
FlowRuleEvent
(
RULE_ADD_REQUESTED
,
op
.
target
()));
post
(
new
FlowRuleEvent
(
RULE_ADD_REQUESTED
,
op
.
target
()));
break
;
case
REMOVE:
post
(
new
FlowRuleEvent
(
RULE_REMOVE_REQUESTED
,
op
.
target
()));
post
(
new
FlowRuleEvent
(
RULE_REMOVE_REQUESTED
,
op
.
target
()));
break
;
case
MODIFY:
//TODO: do something here when the time comes.
...
...
@@ -540,10 +537,7 @@ public class FlowRuleManager
);
DeviceId
deviceId
=
event
.
deviceId
();
FlowRuleBatchOperation
batchOperation
=
request
.
asBatchOperation
(
deviceId
);
FlowRuleBatchOperation
batchOperation
=
request
.
asBatchOperation
(
deviceId
);
FlowRuleProvider
flowRuleProvider
=
getProvider
(
deviceId
);
if
(
flowRuleProvider
!=
null
)
{
flowRuleProvider
.
executeBatch
(
batchOperation
);
...
...
@@ -609,8 +603,7 @@ public class FlowRuleManager
}
private
void
process
(
Set
<
FlowRuleOperation
>
ops
)
{
Multimap
<
DeviceId
,
FlowRuleBatchEntry
>
perDeviceBatches
=
ArrayListMultimap
.
create
();
Multimap
<
DeviceId
,
FlowRuleBatchEntry
>
perDeviceBatches
=
ArrayListMultimap
.
create
();
for
(
FlowRuleOperation
flowRuleOperation
:
ops
)
{
FlowRuleBatchEntry
fbe
=
...
...
@@ -619,7 +612,6 @@ public class FlowRuleManager
perDeviceBatches
.
put
(
flowRuleOperation
.
rule
().
deviceId
(),
fbe
);
}
for
(
DeviceId
deviceId
:
perDeviceBatches
.
keySet
())
{
long
id
=
idGenerator
.
getNewId
();
final
FlowRuleBatchOperation
b
=
new
FlowRuleBatchOperation
(
perDeviceBatches
.
get
(
deviceId
),
...
...
@@ -636,8 +628,6 @@ public class FlowRuleManager
}
}
synchronized
void
fail
(
DeviceId
devId
,
Set
<?
extends
FlowRule
>
failures
)
{
hasFailed
=
true
;
pendingDevices
.
remove
(
devId
);
...
...
@@ -653,7 +643,6 @@ public class FlowRuleManager
context
.
onError
(
failedOpsBuilder
.
build
());
}
}
}
@Override
...
...
Please
register
or
login
to post a comment