From bf5becc7d52e9eaf440fafd82580bafdb87d35db Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Thu, 8 Mar 2012 13:38:46 -0800 Subject: [PATCH] Get rid of SWITCH_PORT_BASE since it's 1 for OF >= 1.0. --- mininet/topo.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mininet/topo.py b/mininet/topo.py index 55eab60..2cbfe7d 100644 --- a/mininet/topo.py +++ b/mininet/topo.py @@ -16,8 +16,6 @@ setup for testing, and can even be emulated with the Mininet package. # from networkx.classes.graph import Graph from networkx import Graph -from mininet.node import SWITCH_PORT_BASE - class NodeID(object): '''Topo node identifier.''' @@ -156,8 +154,8 @@ class Topo(object): @param src source switch DPID @param dst destination switch DPID ''' - src_base = SWITCH_PORT_BASE if self.is_switch(src) else 0 - dst_base = SWITCH_PORT_BASE if self.is_switch(dst) else 0 + src_base = 1 if self.is_switch(src) else 0 + dst_base = 1 if self.is_switch(dst) else 0 if src not in self.ports: self.ports[src] = {} if dst not in self.ports[src]: