def _get_if_entry_state_db(self, sub_id): """ :param oid: The 1-based sub-identifier query. :return: the DB entry for the respective sub_id. """ oid = self.get_oid(sub_id) if not oid: return if_table = "" db = mibs.STATE_DB if oid in self.mgmt_oid_name_map: mgmt_if_name = self.mgmt_oid_name_map[oid] if_table = mibs.mgmt_if_entry_table_state_db(mgmt_if_name) else: return None return Namespace.dbs_get_all(self.db_conn, db, if_table, blocking=False)
def _get_if_entry_state_db(self, sub_id): """ :param oid: The 1-based sub-identifier query. :return: the DB entry for the respective sub_id. """ oid = self.get_oid(sub_id) if not oid: return if_table = "" db = mibs.STATE_DB if oid in self.mgmt_oid_name_map: mgmt_if_name = self.mgmt_oid_name_map[oid] if_table = mibs.mgmt_if_entry_table_state_db(mgmt_if_name) else: return None return self.db_conn.get_all(db, if_table, blocking=True)