Skip to content

Commit

Permalink
Merge branch 'develop' into add-digi-os-platform
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers authored Oct 17, 2023
2 parents 93c5e5a + e2135e7 commit 298af41
Show file tree
Hide file tree
Showing 263 changed files with 21,651 additions and 3,017 deletions.
109 changes: 80 additions & 29 deletions .github/workflows/commit.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,101 @@
---
name: build
on: [push, pull_request]
---
name: Netmiko
on: [push,pull_request]
env:
environment: gh_actions
FORCE_COLOR: 1

jobs:
std_tests:
runs-on: ubuntu-latest
linters:
name: linters
strategy:
max-parallel: 4
matrix:
# python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: [ '3.11' ]
platform: [ubuntu-20.04]

runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -r requirements-genie.txt
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true

- name: Run black
- name: Cache Poetry virtualenv
uses: actions/cache@v2
id: cached-poetry-dependencies
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install Dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'

- name: Run pylama
run: |
black --check .
poetry run pylama .
- name: Run linter
- name: Run black
run: |
pylama .
poetry run black --check .
- name: Run mypy
run: |
mypy ./netmiko/
poetry run mypy --version
poetry run mypy ./netmiko/
pytest:
name: Testing on Python ${{ matrix.python-version }} (${{ matrix.platform}})
defaults:
run:
shell: bash
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
platform: [ubuntu-20.04]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true

- name: Cache Poetry virtualenv
uses: actions/cache@v2
id: cached-poetry-dependencies
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
if: ${{ matrix.platform != 'windows-latest' }} # windows hangs if using a cached venv

- name: Install Dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'

- name: Run Tests
run: |
pytest -v -s tests/test_import_netmiko.py
pytest -v -s tests/unit/test_base_connection.py
pytest -v -s tests/unit/test_utilities.py
pytest -v -s tests/unit/test_ssh_autodetect.py
pytest -v -s tests/unit/test_connection.py
poetry run pytest -v -s tests/test_import_netmiko.py
poetry run pytest -v -s tests/unit/test_base_connection.py
poetry run pytest -v -s tests/unit/test_utilities.py
poetry run pytest -v -s tests/unit/test_ssh_autodetect.py
poetry run pytest -v -s tests/unit/test_connection.py
poetry run pytest -v -s tests/unit/test_entry_points.py
19 changes: 19 additions & 0 deletions COMMON_ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,22 @@ redispatch(net_connect, device_type='cisco_ios')
# Now just do your normal Netmiko operations
new_output = net_connect.send_command("show ip int brief")
```

### Installing Netmiko `develop` branch (with Poetry support)

To install the Netmiko `develop` branch follow this process.

1. Install Python poetry. This should be documented online.
2. export PATH="/home/<user>/.local/bin:$PATH" # make sure poetry is on your $PATH
3. git clone https://github.com/ktbyers/netmiko
4. cd netmiko # change dir into the base of the Netmiko repository.
5. Create a new virtual environment

```
# Use the appropriate python3 for your machine
# This creates a virtual environment named .venv
python3.10 -m venv .venv
```

6. source .venv/bin/activate # Activate virtual env
7. poetry install # Install all of the Netmiko dependencies
2 changes: 1 addition & 1 deletion EXAMPLES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="https://github.com/ktbyers/netmiko/blob/improved_examples/images/netmiko_logo_gh.png" width="320">
<img src="https://ktbyers.github.io/netmiko/images/netmiko_logo_gh.png" width="320">

Netmiko Examples
=======
Expand Down
31 changes: 27 additions & 4 deletions PLATFORMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
###### Regularly tested

- Arista vEOS
- Cisco ASA
- Cisco IOS
- Cisco IOS-XE
- Cisco IOS-XR
Expand All @@ -17,24 +16,32 @@

- 6Wind
- Adtran OS
- Adva AOS FSP150 F2 & F3
- Alcatel AOS6/AOS8
- Apresia Systems AEOS
- ARRIS CER
- AudioCodes Gateways & Controllers
- Broadcom ICOS
- Calix B6
- Casa Systems CMTS
- Centec Networks
- Cisco AireOS (Wireless LAN Controllers)
- Cisco ASA
- Cisco S200
- CloudGenix ION
- Dell OS9 (Force10)
- Dell OS10
- Dell PowerConnect
- Digi OS
- Ericsson IPOS
- Ericsson MINI-LINK 66XX & 63XX
- Extreme ERS (Avaya)
- Extreme MLX/NetIron (Brocade/Foundry)
- Extreme TierraOS
- Extreme VDX (Brocade)
- Extreme VSP (Avaya)
- Fiberstore FSOS
- Hillstone StoneOS
- HPE Comware7
- Huawei
- Huawei OLT
Expand All @@ -54,6 +61,7 @@
- Ruckus ICX/FastIron
- Ruijie Networks
- Supermicro SMIS
- Teldat CIT
- TPLink JetStream
- Ubiquiti EdgeSwitch
- Vyatta VyOS
Expand All @@ -66,10 +74,8 @@
- Accedian
- Allied Telesis AlliedWare Plus
- Aruba
- Arris CER
- Brocade Fabric OS
- C-DOT CROS
- Casa CMTS
- Ciena SAOS
- Citrix Netscaler
- Cisco Telepresence
Expand Down Expand Up @@ -106,6 +112,8 @@
- a10
- accedian
- adtran_os
- adva_fsp150f2
- adva_fsp150f3
- alcatel_aos
- alcatel_sros
- allied_telesis_awplus
Expand All @@ -115,6 +123,9 @@
- aruba_os
- aruba_osswitch
- aruba_procurve
- audiocode_66
- audiocode_72
- audiocode_shell
- avaya_ers
- avaya_vsp
- broadcom_icos
Expand All @@ -134,6 +145,7 @@
- cisco_ftd
- cisco_ios
- cisco_nxos
- cisco_s200
- cisco_s300
- cisco_tp
- cisco_viptela
Expand All @@ -157,6 +169,8 @@
- endace
- enterasys
- ericsson_ipos
- ericsson_mltn63
- ericsson_mltn66
- extreme
- extreme_ers
- extreme_exos
Expand All @@ -174,11 +188,13 @@
- fortinet
- generic
- generic_termserver
- hillstone_stoneos
- hp_comware
- hp_procurve
- huawei
- huawei_olt
- huawei_smartax
- huawei_vrp
- huawei_vrpv8
- ipinfusion_ocnos
- juniper
Expand All @@ -196,8 +212,8 @@
- netapp_cdot
- netgear_prosafe
- netscaler
- nokia_sros
- nokia_srl
- nokia_sros
- oneaccess_oneos
- ovs_linux
- paloalto_panos
Expand All @@ -210,6 +226,7 @@
- sixwind_os
- sophos_sfos
- supermicro_smis
- teldat_cit
- tplink_jetstream
- ubiquiti_edge
- ubiquiti_edgerouter
Expand All @@ -228,13 +245,17 @@
- apresia_aeos_telnet
- arista_eos_telnet
- aruba_procurve_telnet
- audiocode_72_telnet
- audiocode_66_telnet
- audiocode_shell_telnet
- brocade_fastiron_telnet
- brocade_netiron_telnet
- calix_b6_telnet
- centec_os_telnet
- ciena_saos_telnet
- cisco_ios_telnet
- cisco_xr_telnet
- cisco_s200_telnet
- cisco_s300_telnet
- dell_dnos6_telnet
- dell_powerconnect_telnet
Expand All @@ -258,6 +279,7 @@
- ruckus_fastiron_telnet
- ruijie_os_telnet
- supermicro_smis_telnet
- teldat_cit_telnet
- tplink_jetstream_telnet
- yamaha_telnet
- zte_zxros_telnet
Expand All @@ -276,3 +298,4 @@
- juniper_junos
- linux
- nokia_sros
- ubiquiti_edgerouter
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/netmiko.svg)](https://img.shields.io/pypi/pyversions/netmiko)
[![PyPI](https://img.shields.io/pypi/v/netmiko.svg)](https://pypi.python.org/pypi/netmiko)
[![Downloads](https://pepy.tech/badge/netmiko)](https://pepy.tech/project/netmiko)
[![Downloads](https://static.pepy.tech/badge/netmiko)](https://static.pepy.tech/badge/netmiko)
[![GitHub contributors](https://img.shields.io/github/contributors/ktbyers/netmiko.svg)](https://GitHub.com/ktbyers/netmiko/graphs/contributors/)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

Expand Down
4 changes: 2 additions & 2 deletions _release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ while true; do
esac
done

pylama
pylama .
if [ $? -eq 0 ]; then
echo
echo "pylama ... [OK]"
Expand All @@ -32,7 +32,7 @@ else
fi

echo
python setup.py sdist bdist_wheel > /dev/null
poetry build > /dev/null
if [ $? -eq 0 ]; then
echo "creating distribution ... [OK]"
ls -ltr $DIR_PACKAGE
Expand Down
Loading

0 comments on commit 298af41

Please sign in to comment.