Make checking of Trust existence more DRY

Bug #1443721 reported by Lin Hua Cheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
Lin Hua Cheng

Bug Description

The code for checking if Trust exists is duplicated all over the controller:

if not trust:
    raise exception.TrustNotFound(trust_id=trust_id)

https://github.com/openstack/keystone/blob/master/keystone/trust/controllers.py#L77-L78

to make it more DRY, remove the check in controller and move it the driver

Tags: performance
summary: - Move duplicated checking if Trust exists to the driver
+ Move duplicated checking of Trust existence from controller to driver
summary: - Move duplicated checking of Trust existence from controller to driver
+ Make checking of Trust existence more DRY
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/173158

Changed in keystone:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/173158
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=deca783d99577283ba30a376a4f165c005d03573
Submitter: Jenkins
Branch: master

commit deca783d99577283ba30a376a4f165c005d03573
Author: lin-hua-cheng <email address hidden>
Date: Mon Apr 13 20:12:56 2015 -0700

    Checking if Trust exists should be DRY

    Instead of duplicating the check for Trust existence in the
    controller, move the check to the driver.

    Change-Id: Id576ebe9922a70047b8276f372854e086295b6c4
    Closes-Bug: #1443721

Changed in keystone:
status: In Progress → Fix Committed
Changed in keystone:
milestone: none → liberty-1
importance: Undecided → Wishlist
Changed in keystone:
status: Fix Committed → Fix Released
Revision history for this message
Dolph Mathews (dolph) wrote :

Given that this has no end user impact (and thus does not belong in release notes), changing from Wishlist to Low.

tags: added: performance
Changed in keystone:
importance: Wishlist → Low
Thierry Carrez (ttx)
Changed in keystone:
milestone: liberty-1 → 8.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.