xcal-parktronic 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -1
- data/lib/xcal/parktronic/routes/alarms.rb +20 -8
- data/lib/xcal/parktronic/routes/events.rb +33 -1
- data/lib/xcal/parktronic/routes/metrics.rb +18 -0
- data/lib/xcal/parktronic/version.rb +1 -1
- data/spec/lib/xcal/parktronic/routes/alarms_route_spec.rb +15 -3
- data/spec/lib/xcal/parktronic/routes/event_history_items_routes_spec.rb +2 -2
- data/spec/lib/xcal/parktronic/routes/events_route_spec.rb +9 -2
- data/spec/lib/xcal/parktronic/routes/metrics_routes_spec.rb +9 -0
- data/spec/lib/xcal/parktronic/routes/nested/events_spec.rb +13 -1
- data/spec/support/api_mock.rb +16 -0
- data/spec/support/fixtures/responses/alarm.json +5 -2
- data/spec/support/fixtures/responses/alarm_action.json +2 -2
- data/spec/support/fixtures/responses/alarm_actions.json +3 -3
- data/spec/support/fixtures/responses/alarm_events.json +333 -33
- data/spec/support/fixtures/responses/alarm_post.json +24 -4
- data/spec/support/fixtures/responses/alarm_tags.json +1 -1
- data/spec/support/fixtures/responses/alarms_page_1.json +51 -21
- data/spec/support/fixtures/responses/alarms_page_2.json +51 -21
- data/spec/support/fixtures/responses/alarms_post.json +2 -2
- data/spec/support/fixtures/responses/brouha_products_services.json +15 -0
- data/spec/support/fixtures/responses/event.json +34 -7
- data/spec/support/fixtures/responses/events_history_page_1.json +5 -5
- data/spec/support/fixtures/responses/events_history_page_2.json +5 -5
- data/spec/support/fixtures/responses/events_page_1.json +105 -0
- data/spec/support/fixtures/responses/metrics_calculate.json +13 -0
- data/spec/support/fixtures/responses/stack_changes_page_1.json +20 -10
- data/spec/support/fixtures/responses/stack_changes_page_2.json +20 -10
- data/xcal-parktronic.gemspec +0 -1
- metadata +9 -5
- data/spec/support/fixtures/responses/events.json +0 -42
@@ -4,7 +4,7 @@
|
|
4
4
|
{
|
5
5
|
"event_history_item":{
|
6
6
|
"event_id":1,
|
7
|
-
"
|
7
|
+
"event_status":"Resolved",
|
8
8
|
"host":"host1",
|
9
9
|
"service":"service1",
|
10
10
|
"initiated_at":"2013-12-30T21:03:39.000Z"
|
@@ -13,7 +13,7 @@
|
|
13
13
|
{
|
14
14
|
"event_history_item":{
|
15
15
|
"event_id":1,
|
16
|
-
"
|
16
|
+
"event_status":"In Progress",
|
17
17
|
"host":"host1",
|
18
18
|
"service":"service1",
|
19
19
|
"initiated_at":"2013-12-29T21:03:39.000Z"
|
@@ -22,7 +22,7 @@
|
|
22
22
|
{
|
23
23
|
"event_history_item":{
|
24
24
|
"event_id":1,
|
25
|
-
"
|
25
|
+
"event_status":"Open",
|
26
26
|
"host":"host1",
|
27
27
|
"service":"service1",
|
28
28
|
"initiated_at":"2013-12-28T21:03:39.000Z"
|
@@ -31,7 +31,7 @@
|
|
31
31
|
{
|
32
32
|
"event_history_item":{
|
33
33
|
"event_id":1,
|
34
|
-
"
|
34
|
+
"event_status":"Resolved",
|
35
35
|
"host":"host1",
|
36
36
|
"service":"service1",
|
37
37
|
"initiated_at":"2013-12-27T21:03:39.000Z"
|
@@ -40,7 +40,7 @@
|
|
40
40
|
{
|
41
41
|
"event_history_item":{
|
42
42
|
"event_id":2,
|
43
|
-
"
|
43
|
+
"event_status":"ACKNOWLEDGED",
|
44
44
|
"host":"host1",
|
45
45
|
"service":"service1",
|
46
46
|
"initiated_at":"2013-12-26T21:03:39.000Z"
|
@@ -4,7 +4,7 @@
|
|
4
4
|
{
|
5
5
|
"event_history_item":{
|
6
6
|
"event_id":2,
|
7
|
-
"
|
7
|
+
"event_status":"NEW",
|
8
8
|
"host":"host1",
|
9
9
|
"service":"service1",
|
10
10
|
"initiated_at":"2013-12-25T21:03:39.000Z"
|
@@ -13,7 +13,7 @@
|
|
13
13
|
{
|
14
14
|
"event_history_item":{
|
15
15
|
"event_id":2,
|
16
|
-
"
|
16
|
+
"event_status":"Up",
|
17
17
|
"host":"host1",
|
18
18
|
"service":"service1",
|
19
19
|
"initiated_at":"2013-12-24T22:03:39.000Z"
|
@@ -22,7 +22,7 @@
|
|
22
22
|
{
|
23
23
|
"event_history_item":{
|
24
24
|
"event_id":2,
|
25
|
-
"
|
25
|
+
"event_status":"Down",
|
26
26
|
"host":"host1",
|
27
27
|
"service":"service1",
|
28
28
|
"initiated_at":"2013-12-24T21:03:39.000Z"
|
@@ -31,7 +31,7 @@
|
|
31
31
|
{
|
32
32
|
"event_history_item":{
|
33
33
|
"event_id":1,
|
34
|
-
"
|
34
|
+
"event_status":"Open",
|
35
35
|
"host":"host1",
|
36
36
|
"service":"service1",
|
37
37
|
"initiated_at":"2013-12-23T21:03:39.000Z"
|
@@ -40,7 +40,7 @@
|
|
40
40
|
{
|
41
41
|
"event_history_item":{
|
42
42
|
"event_id":1,
|
43
|
-
"
|
43
|
+
"event_status":"New",
|
44
44
|
"host":"host1",
|
45
45
|
"service":"service1",
|
46
46
|
"initiated_at":"2013-12-23T11:03:39.000Z"
|
@@ -0,0 +1,105 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"events": [
|
4
|
+
{
|
5
|
+
"event": {
|
6
|
+
"id": 1,
|
7
|
+
"alarm_id": 2,
|
8
|
+
"event_hash": "c2f3721645d8a12fb501a07b5f51248851c55fe2",
|
9
|
+
"subject": "Subject name",
|
10
|
+
"description": "description text",
|
11
|
+
"aggregated_count": 2,
|
12
|
+
"host_impacted": "host",
|
13
|
+
"service_impacted": "Redis Hitrate",
|
14
|
+
"threshold_value": null,
|
15
|
+
"jira_incident_id":" ID_123",
|
16
|
+
"jira_incident_status": null,
|
17
|
+
"incident_status": "STATUS",
|
18
|
+
"brouha_incident_id": null,
|
19
|
+
"brouha_incident_status": null,
|
20
|
+
"initiated_at": "2014-01-21T13:24:18.000Z",
|
21
|
+
"created_at": "2014-01-21T12:24:19.000Z",
|
22
|
+
"updated_at": "2014-01-21T13:24:19.000Z",
|
23
|
+
"jira_browse_issue_path": "https://www.jira_project.com/jira",
|
24
|
+
"additional_description": null,
|
25
|
+
"event_status": "OK",
|
26
|
+
"brouha_browse_issue_path": null,
|
27
|
+
"service_now_browse_issue_path": null,
|
28
|
+
"first_event_initiated_at": "2015-04-02T15:35:01.000Z",
|
29
|
+
"acknowledged_by": null,
|
30
|
+
"acknowledged_at": null,
|
31
|
+
"snoozed_by": null,
|
32
|
+
"snoozed_for": null,
|
33
|
+
"snoozed_at": null,
|
34
|
+
"snoozed_comment": null,
|
35
|
+
"application_name": "APP_NAME",
|
36
|
+
"itrc_application_id": 12345,
|
37
|
+
"service_desk": "PSC",
|
38
|
+
"incident_ticket_id": null,
|
39
|
+
"incident_ticket_sor": null,
|
40
|
+
"ticketed_by": null,
|
41
|
+
"ticketed_at": null,
|
42
|
+
"received_by_oiv_at": "2015-04-02T15:48:59.276Z",
|
43
|
+
"acknowledged_by_user": null,
|
44
|
+
"snoozed_by_user": null,
|
45
|
+
"ticketed_by_user": null,
|
46
|
+
"sub_type": null,
|
47
|
+
"host_ip_address": null,
|
48
|
+
"incident_ticket_auto_correlated": false,
|
49
|
+
"incident_ticket_auto_correlated_at": null,
|
50
|
+
"snoozed": false
|
51
|
+
}
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"event": {
|
55
|
+
"id": 2,
|
56
|
+
"alarm_id": 2,
|
57
|
+
"event_hash": "711a9269ae154b71f9947ca5829bb2c3261fe1fb",
|
58
|
+
"subject": "Subject name 2",
|
59
|
+
"description": "description text",
|
60
|
+
"aggregated_count": 1,
|
61
|
+
"host_impacted": "host 2",
|
62
|
+
"service_impacted": "Service",
|
63
|
+
"threshold_value": null,
|
64
|
+
"jira_incident_id": null,
|
65
|
+
"jira_incident_status": null,
|
66
|
+
"incident_status": "Status",
|
67
|
+
"brouha_incident_id": null,
|
68
|
+
"brouha_incident_status": null,
|
69
|
+
"initiated_at": "2014-01-23T13:46:27.000Z",
|
70
|
+
"created_at": "2014-01-23T13:46:27.000Z",
|
71
|
+
"updated_at": "2014-01-23T13:46:27.000Z",
|
72
|
+
"jira_browse_issue_path": null,
|
73
|
+
"additional_description": null,
|
74
|
+
"event_status": "OK",
|
75
|
+
"brouha_browse_issue_path": null,
|
76
|
+
"service_now_browse_issue_path": null,
|
77
|
+
"first_event_initiated_at": "2015-04-02T15:35:01.000Z",
|
78
|
+
"acknowledged_by": null,
|
79
|
+
"acknowledged_at": null,
|
80
|
+
"snoozed_by": null,
|
81
|
+
"snoozed_for": null,
|
82
|
+
"snoozed_at": null,
|
83
|
+
"snoozed_comment": null,
|
84
|
+
"application_name": "APP_NAME",
|
85
|
+
"itrc_application_id": 12345,
|
86
|
+
"service_desk": "PSC",
|
87
|
+
"incident_ticket_id": null,
|
88
|
+
"incident_ticket_sor": null,
|
89
|
+
"ticketed_by": null,
|
90
|
+
"ticketed_at": null,
|
91
|
+
"received_by_oiv_at": "2015-04-02T15:48:59.276Z",
|
92
|
+
"acknowledged_by_user": null,
|
93
|
+
"snoozed_by_user": null,
|
94
|
+
"ticketed_by_user": null,
|
95
|
+
"sub_type": null,
|
96
|
+
"host_ip_address": null,
|
97
|
+
|
98
|
+
"incident_ticket_auto_correlated": false,
|
99
|
+
"incident_ticket_auto_correlated_at": null,
|
100
|
+
"snoozed": false
|
101
|
+
}
|
102
|
+
}
|
103
|
+
]
|
104
|
+
}
|
105
|
+
]
|
@@ -5,70 +5,80 @@
|
|
5
5
|
"stack_change":{
|
6
6
|
"element":"STACK1",
|
7
7
|
"resolution_date":"2013-05-21T16:03:39.000Z",
|
8
|
-
"ticket_id":"CHANGE-1"
|
8
|
+
"ticket_id":"CHANGE-1",
|
9
|
+
"ticket_summary":"CHANGE-1-SUMMARY"
|
9
10
|
}
|
10
11
|
},
|
11
12
|
{
|
12
13
|
"stack_change":{
|
13
14
|
"element":"STACK2",
|
14
15
|
"resolution_date":"2013-07-21T16:03:39.000Z",
|
15
|
-
"ticket_id":"CHANGE-2"
|
16
|
+
"ticket_id":"CHANGE-2",
|
17
|
+
"ticket_summary":"CHANGE-2-SUMMARY"
|
16
18
|
}
|
17
19
|
},
|
18
20
|
{
|
19
21
|
"stack_change":{
|
20
22
|
"element":"STACK1",
|
21
23
|
"resolution_date":"2013-07-29T16:03:39.000Z",
|
22
|
-
"ticket_id":"CHANGE-3"
|
24
|
+
"ticket_id":"CHANGE-3",
|
25
|
+
"ticket_summary":"CHANGE-3-SUMMARY"
|
23
26
|
}
|
24
27
|
},
|
25
28
|
{
|
26
29
|
"stack_change":{
|
27
30
|
"element":"STACK2",
|
28
31
|
"resolution_date":"2013-08-21T16:03:39.000Z",
|
29
|
-
"ticket_id":"CHANGE-4"
|
32
|
+
"ticket_id":"CHANGE-4",
|
33
|
+
"ticket_summary":"CHANGE-4-SUMMARY"
|
30
34
|
}
|
31
35
|
},
|
32
36
|
{
|
33
37
|
"stack_change":{
|
34
38
|
"element":"STACK3",
|
35
39
|
"resolution_date":"2013-08-21T18:03:39.000Z",
|
36
|
-
"ticket_id":"CHANGE-5"
|
40
|
+
"ticket_id":"CHANGE-5",
|
41
|
+
"ticket_summary":"CHANGE-5-SUMMARY"
|
37
42
|
}
|
38
43
|
},
|
39
44
|
{
|
40
45
|
"stack_change":{
|
41
46
|
"element":"STACK3",
|
42
47
|
"resolution_date":"2013-08-25T18:03:39.000Z",
|
43
|
-
"ticket_id":"CHANGE-6"
|
48
|
+
"ticket_id":"CHANGE-6",
|
49
|
+
"ticket_summary":"CHANGE-6-SUMMARY"
|
44
50
|
}
|
45
51
|
},
|
46
52
|
{
|
47
53
|
"stack_change":{
|
48
54
|
"element":"STACK1",
|
49
55
|
"resolution_date":"2013-08-28T16:03:39.000Z",
|
50
|
-
"ticket_id":"CHANGE-7"
|
56
|
+
"ticket_id":"CHANGE-7",
|
57
|
+
"ticket_summary":"CHANGE-7-SUMMARY"
|
51
58
|
}
|
52
59
|
},
|
53
60
|
{
|
54
61
|
"stack_change":{
|
55
62
|
"element":"STACK1",
|
56
63
|
"resolution_date":"2013-08-29T19:03:39.000Z",
|
57
|
-
"ticket_id":"CHANGE-8"
|
64
|
+
"ticket_id":"CHANGE-8",
|
65
|
+
"ticket_summary":"CHANGE-8-SUMMARY"
|
58
66
|
}
|
59
67
|
},
|
60
68
|
{
|
61
69
|
"stack_change":{
|
62
70
|
"element":"STACK4",
|
63
71
|
"resolution_date":"2013-08-29T21:03:39.000Z",
|
64
|
-
"ticket_id":"CHANGE-9"
|
72
|
+
"ticket_id":"CHANGE-9",
|
73
|
+
"ticket_summary":"CHANGE-9-SUMMARY"
|
65
74
|
}
|
66
75
|
},
|
67
76
|
{
|
68
77
|
"stack_change":{
|
69
78
|
"element":"STACK1",
|
70
79
|
"resolution_date":"2013-09-01T16:03:39.000Z",
|
71
|
-
"ticket_id":"CHANGE-10"
|
80
|
+
"ticket_id":"CHANGE-10",
|
81
|
+
"ticket_summary":"CHANGE-10-SUMMARY"
|
72
82
|
}
|
73
83
|
}
|
74
84
|
],
|
@@ -5,70 +5,80 @@
|
|
5
5
|
"stack_change":{
|
6
6
|
"element":"STACK2",
|
7
7
|
"resolution_date":"2013-09-01T19:03:39.000Z",
|
8
|
-
"ticket_id":"CHANGE-11"
|
8
|
+
"ticket_id":"CHANGE-11",
|
9
|
+
"ticket_summary":"CHANGE-11-SUMMARY"
|
9
10
|
}
|
10
11
|
},
|
11
12
|
{
|
12
13
|
"stack_change":{
|
13
14
|
"element":"STACK2",
|
14
15
|
"resolution_date":"2013-09-02T16:03:39.000Z",
|
15
|
-
"ticket_id":"CHANGE-12"
|
16
|
+
"ticket_id":"CHANGE-12",
|
17
|
+
"ticket_summary":"CHANGE-12-SUMMARY"
|
16
18
|
}
|
17
19
|
},
|
18
20
|
{
|
19
21
|
"stack_change":{
|
20
22
|
"element":"STACK1",
|
21
23
|
"resolution_date":"2013-09-12T16:03:39.000Z",
|
22
|
-
"ticket_id":"CHANGE-13"
|
24
|
+
"ticket_id":"CHANGE-13",
|
25
|
+
"ticket_summary":"CHANGE-13-SUMMARY"
|
23
26
|
}
|
24
27
|
},
|
25
28
|
{
|
26
29
|
"stack_change":{
|
27
30
|
"element":"STACK2",
|
28
31
|
"resolution_date":"2013-09-21T16:03:39.000Z",
|
29
|
-
"ticket_id":"CHANGE-14"
|
32
|
+
"ticket_id":"CHANGE-14",
|
33
|
+
"ticket_summary":"CHANGE-14-SUMMARY"
|
30
34
|
}
|
31
35
|
},
|
32
36
|
{
|
33
37
|
"stack_change":{
|
34
38
|
"element":"STACK3",
|
35
39
|
"resolution_date":"2013-09-21T18:03:39.000Z",
|
36
|
-
"ticket_id":"CHANGE-15"
|
40
|
+
"ticket_id":"CHANGE-15",
|
41
|
+
"ticket_summary":"CHANGE-15-SUMMARY"
|
37
42
|
}
|
38
43
|
},
|
39
44
|
{
|
40
45
|
"stack_change":{
|
41
46
|
"element":"STACK3",
|
42
47
|
"resolution_date":"2013-09-25T18:03:39.000Z",
|
43
|
-
"ticket_id":"CHANGE-16"
|
48
|
+
"ticket_id":"CHANGE-16",
|
49
|
+
"ticket_summary":"CHANGE-16-SUMMARY"
|
44
50
|
}
|
45
51
|
},
|
46
52
|
{
|
47
53
|
"stack_change":{
|
48
54
|
"element":"STACK1",
|
49
55
|
"resolution_date":"2013-10-28T16:03:39.000Z",
|
50
|
-
"ticket_id":"CHANGE-17"
|
56
|
+
"ticket_id":"CHANGE-17",
|
57
|
+
"ticket_summary":"CHANGE-17-SUMMARY"
|
51
58
|
}
|
52
59
|
},
|
53
60
|
{
|
54
61
|
"stack_change":{
|
55
62
|
"element":"STACK1",
|
56
63
|
"resolution_date":"2013-11-29T19:03:39.000Z",
|
57
|
-
"ticket_id":"CHANGE-18"
|
64
|
+
"ticket_id":"CHANGE-18",
|
65
|
+
"ticket_summary":"CHANGE-18-SUMMARY"
|
58
66
|
}
|
59
67
|
},
|
60
68
|
{
|
61
69
|
"stack_change":{
|
62
70
|
"element":"STACK4",
|
63
71
|
"resolution_date":"2013-11-29T21:03:39.000Z",
|
64
|
-
"ticket_id":"CHANGE-19"
|
72
|
+
"ticket_id":"CHANGE-19",
|
73
|
+
"ticket_summary":"CHANGE-19-SUMMARY"
|
65
74
|
}
|
66
75
|
},
|
67
76
|
{
|
68
77
|
"stack_change":{
|
69
78
|
"element":"STACK1",
|
70
79
|
"resolution_date":"2013-12-01T16:03:39.000Z",
|
71
|
-
"ticket_id":"CHANGE-20"
|
80
|
+
"ticket_id":"CHANGE-20",
|
81
|
+
"ticket_summary":"CHANGE-20-SUMMARY"
|
72
82
|
}
|
73
83
|
}
|
74
84
|
],
|
data/xcal-parktronic.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcal-parktronic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vitaliy Omelchenko
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-06-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: hashie
|
@@ -179,17 +179,19 @@ files:
|
|
179
179
|
- spec/support/fixtures/responses/alarms_page_1.json
|
180
180
|
- spec/support/fixtures/responses/alarms_page_2.json
|
181
181
|
- spec/support/fixtures/responses/alarms_post.json
|
182
|
+
- spec/support/fixtures/responses/brouha_products_services.json
|
182
183
|
- spec/support/fixtures/responses/command_notification.json
|
183
184
|
- spec/support/fixtures/responses/command_notifications.json
|
184
185
|
- spec/support/fixtures/responses/event.json
|
185
186
|
- spec/support/fixtures/responses/event_tags.json
|
186
|
-
- spec/support/fixtures/responses/events.json
|
187
187
|
- spec/support/fixtures/responses/events_history_page_1.json
|
188
188
|
- spec/support/fixtures/responses/events_history_page_2.json
|
189
|
+
- spec/support/fixtures/responses/events_page_1.json
|
189
190
|
- spec/support/fixtures/responses/forbidden.json
|
190
191
|
- spec/support/fixtures/responses/metric.json
|
191
192
|
- spec/support/fixtures/responses/metric_metric_values.json
|
192
193
|
- spec/support/fixtures/responses/metric_post.json
|
194
|
+
- spec/support/fixtures/responses/metrics_calculate.json
|
193
195
|
- spec/support/fixtures/responses/metrics_page_1.json
|
194
196
|
- spec/support/fixtures/responses/metrics_page_2.json
|
195
197
|
- spec/support/fixtures/responses/outages_page_1.json
|
@@ -219,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
221
|
version: '0'
|
220
222
|
requirements: []
|
221
223
|
rubyforge_project:
|
222
|
-
rubygems_version: 2.4.
|
224
|
+
rubygems_version: 2.4.4
|
223
225
|
signing_key:
|
224
226
|
specification_version: 4
|
225
227
|
summary: Get easy access to the most OIV data
|
@@ -247,17 +249,19 @@ test_files:
|
|
247
249
|
- spec/support/fixtures/responses/alarms_page_1.json
|
248
250
|
- spec/support/fixtures/responses/alarms_page_2.json
|
249
251
|
- spec/support/fixtures/responses/alarms_post.json
|
252
|
+
- spec/support/fixtures/responses/brouha_products_services.json
|
250
253
|
- spec/support/fixtures/responses/command_notification.json
|
251
254
|
- spec/support/fixtures/responses/command_notifications.json
|
252
255
|
- spec/support/fixtures/responses/event.json
|
253
256
|
- spec/support/fixtures/responses/event_tags.json
|
254
|
-
- spec/support/fixtures/responses/events.json
|
255
257
|
- spec/support/fixtures/responses/events_history_page_1.json
|
256
258
|
- spec/support/fixtures/responses/events_history_page_2.json
|
259
|
+
- spec/support/fixtures/responses/events_page_1.json
|
257
260
|
- spec/support/fixtures/responses/forbidden.json
|
258
261
|
- spec/support/fixtures/responses/metric.json
|
259
262
|
- spec/support/fixtures/responses/metric_metric_values.json
|
260
263
|
- spec/support/fixtures/responses/metric_post.json
|
264
|
+
- spec/support/fixtures/responses/metrics_calculate.json
|
261
265
|
- spec/support/fixtures/responses/metrics_page_1.json
|
262
266
|
- spec/support/fixtures/responses/metrics_page_2.json
|
263
267
|
- spec/support/fixtures/responses/outages_page_1.json
|