Ticket #163 (closed enhancement: fixed)

Opened 17 years ago

Last modified 17 years ago

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:


Wish: Make cfile in accessible to the Plugins ( i.e., 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.(?)


Change History

comment:1 Changed 17 years ago by desai

  • Status changed from new to closed
  • Resolution set to fixed

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.

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.