Skip to content

Commit c718cab

Browse files
JaredLiusstcheng
authored andcommitted
[acl_loader]: Fix show mirror_session error (#580)
Signed-off-by: Jared.Liu <Jared.Liu@nephosinc.com>
1 parent 2764c6c commit c718cab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

acl_loader/main.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ class AclLoader(object):
4848
ACL_RULE = "ACL_RULE"
4949
ACL_TABLE_TYPE_MIRROR = "MIRROR"
5050
ACL_TABLE_TYPE_CTRLPLANE = "CTRLPLANE"
51-
MIRROR_SESSION = "MIRROR_SESSION"
51+
CFG_MIRROR_SESSION_TABLE = "MIRROR_SESSION"
52+
STATE_MIRROR_SESSION_TABLE = "MIRROR_SESSION_TABLE"
5253
POLICER = "POLICER"
5354
SESSION_PREFIX = "everflow"
5455

@@ -130,9 +131,9 @@ def read_sessions_info(self):
130131
Read MIRROR_SESSION table from configuration database
131132
:return:
132133
"""
133-
self.sessions_db_info = self.configdb.get_table(self.MIRROR_SESSION)
134+
self.sessions_db_info = self.configdb.get_table(self.CFG_MIRROR_SESSION_TABLE)
134135
for key in self.sessions_db_info.keys():
135-
state_db_info = self.statedb.get_all(self.statedb.STATE_DB, "{}|{}".format(self.MIRROR_SESSION, key))
136+
state_db_info = self.statedb.get_all(self.statedb.STATE_DB, "{}|{}".format(self.STATE_MIRROR_SESSION_TABLE, key))
136137
if state_db_info:
137138
status = state_db_info.get("status", "inactive")
138139
else:

0 commit comments

Comments
 (0)