xentaur

changeset 22:c4a092e32ee1

bridge up and down
author igor
date Fri Sep 21 13:16:28 2007 +0300 (2007-09-21)
parents 3f704d1f0f85
children 6bb2a29e91be
files xentaur.py
line diff
     1.1 --- a/xentaur.py	Thu Sep 20 18:50:01 2007 +0300
     1.2 +++ b/xentaur.py	Fri Sep 21 13:16:28 2007 +0300
     1.3 @@ -175,6 +175,28 @@
     1.4      xentaur {start|stop|start-bridges|start-domains|stop-domains|screen|graph}
     1.5  """
     1.6  
     1.7 +
     1.8 +#-----------------------------------------------------------------------
     1.9 +# BRIDGES and IFACES
    1.10 +
    1.11 +def bridge_down(bridge):
    1.12 +    """
    1.13 +    Turn the bridge <bridge> down
    1.14 +    """
    1.15 +    run_command("sudo ip link set %s down" % bridge)
    1.16 +
    1.17 +def bridge_up(bridge):
    1.18 +    """
    1.19 +    Turn the bridge <bridge> up
    1.20 +    """
    1.21 +    run_command("sudo ip link set %s up" % bridge)
    1.22 +
    1.23 +def show_bridge(bridge):
    1.24 +    """
    1.25 +    Show the state of the bridge <bridge>
    1.26 +    """
    1.27 +    run_command("sudo ip link show %s" % bridge)
    1.28 +
    1.29  #-----------------------------------------------------------------------
    1.30  
    1.31