Comment 24 for bug 1475091

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

commit 59b09b50ff15df9975832dbfba42e0c984591e48
Author: Kent Wang <email address hidden>
Date: Fri Oct 23 05:58:13 2015 -0700

    Add Trusts unique constraint to remove duplicates

    For now, effectively there could be multiple trusts with the same
    project, trustor, trustee, expiry date, impersonation. The same
    combination can have multiple trusts assigned with different roles
    or not.

    Patch fixes this issue by adding unique constraint to the trusts
    database model. If two requests create trusts with the same
    trustor, trustee, project, expiry, impersonation, then the second
    request would bring up an exception saying there's a conflict.

    This can help to improve specific trusts identification and
    improve user experience.

    Change-Id: I1a681b13cfbef40bf6c21271fb80966517fb1ec5
    Closes-Bug: #1475091