changes to fix session adding default emane configuration
This commit is contained in:
parent
9445b63bd2
commit
059b0cc316
2 changed files with 12 additions and 6 deletions
|
@ -704,10 +704,10 @@ class Session:
|
|||
self.services.add_services(node, node.type, options.services)
|
||||
|
||||
# ensure default emane configuration
|
||||
if _type == NodeTypes.EMANE:
|
||||
self.emane.set_model_config(_id, node.emane)
|
||||
if isinstance(node, EmaneNet):
|
||||
self.emane.set_model_config(_id, options.emane)
|
||||
# set default wlan config if needed
|
||||
if _type == NodeTypes.WIRELESS_LAN:
|
||||
if isinstance(node, WlanNode):
|
||||
self.mobility.set_model_config(_id, BasicRangeModel.name)
|
||||
|
||||
# boot nodes after runtime, CoreNodes, Physical, and RJ45 are all nodes
|
||||
|
|
|
@ -692,7 +692,9 @@ class TestGrpc:
|
|||
client = CoreGrpcClient()
|
||||
session = grpc_server.coreemu.create_session()
|
||||
session.set_location(47.57917, -122.13232, 2.00000, 1.0)
|
||||
emane_network = session.add_node(_type=NodeTypes.EMANE)
|
||||
options = NodeOptions()
|
||||
options.emane = EmaneIeee80211abgModel.name
|
||||
emane_network = session.add_node(_type=NodeTypes.EMANE, options=options)
|
||||
session.emane.set_model(emane_network, EmaneIeee80211abgModel)
|
||||
config_key = "platform_id_start"
|
||||
config_value = "2"
|
||||
|
@ -716,7 +718,9 @@ class TestGrpc:
|
|||
client = CoreGrpcClient()
|
||||
session = grpc_server.coreemu.create_session()
|
||||
session.set_location(47.57917, -122.13232, 2.00000, 1.0)
|
||||
emane_network = session.add_node(_type=NodeTypes.EMANE)
|
||||
options = NodeOptions()
|
||||
options.emane = EmaneIeee80211abgModel.name
|
||||
emane_network = session.add_node(_type=NodeTypes.EMANE, options=options)
|
||||
session.emane.set_model(emane_network, EmaneIeee80211abgModel)
|
||||
config_key = "bandwidth"
|
||||
config_value = "900000"
|
||||
|
@ -742,7 +746,9 @@ class TestGrpc:
|
|||
client = CoreGrpcClient()
|
||||
session = grpc_server.coreemu.create_session()
|
||||
session.set_location(47.57917, -122.13232, 2.00000, 1.0)
|
||||
emane_network = session.add_node(_type=NodeTypes.EMANE)
|
||||
options = NodeOptions()
|
||||
options.emane = EmaneIeee80211abgModel.name
|
||||
emane_network = session.add_node(_type=NodeTypes.EMANE, options=options)
|
||||
session.emane.set_model(emane_network, EmaneIeee80211abgModel)
|
||||
|
||||
# then
|
||||
|
|
Loading…
Reference in a new issue