Skip to content

Commit

Permalink
Upgrade pyroute2 and improve cli response time
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekrnv committed Aug 30, 2024
1 parent c4ce5ae commit d48074b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
'pexpect>=4.8.0',
'semantic-version>=2.8.5',
'prettyprinter>=0.18.0',
'pyroute2>=0.5.14, <0.6.1',
'pyroute2==0.7.12',
'requests>=2.25.0, <=2.31.0',
'tabulate==0.9.0',
'toposort==1.6',
Expand Down
3 changes: 2 additions & 1 deletion utilities_common/multi_asic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import click
import netifaces
import pyroute2
from natsort import natsorted
from sonic_py_common import multi_asic, device_info
from utilities_common import constants
Expand Down Expand Up @@ -170,6 +169,7 @@ def multi_asic_args(parser=None):
return parser

def multi_asic_get_ip_intf_from_ns(namespace):
import pyroute2
if namespace != constants.DEFAULT_NAMESPACE:
pyroute2.netns.pushns(namespace)
interfaces = natsorted(netifaces.interfaces())
Expand All @@ -181,6 +181,7 @@ def multi_asic_get_ip_intf_from_ns(namespace):


def multi_asic_get_ip_intf_addr_from_ns(namespace, iface):
import pyroute2
if namespace != constants.DEFAULT_NAMESPACE:
pyroute2.netns.pushns(namespace)
ipaddresses = netifaces.ifaddresses(iface)
Expand Down

0 comments on commit d48074b

Please sign in to comment.