Victor Silva
Committed by Gerrit Code Review

OpenFlowDeviceProvider: call modified to properly grab configuration

Call modified() to grab configuration, if it exists. Current
behavior is to ignore previous cfg files and only really change
the property after configuration events.

Co-Authored-By: Thiago Sousa Santos <thiago@waltznetworks.com>

Change-Id: I48408cc77a296f4ed47a026856ca41458c9c62b7
......@@ -37,6 +37,7 @@ import java.util.Dictionary;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Properties;
import java.util.Set;
import java.util.Timer;
......@@ -179,6 +180,8 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr
controller.addListener(listener);
controller.addEventListener(listener);
modified(context);
connectInitialDevices();
LOG.info("Started");
}
......@@ -197,7 +200,7 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr
@Modified
public void modified(ComponentContext context) {
Dictionary<?, ?> properties = context.getProperties();
Dictionary<?, ?> properties = context != null ? context.getProperties() : new Properties();
int newPortStatsPollFrequency;
try {
String s = get(properties, POLL_PROP_NAME);
......