16 Jul 2020 11:27 AM - last edited on 18 May 2023 02:55 PM by Michal_Gebacki
Hi all,
I would like to add more custom properties to a device using a python custom plugin:
I used the following command in order to add Current SQL value (curr_sql):
topology_device.report_custom_annotation_event(description="Annotation event",annotation_type="demo",source="demo source",properties[]={"Current SQL": curr_sql})
I tried several times changing syntax but I wasn't able to add more properties.
Can you suggest me how to do?
Thanks in advance.
Davide
Solved! Go to Solution.
16 Jul 2020 11:35 AM
That is for adding an event rather than a property. This sends an annotation event onto an entity but it does not add any property.
16 Jul 2020 11:39 AM
Hi Wolfgang,
please take a look at the picture.
I would like to add more custom information in this annotation, but I was able to add only one (using the command that I wrote before)
Can you help me to understand how to add more details?
16 Jul 2020 01:31 PM
In your example, add more key value pairs into the last dict: {"Current SQL": curr_sql, "Second property": "hello"}
16 Jul 2020 03:00 PM
Hi Davide,
The properties argument is a dictionary of key, value pairs, you can do something like this:
topology_device.report_custom_annotation_event(description="Annotation event",annotation_type="demo",source="demo source",properties={"Key1": "Value1", "Key2": "Value2"})
I hope this helps
Peter