File tree Expand file tree Collapse file tree 8 files changed +58
-11
lines changed
Expand file tree Collapse file tree 8 files changed +58
-11
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ urllib3==2.3.0 # https://github.com/readthedocs/readthedocs.org/issues/10290
22sphinx == 7.3.7
33sphinx-rtd-theme == 2.0.0
44invoke == 2.2.0
5- jinja2 == 3.1.4
5+ jinja2 == 3.1.6
66MarkupSafe == 3.0.2
7- pytest == 8.3.4
7+ pytest == 8.3.5
88ansible == 11.3.0
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -2,16 +2,15 @@ black==24.4.2
22coveralls == 4.0.1
33ddt == 1.7.2
44flake8-import-order == 0.18.2
5- pytest == 8.3.4
5+ pytest == 8.3.5
66pytest-cov == 5.0.0
77pytest-json-report == 1.5.0
88pyflakes == 3.2.0
99pylama == 8.4.1
10- mock == 5.1.0
1110mypy == 1.11.1
12- types-PyYAML == 6.0.12.20240808
11+ types-PyYAML == 6.0.12.20241230
1312types-requests == 2.32.0.20241016
14- types-six == 1.16.21.20240513
13+ types-six == 1.17.0.20241205
1514types-setuptools == 69.5.0.20240522
1615ttp == 0.9.5
17- ttp_templates == 0.3.6
16+ ttp_templates == 0.3.7
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1- import mock
1+ from unittest import mock
22import pytest
33from textwrap import dedent
44
Original file line number Diff line number Diff line change 11"""Tests for getters."""
22
3+ from unittest .mock import patch
4+
35from napalm .base .test .getters import BaseTestGetters , wrap_test_cases
46from napalm .base .test import helpers
57from napalm .base import models
68
79import pytest
8- from mock import patch
910
1011
1112def mock_time ():
Original file line number Diff line number Diff line change 11"""Tests for getters."""
22
3+ from unittest .mock import patch
4+
35from napalm .base .test .getters import BaseTestGetters , wrap_test_cases
46from napalm .base .test import helpers
57from napalm .base import models
68
79import pytest
8- from mock import patch
910
1011
1112def mock_time ():
You can’t perform that action at this time.
0 commit comments