def start_test_screens(c): """Starts screens for react, mgen, and tshark on all nodes""" global HOSTS group = ThreadingGroup(*HOSTS) group.run('screen -S mgen', pty=False) group.run('screen -S react', pty=False) group.run('screen -S tshark', pty=False)
def set_tx_power(c, interface = 'wls33', tx_power = 1): """Sets tx_power for an interface. """ global HOSTS group = ThreadingGroup(*HOSTS) group.run(f'sudo iwconfig {interface} txpower {tx_power}')
def install_python_deps(c): """Install python dependencies. """ global HOSTS group = ThreadingGroup(*HOSTS) group.run("sudo apt-get update; sudo apt-get install -y python-scapy python-netifaces python-numpy python-flask")
def all_up(c): """A way to make sure you are connected to all the nodes. """ global HOSTS group = ThreadingGroup(*HOSTS) group.run(':') group.run('echo UP')