Hm. I've just been going off of this doc string in db/api.py: "Functions in this module are imported into the nova.db namespace. Call these functions from nova.db namespace, not the nova.db.api namespace.
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 ofthese objects be simple dictionaries." I didn't put any thought into it, but I can see our own objects being better. I would just want to make sure they are easily serializable so they can be sent across AMQP. I admit that I haven't paid attention to any of the DB discussions. I guess that's why I brought up my question in the first place. ;) - Chris On Dec 15, 2011, at 10:52 AM, Aaron Lee wrote: > > On Dec 15, 2011, at 10:54 AM, Johannes Erdfelt wrote: >> >> What kinds of things? >> >> I'm just trying to better understand what is object-oriented about the >> data returned from a database? What methods would we want to use? >> >> JE > > Any direct access to the data within a record should be encapsulated within > the model object. > > For example, changing an instance's progress should be a method on Instance, > not a method buried in vmops. > > ~ Aaron > _______________________________________________ > Mailing list: https://launchpad.net/~openstack > Post to : openstack@lists.launchpad.net > Unsubscribe : https://launchpad.net/~openstack > More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp