xenserver: Reduce number of xapi DB calls in plugin
authorRob Hoes <rob.hoes@citrix.com>
Mon, 5 Dec 2011 14:43:12 +0000 (14:43 +0000)
committerBen Pfaff <blp@nicira.com>
Tue, 6 Dec 2011 17:07:45 +0000 (09:07 -0800)
commit8e5eb9fd77dab20a85d66968cebb93cd4d7dc9ab
tree81aefb0ef5e6a54b7d6508aa4e6f961c41788a01
parentfac07bb422ddb27cc46dbff9fc9011a0f3de1118
xenserver: Reduce number of xapi DB calls in plugin

When there are lots of PIFs in a XenServer/XCP pool, for example when
there are many VLANs configured on the pool, operations such as
PIF.get_all and loops over all PIFs which include database operations,
are very inefficient when executed on a pool slave, and should be
avoided as much as possible. This patch reduces the number of database
calls in the update function of the openvswitch-cfg-update xapi plugin.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Acked-by: Dominic Curran <Dominic.curran@citrix.com>
xenserver/etc_xapi.d_plugins_openvswitch-cfg-update