xcal-parktronic 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/.travis.yml +7 -0
- data/README.md +73 -7
- data/lib/xcal/parktronic.rb +11 -0
- data/lib/xcal/parktronic/api_client.rb +8 -5
- data/lib/xcal/parktronic/generic_response.rb +18 -2
- data/lib/xcal/parktronic/routes.rb +9 -2
- data/lib/xcal/parktronic/routes/alarms.rb +115 -34
- data/lib/xcal/parktronic/routes/command_notifications.rb +56 -0
- data/lib/xcal/parktronic/routes/custom_queries.rb +80 -0
- data/lib/xcal/parktronic/routes/event_history_items.rb +36 -0
- data/lib/xcal/parktronic/routes/events.rb +67 -0
- data/lib/xcal/parktronic/routes/metrics.rb +120 -0
- data/lib/xcal/parktronic/routes/nested/alarm_actions.rb +84 -0
- data/lib/xcal/parktronic/routes/nested/device_errors.rb +35 -0
- data/lib/xcal/parktronic/routes/nested/events.rb +57 -0
- data/lib/xcal/parktronic/routes/nested/metric_values.rb +35 -0
- data/lib/xcal/parktronic/routes/outages.rb +34 -0
- data/lib/xcal/parktronic/routes/stack_changes.rb +53 -0
- data/lib/xcal/parktronic/version.rb +1 -1
- data/spec/lib/xcal/parktronic/api_client_spec.rb +12 -2
- data/spec/lib/xcal/parktronic/routes/alarms_route_spec.rb +16 -1
- data/spec/lib/xcal/parktronic/routes/command_notifications_routes_spec.rb +32 -0
- data/spec/lib/xcal/parktronic/routes/event_history_items_routes_spec.rb +28 -0
- data/spec/lib/xcal/parktronic/routes/events_route_spec.rb +33 -0
- data/spec/lib/xcal/parktronic/routes/metrics_routes_spec.rb +92 -49
- data/spec/lib/xcal/parktronic/routes/nested/alarm_actions_spec.rb +58 -0
- data/spec/lib/xcal/parktronic/routes/nested/events_spec.rb +24 -0
- data/spec/lib/xcal/parktronic/routes/outages_routes_spec.rb +25 -0
- data/spec/lib/xcal/parktronic/routes/stack_changes_routes_spec.rb +38 -0
- data/spec/support/api_mock.rb +147 -2
- data/spec/support/fixtures/responses/alarm_action.json +19 -0
- data/spec/support/fixtures/responses/alarm_actions.json +40 -0
- data/spec/support/fixtures/responses/alarm_events.json +180 -0
- data/spec/support/fixtures/responses/alarm_post.json +12 -0
- data/spec/support/fixtures/responses/alarm_tags.json +1 -0
- data/spec/support/fixtures/responses/command_notification.json +7 -0
- data/spec/support/fixtures/responses/command_notifications.json +45 -0
- data/spec/support/fixtures/responses/event.json +22 -0
- data/spec/support/fixtures/responses/event_tags.json +1 -0
- data/spec/support/fixtures/responses/events.json +42 -0
- data/spec/support/fixtures/responses/events_history_page_1.json +55 -0
- data/spec/support/fixtures/responses/events_history_page_2.json +55 -0
- data/spec/support/fixtures/responses/metric.json +8 -0
- data/spec/support/fixtures/responses/metric_device_errors.json +610 -0
- data/spec/support/fixtures/responses/metric_metric_values.json +586 -0
- data/spec/support/fixtures/responses/metric_post.json +12 -0
- data/spec/support/fixtures/responses/metrics_page_1.json +90 -0
- data/spec/support/fixtures/responses/metrics_page_2.json +90 -0
- data/spec/support/fixtures/responses/outages_page_1.json +55 -0
- data/spec/support/fixtures/responses/outages_page_2.json +55 -0
- data/spec/support/fixtures/responses/stack_changes_page_1.json +80 -0
- data/spec/support/fixtures/responses/stack_changes_page_2.json +80 -0
- data/spec/support/fixtures/responses/stack_changes_post.json +12 -0
- data/xcal-parktronic.gemspec +1 -1
- metadata +76 -2
@@ -0,0 +1,90 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"total_count":20,
|
4
|
+
"total_pages":2,
|
5
|
+
"page":1,
|
6
|
+
"per_page":10,
|
7
|
+
"metrics":[
|
8
|
+
{
|
9
|
+
"metric":{
|
10
|
+
"id":7,
|
11
|
+
"name":"Metric 1",
|
12
|
+
"description":null,
|
13
|
+
"metric_type":null
|
14
|
+
}
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"metric":{
|
18
|
+
"id":8,
|
19
|
+
"name":"Metric 2",
|
20
|
+
"description":null,
|
21
|
+
"metric_type":null
|
22
|
+
}
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"metric":{
|
26
|
+
"id":9,
|
27
|
+
"name":"Metric 3",
|
28
|
+
"description":"Description",
|
29
|
+
"metric_type":null
|
30
|
+
}
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"metric":{
|
34
|
+
"id":10,
|
35
|
+
"name":"Metric 4",
|
36
|
+
"description":null,
|
37
|
+
"metric_type":null
|
38
|
+
}
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"metric":{
|
42
|
+
"id":11,
|
43
|
+
"name":"Metric 5",
|
44
|
+
"description":null,
|
45
|
+
"metric_type":null
|
46
|
+
}
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"metric":{
|
50
|
+
"id":12,
|
51
|
+
"name":"Metric 6",
|
52
|
+
"description":null,
|
53
|
+
"metric_type":null
|
54
|
+
}
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"metric":{
|
58
|
+
"id":13,
|
59
|
+
"name":"Metric 7",
|
60
|
+
"description":"Description",
|
61
|
+
"metric_type":null
|
62
|
+
}
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"metric":{
|
66
|
+
"id":14,
|
67
|
+
"name":"Metric 8",
|
68
|
+
"description":null,
|
69
|
+
"metric_type":null
|
70
|
+
}
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"metric":{
|
74
|
+
"id":15,
|
75
|
+
"name":"Metric 9",
|
76
|
+
"description":"Description",
|
77
|
+
"metric_type":null
|
78
|
+
}
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"metric":{
|
82
|
+
"id":16,
|
83
|
+
"name":"Metric 10",
|
84
|
+
"description":null,
|
85
|
+
"metric_type":null
|
86
|
+
}
|
87
|
+
}
|
88
|
+
]
|
89
|
+
}
|
90
|
+
]
|
@@ -0,0 +1,90 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"total_count":20,
|
4
|
+
"total_pages":2,
|
5
|
+
"page":2,
|
6
|
+
"per_page":10,
|
7
|
+
"metrics":[
|
8
|
+
{
|
9
|
+
"metric":{
|
10
|
+
"id":7,
|
11
|
+
"name":"Metric 11",
|
12
|
+
"description":null,
|
13
|
+
"metric_type":null
|
14
|
+
}
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"metric":{
|
18
|
+
"id":8,
|
19
|
+
"name":"Metric 12",
|
20
|
+
"description":null,
|
21
|
+
"metric_type":null
|
22
|
+
}
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"metric":{
|
26
|
+
"id":9,
|
27
|
+
"name":"Metric 13",
|
28
|
+
"description":"Description",
|
29
|
+
"metric_type":null
|
30
|
+
}
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"metric":{
|
34
|
+
"id":10,
|
35
|
+
"name":"Metric 14",
|
36
|
+
"description":null,
|
37
|
+
"metric_type":null
|
38
|
+
}
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"metric":{
|
42
|
+
"id":11,
|
43
|
+
"name":"Metric 15",
|
44
|
+
"description":null,
|
45
|
+
"metric_type":null
|
46
|
+
}
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"metric":{
|
50
|
+
"id":12,
|
51
|
+
"name":"Metric 16",
|
52
|
+
"description":null,
|
53
|
+
"metric_type":null
|
54
|
+
}
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"metric":{
|
58
|
+
"id":13,
|
59
|
+
"name":"Metric 7",
|
60
|
+
"description":"Description",
|
61
|
+
"metric_type":null
|
62
|
+
}
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"metric":{
|
66
|
+
"id":14,
|
67
|
+
"name":"Metric 18",
|
68
|
+
"description":null,
|
69
|
+
"metric_type":null
|
70
|
+
}
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"metric":{
|
74
|
+
"id":15,
|
75
|
+
"name":"Metric 19",
|
76
|
+
"description":"Description",
|
77
|
+
"metric_type":null
|
78
|
+
}
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"metric":{
|
82
|
+
"id":16,
|
83
|
+
"name":"Metric 20",
|
84
|
+
"description":null,
|
85
|
+
"metric_type":null
|
86
|
+
}
|
87
|
+
}
|
88
|
+
]
|
89
|
+
}
|
90
|
+
]
|
@@ -0,0 +1,55 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"high_impact_incidents":[
|
4
|
+
{
|
5
|
+
"high_impact_incident":{
|
6
|
+
"summary":"Incident 1",
|
7
|
+
"ifs_ticket":"IFS-1",
|
8
|
+
"tts_tickets":null,
|
9
|
+
"severity":"Sev0",
|
10
|
+
"ticket_state":"Open"
|
11
|
+
}
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"high_impact_incident":{
|
15
|
+
"summary":"Incident 2",
|
16
|
+
"ifs_ticket":"IFS-2",
|
17
|
+
"tts_tickets":null,
|
18
|
+
"severity":"Sev0",
|
19
|
+
"ticket_state":"Open"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"high_impact_incident":{
|
24
|
+
"summary":"Incident 3",
|
25
|
+
"ifs_ticket":"IFS-3",
|
26
|
+
"tts_tickets":null,
|
27
|
+
"severity":"Sev0",
|
28
|
+
"ticket_state":"Open"
|
29
|
+
}
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"high_impact_incident":{
|
33
|
+
"summary":"Incident 4",
|
34
|
+
"ifs_ticket":"IFS-4",
|
35
|
+
"tts_tickets":null,
|
36
|
+
"severity":"Sev1",
|
37
|
+
"ticket_state":"Open"
|
38
|
+
}
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"high_impact_incident":{
|
42
|
+
"summary":"Incident 5",
|
43
|
+
"ifs_ticket":"IFS-5",
|
44
|
+
"tts_tickets":null,
|
45
|
+
"severity":"Sev1",
|
46
|
+
"ticket_state":"Open"
|
47
|
+
}
|
48
|
+
}
|
49
|
+
],
|
50
|
+
"page":1,
|
51
|
+
"per_page":5,
|
52
|
+
"total_count":10,
|
53
|
+
"total_pages":2
|
54
|
+
}
|
55
|
+
]
|
@@ -0,0 +1,55 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"high_impact_incidents":[
|
4
|
+
{
|
5
|
+
"high_impact_incident":{
|
6
|
+
"summary":"Incident 6",
|
7
|
+
"ifs_ticket":"IFS-6",
|
8
|
+
"tts_tickets":null,
|
9
|
+
"severity":"Sev1",
|
10
|
+
"ticket_state":"Open"
|
11
|
+
}
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"high_impact_incident":{
|
15
|
+
"summary":"Incident 7",
|
16
|
+
"ifs_ticket":"IFS-7",
|
17
|
+
"tts_tickets":null,
|
18
|
+
"severity":"Sev1",
|
19
|
+
"ticket_state":"Open"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"high_impact_incident":{
|
24
|
+
"summary":"Incident 8",
|
25
|
+
"ifs_ticket":"IFS-8",
|
26
|
+
"tts_tickets":null,
|
27
|
+
"severity":"Sev2",
|
28
|
+
"ticket_state":"Open"
|
29
|
+
}
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"high_impact_incident":{
|
33
|
+
"summary":"Incident 9",
|
34
|
+
"ifs_ticket":"IFS-9",
|
35
|
+
"tts_tickets":null,
|
36
|
+
"severity":"Sev2",
|
37
|
+
"ticket_state":"Open"
|
38
|
+
}
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"high_impact_incident":{
|
42
|
+
"summary":"Incident 10",
|
43
|
+
"ifs_ticket":"IFS-10",
|
44
|
+
"tts_tickets":null,
|
45
|
+
"severity":"Sev3",
|
46
|
+
"ticket_state":"Open"
|
47
|
+
}
|
48
|
+
}
|
49
|
+
],
|
50
|
+
"page":2,
|
51
|
+
"per_page":5,
|
52
|
+
"total_count":10,
|
53
|
+
"total_pages":2
|
54
|
+
}
|
55
|
+
]
|
@@ -0,0 +1,80 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"stack_changes":[
|
4
|
+
{
|
5
|
+
"stack_change":{
|
6
|
+
"element":"STACK1",
|
7
|
+
"resolution_date":"2013-05-21T16:03:39.000Z",
|
8
|
+
"ticket_id":"CHANGE-1"
|
9
|
+
}
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"stack_change":{
|
13
|
+
"element":"STACK2",
|
14
|
+
"resolution_date":"2013-07-21T16:03:39.000Z",
|
15
|
+
"ticket_id":"CHANGE-2"
|
16
|
+
}
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"stack_change":{
|
20
|
+
"element":"STACK1",
|
21
|
+
"resolution_date":"2013-07-29T16:03:39.000Z",
|
22
|
+
"ticket_id":"CHANGE-3"
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"stack_change":{
|
27
|
+
"element":"STACK2",
|
28
|
+
"resolution_date":"2013-08-21T16:03:39.000Z",
|
29
|
+
"ticket_id":"CHANGE-4"
|
30
|
+
}
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"stack_change":{
|
34
|
+
"element":"STACK3",
|
35
|
+
"resolution_date":"2013-08-21T18:03:39.000Z",
|
36
|
+
"ticket_id":"CHANGE-5"
|
37
|
+
}
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"stack_change":{
|
41
|
+
"element":"STACK3",
|
42
|
+
"resolution_date":"2013-08-25T18:03:39.000Z",
|
43
|
+
"ticket_id":"CHANGE-6"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"stack_change":{
|
48
|
+
"element":"STACK1",
|
49
|
+
"resolution_date":"2013-08-28T16:03:39.000Z",
|
50
|
+
"ticket_id":"CHANGE-7"
|
51
|
+
}
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"stack_change":{
|
55
|
+
"element":"STACK1",
|
56
|
+
"resolution_date":"2013-08-29T19:03:39.000Z",
|
57
|
+
"ticket_id":"CHANGE-8"
|
58
|
+
}
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"stack_change":{
|
62
|
+
"element":"STACK4",
|
63
|
+
"resolution_date":"2013-08-29T21:03:39.000Z",
|
64
|
+
"ticket_id":"CHANGE-9"
|
65
|
+
}
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"stack_change":{
|
69
|
+
"element":"STACK1",
|
70
|
+
"resolution_date":"2013-09-01T16:03:39.000Z",
|
71
|
+
"ticket_id":"CHANGE-10"
|
72
|
+
}
|
73
|
+
}
|
74
|
+
],
|
75
|
+
"page":1,
|
76
|
+
"per_page":10,
|
77
|
+
"total_count":20,
|
78
|
+
"total_pages":2
|
79
|
+
}
|
80
|
+
]
|
@@ -0,0 +1,80 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"stack_changes":[
|
4
|
+
{
|
5
|
+
"stack_change":{
|
6
|
+
"element":"STACK2",
|
7
|
+
"resolution_date":"2013-09-01T19:03:39.000Z",
|
8
|
+
"ticket_id":"CHANGE-11"
|
9
|
+
}
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"stack_change":{
|
13
|
+
"element":"STACK2",
|
14
|
+
"resolution_date":"2013-09-02T16:03:39.000Z",
|
15
|
+
"ticket_id":"CHANGE-12"
|
16
|
+
}
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"stack_change":{
|
20
|
+
"element":"STACK1",
|
21
|
+
"resolution_date":"2013-09-12T16:03:39.000Z",
|
22
|
+
"ticket_id":"CHANGE-13"
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"stack_change":{
|
27
|
+
"element":"STACK2",
|
28
|
+
"resolution_date":"2013-09-21T16:03:39.000Z",
|
29
|
+
"ticket_id":"CHANGE-14"
|
30
|
+
}
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"stack_change":{
|
34
|
+
"element":"STACK3",
|
35
|
+
"resolution_date":"2013-09-21T18:03:39.000Z",
|
36
|
+
"ticket_id":"CHANGE-15"
|
37
|
+
}
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"stack_change":{
|
41
|
+
"element":"STACK3",
|
42
|
+
"resolution_date":"2013-09-25T18:03:39.000Z",
|
43
|
+
"ticket_id":"CHANGE-16"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"stack_change":{
|
48
|
+
"element":"STACK1",
|
49
|
+
"resolution_date":"2013-10-28T16:03:39.000Z",
|
50
|
+
"ticket_id":"CHANGE-17"
|
51
|
+
}
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"stack_change":{
|
55
|
+
"element":"STACK1",
|
56
|
+
"resolution_date":"2013-11-29T19:03:39.000Z",
|
57
|
+
"ticket_id":"CHANGE-18"
|
58
|
+
}
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"stack_change":{
|
62
|
+
"element":"STACK4",
|
63
|
+
"resolution_date":"2013-11-29T21:03:39.000Z",
|
64
|
+
"ticket_id":"CHANGE-19"
|
65
|
+
}
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"stack_change":{
|
69
|
+
"element":"STACK1",
|
70
|
+
"resolution_date":"2013-12-01T16:03:39.000Z",
|
71
|
+
"ticket_id":"CHANGE-20"
|
72
|
+
}
|
73
|
+
}
|
74
|
+
],
|
75
|
+
"page":2,
|
76
|
+
"per_page":10,
|
77
|
+
"total_count":20,
|
78
|
+
"total_pages":2
|
79
|
+
}
|
80
|
+
]
|