daemon: fix PhysicalNode instantiation issues, remove old functions that are no longer use and update session to use the new variation
This commit is contained in:
parent
2dd3839396
commit
e557b402b6
3 changed files with 15 additions and 52 deletions
|
@ -694,7 +694,11 @@ class Session:
|
|||
self.run_hook(hook)
|
||||
|
||||
def add_node_file(
|
||||
self, node_id: int, src_path: Path, file_path: Path, data: str
|
||||
self,
|
||||
node_id: int,
|
||||
src_path: Optional[Path],
|
||||
file_path: Path,
|
||||
data: Optional[str],
|
||||
) -> None:
|
||||
"""
|
||||
Add a file to a node.
|
||||
|
@ -707,7 +711,7 @@ class Session:
|
|||
"""
|
||||
node = self.get_node(node_id, CoreNode)
|
||||
if src_path is not None:
|
||||
node.addfile(src_path, file_path)
|
||||
node.copy_file(src_path, file_path)
|
||||
elif data is not None:
|
||||
node.create_file(file_path, data)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue