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-02-24 14:17:13 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
53f4c894d4dcf6b0fa066934f99ea67e3d4769fd
53f4c894
1 parent
4dab561d
Make use of Optional more idiomatic
Change-Id: Ibe8f07a5de6b2927217cff5aeb29c6c103cd96ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
View file @
53f4c89
...
...
@@ -26,7 +26,6 @@ import org.onlab.packet.VlanId;
import
org.onosproject.core.ApplicationId
;
import
org.onosproject.core.CoreService
;
import
org.onosproject.net.ConnectPoint
;
import
org.onosproject.net.EncapsulationType
;
import
org.onosproject.net.Link
;
import
org.onosproject.net.LinkKey
;
import
org.onosproject.net.flow.DefaultFlowRule
;
...
...
@@ -118,13 +117,17 @@ public class PathIntentCompiler implements IntentCompiler<PathIntent> {
return
ImmutableList
.
of
(
new
FlowRuleIntent
(
appId
,
null
,
rules
,
intent
.
resources
()));
}
List
<
FlowRule
>
rules
=
Collections
.
emptyList
();
if
(
EncapsulationType
.
VLAN
==
encapConstraint
.
get
().
encapType
())
{
rules
=
manageVlanEncap
(
intent
);
}
else
if
(
EncapsulationType
.
MPLS
==
encapConstraint
.
get
().
encapType
())
{
//TODO: to be implemented
rules
=
Collections
.
emptyList
();
}
List
<
FlowRule
>
rules
=
encapConstraint
.
map
(
EncapsulationConstraint:
:
encapType
)
.
map
(
type
->
{
switch
(
type
)
{
case
VLAN:
return
manageVlanEncap
(
intent
);
// TODO: implement MPLS case here
default
:
return
Collections
.<
FlowRule
>
emptyList
();
}
})
.
orElse
(
Collections
.
emptyList
());
return
ImmutableList
.
of
(
new
FlowRuleIntent
(
appId
,
null
,
rules
,
intent
.
resources
()));
}
...
...
Please
register
or
login
to post a comment