<div dir="ltr">Hi Steven, <div><br></div><div>Good catch, agree with Roman, we should move model_query() to olso.db </div><div><br></div><div><br></div><div>Best regards,</div><div>Boris Pavlovic </div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Nov 12, 2013 at 2:07 PM, Roman Podoliaka <span dir="ltr"><<a href="mailto:rpodolyaka@mirantis.com" target="_blank">rpodolyaka@mirantis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Steven,<br>
<br>
Thanks for pointing this out!<br>
<br>
Yep, those docs must be a hangover from moving this code from Nova.<br>
I'm really surprised, that we don't have model_query() in Oslo DB<br>
code. I think, we should provide a reference implementation of this<br>
function, which will be very similar to the one, which is currently<br>
used in Nova (though, we must remove any dependencies on Nova specific<br>
things, of course).<br>
<span class="HOEnZb"><font color="#888888"><br>
Roman<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mon, Nov 11, 2013 at 6:35 PM, Steven Hardy <<a href="mailto:shardy@redhat.com">shardy@redhat.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I've been digging into our DB API code, aiming to align it more closely<br>
> with the recommendations in the oslo.db docs.<br>
><br>
> <a href="https://github.com/openstack/oslo-incubator/blob/master/openstack/common/db/sqlalchemy/session.py#L35" target="_blank">https://github.com/openstack/oslo-incubator/blob/master/openstack/common/db/sqlalchemy/session.py#L35</a><br>

><br>
> However, I'm confused by the references to model_query in the docs, which<br>
> seem to imply there is a reference model_query which will do certain things<br>
> (e.g implicitly use a session when called without one)<br>
><br>
> Is this just a hangover from moving from another project (nova?), i.e<br>
> should we be aligning with a model_query implementation similar to that in<br>
> nova, or should oslo.db have a base implementation which can be reused?<br>
><br>
> Clarification or pointers to further docs would be much appreciated! :)<br>
><br>
> Steve<br>
><br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div>