switched session.metadata to just be a standard dict, fixed shutdown service issue during session.data_collect
This commit is contained in:
parent
fe95f246d4
commit
79dfbaa3ec
7 changed files with 22 additions and 40 deletions
|
@ -26,7 +26,7 @@ from core.emulator.emudata import (
|
|||
link_config,
|
||||
)
|
||||
from core.emulator.enumerations import EventTypes, ExceptionLevels, LinkTypes, NodeTypes
|
||||
from core.emulator.sessionconfig import SessionConfig, SessionMetaData
|
||||
from core.emulator.sessionconfig import SessionConfig
|
||||
from core.errors import CoreError
|
||||
from core.location.corelocation import CoreLocation
|
||||
from core.location.event import EventLoop
|
||||
|
@ -129,7 +129,7 @@ class Session:
|
|||
for key in config:
|
||||
value = config[key]
|
||||
self.options.set_config(key, value)
|
||||
self.metadata = SessionMetaData()
|
||||
self.metadata = {}
|
||||
|
||||
# distributed support and logic
|
||||
self.distributed = DistributedController(self)
|
||||
|
@ -1513,9 +1513,8 @@ class Session:
|
|||
for node_id in self.nodes:
|
||||
node = self.nodes[node_id]
|
||||
if isinstance(node, CoreNodeBase):
|
||||
self.services.stop_services(node)
|
||||
args = (node,)
|
||||
funcs.append((self.services.stop_services, args, {}))
|
||||
args = (node,)
|
||||
funcs.append((self.services.stop_services, args, {}))
|
||||
utils.threadpool(funcs)
|
||||
|
||||
# shutdown emane
|
||||
|
|
|
@ -87,14 +87,3 @@ class SessionConfig(ConfigurableManager, ConfigurableOptions):
|
|||
if value is not None:
|
||||
value = int(value)
|
||||
return value
|
||||
|
||||
|
||||
class SessionMetaData(ConfigurableManager):
|
||||
"""
|
||||
Metadata is simply stored in a configs[] dict. Key=value pairs are
|
||||
passed in from configure messages destined to the "metadata" object.
|
||||
The data is not otherwise interpreted or processed.
|
||||
"""
|
||||
|
||||
name = "metadata"
|
||||
config_type = RegisterTlvs.UTILITY.value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue