From cd6947372ca74192f93eced0ce301cc6b5ab25e5 Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Sat, 29 May 2021 15:42:36 -0700 Subject: [PATCH] Replace swsssdk.ConfigDBConnector and SonicDBConfig with swsscommon implementation (#1620) swsssdk will be deprecated. Use swsscommon instead. --- scripts/ipintutil | 6 +++--- show/interfaces/__init__.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/ipintutil b/scripts/ipintutil index 1762ddbac188..872cfb35ef1c 100755 --- a/scripts/ipintutil +++ b/scripts/ipintutil @@ -10,7 +10,7 @@ from natsort import natsorted from tabulate import tabulate from sonic_py_common import multi_asic -from swsssdk import ConfigDBConnector, SonicDBConfig +from swsscommon import swsscommon from utilities_common import constants from utilities_common import multi_asic as multi_asic_util @@ -41,7 +41,7 @@ def get_bgp_peer(): } """ bgp_peer = {} - config_db = ConfigDBConnector() + config_db = swsscommon.ConfigDBConnector() config_db.connect() data = config_db.get_table('BGP_NEIGHBOR') @@ -262,7 +262,7 @@ def main(): else: sys.exit("Invalid argument -a {}".format(args.address_family)) - SonicDBConfig.load_sonic_global_db_config() + swsscommon.SonicDBConfig.load_sonic_global_db_config() ip_intfs = get_ip_intfs(af, namespace, display) display_ip_intfs(ip_intfs) diff --git a/show/interfaces/__init__.py b/show/interfaces/__init__.py index 7d95100ecb17..51c2126a89c1 100644 --- a/show/interfaces/__init__.py +++ b/show/interfaces/__init__.py @@ -8,7 +8,7 @@ from tabulate import tabulate from sonic_py_common import multi_asic from sonic_py_common import device_info -from swsssdk import ConfigDBConnector +from swsscommon.swsscommon import ConfigDBConnector from portconfig import get_child_ports from . import portchannel