2015-05-11 15:51:06 |
Dolph Mathews |
description |
The second paragraph of the keystone-wide API conventions asserts that "each resource contains a canonically unique identifier (ID) defined by the Identity service implementation and is provided as the id attribute":
https://github.com/openstack/keystone-specs/blob/master/api/v3/identity-api-v3.rst#api-conventions
Following in that spirit, the federation API specification asserts that every instance of a protocol reference should have an 'id' attribute which appears in the URL references as a 'protocol_id':
https://github.com/openstack/keystone-specs/blob/master/api/v3/identity-api-v3-os-federation-ext.rst#list-all-protocol-and-attribute-mappings-of-an-identity-provider
But the client unit tests create protocol references with a 'protocol_id' attribute instead of an 'id' attribute:
https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/tests/unit/v3/test_federation.py#L144-L148
Fortunately, the server-side implementation appears to persist protocols correctly:
https://github.com/openstack/keystone/blob/master/keystone/contrib/federation/backends/sql.py#L224-L232
So, 'protocol_id' here should just be 'id', and all the dependent tests need to be revised:
https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/tests/unit/v3/test_federation.py#L147
Confirmed by Steve Martinelli. |
The second paragraph of the keystone-wide API conventions asserts that "each resource contains a canonically unique identifier (ID) defined by the Identity service implementation and is provided as the id attribute":
https://github.com/openstack/keystone-specs/blob/master/api/v3/identity-api-v3.rst#api-conventions
Following in that spirit, the federation API specification asserts that every instance of a protocol reference should have an 'id' attribute which appears in the URL references as a 'protocol_id':
https://github.com/openstack/keystone-specs/blob/master/api/v3/identity-api-v3-os-federation-ext.rst#list-all-protocol-and-attribute-mappings-of-an-identity-provider
But the client unit tests create protocol references with a 'protocol_id' attribute instead of an 'id' attribute:
https://github.com/openstack/python-keystoneclient/blob/91de8422de03e3ef3682f45aebf3ffce90732c5d/keystoneclient/tests/unit/v3/test_federation.py#L144-L148
Fortunately, the server-side implementation appears to persist protocols correctly:
https://github.com/openstack/keystone/blob/master/keystone/contrib/federation/backends/sql.py#L224-L232
So, 'protocol_id' here should just be 'id', and all the dependent tests need to be revised:
https://github.com/openstack/python-keystoneclient/blob/91de8422de03e3ef3682f45aebf3ffce90732c5d/keystoneclient/tests/unit/v3/test_federation.py#L147
Confirmed by Steve Martinelli. |
|