Skip to content

Commit

Permalink
Release 2.0.0 (#309)
Browse files Browse the repository at this point in the history
* Update for netmiko 4.x (#308)

* Update kwargs in nxos_device.py to fix nautobot-nornir.

* Pylint updates.

* Update CI for pylint py version.

* Fix exceptions

* Fix NXOS timeout

* Add refresh facts.

* Remove save() from nxos install_os as it causes error.

* Update pyntc/devices/aireos_device.py

Post-review commit (lint)

Co-authored-by: Jeff Kala <48843785+jeffkala@users.noreply.github.com>

---------

Co-authored-by: Jeff Kala <48843785+jeffkala@users.noreply.github.com>

* Feature/boot swicth all (#289)

Extend cisco_ios boot option lookup.

---------

Co-authored-by: tomasgaj <juan_jesus.tomas_garcia@roche.com>

* Release 2.0.0

---------

Co-authored-by: Jeff Kala <48843785+jeffkala@users.noreply.github.com>
Co-authored-by: juanjtomasg <66510649+juanjtomasg@users.noreply.github.com>
Co-authored-by: tomasgaj <juan_jesus.tomas_garcia@roche.com>
  • Loading branch information
4 people authored Jan 3, 2024
1 parent 451c3eb commit 3014dfa
Show file tree
Hide file tree
Showing 20 changed files with 412 additions and 534 deletions.
82 changes: 40 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"] # "3.10" add back after pyeapi new release.
python-version: ["3.8", "3.11"]
runs-on: "ubuntu-20.04"
env:
PYTHON_VER: "${{ matrix.python-version }}"
Expand Down Expand Up @@ -114,49 +114,48 @@ jobs:
- "pydocstyle"
- "flake8"
- "yamllint"
# TODO: Re-enable after initial pylint issue is completed. https://github.com/networktocode/pyntc/issues/249
# pylint:
# runs-on: "ubuntu-20.04"
# strategy:
# fail-fast: true
# matrix:
# python-version: ["3.7"]
# env:
# PYTHON_VER: "${{ matrix.python-version }}"
# steps:
# - name: "Check out repository code"
# uses: "actions/checkout@v2"
# - name: "Setup environment"
# uses: "networktocode/gh-action-setup-poetry-environment@v2"
# - name: "Get image version"
# run: "echo IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
# - name: "Set up Docker Buildx"
# id: "buildx"
# uses: "docker/setup-buildx-action@v1"
# - name: "Load the image from cache"
# uses: "docker/build-push-action@v2"
# with:
# builder: "${{ steps.buildx.outputs.name }}"
# context: "./"
# push: false
# load: true
# tags: "${{ env.IMAGE_NAME }}:${{ env.IMAGE_VER }}"
# file: "./Dockerfile"
# cache-from: "type=gha,scope=${{ env.IMAGE_NAME }}-${{ env.IMAGE_VER }}-py${{ matrix.python-version }}"
# cache-to: "type=gha,scope=${{ env.IMAGE_NAME }}-${{ env.IMAGE_VER }}-py${{ matrix.python-version }}"
# build-args: |
# PYTHON_VER=${{ env.PYTHON_VER }}
# - name: "Debug: Show docker images"
# run: "docker image ls"
# - name: "Linting: Pylint"
# run: "poetry run invoke pylint"
# needs:
# - "build"
pylint:
runs-on: "ubuntu-20.04"
strategy:
fail-fast: true
matrix:
python-version: ["3.8"]
env:
PYTHON_VER: "${{ matrix.python-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
- name: "Get image version"
run: "echo IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@v1"
- name: "Load the image from cache"
uses: "docker/build-push-action@v2"
with:
builder: "${{ steps.buildx.outputs.name }}"
context: "./"
push: false
load: true
tags: "${{ env.IMAGE_NAME }}:${{ env.IMAGE_VER }}"
file: "./Dockerfile"
cache-from: "type=gha,scope=${{ env.IMAGE_NAME }}-${{ env.IMAGE_VER }}-py${{ matrix.python-version }}"
cache-to: "type=gha,scope=${{ env.IMAGE_NAME }}-${{ env.IMAGE_VER }}-py${{ matrix.python-version }}"
build-args: |
PYTHON_VER=${{ env.PYTHON_VER }}
- name: "Debug: Show docker images"
run: "docker image ls"
- name: "Linting: Pylint"
run: "poetry run invoke pylint"
needs:
- "build"
pytest:
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.11"]
runs-on: "ubuntu-20.04"
env:
PYTHON_VER: "${{ matrix.python-version }}"
Expand Down Expand Up @@ -188,8 +187,7 @@ jobs:
- name: "Run Tests"
run: "poetry run invoke pytest"
needs:
# Remove everything but pylint once pylint is passing.
# - "pylint"
- "pylint"
- "bandit"
- "pydocstyle"
- "flake8"
Expand Down
14 changes: 14 additions & 0 deletions docs/admin/release_notes/version_2_0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# v2.0 Release Notes

## [2.0.0] 12-2023
### Added
- [308](https://github.com/networktocode/pyntc/pull/308) nxos `refresh()` method to refresh device facts.
- [289](https://github.com/networktocode/pyntc/pull/289) additional cisco_ios boot options search.

### Changed
- [308](https://github.com/networktocode/pyntc/pull/308) Updated nxos install_os and logic when waiting for device reload and improved log messages.

### Deprecated
- [308](https://github.com/networktocode/pyntc/pull/308) Deprecated netmiko argument `delay_factor` in favor of `read_timeout` as per changes in Netmiko 4.0.

Refer to this blog post for more info about changes in netmiko 4.0: https://pynet.twb-tech.com/blog/netmiko-read-timeout.html
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ nav:
- v0.19: "admin/release_notes/version_0_19.md"
- v0.20: "admin/release_notes/version_0_20.md"
- v1.0: "admin/release_notes/version_1_0.md"
- v2.0: "admin/release_notes/version_2_0.md"
- Developer Guide:
- Extending the Library: "dev/extending.md"
- Contributing to the Library: "dev/contributing.md"
Expand Down
Loading

0 comments on commit 3014dfa

Please sign in to comment.