plugin identity: disco identity is now added in identity metadata:
rel 447
This commit is contained in:
parent
90e81c9fc6
commit
6a4133b32c
1 changed files with 11 additions and 1 deletions
|
|
@ -733,7 +733,8 @@ class Identity:
|
|||
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 @@ class Identity:
|
|||
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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue