[openstack-dev] [oslo][heat] oslo.db session and model_query()

Roman Podoliaka rpodolyaka at mirantis.com
Tue Nov 12 10:07:18 UTC 2013

Hi Steven,

Thanks for pointing this out!

Yep, those docs must be a hangover from moving this code from Nova.
I'm really surprised, that we don't have model_query() in Oslo DB
code. I think, we should provide a reference implementation of this
function, which will be very similar to the one, which is currently
used in Nova (though, we must remove any dependencies on Nova specific
things, of course).


On Mon, Nov 11, 2013 at 6:35 PM, Steven Hardy <shardy at redhat.com> wrote:
> Hi all,
> I've been digging into our DB API code, aiming to align it more closely
> with the recommendations in the oslo.db docs.
> https://github.com/openstack/oslo-incubator/blob/master/openstack/common/db/sqlalchemy/session.py#L35
> However, I'm confused by the references to model_query in the docs, which
> seem to imply there is a reference model_query which will do certain things
> (e.g implicitly use a session when called without one)
> Is this just a hangover from moving from another project (nova?), i.e
> should we be aligning with a model_query implementation similar to that in
> nova, or should oslo.db have a base implementation which can be reused?
> Clarification or pointers to further docs would be much appreciated! :)
> Steve
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

More information about the OpenStack-dev mailing list