Skip to content

Commit d48074b

Browse files
committed
Upgrade pyroute2 and improve cli response time
1 parent c4ce5ae commit d48074b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
'pexpect>=4.8.0',
250250
'semantic-version>=2.8.5',
251251
'prettyprinter>=0.18.0',
252-
'pyroute2>=0.5.14, <0.6.1',
252+
'pyroute2==0.7.12',
253253
'requests>=2.25.0, <=2.31.0',
254254
'tabulate==0.9.0',
255255
'toposort==1.6',

utilities_common/multi_asic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import click
55
import netifaces
6-
import pyroute2
76
from natsort import natsorted
87
from sonic_py_common import multi_asic, device_info
98
from utilities_common import constants
@@ -170,6 +169,7 @@ def multi_asic_args(parser=None):
170169
return parser
171170

172171
def multi_asic_get_ip_intf_from_ns(namespace):
172+
import pyroute2
173173
if namespace != constants.DEFAULT_NAMESPACE:
174174
pyroute2.netns.pushns(namespace)
175175
interfaces = natsorted(netifaces.interfaces())
@@ -181,6 +181,7 @@ def multi_asic_get_ip_intf_from_ns(namespace):
181181

182182

183183
def multi_asic_get_ip_intf_addr_from_ns(namespace, iface):
184+
import pyroute2
184185
if namespace != constants.DEFAULT_NAMESPACE:
185186
pyroute2.netns.pushns(namespace)
186187
ipaddresses = netifaces.ifaddresses(iface)

0 commit comments

Comments
 (0)