<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Soren:</div></div></span></span>
</div>
<br><div><div>On Nov 29, 2011, at 10:20 AM, Soren Hansen wrote:</div><div>[snip]</div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font>Or should we do away with this stuff altogether? I.e. no more looking up<br>related objects by way of __getitem__ lookups, and instead only allow<br>lookups through db methods. So, instead of<br>network['virtual_interfaces'], you'd always do<br>db.virtual_interfaces_get_by_network(ctxt, network['id']).  Let's call<br>this option e).</div></blockquote><div><br></div></div><div><br></div><div>The top-level docstring in nova/db/api.py says:</div><div><br></div><div><div>All functions in this module return objects that implement a dictionary-like</div><div>interface. Currently, many of these objects are sqlalchemy objects that</div><div>implement a dictionary interface. However, a future goal is to have all of</div><div>these objects be simple dictionaries.</div></div><div><br></div><div>(I wrote this particular docstring but was just capturing somebody else's email or bugfix message or some such thing).</div><div><br></div><div>If I understand your post correctly, doesn't this imply option (e)? </div><br><div><br></div><div>Lorin</div><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Lorin Hochstein, Computer Scientist</div><div>USC Information Sciences Institute</div><div>703.812.3710</div><div><a href="http://www.east.isi.edu/~lorin">http://www.east.isi.edu/~lorin</a></div><div><br></div></div></div></body></html>