# HG changeset patch # User igor # Date 1190369788 -10800 # Node ID c4a092e32ee114d43fb3be0051e3011eb618b3e9 # Parent 3f704d1f0f8569a807f67188590118f1d6df6601 bridge up and down diff -r 3f704d1f0f85 -r c4a092e32ee1 xentaur.py --- a/xentaur.py Thu Sep 20 18:50:01 2007 +0300 +++ b/xentaur.py Fri Sep 21 13:16:28 2007 +0300 @@ -175,6 +175,28 @@ xentaur {start|stop|start-bridges|start-domains|stop-domains|screen|graph} """ + +#----------------------------------------------------------------------- +# BRIDGES and IFACES + +def bridge_down(bridge): + """ + Turn the bridge down + """ + run_command("sudo ip link set %s down" % bridge) + +def bridge_up(bridge): + """ + Turn the bridge up + """ + run_command("sudo ip link set %s up" % bridge) + +def show_bridge(bridge): + """ + Show the state of the bridge + """ + run_command("sudo ip link show %s" % bridge) + #-----------------------------------------------------------------------