Introduce a private variable inside Enforcer class to remember
status of the last policy syntax checks in order to avoid
redundant calls to the check_rules() method.
Having this flag makes the whole rules mechanism faster, as under
certain conditions check_rules() method was being executed
multiple times even when not needed.
Change-Id: Id3992fc0cb567451049a12ebdc6851e737573bb8
Closes-bug: #1723030
Co-Authored-By: Ben Nemec <email address hidden>
(cherry picked from commit 909a1ea3a7aceb6e0637058b9c6a53d14043d6d1)
Reviewed: https:/ /review. openstack. org/583968 /git.openstack. org/cgit/ openstack/ oslo.policy/ commit/ ?id=77d30c3b5e0 6a4cc90195ca6f3 52b26c4bf2d2d8
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 77d30c3b5e06a4c c90195ca6f352b2 6c4bf2d2d8
Author: Mateusz Kowalski <email address hidden>
Date: Tue Oct 24 09:32:45 2017 +0200
Avoid redundant policy syntax checks
Introduce a private variable inside Enforcer class to remember
status of the last policy syntax checks in order to avoid
redundant calls to the check_rules() method.
Having this flag makes the whole rules mechanism faster, as under
certain conditions check_rules() method was being executed
multiple times even when not needed.
Change-Id: Id3992fc0cb5674 51049a12ebdc685 1e737573bb8 e0637058b9c6a53 d14043d6d1)
Closes-bug: #1723030
Co-Authored-By: Ben Nemec <email address hidden>
(cherry picked from commit 909a1ea3a7aceb6