Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fixed a bug to block the creation of a static host on an ISL port, removed the code...
[controller.git]
/
opendaylight
/
hosttracker
/
implementation
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
hosttracker
/
internal
/
HostTracker.java
diff --git
a/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java
b/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java
index 446f51eb04c81bd3be6f38038e1d6b33cb5fe964..8468c5b284aee7230d2264974f33e3d428f07127 100644
(file)
--- a/
opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java
+++ b/
opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java
@@
-1018,7
+1018,6
@@
public class HostTracker implements IfIptoHost, IfHostListener, ISwitchManagerAw
if (nc == null) {
return new Status(StatusCode.BADREQUEST, "Invalid NodeConnector");
}
if (nc == null) {
return new Status(StatusCode.BADREQUEST, "Invalid NodeConnector");
}
-
HostNodeConnector host = null;
try {
host = new HostNodeConnector(dataLayerAddress, networkAddr, nc, vlan);
HostNodeConnector host = null;
try {
host = new HostNodeConnector(dataLayerAddress, networkAddr, nc, vlan);
@@
-1036,6
+1035,14
@@
public class HostTracker implements IfIptoHost, IfHostListener, ISwitchManagerAw
return new Status(StatusCode.CONFLICT, "Existing IP, Use PUT to update");
}
host.setStaticHost(true);
return new Status(StatusCode.CONFLICT, "Existing IP, Use PUT to update");
}
host.setStaticHost(true);
+ /*
+ * Check if the nc is an ISL port
+ */
+ if (topologyManager != null) {
+ if (topologyManager.isInternal(nc)) {
+ return new Status(StatusCode.BADREQUEST, "Cannot add host on ISL port");
+ }
+ }
/*
* Before adding host, Check if the switch and the port have already
* come up
/*
* Before adding host, Check if the switch and the port have already
* come up