daemon: fixed issue for LXC nodes and not properly picking up configured image name to use and for writing to xml
This commit is contained in:
parent
f10c7cac45
commit
3e5c8c894f
2 changed files with 4 additions and 4 deletions
|
@ -34,7 +34,7 @@ from core.nodes.base import (
|
||||||
)
|
)
|
||||||
from core.nodes.docker import DockerNode, DockerOptions
|
from core.nodes.docker import DockerNode, DockerOptions
|
||||||
from core.nodes.interface import CoreInterface
|
from core.nodes.interface import CoreInterface
|
||||||
from core.nodes.lxd import LxcNode
|
from core.nodes.lxd import LxcNode, LxcOptions
|
||||||
from core.nodes.network import CoreNetwork, CtrlNet, PtpNet, WlanNode
|
from core.nodes.network import CoreNetwork, CtrlNet, PtpNet, WlanNode
|
||||||
from core.nodes.wireless import WirelessNode
|
from core.nodes.wireless import WirelessNode
|
||||||
from core.services.coreservices import CoreService
|
from core.services.coreservices import CoreService
|
||||||
|
@ -81,7 +81,7 @@ def add_node_data(
|
||||||
options.config_services = node_proto.config_services
|
options.config_services = node_proto.config_services
|
||||||
if isinstance(options, EmaneOptions):
|
if isinstance(options, EmaneOptions):
|
||||||
options.emane_model = node_proto.emane
|
options.emane_model = node_proto.emane
|
||||||
if isinstance(options, DockerOptions):
|
if isinstance(options, (DockerOptions, LxcOptions)):
|
||||||
options.image = node_proto.image
|
options.image = node_proto.image
|
||||||
position = Position()
|
position = Position()
|
||||||
position.set(node_proto.position.x, node_proto.position.y)
|
position.set(node_proto.position.x, node_proto.position.y)
|
||||||
|
|
|
@ -15,7 +15,7 @@ from core.errors import CoreXmlError
|
||||||
from core.nodes.base import CoreNodeBase, CoreNodeOptions, NodeBase, Position
|
from core.nodes.base import CoreNodeBase, CoreNodeOptions, NodeBase, Position
|
||||||
from core.nodes.docker import DockerNode, DockerOptions
|
from core.nodes.docker import DockerNode, DockerOptions
|
||||||
from core.nodes.interface import CoreInterface
|
from core.nodes.interface import CoreInterface
|
||||||
from core.nodes.lxd import LxcNode
|
from core.nodes.lxd import LxcNode, LxcOptions
|
||||||
from core.nodes.network import CtrlNet, GreTapBridge, PtpNet, WlanNode
|
from core.nodes.network import CtrlNet, GreTapBridge, PtpNet, WlanNode
|
||||||
from core.nodes.wireless import WirelessNode
|
from core.nodes.wireless import WirelessNode
|
||||||
from core.services.coreservices import CoreService
|
from core.services.coreservices import CoreService
|
||||||
|
@ -825,7 +825,7 @@ class CoreXmlReader:
|
||||||
options.config_services.extend(
|
options.config_services.extend(
|
||||||
x.get("name") for x in config_service_elements.iterchildren()
|
x.get("name") for x in config_service_elements.iterchildren()
|
||||||
)
|
)
|
||||||
if isinstance(options, DockerOptions):
|
if isinstance(options, (DockerOptions, LxcOptions)):
|
||||||
options.image = image
|
options.image = image
|
||||||
# get position information
|
# get position information
|
||||||
position_element = device_element.find("position")
|
position_element = device_element.find("position")
|
||||||
|
|
Loading…
Reference in a new issue