diff --git a/daemon/core/emulator/distributed.py b/daemon/core/emulator/distributed.py index 60b83b82..30becfb5 100644 --- a/daemon/core/emulator/distributed.py +++ b/daemon/core/emulator/distributed.py @@ -54,7 +54,7 @@ class DistributedServer: user's home directory :param wait: True to wait for status, False to background process :return: stdout when success -:raises CoreCommandError: when a non-zero exit status occurs + :raises CoreCommandError: when a non-zero exit status occurs """ replace_env = env is not None diff --git a/daemon/core/emulator/session.py b/daemon/core/emulator/session.py index c3083e70..99c29f1e 100644 --- a/daemon/core/emulator/session.py +++ b/daemon/core/emulator/session.py @@ -181,7 +181,7 @@ class Session: :param _class: node class to get a node type for :return: node type -:raises CoreError: when node type does not exist + :raises CoreError: when node type does not exist """ node_type = NODES_TYPE.get(_class) if node_type is None: @@ -749,7 +749,7 @@ class Session: :param node_id: id of node to update :param options: data to update node with :return: True if node updated, False otherwise -:raises core.CoreError: when node to update does not exist + :raises core.CoreError: when node to update does not exist """ # get node to update node = self.get_node(node_id) @@ -1362,7 +1362,7 @@ class Session: :param _id: node id to retrieve :return: node for the given id -:raises core.CoreError: when node does not exist + :raises core.CoreError: when node does not exist """ if _id not in self.nodes: raise CoreError(f"unknown node id {_id}") diff --git a/daemon/core/nodes/base.py b/daemon/core/nodes/base.py index d31701b8..a475e672 100644 --- a/daemon/core/nodes/base.py +++ b/daemon/core/nodes/base.py @@ -108,7 +108,7 @@ class NodeBase: :param wait: True to wait for status, False otherwise :param shell: True to use shell, False otherwise :return: combined stdout and stderr -:raises CoreCommandError: when a non-zero exit status occurs + :raises CoreCommandError: when a non-zero exit status occurs """ if self.server is None: return utils.cmd(args, env, cwd, wait, shell) @@ -410,7 +410,7 @@ class CoreNodeBase(NodeBase): :param wait: True to wait for status, False otherwise :param shell: True to use shell, False otherwise :return: combined stdout and stderr -:raises CoreCommandError: when a non-zero exit status occurs + :raises CoreCommandError: when a non-zero exit status occurs """ raise NotImplementedError @@ -591,7 +591,7 @@ class CoreNode(CoreNodeBase): :param wait: True to wait for status, False otherwise :param shell: True to use shell, False otherwise :return: combined stdout and stderr -:raises CoreCommandError: when a non-zero exit status occurs + :raises CoreCommandError: when a non-zero exit status occurs """ if self.server is None: return self.client.check_cmd(args, wait=wait, shell=shell) diff --git a/daemon/core/nodes/client.py b/daemon/core/nodes/client.py index cd39eb37..d7642863 100644 --- a/daemon/core/nodes/client.py +++ b/daemon/core/nodes/client.py @@ -60,7 +60,7 @@ class VnodeClient: :param wait: True to wait for command status, False otherwise :param shell: True to use shell, False otherwise :return: combined stdout and stderr -:raises core.CoreCommandError: when there is a non-zero exit status + :raises core.CoreCommandError: when there is a non-zero exit status """ self._verify_connection() args = self.create_cmd(args) diff --git a/daemon/core/nodes/interface.py b/daemon/core/nodes/interface.py index fe15ba95..9ae01bfd 100644 --- a/daemon/core/nodes/interface.py +++ b/daemon/core/nodes/interface.py @@ -80,7 +80,7 @@ class CoreInterface: :param wait: True to wait for status, False otherwise :param shell: True to use shell, False otherwise :return: combined stdout and stderr -:raises CoreCommandError: when a non-zero exit status occurs + :raises CoreCommandError: when a non-zero exit status occurs """ if self.server is None: return utils.cmd(args, env, cwd, wait, shell) diff --git a/daemon/core/nodes/network.py b/daemon/core/nodes/network.py index 2d24b24f..6e198d48 100644 --- a/daemon/core/nodes/network.py +++ b/daemon/core/nodes/network.py @@ -309,7 +309,7 @@ class CoreNetwork(CoreNetworkBase): :param wait: True to wait for status, False otherwise :param shell: True to use shell, False otherwise :return: combined stdout and stderr -:raises CoreCommandError: when a non-zero exit status occurs + :raises CoreCommandError: when a non-zero exit status occurs """ logging.debug("network node(%s) cmd", self.name) output = utils.cmd(args, env, cwd, wait, shell) diff --git a/daemon/core/nodes/physical.py b/daemon/core/nodes/physical.py index fc3a7b00..d947c269 100644 --- a/daemon/core/nodes/physical.py +++ b/daemon/core/nodes/physical.py @@ -373,7 +373,7 @@ class Rj45Node(CoreNodeBase, CoreInterface): :param ifindex: interface index :param ifname: interface name :return: interface index -:raises ValueError: when an interface has already been created, one max + :raises ValueError: when an interface has already been created, one max """ with self.lock: if ifindex is None: diff --git a/daemon/core/xml/corexml.py b/daemon/core/xml/corexml.py index df73901f..8cdc512c 100644 --- a/daemon/core/xml/corexml.py +++ b/daemon/core/xml/corexml.py @@ -762,7 +762,9 @@ class CoreXmlReader: node_id = get_int(device_element, "id") name = device_element.get("name") model = device_element.get("type") + icon = device_element.get("icon") options = NodeOptions(name, model) + options.icon = icon service_elements = device_element.find("services") if service_elements is not None: @@ -788,7 +790,9 @@ class CoreXmlReader: node_id = get_int(network_element, "id") name = network_element.get("name") node_type = NodeTypes[network_element.get("type")] + icon = network_element.get("icon") options = NodeOptions(name) + options.icon = icon position_element = network_element.find("position") if position_element is not None: