[Openstack] [RFC] Common config options module

Andy Smith andyster at gmail.com
Mon Dec 5 23:32:39 UTC 2011


Took a look over the wiki for this. The approach is very similar to one
I've used recently so I wanted to bring up something that looks like it may
have been overlooked.

In testing it is frequent practice that you want to ensure global config
state and somehow overwrite global config state on the fly (for example
when you have dynamic ports being assigned to a service), passing config
dicts around everywhere makes this task a bit harder. My solution was to
force all instances being handed an options dict to assign it to the
.options attribute on itself, and to use a common name for chained
applications so that it is possible to traverse the tree:

https://github.com/termie/keystonelight/blob/master/keystonelight/test.py#L107

--andy

On Mon, Nov 28, 2011 at 12:57 PM, Mark McLoughlin <markmc at redhat.com> wrote:

> Hi Jason,
>
> On Mon, 2011-11-28 at 10:24 -0600, Jason Kölker wrote:
> > On Mon, 2011-11-28 at 08:06 -0800, Monty Taylor wrote:
> > > > The idea is to unify option handling across projects with this new
> API.
> > > > The module would eventually (soon?) live in openstack-common.
> > >
> > > Awesome. So - whaddya think about making openstack-common an
> > > installable/consumable module?
> >
> > I've extracted openstack-common as a stanalone module from
> > openstack-skeleton at https://github.com/jkoelker/openstack-common for
> > melange. I also converted the rest of openstack-skeleton to a paster
> > template in the openstack-paste repo. Its there for the picking if
> > anyone wants to use it.
> >
> > I'd love to see a unified effort on some front extracting bits and
> > moving them into the openstack namespace as an official gerrit, et. al.
> > project.
> >
> > Happy Hacking!
>
> Cool stuff. I'll dig into it soon and send you a pull request with the
> cfg module.
>
> Cheers,
> Mark.
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20111205/6ca1762a/attachment.html>


More information about the Openstack mailing list