--may-exist add-br xapi1
--with-iface --if-exists del-port bond0
--fake-iface add-bond xapi1 bond0 eth0 eth1
- set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:"bond-miimon"=100 other-config:"bond-use_carrier"=1 bond_mode=balance-slb bond_updelay=31000
+ set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:bond-miimon-interval=100 other-config:bond-detect-mode=carrier bond_mode=balance-slb bond_updelay=31000
set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
br-set-external-id xapi1 xs-network-uuids 45cbbb43-113d-a712-3231-c6463f253cef;99be2da4-6c33-6f8e-49ea-3bc592fe3c85
/sbin/ifup xapi1
--may-exist add-br xapi1
--with-iface --if-exists del-port bond0
--fake-iface add-bond xapi1 bond0 eth0 eth1
- set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:"bond-miimon"=100 other-config:"bond-use_carrier"=1 bond_mode=balance-slb bond_updelay=31000
+ set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:bond-miimon-interval=100 other-config:bond-detect-mode=carrier bond_mode=balance-slb bond_updelay=31000
set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
br-set-external-id xapi1 xs-network-uuids 45cbbb43-113d-a712-3231-c6463f253cef;99be2da4-6c33-6f8e-49ea-3bc592fe3c85
--if-exists del-br xapi2
argv += ['bond_%s=%d' % (name, value)]
except ValueError:
log("bridge %s has invalid %s '%s'" % (bridge, name, value))
+ elif name in ['miimon', 'use_carrier']:
+ try:
+ value = int(val)
+ if value < 0:
+ raise ValueError
+
+ if name == 'use_carrier':
+ if value:
+ value = "carrier"
+ else:
+ value = "miimon"
+ argv += ["other-config:bond-detect-mode=%s" % value]
+ else:
+ argv += ["other-config:bond-miimon-interval=%d" % value]
+ except ValueError:
+ log("bridge %s has invalid %s '%s'" % (bridge, name, value))
elif name == "mode":
if val in ['balance-slb', 'active-backup']: