Skip to content

Conversation

@jmaslak
Copy link
Contributor

@jmaslak jmaslak commented Dec 21, 2023

This makes five changes:

  1. It now handles cancel messages.
  2. Equinix sometimes uses <strong> instead of <bold>, so I updated the beautifulsoup calls to look for both (and changed _parse_b() to _parse_bolded() to be more accurate).
  3. UTC: was never found in my sample messages in b_elem, but it was always in b_elem.text, so I updated that. Tests still pass and it parses the messages I am receiving from Equinix.
  4. "There will be service interruptions" was found in impact_line in my messages, not impact_line.next_sibling (which was None and thus causing an exception). I reworked it to do both checks, and also not crash if impact_line does not have a next_sibling.
  5. I added tests for the new code, using messages I've received from Equinix as the source, with obfuscation applied.

@jmaslak
Copy link
Contributor Author

jmaslak commented Dec 21, 2023

Sorry about the test failures - I've fixed them.

@jmaslak
Copy link
Contributor Author

jmaslak commented Dec 21, 2023

I adjusted the next_sibling check for impacts based on a new Equinix message that just came through. I added a test case for this one as well.

@jmaslak
Copy link
Contributor Author

jmaslak commented Dec 21, 2023

Last change (really) is to allow multi-language messages where the first part is in a language that looks like ASCII. I did this by verifying the year is set before processing the maintenance times. If it's not set, we are likely processing the wrong language and should wait for the right one. I did add test cases for this as well.

Copy link
Contributor

@chadell chadell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
thank you very much @jmaslak for your contributions!

@chadell chadell merged commit f784429 into networktocode:develop Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants