Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade pyroute2 and improve cli response time #57

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading