[openstack-dev] [Trove] Multiple api extension paths

boden boden at linux.vnet.ibm.com
Mon Apr 28 19:20:35 UTC 2014


Guys,
I have a few small features / enhancements I'd like to suggest. I'm 
willing to contribute the code / unit tests myself, but am looking for a 
consensus from the group before I invest the time.

There are a few enhancements on my list -- I will send details each in a 
separate email to keep the communication clearer.

I'd like to propose that trove supports the ability to have multiple API 
extension paths. The current impl of trove supports the ability to 
specify the api extension path [1]. This path is obviously searched at 
start-up and extensions found are loaded / added to trove API. However 
if consumers want to plug-in their own API extensions they have to copy 
them into the trove python path specified by [1] as this is a string 
property only accepting a single path [2].

I was thinking something like the following:
(a) Change the api_extensions_path to a comma list rather than just a 
single string.

(b) Default the value to ['trove/extensions/routes'] for backwards 
compat [2].

(c) Update trove.common.extensions.py to support an array of api 
extension paths [2] such that each path is used in the extension mgmt / 
mapping.

This would allow consumers to plug-in API extensions without having to 
inject their extension classes / code in the same python dist path as 
trove while still maintaining the existing trove 'core' extensions.


Any disagreement / comments on this enhancement? Again -- I can 
contribute the code, unless someone is bored and wants to run with it 
short-term.

Thanks


[1] 
https://github.com/openstack/trove/blob/master/etc/trove/trove.conf.sample#L71
[2] https://github.com/openstack/trove/blob/master/trove/common/cfg.py#L42




More information about the OpenStack-dev mailing list