removed issue with double loading services from core-daemon, fixed exceptions noted as not an error previously and updated code to more gracefully handle those cases, fixed issue with add_node when setting node.ype for all nodes
This commit is contained in:
parent
dc751dde2b
commit
4a2810e9b2
5 changed files with 22 additions and 32 deletions
|
@ -487,7 +487,6 @@ class FutureSession(Session):
|
|||
node = self.add_object(cls=node_class, objid=_id, name=name, start=start)
|
||||
|
||||
# set node attributes
|
||||
node.type = node_options.model
|
||||
node.icon = node_options.icon
|
||||
node.canvas = node_options.canvas
|
||||
node.opaque = node_options.opaque
|
||||
|
@ -497,6 +496,8 @@ class FutureSession(Session):
|
|||
|
||||
# add services to default and physical nodes only
|
||||
if _type in [NodeTypes.DEFAULT, NodeTypes.PHYSICAL]:
|
||||
node.type = node_options.model
|
||||
logger.debug("set node type: %s", node.type)
|
||||
logger.info("setting model (%s) with services (%s)", node.type, node_options.services)
|
||||
services = "|".join(node_options.services) or None
|
||||
self.services.addservicestonode(node, node.type, services)
|
||||
|
|
|
@ -12,7 +12,7 @@ class NodeOptions(object):
|
|||
Create a NodeOptions object.
|
||||
|
||||
:param str name: name of node, defaults to node class name postfix with its id
|
||||
:param str model: model to use for this node, defines services, defaults to "router"
|
||||
:param str model: defines services for default and physical nodes, defaults to "router"
|
||||
"""
|
||||
self.name = name
|
||||
self.model = model
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue