X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fhosttracker%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fhosttracker%2Finternal%2FHostTracker.java;h=8468c5b284aee7230d2264974f33e3d428f07127;hp=446f51eb04c81bd3be6f38038e1d6b33cb5fe964;hb=934490635d3a1c4ebd27703d33f382ae7d676a4f;hpb=54b712d339321e0937ba85a84b60a75b742b9301 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 446f51eb04..8468c5b284 100644 --- 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"); } - 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); + /* + * 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