circuit-maintenance-parser icon indicating copy to clipboard operation
circuit-maintenance-parser copied to clipboard

Capture more content in parsed `summary` for all parsers

Open glennmatthews opened this issue 3 years ago • 4 comments

Environment

  • circuit_maintenance_parser version: 2.0.1

Proposed Functionality

All parsers should err on the side of including more information in the summary field versus trying to narrowly extract a single sentence or paragraph from the overall notification.

Use Case

Notifications often include many additional details beyond what we're currently capturing in most summary fields. In integrating the output of this parser library with other systems, it's better to preserve information rather than discarding it.

glennmatthews avatar Sep 27 '21 19:09 glennmatthews

Optionally could add an entirely new field, full_message or something to the Maintenance model, if we want to keep the current behavior of summary as an extremely brief excerpt.

glennmatthews avatar Sep 27 '21 19:09 glennmatthews

The idea of the summary field is to capture any other data related to the maintenance that is not one of the key fields, so it's a matter of the parsers to include more information into this field. I mean, there is no limitation from the library, it's up to each parser implementation. Do you have specific parsers that should be updated? or it's just a guideline for new parsers?

chadell avatar Oct 01 '21 04:10 chadell

If https://github.com/nautobot/nautobot-plugin-circuit-maintenance/issues/116 can be implemented to capture the email "body" rather than a truncated set of headers into the RawNotification, I think that would meet my needs as an alternative / better solution to this issue in general.

Specifically, for Lumen notifications, I believe I've seen that we capture the "Summary" (which is the same across all updates to a scheduled maintenance) but not the "Updates" that are separately included in the email, for example:

Summary:

Lumen intends to carry out internal maintenance within its network. This has been designated as ESSENTIAL. The nature of this work is to perform a traffic-affecting circuit re-route. Work is required to augment infrastructure to ensure the continued integrity of the network. During the maintenance window you may experience one period of outage to the maximum specified below.

Lumen would like to apologise for any inconvenience caused by this maintenance.

Updates:

2021-10-01 02:16:04 GMT - The scheduled maintenance window 12345678-1 has ended. 2021-09-30 22:00:24 GMT - The scheduled maintenance work has begun.

I can verify this behavior and submit a PR for the Lumen parser specifically when I find some time to do so.

glennmatthews avatar Oct 01 '21 12:10 glennmatthews

I think that if the info that you are interested can be extracted from the notification, and stored in the object.summary it's always better, and it's relatively easy to do with a small change on the parser to take into account also the Updates text along with the Summary.

chadell avatar Oct 01 '21 12:10 chadell