[openstack-dev] Configuration Options, APIs, Class Paths, Oh my!

Sean Dague sdague at linux.vnet.ibm.com
Tue Oct 30 17:32:49 UTC 2012


On 10/30/2012 11:55 AM, Russell Bryant wrote:
> On 10/30/2012 11:37 AM, Kevin L. Mitchell wrote:
>> On Mon, 2012-10-29 at 21:21 -0400, Russell Bryant wrote:
>>> This patch introduces a new configuration option, servicegroup_driver.
>>> The default value for this option is
>>> 'nova.servicegroup.db_driver.DbDriver'.  I have a couple of objections
>>> with using a class path as the value.
>>>
>>> 1) It breaks as soon as the code moves.
>> [snip]
>>> 2) It implies that this is a stable, supported API.
>>
>> As a point of information, there is currently a series of patches by
>> Monty to move nova over to using entrypoints.
>>
>
> Thanks for pointing that out.  I see that one patch in the series adds
> short names:
>
> https://review.openstack.org/#/c/15030/
>
> That resolves most of my concerns as long as we update all examples to
> use the short names and leave the full paths as an implementation
> detail.  Supporting the full paths for backwards compatibility makes
> sense though.

Aren't these 2 different issues:

Issue 1: does the user have a config file that's not full of python for 
convenience?

This is solved by moving our loader for modules over to entry points 
because we can have aliases.

Issue 2: do we allow arbitrary code at these extension points?

As far as I can tell the barn door gets opened even wider with extension 
points (monty or doug can correct me).

So if the primary concern is preventing the user from specifying 
arbitrary class there, because we in no way consider this a stable 
interfaces, this doesn't make it better, and possibly makes it worse.

	-Sean

-- 
Sean Dague
IBM Linux Technology Center
email: sdague at linux.vnet.ibm.com
alt-email: sldague at us.ibm.com




More information about the OpenStack-dev mailing list