diff --git a/p4app/controller.py b/p4app/controller.py index f54e396..9f871b3 100644 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -20,9 +20,7 @@ log = logging.getLogger("main") class L2Controller(object): def __init__(self, sw_name): - self.init_boilerplate(sw_name) - self.init() - + # Command line mapping self.modes = ['base'] # Network / egress @@ -30,11 +28,15 @@ class L2Controller(object): self.v6_routes['base'] = [] self.v6_routes['base'].append({ "net": "2001:db8:61::/64", "port": "1"}) self.v6_routes['base'].append({ "net": "2001:db8:62::/64", "port": "2"}) + self.v4_routes = {} self.v4_routes['base'] = [] self.v4_routes['base'].append({ "net": "10.0.41.0/24", "port": "3"}) self.v4_routes['base'].append({ "net": "10.0.42.0/24", "port": "4"}) + self.init_boilerplate(sw_name) + self.init() + def init_boilerplate(self, sw_name): self.topo = Topology(db="topology.db") self.sw_name = sw_name