Perfect.
Please let me know when you apply this solution for testing.

Best,

Carles Perarnau i Sabés 

Unitat d'Infraestructures i Seguretat TIC - Servei d'Informàtica
Universitat Pompeu Fabra, Barcelona




Missatge de Morten Brekkevold <morten.brekkevold@sikt.no> del dia dv., 15 de des. 2023 a les 13:32:
On Fri, 15 Dec 2023 09:11:13 +0100 (4 hours, 16 minutes, 14 seconds ago) PERARNAU SABÉS, Carles <carles.perarnau@upf.edu> wrote:

> I tried to remove the constraint into the database definition, but the
> statuscheck was still red.
>
> I resolved this problem by adding the next trigger into the databases. It
> changes del Null values of classification attribute for zero before
> updating or inserting the value into the table poeport :

Wow, that's an interesting and creative workaround :)

It doesn't look like anyone ever bothered to report this in our
bugtracker, as I suggested back in 2019.

I think that maybe the best way to go about this would be to simply
support the case that some devices just don't want to report a power
classification for some of their PoE ports.  Adding a power
classification of 0 = 'unknown' to the `POEPort` model should do the
trick (and updating the ipdevpoll `poe` plugin to use 0 as a default
value if `pethPsePortPowerClassifications` doesn't contain a value).


--
Sincerely,
Morten Brekkevold

Sikt – Norwegian Agency for Shared Services in Education and Research