Use Config Admin to overlay datastore properties 85/15485/11
authortpantelis <tpanteli@brocade.com>
Wed, 18 Feb 2015 12:37:53 +0000 (07:37 -0500)
committerTom Pantelis <tpanteli@brocade.com>
Sun, 22 Feb 2015 09:58:08 +0000 (04:58 -0500)
Added functionality to configure DatastoreContext settings via a
properties file, org.opendaylight.controller.cluster.datastore.cfg, in the karaf
etc dir. The properties are overlayed onto the DatastoreContext that is
initialized via the config yang XML file. This allows for separation of
the wiring in the config yang XML from the user-facing config settings
to facilitate preserving the user-facing config settings on upgrade
while applying wiring changes.

The DatastoreContextIntrospector class is responsible for applying the
property key/values obtained from the Config Admin Configuration to the
current DatastoreContext.

The DatastoreContextConfigAdminOverlay class interfaces with the
ConfigurationAdmin OSGi service to obtain the configuration and calls
into the DatastoreContextIntrospector.

Modified DatastoreContext.Builder to support loading from an existing
DatastoreContext instance and applying changes to it to yield a new
instance on build.

Added a DatastoreConfigurationMXBean that reports the DatastoreContext
settings via JXM. This is useful to see what settings are currently
applied.

Most of the other changes were to wire the new classes from the Module
class to the DistributedDatastore.

Added new unit tests to cover the new code.

Change-Id: I9427907dac576bd416bad677a56fa8259af59a09
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>

No differences found