daemon: adjustments to revamp how core nodes are created in session.add_node, nodes now provide a create_options function for node specific options that are type hinted
This commit is contained in:
parent
03e646031c
commit
2e3e085522
35 changed files with 646 additions and 478 deletions
|
@ -8,7 +8,7 @@ from typing import List, Type
|
|||
|
||||
import pytest
|
||||
|
||||
from core.emulator.data import IpPrefixes, NodeOptions
|
||||
from core.emulator.data import IpPrefixes
|
||||
from core.emulator.session import Session
|
||||
from core.errors import CoreCommandError
|
||||
from core.location.mobility import BasicRangeModel, Ns2ScriptedMobility
|
||||
|
@ -75,8 +75,8 @@ class TestCore:
|
|||
session.mobility.set_model(wlan_node, BasicRangeModel)
|
||||
|
||||
# create nodes
|
||||
options = NodeOptions(model="mdr")
|
||||
options.set_position(0, 0)
|
||||
options = CoreNode.create_options()
|
||||
options.model = "mdr"
|
||||
node1 = session.add_node(CoreNode, options=options)
|
||||
node2 = session.add_node(CoreNode, options=options)
|
||||
|
||||
|
@ -105,8 +105,8 @@ class TestCore:
|
|||
session.mobility.set_model(wlan_node, BasicRangeModel)
|
||||
|
||||
# create nodes
|
||||
options = NodeOptions(model="mdr")
|
||||
options.set_position(0, 0)
|
||||
options = CoreNode.create_options()
|
||||
options.model = "mdr"
|
||||
node1 = session.add_node(CoreNode, options=options)
|
||||
node2 = session.add_node(CoreNode, options=options)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue