diff options
Diffstat (limited to 'src/python/lmi/base')
| -rw-r--r-- | src/python/lmi/base/BaseConfiguration.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/python/lmi/base/BaseConfiguration.py b/src/python/lmi/base/BaseConfiguration.py index 8333cca..baabcc6 100644 --- a/src/python/lmi/base/BaseConfiguration.py +++ b/src/python/lmi/base/BaseConfiguration.py @@ -72,6 +72,10 @@ class BaseConfiguration(Singleton): There should be only one instance of this class. """ + #: Allow to access global configuration object also from lmi.providers + #: subpackage where ``get_instance()`` can not be used. + #: This variable shall be set in ``__init__()`` method. + INSTANCE = None CONFIG_DIRECTORY_TEMPLATE_TOPLEVEL = '/etc/openlmi/' CONFIG_DIRECTORY_TEMPLATE_PROVIDER = '/etc/openlmi/%(provider_prefix)s/' CONFIG_FILE_PATH_TEMPLATE_TOPLEVEL = \ @@ -152,6 +156,7 @@ class BaseConfiguration(Singleton): self.config = ConfigParser.SafeConfigParser( defaults=self.default_options()) self.load() + BaseConfiguration.INSTANCE = self def add_listener(self, callback): """ @@ -199,11 +204,6 @@ class BaseConfiguration(Singleton): return self.config.get('CIM', 'SystemClassName') @property - def system_name(self): - """ Return SystemName of OpenLMI provider. """ - return socket.getfqdn() - - @property def logging_level(self): """ Return name of logging level in lower case. """ return self.config.get('Log', 'Level').lower() |
