[Kimchi-devel] [PATCH V2] Issue #737: Fix to remove twice calls of resource lookup on GET OPERATION
archus at linux.vnet.ibm.com
archus at linux.vnet.ibm.com
Tue Nov 3 18:54:32 UTC 2015
From: Archana Singh <archus at linux.vnet.ibm.com>
Incase of GET lookup was called twice.
Once lookup() before is_authorized() and then in self.get().
This added overhead to system when lookup() is called
for each value in list from get_list() of Collection.
So to avoid this overhead, lookup() should not be called
before self.get().
1) Added lookup() call from Resource's update(), delete().
2) Removed lookup() call from Resource's index().
2) As is_authorized() calls self.data which calls self.info.
Added check to make sure that self.data only get called
if self.info is not None. And intialized self.info as None
in __init__. As its value is getting assigned in lookup().
3) In _generate_action_handler_base(), lookup() was getting
called before is_authorized(), move its call after is_authorized().
Archana Singh (1):
Issue #737: Fix to remove twice calls of resource lookup on GET
OPERATION
src/wok/control/base.py | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
--
2.1.4
More information about the Kimchi-devel
mailing list