That transform is doing his work, i'm not getting events from that device class for 'interface errors' alerts:
if "/Network/remote_sites" in getattr(evt, 'DeviceClass', ''):
evt._action = "drop"
Maybe i wasnt explaining myself very clear (i'm translating from spanish).
I have made about 5 different device classes so i can bind templates depending on the devices requirements.
e.g:
/Network/Remote_sites
/Network/Branchs
/Network/Headquarters
Remote sites are around 800 devices that i dont want 'interface error' alerts from, but i do want 'interface errors' alerts from /Network/Headquartes.
I'm also doing the same for rta alerts. i only get them for /Network/Branch.
I dont think i can do that with locations or can i ?