How can I print only diff object and not the whole multiresult

My task is actually generating the whole baseline config of multiple switches in my network and comparing to current running config.

I want to display only the config diffs for each host without the generated configs themselves (which are full configs of live network -> huge outputs).
I’m interested only what print_result(result) outputs for each host at the end - without the clutter of whole switches configs in between.
---- Loading Configuration on the device ** changed : True --------------------- INFO
@@ -42,7 +42,7 @@
!
vlan 60

  • name dcs24_wan
  • name dummychange_dcs24_wan
    !
    vlan 210

I tried to use .diff method but was getting empty string OR syntax error. Also standard example from docs used in analogy to my task - print(result[“spine00.cmh”][2].diff) - gave me empty string…

Have you tried:

result[“spine00.cmh”][0]

Can’t really do much else without seeing your code.

Hi I have it as following (example for all live network switches in my network):

nr = InitNornir(config_file=“config.yaml”, dry_run=True)
hostsset = nr.filter(status=“live”)
result = hostsset.run(task=baseline_configuration)
print_result(result)

For each switch this standard print_result prints first the whole config + at the bottom the config diffs.
Now I want only the diffs for each switch OR info that config is not changed.
And I do not want to access the result by referring to switch hostname (as this breaks the automation since I want to check all switches only for config diffs)