Modify

Ticket #163 (closed enhancement: fixed)

Opened 15 years ago

Last modified 15 years ago

Make bcfg2.conf file accessible to the Plugins

Reported by: gogo@… 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

comment:1 Changed 15 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.

View

Add a comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.