Juan Hernandez has uploaded a new change for review.

Change subject: core: Add local configuration helper
......................................................................

core: Add local configuration helper

This patch adds the LocalConfig class intended to centralize the
management of local configuration stored in the
/etc/sysconfig/ovirt-engine file (or whatever the ENGINE_VARS
environment variable points to).

The name "local" is intended to convey the difference between the
configuration that is specific to a particular node and the
configuration that is "global", stored in the database, and shared
by all the nodes in a (future) cluster.

The class loads the file when and reloads it whenever it changes.

The intended use is something like this:

  LocalConfig config = LocalConfig.getInstance();
  String myVar = config.getProperty("MY_VAR");

In addition to this generic interface it also supports other
methods to get the values of well known variables, like port
numbers and directories, for example:

  int httpPort = config.getExternalHttpPort();
  int httpsPort = config.getExternalHttpPort();

These methods contain some logic to decide if the external
port is the one used by the web server or the one used by the
application server.

Change-Id: Ib0106a71c3a1c7c145d4ca836225ce2a26aa115f
Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com>
---
A 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/LocalConfig.java
1 file changed, 368 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/73/6673/1
--
To view, visit http://gerrit.ovirt.org/6673
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0106a71c3a1c7c145d4ca836225ce2a26aa115f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to