Skip to content

Commit

Permalink
[acl_loader]: Fix show mirror_session error (#580)
Browse files Browse the repository at this point in the history
Signed-off-by: Jared.Liu <Jared.Liu@nephosinc.com>
  • Loading branch information
JaredLius authored and stcheng committed Jul 16, 2019
1 parent 2764c6c commit c718cab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions acl_loader/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ class AclLoader(object):
ACL_RULE = "ACL_RULE"
ACL_TABLE_TYPE_MIRROR = "MIRROR"
ACL_TABLE_TYPE_CTRLPLANE = "CTRLPLANE"
MIRROR_SESSION = "MIRROR_SESSION"
CFG_MIRROR_SESSION_TABLE = "MIRROR_SESSION"
STATE_MIRROR_SESSION_TABLE = "MIRROR_SESSION_TABLE"
POLICER = "POLICER"
SESSION_PREFIX = "everflow"

Expand Down Expand Up @@ -130,9 +131,9 @@ def read_sessions_info(self):
Read MIRROR_SESSION table from configuration database
:return:
"""
self.sessions_db_info = self.configdb.get_table(self.MIRROR_SESSION)
self.sessions_db_info = self.configdb.get_table(self.CFG_MIRROR_SESSION_TABLE)
for key in self.sessions_db_info.keys():
state_db_info = self.statedb.get_all(self.statedb.STATE_DB, "{}|{}".format(self.MIRROR_SESSION, key))
state_db_info = self.statedb.get_all(self.statedb.STATE_DB, "{}|{}".format(self.STATE_MIRROR_SESSION_TABLE, key))
if state_db_info:
status = state_db_info.get("status", "inactive")
else:
Expand Down

0 comments on commit c718cab

Please sign in to comment.