Get rid of SWITCH_PORT_BASE since it's 1 for OF >= 1.0.

This commit is contained in:
Bob Lantz
2012-03-08 13:38:46 -08:00
parent 216a4b7c9d
commit bf5becc7d5
+2 -4
View File
@@ -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]: