Re: [openstack-dev] [tricircle] DAL implementation

2015-07-31 Thread joehuang
: [openstack-dev] [tricircle] DAL implementation Hi Joe, I think one independent job is finished in one session. The job is responsible to start a session, query or modify database then end the session. Like port creating job in neutron, it starts a session, queries network, adds port, allocates ip

Re: [openstack-dev] [tricircle] DAL implementation

2015-07-30 Thread Vega Cai
is empty, but how to > decide when to commit the data, end a session? > > > > Best Regards > > Chaoyi Huang ( Joe Huang ) > > > > *From:* Vega Cai [mailto:luckyveg...@gmail.com] > *Sent:* Thursday, July 30, 2015 3:03 PM > *To:* openstack-dev@lists.openstack.org

Re: [openstack-dev] [tricircle] DAL implementation

2015-07-30 Thread joehuang
Chaoyi Huang ( Joe Huang ) From: Vega Cai [mailto:luckyveg...@gmail.com] Sent: Thursday, July 30, 2015 3:03 PM To: openstack-dev@lists.openstack.org Subject: [openstack-dev] [tricircle] DAL implementation Hi folks, In my current implementation, there are a core module and a models module. Core

[openstack-dev] [tricircle] DAL implementation

2015-07-30 Thread Vega Cai
Hi folks, In my current implementation, there are a core module and a models module. Core module handles all the database stuff, start a session, issue sql operation, then end a session. Models module invokes methods in core module to access database, as showed below: model.py def get_site(site_i