BaseConfigManager (version 1.0, May 02 2003)
index
/home/garzogli/tmp/jim_config/src/python/JimConfigManager/BaseConfigManager.py

This python script makes managing the configuration easy

 
Modules
            
os
re
string
sys
time
traceback

 
Classes
            
BaseConfigManager

 
class BaseConfigManager
       
  
__init__(self, name)
Contructor to create a BaseConfigManager
 
name - Name of the package
version - Version of the package.
qualifiers - Qualifiers for the package
getConfigAttr(self, xpath, attr)
Get a single configuation attribute from the FS
 
xpath  - Xpath to the attribute
attr   - Name of the attribute
returns a single configuration in the form of string
getConfigPyXmlObject(self)
Get the configuration in the form of PyXmlObject
 
return configuration in the form of PyXmlObject
getConfigString(self)
Get the configuration
 
return configuration in the form of string
getDebugMode(self)
getDefaultMode(self)
getGlobalConfigDocName(self)
getGlobalContext(self)
getGlobalPath(self)
getHostDependentPrdList(self)
getPrdCollection(self)
getPrdConfigDocName(self)
getPrdMachine(self)
getPrdPath(self)
getPrdQualifiers(self)
getPrdReleaseDir(self)
getPrdVersion(self)
getProductsCollection(self)
getProductsHost(self)
getSiteConfigDocName(self)
getSiteContext(self)
getSitePath(self)
printConfigDetails(self)
printDebug(self, str)
storeConfigFile(self, config_file)
Store the configuration from the file to default location
 
config_file - Name of the configuration file 
returns 0 if successful, 1 if error
storeConfigString(self, config_str)
Store the configuration in the form of xml string to default location
 
config_str - Configuration in the form of xml string

 
Data
             _DEFAULT_MODE = 'DBFS'
_GLOBAL_COLLECTION = 'global'
_GLOBAL_CONFIG_DOC_NAME = 'global_config'
_GLOBAL_PATH = '/samdisk/products/db/jim_config/global'
_HOST_DEPENDENT_PRODUCTS_LIST = ['samgrid', 'jim_advertise', 'jim_broker', 'jim_broker_client', 'jim_sandbox', 'jim_info_providers', 'test_product1']
_JIM_CONFIG_MANAGER_DEBUG_MODE = 'FALSE'
_JIM_CONFIG_MANAGER_LOG = None
_JIM_UPS_DB = '/samdisk/products/db'
_JIM_XMLDB_CONTEXT = 'db'
_PRODUCTS_COLLECTION = 'products'
_PRODUCTS_HOST_NAME = None
_PRODUCT_CONFIG_DOC_NAME = 'config'
_SITE_COLLECTION = 'site'
_SITE_CONFIG_DOC_NAME = 'site_config'
_SITE_PATH = '/samdisk/products/db/jim_config/site'
__author__ = 'Parag Mhashilkar <parag@fnal.gov>'
__date__ = 'May 02 2003'
__file__ = './BaseConfigManager.pyc'
__name__ = 'BaseConfigManager'
__version__ = '1.0'

 
Author
             Parag Mhashilkar <parag@fnal.gov>