[Openstack] Database stuff

Lorin Hochstein lorin at isi.edu
Tue Nov 29 15:38:32 UTC 2011


Soren:

On Nov 29, 2011, at 10:20 AM, Soren Hansen wrote:
[snip]
> 
> Or should we do away with this stuff altogether? I.e. no more looking up
> related objects by way of __getitem__ lookups, and instead only allow
> lookups through db methods. So, instead of
> network['virtual_interfaces'], you'd always do
> db.virtual_interfaces_get_by_network(ctxt, network['id']).  Let's call
> this option e).


The top-level docstring in nova/db/api.py says:

All functions in this module return objects that implement a dictionary-like
interface. Currently, many of these objects are sqlalchemy objects that
implement a dictionary interface. However, a future goal is to have all of
these objects be simple dictionaries.

(I wrote this particular docstring but was just capturing somebody else's email or bugfix message or some such thing).

If I understand your post correctly, doesn't this imply option (e)? 


Lorin
--
Lorin Hochstein, Computer Scientist
USC Information Sciences Institute
703.812.3710
http://www.east.isi.edu/~lorin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20111129/7377291f/attachment.html>


More information about the Openstack mailing list