nephos.load_config
index
/media/hdd/Essentials/Chapter_Kgp_WOrk/GSoC/projectnephos_gsoc18/GSoC18Nephos/nephos/load_config.py

Contains class which facilitates loading configurations files and implementing them

 
Modules
       
logging
os
pydash
yaml

 
Classes
       
builtins.object
Config

 
class Config(builtins.object)
    class managing all the configuration work
 
  Methods defined here:
configure_modules(self)
Loads configuration into each module
 
Returns
-------
initialise(self)
Initialises logger, database etc. with loaded configuration
Returns
-------
load_config(self)
Loads configurations from /config/ (Path relative to __nephos_dir__)
 
Returns
-------

Static methods defined here:
load_data(file_name, is_config)
Loads data from YAML configuration
 
Using PyYAML's safe_load method, read more at
https://security.openstack.org/guidelines/dg_avoid-dangerous-input-parsing-libraries.html
 
Parameters
----------
file_name
    type: str
    name of the config file, else full path for data files
is_config
    type: bool
    if file is config, default loads.
 
Returns
-------
type: dict
Dictionary containing configuration information provided by the path or default path
type: bool
False if the file is a data file and fails to load

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
logging_config = None
maintenance_config = None
modules_config = None

 
Functions
       
get_env_var(name)
Gets environment variable from the OS
Issues a warning if the environment variable is not fount.
 
Parameters
----------
name
    type:str
    name of the environment variable
 
Returns
-------
    type: depends on environment variable
    data of the environment variable

 
Data
        LOG = <logging.Logger object>
__config_dir__ = '/home/thealpha/Nephos/config'
__default_config_dir__ = '/media/hdd/Essentials/Chapter_Kgp_WOrk/GSoC/projectnephos_gsoc18/GSoC18Nephos/nephos/default_config'
__nephos_dir__ = '/home/thealpha/Nephos'