On 05/04/2012 12:08 PM, Russell Bryant wrote: > On 05/04/2012 11:53 AM, Eric Windisch wrote: >> Russell, >> >> FYI, with the flags patch, it is no longer possible to set >> rpc-implementation dependent flags in fake_flags. >> >> Even Rabbit has a flag in there (fake_rabbit), but Rabbit flags are >> currently global, so it works. That won't be true for long… We're going >> to have to fix this. >> >> One option is to initialize the RPC layer from fake_flags.py and then >> set the options. > > Each place that fake_flags is imported, rpc gets initialized first. See > these lines of code, and the fake_flags import shortly after: > > https://github.com/openstack/nova/blob/master/nova/tests/__init__.py#L63 > https://github.com/openstack/nova/blob/master/bin/nova-dhcpbridge#L103
One other related note ... I heard some rumblings from markmc about getting all projects to standardize on a global config object from openstack.common.cfg. If that happens in nova, then we can get rid of this nova.rpc.register_opts() business completely. >> Another option, for now, might just be to push this problem into the >> implementations and have a global "testing" flag that is >> implementation/backend independent. This is uglier on the >> implementation/driver side, but cleaner on the unit tests. This is >> basically what 'fake_rabbit' is now, anyway. > > As far as I can tell, this isn't actually a problem with the uses of > fake_flags right now. What problem did you hit? -- Russell Bryant _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp