From 8fc46ed3971227fad3751099febc083c80ff50b8 Mon Sep 17 00:00:00 2001 From: Christian Adell Date: Thu, 4 Nov 2021 14:48:12 +0100 Subject: [PATCH 1/8] Release v2.0.4 (#108) * Release v2.0.4 --- CHANGELOG.md | 6 ++++-- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 201d723b..12feb4c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,14 @@ # Changelog -## v2.0.4 +## v2.0.4 - 2021-11-04 ### Fixed +- #94 - Improve Geo service error handling. +- #97 - Fix Readme image URLs. - #98 - Add handling for `Lumen` notification with Alt Circuit ID. - #99 - Extend `Zayo` Html parser to handle different table headers. -- #103 - Add `Equinix` provider. +- #102 - Add `Equinix` provider. - #104 - Use a local locations DB to map city to timezone as first option, keeping API as fallback option. - #105 - Extend `Colt` parser to support multiple `Maintenance` statuses. diff --git a/pyproject.toml b/pyproject.toml index 90d2c511..1f29ea6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "circuit-maintenance-parser" -version = "2.0.3" +version = "2.0.4" description = "Python library to parse Circuit Maintenance notifications and return a structured data back" authors = ["Network to Code "] license = "Apache-2.0" From 9d1c6b70cc4d0bf3186193541274f5f5585f2cfa Mon Sep 17 00:00:00 2001 From: Glenn Matthews Date: Mon, 15 Nov 2021 12:01:32 -0500 Subject: [PATCH 2/8] Extend Zayo parser to handle additional examples (#109) * WIP - extend Zayo parser to handle additional examples * Extract account, maintenance ID, and stamp from Zayo email headers * Combine multiple windows in a single Zayo notification * Forgot to make mypy happy * Ensure consistent ordering of data_parts --- circuit_maintenance_parser/data.py | 3 +- circuit_maintenance_parser/parser.py | 8 +- circuit_maintenance_parser/parsers/seaborn.py | 4 +- circuit_maintenance_parser/parsers/zayo.py | 72 ++- circuit_maintenance_parser/provider.py | 4 +- tests/unit/data/seaborn/seaborn1.eml | 2 +- tests/unit/data/seaborn/seaborn2.eml | 2 +- tests/unit/data/seaborn/seaborn3.eml | 2 +- tests/unit/data/zayo/zayo2_result.json | 2 +- tests/unit/data/zayo/zayo4.eml | 588 ++++++++++++++++++ .../data/zayo/zayo4_html_parser_result.json | 17 + tests/unit/data/zayo/zayo4_result.json | 17 + .../zayo/zayo4_subject_parser_result.json | 6 + tests/unit/data/zayo/zayo5.eml | 570 +++++++++++++++++ .../data/zayo/zayo5_html_parser_result.json | 19 + tests/unit/data/zayo/zayo5_result.json | 21 + .../zayo/zayo5_subject_parser_result.json | 6 + tests/unit/data/zayo/zayo6.eml | 582 +++++++++++++++++ .../data/zayo/zayo6_html_parser_result.json | 19 + tests/unit/data/zayo/zayo6_result.json | 21 + .../zayo/zayo6_subject_parser_result.json | 6 + tests/unit/test_e2e.py | 19 +- tests/unit/test_parsers.py | 32 +- 23 files changed, 1996 insertions(+), 26 deletions(-) create mode 100644 tests/unit/data/zayo/zayo4.eml create mode 100644 tests/unit/data/zayo/zayo4_html_parser_result.json create mode 100644 tests/unit/data/zayo/zayo4_result.json create mode 100644 tests/unit/data/zayo/zayo4_subject_parser_result.json create mode 100644 tests/unit/data/zayo/zayo5.eml create mode 100644 tests/unit/data/zayo/zayo5_html_parser_result.json create mode 100644 tests/unit/data/zayo/zayo5_result.json create mode 100644 tests/unit/data/zayo/zayo5_subject_parser_result.json create mode 100644 tests/unit/data/zayo/zayo6.eml create mode 100644 tests/unit/data/zayo/zayo6_html_parser_result.json create mode 100644 tests/unit/data/zayo/zayo6_result.json create mode 100644 tests/unit/data/zayo/zayo6_subject_parser_result.json diff --git a/circuit_maintenance_parser/data.py b/circuit_maintenance_parser/data.py index 8385b243..5d5fd137 100644 --- a/circuit_maintenance_parser/data.py +++ b/circuit_maintenance_parser/data.py @@ -77,7 +77,8 @@ def init_from_emailmessage(cls: Type["NotificationData"], email_message) -> Opti # Adding extra headers that are interesting to be parsed data_parts.add(DataPart(EMAIL_HEADER_SUBJECT, email_message["Subject"].encode())) data_parts.add(DataPart(EMAIL_HEADER_DATE, email_message["Date"].encode())) - return cls(data_parts=list(data_parts)) + # Ensure the data parts are processed in a consistent order + return cls(data_parts=sorted(data_parts, key=lambda part: part.type)) except Exception: # pylint: disable=broad-except logger.exception("Error found initializing data from email message: %s", email_message) return None diff --git a/circuit_maintenance_parser/parser.py b/circuit_maintenance_parser/parser.py index 9a37b415..23be97e3 100644 --- a/circuit_maintenance_parser/parser.py +++ b/circuit_maintenance_parser/parser.py @@ -171,11 +171,9 @@ def parse_html(self, soup: ResultSet,) -> List[Dict]: def clean_line(line): """Clean up of undesired characters from Html.""" try: - line = line.text.strip() + return line.text.strip() except AttributeError: - line = line.strip() - # TODO: below may not be needed if we use `quopri.decodestring()` on the initial email file? - return line.replace("=C2", "").replace("=A0", "").replace("\r", "").replace("=", "").replace("\n", "") + return line.strip() class EmailDateParser(Parser): @@ -199,7 +197,7 @@ class EmailSubjectParser(Parser): def parser_hook(self, raw: bytes): """Execute parsing.""" result = [] - for data in self.parse_subject(self.bytes_to_string(raw)): + for data in self.parse_subject(self.bytes_to_string(raw).replace("\r\n", "")): result.append(data) return result diff --git a/circuit_maintenance_parser/parsers/seaborn.py b/circuit_maintenance_parser/parsers/seaborn.py index fc28c8e3..cf724dbb 100644 --- a/circuit_maintenance_parser/parsers/seaborn.py +++ b/circuit_maintenance_parser/parsers/seaborn.py @@ -15,14 +15,14 @@ class SubjectParserSeaborn1(EmailSubjectParser): """Parser for Seaborn subject string, email type 1. - Subject: [{ACOUNT NAME}] {MAINTENACE ID} {DATE} + Subject: [{ACCOUNT NAME}] {MAINTENANCE ID} {DATE} [Customer Direct] 1111 08/14 """ def parse_subject(self, subject): """Parse subject of email file.""" data = {} - search = re.search(r".+\[(.+)\].([0-9]+).+", subject) + search = re.search(r".+\[([^#]+)\].([0-9]+).+", subject) if search: data["account"] = search.group(1) data["maintenance_id"] = search.group(2) diff --git a/circuit_maintenance_parser/parsers/zayo.py b/circuit_maintenance_parser/parsers/zayo.py index 1e40aa6f..553bb1ff 100644 --- a/circuit_maintenance_parser/parsers/zayo.py +++ b/circuit_maintenance_parser/parsers/zayo.py @@ -7,7 +7,7 @@ from dateutil import parser -from circuit_maintenance_parser.parser import Html, Impact, CircuitImpact, Status +from circuit_maintenance_parser.parser import CircuitImpact, EmailSubjectParser, Html, Impact, Status # pylint: disable=too-many-nested-blocks,no-member, too-many-branches @@ -15,6 +15,25 @@ logger = logging.getLogger(__name__) +class SubjectParserZayo1(EmailSubjectParser): + """Parser for Zayo subject string, email type 1. + + Subject: {MESSAGE TYPE}?***{ACCOUNT NAME}***ZAYO {MAINTENANCE_ID} {URGENCY}...*** + END OF WINDOW NOTIFICATION***Customer Inc.***ZAYO TTN-0000123456 Planned*** + ***Customer Inc***ZAYO TTN-0001234567 Emergency MAINTENANCE NOTIFICATION*** + RESCHEDULE NOTIFICATION***Customer Inc***ZAYO TTN-0005423873 Planned*** + """ + + def parse_subject(self, subject): + """Parse subject of email message.""" + data = {} + tokens = subject.split("***") + if len(tokens) == 4: + data["account"] = tokens[1] + data["maintenance_id"] = tokens[2].split(" ")[1] + return [data] + + class HtmlParserZayo1(Html): """Notifications Parser for Zayo notifications.""" @@ -24,6 +43,14 @@ def parse_html(self, soup): self.parse_bs(soup.find_all("b"), data) self.parse_tables(soup.find_all("table"), data) + if data: + if "status" not in data: + text = soup.get_text() + if "will be commencing momentarily" in text: + data["status"] = Status("IN-PROCESS") + elif "has been completed" in text: + data["status"] = Status("COMPLETED") + return [data] def parse_bs(self, btags: ResultSet, data: dict): @@ -32,10 +59,29 @@ def parse_bs(self, btags: ResultSet, data: dict): if isinstance(line, bs4.element.Tag): if line.text.lower().strip().startswith("maintenance ticket #:"): data["maintenance_id"] = self.clean_line(line.next_sibling) - elif line.text.lower().strip().startswith("urgency:"): - urgency = self.clean_line(line.next_sibling) - if urgency == "Planned": + elif "serves as official notification" in line.text.lower(): + if "will be performing maintenance" in line.text.lower(): data["status"] = Status("CONFIRMED") + elif "has cancelled" in line.text.lower(): + data["status"] = Status("CANCELLED") + # Some Zayo notifications may include multiple activity dates. + # For lack of a better way to handle this, we consolidate these into a single extended activity range. + # + # For example, given: + # + # 1st Activity Date + # 01-Nov-2021 00:01 to 01-Nov-2021 05:00 ( Mountain ) + # 01-Nov-2021 06:01 to 01-Nov-2021 11:00 ( GMT ) + # + # 2nd Activity Date + # 02-Nov-2021 00:01 to 02-Nov-2021 05:00 ( Mountain ) + # 02-Nov-2021 06:01 to 02-Nov-2021 11:00 ( GMT ) + # + # 3rd Activity Date + # 03-Nov-2021 00:01 to 03-Nov-2021 05:00 ( Mountain ) + # 03-Nov-2021 06:01 to 03-Nov-2021 11:00 ( GMT ) + # + # our end result would be (start: "01-Nov-2021 06:01", end: "03-Nov-2021 11:00") elif "activity date" in line.text.lower(): logger.info("Found 'activity date': %s", line.text) for sibling in line.next_siblings: @@ -44,9 +90,15 @@ def parse_bs(self, btags: ResultSet, data: dict): if "( GMT )" in text: window = self.clean_line(sibling).strip("( GMT )").split(" to ") start = parser.parse(window.pop(0)) - data["start"] = self.dt2ts(start) + start_ts = self.dt2ts(start) + # Keep the earliest of any listed start times + if "start" not in data or data["start"] > start_ts: + data["start"] = start_ts end = parser.parse(window.pop(0)) - data["end"] = self.dt2ts(end) + end_ts = self.dt2ts(end) + # Keep the latest of any listed end times + if "end" not in data or data["end"] < end_ts: + data["end"] = end_ts break elif line.text.lower().strip().startswith("reason for maintenance:"): data["summary"] = self.clean_line(line.next_sibling) @@ -80,10 +132,12 @@ def parse_tables(self, tables: ResultSet, data: Dict): number_of_circuits = int(len(data_rows) / 5) for idx in range(number_of_circuits): data_circuit = {} - data_circuit["circuit_id"] = self.clean_line(data_rows[0 + idx]) - impact = self.clean_line(data_rows[1 + idx]) + data_circuit["circuit_id"] = self.clean_line(data_rows[0 + 5 * idx]) + impact = self.clean_line(data_rows[1 + 5 * idx]) if "hard down" in impact.lower(): data_circuit["impact"] = Impact("OUTAGE") - circuits.append(CircuitImpact(**data_circuit)) + elif "no expected impact" in impact.lower(): + data_circuit["impact"] = Impact("NO-IMPACT") + circuits.append(CircuitImpact(**data_circuit)) if circuits: data["circuits"] = circuits diff --git a/circuit_maintenance_parser/provider.py b/circuit_maintenance_parser/provider.py index e27e65fd..b0c5d725 100644 --- a/circuit_maintenance_parser/provider.py +++ b/circuit_maintenance_parser/provider.py @@ -36,7 +36,7 @@ from circuit_maintenance_parser.parsers.telstra import HtmlParserTelstra1 from circuit_maintenance_parser.parsers.turkcell import HtmlParserTurkcell1 from circuit_maintenance_parser.parsers.verizon import HtmlParserVerizon1 -from circuit_maintenance_parser.parsers.zayo import HtmlParserZayo1 +from circuit_maintenance_parser.parsers.zayo import HtmlParserZayo1, SubjectParserZayo1 logger = logging.getLogger(__name__) @@ -330,6 +330,6 @@ class Zayo(GenericProvider): """Zayo provider custom class.""" _processors: List[GenericProcessor] = [ - SimpleProcessor(data_parsers=[HtmlParserZayo1]), + CombinedProcessor(data_parsers=[EmailDateParser, SubjectParserZayo1, HtmlParserZayo1]), ] _default_organizer = "mr@zayo.com" diff --git a/tests/unit/data/seaborn/seaborn1.eml b/tests/unit/data/seaborn/seaborn1.eml index 6354ad29..e054895d 100644 --- a/tests/unit/data/seaborn/seaborn1.eml +++ b/tests/unit/data/seaborn/seaborn1.eml @@ -55,7 +55,7 @@ body>

= Forwarded message ---------
From: NOC Seaborn <noc@seabornnetworks.com>
Date: Wed,= - 11 Aug 2021 at 23:09
Subject: [rd-notices] Re:[## 51346 ##] Emergency = + 11 Aug 2021 at 23:09
Subject: [rd-notices] Re:[## 99999 ##] Emergency = Maintenance Notification CID: AAA-AAAAA-AAAA-AAA1-00000-00 TT#7777
To: = <notices@customer.com>




= Forwarded message ---------
From: NOC Seaborn <
noc@seabornnetworks.com>
Date: Wed,= - 11 Aug 2021 at 23:09
Subject: [rd-notices] Re:[## 51346 ##] Emergency = + 11 Aug 2021 at 23:09
Subject: [rd-notices] Re:[## 99999 ##] Emergency = Maintenance Notification CID: CUS-AAAAA-BBBBB-CCCC-DDDD-00 TT#6698
To: = <rd-notices@customer.com>




= Forwarded message ---------
From: NOC <
NOC@seabornnetworks.com>
Date: Thu, 12 Aug = -2021 at 14:06
Subject: [Customer] 7777 8/13 EMERGENCY MAINTENANCE
= +2021 at 14:06
Subject: [Customer Direct] 7777 8/13 EMERGENCY MAINTENANCE
= To: Customer Direct Team <eng-rg= @customer.com>
Cc: NOC <NOC@seabornnetworks.com>


diff --git a/tests/unit/data/zayo/zayo2_result.json b/tests/unit/data/zayo/zayo2_result.json index 3e4f2676..23932f13 100644 --- a/tests/unit/data/zayo/zayo2_result.json +++ b/tests/unit/data/zayo/zayo2_result.json @@ -11,7 +11,7 @@ "maintenance_id": "TTN-0001234567", "stamp": 1614297600, "start": 1614405600, - "status": "CONFIRMED", + "status": "CANCELLED", "summary": "Zayo will implement network maintenance to enhance service reliability." } ] diff --git a/tests/unit/data/zayo/zayo4.eml b/tests/unit/data/zayo/zayo4.eml new file mode 100644 index 00000000..12ee91ae --- /dev/null +++ b/tests/unit/data/zayo/zayo4.eml @@ -0,0 +1,588 @@ +Delivered-To: nautobot.email@example.com +Received: by 2002:a05:7000:1f21:0:0:0:0 with SMTP id hs33csp621030mab; + Mon, 8 Nov 2021 13:35:30 -0800 (PST) +X-Received: by 2002:a67:fa93:: with SMTP id f19mr107693276vsq.48.1636407330058; + Mon, 08 Nov 2021 13:35:30 -0800 (PST) +ARC-Seal: i=3; a=rsa-sha256; t=1636407330; cv=pass; + d=google.com; s=arc-20160816; + b=fw/0uPrGPZLnkt84PRZnVIf2uoLAPLa+nPDXvfJvmnfS1kW0gioJpBLlVov9H8R2Yv + J7K4v8S0WJs+4/WMjRLUHXPLW4iswPJLLbRsEc9Qgk6OHVZdj5WVv22RP/YMvW+0Cgk5 + B2tvKJJpAvbZudHqu9gNYnSM0cgNZp+Src4F/dSekj+Dd4ffa1lPWHaf38ULUILbSYoA + 6LC0ZW15ecVdwxuahc+YIyMxrOEg0gvuplTl+j2tlYabzne+kzYT4FBj7fmp1DkeQy59 + ZJDFk489hASIfBIZJ48LjYQvcTzW2SQ0Eu8TVM5LZb7Fm2hO/t54j3IDFPRuCIB26La8 + Un4g== +ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=list-unsubscribe:list-archive:list-help:list-post:list-id + :mailing-list:precedence:mime-version:subject:message-id:to:from + :date:sender:dkim-signature; + bh=eOq9HtEyMsG/m4iJvBBDdBTruiqs1xPpoNrPX7yhVn4=; + b=n8vzf+8o2aUxInB5en002sgLipi5gx4aOTVt6X4Z+exnFm3C/FyPw4ketZKq+cXLJ8 + Zr+1jXk59UPcCpWztPn6VieddGc36nJnNS30F69P5pVBjmM2XxOhUrXe3RMFcGLuKuwk + VjJrZLujAvhfUTIDKUYEMQUaNS+S5gSwWFwrEvWR+4KUcSQlCt/Asew1na7gZacRHFya + qWZPwapeG3guo1YzvV8nj9utd1It+1NKJHVuzL4akldKETdxvVqxHLKams2Fxk0JFg20 + XEMeOuXTgd540kVt+hwrmLtlWbZC0SHdvx9ZpJ3PpUwFyuWrXJhf6o0RcwR5dElHwK6a + kZxA== +ARC-Authentication-Results: i=3; mx.google.com; + dkim=pass header.i=@example.com header.s=example header.b=Nj9D3SAm; + arc=pass (i=2 spf=pass spfdomain=pu28gb8wt30u.6-79qkeai.na152.bnc.salesforce.com dkim=pass dkdomain=zayo.com dmarc=pass fromdomain=zayo.com); + spf=pass (google.com: domain of maintenance-notices+bncbcyp3io6yejbbh5qu2gamgqe4nfhh4y@example.com designates 209.85.220.97 as permitted sender) smtp.mailfrom=maintenance-notices+bncBCYP3IO6YEJBBH5QU2GAMGQE4NFHH4Y@example.com; + dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=zayo.com +Return-Path: +Received: from mail-sor-f97.google.com (mail-sor-f97.google.com. [209.85.220.97]) + by mx.google.com with SMTPS id z15sor4875510uar.22.2021.11.08.13.35.29 + for + (Google Transport Security); + Mon, 08 Nov 2021 13:35:30 -0800 (PST) +Received-SPF: pass (google.com: domain of maintenance-notices+bncbcyp3io6yejbbh5qu2gamgqe4nfhh4y@example.com designates 209.85.220.97 as permitted sender) client-ip=209.85.220.97; +Authentication-Results: mx.google.com; + dkim=pass header.i=@example.com header.s=example header.b=Nj9D3SAm; + arc=pass (i=2 spf=pass spfdomain=pu28gb8wt30u.6-79qkeai.na152.bnc.salesforce.com dkim=pass dkdomain=zayo.com dmarc=pass fromdomain=zayo.com); + spf=pass (google.com: domain of maintenance-notices+bncbcyp3io6yejbbh5qu2gamgqe4nfhh4y@example.com designates 209.85.220.97 as permitted sender) smtp.mailfrom=maintenance-notices+bncBCYP3IO6YEJBBH5QU2GAMGQE4NFHH4Y@example.com; + dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=zayo.com +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20210112; + h=x-gm-message-state:dkim-signature:sender:date:from:to:message-id + :subject:mime-version:x-original-sender + :x-original-authentication-results:precedence:mailing-list:list-id + :list-post:list-help:list-archive:list-unsubscribe; + bh=eOq9HtEyMsG/m4iJvBBDdBTruiqs1xPpoNrPX7yhVn4=; + b=s/8GrpdTD2FIC5SBe//NwuIB8jXwlINWSsn+uNSK8yFIZlErugP6ewbfHv1Chuivxk + ooMdTQ2BrSuIvZiDiowCHM1PirZSJRdShMOpx/zvL3hhI7u4gMZLyB6e0f18PYOIc3yp + Oxk2A0f10+zBl/uMBij0ANWmZz2AoxjCXlj+SWFZ/CJvmb9KUjU4twID7t9oDZXJ0pZw + oXyyV1sTmbTlY/1WxAVmnsh2d99I1jliMvn2Bi6cj+7t4RmSLmDspChx73LFW30Yel8v + VujDLea6+DCqL/aLvV+eoxLN0m4GjcjwySBfrn8AuuOUfAD2sGmjMP7RNBoe+8838je/ + rojg== +X-Gm-Message-State: AOAM533i3onjei8p7tWugD11b7O7DBGfVEX2zJnmg7nWEMgBdMeXNnqr + m96zkjWMqoK9PgCelRylEtggsVOU6bKm7vFP7izkPFOB5nuyu1ep +X-Google-Smtp-Source: ABdhPJw79C4wGoLDZsSmrOjx1l9ZXAgQPHgg3GqUuN425sGeyYn5WupZTCHI0Z1px0r+0oI6CC49ilVDJgQ1 +X-Received: by 2002:ab0:2983:: with SMTP id u3mr2935647uap.35.1636407329790; + Mon, 08 Nov 2021 13:35:29 -0800 (PST) +Return-Path: +Received: from netskope.com ([8.36.116.139]) + by smtp-relay.gmail.com with ESMTPS id h30sm2903430vko.5.2021.11.08.13.35.29 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Mon, 08 Nov 2021 13:35:29 -0800 (PST) +X-Relaying-Domain: example.com +Received: by mail-qt1-f198.google.com with SMTP id b21-20020a05622a021500b002acb563cd9bsf9476141qtx.22 + for ; Mon, 08 Nov 2021 13:35:28 -0800 (PST) +ARC-Seal: i=2; a=rsa-sha256; t=1636407327; cv=pass; + d=google.com; s=arc-20160816; + b=HMrC+7RVcrvZm4vYmIuP+8ONxrApwKWbdotkJhhFGJtkHxu5W5CIMMHEWNP82g4m/K + FXdYWP/OBOCtGrdFurRAewjgGHl7EKwbS11hW3Jh51vGw3nQvZqqf4BioSCzussjWVaK + U6Klfd5KJepTIeayiPopGFlQEYtpU0jeDGbq0umQcVjbTTqJvEGJRdmMMYaRINwnuDo8 + Q3eu9VzHo8g3dpFJV3qDP6F+SsZdhItUnDthMdZWLF6o0VHqJuI/9X0zPuqAXRlQEmnU + g2aFFZDQHvlF5ykp2BWB7SXq3SLtjNa2sQtfVE3H7FxQ2KAjbpQzTI6ppcUfcQcjq5a7 + u/SA== +ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=list-unsubscribe:list-archive:list-help:list-post:list-id + :mailing-list:precedence:mime-version:subject:message-id:to:from + :date:sender:dkim-signature; + bh=eOq9HtEyMsG/m4iJvBBDdBTruiqs1xPpoNrPX7yhVn4=; + b=Xi4lcF7BO/nVEpx+0P4N0WSiMk7nBuvEVKz3KnsHsGu1DRfE7p8yN15aQhHqoJ2slU + o9Pza+DfN0oVWgg9jVaPl9urx9DQ/R3hR2e8E+sHYPj1FivPm7PYrlQDHMHmT9PK/Hb/ + ouZJBMXhNhgo0MYITkzphWnU6GjnSGuLUn/hbWVPzRiJt9XQK64WwulQhcdl3WYYECQK + YwFLzroqS0yElzLOwNTUF51XyR9plYKElpae05Qlb77wJkCcRjXMRI3HcE75aDUI8sic + qrtpmw0CfOOIUEQJVnnT3rxLw0SAw9foWBEbH1mXeVQwwkriCEBp4H+qQYohlcBimIiB + +/Qg== +ARC-Authentication-Results: i=2; mx.google.com; + dkim=pass header.i=@zayo.com header.s=SF112018Alt header.b="WGGU1s/a"; + spf=pass (google.com: domain of mr=zayo.com__3xgl6y7t64eu7x36@pu28gb8wt30u.6-79qkeai.na152.bnc.salesforce.com designates 13.110.74.206 as permitted sender) smtp.mailfrom="mr=zayo.com__3xgl6y7t64eu7x36@pu28gb8wt30u.6-79qkeai.na152.bnc.salesforce.com"; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zayo.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=example.com; s=example; + h=sender:date:from:to:message-id:subject:mime-version + :x-original-sender:x-original-authentication-results:precedence + :mailing-list:list-id:list-post:list-help:list-archive + :list-unsubscribe; + bh=eOq9HtEyMsG/m4iJvBBDdBTruiqs1xPpoNrPX7yhVn4=; + b=Nj9D3SAmJ2wRnLQzdNbtePYHKshRl5h1UYXbhPHjZa7onvTuXpyCnjsf5QkF4fBlqP + Po2v5SDGgDXFqgy3pzfFabDnX93YpocM46cjBtR8U17TiyAHXQz68JaBSkvfSjX3G4Nm + Se4/iruc+MkNdnQnxmGsPXuQHnD+tIb8vPKsY= +Sender: maintenance-notices@example.com +X-Received: by 2002:a05:620a:754:: with SMTP id i20mr1896425qki.312.1636407327762; + Mon, 08 Nov 2021 13:35:27 -0800 (PST) +X-Received: by 2002:a05:620a:754:: with SMTP id i20mr1896410qki.312.1636407327587; + Mon, 08 Nov 2021 13:35:27 -0800 (PST) +X-BeenThere: maintenance-notices@example.com +Received: by 2002:a37:444c:: with SMTP id r73ls9440208qka.10.gmail; Mon, 08 + Nov 2021 13:35:27 -0800 (PST) +X-Received: by 2002:a05:620a:2893:: with SMTP id j19mr1955267qkp.21.1636407326935; + Mon, 08 Nov 2021 13:35:26 -0800 (PST) +ARC-Seal: i=1; a=rsa-sha256; t=1636407326; cv=none; + d=google.com; s=arc-20160816; + b=s9YXjl1rRtTBeGodPhCLx1oz0Fucko1dKkKSX4quXfSkbkEfx2v9t5SlV5bXaKAqgX + 7jIKUd+o+QPorQZA2/qtrFWslhAQYTEzx+OKj7kA+Je9V4M1j1pjNhqPwWbXN+frxtgn + odjCBJlVn5YqsNuMj6txE6XCJuujMf68s/Odfq2dRFhgR7z3LG/ex3ahafZxBfu9Zy0C + BvO/c7Wy/bZq37P+BPPjTNq41VwtpyzHUPNsVwqmms/FBYfv0Pra2HQ+RCZfrqDx2Xks + M6bTCa5ojEFpJR47Fd6VACHRqLA2Jffm931+NJMeFo0BCDSguvySvKNBQlfVj01HRG7X + /m8w== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=mime-version:subject:message-id:to:from:date:dkim-signature; + bh=q/Pnc7ZiQZaeju6b4qWM67R0swn+D3Qz8p6zhQC08cE=; + b=D6rb8PMC4dTThGEeCRf49W2shrwGirQizBrHtuxWe55HMlnbYi/+Vs04l0g82M1/4E + 7f6BzbrHs8g/wuQP5kDBlULn6LI2t/8gO4c7idZ6rp1BnjjUDWgQU5W+KnOKOhCcV/xV + K/cFAJW4ZnDXSAa1T0e8GnS7oQRdjVwjC75y9hRxWRMJ8Dv3guRfYYtJhXcEnnD/bfFi + 8/Wb9ZiTSdyvOR1Ga+OZWa1U16K/ro9Ssa//MvF1LqmdVBbJL/n9xRmbpQScJgThPeXS + PkX/ERz2euc8V3MDtC4CDLtTSEOpgxTaDxye5ai1Lo22tEia5MpgwPqXmBIxWb9ZATzj + UEdA== +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@zayo.com header.s=SF112018Alt header.b="WGGU1s/a"; + spf=pass (google.com: domain of mr=zayo.com__3xgl6y7t64eu7x36@pu28gb8wt30u.6-79qkeai.na152.bnc.salesforce.com designates 13.110.74.206 as permitted sender) smtp.mailfrom="mr=zayo.com__3xgl6y7t64eu7x36@pu28gb8wt30u.6-79qkeai.na152.bnc.salesforce.com"; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zayo.com +Received: from smtp15-ia4-sp3.mta.salesforce.com (smtp15-ia4-sp3.mta.salesforce.com. [13.110.74.206]) + by mx.google.com with ESMTPS id y6si22182759qkp.64.2021.11.08.13.35.26 + for + (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); + Mon, 08 Nov 2021 13:35:26 -0800 (PST) +Received-SPF: pass (google.com: domain of mr=zayo.com__3xgl6y7t64eu7x36@pu28gb8wt30u.6-79qkeai.na152.bnc.salesforce.com designates 13.110.74.206 as permitted sender) client-ip=13.110.74.206; +Received: from [10.180.203.170] ([10.180.203.170:59650] helo=na152-app1-2-ia4.ops.sfdc.net) + by mx4-ia4-sp3.mta.salesforce.com (envelope-from ) + (ecelerity 4.2.38.62368 r(Core:release/4.2.38.0)) with ESMTPS (cipher=ECDHE-RSA-AES256-GCM-SHA384 + subject="/C=US/ST=California/L=San Francisco/O=salesforce.com, inc./OU=0:app;1:ia4;2:ia4-sp3;3:na152;4:prod/CN=na152-app1-2-ia4.ops.sfdc.net") + id E9/1F-42744-E1899816; Mon, 08 Nov 2021 21:35:26 +0000 +Date: Mon, 8 Nov 2021 21:35:26 +0000 (GMT) +From: MR Zayo +To: "maintenance-notices@example.com" +Message-ID: +Subject: [maintenance-notices] ***Some Customer Inc***ZAYO TTN-0002345678 Demand + MAINTENANCE NOTIFICATION*** +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_11016_1305198674.1636407326627" +X-Priority: 3 +X-SFDC-LK: 00D6000000079Qk +X-SFDC-User: 00560000001etLU +X-Sender: postmaster@salesforce.com +X-mail_abuse_inquiries: http://www.salesforce.com/company/abuse.jsp +X-SFDC-TLS-NoRelay: 1 +X-SFDC-Binding: 1WrIRBV94myi25uB +X-SFDC-EmailCategory: apiSingleMail +X-SFDC-Interface: internal +X-Original-Sender: mr@zayo.com +X-Original-Authentication-Results: mx.google.com; dkim=pass + header.i=@zayo.com header.s=SF112018Alt header.b="WGGU1s/a"; spf=pass + (google.com: domain of mr=zayo.com__3xgl6y7t64eu7x36@pu28gb8wt30u.6-79qkeai.na152.bnc.salesforce.com + designates 13.110.74.206 as permitted sender) smtp.mailfrom="mr=zayo.com__3xgl6y7t64eu7x36@pu28gb8wt30u.6-79qkeai.na152.bnc.salesforce.com"; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zayo.com +Precedence: list +Mailing-list: list maintenance-notices@example.com; contact maintenance-notices+owners@example.com +List-ID: +X-Google-Group-Id: 536184160288 +List-Post: , +List-Help: , + +List-Archive: +List-Unsubscribe: , + +x-netskope-inspected: true + +------=_Part_11016_1305198674.1636407326627 +Content-Type: multipart/alternative; + boundary="----=_Part_11015_382650316.1636407326627" + +------=_Part_11015_382650316.1636407326627 +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +Zayo Maintenance Notification=20 + + +This email serves as official notification that Zayo and/or one of its prov= +iders will be performing maintenance on its network as described below. Thi= +s maintenance may affect services you have with us. + + + +Maintenance Ticket #: TTN-0002345678 + + +Urgency: Demand + + +Date Notice Sent: 08-Nov-2021 + + +Customer: Some Customer Inc + + + + +Maintenance Window=20 + +1st Activity Date=20 +11-Nov-2021 00:01 to 11-Nov-2021 06:00 ( Eastern )=20 + + 11-Nov-2021 05:01 to 11-Nov-2021 11:00 ( GMT )=20 + +Backup Date=20 +12-Nov-2021 00:01 to 12-Nov-2021 06:00 ( Eastern )=20 + + 12-Nov-2021 05:01 to 12-Nov-2021 11:00 ( GMT )=20 + + + +Location of Maintenance: Vero Beach, FL + + +Reason for Maintenance: Service provider will perform demand maintenance to= + relocate a fiber cable in Vero Beach, FL in order to proactively avoid unp= +lanned outages due to railroad mandated track expansion construction. +GPS: +Location 1: 27.835306, -80.492250 +Location 2: 27.564528, -80.370944 +Location 3: 27.438167, -80.321833 + + +Expected Impact: Service Affecting Activity: Any Maintenance Activity direc= +tly impacting the service(s) of customers. Service(s) are expected to go do= +wn as a result of these activities. + + +Circuit(s) Affected:=20 + + +Circuit Id +Expected Impact +A Location Address + +Z Location Address +Legacy Circuit Id + +/OGYX/123456/ /ZYO / +Hard Down - up to 5 hours +56 Marietta St NW Atlanta, GA. USA +50 NE 9th St Miami, FL. USA + + + + +Please contact the Zayo Maintenance Team with any questions regarding this = +maintenance event. Please reference the Maintenance Ticket number when call= +ing. + + +Maintenance Team Contacts:=20 + + + + +Zayo=C2=A0Global Change Management Team/=C3=89quipe de Gestion du Changemen= +t Global=C2=A0Zayo + +Zayo | Our Fiber Fuels Global Innovation + +Toll free/No=C2=A0sans=C2=A0frais:=C2=A01.866.236.2824 + +United Kingdom Toll Free/No=C2=A0sans +frais Royaume-Uni:=C2=A00800.169.1646 + +Email/Courriel:=C2=A0mr@zayo.com=C2=A0 + +Website/Site Web:=C2=A0https://www.zayo.com + +Purpose=C2=A0|=C2=A0Network Map=C2=A0|=C2=A0Escalation List=C2=A0|=C2=A0Lin= +kedIn=C2=A0|=C2=A0Twitter=C2=A0|=C2=A0Tranzact=C2=A0 + +=C2=A0 + +This communication is the property of Zayo and may contain confidential or = +privileged information. If you have received this communication in error, p= +lease promptly notify the sender by reply e-mail and destroy all copies of = +the communication and any attachments. + +=C2=A0 + +--=20 +You received this message because you are subscribed to the Google Groups "= +Maintenance Notices" group. +To unsubscribe from this group and stop receiving emails from it, send an e= +mail to maintenance-notices+unsubscribe@example.com. +To view this discussion on the web visit https://groups.google.com/a/exampl= +e.com/d/msgid/maintenance-notices/nlUsi0000000000000000000000000000000000000000000= +00R29VYZ00E10tb5A6QCubwKYAh0b2iQ%40sfdc.net. + +------=_Part_11015_382650316.1636407326627 +Content-Type: text/html; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + + +Zayo Maintenance Notification=20 + +

This email serves as official notification that Zayo and/or one of = +its providers will be performing maintenance on its network as described be= +low. This maintenance may affect services you have with us. +
+ +

Maintenance Ticket #: TTN-0002345678 + +

Urgency: Demand + +

Date Notice Sent: 08-Nov-2021 + +

Customer: Some Customer Inc + + + +

Maintenance Window

1st Activity Date <= +/b>
11-Nov-2021 00:01 to 11-Nov-2021 06:00 ( Eastern )=20 +
11-Nov-2021 05:01 to 11-Nov-2021 11:00 ( GMT )

Backup Date = +
12-Nov-2021 00:01 to 12-Nov-2021 06:00 ( Eastern )=20 +
12-Nov-2021 05:01 to 12-Nov-2021 11:00 ( GMT )=20 + + +

Location of Maintenance: Vero Beach, FL + +

Reason for Maintenance: Service provider will perform deman= +d maintenance to relocate a fiber cable in Vero Beach, FL in order to proac= +tively avoid unplanned outages due to railroad mandated track expansion con= +struction. +GPS: +Location 1: 27.835306, -80.492250 +Location 2: 27.564528, -80.370944 +Location 3: 27.438167, -80.321833 + +

Expected Impact: Service Affecting Activity: Any Maintenan= +ce Activity directly impacting the service(s) of customers. Service(s) are = +expected to go down as a result of these activities. + +

Circuit(s) Affected:
+ + + + + + + + + + + + + + + + +
Circuit IdExpected ImpactA Location AddressZ Location AddressLegacy Circuit Id
/OGYX/123456/ /ZYO /Hard Down - up to 5 hours56 Marietta St NW Atlanta, GA. USA50 NE 9th St Miami, FL. USA
+ + +

Please contact the Zayo Maintenance Team with any questions regardi= +ng this maintenance event. Please reference the Maintenance Ticket number w= +hen calling. + +

Maintenance Team Contacts:

+
+ +

Zayo Global Change Management Team/= +=C3=89quipe de Gestion d= +u Changement Global Zayo

+ +

Zayo | Our Fiber Fuels Global Inn= +ovation

+ +

Toll free/No s= +ans frais: 1.866.236.2824

+ +

United Kingdom Toll Free/No sans +frais Royaume-Uni:<= +/i> 0800.169.1646

+ +

Email/Cou= +rriel: mr@zayo.com<= +/u> 

+ +

Website/Site Web: https://www.zayo.com

+ +

Purpose | Network Map Escalation List LinkedIn <= +/span>Twitter Tranzact&n= +bsp; + +

&nbs= +p;

+ +

This communication is the property of Zayo and may contain confidential= + or privileged information. If you have received this communication in erro= +r, please promptly notify the sender by reply e-mail and destroy all copies= + of the communication and any attachments.

+ +

 

+ +
+ +

+ +--
+You received this message because you are subscribed to the Google Groups &= +quot;Maintenance Notices" group.
+To unsubscribe from this group and stop receiving emails from it, send an e= +mail to maintenance-notices+= +unsubscribe@example.com.
+To view this discussion on the web visit https://groups.google.com/a/example.com/d/msgid/rd-no= +tices/nlUsi000000000000000000000000000000000000000000000R29VYZ00E10tb5A6QCu= +bwKYAh0b2iQ%40sfdc.net.
+ +------=_Part_11015_382650316.1636407326627-- + +------=_Part_11016_1305198674.1636407326627-- diff --git a/tests/unit/data/zayo/zayo4_html_parser_result.json b/tests/unit/data/zayo/zayo4_html_parser_result.json new file mode 100644 index 00000000..d26cd86c --- /dev/null +++ b/tests/unit/data/zayo/zayo4_html_parser_result.json @@ -0,0 +1,17 @@ +[ + { + "account": "Some Customer Inc", + "circuits": [ + { + "circuit_id": "/OGYX/123456/ /ZYO /", + "impact": "OUTAGE" + } + ], + "end": 1636628400, + "maintenance_id": "TTN-0002345678", + "stamp": 1636329600, + "start": 1636606860, + "status": "CONFIRMED", + "summary": "Service provider will perform demand maintenance to relocate a fiber cable in Vero Beach, FL in order to proactively avoid unplanned outages due to railroad mandated track expansion construction.\r\nGPS:\r\nLocation 1: 27.835306, -80.492250\r\nLocation 2: 27.564528, -80.370944\r\nLocation 3: 27.438167, -80.321833" + } +] diff --git a/tests/unit/data/zayo/zayo4_result.json b/tests/unit/data/zayo/zayo4_result.json new file mode 100644 index 00000000..d26cd86c --- /dev/null +++ b/tests/unit/data/zayo/zayo4_result.json @@ -0,0 +1,17 @@ +[ + { + "account": "Some Customer Inc", + "circuits": [ + { + "circuit_id": "/OGYX/123456/ /ZYO /", + "impact": "OUTAGE" + } + ], + "end": 1636628400, + "maintenance_id": "TTN-0002345678", + "stamp": 1636329600, + "start": 1636606860, + "status": "CONFIRMED", + "summary": "Service provider will perform demand maintenance to relocate a fiber cable in Vero Beach, FL in order to proactively avoid unplanned outages due to railroad mandated track expansion construction.\r\nGPS:\r\nLocation 1: 27.835306, -80.492250\r\nLocation 2: 27.564528, -80.370944\r\nLocation 3: 27.438167, -80.321833" + } +] diff --git a/tests/unit/data/zayo/zayo4_subject_parser_result.json b/tests/unit/data/zayo/zayo4_subject_parser_result.json new file mode 100644 index 00000000..5b6762e3 --- /dev/null +++ b/tests/unit/data/zayo/zayo4_subject_parser_result.json @@ -0,0 +1,6 @@ +[ + { + "account": "Some Customer Inc", + "maintenance_id": "TTN-0002345678" + } +] diff --git a/tests/unit/data/zayo/zayo5.eml b/tests/unit/data/zayo/zayo5.eml new file mode 100644 index 00000000..3d162c5a --- /dev/null +++ b/tests/unit/data/zayo/zayo5.eml @@ -0,0 +1,570 @@ +Delivered-To: nautobot.email@example.com +Received: by 2002:a05:7000:1f21:0:0:0:0 with SMTP id hs33csp4178565mab; + Tue, 2 Nov 2021 22:54:02 -0700 (PDT) +X-Received: by 2002:ab0:604f:: with SMTP id o15mr44945525ual.26.1635918842859; + Tue, 02 Nov 2021 22:54:02 -0700 (PDT) +ARC-Seal: i=3; a=rsa-sha256; t=1635918842; cv=pass; + d=google.com; s=arc-20160816; + b=i6yClJ/wcXMxg2gKOaME6M+8yI4n3kFTpr2vOJh3H3lQ5U2HtGi0GtbdJvsmZFsOQG + mFXgxsO5emq/+KS+nBidRZZiNXxut9jlWG8NDygbEYG83fe/H7c/oYbol3KMqH5wwc9h + EaEDPyAu0zT41WhXrsIXlhoKjMo/HJqOl9eZzJRqVptw+KT94eLmYv2d6F1wGQ9MtUjJ + YZBm95kOgLHXI0LVoubp4UELct+UdxYqSQ4c+KtBdOr0M0N0ajyR+2b3/bWsnN0q+9nm + L+WFrtH1jWVSWO/v292Pd8G0+mY3BU+B0uQX9d6CILto8JYIuCgugu+67mwczK4jmaXV + fijA== +ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=list-unsubscribe:list-archive:list-help:list-post:list-id + :mailing-list:precedence:mime-version:subject:message-id:to:from + :date:sender:dkim-signature; + bh=UBBatfNWq2VpXhP1zWomq8WAFToh0RQZIVThuS4+Na0=; + b=p4jMR+thxVPuI/Rj6nkYF0SRz+qFZg1w7krHmidJjIEhSg75Ex0+Vu9GTW9oogfuJI + O75s1zM3BiuU/6WQuyPITp2V896MHxDN3/1jf9L/4XuZ8lONrrGloLolKqzhbEIxUsMX + WHbF7l5pyt7oaDQsMi5WUBqUOwsBQb0mMwUaid2IlKy02i/+xWI7P2YgLT3/JCZGbyZc + UfY36FHQ3Gjg5xtDUnBGEcE8arz7roymFP8Fag0/OcLbXigsEx4rb0Ts90iyw3Nn1l94 + d0cTqs5anFnSLLpoK4w4JaV1kNXFTI1sfHP5PE8e2iV84YK7+j8uhuJPqToACvLtc56x + fJVA== +ARC-Authentication-Results: i=3; mx.google.com; + dkim=pass header.i=@example.com header.s=example header.b=Ii2o7Pgw; + arc=pass (i=2 spf=pass spfdomain=nggz1qayjso6w4.6-79qkeai.na152.bnc.salesforce.com dkim=pass dkdomain=zayo.com dmarc=pass fromdomain=zayo.com); + spf=pass (google.com: domain of maintenance-notices+bncbcyp3io6yejbb56hrcgamgqeagka7pi@example.com designates 209.85.220.97 as permitted sender) smtp.mailfrom=maintenance-notices+bncBCYP3IO6YEJBB56HRCGAMGQEAGKA7PI@example.com; + dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=zayo.com +Return-Path: +Received: from mail-sor-f97.google.com (mail-sor-f97.google.com. [209.85.220.97]) + by mx.google.com with SMTPS id v9sor240954vkn.62.2021.11.02.22.54.02 + for + (Google Transport Security); + Tue, 02 Nov 2021 22:54:02 -0700 (PDT) +Received-SPF: pass (google.com: domain of maintenance-notices+bncbcyp3io6yejbb56hrcgamgqeagka7pi@example.com designates 209.85.220.97 as permitted sender) client-ip=209.85.220.97; +Authentication-Results: mx.google.com; + dkim=pass header.i=@example.com header.s=example header.b=Ii2o7Pgw; + arc=pass (i=2 spf=pass spfdomain=nggz1qayjso6w4.6-79qkeai.na152.bnc.salesforce.com dkim=pass dkdomain=zayo.com dmarc=pass fromdomain=zayo.com); + spf=pass (google.com: domain of maintenance-notices+bncbcyp3io6yejbb56hrcgamgqeagka7pi@example.com designates 209.85.220.97 as permitted sender) smtp.mailfrom=maintenance-notices+bncBCYP3IO6YEJBB56HRCGAMGQEAGKA7PI@example.com; + dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=zayo.com +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20210112; + h=x-gm-message-state:dkim-signature:sender:date:from:to:message-id + :subject:mime-version:x-original-sender + :x-original-authentication-results:precedence:mailing-list:list-id + :list-post:list-help:list-archive:list-unsubscribe; + bh=UBBatfNWq2VpXhP1zWomq8WAFToh0RQZIVThuS4+Na0=; + b=vs/6HffzzHsXWinkiYMVSh99CMOGmbufSRcQ12DS6Lnjri77JJz1P5x7w27oRtWYUn + uoRy8LHzWaaRL+Jj9E4bSfP/ixlmgvTZZuetZ42hiDrNoGdI/OGE87+5JooRTiBg1lkO + UhpBcbnMl1rS2a5fJKBvl7iO4MswDTHXHj4g7r3WWeGsqeIEKLhlLkYs3oH5hzywcwJq + 0EBj6XL2mqc8xMjwpjPmBNhuS8f6Uts5XENo9HnD70B5231EdvnpdQfak8awD1ncGXYK + kt3QLFrDwxlZL97OQkybnCZ4QkdZvo9fsSo4igqzNh+qmr0Yh31ogfWafLHXU1e7OfZt + IvjA== +X-Gm-Message-State: AOAM531yO1P5PrVZJBjwnosCFVB44S2QVZiNauJduw5vH4fvNc6YRYNp + Zkt8wbFemQPGexgmEn5V5upw4qjCvyHvCTWTAZ5c0POOP1blabti +X-Google-Smtp-Source: ABdhPJwxXF+wxcXH02RDgRw1sVcomz4aKBSGgKTGXSyQ807rlHB7RJTw7jY2M5hgj5tZXBv1e6ZHDoNk+1DK +X-Received: by 2002:a05:6122:c8f:: with SMTP id ba15mr1538274vkb.14.1635918842111; + Tue, 02 Nov 2021 22:54:02 -0700 (PDT) +Return-Path: +Received: from netskope.com ([8.36.116.152]) + by smtp-relay.gmail.com with ESMTPS id o14sm226191vkc.13.2021.11.02.22.54.01 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Tue, 02 Nov 2021 22:54:02 -0700 (PDT) +X-Relaying-Domain: example.com +Received: by mail-qk1-f200.google.com with SMTP id bi16-20020a05620a319000b00462d999de94sf1367500qkb.18 + for ; Tue, 02 Nov 2021 22:54:00 -0700 (PDT) +ARC-Seal: i=2; a=rsa-sha256; t=1635918839; cv=pass; + d=google.com; s=arc-20160816; + b=B60yu7FSvoymGndz//cR+EiNorAHE84Ztv123RWi5LXkwqnloG7SGcivFp/u2ujdjG + h3AKZ7HQNuMwP3Uq59Uqg+tnHoL4ZSn1w/HV9rzYBOi2WsLY1Eojhz25Ew0hEDkdtvge + aUD2hc95nEUblWTw+rWnJ3frc+1ZkNjsALigXqWZDlQJ6wqU9KMSeEu3DHuHpytij8X+ + WmBN4qmr7yu0AudieoCtK4Fl4JLLsIdhsRTN1tM6me+gfCi8Acr0lHiXWIWG11Mh2ZlX + WK9kQLp3e7EZiyCokbOHvUuUq0pttKBQIPHQukV5HjPP+WZMCy6i9jdXjUFZNrYWwcci + UstA== +ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=list-unsubscribe:list-archive:list-help:list-post:list-id + :mailing-list:precedence:mime-version:subject:message-id:to:from + :date:sender:dkim-signature; + bh=UBBatfNWq2VpXhP1zWomq8WAFToh0RQZIVThuS4+Na0=; + b=Sd1LftLcN5TUAqfKvp7wusiaBJwaGpX/5sFpj4nF90VkfvSHlx9u/4MDWdGNL63w0d + 4XZkWx8lIiVVcjRjSb8Q1zOTqqbMEdNBUZRuHlETSIi6gTE/enML5oVUP//MY6dZ+9Gp + RmvD5WTaRT1lp2iSxeRA4lJN9vmEsrGXPMBwaXe2eUFvLuc6MW/3NhORNGHw4hfj31qz + 34AfrLeaeyKE7YRli4h7g+tyJY18EcYyAaWYKi6OSfhxDRgI8m2BCotaeeCkvToLPUws + hj6I7XaxmWrWCny48Rh9EW6rEf+ZzRVG2316fSaVY8lSZCsKuvHObpLgo+vZl25DvI3g + 6B+Q== +ARC-Authentication-Results: i=2; mx.google.com; + dkim=pass header.i=@zayo.com header.s=SF112018Alt header.b=pX42Nhcg; + spf=pass (google.com: domain of mr=zayo.com__0-86gzgi0xbjnhkm@nggz1qayjso6w4.6-79qkeai.na152.bnc.salesforce.com designates 13.110.74.206 as permitted sender) smtp.mailfrom="mr=zayo.com__0-86gzgi0xbjnhkm@nggz1qayjso6w4.6-79qkeai.na152.bnc.salesforce.com"; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zayo.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=example.com; s=example; + h=sender:date:from:to:message-id:subject:mime-version + :x-original-sender:x-original-authentication-results:precedence + :mailing-list:list-id:list-post:list-help:list-archive + :list-unsubscribe; + bh=UBBatfNWq2VpXhP1zWomq8WAFToh0RQZIVThuS4+Na0=; + b=Ii2o7Pgws5yTo/x2m6UrRG7T4v6XVgmnrXB0ig4k5IKRbRhjGvjMPvJU5HlkEZjhzy + 7UcvBRPfMs+u3rKxL7sOO3pcPz498X3LFLyDqC+X9bJYaGatIqvEuc00b6qTpMXyIEbV + GZimN0p049McrKG4RAn5c9dqh5AUA7MahyWxM= +Sender: maintenance-notices@example.com +X-Received: by 2002:a05:622a:104:: with SMTP id u4mr42396981qtw.143.1635918839836; + Tue, 02 Nov 2021 22:53:59 -0700 (PDT) +X-Received: by 2002:a05:622a:104:: with SMTP id u4mr42396974qtw.143.1635918839691; + Tue, 02 Nov 2021 22:53:59 -0700 (PDT) +X-BeenThere: maintenance-notices@example.com +Received: by 2002:a05:620a:2724:: with SMTP id b36ls698205qkp.7.gmail; Tue, 02 + Nov 2021 22:53:59 -0700 (PDT) +X-Received: by 2002:a05:620a:2903:: with SMTP id m3mr18741393qkp.452.1635918839026; + Tue, 02 Nov 2021 22:53:59 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1635918839; cv=none; + d=google.com; s=arc-20160816; + b=TxeP1R8wGY77iEOW5OA//H6lr5ZzRQJXOMZuq1qppNNT9CffP+8KNxqVx4SCNEzZWO + E5gtYaQIBt3dFSwmeeTdeJJ4UIvAdoZpzRYduaJ/jV/ivqgeXg/L4/kXQhtffy/qfUTZ + I3ATmvVEvG7AEcx1oiYgAqK48GFG09H2zg9bXJX2t1e33lGYBTI4HcI6ZvXen30IjPEF + A5xCT+7cXSJfYDQXl2VFpOrgyKrNQ6M9ScegQbnidJEC/pK3jtWgV+blh9YUlU/Rpba1 + pi0o0RApfa9GckPvzLKuKZ9gDgo1naIqmRb5MSNblDIugQcM8PVJaQdkUdguw1ae4cum + d5ug== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=mime-version:subject:message-id:to:from:date:dkim-signature; + bh=yCKe9cilxNvAlyj5pFFJvbT6MLuyClQJoODwhPlLEB0=; + b=FWdIFnzFpoc1wyLXoHDUk12q6YW7NeN3pk/vM+/tQSWEM982z4kHe0sZlIMbV/xLT7 + dTjsws0eUNVKbHoZZX3vJqYrkNf7p0S3sbXeu+R+3M7rZhCnVS0iL5ROWk6ck7HRVBMd + nzf3XruBGfWSPWAEmI/A+MPa9YnvaCrUHYvELIrxjOfGxOd+1wqG2oiA9G+n1nu/YPJx + Kzf+vs28ewit0kxKXkCdZNMMXi9zvnjibpr8XQLTs/7JYGicPAj5HFvvz1992kdd7KZo + KRkiwIwkZbGtVKkNBFJnugjcpY/fb1/Bs4tBBWvYCBhanEwjCBsW72wpihj3MDseIgCT + 77eQ== +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@zayo.com header.s=SF112018Alt header.b=pX42Nhcg; + spf=pass (google.com: domain of mr=zayo.com__0-86gzgi0xbjnhkm@nggz1qayjso6w4.6-79qkeai.na152.bnc.salesforce.com designates 13.110.74.206 as permitted sender) smtp.mailfrom="mr=zayo.com__0-86gzgi0xbjnhkm@nggz1qayjso6w4.6-79qkeai.na152.bnc.salesforce.com"; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zayo.com +Received: from smtp15-ia4-sp3.mta.salesforce.com (smtp15-ia4-sp3.mta.salesforce.com. [13.110.74.206]) + by mx.google.com with ESMTPS id w12si1633156qtc.52.2021.11.02.22.53.58 + for + (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); + Tue, 02 Nov 2021 22:53:59 -0700 (PDT) +Received-SPF: pass (google.com: domain of mr=zayo.com__0-86gzgi0xbjnhkm@nggz1qayjso6w4.6-79qkeai.na152.bnc.salesforce.com designates 13.110.74.206 as permitted sender) client-ip=13.110.74.206; +Received: from [10.180.203.152] ([10.180.203.152:50146] helo=na152-app2-29-ia4.ops.sfdc.net) + by mx2-ia4-sp3.mta.salesforce.com (envelope-from ) + (ecelerity 4.2.38.62368 r(Core:release/4.2.38.0)) with ESMTPS (cipher=ECDHE-RSA-AES256-GCM-SHA384 + subject="/C=US/ST=California/L=San Francisco/O=salesforce.com, inc./OU=0:app;1:ia4;2:ia4-sp3;3:na152;4:prod/CN=na152-app2-29-ia4.ops.sfdc.net") + id B2/DE-06158-6F322816; Wed, 03 Nov 2021 05:53:58 +0000 +Date: Wed, 3 Nov 2021 05:53:58 +0000 (GMT) +From: MR Zayo +To: "maintenance-notices@example.com" +Message-ID: +Subject: [maintenance-notices] START MAINTENANCE NOTIFICATION***Some Customer Inc***ZAYO + TTN-0003456789 Courtesy*** +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_23970_1306639044.1635918838585" +X-Priority: 3 +X-SFDC-LK: 00D6000000079Qk +X-SFDC-User: 00560000003fpx3 +X-Sender: postmaster@salesforce.com +X-mail_abuse_inquiries: http://www.salesforce.com/company/abuse.jsp +X-SFDC-TLS-NoRelay: 1 +X-SFDC-Binding: 1WrIRBV94myi25uB +X-SFDC-EmailCategory: apiSingleMail +X-SFDC-Interface: internal +X-Original-Sender: mr@zayo.com +X-Original-Authentication-Results: mx.google.com; dkim=pass + header.i=@zayo.com header.s=SF112018Alt header.b=pX42Nhcg; spf=pass + (google.com: domain of mr=zayo.com__0-86gzgi0xbjnhkm@nggz1qayjso6w4.6-79qkeai.na152.bnc.salesforce.com + designates 13.110.74.206 as permitted sender) smtp.mailfrom="mr=zayo.com__0-86gzgi0xbjnhkm@nggz1qayjso6w4.6-79qkeai.na152.bnc.salesforce.com"; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zayo.com +Precedence: list +Mailing-list: list maintenance-notices@example.com; contact maintenance-notices+owners@example.com +List-ID: +X-Google-Group-Id: 536184160288 +List-Post: , +List-Help: , + +List-Archive: +List-Unsubscribe: , + +x-netskope-inspected: true + +------=_Part_23970_1306639044.1635918838585 +Content-Type: multipart/alternative; + boundary="----=_Part_23969_1713254167.1635918838584" + +------=_Part_23969_1713254167.1635918838584 +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +Dear Zayo Customer, + + +Please be advised that the below scheduled maintenance activity will be com= +mencing momentarily. + + +Maintenance Ticket #: TTN-0003456789 + + + + +Maintenance Window=20 + +1st Activity Date=20 +01-Nov-2021 00:01 to 01-Nov-2021 05:00 ( Mountain )=20 + + 01-Nov-2021 06:01 to 01-Nov-2021 11:00 ( GMT )=20 + +2nd Activity Date=20 +02-Nov-2021 00:01 to 02-Nov-2021 05:00 ( Mountain )=20 + + 02-Nov-2021 06:01 to 02-Nov-2021 11:00 ( GMT )=20 + +3rd Activity Date=20 +03-Nov-2021 00:01 to 03-Nov-2021 05:00 ( Mountain )=20 + + 03-Nov-2021 06:01 to 03-Nov-2021 11:00 ( GMT )=20 + + + +Location of Maintenance: 11011 E Peakview Ave, Englewood, CO + + +Reason for Maintenance: Routine Fiber splice - NO Impact is Expected to you= +r services. This notification is to advise you that we will be entering a s= +plice case that houses live traffic. + + +Circuit(s) Affected:=20 + + +Circuit Id +Expected Impact +A Location Address + +Z Location Address +Legacy Circuit Id + +/OGYX/123456/ /ZYO / +No Expected Impact +624 S Grand Ave Los Angeles, CA. USA +639 E 18th Ave Denver, CO. USA + +/OGYX/234567/ /ZYO / +No Expected Impact +11 Great Oaks Blvd San Jose, CA. USA +350 E Cermak Rd Chicago, IL. USA + + + + +If you have any questions or need any additional information, please contac= +t the MR group at mr@zayo.com or call 866-236-2824. + + +Regards, + + + + +Zayo=C2=A0Global Change Management Team/=C3=89quipe de Gestion du Changemen= +t Global=C2=A0Zayo + +Zayo | Our Fiber Fuels Global Innovation + +Toll free/No=C2=A0sans=C2=A0frais:=C2=A01.866.236.2824 + +United Kingdom Toll Free/No=C2=A0sans +frais Royaume-Uni:=C2=A00800.169.1646 + +Email/Courriel:=C2=A0mr@zayo.com=C2=A0 + +Website/Site Web:=C2=A0https://www.zayo.com + +Purpose=C2=A0|=C2=A0Network Map=C2=A0|=C2=A0Escalation List=C2=A0|=C2=A0Lin= +kedIn=C2=A0|=C2=A0Twitter=C2=A0|=C2=A0Tranzact=C2=A0 + +=C2=A0 + +This communication is the property of Zayo and may contain confidential or = +privileged information. If you have received this communication in error, p= +lease promptly notify the sender by reply e-mail and destroy all copies of = +the communication and any attachments. + +=C2=A0 + +--=20 +You received this message because you are subscribed to the Google Groups "= +Maintenance Notices" group. +To unsubscribe from this group and stop receiving emails from it, send an e= +mail to maintenance-notices+unsubscribe@example.com. +To view this discussion on the web visit https://groups.google.com/a/exampl= +e.com/d/msgid/maintenance-notices/JvKMs0000000000000000000000000000000000000000000= +00R1ZF1D00G_QXdBhZTt2-s07csO3pnA%40sfdc.net. + +------=_Part_23969_1713254167.1635918838584 +Content-Type: text/html; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +Dear Zayo Customer, + +

Please be advised that the below scheduled maintenance activity wil= +l be commencing momentarily. + +

Maintenance Ticket #: TTN-0003456789 + + + +

Maintenance Window

1st Activity Date <= +/b>
01-Nov-2021 00:01 to 01-Nov-2021 05:00 ( Mountain )=20 +
01-Nov-2021 06:01 to 01-Nov-2021 11:00 ( GMT )

2nd Activity Date
02-Nov-2021 00:01 to 02-Nov-2021 05:00 ( Mountain = +)=20 +
02-Nov-2021 06:01 to 02-Nov-2021 11:00 ( GMT )

3rd Activity Date
03-Nov-2021 00:01 to 03-Nov-2021 05:00 ( Mountain = +)=20 +
03-Nov-2021 06:01 to 03-Nov-2021 11:00 ( GMT )=20 + + +

Location of Maintenance: 11011 E Peakview Ave, Englewood, C= +O + +

Reason for Maintenance: Routine Fiber splice - NO Impact is= + Expected to your services. This notification is to advise you that we will= + be entering a splice case that houses live traffic. + +

Circuit(s) Affected:
+ + + + + + + + + + + + + + + + + + + + + + + +
Circuit IdExpected ImpactA Location AddressZ Location AddressLegacy Circuit Id
/OGYX/123456/ /ZYO /No Expected Impact624 S Grand Ave Los Angeles, CA. USA639 E 18th Ave Denver, CO. USA
/OGYX/234567/ /ZYO /No Expected Impact11 Great Oaks Blvd San Jose, CA. USA350 E Cermak Rd Chicago, IL. USA
+ + +

If you have any questions or need any additional information, pleas= +e contact the MR group at mr@zayo.com or call 866-236-2824. + +

Regards,

+
+ +

Zayo Global Change Management Team/= +=C3=89quipe de Gestion d= +u Changement Global Zayo

+ +

Zayo | Our Fiber Fuels Global Inn= +ovation

+ +

Toll free/No s= +ans frais: 1.866.236.2824

+ +

United Kingdom Toll Free/No sans +frais Royaume-Uni:<= +/i> 0800.169.1646

+ +

Email/Cou= +rriel: mr@zayo.com<= +/u> 

+ +

Website/Site Web: https://www.zayo.com

+ +

Purpose | Network Map Escalation List LinkedIn <= +/span>Twitter Tranzact&n= +bsp; + +

&nbs= +p;

+ +

This communication is the property of Zayo and may contain confidential= + or privileged information. If you have received this communication in erro= +r, please promptly notify the sender by reply e-mail and destroy all copies= + of the communication and any attachments.

+ +

 

+ +
+ +

+ +--
+You received this message because you are subscribed to the Google Groups &= +quot;Maintenance Notices" group.
+To unsubscribe from this group and stop receiving emails from it, send an e= +mail to maintenance-notices+= +unsubscribe@example.com.
+To view this discussion on the web visit https://groups.google.com/a/example.com/d/msgid/rd-no= +tices/JvKMs000000000000000000000000000000000000000000000R1ZF1D00G_QXdBhZTt2= +-s07csO3pnA%40sfdc.net.
+ +------=_Part_23969_1713254167.1635918838584-- + +------=_Part_23970_1306639044.1635918838585-- diff --git a/tests/unit/data/zayo/zayo5_html_parser_result.json b/tests/unit/data/zayo/zayo5_html_parser_result.json new file mode 100644 index 00000000..6aaf9397 --- /dev/null +++ b/tests/unit/data/zayo/zayo5_html_parser_result.json @@ -0,0 +1,19 @@ +[ + { + "circuits": [ + { + "circuit_id": "/OGYX/123456/ /ZYO /", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "/OGYX/234567/ /ZYO /", + "impact": "NO-IMPACT" + } + ], + "end": 1635937200, + "maintenance_id": "TTN-0003456789", + "start": 1635746460, + "status": "IN-PROCESS", + "summary": "Routine Fiber splice - NO Impact is Expected to your services. This notification is to advise you that we will be entering a splice case that houses live traffic." + } +] diff --git a/tests/unit/data/zayo/zayo5_result.json b/tests/unit/data/zayo/zayo5_result.json new file mode 100644 index 00000000..34feb2ef --- /dev/null +++ b/tests/unit/data/zayo/zayo5_result.json @@ -0,0 +1,21 @@ +[ + { + "account": "Some Customer Inc", + "circuits": [ + { + "circuit_id": "/OGYX/123456/ /ZYO /", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "/OGYX/234567/ /ZYO /", + "impact": "NO-IMPACT" + } + ], + "end": 1635937200, + "maintenance_id": "TTN-0003456789", + "stamp": 1635918838, + "start": 1635746460, + "status": "IN-PROCESS", + "summary": "Routine Fiber splice - NO Impact is Expected to your services. This notification is to advise you that we will be entering a splice case that houses live traffic." + } +] diff --git a/tests/unit/data/zayo/zayo5_subject_parser_result.json b/tests/unit/data/zayo/zayo5_subject_parser_result.json new file mode 100644 index 00000000..9e648087 --- /dev/null +++ b/tests/unit/data/zayo/zayo5_subject_parser_result.json @@ -0,0 +1,6 @@ +[ + { + "account": "Some Customer Inc", + "maintenance_id": "TTN-0003456789" + } +] diff --git a/tests/unit/data/zayo/zayo6.eml b/tests/unit/data/zayo/zayo6.eml new file mode 100644 index 00000000..898a40fb --- /dev/null +++ b/tests/unit/data/zayo/zayo6.eml @@ -0,0 +1,582 @@ +Delivered-To: nautobot.email@example.com +Received: by 2002:a05:7000:1f21:0:0:0:0 with SMTP id hs33csp4405276mab; + Wed, 3 Nov 2021 03:51:11 -0700 (PDT) +X-Received: by 2002:a63:470b:: with SMTP id u11mr32279100pga.441.1635936671318; + Wed, 03 Nov 2021 03:51:11 -0700 (PDT) +ARC-Seal: i=3; a=rsa-sha256; t=1635936671; cv=pass; + d=google.com; s=arc-20160816; + b=l/1Y2adXK2zDtJmh5WD5ai8qrvj0Ol/LdAkY72m+Tr+0J/SaDst+21NSYQE66MA+hc + 7WG/iHE5V7b5AsLd/N55TYu11zzL81VEf820e2Cd8vGfFXc1esEREvETXwuxYKPxZgXv + ha4ULIafTfBjVIHkfvvSkmZQIZQjpv48XwPsXdpnfpRrSIki1Wg+w81CEhOx1eMW9JVC + ykhgpPC+wLUR5cEjc4p5/sQw/thErU4frO3u7TOjfIY21zgmCQ03tBwV1mGEwxXQe5if + eeCFk2FERT9xcf2EsNG5B1/O2Ht+QlfJEInlPTjBSHpus6zdabGfkjEr940WasaehwWr + Lw2A== +ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=list-unsubscribe:list-archive:list-help:list-post:list-id + :mailing-list:precedence:mime-version:subject:message-id:to:from + :date:sender:dkim-signature; + bh=bUFUI9zftvJ/qkxadbwBcxSzYABAGJ4AWewj0RCLZWc=; + b=NG1Jvb1ia493HVvY7fTzOs2/Ub8+uCuLOywbNbTcOXLaHcUjozcu5Td72Awmc0iOSA + Fv+f8M2pH5EsNAJbm5H1Pj/xRFZjCdlR04cHIKSB8Yd5B1tMU04qmtEDL0Ly0QRTvZeJ + U8COmI02hQ8ma0IfiMdz+VPkhLWv7Wa73NWYyHexv5+hPoI1RgwMC7dFx13QbUQGGLwn + yR89uAriMg8l+E0DEisCbHICP8g2lYHbOHGbaT3KhYn7/WmdAPaJd8jqINzX3VE2yaHx + x0o60M3wIFNk/mtKW/tzmQ/dCkO7/l9ViK5n2IhLkavSEWmqoDHhQB/WZFY3reAz9P9p + 1Glg== +ARC-Authentication-Results: i=3; mx.google.com; + dkim=pass header.i=@example.com header.s=example header.b="T634/s0T"; + arc=pass (i=2 spf=pass spfdomain=esmsujtsgbjba.6-79qkeai.na152.bnc.salesforce.com dkim=pass dkdomain=zayo.com dmarc=pass fromdomain=zayo.com); + spf=pass (google.com: domain of maintenance-notices+bncbcyp3io6yejbbhotrggamgqeqhj7pri@example.com designates 209.85.220.97 as permitted sender) smtp.mailfrom=maintenance-notices+bncBCYP3IO6YEJBBHOTRGGAMGQEQHJ7PRI@example.com; + dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=zayo.com +Return-Path: +Received: from mail-sor-f97.google.com (mail-sor-f97.google.com. [209.85.220.97]) + by mx.google.com with SMTPS id s6sor1032420pfk.85.2021.11.03.03.51.11 + for + (Google Transport Security); + Wed, 03 Nov 2021 03:51:11 -0700 (PDT) +Received-SPF: pass (google.com: domain of maintenance-notices+bncbcyp3io6yejbbhotrggamgqeqhj7pri@example.com designates 209.85.220.97 as permitted sender) client-ip=209.85.220.97; +Authentication-Results: mx.google.com; + dkim=pass header.i=@example.com header.s=example header.b="T634/s0T"; + arc=pass (i=2 spf=pass spfdomain=esmsujtsgbjba.6-79qkeai.na152.bnc.salesforce.com dkim=pass dkdomain=zayo.com dmarc=pass fromdomain=zayo.com); + spf=pass (google.com: domain of maintenance-notices+bncbcyp3io6yejbbhotrggamgqeqhj7pri@example.com designates 209.85.220.97 as permitted sender) smtp.mailfrom=maintenance-notices+bncBCYP3IO6YEJBBHOTRGGAMGQEQHJ7PRI@example.com; + dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=zayo.com +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20210112; + h=x-gm-message-state:dkim-signature:sender:date:from:to:message-id + :subject:mime-version:x-original-sender + :x-original-authentication-results:precedence:mailing-list:list-id + :list-post:list-help:list-archive:list-unsubscribe; + bh=bUFUI9zftvJ/qkxadbwBcxSzYABAGJ4AWewj0RCLZWc=; + b=YuCimHnJzzWUNXPzhTRoNzV8R1q7x/2C3+EU4OAwvsxXao7xqJ+EHrCNuayW2jrM7J + VRHppcJ3sGEX/TjBEXCYk3y39tynYEqAFS9LQasYzJAISOowQZ5TtpVSLKTtckH15uq1 + Q8S3fQars/DFZL+ZO4yrrKXFFwDr/97P3AV5Y5lCk9JDGz+UAJI/RuzYYMGsPu5FsU3Y + j0twINiwQApynq2DimvNKbMcunl//cOaP+LwJvhsOBHRFhnMzFW1MV7A8ZkpH/d5V7FS + 8DhGdXisXeS0t55y78tbjEzDaJgCQabitlwJQRur3J4G4ZYG5DQEzgp7YoRaVJV8KBdD + MHWg== +X-Gm-Message-State: AOAM530ZBsozJksFwUsv5wHr0sPLT+t4w2/aKyTa6IiCd+W5be6zNBdu + BYnLjVVM8/tF5eXXDiUgR9t2A6Ih0mIlWnjeK2Cl9bD+TpDsWnTP +X-Google-Smtp-Source: ABdhPJxAc+ZAZModcVl742c0bXN/2/E4ZMNFZZ8xLzFHheQKwaKnGS6kfvjs3g2xaM06PRDllaN1ExEhylzT +X-Received: by 2002:a05:6a00:230e:b0:44c:4f2d:9b00 with SMTP id h14-20020a056a00230e00b0044c4f2d9b00mr43775784pfh.24.1635936671009; + Wed, 03 Nov 2021 03:51:11 -0700 (PDT) +Return-Path: +Received: from netskope.com ([8.36.116.152]) + by smtp-relay.gmail.com with ESMTPS id mh13sm415101pjb.3.2021.11.03.03.51.10 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Wed, 03 Nov 2021 03:51:10 -0700 (PDT) +X-Relaying-Domain: example.com +Received: by mail-qk1-f199.google.com with SMTP id az10-20020a05620a170a00b00462e059180esf1983676qkb.19 + for ; Wed, 03 Nov 2021 03:51:10 -0700 (PDT) +ARC-Seal: i=2; a=rsa-sha256; t=1635936669; cv=pass; + d=google.com; s=arc-20160816; + b=plphL9A2eSff+KGqsvCJjl2QQvLB3+7kCFiRw8a4P1g3KP7DRN9XMEe+ScLLpPs6B2 + T2BlV7ek7oDEkr85tFMH5IIUmgdaqs3WqQyujgUFXR7eaMsHzJjlBXXf5LyC/bamoSex + XToTb5Si8o23KQigvNo7vKA4r/20JAD0fDgyATqCOfk7VU6Bsgv40B28wzp4J/GHgFma + Ivc7Vri/sWJFvr7Yfl81WJ0NZ4JZP0BC0r2UeZWIoxO2zX/8yna2YqhM5cfKCxYY49v9 + o3zMJsET/QigzhzLOUoD8cFc7uXcUcGQJGOwhENnKKNJt6DGPqrdqZuqhVVrLkAy0+ho + gQzA== +ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=list-unsubscribe:list-archive:list-help:list-post:list-id + :mailing-list:precedence:mime-version:subject:message-id:to:from + :date:sender:dkim-signature; + bh=bUFUI9zftvJ/qkxadbwBcxSzYABAGJ4AWewj0RCLZWc=; + b=YW5uWxw2RtfRCSbSu90QEcUyfR9wzKO/ZOZ5+dQWcLMpMo8FnhOuBVkz/uEz415SEv + Z2KBYYqh/LpNnAcN+L8p+uXx3Z7UUPV3YugX1CiaxN/DFQtz1yBj8L5UpmcX+YYfS5kl + /MqaLhYPQ3b1Ormp6FzSsEKS5aUoLEtLk+qboKfzVGz8ITXUvivei9mrjY07t9XNL8CY + J78afolUKTRo3Jo/nooeQcSKAm9FsQM9LZMt18Y3GfJFLsDQJ9taVPTeti63wMKbjMqc + oUeFVJZk4pO4hHnEAoapB/FB8M5EwgYDu9nrJWVPkXD+q2oAWKlAb3tXf4mHC/OOxHq2 + F8aA== +ARC-Authentication-Results: i=2; mx.google.com; + dkim=pass header.i=@zayo.com header.s=SF112018Alt header.b=v8rSORlJ; + spf=pass (google.com: domain of mr=zayo.com__0-f4ae71z9pyg7x7@esmsujtsgbjba.6-79qkeai.na152.bnc.salesforce.com designates 13.110.74.198 as permitted sender) smtp.mailfrom="mr=zayo.com__0-f4ae71z9pyg7x7@esmsujtsgbjba.6-79qkeai.na152.bnc.salesforce.com"; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zayo.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=example.com; s=example; + h=sender:date:from:to:message-id:subject:mime-version + :x-original-sender:x-original-authentication-results:precedence + :mailing-list:list-id:list-post:list-help:list-archive + :list-unsubscribe; + bh=bUFUI9zftvJ/qkxadbwBcxSzYABAGJ4AWewj0RCLZWc=; + b=T634/s0T3yrtgwvobSZ5mBnN5R2DMrLQYOWtA4Pe09NbNh+uG30Sr5MI6SnY8TdxxJ + RuD1FisJcg+tIJqMYJqv0MDSo++qLLiLu00m/IKNTY1zytS0dfVr9EpGvvxi9wvUv/cZ + ruxNSMewmGBdtG14Odk4WalvqeTDv56mhs/Zs= +Sender: maintenance-notices@example.com +X-Received: by 2002:a05:620a:27c3:: with SMTP id i3mr2186597qkp.442.1635936669732; + Wed, 03 Nov 2021 03:51:09 -0700 (PDT) +X-Received: by 2002:a05:620a:27c3:: with SMTP id i3mr2186586qkp.442.1635936669571; + Wed, 03 Nov 2021 03:51:09 -0700 (PDT) +X-BeenThere: maintenance-notices@example.com +Received: by 2002:ac8:5ad0:: with SMTP id d16ls1078299qtd.9.gmail; Wed, 03 Nov + 2021 03:51:09 -0700 (PDT) +X-Received: by 2002:a05:622a:2:: with SMTP id x2mr3247943qtw.409.1635936668957; + Wed, 03 Nov 2021 03:51:08 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1635936668; cv=none; + d=google.com; s=arc-20160816; + b=qv/2Uz6bj9/okkOsWe+sF4sUAVeBmyTCFLpARhy7NGD8gsVgoVDIaAmW8tY4ZUiclU + aUjyP9OmFBS5FnG29y60ZSUqLldiqV+Fs8U2mn0Rb+keRZRD8da0V1e1XDwMsYZZV0AE + dEcNX96mkN0YXTRLMGH9QeKsJqLUI8/3ooMLWe4EkwcgZ7uGs1BiRCOlrEesPhDfPTGZ + LJqAE4gFm7+2CRadNfottUkilGoNAdhpBZE4IcAocgmOdgbUhT3/wPz+ZtpL58kvHAX5 + Wlgw1iiSCCryQ+4AF6SSBnKbk18HJkX69XbJCEiStshUgokS+1hvdDsI8TZMINmTNBWV + 9wzQ== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=mime-version:subject:message-id:to:from:date:dkim-signature; + bh=bgf+IqaUX3TRCjQoVi3JJ7QlhEqISfbL3q7YZADzuSA=; + b=0RzyiGXiN0eEU6cbav/vIqQAaxeEzU+PNHOaqdJJk8dgK0GnpHndHaYQd6A+ZpAKso + RWCacVwzU2AI1c4pPKOhRZKFvlOhIItPqaVe9TSuSgTi8bubpESDlcxO9rzduXoLHCUN + un2kHRAVcEABquv0pYXOsf9poA5Bo9RJ8QNN5LNSJ2CTcwTIYorkowDQ4kOYzxNZH1bg + hFOiNzVIOFNzZfHc4l3oS8zSjRyJK+ttb5G9+mCc4m3JMmZnlBAL3XOi88ATQJeBUrvt + Y3UQi2aIldVHd8OK63QuykzxvqU93wilKMQLIAXwZjgLK6DSuvaFcFHixYpxqOcqLFng + veDg== +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@zayo.com header.s=SF112018Alt header.b=v8rSORlJ; + spf=pass (google.com: domain of mr=zayo.com__0-f4ae71z9pyg7x7@esmsujtsgbjba.6-79qkeai.na152.bnc.salesforce.com designates 13.110.74.198 as permitted sender) smtp.mailfrom="mr=zayo.com__0-f4ae71z9pyg7x7@esmsujtsgbjba.6-79qkeai.na152.bnc.salesforce.com"; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zayo.com +Received: from smtp07-ia4-sp3.mta.salesforce.com (smtp07-ia4-sp3.mta.salesforce.com. [13.110.74.198]) + by mx.google.com with ESMTPS id m4si2335410qtw.401.2021.11.03.03.51.08 + for + (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); + Wed, 03 Nov 2021 03:51:08 -0700 (PDT) +Received-SPF: pass (google.com: domain of mr=zayo.com__0-f4ae71z9pyg7x7@esmsujtsgbjba.6-79qkeai.na152.bnc.salesforce.com designates 13.110.74.198 as permitted sender) client-ip=13.110.74.198; +Received: from [10.180.203.115] ([10.180.203.115:40278] helo=na152-app2-40-ia4.ops.sfdc.net) + by mx1-ia4-sp3.mta.salesforce.com (envelope-from ) + (ecelerity 4.2.38.62368 r(Core:release/4.2.38.0)) with ESMTPS (cipher=ECDHE-RSA-AES256-GCM-SHA384 + subject="/C=US/ST=California/L=San Francisco/O=salesforce.com, inc./OU=0:app;1:ia4;2:ia4-sp3;3:na152;4:prod/CN=na152-app2-40-ia4.ops.sfdc.net") + id 91/A8-06133-C9962816; Wed, 03 Nov 2021 10:51:08 +0000 +Date: Wed, 3 Nov 2021 10:51:08 +0000 (GMT) +From: MR Zayo +To: "maintenance-notices@example.com" +Message-ID: +Subject: [maintenance-notices] COMPLETED MAINTENANCE NOTIFICATION***Some Customer + Inc***ZAYO TTN-0004567890 Courtesy*** +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_19559_1696384994.1635936668672" +X-Priority: 3 +X-SFDC-LK: 00D6000000079Qk +X-SFDC-User: 00560000003fpx3 +X-Sender: postmaster@salesforce.com +X-mail_abuse_inquiries: http://www.salesforce.com/company/abuse.jsp +X-SFDC-TLS-NoRelay: 1 +X-SFDC-Binding: 1WrIRBV94myi25uB +X-SFDC-EmailCategory: apiSingleMail +X-SFDC-Interface: internal +X-Original-Sender: mr@zayo.com +X-Original-Authentication-Results: mx.google.com; dkim=pass + header.i=@zayo.com header.s=SF112018Alt header.b=v8rSORlJ; spf=pass + (google.com: domain of mr=zayo.com__0-f4ae71z9pyg7x7@esmsujtsgbjba.6-79qkeai.na152.bnc.salesforce.com + designates 13.110.74.198 as permitted sender) smtp.mailfrom="mr=zayo.com__0-f4ae71z9pyg7x7@esmsujtsgbjba.6-79qkeai.na152.bnc.salesforce.com"; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zayo.com +Precedence: list +Mailing-list: list maintenance-notices@example.com; contact maintenance-notices+owners@example.com +List-ID: +X-Google-Group-Id: 536184160288 +List-Post: , +List-Help: , + +List-Archive: +List-Unsubscribe: , + +x-netskope-inspected: true + +------=_Part_19559_1696384994.1635936668672 +Content-Type: multipart/alternative; + boundary="----=_Part_19558_243007928.1635936668672" + +------=_Part_19558_243007928.1635936668672 +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +Dear Zayo Customer, + + +Please be advised that the scheduled maintenance window has been completed = +in its entirety for this event. + +If your services are still being impacted please take a moment to review th= +e service and bounce any interfaces that may have been impacted. In the eve= +nt that this does not fully restore your service please contact the Zayo NC= +C at 866-236-2824 or at zayoncc@zayo.com. + + +Maintenance Ticket #: TTN-0004567890 + + + + +Maintenance Window=20 + +1st Activity Date=20 +01-Nov-2021 00:01 to 01-Nov-2021 05:00 ( Mountain )=20 + + 01-Nov-2021 06:01 to 01-Nov-2021 11:00 ( GMT )=20 + +2nd Activity Date=20 +02-Nov-2021 00:01 to 02-Nov-2021 05:00 ( Mountain )=20 + + 02-Nov-2021 06:01 to 02-Nov-2021 11:00 ( GMT )=20 + +3rd Activity Date=20 +03-Nov-2021 00:01 to 03-Nov-2021 05:00 ( Mountain )=20 + + 03-Nov-2021 06:01 to 03-Nov-2021 11:00 ( GMT )=20 + + + +Location of Maintenance: 11011 E Peakview Ave, Englewood, CO + + +Reason for Maintenance: Routine Fiber splice - NO Impact is Expected to you= +r services. This notification is to advise you that we will be entering a s= +plice case that houses live traffic. + + +Circuit(s) Affected:=20 + + +Circuit Id +Expected Impact +A Location Address + +Z Location Address +Legacy Circuit Id + +/OGYX/123418/ /ZYO / +No Expected Impact +624 S Grand Ave Los Angeles, CA. USA +639 E 18th Ave Denver, CO. USA + +/OGYX/123408/ /ZYO / +No Expected Impact +11 Great Oaks Blvd San Jose, CA. USA +350 E Cermak Rd Chicago, IL. USA + + + + +If you have any questions or need any additional information related to thi= +s maintenance event, please contact the MR group at mr@zayo.com or call 866= +-236-2824. + + +Regards, + + + + +Zayo=C2=A0Global Change Management Team/=C3=89quipe de Gestion du Changemen= +t Global=C2=A0Zayo + +Zayo | Our Fiber Fuels Global Innovation + +Toll free/No=C2=A0sans=C2=A0frais:=C2=A01.866.236.2824 + +United Kingdom Toll Free/No=C2=A0sans +frais Royaume-Uni:=C2=A00800.169.1646 + +Email/Courriel:=C2=A0mr@zayo.com=C2=A0 + +Website/Site Web:=C2=A0https://www.zayo.com + +Purpose=C2=A0|=C2=A0Network Map=C2=A0|=C2=A0Escalation List=C2=A0|=C2=A0Lin= +kedIn=C2=A0|=C2=A0Twitter=C2=A0|=C2=A0Tranzact=C2=A0 + +=C2=A0 + +This communication is the property of Zayo and may contain confidential or = +privileged information. If you have received this communication in error, p= +lease promptly notify the sender by reply e-mail and destroy all copies of = +the communication and any attachments. + +=C2=A0 + +--=20 +You received this message because you are subscribed to the Google Groups "= +Maintenance Notices" group. +To unsubscribe from this group and stop receiving emails from it, send an e= +mail to maintenance-notices+unsubscribe@example.com. +To view this discussion on the web visit https://groups.google.com/a/exampl= +e.com/d/msgid/maintenance-notices/ev1IT0000000000000000000000000000000000000000000= +00R1ZSSJ00w2nwuH24QlKuzlBcdHydZw%40sfdc.net. + +------=_Part_19558_243007928.1635936668672 +Content-Type: text/html; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +Dear Zayo Customer, + +

Please be advised that the scheduled maintenance window has been co= +mpleted in its entirety for this event. +

If your services are still being impacted pl= +ease take a moment to review the service and bounce any interfaces that may= + have been impacted. In the event that this does not fully restore your se= +rvice please contact the Zayo NCC at 866-236-2824 or at zayoncc@zayo.com= +. + +

Maintenance Ticket #: TTN-0004567890 + + + +

Maintenance Window

1st Activity Date <= +/b>
01-Nov-2021 00:01 to 01-Nov-2021 05:00 ( Mountain )=20 +
01-Nov-2021 06:01 to 01-Nov-2021 11:00 ( GMT )

2nd Activity Date
02-Nov-2021 00:01 to 02-Nov-2021 05:00 ( Mountain = +)=20 +
02-Nov-2021 06:01 to 02-Nov-2021 11:00 ( GMT )

3rd Activity Date
03-Nov-2021 00:01 to 03-Nov-2021 05:00 ( Mountain = +)=20 +
03-Nov-2021 06:01 to 03-Nov-2021 11:00 ( GMT )=20 + + +

Location of Maintenance: 11011 E Peakview Ave, Englewood, C= +O + +

Reason for Maintenance: Routine Fiber splice - NO Impact is= + Expected to your services. This notification is to advise you that we will= + be entering a splice case that houses live traffic. + +

Circuit(s) Affected:
+ + + + + + + + + + + + + + + + + + + + + + + +
Circuit IdExpected ImpactA Location AddressZ Location AddressLegacy Circuit Id
/OGYX/123418/ /ZYO /No Expected Impact624 S Grand Ave Los Angeles, CA. USA639 E 18th Ave Denver, CO. USA
/OGYX/123408/ /ZYO /No Expected Impact11 Great Oaks Blvd San Jose, CA. USA350 E Cermak Rd Chicago, IL. USA
+ + +

If you have any questions or need any additional information relate= +d to this maintenance event, please contact the MR group at mr@zayo.com or = +call 866-236-2824. + +

Regards,

+
+ +

Zayo Global Change Management Team/= +=C3=89quipe de Gestion d= +u Changement Global Zayo

+ +

Zayo | Our Fiber Fuels Global Inn= +ovation

+ +

Toll free/No s= +ans frais: 1.866.236.2824

+ +

United Kingdom Toll Free/No sans +frais Royaume-Uni:<= +/i> 0800.169.1646

+ +

Email/Cou= +rriel: mr@zayo.com<= +/u> 

+ +

Website/Site Web: https://www.zayo.com

+ +

Purpose | Network Map Escalation List LinkedIn <= +/span>Twitter Tranzact&n= +bsp; + +

&nbs= +p;

+ +

This communication is the property of Zayo and may contain confidential= + or privileged information. If you have received this communication in erro= +r, please promptly notify the sender by reply e-mail and destroy all copies= + of the communication and any attachments.

+ +

 

+ +
+ +

+ +--
+You received this message because you are subscribed to the Google Groups &= +quot;Maintenance Notices" group.
+To unsubscribe from this group and stop receiving emails from it, send an e= +mail to maintenance-notices+= +unsubscribe@example.com.
+To view this discussion on the web visit https://groups.google.com/a/example.com/d/msgid/rd-no= +tices/ev1IT000000000000000000000000000000000000000000000R1ZSSJ00w2nwuH24QlK= +uzlBcdHydZw%40sfdc.net.
+ +------=_Part_19558_243007928.1635936668672-- + +------=_Part_19559_1696384994.1635936668672-- diff --git a/tests/unit/data/zayo/zayo6_html_parser_result.json b/tests/unit/data/zayo/zayo6_html_parser_result.json new file mode 100644 index 00000000..6fc7f11c --- /dev/null +++ b/tests/unit/data/zayo/zayo6_html_parser_result.json @@ -0,0 +1,19 @@ +[ + { + "circuits": [ + { + "circuit_id": "/OGYX/123418/ /ZYO /", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "/OGYX/123408/ /ZYO /", + "impact": "NO-IMPACT" + } + ], + "end": 1635937200, + "maintenance_id": "TTN-0004567890", + "start": 1635746460, + "status": "COMPLETED", + "summary": "Routine Fiber splice - NO Impact is Expected to your services. This notification is to advise you that we will be entering a splice case that houses live traffic." + } +] diff --git a/tests/unit/data/zayo/zayo6_result.json b/tests/unit/data/zayo/zayo6_result.json new file mode 100644 index 00000000..372d9776 --- /dev/null +++ b/tests/unit/data/zayo/zayo6_result.json @@ -0,0 +1,21 @@ +[ + { + "account": "Some Customer Inc", + "circuits": [ + { + "circuit_id": "/OGYX/123418/ /ZYO /", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "/OGYX/123408/ /ZYO /", + "impact": "NO-IMPACT" + } + ], + "end": 1635937200, + "maintenance_id": "TTN-0004567890", + "stamp": 1635936668, + "start": 1635746460, + "status": "COMPLETED", + "summary": "Routine Fiber splice - NO Impact is Expected to your services. This notification is to advise you that we will be entering a splice case that houses live traffic." + } +] diff --git a/tests/unit/data/zayo/zayo6_subject_parser_result.json b/tests/unit/data/zayo/zayo6_subject_parser_result.json new file mode 100644 index 00000000..243a2be9 --- /dev/null +++ b/tests/unit/data/zayo/zayo6_subject_parser_result.json @@ -0,0 +1,6 @@ +[ + { + "account": "Some Customer Inc", + "maintenance_id": "TTN-0004567890" + } +] diff --git a/tests/unit/test_e2e.py b/tests/unit/test_e2e.py index 7de77784..cb2cc21d 100644 --- a/tests/unit/test_e2e.py +++ b/tests/unit/test_e2e.py @@ -328,6 +328,21 @@ Zayo, [("html", Path(dir_path, "data", "zayo", "zayo3.eml")),], [Path(dir_path, "data", "zayo", "zayo3_result.json"),], + ), + ( + Zayo, + [("email", Path(dir_path, "data", "zayo", "zayo4.eml")),], + [Path(dir_path, "data", "zayo", "zayo4_result.json"),], + ), + ( + Zayo, + [("email", Path(dir_path, "data", "zayo", "zayo5.eml")),], + [Path(dir_path, "data", "zayo", "zayo5_result.json"),], + ), + ( + Zayo, + [("email", Path(dir_path, "data", "zayo", "zayo6.eml")),], + [Path(dir_path, "data", "zayo", "zayo6_result.json"),], ), # pylint: disable=too-many-locals ], ) @@ -451,7 +466,7 @@ def test_provider_get_maintenances(provider_class, test_data_files, result_parse """\ Failed creating Maintenance notification for Zayo. Details: -- Processor SimpleProcessor from Zayo failed due to: 1 validation error for Maintenance +- Processor CombinedProcessor from Zayo failed due to: 1 validation error for Maintenance maintenance_id field required (type=value_error.missing) """, @@ -464,7 +479,7 @@ def test_provider_get_maintenances(provider_class, test_data_files, result_parse """\ Failed creating Maintenance notification for Zayo. Details: -- Processor SimpleProcessor from Zayo failed due to: HtmlParserZayo1 parser was not able to extract the expected data for each maintenance. +- Processor CombinedProcessor from Zayo failed due to: HtmlParserZayo1 parser was not able to extract the expected data for each maintenance. - Raw content: b'aaa' - Result: [{}] """, diff --git a/tests/unit/test_parsers.py b/tests/unit/test_parsers.py index 27ca1324..09c4005f 100644 --- a/tests/unit/test_parsers.py +++ b/tests/unit/test_parsers.py @@ -28,7 +28,7 @@ from circuit_maintenance_parser.parsers.telstra import HtmlParserTelstra1 from circuit_maintenance_parser.parsers.turkcell import HtmlParserTurkcell1 from circuit_maintenance_parser.parsers.verizon import HtmlParserVerizon1 -from circuit_maintenance_parser.parsers.zayo import HtmlParserZayo1 +from circuit_maintenance_parser.parsers.zayo import SubjectParserZayo1, HtmlParserZayo1 dir_path = os.path.dirname(os.path.realpath(__file__)) @@ -256,6 +256,36 @@ Path(dir_path, "data", "zayo", "zayo3.eml"), Path(dir_path, "data", "zayo", "zayo3_result.json"), ), + ( + HtmlParserZayo1, + Path(dir_path, "data", "zayo", "zayo4.eml"), + Path(dir_path, "data", "zayo", "zayo4_html_parser_result.json"), + ), + ( + SubjectParserZayo1, + Path(dir_path, "data", "zayo", "zayo4.eml"), + Path(dir_path, "data", "zayo", "zayo4_subject_parser_result.json"), + ), + ( + HtmlParserZayo1, + Path(dir_path, "data", "zayo", "zayo5.eml"), + Path(dir_path, "data", "zayo", "zayo5_html_parser_result.json"), + ), + ( + SubjectParserZayo1, + Path(dir_path, "data", "zayo", "zayo5.eml"), + Path(dir_path, "data", "zayo", "zayo5_subject_parser_result.json"), + ), + ( + HtmlParserZayo1, + Path(dir_path, "data", "zayo", "zayo6.eml"), + Path(dir_path, "data", "zayo", "zayo6_html_parser_result.json"), + ), + ( + SubjectParserZayo1, + Path(dir_path, "data", "zayo", "zayo6.eml"), + Path(dir_path, "data", "zayo", "zayo6_subject_parser_result.json"), + ), # Email Date ( EmailDateParser, From 69c4415c4770253760d9232500325f83f360dcfc Mon Sep 17 00:00:00 2001 From: Glenn Matthews Date: Wed, 17 Nov 2021 10:14:47 -0500 Subject: [PATCH 3/8] Support additional possible statuses for Telstra notifications (#110) --- circuit_maintenance_parser/parsers/telstra.py | 10 +- tests/unit/data/telstra/telstra3.html | 200 ++++++++++++++++ tests/unit/data/telstra/telstra3_result.json | 16 ++ tests/unit/data/telstra/telstra4.html | 206 +++++++++++++++++ tests/unit/data/telstra/telstra4_result.json | 16 ++ tests/unit/data/telstra/telstra5.html | 216 ++++++++++++++++++ tests/unit/data/telstra/telstra5_result.json | 17 ++ tests/unit/data/telstra/telstra6.html | 201 ++++++++++++++++ tests/unit/data/telstra/telstra6_result.json | 16 ++ tests/unit/test_e2e.py | 44 ++++ tests/unit/test_parsers.py | 20 ++ 11 files changed, 960 insertions(+), 2 deletions(-) create mode 100644 tests/unit/data/telstra/telstra3.html create mode 100644 tests/unit/data/telstra/telstra3_result.json create mode 100644 tests/unit/data/telstra/telstra4.html create mode 100644 tests/unit/data/telstra/telstra4_result.json create mode 100644 tests/unit/data/telstra/telstra5.html create mode 100644 tests/unit/data/telstra/telstra5_result.json create mode 100644 tests/unit/data/telstra/telstra6.html create mode 100644 tests/unit/data/telstra/telstra6_result.json diff --git a/circuit_maintenance_parser/parsers/telstra.py b/circuit_maintenance_parser/parsers/telstra.py index 713fece6..c43da5ea 100644 --- a/circuit_maintenance_parser/parsers/telstra.py +++ b/circuit_maintenance_parser/parsers/telstra.py @@ -27,10 +27,16 @@ def parse_tables(self, tables: ResultSet, data: Dict): for table in tables: for td_element in table.find_all("td"): # TODO: We should find a more consistent way to parse the status of a maintenance note - if "Planned Maintenance has been scheduled" in td_element.text: + if "maintenance has been scheduled" in td_element.text.lower(): data["status"] = Status("CONFIRMED") - elif "This is a reminder notification to notify that a planned maintenance" in td_element.text: + elif "this is a reminder notification to notify that a planned maintenance" in td_element.text.lower(): data["status"] = Status("CONFIRMED") + elif "has been completed" in td_element.text.lower(): + data["status"] = Status("COMPLETED") + elif "has been amended" in td_element.text.lower(): + data["status"] = Status("RE-SCHEDULED") + elif "has been withdrawn" in td_element.text.lower(): + data["status"] = Status("CANCELLED") else: continue break diff --git a/tests/unit/data/telstra/telstra3.html b/tests/unit/data/telstra/telstra3.html new file mode 100644 index 00000000..6721ba47 --- /dev/null +++ b/tests/unit/data/telstra/telstra3.html @@ -0,0 +1,200 @@ + + + + +Maintenance - Telstra + + + + + + + + +
+ + + + +
+ + + + + +
3D"Telstra"
+ + + + + + + + + + + +
Emergency Mai= +ntenance Notification
Service Impacti= +ng
Emergency Mai= +ntenance has been scheduled that will impact your service.
+
+ + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
To: Some Customer
Attention: some engineer ,some user
 
Email :@some.engineer@team.telstra.com,some.user@somecustomer.com
 
Change Reference: PN123456
 
Maintenance Window: 17-Nov-2021 13:29:00(UTC) to = +17-Nov-2021 19:30:00(UTC)
Expected Impact: 1 hour outage during the chan= +ge window
 
Maintenance Details:
 
Telstra Emergency Maintenance Activity - 2345678= +
 
Telstra will perform an emergency maintenance ac= +tivity for Optic Fibre relocation/repair work - Australia
 
Service(s) Impacted:SNG SYD EPL 9876543
 
Click here If you have any que= +stions, comments or concerns regarding this maintenance activity or telepho= +ne Global 800: +800 8448 8888* or Direct: +852 3192 7420
 
Click here for immediate infor= +mation on planned maintenance or viewing your historical planned maintenanc= +e tickets details via our Telstra Connect Portal using your email ID as log= +in.
 
+ Click here to email us about a= +ny updates to your contact details or requesting access to Telstra Connect = +Portal. +
+
+ +
+ + diff --git a/tests/unit/data/telstra/telstra3_result.json b/tests/unit/data/telstra/telstra3_result.json new file mode 100644 index 00000000..5e6298e6 --- /dev/null +++ b/tests/unit/data/telstra/telstra3_result.json @@ -0,0 +1,16 @@ +[ + { + "account": "Some Customer", + "circuits": [ + { + "circuit_id": "SNG SYD EPL 9876543", + "impact": "OUTAGE" + } + ], + "end": 1637177400, + "maintenance_id": "PN123456", + "start": 1637155740, + "status": "CONFIRMED", + "summary": "Telstra Emergency Maintenance Activity - 2345678. Telstra will perform an emergency maintenance activity for Optic Fibre relocation/repair work - Australia" + } +] diff --git a/tests/unit/data/telstra/telstra4.html b/tests/unit/data/telstra/telstra4.html new file mode 100644 index 00000000..4079dd62 --- /dev/null +++ b/tests/unit/data/telstra/telstra4.html @@ -0,0 +1,206 @@ + + + + +Maintenance - Telstra + + + + + + + + +
+ + + + +
+ + + + + +
3D"Telstra"
+ + + + + + + + + + + +
Planned Maint= +enance Completion
Service Impacti= +ng
Planned Maint= +enance has been completed - Successful
+
+ + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
To: Some Customer
Attention: some engineer ,some user
 
Email :@some.engineer@team.telstra.com,some.user@somecustomer.com
 
Change Reference: PN234567
 
Maintenance Window: 13-Nov-2021 15:30:00(UTC) to = +13-Nov-2021 23:00:00(UTC)
Expected Impact: 7-10 min outage within the ch= +ange window
 
Maintenance Details:
 
Taiwan Mobile Essential Maintenance Notification= + 9876543
 
Taiwan Mobile to carry out network maintenance o= +perations ro improve network performance and stability. Impact Time: 2021/1= +1/14 02:00 ~ 2021/11/14 02:30 Local
 
Service(s) Impacted:SNG TPE EPL 9999999
 
Click here If you have any que= +stions, comments or concerns regarding this maintenance activity or telepho= +ne Global 800: +800 8448 8888* or Direct: +852 3192 7420
 
Click here for immediate infor= +mation on planned maintenance or viewing your historical planned maintenanc= +e tickets details via our Telstra Connect Portal using your email ID as log= +in.
 
+ Click here to email us about a= +ny updates to your contact details or requesting access to Telstra Connect = +Portal. +
+
+ +
+ + diff --git a/tests/unit/data/telstra/telstra4_result.json b/tests/unit/data/telstra/telstra4_result.json new file mode 100644 index 00000000..90f9b984 --- /dev/null +++ b/tests/unit/data/telstra/telstra4_result.json @@ -0,0 +1,16 @@ +[ + { + "account": "Some Customer", + "circuits": [ + { + "circuit_id": "SNG TPE EPL 9999999", + "impact": "OUTAGE" + } + ], + "end": 1636844400, + "maintenance_id": "PN234567", + "start": 1636817400, + "status": "COMPLETED", + "summary": "Taiwan Mobile Essential Maintenance Notification 9876543. Taiwan Mobile to carry out network maintenance operations ro improve network performance and stability. Impact Time: 2021/11/14 02:00 ~ 2021/11/14 02:30 Local" + } +] diff --git a/tests/unit/data/telstra/telstra5.html b/tests/unit/data/telstra/telstra5.html new file mode 100644 index 00000000..31e579b2 --- /dev/null +++ b/tests/unit/data/telstra/telstra5.html @@ -0,0 +1,216 @@ + + + + +Maintenance - Telstra + + + + + + + + +
+ + + + +
+ + + + + +
3D"Telstra"
+ + + + + + + + + + + +
Planned Maint= +enance Amendment
Service Impacti= +ng
Planned Maint= +enance has been amended that will impact your service. +
Telstra wishes to apologise for the short notice and an= +y inconvenience caused.
+
+ + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
To: Some Customer
Attention: some engineer ,some user
 
Email :@some.engineer.2@team.telstra.com,some.user@somecustomer.com
 
Change Reference: PN234567
 
Maintenance Window: 16-Nov-2021 02:00:00(UTC) to = +23-Nov-2021 12:00:00(UTC)
Expected Impact: Loss of service for the full = +duration of the change window
 
Maintenance Details:
 
Telstra EAC2 Segment 2B1 (Taiwan - Philippines) = +Submarine Cable Work
 
This is to notify that Telstra will be conductin= +g Repeater R23 Replacement Work on EAC2 Segment 2B1 (Taiwan - Philippines) = +due to 1x Single Fiber Pair #4 Fault OPS19. Unprotected circuits will be do= +wn throughout the repair window. Schedule of this work may change as they a= +re dependent on many outside factors (weather / rough sea / permits/ hostil= +e waters etc) which are beyond Telstra control. Our sincere apologies for a= +ny inconvenience caused. +** Update 1: Repair will be start on 21 Oct due to delay on Cableship arriv= +al to the fault ground ** +** Update 2: Repair will be start on 23 Oct, delay due to stevedore issues = +(Unloading and Loading works) ** +** Update 3: Repair was delayed to 6 Nov (tentative) as priority has been g= +iven to EAC Segment D Fault Repair ** +** Update 4: Repair has been moved due to high priority on repairs for Serv= +ice Impacting Cable Faults on EAC Segment C and D ** +** Update 5: Repair has been moved from 16 Nov to the new date stated ** +** Update 6: Repair schedule has been amended as 16 Nov to 23 Nov**
 
Service(s) Impacted:MNL TPE EPL 9999999
 
Click here If you have any que= +stions, comments or concerns regarding this maintenance activity or telepho= +ne Global 800: +800 8448 8888* or Direct: +852 3192 7420
 
Click here for immediate infor= +mation on planned maintenance or viewing your historical planned maintenanc= +e tickets details via our Telstra Connect Portal using your email ID as log= +in.
 
+ Click here to email us about a= +ny updates to your contact details or requesting access to Telstra Connect = +Portal. +
+
+ +
+ + diff --git a/tests/unit/data/telstra/telstra5_result.json b/tests/unit/data/telstra/telstra5_result.json new file mode 100644 index 00000000..5cd473aa --- /dev/null +++ b/tests/unit/data/telstra/telstra5_result.json @@ -0,0 +1,17 @@ +[ + { + "account": "Some Customer", + "circuits": [ + { + "circuit_id": "MNL TPE EPL 9999999", + "impact": "OUTAGE" + } + ], + "end": 1637668800, + "maintenance_id": "PN234567", + "start": 1637028000, + "status": "RE-SCHEDULED", + "summary": "Telstra EAC2 Segment 2B1 (Taiwan - Philippines) Submarine Cable Work. This is to notify that Telstra will be conducting Repeater R23 Replacement Work on EAC2 Segment 2B1 (Taiwan - Philippines) due to 1x Single Fiber Pair #4 Fault OPS19. Unprotected circuits will be down throughout the repair window. Schedule of this work may change as they are dependent on many outside factors (weather / rough sea / permits/ hostile waters etc) which are beyond Telstra control. Our sincere apologies for any inconvenience caused.\r\n** Update 1: Repair will be start on 21 Oct due to delay on Cableship arrival to the fault ground **\r\n** Update 2: Repair will be start on 23 Oct, delay due to stevedore issues (Unloading and Loading works) **\r\n** Update 3: Repair was delayed to 6 Nov (tentative) as priority has been given to EAC Segment D Fault Repair **\r\n** Update 4: Repair has been moved due to high priority on repairs for Service Impacting Cable Faults on EAC Segment C and D **\r\n** Update 5: Repair has been moved from 16 Nov to the new date stated **\r\n** Update 6: Repair schedule has been amended as 16 Nov to 23 Nov**" + } +] + diff --git a/tests/unit/data/telstra/telstra6.html b/tests/unit/data/telstra/telstra6.html new file mode 100644 index 00000000..f7c3ae7f --- /dev/null +++ b/tests/unit/data/telstra/telstra6.html @@ -0,0 +1,201 @@ + + + + +Maintenance - Telstra + + + + + + + + +
+ + + + +
+ + + + + +
3D"Telstra"
+ + + + + + + + + + + +
Planned Maint= +enance Withdrawn
Service Impacti= +ng
Planned Maint= +enance has been withdrawn - .
+
+ + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
To: Some Customer
Attention: some engineer ,some user
 
Email :@some.engineer@team.telstra.com,some.user@somecustomer.com
 
Change Reference: PN234567
 
Maintenance Window: 10-Nov-2021 22:00:00(UTC) to = +10-Nov-2021 23:00:00(UTC)
Expected Impact: 20 min outage within the chan= +ge window
 
Maintenance Details:
 
DACOM Crossing Essential Maintenance in EAC Kore= +a Backhaul (Secondary route) - 10/11/2021
 
Osan / Change the fiber jumper to improve the sp= +an loss at EOSAOLA-0101 =E2=80=93 Osan, Gyeonggi +** Cancellation : Maintenance postponed until further notice. New schedule = +to be notified under a new ref ticket **
 
Service(s) Impacted:SEL TOK EPL 90000000
 
Click here If you have any que= +stions, comments or concerns regarding this maintenance activity or telepho= +ne Global 800: +800 8448 8888* or Direct: +852 3192 7420
 
Click here for immediate infor= +mation on planned maintenance or viewing your historical planned maintenanc= +e tickets details via our Telstra Connect Portal using your email ID as log= +in.
 
+ Click here to email us about a= +ny updates to your contact details or requesting access to Telstra Connect = +Portal. +
+
+ +
+ + diff --git a/tests/unit/data/telstra/telstra6_result.json b/tests/unit/data/telstra/telstra6_result.json new file mode 100644 index 00000000..20a6448b --- /dev/null +++ b/tests/unit/data/telstra/telstra6_result.json @@ -0,0 +1,16 @@ +[ + { + "account": "Some Customer", + "circuits": [ + { + "circuit_id": "SEL TOK EPL 90000000", + "impact": "OUTAGE" + } + ], + "end": 1636585200, + "maintenance_id": "PN234567", + "start": 1636581600, + "status": "CANCELLED", + "summary": "DACOM Crossing Essential Maintenance in EAC Korea Backhaul (Secondary route) - 10/11/2021. Osan / Change the fiber jumper to improve the span loss at EOSAOLA-0101 – Osan, Gyeonggi\r\n** Cancellation : Maintenance postponed until further notice. New schedule to be notified under a new ref ticket **" + } +] diff --git a/tests/unit/test_e2e.py b/tests/unit/test_e2e.py index cb2cc21d..6bd8b9ae 100644 --- a/tests/unit/test_e2e.py +++ b/tests/unit/test_e2e.py @@ -255,6 +255,50 @@ Path(dir_path, "data", "date", "email_date_1_result.json"), ], ), + ( + Telstra, + [ + ("html", Path(dir_path, "data", "telstra", "telstra3.html")), + (EMAIL_HEADER_DATE, Path(dir_path, "data", "date", "email_date_1")), + ], + [ + Path(dir_path, "data", "telstra", "telstra3_result.json"), + Path(dir_path, "data", "date", "email_date_1_result.json"), + ], + ), + ( + Telstra, + [ + ("html", Path(dir_path, "data", "telstra", "telstra4.html")), + (EMAIL_HEADER_DATE, Path(dir_path, "data", "date", "email_date_1")), + ], + [ + Path(dir_path, "data", "telstra", "telstra4_result.json"), + Path(dir_path, "data", "date", "email_date_1_result.json"), + ], + ), + ( + Telstra, + [ + ("html", Path(dir_path, "data", "telstra", "telstra5.html")), + (EMAIL_HEADER_DATE, Path(dir_path, "data", "date", "email_date_1")), + ], + [ + Path(dir_path, "data", "telstra", "telstra5_result.json"), + Path(dir_path, "data", "date", "email_date_1_result.json"), + ], + ), + ( + Telstra, + [ + ("html", Path(dir_path, "data", "telstra", "telstra6.html")), + (EMAIL_HEADER_DATE, Path(dir_path, "data", "date", "email_date_1")), + ], + [ + Path(dir_path, "data", "telstra", "telstra6_result.json"), + Path(dir_path, "data", "date", "email_date_1_result.json"), + ], + ), (Telstra, [("ical", GENERIC_ICAL_DATA_PATH),], [GENERIC_ICAL_RESULT_PATH,],), # Turkcell ( diff --git a/tests/unit/test_parsers.py b/tests/unit/test_parsers.py index 09c4005f..39536b4c 100644 --- a/tests/unit/test_parsers.py +++ b/tests/unit/test_parsers.py @@ -213,6 +213,26 @@ Path(dir_path, "data", "telstra", "telstra2.html"), Path(dir_path, "data", "telstra", "telstra2_result.json"), ), + ( + HtmlParserTelstra1, + Path(dir_path, "data", "telstra", "telstra3.html"), + Path(dir_path, "data", "telstra", "telstra3_result.json"), + ), + ( + HtmlParserTelstra1, + Path(dir_path, "data", "telstra", "telstra4.html"), + Path(dir_path, "data", "telstra", "telstra4_result.json"), + ), + ( + HtmlParserTelstra1, + Path(dir_path, "data", "telstra", "telstra5.html"), + Path(dir_path, "data", "telstra", "telstra5_result.json"), + ), + ( + HtmlParserTelstra1, + Path(dir_path, "data", "telstra", "telstra6.html"), + Path(dir_path, "data", "telstra", "telstra6_result.json"), + ), # Turkcell ( HtmlParserTurkcell1, From b5306a14e26b368c7a9ef3dfc69e3905f96907c3 Mon Sep 17 00:00:00 2001 From: Glenn Matthews Date: Wed, 17 Nov 2021 10:28:17 -0500 Subject: [PATCH 4/8] Add CHANGELOG entries for #109 and #110 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12feb4c9..ec7a58d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## v2.0.5 + +### Fixed + +- #109 - Improve handling of Zayo notifications. +- #110 - Improve handling of Telstra notifications. + ## v2.0.4 - 2021-11-04 ### Fixed From 39a5dcb3087d980e549629b5e0ebcdde9ad10c99 Mon Sep 17 00:00:00 2001 From: Glenn Matthews Date: Wed, 17 Nov 2021 14:07:35 -0500 Subject: [PATCH 5/8] Improve EXA (GTT) parser (#111) * Add support for re-scheduled EXA/GTT notifications * Add support for new and completed GTT/EXA notifications * Cleanup * Add subject include_filter for GTT/EXA * Review comment --- README.md | 2 +- circuit_maintenance_parser/parsers/gtt.py | 26 +++- circuit_maintenance_parser/provider.py | 7 +- tests/unit/data/gtt/gtt1_email_subject | 1 + tests/unit/data/gtt/gtt2_email_subject | 1 + tests/unit/data/gtt/gtt3_email_subject | 1 + tests/unit/data/gtt/gtt4.html | 127 ++++++++++++++++ tests/unit/data/gtt/gtt4_email_subject | 1 + tests/unit/data/gtt/gtt4_result.json | 15 ++ tests/unit/data/gtt/gtt5.html | 125 ++++++++++++++++ tests/unit/data/gtt/gtt5_email_subject | 1 + tests/unit/data/gtt/gtt5_result.json | 15 ++ tests/unit/data/gtt/gtt6.html | 168 ++++++++++++++++++++++ tests/unit/data/gtt/gtt6_email_subject | 1 + tests/unit/data/gtt/gtt6_result.json | 15 ++ tests/unit/test_e2e.py | 74 ++++++++++ tests/unit/test_parsers.py | 15 ++ 17 files changed, 587 insertions(+), 8 deletions(-) create mode 100644 tests/unit/data/gtt/gtt1_email_subject create mode 100644 tests/unit/data/gtt/gtt2_email_subject create mode 100644 tests/unit/data/gtt/gtt3_email_subject create mode 100644 tests/unit/data/gtt/gtt4.html create mode 100644 tests/unit/data/gtt/gtt4_email_subject create mode 100644 tests/unit/data/gtt/gtt4_result.json create mode 100644 tests/unit/data/gtt/gtt5.html create mode 100644 tests/unit/data/gtt/gtt5_email_subject create mode 100644 tests/unit/data/gtt/gtt5_result.json create mode 100644 tests/unit/data/gtt/gtt6.html create mode 100644 tests/unit/data/gtt/gtt6_email_subject create mode 100644 tests/unit/data/gtt/gtt6_result.json diff --git a/README.md b/README.md index a22a5d18..917dee8f 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ By default, there is a `GenericProvider` that support a `SimpleProcessor` using - Cogent - Colt - Equinix -- GTT +- EXA (formerly GTT) - HGC - Lumen - Megaport diff --git a/circuit_maintenance_parser/parsers/gtt.py b/circuit_maintenance_parser/parsers/gtt.py index c9a432db..d20d3539 100644 --- a/circuit_maintenance_parser/parsers/gtt.py +++ b/circuit_maintenance_parser/parsers/gtt.py @@ -13,7 +13,7 @@ class HtmlParserGTT1(Html): - """Notifications Parser for GTT notifications.""" + """Notifications Parser for EXA (formerly GTT) notifications.""" def parse_html(self, soup): """Execute parsing.""" @@ -33,9 +33,9 @@ def parse_tables(self, tables, data): if groups: data["maintenance_id"] = groups.groups()[0] status = groups.groups()[1] - if status == "Reminder": + if status in ("New", "Reminder"): data["status"] = Status["CONFIRMED"] - elif status == "Update": + elif status in ("Update", "Rescheduled"): data["status"] = Status["RE_SCHEDULED"] elif status == "Cancelled": data["status"] = Status["CANCELLED"] @@ -43,11 +43,27 @@ def parse_tables(self, tables, data): # Setting this to 0 and 1 stops any errors from pydantic data["start"] = 0 data["end"] = 1 + elif status == "Completed": + data["status"] = Status["COMPLETED"] elif "Start" in td_element.text: - start = parser.parse(td_element.next_sibling.next_sibling.text) + # In the case of a normal notification, we have: + # TIME + # But in the case of a reschedule, we have: + # OLD TIMENEW TIME + next_td = td_element.next_sibling.next_sibling + strong = next_td.contents[1] + if strong.string: + start = parser.parse(strong.string) + else: + start = parser.parse(strong.contents[1].string) data["start"] = self.dt2ts(start) elif "End" in td_element.text: - end = parser.parse(td_element.next_sibling.next_sibling.text) + next_td = td_element.next_sibling.next_sibling + strong = next_td.contents[1] + if strong.string: + end = parser.parse(strong.string) + else: + end = parser.parse(strong.contents[1].string) data["end"] = self.dt2ts(end) num_columns = len(table.find_all("th")) if num_columns: diff --git a/circuit_maintenance_parser/provider.py b/circuit_maintenance_parser/provider.py index b0c5d725..5d436135 100644 --- a/circuit_maintenance_parser/provider.py +++ b/circuit_maintenance_parser/provider.py @@ -214,12 +214,15 @@ class EUNetworks(GenericProvider): class GTT(GenericProvider): - """GTT provider custom class.""" + """EXA (formerly GTT) provider custom class.""" + + # "Planned Work Notification", "Emergency Work Notification" + _include_filter = {EMAIL_HEADER_SUBJECT: ["Work Notification"]} _processors: List[GenericProcessor] = [ CombinedProcessor(data_parsers=[EmailDateParser, HtmlParserGTT1]), ] - _default_organizer = "InfraCo.CM@gttcorp.org" + _default_organizer = "InfraCo.CM@exainfra.net" class HGC(GenericProvider): diff --git a/tests/unit/data/gtt/gtt1_email_subject b/tests/unit/data/gtt/gtt1_email_subject new file mode 100644 index 00000000..70e72e27 --- /dev/null +++ b/tests/unit/data/gtt/gtt1_email_subject @@ -0,0 +1 @@ +GTT Emergency Work Notification TT 11111111 – Update diff --git a/tests/unit/data/gtt/gtt2_email_subject b/tests/unit/data/gtt/gtt2_email_subject new file mode 100644 index 00000000..551246fa --- /dev/null +++ b/tests/unit/data/gtt/gtt2_email_subject @@ -0,0 +1 @@ +GTT Emergency Work Notification TT 11111111 – Reminder diff --git a/tests/unit/data/gtt/gtt3_email_subject b/tests/unit/data/gtt/gtt3_email_subject new file mode 100644 index 00000000..206e04c7 --- /dev/null +++ b/tests/unit/data/gtt/gtt3_email_subject @@ -0,0 +1 @@ +GTT Emergency Work Notification TT 11111111 – Cancelled diff --git a/tests/unit/data/gtt/gtt4.html b/tests/unit/data/gtt/gtt4.html new file mode 100644 index 00000000..fe2191f3 --- /dev/null +++ b/tests/unit/data/gtt/gtt4.html @@ -0,0 +1,127 @@ + + + + + + =20 + + +
+ + + + + +
Planned Work= + Notification: 60543210 - Rescheduled
+

Please note that the Planned Work is rescheduled.=E2=80=AFPlease see= + details of the work and impact on your service below.

+

+ Reschedule Reason:
+ rescheduled by supplier +

+ Details:
+ + + + + + + + + + =20 + =20 + + + + +
+Start + +2021-11-10 03:00:00 GMT 2021-1= +2-08 03:00 GMT +
+End + +2021-11-10 11:00:00 GMT 2021-1= +2-08 11:00 GMT +
+Location + +Vaden Dr & Country Creek Rd in Oakton, VA +
+ +

+ Planned work Reason:
+ Network optimization on our partner network +

+ + + + + + + + + + + + =20 + + + + + + + + + =20 +
Services AffectedSLID/CCSDCustomer PONService TypeExpected Impact to your Service= +Site Address
HI/Wavelength/006969691234567-10987654PO # RGB00012345Wavelength180 min12345 Some St, Ashburn, VA 20147, USA
+ =20 +

If you have any questions regarding the planned work, please login t= +o MyPortal or contact= + our Change Management Team using the email below.

+ +
Kind Regards, +
EXA Network Operations +
InfraCo.CM@exainfra.net +
+ + diff --git a/tests/unit/data/gtt/gtt4_email_subject b/tests/unit/data/gtt/gtt4_email_subject new file mode 100644 index 00000000..824491a1 --- /dev/null +++ b/tests/unit/data/gtt/gtt4_email_subject @@ -0,0 +1 @@ +EXA Emergency Work Notification TT 60543210 – Reschedule diff --git a/tests/unit/data/gtt/gtt4_result.json b/tests/unit/data/gtt/gtt4_result.json new file mode 100644 index 00000000..5204f2dd --- /dev/null +++ b/tests/unit/data/gtt/gtt4_result.json @@ -0,0 +1,15 @@ +[ + { + "account": "PO # RGB00012345", + "circuits": [ + { + "circuit_id": "1234567-10987654", + "impact": "OUTAGE" + } + ], + "end": 1638961200, + "maintenance_id": "60543210", + "start": 1638932400, + "status": "RE-SCHEDULED" + } +] diff --git a/tests/unit/data/gtt/gtt5.html b/tests/unit/data/gtt/gtt5.html new file mode 100644 index 00000000..36a1ad3e --- /dev/null +++ b/tests/unit/data/gtt/gtt5.html @@ -0,0 +1,125 @@ + + + + + + =20 + + +
+ + + + + +
Planned Work= + Notification: 60543210 - Completed
+ +
+ Final Update:
+ ***Completed*** This notice is to inform you that the Planned Maintenan= +ce has concluded. +

+ Details:
+ + + + + + + + + + =20 + + + + +
+Start + +2021-11-13 04:00:00 GMT +
+End + +2021-11-13 10:00:00 GMT +
+Location + +165 Some Street, New Jersey +
+ +

+ Planned work Reason:
+ Emergency software upgrade on the 165Some Street +

+ + + + + + + + + + + + =20 + + + + + + + + + =20 +
Services AffectedSLID/CCSDCustomer PONService TypeExpected Impact to your Service= +Site Address
HI/Wavelength/006969691815743-10987654PO # RGD00012345Wavelength90 min23456 Some St, Ashburn, VA 20147, USA
+ =20 +

If you have any questions regarding the planned work or if you are s= +till experiencing a service outage, please login to MyPortal or contact our Change Management Te= +am using the email below.

+ +
Kind Regards, +
EXA Network Operations +
InfraCo.CM@exainfra.net +
+ + diff --git a/tests/unit/data/gtt/gtt5_email_subject b/tests/unit/data/gtt/gtt5_email_subject new file mode 100644 index 00000000..6534d3fe --- /dev/null +++ b/tests/unit/data/gtt/gtt5_email_subject @@ -0,0 +1 @@ +EXA Emergency Work Notification TT 60543210 – Completed diff --git a/tests/unit/data/gtt/gtt5_result.json b/tests/unit/data/gtt/gtt5_result.json new file mode 100644 index 00000000..b722a43f --- /dev/null +++ b/tests/unit/data/gtt/gtt5_result.json @@ -0,0 +1,15 @@ +[ + { + "account": "PO # RGD00012345", + "circuits": [ + { + "circuit_id": "1815743-10987654", + "impact": "OUTAGE" + } + ], + "end": 1636797600, + "maintenance_id": "60543210", + "start": 1636776000, + "status": "COMPLETED" + } +] diff --git a/tests/unit/data/gtt/gtt6.html b/tests/unit/data/gtt/gtt6.html new file mode 100644 index 00000000..5bcec1bd --- /dev/null +++ b/tests/unit/data/gtt/gtt6.html @@ -0,0 +1,168 @@ + + + + + + =20 + + +
+ + + + + +
Planned Work= + Notification: 60543210 - New
+

As part of our commitment to continually improve the quality of serv= +ice we provide to our clients, we will be performing a planned work in 165 = +Some Street, New Jersey between 2021-11-09 04:00:00 - 2021-11-09 10:00:00 GMT.= +=E2=80=AFPlease see details of the work and impact on your service below. <= +/p> + + Detail:
+ + + + + + + + + + =20 + + + + +
+Start + +2021-11-09 04:00:00 GMT +
+End + +2021-11-09 10:00:00 GMT +
+Location + +165 Some Street, New Jersey +
+ +

+ Planned work Reason:
+ Emergency software upgrade on the 165Some Street +

+ + + + + + + + + + + + =20 + + + + + + + + + =20 +
Services AffectedSLID/CCSDCustomer PONService TypeExpected Impact to your Service= +Site Address
HI/Wavelength/006969691815743-10987654PO # RGD00012345Wavelength90 m= +in23456 Some St, Ashburn, VA 20147, USA
+ =20 +
+ Comments (Color explanation) :
+ + + + + + + + + +
+Service interruption + Service will experience interruption lasting maximu= +m the duration value in the service row +
+Resiliency Loss + Primary or backup circuit will be impacted only. Service will rem= +ain operational throughout the maintenance +
+ +

If you have any questions regarding the planned work, please login t= +o MyPor= +tal or contact our Change Management Team using the email below.

+ +
Kind Regards, +
EXA Network Operations +
InfraCo.CM@exainfra.net +

+
+ + Did you know that it is now easier than ever to log your tickets=E2=80=AF= +on our=E2=80=AFMyPortal=E2=80=AF? You will be able to answer a few troubleshoo= +ting questions and receive a ticket ID immediately.=E2=80=AFMyPortal=E2=80= +=AFalso helps you check on status of existing tickets and access your escal= +ation list. + + If you do not have an=E2=80=AFMyPortal=E2=80=AFlogin, you can contact you= +r company=E2=80=99s account administrator or submit a request on=E2=80=AFou= +r=E2=80=AFwebsite. + +
+
+ + diff --git a/tests/unit/data/gtt/gtt6_email_subject b/tests/unit/data/gtt/gtt6_email_subject new file mode 100644 index 00000000..f6be1ed0 --- /dev/null +++ b/tests/unit/data/gtt/gtt6_email_subject @@ -0,0 +1 @@ +EXA Emergency Work Notification TT 60543210 – New diff --git a/tests/unit/data/gtt/gtt6_result.json b/tests/unit/data/gtt/gtt6_result.json new file mode 100644 index 00000000..efe318d7 --- /dev/null +++ b/tests/unit/data/gtt/gtt6_result.json @@ -0,0 +1,15 @@ +[ + { + "account": "PO # RGD00012345", + "circuits": [ + { + "circuit_id": "1815743-10987654", + "impact": "OUTAGE" + } + ], + "end": 1636452000, + "maintenance_id": "60543210", + "start": 1636430400, + "status": "CONFIRMED" + } +] diff --git a/tests/unit/test_e2e.py b/tests/unit/test_e2e.py index 6bd8b9ae..e85c56b9 100644 --- a/tests/unit/test_e2e.py +++ b/tests/unit/test_e2e.py @@ -18,6 +18,7 @@ Cogent, Colt, EUNetworks, + GTT, HGC, Lumen, Megaport, @@ -103,6 +104,79 @@ ), # EUNetworks (EUNetworks, [("ical", GENERIC_ICAL_DATA_PATH),], [GENERIC_ICAL_RESULT_PATH,],), + # EXA / GTT + ( + GTT, + [ + ("html", Path(dir_path, "data", "gtt", "gtt1.html")), + (EMAIL_HEADER_DATE, Path(dir_path, "data", "date", "email_date_1")), + (EMAIL_HEADER_SUBJECT, Path(dir_path, "data", "gtt", "gtt1_email_subject")), + ], + [ + Path(dir_path, "data", "gtt", "gtt1_result.json"), + Path(dir_path, "data", "date", "email_date_1_result.json"), + ], + ), + ( + GTT, + [ + ("html", Path(dir_path, "data", "gtt", "gtt2.html")), + (EMAIL_HEADER_DATE, Path(dir_path, "data", "date", "email_date_1")), + (EMAIL_HEADER_SUBJECT, Path(dir_path, "data", "gtt", "gtt2_email_subject")), + ], + [ + Path(dir_path, "data", "gtt", "gtt2_result.json"), + Path(dir_path, "data", "date", "email_date_1_result.json"), + ], + ), + ( + GTT, + [ + ("html", Path(dir_path, "data", "gtt", "gtt3.html")), + (EMAIL_HEADER_DATE, Path(dir_path, "data", "date", "email_date_1")), + (EMAIL_HEADER_SUBJECT, Path(dir_path, "data", "gtt", "gtt3_email_subject")), + ], + [ + Path(dir_path, "data", "gtt", "gtt3_result.json"), + Path(dir_path, "data", "date", "email_date_1_result.json"), + ], + ), + ( + GTT, + [ + ("html", Path(dir_path, "data", "gtt", "gtt4.html")), + (EMAIL_HEADER_DATE, Path(dir_path, "data", "date", "email_date_1")), + (EMAIL_HEADER_SUBJECT, Path(dir_path, "data", "gtt", "gtt4_email_subject")), + ], + [ + Path(dir_path, "data", "gtt", "gtt4_result.json"), + Path(dir_path, "data", "date", "email_date_1_result.json"), + ], + ), + ( + GTT, + [ + ("html", Path(dir_path, "data", "gtt", "gtt5.html")), + (EMAIL_HEADER_DATE, Path(dir_path, "data", "date", "email_date_1")), + (EMAIL_HEADER_SUBJECT, Path(dir_path, "data", "gtt", "gtt5_email_subject")), + ], + [ + Path(dir_path, "data", "gtt", "gtt5_result.json"), + Path(dir_path, "data", "date", "email_date_1_result.json"), + ], + ), + ( + GTT, + [ + ("html", Path(dir_path, "data", "gtt", "gtt6.html")), + (EMAIL_HEADER_DATE, Path(dir_path, "data", "date", "email_date_1")), + (EMAIL_HEADER_SUBJECT, Path(dir_path, "data", "gtt", "gtt6_email_subject")), + ], + [ + Path(dir_path, "data", "gtt", "gtt6_result.json"), + Path(dir_path, "data", "date", "email_date_1_result.json"), + ], + ), # HGC ( HGC, diff --git a/tests/unit/test_parsers.py b/tests/unit/test_parsers.py index 39536b4c..88a0184e 100644 --- a/tests/unit/test_parsers.py +++ b/tests/unit/test_parsers.py @@ -119,6 +119,21 @@ Path(dir_path, "data", "gtt", "gtt3.html"), Path(dir_path, "data", "gtt", "gtt3_result.json"), ), + ( + HtmlParserGTT1, + Path(dir_path, "data", "gtt", "gtt4.html"), + Path(dir_path, "data", "gtt", "gtt4_result.json"), + ), + ( + HtmlParserGTT1, + Path(dir_path, "data", "gtt", "gtt5.html"), + Path(dir_path, "data", "gtt", "gtt5_result.json"), + ), + ( + HtmlParserGTT1, + Path(dir_path, "data", "gtt", "gtt6.html"), + Path(dir_path, "data", "gtt", "gtt6_result.json"), + ), # HGC ( HtmlParserHGC1, From ce2c5b15ed258d04e6a766b4b20e63cd8f0ec320 Mon Sep 17 00:00:00 2001 From: Glenn Matthews Date: Wed, 17 Nov 2021 14:11:49 -0500 Subject: [PATCH 6/8] Add CHANGELOG for #111 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec7a58d2..3e5090c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - #109 - Improve handling of Zayo notifications. - #110 - Improve handling of Telstra notifications. +- #111 - Improve handling of EXA (GTT) notifications. ## v2.0.4 - 2021-11-04 From 2cbd97bc639bd6be882f3694af13e2b80853f08c Mon Sep 17 00:00:00 2001 From: Glenn Matthews Date: Thu, 18 Nov 2021 09:10:30 -0500 Subject: [PATCH 7/8] Equinix improvements (#112) * Add example of reduced-redundancy Equinix notification, fix a corner case with email subject matching and long subjects, add include_filter for Equinix * Add CHANGELOG for #112 --- CHANGELOG.md | 1 + circuit_maintenance_parser/parser.py | 2 +- circuit_maintenance_parser/parsers/equinix.py | 5 +- circuit_maintenance_parser/provider.py | 4 +- .../equinix/equinix1_result_combined.json | 77 +++ tests/unit/data/equinix/equinix3.eml | 518 ++++++++++++++++++ tests/unit/data/equinix/equinix3_result.json | 80 +-- .../equinix/equinix3_result_combined.json | 20 + tests/unit/test_e2e.py | 7 +- tests/unit/test_parsers.py | 5 + 10 files changed, 643 insertions(+), 76 deletions(-) create mode 100644 tests/unit/data/equinix/equinix1_result_combined.json create mode 100644 tests/unit/data/equinix/equinix3.eml create mode 100644 tests/unit/data/equinix/equinix3_result_combined.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e5090c6..81047013 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - #109 - Improve handling of Zayo notifications. - #110 - Improve handling of Telstra notifications. - #111 - Improve handling of EXA (GTT) notifications. +- #112 - Improve handling of Equinix notifications. ## v2.0.4 - 2021-11-04 diff --git a/circuit_maintenance_parser/parser.py b/circuit_maintenance_parser/parser.py index 23be97e3..f844b728 100644 --- a/circuit_maintenance_parser/parser.py +++ b/circuit_maintenance_parser/parser.py @@ -197,7 +197,7 @@ class EmailSubjectParser(Parser): def parser_hook(self, raw: bytes): """Execute parsing.""" result = [] - for data in self.parse_subject(self.bytes_to_string(raw).replace("\r\n", "")): + for data in self.parse_subject(self.bytes_to_string(raw).replace("\r", "").replace("\n", "")): result.append(data) return result diff --git a/circuit_maintenance_parser/parsers/equinix.py b/circuit_maintenance_parser/parsers/equinix.py index d42e6400..cd0189e9 100644 --- a/circuit_maintenance_parser/parsers/equinix.py +++ b/circuit_maintenance_parser/parsers/equinix.py @@ -53,6 +53,7 @@ def _parse_b(self, b_elements, data): Returns: impact (Status object): impact of the maintenance notification (used in the parse table function to assign an impact for each circuit). """ + impact = None for b_elem in b_elements: if "UTC:" in b_elem: raw_time = b_elem.next_sibling @@ -72,6 +73,8 @@ def _parse_b(self, b_elements, data): impact = Impact.NO_IMPACT elif "There will be service interruptions" in impact_line.next_sibling.text: impact = Impact.OUTAGE + elif "Loss of redundancy" in impact_line: + impact = Impact.REDUCED_REDUNDANCY return impact def _parse_table(self, theader_elements, data, impact): # pylint: disable=no-self-use @@ -105,7 +108,7 @@ def parse_subject(self, subject: str) -> List[Dict]: List[Dict]: Returns the data object with summary and status fields. """ data = {} - maintenance_id = re.search(r"\[(.*)\]$", subject) + maintenance_id = re.search(r"\[([^[]*)\]$", subject) if maintenance_id: data["maintenance_id"] = maintenance_id[1] data["summary"] = subject.strip().replace("\n", "") diff --git a/circuit_maintenance_parser/provider.py b/circuit_maintenance_parser/provider.py index 5d436135..7538dda1 100644 --- a/circuit_maintenance_parser/provider.py +++ b/circuit_maintenance_parser/provider.py @@ -94,7 +94,7 @@ def filter_check(filter_dict: Dict, data: NotificationData, filter_type: str) -> if filter_data_type not in filter_dict: continue - data_part_content = data_part.content.decode() + data_part_content = data_part.content.decode().replace("\r", "").replace("\n", "") if any(re.search(filter_re, data_part_content) for filter_re in filter_dict[filter_data_type]): logger.debug("Matching %s filter expression for %s.", filter_type, data_part_content) return True @@ -201,6 +201,8 @@ class Colt(GenericProvider): class Equinix(GenericProvider): """Equinix provider custom class.""" + _include_filter = {EMAIL_HEADER_SUBJECT: ["Network Maintenance"]} + _processors: List[GenericProcessor] = [ CombinedProcessor(data_parsers=[HtmlParserEquinix, SubjectParserEquinix, EmailDateParser]), ] diff --git a/tests/unit/data/equinix/equinix1_result_combined.json b/tests/unit/data/equinix/equinix1_result_combined.json new file mode 100644 index 00000000..777896ab --- /dev/null +++ b/tests/unit/data/equinix/equinix1_result_combined.json @@ -0,0 +1,77 @@ +[ + { + "account": "009999", + "circuits": [ + { + "circuit_id": "10101", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "10108", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "10001", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "09999000-B", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "09999020-B", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "09999045-B", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "09999063-B", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "09999022-B", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "09999022-B", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "09999064-B", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "09999063-B", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "09999069-B", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "09999057-B", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "09999058-B", + "impact": "NO-IMPACT" + }, + { + "circuit_id": "09999052-B", + "impact": "NO-IMPACT" + } + ], + "end": 1625238000, + "maintenance_id": "K-293030438574", + "organizer": "servicedesk@equinix.com", + "provider": "equinix", + "sequence": 1, + "stamp": 1634658948, + "start": 1625220000, + "status": "CONFIRMED", + "summary": "Fwd: REMINDER - 3rd Party Equinix Network Device Maintenance-TY Metro Area Network Maintenance -02-JUL-2021 [K-293030438574]", + "uid": "0" + } +] \ No newline at end of file diff --git a/tests/unit/data/equinix/equinix3.eml b/tests/unit/data/equinix/equinix3.eml new file mode 100644 index 00000000..cdc9d7d8 --- /dev/null +++ b/tests/unit/data/equinix/equinix3.eml @@ -0,0 +1,518 @@ +Delivered-To: nautobot.email@example.com +Received: by 2002:a05:7000:1f21:0:0:0:0 with SMTP id hs33csp396879mab; + Wed, 17 Nov 2021 05:10:26 -0800 (PST) +X-Received: by 2002:a05:6808:2014:: with SMTP id q20mr44138276oiw.9.1637154626741; + Wed, 17 Nov 2021 05:10:26 -0800 (PST) +ARC-Seal: i=3; a=rsa-sha256; t=1637154626; cv=pass; + d=google.com; s=arc-20160816; + b=KJC5VM31/eiQyaGHA116PBrOB44xsYVxFNMrA7K0oGLeU87DvQNORtTctHg06xOmSY + NO6N/16MXFhz1CnMXgMnyd4mIU225pmNcnDIzY7rLJJmIaATCHvkxS+XpdTV/XxRSS4A + 4M2zDrgLkm5zADdk//ef1d23MbNINylpZp2pKUSDWs/wK+FdWmQ9msMH0fOGD/yorxQa + /EVwa8tf1hD0UfyrWfjej1wo86gE9Kqz9uExhtMFZfJgcH5bojYwBdhdJAak5wi4uyJD + aE6399vkp+i/KovwT7AwrdvEGT9iL0wprrXhqKoa1DXF+dRUNkWuUZ9VKUzzV9DGyke2 + njvQ== +ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=list-unsubscribe:list-archive:list-help:list-post:list-id + :mailing-list:precedence:organization:mime-version:subject + :message-id:to:reply-to:from:date:sender:dkim-signature; + bh=dLvVdVH96vN2c5dDukZsjAaCmYzGMxWOQg1N4W4aeU8=; + b=F//IHBKr6yLZVnO66r3NArxPOOhrSlEobnA60lValuj9/GPuVzJPTh4yx1+5+N4oDu + Mj2Qsm/nqsQam3cTvl/Sa4C0bBGXJTfBaHkvJuesQ97ILj8T4HYO6oO2NCn+5YQniBlo + Mp8sjoEifqzVqCCrpylHTI6puSIK3p5SiPyP5B81c5eWqtrwtKN3CelaRicgbaRwgd0b + lY/n+T8mYuNfZSx0jo9GEK/0ZEEA/zi7lOV5vRdO953eCUpbKsPgqqrXK/WvpFRoQNQ9 + n5n9TWfDX3AEJYP51x+7HkJIbz6cSvijZJHWuu0TSVtz/n79UKz8T9jHd8ieeUSTYPcQ + DjBQ== +ARC-Authentication-Results: i=3; mx.google.com; + dkim=pass header.i=@example.com header.s=example header.b=MQ8puX7v; + arc=pass (i=2 spf=pass spfdomain=equinix.com dmarc=pass fromdomain=equinix.com); + spf=pass (google.com: domain of maintenance-notices+bncbdbld5ph4eibbph62ogamgqe5vxs7oq@example.com designates 209.85.220.97 as permitted sender) smtp.mailfrom=maintenance-notices+bncBDBLD5PH4EIBBPH62OGAMGQE5VXS7OQ@example.com; + dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=equinix.com +Return-Path: +Received: from mail-sor-f97.google.com (mail-sor-f97.google.com. [209.85.220.97]) + by mx.google.com with SMTPS id t10sor4802790otm.65.2021.11.17.05.10.26 + for + (Google Transport Security); + Wed, 17 Nov 2021 05:10:26 -0800 (PST) +Received-SPF: pass (google.com: domain of maintenance-notices+bncbdbld5ph4eibbph62ogamgqe5vxs7oq@example.com designates 209.85.220.97 as permitted sender) client-ip=209.85.220.97; +Authentication-Results: mx.google.com; + dkim=pass header.i=@example.com header.s=example header.b=MQ8puX7v; + arc=pass (i=2 spf=pass spfdomain=equinix.com dmarc=pass fromdomain=equinix.com); + spf=pass (google.com: domain of maintenance-notices+bncbdbld5ph4eibbph62ogamgqe5vxs7oq@example.com designates 209.85.220.97 as permitted sender) smtp.mailfrom=maintenance-notices+bncBDBLD5PH4EIBBPH62OGAMGQE5VXS7OQ@example.com; + dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=equinix.com +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20210112; + h=x-gm-message-state:dkim-signature:sender:date:from:reply-to:to + :message-id:subject:mime-version:organization:x-original-sender + :x-original-authentication-results:precedence:mailing-list:list-id + :list-post:list-help:list-archive:list-unsubscribe; + bh=dLvVdVH96vN2c5dDukZsjAaCmYzGMxWOQg1N4W4aeU8=; + b=XZb3UBhZjqkCvgakucchPEwcHhuJBqi9pfaC2m4nSJpl5rDD9dMTRC5QhLtK7u4xBE + l+9h32a0isipPZ25R5h3TeUXojQc3uDaoFogp6M/EhfDPZ3vuV1PAXE3Tja+q4iilzKL + QWGeRLJvQxFArKkBWP58ZnEEASkFMO2yytYjJQ+S0czuePxNKCfHa3o6nT1wxP8WQ0cA + yfJputt2nd13rMeR8B3r8J8V127NiJu6Nel8zAH5nXF3me+tAPUrpFAjdJYOrdbWdFoW + J/fZWQVSqialKTf3BgZFOYvmmJaXqw/QxZdFBWYX0Sptf0sEDfWvtNdt7AZwDf3B7Bay + xohw== +X-Gm-Message-State: AOAM530GPrLKTIWZmnUg9m0QElsEI0wXj7rqdiEOuB3pMEiC6N03QDqZ + FUPimxHJOXdXBD0desppOZzHs1qsQgMF5YSpqFOuQtSNMd0yOFUh +X-Google-Smtp-Source: ABdhPJxzOd6h+5kUj1qt+jyBy5FhPqLetjpEgHdUdummq2iZUjleM1Esho2bcmmeOlbxGatiNIkVEIla0xKG +X-Received: by 2002:a05:6830:1445:: with SMTP id w5mr13499681otp.112.1637154626351; + Wed, 17 Nov 2021 05:10:26 -0800 (PST) +Return-Path: +Received: from netskope.com ([163.116.131.173]) + by smtp-relay.gmail.com with ESMTPS id f20sm6179603otu.10.2021.11.17.05.10.26 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Wed, 17 Nov 2021 05:10:26 -0800 (PST) +X-Relaying-Domain: example.com +Received: by mail-pg1-f198.google.com with SMTP id e4-20020a630f04000000b002cc40fe16afsf1059275pgl.23 + for ; Wed, 17 Nov 2021 05:10:25 -0800 (PST) +ARC-Seal: i=2; a=rsa-sha256; t=1637154625; cv=pass; + d=google.com; s=arc-20160816; + b=dPvjD4uYIz+OeAQgv993c2Xdp1+6l8gSnKJfQNVxrrrrFU8HTepvonuZkT8BXYEeoV + bsGyUbJySveL72oDTGVjq3GEM0nqHcGg2QNbyTKXStkFVHCrw2cKJyQDNcjQ/BrvVhk9 + X4TzX25Y2+AAeqVDibvolRqt1xjKJEgnCxa/KqilBs9Utzw+uUfqBnmbp14TpYKgzSo2 + /GBedd6/54g6E6s74EzeN2BRfec5uPV1lEioINVacw0iJ/lLRa90uD3LFbTqWjNt3H7G + vCLA0I82G9DyJfPb3CU0PgP6CR6U9dnElQ7rfYCZoSWkfea0pU6GOVu8FnVIfqToedtB + ZBoA== +ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=list-unsubscribe:list-archive:list-help:list-post:list-id + :mailing-list:precedence:organization:mime-version:subject + :message-id:to:reply-to:from:date:sender:dkim-signature; + bh=dLvVdVH96vN2c5dDukZsjAaCmYzGMxWOQg1N4W4aeU8=; + b=oQGaNNnL8SgXtbpK28cJrupmFf5fFhARwP1OmDxR/xHOH1JtpJVr0btiNNAQzXfNIl + d9S+j1PDOFqi9a1C2px67/0376OttY9TI560EftTV/EpSTSYlO7RqsIoZ+qByMWz9VtJ + 4B+eQCX1LK0hlnZnGbka1e91zgKlLgq/W1N8sh72bvVFPucRLGeegTuIXkr0wGdTzAzk + 5qS4SRJXiw+F8sjucyeKbzOgHRlZaIdhMBvA7l2YUsQlx16Qt2UZIkox67MYTUgWIG91 + pkTgnI8sGFec9CqCecBoGq0iAyLYxlw2FuKBzPdHve/1CvkCkgAA8z1D10ECWddz/fzv + l3EQ== +ARC-Authentication-Results: i=2; mx.google.com; + spf=pass (google.com: domain of no-reply@equinix.com designates 216.221.232.129 as permitted sender) smtp.mailfrom=no-reply@equinix.com; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=equinix.com +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=example.com; s=example; + h=sender:date:from:reply-to:to:message-id:subject:mime-version + :organization:x-original-sender:x-original-authentication-results + :precedence:mailing-list:list-id:list-post:list-help:list-archive + :list-unsubscribe; + bh=dLvVdVH96vN2c5dDukZsjAaCmYzGMxWOQg1N4W4aeU8=; + b=MQ8puX7v63oJz7it1DNPYJeeVdKryEsmretgHPpcn1/rirvX9le3Edru8ai3U3XiIQ + PJvqv1k7uwSg/k3/ojvMzAegc9LbYWxLjUFS+JxggHsonTqt384GOpYwtgLmCXx0sMts + Mdzsp+vb/kImnuV1jW8a4QfDMw/nP+fG3+Ims= +Sender: maintenance-notices@example.com +X-Received: by 2002:a17:90b:2309:: with SMTP id mt9mr9548698pjb.213.1637154623296; + Wed, 17 Nov 2021 05:10:23 -0800 (PST) +X-Received: by 2002:a17:90b:2309:: with SMTP id mt9mr9548355pjb.213.1637154620880; + Wed, 17 Nov 2021 05:10:20 -0800 (PST) +X-BeenThere: maintenance-notices@example.com +Received: by 2002:a17:90b:1bcf:: with SMTP id oa15ls2981174pjb.0.canary-gmail; + Wed, 17 Nov 2021 05:10:20 -0800 (PST) +X-Received: by 2002:a17:902:a605:b0:143:d289:f3fb with SMTP id u5-20020a170902a60500b00143d289f3fbmr12862050plq.41.1637154619788; + Wed, 17 Nov 2021 05:10:19 -0800 (PST) +ARC-Seal: i=1; a=rsa-sha256; t=1637154619; cv=none; + d=google.com; s=arc-20160816; + b=k9nXrDbnNsbkLsnQt8lvLp0rP8j2dlvW/nsTs1rQk2qrpOjKO7k2k2EVOG6FyHirRL + Ed0t0lKXF+nDtjU8nrjcH0FDH0t+7kQ5XpMz2S745c+cyddwXQOBu1zegAg0AS3NU4o9 + enegjQOr9GkKNDCAXpqIYRIG7r/IUHt+e8i/3DZZf/q76hrR/BCakLwsETfgTGjt+hz8 + QqEG+D5+ZdfzR8JzRp6D8HY3pdQkTNSK5q5YD49iCXvZOm1dAXPhi0KkPwV7TnsZ5suR + OJTlGiieXaPpRcA/BZeMCxz0NSeywfj8MFaBQIRB6p/XYQtnhhhqYOoo06ukaMTzoNul + eC1g== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=organization:mime-version:subject:message-id:to:reply-to:from:date; + bh=6E9iV3kwO52DRLfdVAG0hTkrh4VKiPxUu9e13GDquT8=; + b=J3hFFeGTu9htcR6eN0psfcphbInLVMfMmFU7eIm8Gb1Pz6RjuHSAioHPpICxTOk+Dd + YKrP/k5SDGcC2joGziljXTqTik8bqSWLNh5L+yC8hNnrBclnZjBV0S4B8vnv20J9X+nV + +wRR7aEATC9DmF6dh7sQlCOLUTFgVkVls2gRrFZJMI3D3u/ompCQzv7KQf2z6UIP1MUm + 5cZibAka6SniBs0hU8z3Cai/DoB/83fMDNOg9mWuXI/boHpygrbG1//5Kc8z+HKcN1Oa + PnhbaF2l1fkYr9AvqO5QsC+ZBDDOxbA59iwnon8r5wK2HtJZiTByi1w7dCilQflYvLXJ + GKiQ== +ARC-Authentication-Results: i=1; mx.google.com; + spf=pass (google.com: domain of no-reply@equinix.com designates 216.221.232.129 as permitted sender) smtp.mailfrom=no-reply@equinix.com; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=equinix.com +Received: from sv2esa01.corp.equinix.com (nat1-mis.equinix.com. [216.221.232.129]) + by mx.google.com with ESMTPS id r2si9088157pjr.143.2021.11.17.05.10.16 + (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); + Wed, 17 Nov 2021 05:10:19 -0800 (PST) +Received-SPF: pass (google.com: domain of no-reply@equinix.com designates 216.221.232.129 as permitted sender) client-ip=216.221.232.129; +Received: from unknown (HELO vmclxremas08.corp.equinix.com) ([10.192.140.2]) + by sv2esa01.corp.equinix.com with ESMTP; 17 Nov 2021 05:10:16 -0800 +Date: Wed, 17 Nov 2021 13:10:16 +0000 (UTC) +From: Equinix Network Maintenance NO-REPLY +Reply-To: Equinix Network Maintenance NO-REPLY +To: EquinixNetworkMaintenance +Message-ID: <1814407781.76370.1637154616133@vmclxremas08.corp.equinix.com> +Subject: [maintenance-notices] COMPLETED - Scheduled MLPE Upgrade-SV Metro Area Network + Maintenance -16-NOV-2021 [EQ-GL-20211027-00621] +MIME-Version: 1.0 +Content-Type: multipart/alternative; + boundary="----=_Part_76369_234541402.1637154616132" +X-Priority: 1 +Organization: Equinix, Inc +X-Original-Sender: no-reply@equinix.com +X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: + domain of no-reply@equinix.com designates 216.221.232.129 as permitted + sender) smtp.mailfrom=no-reply@equinix.com; dmarc=pass (p=NONE sp=NONE + dis=NONE) header.from=equinix.com +Precedence: list +Mailing-list: list maintenance-notices@example.com; contact maintenance-notices+owners@example.com +List-ID: +X-Google-Group-Id: 536184160288 +List-Post: , +List-Help: , + +List-Archive: +List-Unsubscribe: , + +x-netskope-inspected: true + +------=_Part_76369_234541402.1637154616132 +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + + Dear Equinix Customer, + +The maintenance listed below has now been completed. + + =20 + +Dear Equinix Customer, + +DATE: 16-NOV-2021 - 17-NOV-2021 + +SPAN: 16-NOV-2021 - 17-NOV-2021 + +LOCAL: TUESDAY, 16 NOV 23:00 - WEDNESDAY, 17 NOV 05:00 +UTC: WEDNESDAY, 17 NOV 07:00 - WEDNESDAY, 17 NOV 13:00 + +IBX(s): HQ,SUN,SV1,SV10,SV11,SV13,SV14,SV15,SV16,SV17,SV2,SV3,SV4,SV5,SV6,S= +V8,SV9 + + +DESCRIPTION:Please be advised as part of an ongoing effort to improve relia= +bility and security, Equinix will be performing software patching on Intern= +et Exchange (IX) route servers. +Please ensure your BGP sessions to both route servers are operational befor= +e the start of the maintenance to avoid service interruption. The activity = +will be carried out one at a time on each route servers and BGP sessions to= + each route server will be down for approximately 60 minutes. +This work will not cause a physical downtime to the peering port. + +Equinix will be performing essential maintenance on the Primary Route Serve= +r in the SV metro. + +BGP sessions to RS1 (AS64511) 192.168.117.251, 2001:db8:0:1:ffff:ffff:ffff:= +1 will be impacted. + +BGP sessions to RS2 (AS64511) 192.168.117.252, 2001:db8:0:1:ffff:ffff:ffff:= +2 will not be impacted. + +BGP sessions to RC1 (AS64510) 192.168.117.250, 2001:db8:0:1:0:6:5517:1 will= + not be impacted. + + +PRODUCTS: INTERNET EXCHANGE + +IMPACT: Loss of redundancy to your service + +Internet Exchange Account # Product Servi= +ce Serial # 123456 Internet Exchange 12345678= +-A =09 + +We apologize for any inconvenience you may experience during this activity.= + Your cooperation and understanding are greatly appreciated. + +The Equinix SMC is available to provide up-to-date status information or ad= +ditional details, should you have any questions regarding the maintenance. = + Please reference EQ-GL-20211027-00621.=20 + + +Sincerely, =20 +Equinix SMC Contacts: =20 +To place orders, schedule site access, report trouble or manage your user l= +ist online, please visit: http://www.equinix.com/contact-us/customer-suppor= +t/=20 +Please do not reply to this email address. If you have any questions or con= +cerns regarding this notification, please email Service Desk and include = +the ticket [EQ-GL-20211027-00621] in the subject line. If the matter is urg= +ent, you may contact the Service Desk North America by phone at +1.866.EQU= +INIX (378.4649) (USA or Canada) or +1.408.451.5200 (outside USA or Canada) = + for an up-to-date status. + +To unsubscribe from notifications, please log in to the Equinix Customer Po= +rtal and change your preferences. + +How are we doing? Tell Equinix - We're Listening. E Q U= + I N I X | One Lagoon Drive, 4th Floor, Redwood City, CA 94065 | = + www.equinix.com =C2=A9 2021 Equinix, Inc. All rights reserved.| Leg= +al | Privacy + +--=20 +You received this message because you are subscribed to the Google Groups "= +Maintenance Notices" group. +To unsubscribe from this group and stop receiving emails from it, send an e= +mail to maintenance-notices+unsubscribe@example.com. +To view this discussion on the web visit https://groups.google.com/a/riotga= +mes.com/d/msgid/maintenance-notices/1814407781.76370.1637154616133%40vmclxremas08.co= +rp.equinix.com. + +------=_Part_76369_234541402.1637154616132 +Content-Type: text/html; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + + + + + + + + + + + + + +
+ + + + +
+ +
3D"Meet +
+
+ + + + + + +
  + +
+

+Dear Equinix Customer,
+
+The maintenance listed below has now been completed.
+
+

+
+


+Dear Equinix Customer,
+
+DATE: 16-NOV-2021 - 17-NOV-2021
+
+SPAN: 16-NOV-2021 - 17-NOV-2021
+
+LOCAL: TUESDAY, 16 NOV 23:00 - WEDNESDAY, 17 NOV 05:00
+UTC: WEDNESDAY, 17 NOV 07:00 - WEDNESDAY, 17 NOV 13:00
+
+IBX(s): HQ,SUN,SV1,SV10,SV11,SV13,SV14,SV15,SV16,SV17,SV2,SV3,SV4,SV= +5,SV6,SV8,SV9
+
+
+DESCRIPTION:Please be advised as part of an ongoing effort to improv= +e reliability and security, Equinix will be performing software patching on= + Internet Exchange (IX) route servers.
+Please ensure your BGP sessions to both route servers are operational befor= +e the start of the maintenance to avoid service interruption. The activity = +will be carried out one at a time on each route servers and BGP sessions to= + each route server will be down for approximately 60 minutes.
+This work will not cause a physical downtime to the peering port.
+
+Equinix will be performing essential maintenance on the Primary Route Serve= +r in the SV metro.
+
+BGP sessions to RS1 (AS24115) 192.168.117.251, 2001:db8:0:1:ffff:ffff:ffff:= +1 will be impacted.
+
+BGP sessions to RS2 (AS24115) 192.168.117.252, 2001:db8:0:1:ffff:ffff:ffff:= +2 will not be impacted.
+
+BGP sessions to RC1 (AS65517) 192.168.117.250, 2001:db8:0:1:0:6:5517:1 will= + not be impacted.
+

+PRODUCTS: INTERNET EXCHANGE
+
+IMPACT: Loss of redundancy to your service
+
+ Internet Exchange +=09 + +

+ + + + + + + + + + +
Account #ProductService Serial #
123456Internet Exchange12345678-A
+
+
We apologize for any inconvenience you may experienc= +e during this activity. Your cooperation and understanding are greatly app= +reciated.

The Equinix SMC is available to provide up-to-date s= +tatus information or additional details, should you have any questions rega= +rding the maintenance. Please reference EQ-GL-20211027-00621.
+
+

Sincerely,
Equinix SMC

Contacts:

To place orders, schedule s= +ite access, report trouble or manage your user list online, please visit: <= +a href=3D"http://www.equinix.com/contact-us/customer-support/ ">http://www.= +equinix.com/contact-us/customer-support/

Please do not reply to = +this email address. If you have any questions or concerns regarding this no= +tification, please email Servic= +e Desk and include the ticket [EQ-GL-20211027-00621] in the subject li= +ne. If the matter is urgent, you may contact the Service Desk North America= + by phone at +1.866.EQUINIX (378.4649) (USA or Canada) or +1.408.451.5200 = +(outside USA or Canada) for an up-to-date status.


+
To unsubscribe from notifications, please log in to the E= +quinix Customer Portal and change your preferences.

+
+
+
+
+

 

+
+
+ + + +
3D"Equinix" + + + +
How are we doi= +ng? Tell Equinix - We're Listening. + +  +
+
 
+
+ + + + + +
+ + + + + +
+ + + + + + +
= +E Q U I N I X &nb= +sp; |   One Lagoon Drive, 4th Floor, Redwood City, CA 94065 +   |   www.equinix.com
+
© 2021 Eq= +uinix, Inc. All rights reserved.| Legal | Priva= +cy +
+ + + + + + +

+ +--
+You received this message because you are subscribed to the Google Groups &= +quot;Maintenance Notices" group.
+To unsubscribe from this group and stop receiving emails from it, send an e= +mail to maintenance-notices+= +unsubscribe@example.com.
+To view this discussion on the web visit https://g= +roups.google.com/a/example.com/d/msgid/maintenance-notices/1814407781.76370.163715= +4616133%40vmclxremas08.corp.equinix.com.
+ +------=_Part_76369_234541402.1637154616132-- diff --git a/tests/unit/data/equinix/equinix3_result.json b/tests/unit/data/equinix/equinix3_result.json index 777896ab..5b24d3c9 100644 --- a/tests/unit/data/equinix/equinix3_result.json +++ b/tests/unit/data/equinix/equinix3_result.json @@ -1,77 +1,13 @@ [ { - "account": "009999", + "account": "123456", "circuits": [ - { - "circuit_id": "10101", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "10108", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "10001", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "09999000-B", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "09999020-B", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "09999045-B", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "09999063-B", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "09999022-B", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "09999022-B", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "09999064-B", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "09999063-B", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "09999069-B", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "09999057-B", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "09999058-B", - "impact": "NO-IMPACT" - }, - { - "circuit_id": "09999052-B", - "impact": "NO-IMPACT" - } + { + "circuit_id": "12345678-A", + "impact": "REDUCED-REDUNDANCY" + } ], - "end": 1625238000, - "maintenance_id": "K-293030438574", - "organizer": "servicedesk@equinix.com", - "provider": "equinix", - "sequence": 1, - "stamp": 1634658948, - "start": 1625220000, - "status": "CONFIRMED", - "summary": "Fwd: REMINDER - 3rd Party Equinix Network Device Maintenance-TY Metro Area Network Maintenance -02-JUL-2021 [K-293030438574]", - "uid": "0" + "end": 1637154000, + "start": 1637132400 } -] \ No newline at end of file +] diff --git a/tests/unit/data/equinix/equinix3_result_combined.json b/tests/unit/data/equinix/equinix3_result_combined.json new file mode 100644 index 00000000..0f85a135 --- /dev/null +++ b/tests/unit/data/equinix/equinix3_result_combined.json @@ -0,0 +1,20 @@ +[ + { + "account": "123456", + "circuits": [ + { + "circuit_id": "12345678-A", + "impact": "REDUCED-REDUNDANCY" + } + ], + "end": 1637154000, + "maintenance_id": "EQ-GL-20211027-00621", + "organizer": "servicedesk@equinix.com", + "provider": "equinix", + "sequence": 1, + "stamp": 1637154616, + "start": 1637132400, + "status": "COMPLETED", + "summary": "[maintenance-notices] COMPLETED - Scheduled MLPE Upgrade-SV Metro Area Network Maintenance -16-NOV-2021 [EQ-GL-20211027-00621]" + } +] diff --git a/tests/unit/test_e2e.py b/tests/unit/test_e2e.py index e85c56b9..dcaabab0 100644 --- a/tests/unit/test_e2e.py +++ b/tests/unit/test_e2e.py @@ -100,7 +100,12 @@ ( Equinix, [("email", Path(dir_path, "data", "equinix", "equinix1.eml"))], - [Path(dir_path, "data", "equinix", "equinix3_result.json")], + [Path(dir_path, "data", "equinix", "equinix1_result_combined.json")], + ), + ( + Equinix, + [("email", Path(dir_path, "data", "equinix", "equinix3.eml"))], + [Path(dir_path, "data", "equinix", "equinix3_result_combined.json")], ), # EUNetworks (EUNetworks, [("ical", GENERIC_ICAL_DATA_PATH),], [GENERIC_ICAL_RESULT_PATH,],), diff --git a/tests/unit/test_parsers.py b/tests/unit/test_parsers.py index 88a0184e..d5d99724 100644 --- a/tests/unit/test_parsers.py +++ b/tests/unit/test_parsers.py @@ -103,6 +103,11 @@ Path(dir_path, "data", "equinix", "equinix2.eml"), Path(dir_path, "data", "equinix", "equinix2_result.json"), ), + ( + HtmlParserEquinix, + Path(dir_path, "data", "equinix", "equinix3.eml"), + Path(dir_path, "data", "equinix", "equinix3_result.json"), + ), # GTT ( HtmlParserGTT1, From 2802d43ba35d4a6c1d42891df05be37c173d4036 Mon Sep 17 00:00:00 2001 From: Glenn Matthews Date: Thu, 18 Nov 2021 09:13:42 -0500 Subject: [PATCH 8/8] Bump version and add release date --- CHANGELOG.md | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81047013..28351b51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## v2.0.5 +## v2.0.5 - 2021-11-18 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index 1f29ea6c..b7c920fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "circuit-maintenance-parser" -version = "2.0.4" +version = "2.0.5" description = "Python library to parse Circuit Maintenance notifications and return a structured data back" authors = ["Network to Code "] license = "Apache-2.0"