Add Hawaiki Provider, Parser and tests - #428
Conversation
| HGC, | ||
| Hawaiki, |
There was a problem hiding this comment.
Let's move this before HGC to keep alphabetical.
| data: Dict = { | ||
| "circuits": [], | ||
| "status": Status.CONFIRMED, | ||
| "account": "Unknown", |
There was a problem hiding this comment.
| "account": "Unknown", | |
| "account": "Customer info unavailable", |
Matching what is in apple.py:52 and bso.py:52
| match = re.match(r"Service ID:\s*(.+)", line) | ||
| if match: | ||
| circuit_id = match.group(1).strip() | ||
| data["circuits"].append(CircuitImpact(circuit_id=circuit_id, impact=Impact.NO_IMPACT)) |
There was a problem hiding this comment.
All circuits get Impact.NO_IMPACT unconditionally here, regardless of what the notification says. The email format already carries a Service impact: line that the parser walks past — so a genuinely service-affecting Hawaiki maintenance gets recorded as harmless. Downstream consumers (e.g. Nautobot circuit-maintenance) key off impact to decide whether to act, so this is worse than the current OpenAI-parser fallback for those emails.
The wrinkle is ordering: Service ID: appears above Service impact: in the body, so the single-pass loop can't know the impact at the moment it appends the circuit. Simplest fix is to resolve impact up front, since all circuits in a Hawaiki notification share one impact line; same approach equinix.py:82 takes ("all circuits in the notification share the same impact").
I'd also default to OUTAGE rather than NO_IMPACT for unrecognized phrasing. OUTAGE is the library's own default in CircuitImpact, and it's the safe direction to be wrong in an over-cautious maintenance window costs someone an unnecessary look, an under-cautious one costs them an unexpected outage.
There was a problem hiding this comment.
Ahhh thats my bad! Will get that resolved.
|
Here may help: and in parse_text, replacing line 55: |
|
@jvanderaa I think all threads should be resolved now! Please let me know if I am missing something. |
Hawaiki have recently updated their maintenance emailing processes where they no longer include all correspondences into their newest email response. At this point, we can now provide a HTML parser which can hopefully parse these emails. Right now we are fully depending on OpenAI parser for their emails and there are a lot of emails/updates which Hawaiki send which should classify as 'No Maintenances Found'.
I have written the provider, parser and tests and have also provided an include filter for Hawaiki to hopefully ignore the updates they are sending that do not actually have parseable maintenance details.
Note: Hawaiki send a contingency window in each maintenance they send, but to me it seems they use it very rarely. I have not parsed this information in my change, but prefer that we see how clients interact with Hawaiki with this parser, and if they see this contingency window needs to be parsed, we can make further improvements there.