Extend test with switch icmp6 test

This commit is contained in:
Nico Schottelius 2019-03-20 00:02:52 +01:00
parent 5781d26541
commit 0fe1adda11
1 changed files with 12 additions and 2 deletions

View File

@ -16,6 +16,15 @@ class TestStuff(object):
def __init__(self):
pass
def test_icmp6_switch(self):
host = "h1"
dst_ipv6 = ipaddress.ip_address("2001:db8::42")
log.info("Trying to reach {} from {}".format(dst_ipv6, host))
cmd = "mx h1 ping6 -c1 {}".format(dst_ipv6)
return cmd
def test_v6_static_mapping(self):
host = "h1"
nat64_prefix = ipaddress.ip_network("64:ff9b::/96")
@ -25,7 +34,8 @@ class TestStuff(object):
log.info("Trying to reach {} ({}) from {}".format(dst_ipv4, translated_ipv4, host))
cmd = "mx h1 ping6 -c1 {}".format(translated_ipv4).split(" ")
subprocess.call(cmd)
return cmd
def commandline(self):
parser = argparse.ArgumentParser(description='controller++')
@ -50,7 +60,7 @@ class TestStuff(object):
log.setLevel(logging.WARNING)
f = getattr(self, "test_{}".format(self.args.method))
f()
subprocess.call(f())
if __name__ == "__main__":
import sys