zenoss_client 0.5.4 → 0.6.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.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +3 -1
  3. data/.travis.yml +9 -0
  4. data/Gemfile +1 -1
  5. data/README.textile +6 -1
  6. data/Rakefile +5 -4
  7. data/VERSION +1 -1
  8. data/lib/zenoss.rb +2 -2
  9. data/lib/zenoss/connection.rb +3 -2
  10. data/lib/zenoss/jsonapi/events_router.rb +0 -1
  11. data/lib/zenoss/model/devices/device.rb +9 -0
  12. data/test/docker/3.2.1/Dockerfile +11 -0
  13. data/test/docker/3.2.1/remote_start.sh +3 -0
  14. data/test/docker/3.2.1/start.sh +2 -0
  15. data/test/docker/4.2.5/Dockerfile +10 -0
  16. data/test/docker/4.2.5/remote_start.sh +12 -0
  17. data/test/docker/4.2.5/start.sh +2 -0
  18. data/test/fixtures/.gitkeep +0 -0
  19. data/test/fixtures/vcr_cassettes/3_2_1_initial_connection.yml +437 -0
  20. data/test/fixtures/vcr_cassettes/3_2_1_test_0001_returns_an_Array_of_devices_when_searched_by_name.yml +85 -0
  21. data/test/fixtures/vcr_cassettes/3_2_1_test_0002_returns_device_uptime_when_asked.yml +110 -0
  22. data/test/fixtures/vcr_cassettes/3_2_1_test_0003_returns_an_Array_of_events_for_a_device.yml +80 -0
  23. data/test/fixtures/vcr_cassettes/3_2_1_test_0004_returns_an_Array_of_historical_events_for_a_device.yml +80 -0
  24. data/test/fixtures/vcr_cassettes/3_2_1_test_0005_returns_info_for_a_device_in_the_form_of_a_Hash.yml +251 -0
  25. data/test/fixtures/vcr_cassettes/3_2_1_test_0006_returns_an_Array_of_events_for_all_devices.yml +86 -0
  26. data/test/fixtures/vcr_cassettes/3_2_1_test_0007_fetches_the_report_tree.yml +181 -0
  27. data/test/fixtures/vcr_cassettes/3_2_1_test_0008_fetches_available_report_types_and_returns_a_Hash.yml +82 -0
  28. data/test/fixtures/vcr_cassettes/3_2_1_test_0009_renames_the_device.yml +151 -0
  29. data/test/fixtures/vcr_cassettes/4_2_5_initial_connection.yml +594 -0
  30. data/test/fixtures/vcr_cassettes/4_2_5_test_0001_returns_an_Array_of_devices_when_searched_by_name.yml +93 -0
  31. data/test/fixtures/vcr_cassettes/4_2_5_test_0002_returns_device_uptime_when_asked.yml +114 -0
  32. data/test/fixtures/vcr_cassettes/4_2_5_test_0003_returns_an_Array_of_events_for_a_device.yml +99 -0
  33. data/test/fixtures/vcr_cassettes/4_2_5_test_0004_returns_an_Array_of_historical_events_for_a_device.yml +99 -0
  34. data/test/fixtures/vcr_cassettes/4_2_5_test_0005_returns_info_for_a_device_in_the_form_of_a_Hash.yml +234 -0
  35. data/test/fixtures/vcr_cassettes/4_2_5_test_0006_returns_an_Array_of_events_for_all_devices.yml +203 -0
  36. data/test/fixtures/vcr_cassettes/4_2_5_test_0007_fetches_the_report_tree.yml +203 -0
  37. data/test/fixtures/vcr_cassettes/4_2_5_test_0008_fetches_available_report_types_and_returns_a_Hash.yml +86 -0
  38. data/test/fixtures/vcr_cassettes/4_2_5_test_0009_renames_the_device.yml +160 -0
  39. data/test/test_helper.rb +20 -11
  40. data/test/zenoss_client_test.rb +140 -114
  41. data/zenoss_client.gemspec +13 -9
  42. metadata +104 -37
@@ -0,0 +1,203 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://192.168.56.2:8080/zport/dmd/zport/dmd/device_router
6
+ body:
7
+ encoding: UTF-8
8
+ string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"UnitTestDevice"}}],"type":"rpc","tid":6}]'
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 22 May 2015 12:14:36 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Cookie:
19
+ - _ZopeId=47495875A68v.lkNK6o
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Zope/(2.13.13, python 2.7.2, linux2) ZServer/1.1
27
+ Date:
28
+ - Fri, 22 May 2015 12:14:36 GMT
29
+ Content-Length:
30
+ - '905'
31
+ Content-Type:
32
+ - application/json
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"uuid": "1723c17e-f1e8-4a09-b67e-9eb985de6a1a", "action": "DeviceRouter",
36
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
37
+ null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
38
+ null, "collector": "localhost", "osModel": null, "productionState": 1000,
39
+ "systems": [], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer":
40
+ null, "location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
41
+ "ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
42
+ "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
43
+ 0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
44
+ 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
45
+ "name": "UnitTestDevice"}]}, "tid": 6, "type": "rpc", "method": "getDevices"}'
46
+ http_version:
47
+ recorded_at: Fri, 22 May 2015 12:14:36 GMT
48
+ - request:
49
+ method: post
50
+ uri: http://192.168.56.2:8080/zport/dmd/zport/dmd/evconsole_router
51
+ body:
52
+ encoding: UTF-8
53
+ string: '[{"action":"EventsRouter","method":"query","data":[{"limit":100,"start":0,"sort":"lastTime","dir":"DESC"}],"type":"rpc","tid":7}]'
54
+ headers:
55
+ User-Agent:
56
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
57
+ Accept:
58
+ - "*/*"
59
+ Date:
60
+ - Fri, 22 May 2015 12:14:36 GMT
61
+ Content-Type:
62
+ - application/json; charset=utf-8
63
+ Cookie:
64
+ - _ZopeId=47495875A68v.lkNK6o
65
+ response:
66
+ status:
67
+ code: 200
68
+ message: OK
69
+ headers:
70
+ Server:
71
+ - Zope/(2.13.13, python 2.7.2, linux2) ZServer/1.1
72
+ Date:
73
+ - Fri, 22 May 2015 12:14:36 GMT
74
+ Content-Length:
75
+ - '9943'
76
+ Content-Type:
77
+ - application/json
78
+ body:
79
+ encoding: UTF-8
80
+ string: '{"uuid": "8bcc3aa4-4d75-4945-8deb-7963b5bcba70", "action": "EventsRouter",
81
+ "result": {"totalCount": 7, "events": [{"prodState": null, "firstTime": "2015-05-22
82
+ 12:13:50", "facility": null, "eventClassKey": null, "agent": null, "dedupid":
83
+ "UnitTestDevice||/Change/Remove|2|Deleted device: UnitTestDevice", "Location":
84
+ [], "ownerid": null, "eventClass": {"text": "/Change/Remove", "uid": "/zport/dmd/Events/Change/Remove"},
85
+ "id": "0242ac11-0025-9742-11e5-007c0173f789", "DevicePriority": null, "monitor":
86
+ null, "priority": null, "details": {}, "DeviceClass": [], "eventKey": "",
87
+ "evid": "0242ac11-0025-9742-11e5-007c0173f789", "eventClassMapping": "", "component":
88
+ {"url": null, "text": null, "uid": null, "uuid": null}, "clearid": null, "DeviceGroups":
89
+ [], "eventGroup": null, "device": {"url": "/zport/dmd/goto?guid=00217159-594e-49da-889c-7650f8329068",
90
+ "text": "UnitTestDevice", "uuid": "00217159-594e-49da-889c-7650f8329068",
91
+ "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice"}, "message": "Deleted
92
+ device: UnitTestDevice", "severity": 2, "count": 1, "stateChange": "2015-05-22
93
+ 12:13:50", "ntevid": null, "summary": "Deleted device: UnitTestDevice", "eventState":
94
+ "Closed", "lastTime": "2015-05-22 12:13:50", "ipAddress": "", "Systems": []},
95
+ {"prodState": "Production", "firstTime": "2015-05-22 11:52:49", "facility":
96
+ null, "eventClassKey": null, "agent": "zenperfsnmp", "dedupid": "localhost||/Status/Snmp|agent_down|4",
97
+ "Location": [], "ownerid": null, "eventClass": {"text": "/Status/Snmp", "uid":
98
+ "/zport/dmd/Events/Status/Snmp"}, "id": "0242ac11-0025-9742-11e5-00791464c7f3",
99
+ "DevicePriority": "Normal", "monitor": "localhost", "priority": null, "details":
100
+ {"zenoss.device.ip_address": ["::1"], "manager": ["88f2dd80f749"], "zenoss.device.production_state":
101
+ ["1000"], "zenoss.device.priority": ["3"], "zenoss.device.device_class": ["/Server/Linux"]},
102
+ "DeviceClass": [{"uid": "/zport/dmd/Devices/Server/Linux", "name": "/Server/Linux"}],
103
+ "eventKey": "agent_down", "evid": "0242ac11-0025-9742-11e5-00791464c7f3",
104
+ "eventClassMapping": "", "component": {"url": null, "text": null, "uid": null,
105
+ "uuid": null}, "clearid": null, "DeviceGroups": [], "eventGroup": "SnmpTest",
106
+ "device": {"url": "/zport/dmd/goto?guid=86b9d5f6-59d7-4eec-a2f0-146ef91fe9a9",
107
+ "text": "localhost", "uuid": "86b9d5f6-59d7-4eec-a2f0-146ef91fe9a9", "uid":
108
+ "/zport/dmd/Devices/Server/Linux/devices/localhost"}, "message": "SNMP agent
109
+ down - no response received", "severity": 4, "count": 5, "stateChange": "2015-05-22
110
+ 11:52:49", "ntevid": null, "summary": "SNMP agent down - no response received",
111
+ "eventState": "New", "lastTime": "2015-05-22 12:12:49", "ipAddress": ["::1"],
112
+ "Systems": []}, {"prodState": "Production", "firstTime": "2015-05-22 11:52:28",
113
+ "facility": null, "eventClassKey": null, "agent": "zenpython", "dedupid":
114
+ "localhost|zenpython|/Status/Heartbeat|0|localhost zenpython heartbeat clear",
115
+ "Location": [], "ownerid": null, "eventClass": {"text": "/Status/Heartbeat",
116
+ "uid": "/zport/dmd/Events/Status/Heartbeat"}, "id": "0242ac11-0025-9742-11e5-0079051da5f1",
117
+ "DevicePriority": "Normal", "monitor": "localhost", "priority": null, "details":
118
+ {"zenoss.device.ip_address": ["::1"], "zenoss.device.production_state": ["1000"],
119
+ "zenoss.device.priority": ["3"], "zenoss.device.device_class": ["/Server/Linux"]},
120
+ "DeviceClass": [{"uid": "/zport/dmd/Devices/Server/Linux", "name": "/Server/Linux"}],
121
+ "eventKey": null, "evid": "0242ac11-0025-9742-11e5-0079051da5f1", "eventClassMapping":
122
+ "", "component": {"url": null, "text": "zenpython", "uid": null, "uuid": null},
123
+ "clearid": null, "DeviceGroups": [], "eventGroup": null, "device": {"url":
124
+ "/zport/dmd/goto?guid=86b9d5f6-59d7-4eec-a2f0-146ef91fe9a9", "text": "localhost",
125
+ "uuid": "86b9d5f6-59d7-4eec-a2f0-146ef91fe9a9", "uid": "/zport/dmd/Devices/Server/Linux/devices/localhost"},
126
+ "message": "localhost zenpython heartbeat clear", "severity": 0, "count":
127
+ 1, "stateChange": "2015-05-22 11:52:28", "ntevid": null, "summary": "localhost
128
+ zenpython heartbeat clear", "eventState": "Closed", "lastTime": "2015-05-22
129
+ 11:52:28", "ipAddress": ["::1"], "Systems": []}, {"prodState": "Production",
130
+ "firstTime": "2015-05-22 11:52:28", "facility": null, "eventClassKey": null,
131
+ "agent": "zenjmx", "dedupid": "localhost|zenjmx|/Status/Heartbeat|0|localhost
132
+ zenjmx heartbeat clear", "Location": [], "ownerid": null, "eventClass": {"text":
133
+ "/Status/Heartbeat", "uid": "/zport/dmd/Events/Status/Heartbeat"}, "id": "0242ac11-0025-9742-11e5-0079051da5f2",
134
+ "DevicePriority": "Normal", "monitor": "localhost", "priority": null, "details":
135
+ {"zenoss.device.ip_address": ["::1"], "zenoss.device.production_state": ["1000"],
136
+ "zenoss.device.priority": ["3"], "zenoss.device.device_class": ["/Server/Linux"]},
137
+ "DeviceClass": [{"uid": "/zport/dmd/Devices/Server/Linux", "name": "/Server/Linux"}],
138
+ "eventKey": null, "evid": "0242ac11-0025-9742-11e5-0079051da5f2", "eventClassMapping":
139
+ "", "component": {"url": null, "text": "zenjmx", "uid": null, "uuid": null},
140
+ "clearid": null, "DeviceGroups": [], "eventGroup": null, "device": {"url":
141
+ "/zport/dmd/goto?guid=86b9d5f6-59d7-4eec-a2f0-146ef91fe9a9", "text": "localhost",
142
+ "uuid": "86b9d5f6-59d7-4eec-a2f0-146ef91fe9a9", "uid": "/zport/dmd/Devices/Server/Linux/devices/localhost"},
143
+ "message": "localhost zenjmx heartbeat clear", "severity": 0, "count": 1,
144
+ "stateChange": "2015-05-22 11:52:28", "ntevid": null, "summary": "localhost
145
+ zenjmx heartbeat clear", "eventState": "Closed", "lastTime": "2015-05-22 11:52:28",
146
+ "ipAddress": ["::1"], "Systems": []}, {"prodState": "Production", "firstTime":
147
+ "2015-05-22 11:51:28", "facility": null, "eventClassKey": null, "agent": "zenpython",
148
+ "dedupid": "localhost|zenpython|/Status/Heartbeat|4|localhost zenpython heartbeat
149
+ failure", "Location": [], "ownerid": null, "eventClass": {"text": "/Status/Heartbeat",
150
+ "uid": "/zport/dmd/Events/Status/Heartbeat"}, "id": "0242ac11-0025-9742-11e5-0078e1cf68dd",
151
+ "DevicePriority": "Normal", "monitor": "localhost", "priority": null, "details":
152
+ {"zenoss.device.ip_address": ["::1"], "zenoss.device.production_state": ["1000"],
153
+ "zenoss.device.priority": ["3"], "zenoss.device.device_class": ["/Server/Linux"]},
154
+ "DeviceClass": [{"uid": "/zport/dmd/Devices/Server/Linux", "name": "/Server/Linux"}],
155
+ "eventKey": null, "evid": "0242ac11-0025-9742-11e5-0078e1cf68dd", "eventClassMapping":
156
+ "", "component": {"url": null, "text": "zenpython", "uid": null, "uuid": null},
157
+ "clearid": "0242ac11-0025-9742-11e5-0079051da5f1", "DeviceGroups": [], "eventGroup":
158
+ null, "device": {"url": "/zport/dmd/goto?guid=86b9d5f6-59d7-4eec-a2f0-146ef91fe9a9",
159
+ "text": "localhost", "uuid": "86b9d5f6-59d7-4eec-a2f0-146ef91fe9a9", "uid":
160
+ "/zport/dmd/Devices/Server/Linux/devices/localhost"}, "message": "localhost
161
+ zenpython heartbeat failure", "severity": 4, "count": 1, "stateChange": "2015-05-22
162
+ 11:52:28", "ntevid": null, "summary": "localhost zenpython heartbeat failure",
163
+ "eventState": "Cleared", "lastTime": "2015-05-22 11:51:28", "ipAddress": ["::1"],
164
+ "Systems": []}, {"prodState": "Production", "firstTime": "2015-05-22 11:51:28",
165
+ "facility": null, "eventClassKey": null, "agent": "zenjmx", "dedupid": "localhost|zenjmx|/Status/Heartbeat|4|localhost
166
+ zenjmx heartbeat failure", "Location": [], "ownerid": null, "eventClass":
167
+ {"text": "/Status/Heartbeat", "uid": "/zport/dmd/Events/Status/Heartbeat"},
168
+ "id": "0242ac11-0025-9742-11e5-0078e1e6c16e", "DevicePriority": "Normal",
169
+ "monitor": "localhost", "priority": null, "details": {"zenoss.device.ip_address":
170
+ ["::1"], "zenoss.device.production_state": ["1000"], "zenoss.device.priority":
171
+ ["3"], "zenoss.device.device_class": ["/Server/Linux"]}, "DeviceClass": [{"uid":
172
+ "/zport/dmd/Devices/Server/Linux", "name": "/Server/Linux"}], "eventKey":
173
+ null, "evid": "0242ac11-0025-9742-11e5-0078e1e6c16e", "eventClassMapping":
174
+ "", "component": {"url": null, "text": "zenjmx", "uid": null, "uuid": null},
175
+ "clearid": "0242ac11-0025-9742-11e5-0079051da5f2", "DeviceGroups": [], "eventGroup":
176
+ null, "device": {"url": "/zport/dmd/goto?guid=86b9d5f6-59d7-4eec-a2f0-146ef91fe9a9",
177
+ "text": "localhost", "uuid": "86b9d5f6-59d7-4eec-a2f0-146ef91fe9a9", "uid":
178
+ "/zport/dmd/Devices/Server/Linux/devices/localhost"}, "message": "localhost
179
+ zenjmx heartbeat failure", "severity": 4, "count": 1, "stateChange": "2015-05-22
180
+ 11:52:28", "ntevid": null, "summary": "localhost zenjmx heartbeat failure",
181
+ "eventState": "Cleared", "lastTime": "2015-05-22 11:51:28", "ipAddress": ["::1"],
182
+ "Systems": []}, {"prodState": "Production", "firstTime": "2015-05-22 08:51:29",
183
+ "facility": null, "eventClassKey": null, "agent": "zendisc", "dedupid": "localhost|::1|/Status/Snmp|::1|2",
184
+ "Location": [], "ownerid": null, "eventClass": {"text": "/Status/Snmp", "uid":
185
+ "/zport/dmd/Events/Status/Snmp"}, "id": "0242ac11-001b-b46a-11e5-005fbde36eef",
186
+ "DevicePriority": "Normal", "monitor": "localhost", "priority": null, "details":
187
+ {"zenoss.device.ip_address": ["::1"], "manager": ["df10d6e2cabf"], "zenoss.device.production_state":
188
+ ["1000"], "zenoss.device.priority": ["3"], "zenoss.device.device_class": ["/Server/Linux"]},
189
+ "DeviceClass": [{"uid": "/zport/dmd/Devices/Server/Linux", "name": "/Server/Linux"}],
190
+ "eventKey": "::1", "evid": "0242ac11-001b-b46a-11e5-005fbde36eef", "eventClassMapping":
191
+ "", "component": {"url": null, "text": "::1", "uid": null, "uuid": null},
192
+ "clearid": null, "DeviceGroups": [], "eventGroup": null, "device": {"url":
193
+ "/zport/dmd/goto?guid=86b9d5f6-59d7-4eec-a2f0-146ef91fe9a9", "text": "localhost",
194
+ "uuid": "86b9d5f6-59d7-4eec-a2f0-146ef91fe9a9", "uid": "/zport/dmd/Devices/Server/Linux/devices/localhost"},
195
+ "message": "''Discovered device name ''localhost'' for ip ''::1''", "severity":
196
+ 2, "count": 1, "stateChange": "2015-05-22 08:51:29", "ntevid": null, "summary":
197
+ "''Discovered device name ''localhost'' for ip ''::1''", "eventState": "New",
198
+ "lastTime": "2015-05-22 08:51:29", "ipAddress": ["::1"], "Systems": []}],
199
+ "success": true, "asof": 1432296876.43313}, "tid": 7, "type": "rpc", "method":
200
+ "query"}'
201
+ http_version:
202
+ recorded_at: Fri, 22 May 2015 12:14:36 GMT
203
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,203 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://192.168.56.2:8080/zport/dmd/zport/dmd/device_router
6
+ body:
7
+ encoding: UTF-8
8
+ string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"UnitTestDevice"}}],"type":"rpc","tid":4}]'
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 22 May 2015 12:14:36 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Cookie:
19
+ - _ZopeId=47495875A68v.lkNK6o
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Zope/(2.13.13, python 2.7.2, linux2) ZServer/1.1
27
+ Date:
28
+ - Fri, 22 May 2015 12:14:36 GMT
29
+ Content-Length:
30
+ - '905'
31
+ Content-Type:
32
+ - application/json
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"uuid": "91981720-a275-4d8c-b15e-53282e13430d", "action": "DeviceRouter",
36
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
37
+ null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
38
+ null, "collector": "localhost", "osModel": null, "productionState": 1000,
39
+ "systems": [], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer":
40
+ null, "location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
41
+ "ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
42
+ "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
43
+ 0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
44
+ 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
45
+ "name": "UnitTestDevice"}]}, "tid": 4, "type": "rpc", "method": "getDevices"}'
46
+ http_version:
47
+ recorded_at: Fri, 22 May 2015 12:14:36 GMT
48
+ - request:
49
+ method: post
50
+ uri: http://192.168.56.2:8080/zport/dmd/zport/dmd/report_router
51
+ body:
52
+ encoding: UTF-8
53
+ string: '[{"action":"ReportRouter","method":"getTree","data":[{"id":"/zport/dmd/Reports"}],"type":"rpc","tid":5}]'
54
+ headers:
55
+ User-Agent:
56
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
57
+ Accept:
58
+ - "*/*"
59
+ Date:
60
+ - Fri, 22 May 2015 12:14:36 GMT
61
+ Content-Type:
62
+ - application/json; charset=utf-8
63
+ Cookie:
64
+ - _ZopeId=47495875A68v.lkNK6o
65
+ response:
66
+ status:
67
+ code: 200
68
+ message: OK
69
+ headers:
70
+ Server:
71
+ - Zope/(2.13.13, python 2.7.2, linux2) ZServer/1.1
72
+ Date:
73
+ - Fri, 22 May 2015 12:14:36 GMT
74
+ Content-Length:
75
+ - '9700'
76
+ Content-Type:
77
+ - application/json
78
+ body:
79
+ encoding: UTF-8
80
+ string: '{"uuid": "6c51a316-3cec-4631-a6bf-e42e4ee015d1", "action": "ReportRouter",
81
+ "result": [{"qtip": "", "hidden": false, "leaf": false, "uid": "/zport/dmd/Reports",
82
+ "text": {"count": 19, "text": "Reports", "description": "reports"}, "id":
83
+ ".zport.dmd.Reports", "meta_type": "ReportClass", "deletable": false, "path":
84
+ "Reports", "iconCls": "severity-icon-small clear", "children": [{"qtip": "",
85
+ "hidden": false, "leaf": false, "uid": "/zport/dmd/Reports/Device Reports",
86
+ "text": {"count": 9, "text": "Device Reports", "description": "reports"},
87
+ "id": ".zport.dmd.Reports.Device Reports", "meta_type": "DeviceReportClass",
88
+ "deletable": true, "path": "Reports/Device Reports", "iconCls": "severity-icon-small
89
+ clear", "children": [{"qtip": "", "hidden": false, "leaf": true, "uid": "/zport/dmd/Reports/Device
90
+ Reports/Device Changes", "text": "Device Changes", "children": [], "meta_type":
91
+ "Report", "deletable": true, "path": "Reports/Device Reports/Device Changes",
92
+ "iconCls": "leaf", "id": ".zport.dmd.Reports.Device Reports.Device Changes",
93
+ "edit_url": null, "uuid": null}, {"qtip": "", "hidden": false, "leaf": true,
94
+ "uid": "/zport/dmd/Reports/Device Reports/Ping Status Issues", "text": "Ping
95
+ Status Issues", "children": [], "meta_type": "Report", "deletable": true,
96
+ "path": "Reports/Device Reports/Ping Status Issues", "iconCls": "leaf", "id":
97
+ ".zport.dmd.Reports.Device Reports.Ping Status Issues", "edit_url": null,
98
+ "uuid": null}, {"qtip": "", "hidden": false, "leaf": true, "uid": "/zport/dmd/Reports/Device
99
+ Reports/New Devices", "text": "New Devices", "children": [], "meta_type":
100
+ "Report", "deletable": true, "path": "Reports/Device Reports/New Devices",
101
+ "iconCls": "leaf", "id": ".zport.dmd.Reports.Device Reports.New Devices",
102
+ "edit_url": null, "uuid": null}, {"qtip": "", "hidden": false, "leaf": true,
103
+ "uid": "/zport/dmd/Reports/Device Reports/Software Inventory", "text": "Software
104
+ Inventory", "children": [], "meta_type": "Report", "deletable": true, "path":
105
+ "Reports/Device Reports/Software Inventory", "iconCls": "leaf", "id": ".zport.dmd.Reports.Device
106
+ Reports.Software Inventory", "edit_url": null, "uuid": null}, {"qtip": "",
107
+ "hidden": false, "leaf": true, "uid": "/zport/dmd/Reports/Device Reports/All
108
+ Monitored Components", "text": "All Monitored Components", "children": [],
109
+ "meta_type": "Report", "deletable": true, "path": "Reports/Device Reports/All
110
+ Monitored Components", "iconCls": "leaf", "id": ".zport.dmd.Reports.Device
111
+ Reports.All Monitored Components", "edit_url": null, "uuid": null}, {"qtip":
112
+ "", "hidden": false, "leaf": true, "uid": "/zport/dmd/Reports/Device Reports/MAC
113
+ Addresses", "text": "MAC Addresses", "children": [], "meta_type": "Report",
114
+ "deletable": true, "path": "Reports/Device Reports/MAC Addresses", "iconCls":
115
+ "leaf", "id": ".zport.dmd.Reports.Device Reports.MAC Addresses", "edit_url":
116
+ null, "uuid": null}, {"qtip": "", "hidden": false, "leaf": true, "uid": "/zport/dmd/Reports/Device
117
+ Reports/Model Collection Age", "text": "Model Collection Age", "children":
118
+ [], "meta_type": "Report", "deletable": true, "path": "Reports/Device Reports/Model
119
+ Collection Age", "iconCls": "leaf", "id": ".zport.dmd.Reports.Device Reports.Model
120
+ Collection Age", "edit_url": null, "uuid": null}, {"qtip": "", "hidden": false,
121
+ "leaf": true, "uid": "/zport/dmd/Reports/Device Reports/All Devices", "text":
122
+ "All Devices", "children": [], "meta_type": "Report", "deletable": true, "path":
123
+ "Reports/Device Reports/All Devices", "iconCls": "leaf", "id": ".zport.dmd.Reports.Device
124
+ Reports.All Devices", "edit_url": null, "uuid": null}, {"qtip": "", "hidden":
125
+ false, "leaf": true, "uid": "/zport/dmd/Reports/Device Reports/SNMP Status
126
+ Issues", "text": "SNMP Status Issues", "children": [], "meta_type": "Report",
127
+ "deletable": true, "path": "Reports/Device Reports/SNMP Status Issues", "iconCls":
128
+ "leaf", "id": ".zport.dmd.Reports.Device Reports.SNMP Status Issues", "edit_url":
129
+ null, "uuid": null}], "edit_url": null, "uuid": null}, {"qtip": "", "hidden":
130
+ false, "leaf": false, "uid": "/zport/dmd/Reports/Custom Device Reports", "text":
131
+ {"count": 0, "text": "Custom Device Reports", "description": "reports"}, "children":
132
+ [], "meta_type": "CustomDeviceReportClass", "deletable": false, "path": "Reports/Custom
133
+ Device Reports", "iconCls": "severity-icon-small clear", "id": ".zport.dmd.Reports.Custom
134
+ Device Reports", "edit_url": null, "uuid": null}, {"qtip": "", "hidden": false,
135
+ "leaf": false, "uid": "/zport/dmd/Reports/Graph Reports", "text": {"count":
136
+ 0, "text": "Graph Reports", "description": "reports"}, "children": [], "meta_type":
137
+ "GraphReportClass", "deletable": false, "path": "Reports/Graph Reports", "iconCls":
138
+ "severity-icon-small clear", "id": ".zport.dmd.Reports.Graph Reports", "edit_url":
139
+ null, "uuid": null}, {"qtip": "", "hidden": false, "leaf": false, "uid": "/zport/dmd/Reports/Multi-Graph
140
+ Reports", "text": {"count": 0, "text": "Multi-Graph Reports", "description":
141
+ "reports"}, "children": [], "meta_type": "MultiGraphReportClass", "deletable":
142
+ false, "path": "Reports/Multi-Graph Reports", "iconCls": "severity-icon-small
143
+ clear", "id": ".zport.dmd.Reports.Multi-Graph Reports", "edit_url": null,
144
+ "uuid": null}, {"qtip": "", "hidden": false, "leaf": false, "uid": "/zport/dmd/Reports/Performance
145
+ Reports", "text": {"count": 7, "text": "Performance Reports", "description":
146
+ "reports"}, "id": ".zport.dmd.Reports.Performance Reports", "meta_type": "ReportClass",
147
+ "deletable": true, "path": "Reports/Performance Reports", "iconCls": "severity-icon-small
148
+ clear", "children": [{"qtip": "", "hidden": false, "leaf": true, "uid": "/zport/dmd/Reports/Performance
149
+ Reports/Aggregate Reports", "text": "Aggregate Reports", "children": [], "meta_type":
150
+ "Report", "deletable": true, "path": "Reports/Performance Reports/Aggregate
151
+ Reports", "iconCls": "leaf", "id": ".zport.dmd.Reports.Performance Reports.Aggregate
152
+ Reports", "edit_url": null, "uuid": null}, {"qtip": "", "hidden": false, "leaf":
153
+ true, "uid": "/zport/dmd/Reports/Performance Reports/Interface Utilization",
154
+ "text": "Interface Utilization", "children": [], "meta_type": "Report", "deletable":
155
+ true, "path": "Reports/Performance Reports/Interface Utilization", "iconCls":
156
+ "leaf", "id": ".zport.dmd.Reports.Performance Reports.Interface Utilization",
157
+ "edit_url": null, "uuid": null}, {"qtip": "", "hidden": false, "leaf": true,
158
+ "uid": "/zport/dmd/Reports/Performance Reports/CPU Utilization", "text": "CPU
159
+ Utilization", "children": [], "meta_type": "Report", "deletable": true, "path":
160
+ "Reports/Performance Reports/CPU Utilization", "iconCls": "leaf", "id": ".zport.dmd.Reports.Performance
161
+ Reports.CPU Utilization", "edit_url": null, "uuid": null}, {"qtip": "", "hidden":
162
+ false, "leaf": true, "uid": "/zport/dmd/Reports/Performance Reports/Threshold
163
+ Summary", "text": "Threshold Summary", "children": [], "meta_type": "Report",
164
+ "deletable": true, "path": "Reports/Performance Reports/Threshold Summary",
165
+ "iconCls": "leaf", "id": ".zport.dmd.Reports.Performance Reports.Threshold
166
+ Summary", "edit_url": null, "uuid": null}, {"qtip": "", "hidden": false, "leaf":
167
+ true, "uid": "/zport/dmd/Reports/Performance Reports/Memory Utilization",
168
+ "text": "Memory Utilization", "children": [], "meta_type": "Report", "deletable":
169
+ true, "path": "Reports/Performance Reports/Memory Utilization", "iconCls":
170
+ "leaf", "id": ".zport.dmd.Reports.Performance Reports.Memory Utilization",
171
+ "edit_url": null, "uuid": null}, {"qtip": "", "hidden": false, "leaf": true,
172
+ "uid": "/zport/dmd/Reports/Performance Reports/Availability Report", "text":
173
+ "Availability Report", "children": [], "meta_type": "Report", "deletable":
174
+ true, "path": "Reports/Performance Reports/Availability Report", "iconCls":
175
+ "leaf", "id": ".zport.dmd.Reports.Performance Reports.Availability Report",
176
+ "edit_url": null, "uuid": null}, {"qtip": "", "hidden": false, "leaf": true,
177
+ "uid": "/zport/dmd/Reports/Performance Reports/Filesystem Util Report", "text":
178
+ "Filesystem Util Report", "children": [], "meta_type": "Report", "deletable":
179
+ true, "path": "Reports/Performance Reports/Filesystem Util Report", "iconCls":
180
+ "leaf", "id": ".zport.dmd.Reports.Performance Reports.Filesystem Util Report",
181
+ "edit_url": null, "uuid": null}], "edit_url": null, "uuid": null}, {"qtip":
182
+ "", "hidden": false, "leaf": false, "uid": "/zport/dmd/Reports/Event Reports",
183
+ "text": {"count": 3, "text": "Event Reports", "description": "reports"}, "id":
184
+ ".zport.dmd.Reports.Event Reports", "meta_type": "ReportClass", "deletable":
185
+ true, "path": "Reports/Event Reports", "iconCls": "severity-icon-small clear",
186
+ "children": [{"qtip": "", "hidden": false, "leaf": true, "uid": "/zport/dmd/Reports/Event
187
+ Reports/All Heartbeats", "text": "All Heartbeats", "children": [], "meta_type":
188
+ "Report", "deletable": true, "path": "Reports/Event Reports/All Heartbeats",
189
+ "iconCls": "leaf", "id": ".zport.dmd.Reports.Event Reports.All Heartbeats",
190
+ "edit_url": null, "uuid": null}, {"qtip": "", "hidden": false, "leaf": true,
191
+ "uid": "/zport/dmd/Reports/Event Reports/All EventClasses", "text": "All EventClasses",
192
+ "children": [], "meta_type": "Report", "deletable": true, "path": "Reports/Event
193
+ Reports/All EventClasses", "iconCls": "leaf", "id": ".zport.dmd.Reports.Event
194
+ Reports.All EventClasses", "edit_url": null, "uuid": null}, {"qtip": "", "hidden":
195
+ false, "leaf": true, "uid": "/zport/dmd/Reports/Event Reports/All EventMappings",
196
+ "text": "All EventMappings", "children": [], "meta_type": "Report", "deletable":
197
+ true, "path": "Reports/Event Reports/All EventMappings", "iconCls": "leaf",
198
+ "id": ".zport.dmd.Reports.Event Reports.All EventMappings", "edit_url": null,
199
+ "uuid": null}], "edit_url": null, "uuid": null}], "edit_url": null, "uuid":
200
+ null}], "tid": 5, "type": "rpc", "method": "getTree"}'
201
+ http_version:
202
+ recorded_at: Fri, 22 May 2015 12:14:36 GMT
203
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,86 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://192.168.56.2:8080/zport/dmd/zport/dmd/device_router
6
+ body:
7
+ encoding: UTF-8
8
+ string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"UnitTestDevice"}}],"type":"rpc","tid":8}]'
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 22 May 2015 12:14:36 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Cookie:
19
+ - _ZopeId=47495875A68v.lkNK6o
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Zope/(2.13.13, python 2.7.2, linux2) ZServer/1.1
27
+ Date:
28
+ - Fri, 22 May 2015 12:14:36 GMT
29
+ Content-Length:
30
+ - '905'
31
+ Content-Type:
32
+ - application/json
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"uuid": "f95969e7-1bcc-4fba-8ae0-c233c66323ee", "action": "DeviceRouter",
36
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
37
+ null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
38
+ null, "collector": "localhost", "osModel": null, "productionState": 1000,
39
+ "systems": [], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer":
40
+ null, "location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
41
+ "ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
42
+ "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
43
+ 0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
44
+ 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
45
+ "name": "UnitTestDevice"}]}, "tid": 8, "type": "rpc", "method": "getDevices"}'
46
+ http_version:
47
+ recorded_at: Fri, 22 May 2015 12:14:36 GMT
48
+ - request:
49
+ method: post
50
+ uri: http://192.168.56.2:8080/zport/dmd/zport/dmd/report_router
51
+ body:
52
+ encoding: UTF-8
53
+ string: '[{"action":"ReportRouter","method":"getReportTypes","data":{},"type":"rpc","tid":9}]'
54
+ headers:
55
+ User-Agent:
56
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
57
+ Accept:
58
+ - "*/*"
59
+ Date:
60
+ - Fri, 22 May 2015 12:14:36 GMT
61
+ Content-Type:
62
+ - application/json; charset=utf-8
63
+ Cookie:
64
+ - _ZopeId=47495875A68v.lkNK6o
65
+ response:
66
+ status:
67
+ code: 200
68
+ message: OK
69
+ headers:
70
+ Server:
71
+ - Zope/(2.13.13, python 2.7.2, linux2) ZServer/1.1
72
+ Date:
73
+ - Fri, 22 May 2015 12:14:36 GMT
74
+ Content-Length:
75
+ - '306'
76
+ Content-Type:
77
+ - application/json
78
+ body:
79
+ encoding: UTF-8
80
+ string: '{"uuid": "b1a42eb7-2f33-46a3-99f2-eed9774e1ca2", "action": "ReportRouter",
81
+ "result": {"menuText": ["Custom Device Report", "Graph Report", "Multi-Graph
82
+ Report"], "reportTypes": ["customDeviceReport", "graphReport", "multiGraphReport"],
83
+ "success": true}, "tid": 9, "type": "rpc", "method": "getReportTypes"}'
84
+ http_version:
85
+ recorded_at: Fri, 22 May 2015 12:14:36 GMT
86
+ recorded_with: VCR 2.9.3