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.<div><br></div><div>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:</div>
<div><br></div><div><a href="https://github.com/termie/keystonelight/blob/master/keystonelight/test.py#L107">https://github.com/termie/keystonelight/blob/master/keystonelight/test.py#L107</a></div><div><br></div><div>--andy<br>
<br><div class="gmail_quote">On Mon, Nov 28, 2011 at 12:57 PM, Mark McLoughlin <span dir="ltr"><<a href="mailto:markmc@redhat.com">markmc@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Jason,<br>
<div class="im"><br>
On Mon, 2011-11-28 at 10:24 -0600, Jason Kölker wrote:<br>
> On Mon, 2011-11-28 at 08:06 -0800, Monty Taylor wrote:<br>
> > > The idea is to unify option handling across projects with this new API.<br>
> > > The module would eventually (soon?) live in openstack-common.<br>
> ><br>
> > Awesome. So - whaddya think about making openstack-common an<br>
> > installable/consumable module?<br>
><br>
> I've extracted openstack-common as a stanalone module from<br>
> openstack-skeleton at <a href="https://github.com/jkoelker/openstack-common" target="_blank">https://github.com/jkoelker/openstack-common</a> for<br>
> melange. I also converted the rest of openstack-skeleton to a paster<br>
> template in the openstack-paste repo. Its there for the picking if<br>
> anyone wants to use it.<br>
><br>
> I'd love to see a unified effort on some front extracting bits and<br>
> moving them into the openstack namespace as an official gerrit, et. al.<br>
> project.<br>
><br>
> Happy Hacking!<br>
<br>
</div>Cool stuff. I'll dig into it soon and send you a pull request with the<br>
cfg module.<br>
<br>
Cheers,<br>
Mark.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
</div></div></blockquote></div><br></div>