[openstack-dev] [oslo] [nova] [all] potential enginefacade adjustment - can everyone live with this?
Mike Bayer
mbayer at redhat.com
Fri Jan 23 19:47:47 UTC 2015
Doug Hellmann <doug at doughellmann.com> wrote:
>
>
> On Fri, Jan 23, 2015, at 12:49 PM, Mike Bayer wrote:
>> Mike Bayer <mbayer at redhat.com> wrote:
>>
>>> Ihar Hrachyshka <ihrachys at redhat.com> wrote:
>>>
>>>> On 01/23/2015 05:38 PM, Mike Bayer wrote:
>>>>> Doug Hellmann <doug at doughellmann.com> wrote:
>>>>>
>>>>>> We put the new base class for RequestContext in its own library because
>>>>>> both the logging and messaging code wanted to influence it's API. Would
>>>>>> it make sense to do this database setup there, too?
>>>>> whoa, where’s that? is this an oslo-wide RequestContext class ? that would
>>>>> solve everything b.c. right now every project seems to implement
>>>>> RequestContext themselves.
>>
>>
>> so Doug -
>>
>> How does this “influence of API” occur, would oslo.db import
>> oslo_context.context and patch onto RequestContext at that point? Or the
>> other way around? Or… ?
>
> No, it's a social thing. I didn't want dependencies between
> oslo.messaging and oslo.log, but the API of the context needs to support
> use cases in both places.
>
> Your case might be different, in that we might need to actually have
> oslo.context depend on oslo.db in order to call some setup code. We'll
> have to think about whether that makes sense and what other dependencies
> it might introduce between the existing users of oslo.context.
hey Doug -
for the moment, I have oslo_db.sqlalchemy.enginefacade applying its descriptors at import time onto oslo_context:
https://review.openstack.org/#/c/138215/30/oslo_db/sqlalchemy/enginefacade.py
https://review.openstack.org/gitweb?p=openstack/oslo.db.git;a=blob;f=oslo_db/sqlalchemy/enginefacade.py;h=3f76678a6c9788f62288c8fa5ef520db8dff2c0a;hb=bc33d20dc6db2f8e5f8cb02b4eb5f97d24dafb7a#l692
https://review.openstack.org/gitweb?p=openstack/oslo.db.git;a=blob;f=oslo_db/sqlalchemy/enginefacade.py;h=3f76678a6c9788f62288c8fa5ef520db8dff2c0a;hb=bc33d20dc6db2f8e5f8cb02b4eb5f97d24dafb7a#l498
>
> Doug
>
>> I’m almost joyful that this is here. Assuming we can get everyone to
>> use it, should be straightforward for that right?
>>
>>
>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
More information about the OpenStack-dev
mailing list