From fba651262e65267bc592854e0b0590a8571d1a63 Mon Sep 17 00:00:00 2001 From: Vivek Reddy Karri Date: Sat, 17 Jul 2021 00:13:03 +0000 Subject: [PATCH] blocking=True removed Signed-off-by: Vivek Reddy Karri --- src/sonic_ax_impl/mibs/__init__.py | 6 +++--- src/sonic_ax_impl/mibs/ieee802_1ab.py | 2 +- src/sonic_ax_impl/mibs/ietf/rfc1213.py | 6 +++--- src/sonic_ax_impl/mibs/ietf/rfc2863.py | 4 ++-- src/sonic_ax_impl/mibs/ietf/rfc4363.py | 2 +- src/sonic_ax_impl/mibs/vendor/cisco/ciscoPfcExtMIB.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/sonic_ax_impl/mibs/__init__.py b/src/sonic_ax_impl/mibs/__init__.py index f3b0d17fa..23165a8d2 100644 --- a/src/sonic_ax_impl/mibs/__init__.py +++ b/src/sonic_ax_impl/mibs/__init__.py @@ -224,7 +224,7 @@ def init_mgmt_interface_tables(db_conn): if_alias_map = dict() for if_name in oid_name_map.values(): - if_entry = db_conn.get_all(CONFIG_DB, mgmt_if_entry_table(if_name), blocking=True) + if_entry = db_conn.get_all(CONFIG_DB, mgmt_if_entry_table(if_name), blocking=False) if_alias_map[if_name] = if_entry.get('alias', if_name) logger.debug("Management alias map:\n" + pprint.pformat(if_alias_map, indent=2)) @@ -283,7 +283,7 @@ def init_sync_d_interface_tables(db_conn): if_alias_map = dict() for if_name in if_name_map: - if_entry = db_conn.get_all(APPL_DB, if_entry_table(if_name), blocking=True) + if_entry = db_conn.get_all(APPL_DB, if_entry_table(if_name), blocking=False) if_alias_map[if_name] = if_entry.get('alias', if_name) logger.debug("Chassis name map:\n" + pprint.pformat(if_alias_map, indent=2)) @@ -353,7 +353,7 @@ def init_sync_d_queue_tables(db_conn): # { Port name : Queue index (SONiC) -> sai_id } # ex: { "Ethernet0:2" : "1000000000023" } - queue_name_map = db_conn.get_all(COUNTERS_DB, COUNTERS_QUEUE_NAME_MAP, blocking=True) + queue_name_map = db_conn.get_all(COUNTERS_DB, COUNTERS_QUEUE_NAME_MAP, blocking=False) logger.debug("Queue name map:\n" + pprint.pformat(queue_name_map, indent=2)) # Parse the queue_name_map and create the following maps: diff --git a/src/sonic_ax_impl/mibs/ieee802_1ab.py b/src/sonic_ax_impl/mibs/ieee802_1ab.py index 852635236..b55b7a8e4 100644 --- a/src/sonic_ax_impl/mibs/ieee802_1ab.py +++ b/src/sonic_ax_impl/mibs/ieee802_1ab.py @@ -200,7 +200,7 @@ def _get_if_entry(self, if_name): else: return None - return Namespace.dbs_get_all(self.db_conn, db, if_table, blocking=True) + return Namespace.dbs_get_all(self.db_conn, db, if_table, blocking=False) def update_interface_data(self, if_name): """ diff --git a/src/sonic_ax_impl/mibs/ietf/rfc1213.py b/src/sonic_ax_impl/mibs/ietf/rfc1213.py index 0b8b69ff0..6ddfa9cf1 100644 --- a/src/sonic_ax_impl/mibs/ietf/rfc1213.py +++ b/src/sonic_ax_impl/mibs/ietf/rfc1213.py @@ -150,7 +150,7 @@ def update_data(self): ipnstr = routestr[len("ROUTE_TABLE:"):] if ipnstr == "0.0.0.0/0": ipn = ipaddress.ip_network(ipnstr) - ent = Namespace.dbs_get_all(self.db_conn, mibs.APPL_DB, routestr, blocking=True) + ent = Namespace.dbs_get_all(self.db_conn, mibs.APPL_DB, routestr, blocking=False) nexthops = ent["nexthop"] for nh in nexthops.split(','): # TODO: if ipn contains IP range, create more sub_id here @@ -229,7 +229,7 @@ def update_data(self): namespace, sai_id = mibs.split_sai_id_key(sai_id_key) if_idx = mibs.get_index_from_str(self.if_id_map[sai_id_key]) self.if_counters[if_idx] = self.namespace_db_map[namespace].get_all(mibs.COUNTERS_DB, \ - mibs.counter_table(sai_id), blocking=True) + mibs.counter_table(sai_id), blocking=False) self.lag_name_if_name_map, \ self.if_name_lag_name_map, \ @@ -357,7 +357,7 @@ def _get_if_entry(self, sub_id): else: return None - return Namespace.dbs_get_all(self.db_conn, db, if_table, blocking=True) + return Namespace.dbs_get_all(self.db_conn, db, if_table, blocking=False) def _get_if_entry_state_db(self, sub_id): """ diff --git a/src/sonic_ax_impl/mibs/ietf/rfc2863.py b/src/sonic_ax_impl/mibs/ietf/rfc2863.py index 1bfa4a588..7f1c862c2 100644 --- a/src/sonic_ax_impl/mibs/ietf/rfc2863.py +++ b/src/sonic_ax_impl/mibs/ietf/rfc2863.py @@ -102,7 +102,7 @@ def update_data(self): namespace, sai_id = mibs.split_sai_id_key(sai_id_key) if_idx = mibs.get_index_from_str(self.if_id_map[sai_id_key]) self.if_counters[if_idx] = self.namespace_db_map[namespace].get_all(mibs.COUNTERS_DB, \ - mibs.counter_table(sai_id), blocking=True) + mibs.counter_table(sai_id), blocking=False) def get_next(self, sub_id): """ @@ -222,7 +222,7 @@ def _get_if_entry(self, sub_id): else: return None - return Namespace.dbs_get_all(self.db_conn, db, if_table, blocking=True) + return Namespace.dbs_get_all(self.db_conn, db, if_table, blocking=False) def get_high_speed(self, sub_id): """ diff --git a/src/sonic_ax_impl/mibs/ietf/rfc4363.py b/src/sonic_ax_impl/mibs/ietf/rfc4363.py index 8dd5dead2..7b5cea6bd 100644 --- a/src/sonic_ax_impl/mibs/ietf/rfc4363.py +++ b/src/sonic_ax_impl/mibs/ietf/rfc4363.py @@ -79,7 +79,7 @@ def update_data(self): mibs.logger.error("SyncD 'ASIC_DB' includes invalid FDB_ENTRY '{}': {}.".format(fdb_str, e)) continue - ent = Namespace.dbs_get_all(self.db_conn, mibs.ASIC_DB, s, blocking=True) + ent = Namespace.dbs_get_all(self.db_conn, mibs.ASIC_DB, s, blocking=False) # Example output: oid:0x3a000000000608 bridge_port_id = ent["SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID"][6:] if bridge_port_id not in self.if_bpid_map: diff --git a/src/sonic_ax_impl/mibs/vendor/cisco/ciscoPfcExtMIB.py b/src/sonic_ax_impl/mibs/vendor/cisco/ciscoPfcExtMIB.py index 3130de034..6882650df 100644 --- a/src/sonic_ax_impl/mibs/vendor/cisco/ciscoPfcExtMIB.py +++ b/src/sonic_ax_impl/mibs/vendor/cisco/ciscoPfcExtMIB.py @@ -48,7 +48,7 @@ def update_data(self): namespace, sai_id = mibs.split_sai_id_key(sai_id_key) if_idx = mibs.get_index_from_str(self.if_id_map[sai_id_key]) self.if_counters[if_idx] = self.namespace_db_map[namespace].get_all(mibs.COUNTERS_DB, \ - mibs.counter_table(sai_id), blocking=True) + mibs.counter_table(sai_id), blocking=False) self.lag_name_if_name_map, \ self.if_name_lag_name_map, \