Skip to content

Commit

Permalink
Merge pull request #305 from networktocode/release-1.0.2
Browse files Browse the repository at this point in the history
Release 1.0.2
  • Loading branch information
jeffkala authored Dec 1, 2023
2 parents 5f263ad + 589caf7 commit 451c3eb
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 24 deletions.
5 changes: 5 additions & 0 deletions docs/admin/release_notes/version_1_0.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# v1.0 Release Notes

## [1.0.2] 12-2023

### Fixed
- [304](https://github.com/networktocode/pyntc/pull/304) Fixed `delay_factor_compat` for netmiko.

## [1.0.1] 11-2023

### Fixed
Expand Down
41 changes: 18 additions & 23 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyntc/devices/aireos_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def __init__( # nosec # pylint: disable=too-many-arguments
self.native = None
self.secret = secret
self.port = int(port) if port else 22
self.delay_factor_compat = kwargs.get("delay_factor_compat", True)
self.global_delay_factor = kwargs.get("global_delay_factor", 1)
self.delay_factor = kwargs.get("delay_factor", 1)
self._connected = False
Expand Down Expand Up @@ -1096,6 +1097,7 @@ def open(self, confirm_active=True):
username=self.username,
password=self.password,
port=self.port,
delay_factor_compat=self.delay_factor_compat,
global_delay_factor=self.global_delay_factor,
secret=self.secret,
verbose=False,
Expand Down
2 changes: 2 additions & 0 deletions pyntc/devices/asa_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def __init__(self, host: str, username: str, password: str, secret="", port=None
self.secret = secret
self.port = int(port) if port else 22
self.kwargs = kwargs
self.delay_factor_compat = kwargs.get("delay_factor_compat", True)
self.global_delay_factor: int = kwargs.get("global_delay_factor", 1)
self.delay_factor: int = kwargs.get("delay_factor", 1)
self._connected = False
Expand Down Expand Up @@ -727,6 +728,7 @@ def open(self):
username=self.username,
password=self.password,
port=self.port,
delay_factor_compat=self.delay_factor_compat,
global_delay_factor=self.global_delay_factor,
secret=self.secret,
verbose=False,
Expand Down
2 changes: 2 additions & 0 deletions pyntc/devices/ios_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__( # nosec
self.native = None
self.secret = secret
self.port = int(port) if port else 22
self.delay_factor_compat = kwargs.get("delay_factor_compat", True)
self.global_delay_factor = kwargs.get("global_delay_factor", 1)
self.delay_factor = kwargs.get("delay_factor", 1)
self._fast_cli = fast_cli
Expand Down Expand Up @@ -826,6 +827,7 @@ def open(self, confirm_active=True):
username=self.username,
password=self.password,
port=self.port,
delay_factor_compat=self.delay_factor_compat,
global_delay_factor=self.global_delay_factor,
secret=self.secret,
verbose=False,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyntc"
version = "1.0.1"
version = "1.0.2"
description = "SDK to simplify common workflows for Network Devices."
authors = ["Network to Code, LLC <[email protected]>"]
readme = "README.md"
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/test_devices/test_aireos_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -1681,3 +1681,7 @@ def test_port(aireos_device):
def test_port_none(patch):
device = AIREOSDevice("host", "user", "pass", port=None)
assert device.port == 22


def test_delay_factor_compat(aireos_device):
assert aireos_device.delay_factor_compat is True
3 changes: 3 additions & 0 deletions tests/unit/test_devices/test_asa_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def teardown(self):
def test_port(self):
assert self.device.port == 22

def test_delay_factor_compat(self):
assert self.device.delay_factor_compat is True

@mock.patch.object(ASADevice, "_get_file_system", return_value="disk0:")
def test_boot_options_dir(self, mock_boot):
self.device.native.send_command_timing.side_effect = None
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/test_devices/test_ios_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def tearDown(self):
def test_port(self):
self.assertEqual(self.device.port, 22)

def test_delay_factor_compat(self):
self.assertEqual(self.device.delay_factor_compat, True)

def test_bad_show(self):
command = "show microsoft"
self.device.native.send_command.return_value = "Error: Microsoft"
Expand Down

0 comments on commit 451c3eb

Please sign in to comment.