+ valid_bridges.append(bridge_name)
+
+ # now, delete the bridges that we don't want
+ bridges = ovs_listbridge()
+ for bridge_name in bridges:
+ if not bridge_name.startswith("br-slice-"):
+ # ignore ones we didn't create
+ continue
+
+ if bridge_name in valid_bridges:
+ # ignore ones we want to keep
+ continue
+
+ logger.log("privatebridge: deleting unused bridge %s" % bridge_name)
+
+ ovs_delbridge(bridge_name)
+