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
Thomas Vachuska
2014-11-10 20:03:27 -0800
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
Gerrit Code Review
2014-11-10 20:03:27 -0800
Commit
361bc539ea32b618356ed4f27b1648a238479d6e
361bc539
2 parents
92a18865
c672d7d1
Merge "Fix bug in validate() in BooleanConstraint"
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
13 deletions
core/api/src/main/java/org/onlab/onos/net/intent/constraint/BooleanConstraint.java
core/api/src/main/java/org/onlab/onos/net/intent/constraint/ObstacleConstraint.java
core/api/src/main/java/org/onlab/onos/net/intent/constraint/BooleanConstraint.java
View file @
361bc53
...
...
@@ -52,7 +52,7 @@ public abstract class BooleanConstraint implements Constraint {
@Override
public
boolean
validate
(
Path
path
,
LinkResourceService
resourceService
)
{
for
(
Link
link
:
path
.
links
())
{
if
(
isValid
(
link
,
resourceService
))
{
if
(
!
isValid
(
link
,
resourceService
))
{
return
false
;
}
}
...
...
core/api/src/main/java/org/onlab/onos/net/intent/constraint/ObstacleConstraint.java
View file @
361bc53
...
...
@@ -19,7 +19,6 @@ import com.google.common.base.MoreObjects;
import
com.google.common.collect.ImmutableSet
;
import
org.onlab.onos.net.DeviceId
;
import
org.onlab.onos.net.Link
;
import
org.onlab.onos.net.Path
;
import
org.onlab.onos.net.resource.LinkResourceService
;
import
java.util.Objects
;
...
...
@@ -49,17 +48,6 @@ public class ObstacleConstraint extends BooleanConstraint {
}
@Override
public
boolean
validate
(
Path
path
,
LinkResourceService
resourceService
)
{
for
(
Link
link
:
path
.
links
())
{
if
(!
isValid
(
link
,
resourceService
))
{
return
false
;
}
}
return
true
;
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
obstacles
);
}
...
...
Please
register
or
login
to post a comment