Re: [ovs-dev] [PATCH 1/1] xenserver: Reduce number of xapi DB calls in plugin

2011-12-06 Thread Ben Pfaff
Thanks a lot for verifying that. I pushed this change to master, branch-1.3, branch-1.4. (It's not strictly a bugfix so I wouldn't ordinarily backport it, but based on the fact that you guys sent it I think it must be important to you.) Thanks, Ben. On Tue, Dec 06, 2011 at 09:36:29AM +, Ro

Re: [ovs-dev] [PATCH 1/1] xenserver: Reduce number of xapi DB calls in plugin

2011-12-06 Thread Rob Hoes
Hi Ben, The get_all_records_where functions are indeed not very well documented, probably because the way to use them is a little awkward. I think we should at some point introduce new APIs to selectively query the database and discourage the use of get_all (because it does not scale). Currentl

Re: [ovs-dev] [PATCH 1/1] xenserver: Reduce number of xapi DB calls in plugin

2011-12-05 Thread Ben Pfaff
On Mon, Dec 05, 2011 at 02:43:12PM +, Dominic Curran wrote: > @@ -100,10 +99,9 @@ def update(session, args): > host_mgmt_device = None > pool_mgmt_macs = {} > if new_controller: > -for n in session.xenapi.PIF.get_all(): > -rec = session.xenapi.PIF.get_record(n