[kea-dev] Re[2]: Hooks libraries and configuration information
Федоренко Вадим
jun-junk at yandex.ru
Thu Nov 5 08:28:41 UTC 2015
Friday, October 30, 2015, 4:46:52 AM, Tomek Mrugalski wrote:
> On 17/10/15 00:48, Vadim Fedorenko wrote:
>> It's good point to have an access to full configuration values inside
>> the hook library. For example, I want to know the lease database
>> connection parameters to make my hooks library access the same
>> database for some reasons. And it's not a good thing to make
>> duplicates in library's own parameter list.
> Hi Vadim!
> First of all, sorry for not replying earlier. Your mail must have
> slipped through.
> Yes, you are right. The situation could be improved. There are at least
> three aspects.
> First, accessing general configuration from hooks. For example, hooks
> library could look at the subnets or options information. See ticket
> #3456 for details. Until this ticket is implemented, you could include
> dhcpsrv/cfgmgr.h and call CfgMgr::instance().getCurrentCfg() to access
> the full configuration. Care must be taken to not modify the configuration.
> Second, if MySQL or Postgres is used, the connection could be exposed to
> the hooks. See #3457.
> Third, there should be a way to provide hook specific configuration
> parameters. For example, a hook library may want to have a verbose
> switch or name of a file etc. See #3259. The initial part of this effort
> is currently under review. It should go through into 1.0.
> The first two tickets are not planned for 1.0. It's simply because of
> time constraints and the number of other tickets that we need to do for
> 1.0. We'll discuss those tickets and see if we can squeeze them into 1.1.
> Tomek
Hi, Tomek!
Thanks for answer, I'll try to use CfgMgr::instance().getCurrentCfg().
And still waiting for that things to go into 1.1
Vadim
More information about the kea-dev
mailing list