removed circular dependency causing issues in python2
This commit is contained in:
parent
70bb1598e1
commit
bb98a4a77f
6 changed files with 16 additions and 23 deletions
|
@ -3,6 +3,7 @@
|
|||
# Example CORE Python script that attaches N nodes to an EMANE 802.11abg network.
|
||||
|
||||
import datetime
|
||||
import logging
|
||||
import parser
|
||||
from builtins import range
|
||||
|
||||
|
@ -10,9 +11,6 @@ from core.emane.ieee80211abg import EmaneIeee80211abgModel
|
|||
from core.emulator.coreemu import CoreEmu
|
||||
from core.emulator.emudata import IpPrefixes
|
||||
from core.emulator.enumerations import EventTypes
|
||||
from core.utils import load_logging_config
|
||||
|
||||
load_logging_config()
|
||||
|
||||
|
||||
def example(options):
|
||||
|
@ -52,6 +50,7 @@ def example(options):
|
|||
|
||||
|
||||
def main():
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
options = parser.parse_options("emane80211")
|
||||
start = datetime.datetime.now()
|
||||
print(
|
||||
|
|
|
@ -6,15 +6,13 @@
|
|||
# nodestep
|
||||
|
||||
import datetime
|
||||
import logging
|
||||
import parser
|
||||
from builtins import range
|
||||
|
||||
from core.emulator.coreemu import CoreEmu
|
||||
from core.emulator.emudata import IpPrefixes
|
||||
from core.emulator.enumerations import EventTypes, NodeTypes
|
||||
from core.utils import load_logging_config
|
||||
|
||||
load_logging_config()
|
||||
|
||||
|
||||
def example(options):
|
||||
|
@ -56,8 +54,8 @@ def example(options):
|
|||
|
||||
|
||||
def main():
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
options = parser.parse_options("switch")
|
||||
|
||||
start = datetime.datetime.now()
|
||||
print("running switch example: nodes(%s) time(%s)" % (options.nodes, options.time))
|
||||
example(options)
|
||||
|
|
|
@ -4,13 +4,11 @@
|
|||
# n nodes are connected to a virtual wlan; run test for testsec
|
||||
# and repeat for minnodes <= n <= maxnodes with a step size of
|
||||
# nodestep
|
||||
import logging
|
||||
from builtins import range
|
||||
|
||||
from core.emulator.emudata import IpPrefixes
|
||||
from core.emulator.enumerations import EventTypes, NodeTypes
|
||||
from core.utils import load_logging_config
|
||||
|
||||
load_logging_config()
|
||||
|
||||
|
||||
def example(nodes):
|
||||
|
@ -38,4 +36,5 @@ def example(nodes):
|
|||
|
||||
|
||||
if __name__ in {"__main__", "__builtin__"}:
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
example(2)
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
# nodestep
|
||||
|
||||
import datetime
|
||||
import logging
|
||||
import parser
|
||||
from builtins import range
|
||||
|
||||
|
@ -13,9 +14,6 @@ from core.emulator.coreemu import CoreEmu
|
|||
from core.emulator.emudata import IpPrefixes, NodeOptions
|
||||
from core.emulator.enumerations import EventTypes, NodeTypes
|
||||
from core.location.mobility import BasicRangeModel
|
||||
from core.utils import load_logging_config
|
||||
|
||||
load_logging_config()
|
||||
|
||||
|
||||
def example(options):
|
||||
|
@ -60,6 +58,7 @@ def example(options):
|
|||
|
||||
|
||||
def main():
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
options = parser.parse_options("wlan")
|
||||
|
||||
start = datetime.datetime.now()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue