Skip to content

Commit 3014dfa

Browse files
pszulczewskijeffkalajuanjtomasgtomasgaj
authored
Release 2.0.0 (#309)
* 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 <[email protected]> --------- Co-authored-by: Jeff Kala <[email protected]> * Feature/boot swicth all (#289) Extend cisco_ios boot option lookup. --------- Co-authored-by: tomasgaj <[email protected]> * Release 2.0.0 --------- Co-authored-by: Jeff Kala <[email protected]> Co-authored-by: juanjtomasg <[email protected]> Co-authored-by: tomasgaj <[email protected]>
1 parent 451c3eb commit 3014dfa

20 files changed

+412
-534
lines changed

.github/workflows/ci.yml

+40-42
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
strategy:
8484
fail-fast: true
8585
matrix:
86-
python-version: ["3.8", "3.9", "3.10", "3.11"] # "3.10" add back after pyeapi new release.
86+
python-version: ["3.8", "3.11"]
8787
runs-on: "ubuntu-20.04"
8888
env:
8989
PYTHON_VER: "${{ matrix.python-version }}"
@@ -114,49 +114,48 @@ jobs:
114114
- "pydocstyle"
115115
- "flake8"
116116
- "yamllint"
117-
# TODO: Re-enable after initial pylint issue is completed. https://github.com/networktocode/pyntc/issues/249
118-
# pylint:
119-
# runs-on: "ubuntu-20.04"
120-
# strategy:
121-
# fail-fast: true
122-
# matrix:
123-
# python-version: ["3.7"]
124-
# env:
125-
# PYTHON_VER: "${{ matrix.python-version }}"
126-
# steps:
127-
# - name: "Check out repository code"
128-
# uses: "actions/checkout@v2"
129-
# - name: "Setup environment"
130-
# uses: "networktocode/gh-action-setup-poetry-environment@v2"
131-
# - name: "Get image version"
132-
# run: "echo IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
133-
# - name: "Set up Docker Buildx"
134-
# id: "buildx"
135-
# uses: "docker/setup-buildx-action@v1"
136-
# - name: "Load the image from cache"
137-
# uses: "docker/build-push-action@v2"
138-
# with:
139-
# builder: "${{ steps.buildx.outputs.name }}"
140-
# context: "./"
141-
# push: false
142-
# load: true
143-
# tags: "${{ env.IMAGE_NAME }}:${{ env.IMAGE_VER }}"
144-
# file: "./Dockerfile"
145-
# cache-from: "type=gha,scope=${{ env.IMAGE_NAME }}-${{ env.IMAGE_VER }}-py${{ matrix.python-version }}"
146-
# cache-to: "type=gha,scope=${{ env.IMAGE_NAME }}-${{ env.IMAGE_VER }}-py${{ matrix.python-version }}"
147-
# build-args: |
148-
# PYTHON_VER=${{ env.PYTHON_VER }}
149-
# - name: "Debug: Show docker images"
150-
# run: "docker image ls"
151-
# - name: "Linting: Pylint"
152-
# run: "poetry run invoke pylint"
153-
# needs:
154-
# - "build"
117+
pylint:
118+
runs-on: "ubuntu-20.04"
119+
strategy:
120+
fail-fast: true
121+
matrix:
122+
python-version: ["3.8"]
123+
env:
124+
PYTHON_VER: "${{ matrix.python-version }}"
125+
steps:
126+
- name: "Check out repository code"
127+
uses: "actions/checkout@v2"
128+
- name: "Setup environment"
129+
uses: "networktocode/gh-action-setup-poetry-environment@v2"
130+
- name: "Get image version"
131+
run: "echo IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
132+
- name: "Set up Docker Buildx"
133+
id: "buildx"
134+
uses: "docker/setup-buildx-action@v1"
135+
- name: "Load the image from cache"
136+
uses: "docker/build-push-action@v2"
137+
with:
138+
builder: "${{ steps.buildx.outputs.name }}"
139+
context: "./"
140+
push: false
141+
load: true
142+
tags: "${{ env.IMAGE_NAME }}:${{ env.IMAGE_VER }}"
143+
file: "./Dockerfile"
144+
cache-from: "type=gha,scope=${{ env.IMAGE_NAME }}-${{ env.IMAGE_VER }}-py${{ matrix.python-version }}"
145+
cache-to: "type=gha,scope=${{ env.IMAGE_NAME }}-${{ env.IMAGE_VER }}-py${{ matrix.python-version }}"
146+
build-args: |
147+
PYTHON_VER=${{ env.PYTHON_VER }}
148+
- name: "Debug: Show docker images"
149+
run: "docker image ls"
150+
- name: "Linting: Pylint"
151+
run: "poetry run invoke pylint"
152+
needs:
153+
- "build"
155154
pytest:
156155
strategy:
157156
fail-fast: true
158157
matrix:
159-
python-version: ["3.8", "3.9", "3.10", "3.11"]
158+
python-version: ["3.8", "3.11"]
160159
runs-on: "ubuntu-20.04"
161160
env:
162161
PYTHON_VER: "${{ matrix.python-version }}"
@@ -188,8 +187,7 @@ jobs:
188187
- name: "Run Tests"
189188
run: "poetry run invoke pytest"
190189
needs:
191-
# Remove everything but pylint once pylint is passing.
192-
# - "pylint"
190+
- "pylint"
193191
- "bandit"
194192
- "pydocstyle"
195193
- "flake8"
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# v2.0 Release Notes
2+
3+
## [2.0.0] 12-2023
4+
### Added
5+
- [308](https://github.com/networktocode/pyntc/pull/308) nxos `refresh()` method to refresh device facts.
6+
- [289](https://github.com/networktocode/pyntc/pull/289) additional cisco_ios boot options search.
7+
8+
### Changed
9+
- [308](https://github.com/networktocode/pyntc/pull/308) Updated nxos install_os and logic when waiting for device reload and improved log messages.
10+
11+
### Deprecated
12+
- [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.
13+
14+
Refer to this blog post for more info about changes in netmiko 4.0: https://pynet.twb-tech.com/blog/netmiko-read-timeout.html

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ nav:
113113
- v0.19: "admin/release_notes/version_0_19.md"
114114
- v0.20: "admin/release_notes/version_0_20.md"
115115
- v1.0: "admin/release_notes/version_1_0.md"
116+
- v2.0: "admin/release_notes/version_2_0.md"
116117
- Developer Guide:
117118
- Extending the Library: "dev/extending.md"
118119
- Contributing to the Library: "dev/contributing.md"

0 commit comments

Comments
 (0)