initial changes to convert all commands to be string based for consistency

This commit is contained in:
Blake Harnden 2019-10-11 16:36:57 -07:00
parent 69772f993c
commit 02ef91242e
21 changed files with 145 additions and 256 deletions

View file

@ -27,7 +27,7 @@ _DIR = os.path.dirname(os.path.abspath(__file__))
def ping(from_node, to_node, ip_prefixes, count=3):
address = ip_prefixes.ip4_address(to_node)
try:
from_node.node_net_cmd(["ping", "-c", str(count), address])
from_node.node_net_cmd("ping -c %s %s" % (count, address))
status = 0
except CoreCommandError as e:
status = e.returncode

View file

@ -20,7 +20,7 @@ _WIRED = [NodeTypes.PEER_TO_PEER, NodeTypes.HUB, NodeTypes.SWITCH]
def ping(from_node, to_node, ip_prefixes):
address = ip_prefixes.ip4_address(to_node)
try:
from_node.node_net_cmd(["ping", "-c", "3", address])
from_node.node_net_cmd("ping -c 3 %s" % address)
status = 0
except CoreCommandError as e:
status = e.returncode

View file

@ -30,7 +30,7 @@ class TestNodes:
assert os.path.exists(node.nodedir)
assert node.alive()
assert node.up
assert node.node_net_cmd(["ip", "addr", "show", "lo"])
assert node.node_net_cmd("ip address show lo")
def test_node_update(self, session):
# given
@ -67,4 +67,4 @@ class TestNodes:
# then
assert node
assert node.up
assert utils.check_cmd(["brctl", "show", node.brname])
assert utils.check_cmd("brctl show %s" % node.brname)