The changes for the portable-identifiers blueprint have broken the endpoint calls endpoint_get_by_tenant_get_page, endpoint_get_by_tenant_get_page_markers, endpoint_add, endpoint_get, and endpoint_get_by_tenant.
All of these calls need to translate from uid to id or the reverse, and they are attempting to do so, but the condition under which they do the translation is wrong. All other calls are using hasattr(api.TENANT, 'uid_to_id') or similar, but the ones in endpoint_template.py are using isinstance(api.TENANT, models.Tenant). This latter test fails, the IDs aren't translated, and so the database inserts / lookups are all using a uid where they should be using an integer ID and vice versa.
Fix proposed to branch: master /review. openstack. org/2645
Review: https:/