added future library to support python2/3, updated xrange calls to leverage builtins range

This commit is contained in:
bharnden 2019-05-05 16:19:12 -07:00
parent e79fd6c7ce
commit e58cbe9421
15 changed files with 50 additions and 36 deletions

View file

@ -4,6 +4,8 @@
# n nodes are connected to a virtual wlan; run test for testsec
# and repeat for minnodes <= n <= maxnodes with a step size of
# nodestep
from builtins import range
from core import load_logging_config
from core.emulator.emudata import IpPrefixes
from core.emulator.enumerations import NodeTypes, EventTypes
@ -26,7 +28,7 @@ def example(nodes):
switch = session.add_node(_type=NodeTypes.SWITCH)
# create nodes
for _ in xrange(nodes):
for _ in range(nodes):
node = session.add_node()
interface = prefixes.create_interface(node)
session.add_link(node.id, switch.id, interface_one=interface)