Modify ↓
Ticket #163 (closed enhancement: fixed)
Make bcfg2.conf file accessible to the Plugins
Reported by: | [email protected]… | Owned by: | desai |
---|---|---|---|
Priority: | minor | Milestone: | Bcfg2 0.8.5 Release |
Component: | bcfg2-server | Version: | |
Keywords: | Cc: |
Description
Wish: Make cfile in Core.py accessible to the Plugins ( i.e. Core.py, line 202 set self.cfile = ConfigParser?...). Would allow the Plugins to read own section entries (e.g. database connection config) from the bcfg.conf file.
Otherwise every Plugin would need to open himself the bcfg2.conf file.(?) Also the path to the bcfg2.conf file is not known within the Plugin class.(?)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
I have committed code to Bcfg2.Server.Core that makes the bcfg2.conf file available as a ConfigParser? instance as self.cfile. The server core is accessible inside of any plugin as self.core, so the ConfigParser? instance will be available as self.core.cfile from any plugin. This is committed in r2340.