Skip to content

Commit

Permalink
Version 2 API changes (#221)
Browse files Browse the repository at this point in the history
* Removed paramiko clients, tests and embedded server. Removed deprecated imports test.
* Removed paramiko agent and utility functions. Removed deprecated modules. Updated docstrings.
* Updated utils tests.
* Updated imports
* Made single client return host output objects from run_command. Removing deprecated output.
* Updated tests for new API version. Removed deprecated functions.
* Removed deprecated dictionary output support. Updated tests.
* Updated libssh client tests
* Updated output test
* Updated libssh clients, parallel base client.
* Updated changelog, setup.py. docstrings
* Updated documentation
* Added upgrade guide.
* Updated finished and unfinished arguments to join timeout exception to be easier to use - added test. 
* Updated changelog. Removed unused host_clients from parallel clients. Updated make ssh client to not use locks since no longer using old host clients.
* Updated circleci cfg
* Updated tunnel tests and code to cleanup more safely
  • Loading branch information
pkittenis authored Sep 18, 2020
1 parent 131e13f commit f8bc2aa
Show file tree
Hide file tree
Showing 53 changed files with 940 additions and 4,433 deletions.
1 change: 1 addition & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
skip_branch_with_pr: true
environment:
global:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
Expand Down
26 changes: 18 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,39 @@ jobs:
- run:
name: Deps
command: |
sudo apt-get install openssh-server
sudo apt-get install openssh-server --fix-missing
- python/save-cache:
dependency-file: requirements_dev.txt
key: depsv3-{{ .Branch }}.{{ arch }}-PY<< parameters.python_ver >>
- run:
command: |
python setup.py check --restructuredtext
name: Check readme
- run:
command: |
pip install -U -r requirements_dev.txt
name: Build
- run:
command: |
flake8 pssh
name: flake
- run:
command: |
eval "$(ssh-agent -s)"
pytest --cov-append --cov=pssh tests/test_imports.py tests/test_output.py tests/test_utils.py
pytest --reruns 5 --cov-append --cov=pssh tests/miko
pytest --cov-append --cov=pssh tests/test_output.py tests/test_utils.py tests/test_host_config.py
pytest --reruns 10 --cov-append --cov=pssh tests/native/test_tunnel.py tests/native/test_agent.py
pytest --reruns 5 --cov-append --cov=pssh tests/native/test_*_client.py
pytest --reruns 5 --cov-append --cov=pssh tests/ssh
flake8 pssh
name: Integration tests
- run:
command: |
cd doc; make html; cd ..
# Test building from source distribution
name: make docs
- run:
command: |
python setup.py sdist
cd dist; pip install *; cd ..
python setup.py check --restructuredtext
name: Test
name: Source dist install
- run:
command: codecov
name: Coverage
Expand Down Expand Up @@ -71,7 +81,7 @@ jobs:
- run:
name: Upload Wheel
command: |
twine upload --skip-existing -u $PYPI_U -p $PYPI_P wheels/*
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/*
manylinux:
machine:
Expand Down
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ services:
- docker
python:
- 2.7
- 3.6
- 3.7
- 3.8
addons:
apt:
packages:
Expand All @@ -28,8 +25,7 @@ install:
script:
# For testing SSH agent related functionality
- eval `ssh-agent -s`
- pytest --cov-append --cov=pssh tests/test_imports.py tests/test_output.py tests/test_utils.py tests/test_host_config.py
- pytest --reruns 5 --cov-append --cov=pssh tests/miko
- pytest --cov-append --cov=pssh tests/test_output.py tests/test_utils.py tests/test_host_config.py
- pytest --reruns 10 --cov-append --cov=pssh tests/native/test_tunnel.py tests/native/test_agent.py
- pytest --reruns 5 --cov-append --cov=pssh tests/native/test_*_client.py
- pytest --reruns 5 --cov-append --cov=pssh tests/ssh
Expand Down
30 changes: 30 additions & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
Change Log
============

2.0.0
+++++

Changes
--------

See `Upgrading to API 2.0 <upgrade-link>`_ for examples of code that will need updating.

* Removed paramiko clients and dependency.
* ``ParallelSSHClient.run_command`` now always returns a list of ``HostOutput`` - ``return_list`` argument is a no-op and may be removed.
* ``ParallelSSHClient.get_last_output`` now always returns a list of ``HostOutput``.
* ``SSHClient.run_command`` now returns ``HostOutput``.
* Removed deprecated since `1.0.0` ``HostOutput`` dictionary attributes.
* Removed deprecated since `1.0.0` imports and modules.
* Removed paramiko based ``load_private_key`` and ``read_openssh_config`` functions from ``pssh.utils``.
* Removed paramiko based ``pssh.tunnel``.
* Removed paramiko based ``pssh.agent``.
* Removed deprecated ``ParallelSSHClient.get_output`` function.
* Removed deprecated ``ParallelSSHClient.get_exit_code`` and ``get_exit_codes`` functions.
* Removed deprecated ``ParallelSSHClient`` ``host_config`` dictionary implementation - now list of ``HostConfig``.
* Removed ``HostOutput.cmd`` attribute.
* Removed ``ParallelSSHClient.host_clients`` attribute.


Fixes
-----

* Removed now unnecessary locking around SSHClient initialisation so it can be parallelised - #219.


1.13.0
++++++

Expand Down
Loading

0 comments on commit f8bc2aa

Please sign in to comment.