frappy.server: use server name for SecNode name

no need to configure the name of SecNode and Dispatcher

Change-Id: I5199bbd77c74e4fe56b527a5a565a8285b0d831e
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/34988
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
This commit is contained in:
zolliker 2024-11-19 15:34:00 +01:00
parent dff3bd2f24
commit e41692bf2c

View File

@ -97,7 +97,7 @@ class Server:
if not cfgfiles: if not cfgfiles:
cfgfiles = [name] cfgfiles = [name]
# sanitize name (in case it is a cfgfile) # sanitize name (in case it is a cfgfile)
name = os.path.splitext(os.path.basename(name))[0] self.name = name = os.path.splitext(os.path.basename(name))[0]
if isinstance(parent_logger, mlzlog.MLZLogger): if isinstance(parent_logger, mlzlog.MLZLogger):
self.log = parent_logger.getChild(name, True) self.log = parent_logger.getChild(name, True)
else: else:
@ -292,10 +292,9 @@ class Server:
errors = [] errors = []
opts = dict(self.node_cfg) opts = dict(self.node_cfg)
cls = get_class(opts.pop('cls')) cls = get_class(opts.pop('cls'))
name = opts.pop('name', '-'.join(self._cfgfiles))
# TODO: opts not in both # TODO: opts not in both
self.secnode = SecNode(name, self.log.getChild('secnode'), opts, self) self.secnode = SecNode(self.name, self.log.getChild('secnode'), opts, self)
self.dispatcher = cls(name, self.log.getChild('dispatcher'), opts, self) self.dispatcher = cls(self.name, self.log.getChild('dispatcher'), opts, self)
# add other options as SECNode properties, those with '_' prefixed will # add other options as SECNode properties, those with '_' prefixed will
# get exported # get exported