# HG changeset patch # User Goffi # Date 1722216653 -7200 # Node ID ff88a807852d559be37bc5e01da81e9430b82539 # Parent 96fdf4891747518c2d02cb48af38bf837e63172d plugin identity: disco identity is now added in identity metadata: rel 447 diff -r 96fdf4891747 -r ff88a807852d libervia/backend/plugins/plugin_misc_identity.py --- a/libervia/backend/plugins/plugin_misc_identity.py Mon Jul 29 03:29:14 2024 +0200 +++ b/libervia/backend/plugins/plugin_misc_identity.py Mon Jul 29 03:30:53 2024 +0200 @@ -733,7 +733,8 @@ should be True most of time, to avoid useless network requests @return: identity data """ - id_data = {} + identities = [] + id_data = {"identities": identities} if not metadata_filter: metadata_names = self.metadata.keys() @@ -745,6 +746,15 @@ client, metadata_name, entity, use_cache ) + if entity is not None: + try: + disco_infos = await self.host.memory.disco.get_infos(client, entity) + except Exception as e: + log.exception(f"Can't get disco infos for {entity}.") + else: + for (category, type_), name in disco_infos.identities.items(): + identities.append({"category": category, "type": type_, "name": name}) + return id_data def _get_identities(self, entities_s, metadata_filter, profile):