import argparse
import os
import signal
-import subprocess
import sys
import time
import ovs.dirs
from ovs.db import error
from ovs.db import types
-import ovs.util
import ovs.daemon
import ovs.db.idl
root_prefix = '' # Prefix for absolute file names, for testing.
vlog = ovs.vlog.Vlog("ovs-xapi-sync")
-vsctl = "/usr/bin/ovs-vsctl"
session = None
force_run = False
return xs_vif_uuid
-def call_vsctl(args):
- cmd = [vsctl, "--timeout=30", "-vANY:console:off"] + args
- exitcode = subprocess.call(cmd)
- if exitcode != 0:
- vlog.warn("Couldn't call ovs-vsctl")
-
-
def set_or_delete(d, key, value):
if value is None:
if key in d:
# New bridge.
update_fail_mode(row)
update_in_band_mgmt(row)
- if new_xnu != old_xnu:
- # New bridge or bridge's xs-network-uuids has changed.
- update_bridge_id(row)
+
+ update_bridge_id(row)
new_bridges[row.name] = new_xnu
bridges = new_bridges