Separate double tagged test case from basic Trellis topology
Also add a cleanup script to reset the system
Change-Id: I0a0d70ab412326fad77cb7bb11a6053f64181394
diff --git a/trellis/trellis.py b/trellis/trellis.py
index 29ce684..7208aa4 100755
--- a/trellis/trellis.py
+++ b/trellis/trellis.py
@@ -1,8 +1,6 @@
#!/usr/bin/python
import sys
-from time import sleep
-
sys.path.append('..')
from mininet.topo import Topo
from mininet.net import Mininet
@@ -13,7 +11,7 @@
from ipaddress import ip_network
from routinglib import BgpRouter
from routinglib import RoutedHost, RoutedHost6
-from trellislib import DhcpClient, Dhcp6Client, DhcpRelay, DhcpServer, Dhcp6Server, DoubleTaggedRoutedHost
+from trellislib import DhcpClient, Dhcp6Client, DhcpRelay, DhcpServer, Dhcp6Server
from trellislib import get_mininet, parse_trellis_args, set_up_zebra_config
from functools import partial
@@ -44,12 +42,10 @@
h2 = self.addHost('h2', cls=DhcpClient, mac='00:aa:00:00:00:02')
h3 = self.addHost('h3', cls=DhcpClient, mac='00:aa:00:00:00:03')
h4 = self.addHost('h4', cls=DhcpClient, mac='00:aa:00:00:00:04')
- dth5 = self.addHost('dth5', cls=DoubleTaggedRoutedHost, mac='00:aa:00:00:00:05', ips=['10.0.2.3/24'], gateway='10.0.2.254', outerVlan=100, innerVlan=200)
self.addLink(h1, s204)
self.addLink(h2, s204)
self.addLink(h3, s205)
self.addLink(h4, s205)
- self.addLink(dth5, s204)
# IPv6 Hosts
h1v6 = self.addHost('h1v6', cls=Dhcp6Client, mac='00:bb:00:00:00:01')
@@ -120,8 +116,5 @@
net = get_mininet(arguments, topo, switch)
net.start()
- sleep(3)
- print 'ping %s' % net.get('h1').IP()
- net.get('dth5').cmd('ping -c 1 %s'% net.get('h1').IP())
CLI(net)
net.stop()