changed net_cmd to host_cmd and node_net_cmd to cmd, for simpler more logical naming

This commit is contained in:
bharnden 2019-10-18 23:28:09 -07:00
parent d4af459653
commit 6006710c32
16 changed files with 74 additions and 76 deletions

View file

@ -42,12 +42,12 @@ def example(options):
last_node = session.get_node(options.nodes + 1)
logging.info("starting iperf server on node: %s", first_node.name)
first_node.node_net_cmd("iperf -s -D")
first_node.cmd("iperf -s -D")
first_node_address = prefixes.ip4_address(first_node)
logging.info("node %s connecting to %s", last_node.name, first_node_address)
output = last_node.node_net_cmd(f"iperf -t {options.time} -c {first_node_address}")
output = last_node.cmd(f"iperf -t {options.time} -c {first_node_address}")
logging.info(output)
first_node.node_net_cmd("killall -9 iperf")
first_node.cmd("killall -9 iperf")
# shutdown session
coreemu.shutdown()

View file

@ -46,11 +46,11 @@ def example(options):
last_node = session.get_node(options.nodes + 1)
logging.info("starting iperf server on node: %s", first_node.name)
first_node.node_net_cmd("iperf -s -D")
first_node.cmd("iperf -s -D")
address = prefixes.ip4_address(first_node)
logging.info("node %s connecting to %s", last_node.name, address)
last_node.node_net_cmd(f"iperf -t {options.time} -c {address}")
first_node.node_net_cmd("killall -9 iperf")
last_node.cmd(f"iperf -t {options.time} -c {address}")
first_node.cmd("killall -9 iperf")
# shutdown session
coreemu.shutdown()