/
consts.py
181 lines (173 loc) · 7.95 KB
/
consts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# test data is from api docs (meta)
TEST_FEED_DATA_INCIDENTS = {
"page": {
"id": "y2j98763l56x",
"name": "Atlassian Statuspage",
"url": "http://metastatuspage.com",
"updated_at": "2021-04-18T22:45:20-07:00",
},
"incidents": [
{
"created_at": "2014-05-14T14:22:39.441-06:00",
"id": "cp306tmzcl0y",
"impact": "critical",
"incident_updates": [
{
"body": "Our master database has ham sandwiches flying out of the rack, and we're working our hardest to stop the bleeding. The whole site is down while we restore functionality, and we'll provide another update within 30 minutes.",
"created_at": "2014-05-14T14:22:40.301-06:00",
"display_at": "2014-05-14T14:22:40.301-06:00",
"id": "jdy3tw5mt5r5",
"incident_id": "cp306tmzcl0y",
"status": "identified",
"updated_at": "2014-05-14T14:22:40.301-06:00",
}
],
"monitoring_at": None,
"name": "Unplanned Database Outage",
"page_id": "y2j98763l56x",
"resolved_at": None,
"shortlink": "http://stspg.co:5000/Q0E",
"status": "identified",
"updated_at": "2014-05-14T14:35:21.711-06:00",
},
{
"created_at": "2014-05-12T14:22:39.441-06:00",
"id": "2z5g29qrrxvl",
"impact": "minor",
"incident_updates": [
{
"body": "A small display issue with the display of the website was discovered after a recent deploy. The deploy has been rolled back and the website is again functioning correctly.",
"created_at": "2014-05-12T14:22:40.301-06:00",
"display_at": "2014-05-12T14:22:40.301-06:00",
"id": "vlzc06gtjnrl",
"incident_id": "2z5g29qrrxvl",
"status": "resolved",
"updated_at": "2014-05-12T14:22:40.301-06:00",
}
],
"monitoring_at": None,
"name": "Unplanned Database Outage",
"page_id": "y2j98763l56x",
"resolved_at": "2014-05-12T14:22:40.301-06:00",
"shortlink": "http://stspg.co:5000/Q0R",
"status": "resolved",
"updated_at": "2014-05-12T14:22:40.301-06:00",
},
],
}
TEST_FEED_DATA_SCHEDULED = {
"page": {
"id": "y2j98763l56x",
"name": "Atlassian Statuspage",
"url": "http://metastatuspage.com",
"updated_at": "2021-04-18T22:45:20-07:00",
},
"scheduled_maintenances": [
{
"created_at": "2014-05-14T14:24:40.430-06:00",
"id": "w1zdr745wmfy",
"impact": "none",
"incident_updates": [
{
"body": "Our data center has informed us that they will be performing routine network maintenance. No interruption in service is expected. Any issues during this maintenance should be directed to our support center",
"created_at": "2014-05-14T14:24:41.913-06:00",
"display_at": "2014-05-14T14:24:41.913-06:00",
"id": "qq0vx910b3qj",
"incident_id": "w1zdr745wmfy",
"status": "scheduled",
"updated_at": "2014-05-14T14:24:41.913-06:00",
}
],
"monitoring_at": None,
"name": "Network Maintenance (No Interruption Expected)",
"page_id": "y2j98763l56x",
"resolved_at": None,
"scheduled_for": "2014-05-17T22:00:00.000-06:00",
"scheduled_until": "2014-05-17T23:30:00.000-06:00",
"shortlink": "http://stspg.co:5000/Q0F",
"status": "scheduled",
"updated_at": "2014-05-14T14:24:41.918-06:00",
},
{
"created_at": "2014-05-14T14:27:17.303-06:00",
"id": "k7mf5z1gz05c",
"impact": "minor",
"incident_updates": [
{
"body": "Scheduled maintenance is currently in progress. We will provide updates as necessary.",
"created_at": "2014-05-14T14:34:20.036-06:00",
"display_at": "2014-05-14T14:34:20.036-06:00",
"id": "drs62w8df6fs",
"incident_id": "k7mf5z1gz05c",
"status": "in_progress",
"updated_at": "2014-05-14T14:34:20.036-06:00",
},
{
"body": "We will be performing rolling upgrades to our web tier with a new kernel version so that Heartbleed will stop making us lose sleep at night. Increased load and latency is expected, but the app should still function appropriately. We will provide updates every 30 minutes with progress of the reboots.",
"created_at": "2014-05-14T14:27:18.845-06:00",
"display_at": "2014-05-14T14:27:18.845-06:00",
"id": "z40y7398jqxc",
"incident_id": "k7mf5z1gz05c",
"status": "scheduled",
"updated_at": "2014-05-14T14:27:18.845-06:00",
},
],
"monitoring_at": None,
"name": "Web Tier Recycle",
"page_id": "y2j98763l56x",
"resolved_at": None,
"scheduled_for": "2014-05-14T14:30:00.000-06:00",
"scheduled_until": "2014-05-14T16:30:00.000-06:00",
"shortlink": "http://stspg.co:5000/Q0G",
"status": "in_progress",
"updated_at": "2014-05-14T14:35:12.258-06:00",
},
],
}
STATUS_EXPECTED_EMBED_INCIDENTS_ALL = {
"fields": [
{
"inline": False,
"name": "Identified - <t:1400098960:f>",
"value": "Our master database has ham sandwiches flying out of the rack, and we're working our hardest to stop the bleeding. The whole site is down while we restore functionality, and we'll provide another update within 30 minutes.",
}
],
"color": 15158332,
"timestamp": "2014-05-14T20:22:40.301000+00:00",
"type": "rich",
"description": "Impact: **Critical**\nAffects: _Unknown_",
"url": "http://stspg.co:5000/Q0E",
"title": "Unplanned Database Outage",
}
STATUS_EXPECTED_PLAIN_INCIDENTS_ALL = """**Statuspage Status Update
Unplanned Database Outage**
Incident link: <http://stspg.co:5000/Q0E>
Impact: **Critical**
Affects: _Unknown_
**Identified - <t:1400098960:f>**
Our master database has ham sandwiches flying out of the rack, and we're working our hardest to stop the bleeding. The whole site is down while we restore functionality, and we'll provide another update within 30 minutes.
"""
STATUS_EXPECTED_EMBED_SCHEDULED_ALL = {
"fields": [
{
"inline": False,
"name": "Scheduled - <t:1400099081:f>",
"value": "Our data center has informed us that they will be performing routine network maintenance. No interruption in service is expected. Any issues during this maintenance should be directed to our support center",
}
],
"color": 15105570,
"timestamp": "2014-05-14T20:24:41.913000+00:00",
"type": "rich",
"description": "Impact: **None**\nAffects: _Unknown_\nScheduled for: **<t:1400385600:f>** to **<t:1400391000:f>**",
"url": "http://stspg.co:5000/Q0F",
"title": "Network Maintenance (No Interruption Expected)",
}
STATUS_EXPECTED_PLAIN_SCHEDULED_ALL = """**Statuspage Status Update
Network Maintenance (No Interruption Expected)**
Incident link: <http://stspg.co:5000/Q0F>
Impact: **None**
Affects: _Unknown_
Scheduled for: **<t:1400385600:f>** to **<t:1400391000:f>**
**Scheduled - <t:1400099081:f>**
Our data center has informed us that they will be performing routine network maintenance. No interruption in service is expected. Any issues during this maintenance should be directed to our support center
"""