Skip to content

Commit

Permalink
Merge pull request #1178 from Bastian-Krause/bst/monitor-resource-ide…
Browse files Browse the repository at this point in the history
…ntifier

remote/client: print full resource identifier on monitor
  • Loading branch information
Emantor committed May 12, 2023
2 parents f6d02f2 + f9d4ccd commit acecf4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions labgrid/remote/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ async def on_resource_changed(self, exporter, group_name, resource_name, resourc
group[resource_name].data = resource
if self.monitor:
if resource and not old:
print(f"Resource {exporter}/{group_name}/{resource_name} created: {resource}")
print(f"Resource {exporter}/{group_name}/{resource['cls']}/{resource_name} created: {resource}")
elif resource and old:
print(f"Resource {exporter}/{group_name}/{resource_name} changed:")
print(f"Resource {exporter}/{group_name}/{resource['cls']}/{resource_name} changed:")
for k, v_old, v_new in diff_dict(flat_dict(old), flat_dict(resource)):
print(f" {k}: {v_old} -> {v_new}")
else:
print(f"Resource {exporter}/{group_name}/{resource_name} deleted")
print(f"Resource {exporter}/{group_name}/{resource['cls']}/{resource_name} deleted")

async def on_place_changed(self, name, config):
if not config:
Expand Down

0 comments on commit acecf4c

Please sign in to comment.