'Release keystone resources required for refreshing'

def release_resources(self):

    try:
        if (self.trustee_client is None):
            self._refresh_trustee_client().trusts.delete(self.trust_id)
        else:
            self.trustee_client.trusts.delete(self.trust_id)
    except ka_exceptions.Unauthorized:
        self.trustee_client = self._refresh_trustee_client()
        self.trustee_client.trusts.delete(self.trust_id)
