netfishers-onl / Netshot

Network Configuration and Compliance Management
http://www.netfishers.onl/netshot
249 stars 60 forks source link

Only one hardware rule active #263

Closed Rikharms1972 closed 1 year ago

Rikharms1972 commented 1 year ago

Hello,

I have created two hardware rules for different types of hardware in the same device, but only one shows up at the compliance tab.

What I setup:

{"id":70,"family":"ASR-9904","familyRegExp":false,"group":"-1","partNumber":"A99-8X100GE-CM","partNumberRegExp":false,"endOfLife":"2020-06-30T22:00:00.000Z","driver":"CiscoIOSXR","endOfSale":"2019-07-03T22:00:00.000Z"}

and

{"id":69,"family":"ASR-9904","familyRegExp":false,"group":"-1","partNumber":"A9K-RSP880-SE","partNumberRegExp":false,"endOfLife":"2022-07-13T22:00:00.000Z","driver":"CiscoIOSXR","endOfSale":"2021-07-04T22:00:00.000Z"}

The result I get back when requesting the device:

"driver": "CiscoIOSXR", "eolDate": 1593554400000, "eolModule": { "id": 51367218, "slot": "0/0", "partNumber": "A99-8X100GE-CM", "serialNumber": "FOC2424N8CB", "firstSeenDate": null, "lastSeenDate": 1689300932351, "removed": false }, "eosDate": 1562191200000, "eosModule": { "id": 51367218, "slot": "0/0", "partNumber": "A99-8X100GE-CM", "serialNumber": "FOC2424N8CB", "firstSeenDate": null, "lastSeenDate": 1689300932351, "removed": false },

As you see only one shows up.

With the other active:

"driver": "CiscoIOSXR", "eolDate": 1657749600000, "eolModule": { "id": 51367217, "slot": "0/RSP1", "partNumber": "A9K-RSP880-SE", "serialNumber": "FOC2438NHL2", "firstSeenDate": null, "lastSeenDate": 1689300932351, "removed": false }, "eosDate": 1625436000000, "eosModule": { "id": 51367217, "slot": "0/RSP1", "partNumber": "A9K-RSP880-SE", "serialNumber": "FOC2438NHL2", "firstSeenDate": null, "lastSeenDate": 1689300932351, "removed": false },

Is it possible to show all end of life/sale modules in the device compliance view?

Thanks, Rik

SCadilhac commented 1 year ago

Hello,

The EoX date of a device is the sooner EoX date of all contained hardware modules.