← Back to team overview

openstack team mailing list archive

Re: [RFC] Common config options module

 

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@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References