Skip to content

Commit 34274d1

Browse files
authored
Merge branch 'develop' into patch-1
2 parents 54cab7a + 636344a commit 34274d1

File tree

8 files changed

+58
-11
lines changed

8 files changed

+58
-11
lines changed

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ urllib3==2.3.0 # https://github.com/readthedocs/readthedocs.org/issues/10290
22
sphinx==7.3.7
33
sphinx-rtd-theme==2.0.0
44
invoke==2.2.0
5-
jinja2==3.1.4
5+
jinja2==3.1.6
66
MarkupSafe==3.0.2
7-
pytest==8.3.4
7+
pytest==8.3.5
88
ansible==11.3.0

napalm/eos/eos.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ def confirm_commit(self):
530530
"configure session {} commit".format(self.config_session),
531531
"write memory",
532532
]
533-
self._run_commands(commands)
533+
self._run_commands(commands, encoding="text")
534534
self.config_session = None
535535
else:
536536
raise CommitError("No pending commit-confirm found!")
@@ -1224,6 +1224,8 @@ def get_ntp_servers(self):
12241224
"key_id": -1,
12251225
}
12261226
tokens = server.split()
1227+
if tokens[0] != "ntp":
1228+
continue
12271229
if tokens[2] == "vrf":
12281230
details["network_instance"] = tokens[3]
12291231
server_ip = details["address"] = tokens[4]
@@ -1270,6 +1272,8 @@ def get_ntp_servers(self):
12701272
elif tokens[idx] == "prefer":
12711273
details["prefer"] = True
12721274
idx += 1
1275+
else: # Shouldn't happen
1276+
idx += 1
12731277

12741278
result[server_ip] = details
12751279

requirements-dev.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ black==24.4.2
22
coveralls==4.0.1
33
ddt==1.7.2
44
flake8-import-order==0.18.2
5-
pytest==8.3.4
5+
pytest==8.3.5
66
pytest-cov==5.0.0
77
pytest-json-report==1.5.0
88
pyflakes==3.2.0
99
pylama==8.4.1
10-
mock==5.1.0
1110
mypy==1.11.1
12-
types-PyYAML==6.0.12.20240808
11+
types-PyYAML==6.0.12.20241230
1312
types-requests==2.32.0.20241016
14-
types-six==1.16.21.20240513
13+
types-six==1.17.0.20241205
1514
types-setuptools==69.5.0.20240522
1615
ttp==0.9.5
17-
ttp_templates==0.3.6
16+
ttp_templates==0.3.7
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"1.2.3.4": {
3+
"port": 123,
4+
"version": 4,
5+
"association_type": "SERVER",
6+
"iburst": false,
7+
"prefer": false,
8+
"network_instance": "default",
9+
"source_address": "",
10+
"key_id": -1,
11+
"address": "1.2.3.4"
12+
},
13+
"5.6.7.8": {
14+
"port": 123,
15+
"version": 4,
16+
"association_type": "SERVER",
17+
"iburst": false,
18+
"prefer": false,
19+
"network_instance": "default",
20+
"source_address": "",
21+
"key_id": -1,
22+
"address": "5.6.7.8"
23+
},
24+
"2001:0db8:0a0b:12f0:0000:0000:0000:0001": {
25+
"port": 123,
26+
"version": 4,
27+
"association_type": "SERVER",
28+
"iburst": false,
29+
"prefer": false,
30+
"network_instance": "default",
31+
"source_address": "",
32+
"key_id": -1,
33+
"address": "2001:0db8:0a0b:12f0:0000:0000:0000:0001"
34+
}
35+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ip access-list test-acl
2+
10 remark ntp
3+
20 permit udp any eq ntp any
4+
30 permit udp any any eq ntp
5+
ntp server 1.2.3.4
6+
ntp server 5.6.7.8
7+
ntp server 2001:0db8:0a0b:12f0:0000:0000:0000:0001

test/eos/test_heredoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import mock
1+
from unittest import mock
22
import pytest
33
from textwrap import dedent
44

test/nxos/test_getters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
"""Tests for getters."""
22

3+
from unittest.mock import patch
4+
35
from napalm.base.test.getters import BaseTestGetters, wrap_test_cases
46
from napalm.base.test import helpers
57
from napalm.base import models
68

79
import pytest
8-
from mock import patch
910

1011

1112
def mock_time():

test/nxos_ssh/test_getters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
"""Tests for getters."""
22

3+
from unittest.mock import patch
4+
35
from napalm.base.test.getters import BaseTestGetters, wrap_test_cases
46
from napalm.base.test import helpers
57
from napalm.base import models
68

79
import pytest
8-
from mock import patch
910

1011

1112
def mock_time():

0 commit comments

Comments
 (0)