Improve property-based configuration
- Add OpenFlowPluginConfigurationService. This service can control
updating of OpenFlowPlugin configuration (skip-table-features etc.)
in initialization phase and also on the fly.
- Comment out default settings in org.opendaylight.openflowplugin.cfg
because with all default values set in that file, we are ignoring
values specified in openflow-provider-config.yang.
- Add support for missing configuration values from
openflow-provider-config.yang to OpenFlowPluginConfigurationService
- Remove changeable configuration values that was passed to some
OpenFlowPlugin class implementations to both constructors and setters
from constructors to prevent code duplicity and to simplify code a bit
Now, when feature is installed,
default values are taken from openflow-provider-config.yang, then we
check if we have org.opendaylight.openflowplugin.cfg file in karaf/etc/
(blueprint will do this for us) and try to read it as map. Then we will
pass this map to update method, that will iterate over this map and
parse it's keys and values and calls appropriate update methods in
OpenflowPluginProviderImpl based on key
(f.e skip-table-features will call
OpenflowPluginProviderImpl#updateSkipTableFeatures).
When org.opendaylight.openflowplugin.cfg file is changed, we receive
notification about it in form of
OpenFlowPluginConfigurationService#update method call, and we will
repeat same procedure as during initialization (parse map passed as
argument to this method and update configuration).
Resolves: bug 7218
Change-Id: Ida986f7dfffe55a90ddb6f354f0addf56c3c4b90
Signed-off-by: Tomas Slusny <tomas.slusny@pantheon.tech>
23 files changed: