Skip to content

Commit

Permalink
Add Verizon Reschedule Status (#128)
Browse files Browse the repository at this point in the history
* Add rescheduled status for Verizon

* Remove space from summary

* Update CHANGELOG

Co-authored-by: Glenn Matthews <[email protected]>
  • Loading branch information
pke11y and glennmatthews authored Dec 9, 2021
1 parent 8ee467f commit ac14493
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- #124 - Handle encoded non-ASCII characters in email subjects.
- #126 - Ignore a class of non-maintenance-notification emails from Telia.
- #127 - Improve handling of Equinix and Lumen notifications.
- #128 - Add capability to set `RE-SCHEDULED` status for Verizon rescheduled notifications.

## v2.0.7 - 2021-12-01

Expand Down
4 changes: 3 additions & 1 deletion circuit_maintenance_parser/parsers/verizon.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ def parse_tables(self, tables: ResultSet, data: Dict): # pylint: disable=too-ma
if not cells_text:
continue
if cells_text[0].startswith("Description of Maintenance"):
data["summary"] = cells_text[1]
data["summary"] = cells_text[1].replace("&nbsp;", "")
elif cells_text[0].startswith("Verizon MASTARS Request number:"):
data["maintenance_id"] = cells_text[1]
elif cells_text[0].startswith("Attention:"):
if "maintenance was not completed" in cells_text[0]:
data["status"] = Status("CANCELLED")
elif "request has been rescheduled" in cells_text[0]:
data["status"] = Status("RE-SCHEDULED")
elif cells_text[0].startswith("Maintenance Date/Time (GMT):"):
maintenance_time = cells_text[1].split("-")
start = parser.parse(maintenance_time[0].strip())
Expand Down
1 change: 1 addition & 0 deletions tests/unit/data/verizon/verizon4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="rps_d8ed"><div>[ EXTERNAL ] <div><hr align="center"><center>ENGLISH</center><hr align="center"><div align="left"><img data-imagetype="External" blockedimagesrc="http://ss7.vzw.com/is/image/VerizonWireless/vzw-logo-156-130" data-connectorsauthtoken="1" data-imageproxyendpoint="/actions/ei" data-imageproxyid="" alt="logo" style="border-top:0px solid; border-right:0px solid; border-bottom:0px solid; border-left:0px solid; margin:0px" width="156"></div><div aria-hidden="true" align="left">&nbsp;</div><div align="left"><p style="margin:0in 0in 0pt" align="center"><strong>Verizon Maintenance Notification</strong></p><p style="margin:0in 0in 0pt" aria-hidden="true">&nbsp;</p><p style="margin:0in 0in 0pt"><strong>Dear Verizon Customer,</strong></p><p style="margin:0in 0in 0pt" aria-hidden="true">&nbsp;</p><p style="margin:0in 0in 0pt; line-height:115%"><strong>I’d like to take this opportunity to thank you for being a Verizon Customer, and to update you on maintenance work that will be carried out on the Verizon network. Verizon will be performing maintenance activities, utilizing proven methods, in a manner to ensure the best performance for your connection. The maintenance window is from Dec 7 2021 04:00 GMT - Dec 7 2021 10:00 GMT , however your expected circuit downtime within this window to be 10 Minute(s). Below you will find more detailed information as it relates to the impact to your environment. </strong></p><p style="margin:0in 0in 0pt; line-height:115%" aria-hidden="true">&nbsp;</p><p style="margin:0in; margin-bottom:.0001pt"><strong><span style="font-size:13.5pt; background:white">If you have questions regarding this maintenance event, please contact Verizon’s Global Event Management Center at email&nbsp;</span></strong><strong><u><span style="font-size:13.5pt; color:#0070C0; background:white"><a href="mailto:[email protected]" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" data-linkindex="0">[email protected]</a>.</span></u></strong><span style="font-size:13.5pt"></span></p><p style="margin:0in 0in 0.0001pt; background:white"><strong><span style="font-size:13.5pt"><br aria-hidden="true"></span></strong></p><p style="margin:0in 0in 0.0001pt; background:white"><strong><span style="font-size:13.5pt">For those customers with a defined Account Team or Technical Service Manager, please refer all circuit-based questions to your Verizon Account Representative.&nbsp;&nbsp;</span></strong><span style="font-size:13.5pt"></span></p><p style="margin:0in 0in 0.0001pt; background:white"><strong><span style="font-size:13.5pt"><br aria-hidden="true"></span></strong></p><p style="margin:0in 0in 0.0001pt; background:white"><strong><span style="font-size:13.5pt">NOTE: If your circuit remains down after the maintenance window has passed, please follow your defined Verizon Repair Center process for investigation.</span></strong><span style="font-size:13.5pt"></span></p><p style="margin:0in 0in 0.0001pt"><strong><span style="font-size:13.5pt; background:white"><br aria-hidden="true"></span></strong></p><p style="margin:0in 0in 0.0001pt"><strong><span style="font-size:13.5pt; background:white">We appreciate your cooperation and understanding in this matter. Verizon’s goal is to provide you with exceptional service every day, in every interaction. Thank you once again for your business, and your partnership.</span></strong><span style="font-size:13.5pt"></span></p><p style="margin:0in 0in 0.0001pt"><strong><span style="font-size:13.5pt; background:white"><br aria-hidden="true"></span></strong></p><p style="margin:0in 0in 0.0001pt"><strong><span style="font-size:13.5pt; background:white">Regards,</span></strong><span style="font-size:13.5pt"></span></p><p style="margin:0in 0in 0.0001pt; line-height:13.8pt"><strong><span style="font-size:13.5pt; background:white">Global Event Management Center</span></strong><span style="font-size:13.5pt"></span></p><p style="margin:0in 0in 0.0001pt; line-height:13.8pt"><strong><span style="font-size:10.5pt; color:#0563C1; background:white"><a href="mailto:[email protected]" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" data-linkindex="1">[email protected]</a></span></strong><span style="font-size:13.5pt"></span></p><p style="margin:0in 0in 0.0001pt; line-height:13.8pt"><strong></strong></p><p style="margin:0in 0in 0.0001pt; line-height:13.8pt"></p><p style="margin:0in 0in 0.0001pt; line-height:13.8pt"><strong><strong></strong></strong></p><strong><strong><strong><strong><strong><table style="border-collapse:collapse; margin:auto auto auto 4.65pt" cellspacing="0" cellpadding="0" border="1"><tbody><tr style="height:24.35pt"><td colspan="2" style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt"><strong>Attention: This request has been rescheduled from Dec 07 2021 19:00 GMT to Dec 07 2021 04:00 GMT</strong></p><p style="margin:0in 0in 0pt" aria-hidden="true">&nbsp;</p></td></tr><tr width="100%"><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p><u>Contact ID:&nbsp;</u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;773101</p><p><u>Maintenance Date/Time</u> (Local): </p></td><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; width:288.85pt; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt"><strong>Dec 7 2021 04:00 GMT - Dec 7 2021 10:00 GMT</strong> </p></td></tr><tr style="height:24.35pt"><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt" aria-hidden="true">&nbsp;</p><p style="margin:0in 0in 0pt"><u>Maintenance Date/Time</u> (GMT): </p></td><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; width:288.85pt; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt">Dec 7 2021 04:00 GMT - Dec 7 2021 10:00 GMT</p></td></tr><tr style="height:24.35pt"><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt"><u>Maintenance Location</u>: </p></td><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; width:288.85pt; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt"><strong>SYDNEY, AUSTRALIA</strong></p></td></tr><tr style="height:24.35pt"><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt" aria-hidden="true">&nbsp;</p><p style="margin:0in 0in 0pt" aria-hidden="true">&nbsp;</p><p style="margin:0in 0in 0pt"><u>Description of Maintenance</u>:</p></td><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; width:288.85pt; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt"><strong>DEMAND MAINTENANCE: A Third Party vendor will be performing scheduled network maintenance.</strong></p></td></tr><tr style="height:24.35pt"><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt" aria-hidden="true">&nbsp;</p><p style="margin:0in 0in 0pt"><u>Planned Circuit Downtime</u>:</p></td><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; width:288.85pt; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt"><strong>10 Minute(s)</strong></p></td></tr><tr style="height:24.35pt"><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt" aria-hidden="true">&nbsp;</p><p style="margin:0in 0in 0pt"><u>Verizon <strong>MASTARS Request</strong> number</u><strong>:</strong></p></td><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; width:288.85pt; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt"><strong>987654321-1</strong></p></td></tr><tr style="height:24.35pt"><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt" aria-hidden="true">&nbsp;</p><p style="margin:0in 0in 0pt"><u>Verizon <strong>MASTARS Event</strong> id</u><strong>:</strong></p></td><td style="border-top:#f0f0f0; height:24.35pt; border-right:#f0f0f0; width:288.85pt; border-bottom:#f0f0f0; padding-bottom:0in; padding-top:0in; padding-left:5.4pt; border-left:#f0f0f0; padding-right:5.4pt; background-color:transparent" valign="bottom" nowrap=""><p style="margin:0in 0in 0pt"><strong>987654321-1</strong></p></td></tr></tbody></table><p style="margin:0in 0in 0pt" aria-hidden="true">&nbsp;</p><p style="margin:0in 0in 0pt" aria-hidden="true">&nbsp;</p><p style="margin:0in 0in 0pt"><u>Circuits Affected</u>:</p><p style="margin:0in 0in 0pt" aria-hidden="true">&nbsp;</p><p style="margin:0in 0in 0pt"></p><table width="100%" cellspacing="0" cellpadding="0" border="0" align="center"><tbody><tr><td style="font-family:Verdana,monospace" align="center"><b>Company Name</b></td><td style="font-family:Verdana,monospace" align="center"><b>Circuit ID</b></td><td style="font-family:Verdana,monospace" align="center"><b>Z End</b></td><td style="font-family:Verdana,monospace" align="center"><b>Billing ID</b></td><td style="font-family:Verdana,monospace" align="center"><b>DNS Short Name</b></td><td style="font-family:Verdana,monospace" align="center"><b>ServiceType</b></td></tr><tr><td colspan="6"><hr width="100%" size="1" color="black"></td></tr><tr><td style="font-family:Verdana,monospace" align="center">ACME</td><td style="font-family:Verdana,monospace" align="center">C12345678</td><td style="font-family:Verdana,monospace" align="center">N/A</td><td style="font-family:Verdana,monospace" align="center">SG000000</td><td style="font-family:Verdana,monospace" align="center">acme-corp-123456</td><td style="font-family:Verdana,monospace" align="center">PIP</td></tr><tr><td colspan="9"><hr width="100%" size="1" color="silver"></td></tr><tr><td style="font-family:Verdana,monospace" align="center">ACME</td><td style="font-family:Verdana,monospace" align="center">E23456789</td><td style="font-family:Verdana,monospace" align="center">SYDNEY/td><td style="font-family:Verdana,monospace" align="center">SG0000000</td><td style="font-family:Verdana,monospace" align="center">acme-corp-123456</td><td style="font-family:Verdana,monospace" align="center">UNI</td></tr><tr><td colspan="9"><hr width="100%" size="1" color="silver"></td></tr></tbody></table><p></p></strong></strong></strong></strong></strong></div></div></div></div>
20 changes: 20 additions & 0 deletions tests/unit/data/verizon/verizon4_result.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"account": "Verizon Customer",
"circuits": [
{
"circuit_id": "C12345678",
"impact": "OUTAGE"
},
{
"circuit_id": "E23456789",
"impact": "OUTAGE"
}
],
"end": 1638871200,
"maintenance_id": "987654321-1",
"start": 1638849600,
"status": "RE-SCHEDULED",
"summary": "DEMAND MAINTENANCE: A Third Party vendor will be performing scheduled network maintenance."
}
]
5 changes: 5 additions & 0 deletions tests/unit/test_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,11 @@
Path(dir_path, "data", "verizon", "verizon3.html"),
Path(dir_path, "data", "verizon", "verizon3_result.json"),
),
(
HtmlParserVerizon1,
Path(dir_path, "data", "verizon", "verizon4.html"),
Path(dir_path, "data", "verizon", "verizon4_result.json"),
),
# Zayo
(
SubjectParserZayo1,
Expand Down

0 comments on commit ac14493

Please sign in to comment.