parsley.tools package¶
Submodules¶
parsley.tools.common module¶
Tools for very common jobs.
-
parsley.tools.common.
abspath
(path)¶ A variant of os.path.abspath that does what it is used for in all operating systems.
- Parameters
path (str) –
- Return type
str
-
parsley.tools.common.
call
(*cmdline, shell=False, decode=True, errorstring=None)¶ Executes an external process and returns a tuple of returnvalue and program output.
- Parameters
cmdline (Union[List[str], str]) –
shell (bool) –
decode (bool) –
errorstring (Optional[AnyStr]) –
- Return type
Union[AnyStr, Tuple[int, AnyStr]]
-
parsley.tools.common.
lock
(fle, *, pidless=False, lockpid=None)¶ Locks a lockfile for synchronization. @parm pidless: If to return a lock not bound to a process. If yes, it must be unlocked and refreshed every 10
minutes.
@parm lockpid: The process id to lock with, if not the own one. This process should live over the entire timespan.
- Parameters
fle (str) –
pidless (bool) –
lockpid (Optional[int]) –
- Return type
bool
-
parsley.tools.common.
unlock
(fle)¶ Unlocks a lockfile.
- Parameters
fle (str) –
- Return type
None
parsley.tools.infssyncmanageconflicts module¶
-
parsley.tools.infssyncmanageconflicts.
run
()¶ - Return type
None
parsley.tools.networking module¶
Parsley networking features.
-
parsley.tools.networking.
translate_parsley_portforwarding
(machine, port, runtime)¶ Provides functionality for using parsley through an ssh remote port forwarding tunnel.
- Parameters
machine (str) –
port (int) –
runtime (parsley.syncengine.syncruntime.SyncRuntime) –
- Return type
Tuple[str, int]
parsley.tools.pathacceptors module¶
Default implementation for path acceptors as e.g. used in
parsley.aspect.applypathacceptor.ApplyPathAcceptor
.
-
parsley.tools.pathacceptors.
builtinpathacceptor
(path, fs)¶ A path acceptor that skips parsley control stuff. It is always used.
- Parameters
path (str) –
- Return type
bool
-
parsley.tools.pathacceptors.
defaultpathacceptor
(path, fs)¶ A path acceptor that skips file names with some known ‘backup pattern’, like ending with ~.
- Parameters
path (str) –
- Return type
bool
parsley.tools.sshchangenotifyproxy module¶
SSH remote proxy for monitoring and notifying file changes.
parsley.tools.sshxattrproxy module¶
SSH remote proxy for exchange of file metadata.
-
class
parsley.tools.sshxattrproxy.
Mainloop
¶ Bases:
object
This program is not directly used in the process of the parsley engine but is copied to a remote system and controlled via an ssh session as a proxy for doing some tasks on this remote system that cannot be done via an sshfs mount.
-
_watchdog
()¶
-
processrequest
(req)¶
-
run
()¶
-
Module contents¶
Auxiliary stuff, (at least mostly) decoupled from Parsley infrastructure.