Commit 8de4982b authored by Martín Ferrari's avatar Martín Ferrari

show process piping

parent 14dd7ce4
...@@ -35,28 +35,12 @@ if1a.add_v4_address(address = '10.0.0.2', prefix_len = 24) ...@@ -35,28 +35,12 @@ if1a.add_v4_address(address = '10.0.0.2', prefix_len = 24)
if1b.add_v4_address(address = '10.0.1.1', prefix_len = 24) if1b.add_v4_address(address = '10.0.1.1', prefix_len = 24)
if2.add_v4_address(address = '10.0.1.2', prefix_len = 24) if2.add_v4_address(address = '10.0.1.2', prefix_len = 24)
# RFC-4193 Unique local addresses.
# Pre-generated random block: fde2:4a1d:8870::/48
if0.add_v6_address(address = 'fde2:4a1d:8870:0::1',
prefix_len = 32)
if1a.add_v6_address(address = 'fde2:4a1d:8870:0::2',
prefix_len = 32)
if1b.add_v6_address(address = 'fde2:4a1d:8870:1::1',
prefix_len = 32)
if2.add_v6_address(address = 'fde2:4a1d:8870:1::2',
prefix_len = 32)
# Configure routing # Configure routing
node0.add_route(prefix = '10.0.1.0', prefix_len = 24, node0.add_route(prefix = '10.0.1.0', prefix_len = 24,
nexthop = '10.0.0.2') nexthop = '10.0.0.2')
node2.add_route(prefix = '10.0.0.0', prefix_len = 24, node2.add_route(prefix = '10.0.0.0', prefix_len = 24,
nexthop = '10.0.1.1') nexthop = '10.0.1.1')
node0.add_route(prefix = 'fde2:4a1d:8870:1::', prefix_len = 32,
nexthop = 'fde2:4a1d:8870:0::1')
node2.add_route(prefix = 'fde2:4a1d:8870:0::', prefix_len = 32,
nexthop = 'fde2:4a1d:8870:1::0')
# Test connectivity first. Run process, hide output and check # Test connectivity first. Run process, hide output and check
# return code # return code
null = file("/dev/null", "w") null = file("/dev/null", "w")
...@@ -71,12 +55,12 @@ ret = app1.wait() ...@@ -71,12 +55,12 @@ ret = app1.wait()
assert ret == 0 assert ret == 0
print "Connectivity IPv4 OK!" print "Connectivity IPv4 OK!"
# if arguments speficied as array, no need to invoke the shell # Now test the network conditions
app2 = node0.Popen(["ping6", "-c1", "fde2:4a1d:8870:1::2"])#, stdout = null) # When using a args list, the shell is not needed
ret = app2.wait() app2 = node2.Popen(["ping", "-c1000000", "-f", "10.0.1.2"],
#assert ret == 0 stdout = subprocess.PIPE)
out, err = appt2.communicate()
app3 = node0.Popen(["ping6", "-c1", "fde2:4a1d:8870:0::1"], stdout = null) print "Ping outout:"
ret = app3.wait() print out
#assert ret == 0
print "Connectivity IPv6 OK!"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment