diff --git a/config/nat.py b/config/nat.py index 1c30aa80d41a..762252eea8df 100644 --- a/config/nat.py +++ b/config/nat.py @@ -283,7 +283,7 @@ def add_basic(ctx, global_ip, local_ip, nat_type, twice_nat_id): ctx.fail("Given entry is overlapping with existing Dynamic entry !!") if entryFound is False: - counters_db = SonicV2Connector(host="127.0.0.1") + counters_db = SonicV2Connector() counters_db.connect(counters_db.COUNTERS_DB) snat_entries = 0 max_entries = 0 @@ -363,7 +363,7 @@ def add_tcp(ctx, global_ip, global_port, local_ip, local_port, nat_type, twice_n ctx.fail("Given entry is overlapping with existing NAT entry !!") if entryFound is False: - counters_db = SonicV2Connector(host="127.0.0.1") + counters_db = SonicV2Connector() counters_db.connect(counters_db.COUNTERS_DB) snat_entries = 0 max_entries = 0 @@ -443,7 +443,7 @@ def add_udp(ctx, global_ip, global_port, local_ip, local_port, nat_type, twice_n ctx.fail("Given entry is overlapping with existing NAT entry !!") if entryFound is False: - counters_db = SonicV2Connector(host="127.0.0.1") + counters_db = SonicV2Connector() counters_db.connect(counters_db.COUNTERS_DB) snat_entries = 0 max_entries = 0 diff --git a/scripts/natclear b/scripts/natclear index 76cd394f505c..be4b2060e3c5 100644 --- a/scripts/natclear +++ b/scripts/natclear @@ -22,7 +22,7 @@ class NatClear(object): def __init__(self): super(NatClear,self).__init__() - self.db = SonicV2Connector(host="127.0.0.1") + self.db = SonicV2Connector() self.db.connect(self.db.APPL_DB) return diff --git a/scripts/natshow b/scripts/natshow index d0dc753702e1..3d810d6aae0f 100644 --- a/scripts/natshow +++ b/scripts/natshow @@ -69,9 +69,9 @@ class NatShow(object): def __init__(self): super(NatShow,self).__init__() - self.asic_db = SonicV2Connector(host="127.0.0.1") - self.appl_db = SonicV2Connector(host="127.0.0.1") - self.counters_db = SonicV2Connector(host="127.0.0.1") + self.asic_db = SonicV2Connector() + self.appl_db = SonicV2Connector() + self.counters_db = SonicV2Connector() return def fetch_count(self):