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-29 11:29:06 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
54fa580427469adb291df15beb7bd29f08678fd2
54fa5804
1 parent
898fcca1
Refactor: Extract method
Change-Id: I729f679f2adcdc8507f0bb24a2d89117df18a5e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java
core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java
View file @
54fa580
...
...
@@ -290,20 +290,24 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu
}
private
boolean
isAllowed
(
OpticalCircuitIntent
circuitIntent
,
OpticalConnectivityIntent
connIntent
)
{
ConnectPoint
srcStaticPort
=
staticPort
(
circuitIntent
.
getSrc
());
if
(
srcStaticPort
!=
null
)
{
if
(!
srcStaticPort
.
equals
(
connIntent
.
getSrc
()))
{
return
false
;
}
if
(!
isAllowed
(
circuitIntent
.
getSrc
(),
connIntent
.
getSrc
()))
{
return
false
;
}
ConnectPoint
dstStaticPort
=
staticPort
(
circuitIntent
.
getDst
());
if
(
dstStaticPort
!=
null
)
{
if
(!
dstStaticPort
.
equals
(
connIntent
.
getDst
()))
{
if
(!
isAllowed
(
circuitIntent
.
getDst
(),
connIntent
.
getDst
()))
{
return
false
;
}
return
true
;
}
private
boolean
isAllowed
(
ConnectPoint
circuitCp
,
ConnectPoint
connectivityCp
)
{
ConnectPoint
srcStaticPort
=
staticPort
(
circuitCp
);
if
(
srcStaticPort
!=
null
)
{
if
(!
srcStaticPort
.
equals
(
connectivityCp
))
{
return
false
;
}
}
return
true
;
}
...
...
Please
register
or
login
to post a comment