Devices,hosts, and links can be blocked and kicked off with the network configuration api
Change-Id: I68d427f4886a7b63475df8d35383e2e347946946
diff --git a/providers/host/src/main/java/org/onosproject/provider/host/impl/HostLocationProvider.java b/providers/host/src/main/java/org/onosproject/provider/host/impl/HostLocationProvider.java
index a8c8383..10a845f 100644
--- a/providers/host/src/main/java/org/onosproject/provider/host/impl/HostLocationProvider.java
+++ b/providers/host/src/main/java/org/onosproject/provider/host/impl/HostLocationProvider.java
@@ -270,7 +270,11 @@
private void updateLocation(HostId hid, MacAddress mac,
VlanId vlan, HostLocation hloc) {
HostDescription desc = new DefaultHostDescription(mac, vlan, hloc);
- providerService.hostDetected(hid, desc);
+ try {
+ providerService.hostDetected(hid, desc);
+ } catch (IllegalStateException e) {
+ log.debug("Host {} suppressed", hid);
+ }
}
/**
@@ -286,7 +290,11 @@
VlanId vlan, HostLocation hloc,
IpAddress ip) {
HostDescription desc = new DefaultHostDescription(mac, vlan, hloc, ip);
- providerService.hostDetected(hid, desc);
+ try {
+ providerService.hostDetected(hid, desc);
+ } catch (IllegalStateException e) {
+ log.debug("Host {} suppressed", hid);
+ }
}
@Override