updated wlan tests to be mdr based nodes with emane services
This commit is contained in:
parent
d51e80fac8
commit
fe08481763
3 changed files with 20 additions and 16 deletions
|
@ -12,6 +12,8 @@ from core.netns import nodes
|
||||||
from core.services import quagga
|
from core.services import quagga
|
||||||
from core.services import utility
|
from core.services import utility
|
||||||
|
|
||||||
|
EMANE_SERVICES = "zebra|OSPFv3MDR|IPForward"
|
||||||
|
|
||||||
|
|
||||||
class Core(object):
|
class Core(object):
|
||||||
def __init__(self, session, ip_prefix):
|
def __init__(self, session, ip_prefix):
|
||||||
|
@ -127,6 +129,7 @@ def session():
|
||||||
|
|
||||||
# create and return session
|
# create and return session
|
||||||
session_fixture = Session(1, persistent=True)
|
session_fixture = Session(1, persistent=True)
|
||||||
|
session_fixture.master = True
|
||||||
assert os.path.exists(session_fixture.session_dir)
|
assert os.path.exists(session_fixture.session_dir)
|
||||||
yield session_fixture
|
yield session_fixture
|
||||||
|
|
||||||
|
@ -151,7 +154,7 @@ def session_emane():
|
||||||
utility.load_services()
|
utility.load_services()
|
||||||
|
|
||||||
# set location
|
# set location
|
||||||
session_fixture.master = True
|
# session_fixture.master = True
|
||||||
session_fixture.location.setrefgeo(47.57917, -122.13232, 2.00000)
|
session_fixture.location.setrefgeo(47.57917, -122.13232, 2.00000)
|
||||||
session_fixture.location.refscale = 150.0
|
session_fixture.location.refscale = 150.0
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,14 @@ Unit tests for testing with a CORE switch.
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from conftest import EMANE_SERVICES
|
||||||
from core.mobility import BasicRangeModel
|
from core.mobility import BasicRangeModel
|
||||||
from core.netns import nodes
|
from core.netns import nodes
|
||||||
from core.phys.pnodes import PhysicalNode
|
from core.phys.pnodes import PhysicalNode
|
||||||
|
|
||||||
|
|
||||||
class TestCore:
|
class TestCore:
|
||||||
def test_physical(self, core):
|
def skip_test_physical(self, core):
|
||||||
"""
|
"""
|
||||||
Test physical node network.
|
Test physical node network.
|
||||||
|
|
||||||
|
@ -138,8 +139,8 @@ class TestCore:
|
||||||
wlan_node.setmodel(BasicRangeModel, values)
|
wlan_node.setmodel(BasicRangeModel, values)
|
||||||
|
|
||||||
# create nodes
|
# create nodes
|
||||||
core.create_node("n1")
|
core.create_node("n1", services=EMANE_SERVICES, model="mdr")
|
||||||
core.create_node("n2")
|
core.create_node("n2", services=EMANE_SERVICES, model="mdr")
|
||||||
|
|
||||||
# add interfaces
|
# add interfaces
|
||||||
interface_one = core.add_interface(wlan_node, "n1")
|
interface_one = core.add_interface(wlan_node, "n1")
|
||||||
|
@ -175,8 +176,8 @@ class TestCore:
|
||||||
wlan_node.setmodel(BasicRangeModel, values)
|
wlan_node.setmodel(BasicRangeModel, values)
|
||||||
|
|
||||||
# create nodes
|
# create nodes
|
||||||
core.create_node("n1")
|
core.create_node("n1", services=EMANE_SERVICES, model="mdr")
|
||||||
core.create_node("n2")
|
core.create_node("n2", services=EMANE_SERVICES, model="mdr")
|
||||||
|
|
||||||
# add interfaces
|
# add interfaces
|
||||||
interface_one = core.add_interface(wlan_node, "n1")
|
interface_one = core.add_interface(wlan_node, "n1")
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
"""
|
"""
|
||||||
Unit tests for testing with a CORE switch.
|
Unit tests for testing with a CORE switch.
|
||||||
"""
|
"""
|
||||||
|
from conftest import EMANE_SERVICES
|
||||||
|
|
||||||
from core.data import ConfigData
|
from core.data import ConfigData
|
||||||
from core.emane.bypass import EmaneBypassModel
|
from core.emane.bypass import EmaneBypassModel
|
||||||
from core.emane.commeffect import EmaneCommEffectModel
|
from core.emane.commeffect import EmaneCommEffectModel
|
||||||
|
@ -8,8 +10,6 @@ from core.emane.ieee80211abg import EmaneIeee80211abgModel
|
||||||
from core.emane.nodes import EmaneNode
|
from core.emane.nodes import EmaneNode
|
||||||
from core.emane.rfpipe import EmaneRfPipeModel
|
from core.emane.rfpipe import EmaneRfPipeModel
|
||||||
|
|
||||||
_EMANE_SERVICES = "zebra|OSPFv3MDR|IPForward"
|
|
||||||
|
|
||||||
|
|
||||||
class TestGui:
|
class TestGui:
|
||||||
def test_80211(self, core_emane):
|
def test_80211(self, core_emane):
|
||||||
|
@ -27,8 +27,8 @@ class TestGui:
|
||||||
core_emane.set_emane_model(emane_node, EmaneIeee80211abgModel)
|
core_emane.set_emane_model(emane_node, EmaneIeee80211abgModel)
|
||||||
|
|
||||||
# create nodes
|
# create nodes
|
||||||
core_emane.create_node("n1", objid=1, position=(150, 150), services=_EMANE_SERVICES, model="mdr")
|
core_emane.create_node("n1", objid=1, position=(150, 150), services=EMANE_SERVICES, model="mdr")
|
||||||
core_emane.create_node("n2", objid=2, position=(300, 150), services=_EMANE_SERVICES, model="mdr")
|
core_emane.create_node("n2", objid=2, position=(300, 150), services=EMANE_SERVICES, model="mdr")
|
||||||
|
|
||||||
# add interfaces to nodes
|
# add interfaces to nodes
|
||||||
core_emane.add_interface(emane_node, "n1")
|
core_emane.add_interface(emane_node, "n1")
|
||||||
|
@ -59,8 +59,8 @@ class TestGui:
|
||||||
core_emane.set_emane_model(emane_node, EmaneRfPipeModel)
|
core_emane.set_emane_model(emane_node, EmaneRfPipeModel)
|
||||||
|
|
||||||
# create nodes
|
# create nodes
|
||||||
core_emane.create_node("n1", objid=1, position=(150, 150), services=_EMANE_SERVICES, model="mdr")
|
core_emane.create_node("n1", objid=1, position=(150, 150), services=EMANE_SERVICES, model="mdr")
|
||||||
core_emane.create_node("n2", objid=2, position=(300, 150), services=_EMANE_SERVICES, model="mdr")
|
core_emane.create_node("n2", objid=2, position=(300, 150), services=EMANE_SERVICES, model="mdr")
|
||||||
|
|
||||||
# add interfaces to nodes
|
# add interfaces to nodes
|
||||||
core_emane.add_interface(emane_node, "n1")
|
core_emane.add_interface(emane_node, "n1")
|
||||||
|
@ -101,8 +101,8 @@ class TestGui:
|
||||||
EmaneCommEffectModel.configure_emane(core_emane.session, config_data)
|
EmaneCommEffectModel.configure_emane(core_emane.session, config_data)
|
||||||
|
|
||||||
# create nodes
|
# create nodes
|
||||||
core_emane.create_node("n1", objid=1, position=(150, 150), services=_EMANE_SERVICES, model="mdr")
|
core_emane.create_node("n1", objid=1, position=(150, 150), services=EMANE_SERVICES, model="mdr")
|
||||||
core_emane.create_node("n2", objid=2, position=(300, 150), services=_EMANE_SERVICES, model="mdr")
|
core_emane.create_node("n2", objid=2, position=(300, 150), services=EMANE_SERVICES, model="mdr")
|
||||||
|
|
||||||
# add interfaces to nodes
|
# add interfaces to nodes
|
||||||
core_emane.add_interface(emane_node, "n1")
|
core_emane.add_interface(emane_node, "n1")
|
||||||
|
@ -133,8 +133,8 @@ class TestGui:
|
||||||
core_emane.set_emane_model(emane_node, EmaneBypassModel)
|
core_emane.set_emane_model(emane_node, EmaneBypassModel)
|
||||||
|
|
||||||
# create nodes
|
# create nodes
|
||||||
core_emane.create_node("n1", objid=1, position=(150, 150), services=_EMANE_SERVICES, model="mdr")
|
core_emane.create_node("n1", objid=1, position=(150, 150), services=EMANE_SERVICES, model="mdr")
|
||||||
core_emane.create_node("n2", objid=2, position=(300, 150), services=_EMANE_SERVICES, model="mdr")
|
core_emane.create_node("n2", objid=2, position=(300, 150), services=EMANE_SERVICES, model="mdr")
|
||||||
|
|
||||||
# add interfaces to nodes
|
# add interfaces to nodes
|
||||||
core_emane.add_interface(emane_node, "n1")
|
core_emane.add_interface(emane_node, "n1")
|
||||||
|
|
Loading…
Reference in a new issue