Changelogs » Apssh

PyUp Safety actively tracks 263,166 Python packages for vulnerabilities and notifies you when to upgrade.



* Service class continued:
  * parameter reset_failed renamed into stop_if_running
  * more robust wrt restarting the same service
  * 0.17.2 was fine but used a couple f-strings which broke readthedocs


* Service class revisited:
  * parameter service_id is mandatory
  * comes with an implicit reset-failed by default
  * no longer salted
  * 0.17.0 was breaking compatibility for no benefit, please don't use


* new option -K / --ok-if-no-key - don't check for at least one key
  * micro-change in labelling nodes in a graph: swap space and colon


* the Service class accepts a new `environ` attribute that lets user define e.g.
  USER or HOME similar environment variables
  * 0.15.0 was broken


* minor cosmetic tweaks
  * graphical output shows job number for easier binding to textual listing
  * default RunString textual repr is based on a truncated script body


* bugfix: computation of distances was broken with jobs that were not sshjob instances
  * bugfix: creation of a Service instance with no service_id was broken


* new class `Service`: simplify creation of things running in the background,
  like tcpdump and other similar activities that need to be started and stopped;
  this feature leverages `systemd-run`


* a tool to produce a graphical representation of the
  "node x is the gateway for node y" relationship. See `topology_as_dot` or `topology_as_graph`.
  * 0.13.1 used lingering f-strings


* command objects can define a `allowed_exits` attribute; this allows
  for instance to state that a command may be killed,
  or return a non-zero retcod, while still being deemd OK.
  * `apssh.close_ssh_in_scheduler` now allows to explicitly close all ssh
  connections invlolved in a scheduler; coroutine `co_close_ssh_in_scheduler` available as well;
  * more cleanly close connection to ssh agent when fetching keys
  * ssh sessions now retain exit code or signal, when relevant
  * `SshJob.repr()` gives more details on which command failed and how,
  resulting in a more troubleshooting-friendly listing for apssh schedulers,
  especially with multi-command jobs.
  * much wider test scope, redesigned to work exclusively in standalone mode,
  using a local ubuntu virtualbox.


* bugfix, selection between RunScript and RunString in apssh -s
  * optimize lazy connections, don't wait for the lock if connection is up
  * tweaked tests to use non-critical schedulers when it matters;
  this is for asynciojobs 0.11


* inside an SshJob, a command that has an empty label won't show up at all,
  not even as an empty line


* bugfix, failing SshJob tried to throw an exception using the command()
  method on the failing command, which is no longer available


* adaptation for asynciojobs v0.10: `jobs_window` now is a scheduler attribute
  and not a parameter to run()


* still cleaner and more complete doc
  * in particular doc now covers formatters thoroughly
  * new exception class CommandFailedError


* apssh binary was broken, searching for config files in ~/.apssh/ was not working


* in line with asynciojobs 0.7 labelling system
  * command objects can have a label set on them
  to shorten the graphical view
  * major overhaul on the documentation
  * using the numpy style in docstrings
  * code is now totally pep8/flake8- and pylint- clean


* revisited graphical rendering of RunString
  * pylint'ed
  * code layout changed, SshNode and LocalNode in


* *Warning*: a disruptive change in the constructor for SshProxy/SshNode
  has been introduced; from now on, all parameters but the hostname are keyword-only parameters
  * the underlying asyncssh is now expected to support *x11_forwarding*,
  there no longer is a fallback if not
  * adopted new doc loayout with no source/ subdir in sphinx/


* SshProxy/SshNode have a modified signature
  * single parameter hostname
  * all the rest are now keyword-only parameters
  * warning, this might break some scripts
  * doc uses new sphinx theme


* Improved policy when using SshNode with no provided keys:
  will first look for agent keys, and then if there is none,
  will look for private keys, prompting for passwords if found


* bugfix - missing import os


* replaced use of os.path with pathlib.Path
  * minor fixes


* defined dot_label() for nicer png graphs


* a second attempt to fix bogus pip install


* an attempt to fix bogus pip install


* decidedly these type checks were botched


* implement 6 about showing local subprocesses (LocalNode)
  stdout and stderr on the fly


* bugfix - type checks were too stringent on LocalNode


* add argument checking for the node part of a SshJob


* add type verifications when building a SshProxy instance
  * new policy to locate defaut private keys: if no key can be found
  at the ssh agent, then ~/.ssh/id_rsa and ~/.ssh/id_dsa are


* bugfix


* can create SshJob with keep_connection=True
  * check a node object is an instance of SshProxy
  * more robust load_agent_keys - return [] if cannot reach
  * SshJob - change logic of failed commands - exception only raised if critical


* bugfix - RunScript and details()


* protect os.getlogin()


* warning about asyncssh and 1.7.3 to appear only when actually using x11
  * 0.5.3 had that still wrong


* better feedback for connecting/disconnections
  * write error messages on stderr for serious errors
  even if not verbose
  * show username in most cases
  * add support for x11 forwarding with Run(x11=True)
  * also available on RunString and RunScript
  * requires apssh > 1.7.3, which is not yet out though
  * bugfix: both RunScript and RunString add a random part
  at the end of remote command name - to allow for multiple
  simulataneous runs
  * use proper SshJob's instead of individual Run commands
  * use setuptools instead of disutils


* windowing now performed with asynciojobs
  * -u/--user is now -l/--login like in vanilla `ssh`


* Do not automatically add any quotes to commands run remotely
  with Run{String,Script}, this is the caller's responsability


* LocalNode.username is defined - used in details


* it is possible to set `verbose` when creating a `SshJob` object
  * in this case, this value is used to set/override `verbose` in
  all the `commands` that are part of that `SshJob`
  * 0.4.5 is broken (commands verbosity is always on)


* welcome to the LocalNode class for running local commands
  * big room for improvements, but at least we get a decent way
  to write the C1 tutorial in r2lab
  * 0.4.3 is broken


* comes with a sphinx documentation ready to publish on


* add verbose flag to SshProxy/SshNode
  useful to see when a connection fails
  * add verbose flag to Run* classes
  useful to see commands details when running remotely


* align on asynciojobs 0.4.0
  * that is to say, rename engine into scheduler


* Redesigned interface
  * a single AbstrctJob class SshJob
  * is created with a list of AbstractCommands
  * that can be any of `Run`, `RunScript`, `RunString`, `Push` or `Pull`
  * so now script scenarii can embed their shell fragments inside a python script
  * also this is in accordance with asynciojobs 0.3.3 for
  the details() and default_label() protocols


* CaptureFormatter allows to capture the output of a command


* bugfix - protect against issues when closing connection


* connect_put_run propagates follow_symlinks, which defaults to True


* minor fixes


* SshJobScript accepts command= or commands= just like SshJob
  * apssh -i become -k
  * apssh -i now is for included files when running -s
  * 0.2.11 and 0.2.12 are broken


* SshJobScript has optional includes that get pushed too
  * SshProxy/SshNode : renamed client_keys into just keys
  * SshNode with no keys: default now is to use ssh agent keys


* SshJobScript fails if script retcod is not 0


* for --target, files and directories are also searched in ~/.apssh


* new class SshJobPusher
  * SshJob(commands=..) allows to run several commands in a row
  * all SshJob* classes are critical by default


* class `SshJobCollector` can retrieve data


* formatter cleanupmostly done
  * all verbose reporting about connections and authentication and the like
  is now primarily done throuch asyncssh callbacks, except for sessions and sftp


* big cleanup in formatters that can be verbose or not
  * sshjobs uniformly refers to *node* rather than *proxy* including in attributes


* exception handling :
  * more uniform way to write jobs, always let exceptions through
  * ending up in simpler code


* add mutual exclusion locks to SshProxy connection and disconnection
  to ensure that an object gets connected only once


* support for -g / --gateway option for 2-hops connections
  * support for getting keys at the ssh agent if can be located
  * tentatively fixes issue 2


* add missing to pypi packaging


* fixes issue 1
  * fixes SFTP closing
  * addition of SshJobs to be used with asynciojobs


* script mode still runs in remote home directory, does not cd in .apssh


* `--target` and `--exclude` can be used with a directory
  This is useful in combination with `--mark`, so that the second run can easily focus on successful nodes
  first pass to determine nodes that are responding
  apssh -o pass1 --mark -t MYNODES hostname
  second pass: focus on successful nodes
  apssh -o pass2 -t pass1/0ok/ -f
  * added the `--dry-run`/`-n` option to just see the selected nodes


* added support for --script arg1 arg2
  * this will take care of copying over a local script in ~/.apssh
  * before executing it remotely
  * it is thus easier to handle composite shell commands, or any other python-like scripts


* added support for --target "fit01 fit02" for smoother integration with $NODES on faraday


* was missing


* COPYING was missing


* of course it did not go exactly as planned


* first rough release