DCB: List devices that never has done a backup

Description

Listing the devices currently relays on the list of devices for which a backup was created. If a service is bound, but no backup was created yet, the device will not show up in the device list.

The device list should show all devices by finding all bound services.

Acceptance / Success Criteria

  • all devices configured with a DeviceBackup service are displayed in the UI regardless whether a configuration was retrieved or not 

Lucidchart Diagrams

Activity

Show:

Chandra Gorantla April 20, 2022 at 1:25 AM

PR for populating devices in DeviceConfig table : https://github.com/OpenNMS/opennms/pull/4570

Chandra Gorantla April 20, 2022 at 1:25 AM

Scott Theleman April 14, 2022 at 8:03 PM

Design is for 'device_config' table to be populated with empty entries once a 'DeviceConfig' service is bound, without waiting for an actual backup retrieval to occur.

Initial steps, need DB updates:

  • make `device_config.last_updated` nullable. null value would mean device has been requisitioned for config backup but backup hasn't been run yet

  • add `device_config.status` enum field with possible values 'NO_BACKUP', 'SUCCESS', 'FAILED'. 'NO_BACKUP' is default and is the case when no backup retrieval has yet been performed (afterwards it would be 'SUCCESS' or 'FAILED').

Then Dao and Rest API updates to handle these cases. 'status' also needs to be determined and stored whenever a 'device_config' entry is added or updated vs. being calculated in Rest API.

 

fooker April 13, 2022 at 2:32 PM

Most performant way to find the related services, I can think of: Fetch the unique list of defined services, match these against the poller configuration to find services defined with device config class and use this list to query for services.

Fixed

Details

Assignee

Reporter

Story Points

Sprint

Fix versions

Affects versions

Priority

PagerDuty

Created April 11, 2022 at 2:21 PM
Updated April 25, 2022 at 12:32 PM
Resolved April 22, 2022 at 8:04 PM

Flag notifications