Fix endpoint_checksums

KeystoneRequires.ep_changed() now returns a dictionary rather than
json. As a result KeystoneRequires.endpoint_checksums now throws an
exception when it tries to decode the return from ep_changed.

Change-Id: I440104679c900ce8b67ff1fca1d0ce003e5f0ef4
This commit is contained in:
Liam Young 2022-09-19 11:25:25 +00:00
parent 1a5142bac6
commit 36ea7b385a
2 changed files with 2 additions and 2 deletions

View File

@ -272,5 +272,5 @@ class KeystoneRequires(reactive.Endpoint, metaclass=KeystoneAutoAccessors):
:rtype: dict
"""
if self.ep_changed():
return json.loads(self.ep_changed())
return self.ep_changed()
return {}

View File

@ -295,7 +295,7 @@ class TestKeystoneRequires(test_utils.PatchHelper):
def test_endpoint_checksums(self):
self.patch_target('ep_changed')
self.target.ep_changed.return_value = (
'{"nova": "abxcxv", "neutron": "124252"}'
{"nova": "abxcxv", "neutron": "124252"}
)
result = {
'nova': 'abxcxv',