- if len(physical_devices) > 1:
- vsctl_argv += ['# deconfigure bond %s' % pif_netdev_name(pif)]
- vsctl_argv += datapath_deconfigure_bond(pif_netdev_name(pif))
+def set_br_external_ids(pif):
+ pifrec = db().get_pif_record(pif)
+ dp = pif_datapath(pif)
+ dprec = db().get_pif_record(dp)
+
+ xs_network_uuids = []
+ for nwpif in db().get_pifs_by_device(pifrec['device']):
+ rec = db().get_pif_record(nwpif)
+
+ # When state is read from dbcache PIF.currently_attached
+ # is always assumed to be false... Err on the side of
+ # listing even detached networks for the time being.
+ #if nwpif != pif and not rec['currently_attached']:
+ # log("Network PIF %s not currently attached (%s)" % (rec['uuid'],pifrec['uuid']))
+ # continue
+ nwrec = db().get_network_record(rec['network'])
+ xs_network_uuids += [nwrec['uuid']]