#
def pif_rename_physical_devices(pif):
+ if pif_is_tunnel(pif):
+ return
if pif_is_vlan(pif):
pif = pif_get_vlan_slave(pif)
pifrec = db().get_pif_record(pif)
ipdev = pif_ipdev_name(pif)
- dp = DatapathFactory(pif)
+ dp = DatapathFactory()(pif)
log("action_up: %s" % ipdev)
def action_down(pif):
ipdev = pif_ipdev_name(pif)
- dp = DatapathFactory(pif)
+ dp = DatapathFactory()(pif)
log("action_down: %s" % ipdev)
dp.bring_down()
+def action_rewrite():
+ DatapathFactory().rewrite()
+
# This is useful for reconfiguring the mgmt interface after having lost connectivity to the pool master
def action_force_rewrite(bridge, config):
def getUUID():
f.write('\t\t<VLAN_slave_of/>\n')
f.write('\t\t<VLAN_master_of>OpaqueRef:NULL</VLAN_master_of>\n')
f.write('\t\t<VLAN>-1</VLAN>\n')
+ f.write('\t\t<tunnel_access_PIF_of/>\n')
+ f.write('\t\t<tunnel_transport_PIF_of/>\n')
f.write('\t\t<device>%s</device>\n' % interface)
f.write('\t\t<MAC>%s</MAC>\n' % mac)
f.write('\t\t<other_config/>\n')
pif = db().get_pif_by_uuid(pif_uuid)
if action == "rewrite":
- pass
+ action_rewrite()
else:
if not pif:
raise Usage("No PIF given")