From: Ian Campbell Date: Wed, 9 Sep 2009 17:09:02 +0000 (+0100) Subject: Only write Network.PIF elements for this host to dbcache. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5de7052b9b5fe58628057984ddc99e9cf8a66596;p=openvswitch Only write Network.PIF elements for this host to dbcache. --- diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure index fdb91abe..e77e85b1 100755 --- a/xenserver/opt_xensource_libexec_interface-reconfigure +++ b/xenserver/opt_xensource_libexec_interface-reconfigure @@ -456,7 +456,11 @@ class DatabaseCache(object): rec = session.xenapi.network.get_record(n) self.__networks[n] = {} for f in NETWORK_ATTRS: - self.__networks[n][f] = rec[f] + if f == "PIFs": + # drop PIFs on other hosts + self.__networks[n][f] = [p for p in rec[f] if self.__pif_on_host(p)] + else: + self.__networks[n][f] = rec[f] self.__networks[n]['other_config'] = {} for f in NETWORK_OTHERCONFIG_ATTRS: if not rec['other_config'].has_key(f): continue