Add ability to specify controllers on command line
Change-Id: Ic88189dbf33d834a79597f108dd283ab478c9923
diff --git a/trellis/trellis_dualhome.py b/trellis/trellis_dualhome.py
index 4d2b744..56c4599 100755
--- a/trellis/trellis_dualhome.py
+++ b/trellis/trellis_dualhome.py
@@ -14,6 +14,7 @@
from routinglib import RoutedHost, RoutedHost6
from trellislib import DhcpClient, Dhcp6Client, DhcpRelay, DhcpServer, Dhcp6Server
from trellislib import DualHomedDhcpClient
+from trellislib import get_mininet, parse_trellis_args, set_up_zebra_config
from functools import partial
class Trellis( Topo ):
@@ -177,12 +178,10 @@
if __name__ == "__main__":
setLogLevel('debug')
topo = Trellis()
-
switch = partial(OVSSwitch, protocols='OpenFlow13')
- net = Mininet(topo=topo, controller=None, switch=switch)
- #net.addController(RemoteController('c0', ip='192.168.56.11'))
- #net.addController(RemoteController('c1', ip='192.168.56.12'))
- #net.addController(RemoteController('c2', ip='192.168.56.13'))
+ arguments = parse_trellis_args()
+ set_up_zebra_config(arguments.controllers)
+ net = get_mininet(arguments, topo, switch)
net.start()
CLI(net)