interface = pif_netdev_name(pif)
log("Configuring %s (%s)" % (interface, pifrec['MAC']))
interface = pif_netdev_name(pif)
log("Configuring %s (%s)" % (interface, pifrec['MAC']))
f.write("# DO NOT EDIT: This file (%s) was autogenerated by %s\n" % \
(os.path.basename(f.path()), os.path.basename(sys.argv[0])))
f.write("# DO NOT EDIT: This file (%s) was autogenerated by %s\n" % \
(os.path.basename(f.path()), os.path.basename(sys.argv[0])))
# which they were attached. The first slave attached must be the last detached since
# the bond is using its MAC address.
try:
# which they were attached. The first slave attached must be the last detached since
# the bond is using its MAC address.
try:
for slave in attached_slaves:
pifs = [p for p in db().get_pifs_by_device(slave) if not pif_is_vlan(p)]
slave_pif = pifs[0]
for slave in attached_slaves:
pifs = [p for p in db().get_pifs_by_device(slave) if not pif_is_vlan(p)]
slave_pif = pifs[0]