zenoss_client 0.5.4 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
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,86 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://192.168.56.2:9080/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":3}]'
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:19:38 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Cookie:
19
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
27
+ Date:
28
+ - Fri, 22 May 2015 12:19:38 GMT
29
+ Content-Length:
30
+ - '576'
31
+ Content-Type:
32
+ - application/json
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"tid": 3, "action": "DeviceRouter", "type": "rpc", "method": "getDevices",
36
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"groups":
37
+ [], "serialNumber": "", "name": "UnitTestDevice", "collector": "localhost",
38
+ "osModel": null, "productionState": "Production", "location": null, "priority":
39
+ "Normal", "hwModel": null, "tagNumber": "", "osManufacturer": null, "systems":
40
+ [], "hwManufacturer": null, "ipAddress": null, "events": {"info": 0, "debug":
41
+ 0, "critical": 0, "warning": 0, "error": 0}, "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice"}]}}'
42
+ http_version:
43
+ recorded_at: Fri, 22 May 2015 12:19:38 GMT
44
+ - request:
45
+ method: post
46
+ uri: http://192.168.56.2:9080/zport/dmd/zport/dmd/evconsole_router
47
+ body:
48
+ encoding: UTF-8
49
+ string: '[{"action":"EventsRouter","method":"query","data":[{"limit":100,"start":0,"sort":"lastTime","dir":"DESC"}],"type":"rpc","tid":4}]'
50
+ headers:
51
+ User-Agent:
52
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
53
+ Accept:
54
+ - "*/*"
55
+ Date:
56
+ - Fri, 22 May 2015 12:19:38 GMT
57
+ Content-Type:
58
+ - application/json; charset=utf-8
59
+ Cookie:
60
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
61
+ response:
62
+ status:
63
+ code: 200
64
+ message: OK
65
+ headers:
66
+ Server:
67
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
68
+ Date:
69
+ - Fri, 22 May 2015 12:19:38 GMT
70
+ Content-Length:
71
+ - '606'
72
+ Content-Type:
73
+ - application/json
74
+ body:
75
+ encoding: UTF-8
76
+ string: '{"tid": 4, "action": "EventsRouter", "type": "rpc", "method": "query",
77
+ "result": {"totalCount": 1, "events": [{"count": "31", "firstTime": "2015-05-21
78
+ 22:38:21", "severity": "4", "evid": "fa1466bd-a707-4d11-af25-b6b0f8ebfa9c",
79
+ "component": {"text": "snmp", "uid": null}, "summary": "SNMP agent down",
80
+ "eventState": "New", "device": {"text": "localhost", "uid": "/zport/dmd/Devices/Server/Linux/devices/localhost"},
81
+ "eventClass": {"text": "/Status/Snmp", "uid": "/zport/dmd/Events/Status/Snmp"},
82
+ "lastTime": "2015-05-22 11:47:01", "id": "fa1466bd-a707-4d11-af25-b6b0f8ebfa9c"}],
83
+ "asof": 1432297178.7991951}}'
84
+ http_version:
85
+ recorded_at: Fri, 22 May 2015 12:19:38 GMT
86
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,181 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://192.168.56.2:9080/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":9}]'
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:19:38 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Cookie:
19
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
27
+ Date:
28
+ - Fri, 22 May 2015 12:19:38 GMT
29
+ Content-Length:
30
+ - '576'
31
+ Content-Type:
32
+ - application/json
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"tid": 9, "action": "DeviceRouter", "type": "rpc", "method": "getDevices",
36
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"groups":
37
+ [], "serialNumber": "", "name": "UnitTestDevice", "collector": "localhost",
38
+ "osModel": null, "productionState": "Production", "location": null, "priority":
39
+ "Normal", "hwModel": null, "tagNumber": "", "osManufacturer": null, "systems":
40
+ [], "hwManufacturer": null, "ipAddress": null, "events": {"info": 0, "debug":
41
+ 0, "critical": 0, "warning": 0, "error": 0}, "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice"}]}}'
42
+ http_version:
43
+ recorded_at: Fri, 22 May 2015 12:19:38 GMT
44
+ - request:
45
+ method: post
46
+ uri: http://192.168.56.2:9080/zport/dmd/zport/dmd/report_router
47
+ body:
48
+ encoding: UTF-8
49
+ string: '[{"action":"ReportRouter","method":"getTree","data":[{"id":"/zport/dmd/Reports"}],"type":"rpc","tid":10}]'
50
+ headers:
51
+ User-Agent:
52
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
53
+ Accept:
54
+ - "*/*"
55
+ Date:
56
+ - Fri, 22 May 2015 12:19:38 GMT
57
+ Content-Type:
58
+ - application/json; charset=utf-8
59
+ Cookie:
60
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
61
+ response:
62
+ status:
63
+ code: 200
64
+ message: OK
65
+ headers:
66
+ Server:
67
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
68
+ Date:
69
+ - Fri, 22 May 2015 12:19:39 GMT
70
+ Content-Length:
71
+ - '8397'
72
+ Content-Type:
73
+ - application/json
74
+ body:
75
+ encoding: UTF-8
76
+ string: '{"tid": 10, "action": "ReportRouter", "type": "rpc", "method": "getTree",
77
+ "result": [{"meta_type": "ReportClass", "leaf": false, "uid": "/zport/dmd/Reports",
78
+ "deletable": false, "text": {"count": 19, "text": "Reports", "description":
79
+ "reports"}, "path": "", "expandable": true, "uiProvider": "report", "children":
80
+ [{"meta_type": "DeviceReportClass", "leaf": false, "uid": "/zport/dmd/Reports/Device
81
+ Reports", "deletable": true, "text": {"count": 8, "text": "Device Reports",
82
+ "description": "reports"}, "path": "Device Reports", "expandable": true, "uiProvider":
83
+ "report", "children": [{"meta_type": "Report", "leaf": true, "uid": "/zport/dmd/Reports/Device
84
+ Reports/SNMP Status Issues", "deletable": true, "text": "SNMP Status Issues",
85
+ "path": "SNMP Status Issues", "expandable": false, "uiProvider": "report",
86
+ "children": [], "id": ".zport.dmd.Reports.Device Reports.SNMP Status Issues"},
87
+ {"meta_type": "Report", "leaf": true, "uid": "/zport/dmd/Reports/Device Reports/All
88
+ Devices", "deletable": true, "text": "All Devices", "path": "All Devices",
89
+ "expandable": false, "uiProvider": "report", "children": [], "id": ".zport.dmd.Reports.Device
90
+ Reports.All Devices"}, {"meta_type": "Report", "leaf": true, "uid": "/zport/dmd/Reports/Device
91
+ Reports/Software Inventory", "deletable": true, "text": "Software Inventory",
92
+ "path": "Software Inventory", "expandable": false, "uiProvider": "report",
93
+ "children": [], "id": ".zport.dmd.Reports.Device Reports.Software Inventory"},
94
+ {"meta_type": "Report", "leaf": true, "uid": "/zport/dmd/Reports/Device Reports/Device
95
+ Changes", "deletable": true, "text": "Device Changes", "path": "Device Changes",
96
+ "expandable": false, "uiProvider": "report", "children": [], "id": ".zport.dmd.Reports.Device
97
+ Reports.Device Changes"}, {"meta_type": "Report", "leaf": true, "uid": "/zport/dmd/Reports/Device
98
+ Reports/New Devices", "deletable": true, "text": "New Devices", "path": "New
99
+ Devices", "expandable": false, "uiProvider": "report", "children": [], "id":
100
+ ".zport.dmd.Reports.Device Reports.New Devices"}, {"meta_type": "Report",
101
+ "leaf": true, "uid": "/zport/dmd/Reports/Device Reports/All Monitored Components",
102
+ "deletable": true, "text": "All Monitored Components", "path": "All Monitored
103
+ Components", "expandable": false, "uiProvider": "report", "children": [],
104
+ "id": ".zport.dmd.Reports.Device Reports.All Monitored Components"}, {"meta_type":
105
+ "Report", "leaf": true, "uid": "/zport/dmd/Reports/Device Reports/Ping Status
106
+ Issues", "deletable": true, "text": "Ping Status Issues", "path": "Ping Status
107
+ Issues", "expandable": false, "uiProvider": "report", "children": [], "id":
108
+ ".zport.dmd.Reports.Device Reports.Ping Status Issues"}, {"meta_type": "Report",
109
+ "leaf": true, "uid": "/zport/dmd/Reports/Device Reports/Model Collection Age",
110
+ "deletable": true, "text": "Model Collection Age", "path": "Model Collection
111
+ Age", "expandable": false, "uiProvider": "report", "children": [], "id": ".zport.dmd.Reports.Device
112
+ Reports.Model Collection Age"}], "id": ".zport.dmd.Reports.Device Reports"},
113
+ {"meta_type": "CustomDeviceReportClass", "leaf": false, "uid": "/zport/dmd/Reports/Custom
114
+ Device Reports", "deletable": false, "text": {"count": 0, "text": "Custom
115
+ Device Reports", "description": "reports"}, "path": "Custom Device Reports",
116
+ "expandable": true, "uiProvider": "report", "children": [], "id": ".zport.dmd.Reports.Custom
117
+ Device Reports"}, {"meta_type": "GraphReportClass", "leaf": false, "uid":
118
+ "/zport/dmd/Reports/Graph Reports", "deletable": false, "text": {"count":
119
+ 0, "text": "Graph Reports", "description": "reports"}, "path": "Graph Reports",
120
+ "expandable": true, "uiProvider": "report", "children": [], "id": ".zport.dmd.Reports.Graph
121
+ Reports"}, {"meta_type": "MultiGraphReportClass", "leaf": false, "uid": "/zport/dmd/Reports/Multi-Graph
122
+ Reports", "deletable": false, "text": {"count": 0, "text": "Multi-Graph Reports",
123
+ "description": "reports"}, "path": "Multi-Graph Reports", "expandable": true,
124
+ "uiProvider": "report", "children": [], "id": ".zport.dmd.Reports.Multi-Graph
125
+ Reports"}, {"meta_type": "ReportClass", "leaf": false, "uid": "/zport/dmd/Reports/Performance
126
+ Reports", "deletable": true, "text": {"count": 7, "text": "Performance Reports",
127
+ "description": "reports"}, "path": "Performance Reports", "expandable": true,
128
+ "uiProvider": "report", "children": [{"meta_type": "Report", "leaf": true,
129
+ "uid": "/zport/dmd/Reports/Performance Reports/Availability Report", "deletable":
130
+ true, "text": "Availability Report", "path": "Availability Report", "expandable":
131
+ false, "uiProvider": "report", "children": [], "id": ".zport.dmd.Reports.Performance
132
+ Reports.Availability Report"}, {"meta_type": "Report", "leaf": true, "uid":
133
+ "/zport/dmd/Reports/Performance Reports/Aggregate Reports", "deletable": true,
134
+ "text": "Aggregate Reports", "path": "Aggregate Reports", "expandable": false,
135
+ "uiProvider": "report", "children": [], "id": ".zport.dmd.Reports.Performance
136
+ Reports.Aggregate Reports"}, {"meta_type": "Report", "leaf": true, "uid":
137
+ "/zport/dmd/Reports/Performance Reports/CPU Utilization", "deletable": true,
138
+ "text": "CPU Utilization", "path": "CPU Utilization", "expandable": false,
139
+ "uiProvider": "report", "children": [], "id": ".zport.dmd.Reports.Performance
140
+ Reports.CPU Utilization"}, {"meta_type": "Report", "leaf": true, "uid": "/zport/dmd/Reports/Performance
141
+ Reports/Threshold Summary", "deletable": true, "text": "Threshold Summary",
142
+ "path": "Threshold Summary", "expandable": false, "uiProvider": "report",
143
+ "children": [], "id": ".zport.dmd.Reports.Performance Reports.Threshold Summary"},
144
+ {"meta_type": "Report", "leaf": true, "uid": "/zport/dmd/Reports/Performance
145
+ Reports/Filesystem Util Report", "deletable": true, "text": "Filesystem Util
146
+ Report", "path": "Filesystem Util Report", "expandable": false, "uiProvider":
147
+ "report", "children": [], "id": ".zport.dmd.Reports.Performance Reports.Filesystem
148
+ Util Report"}, {"meta_type": "Report", "leaf": true, "uid": "/zport/dmd/Reports/Performance
149
+ Reports/Memory Utilization", "deletable": true, "text": "Memory Utilization",
150
+ "path": "Memory Utilization", "expandable": false, "uiProvider": "report",
151
+ "children": [], "id": ".zport.dmd.Reports.Performance Reports.Memory Utilization"},
152
+ {"meta_type": "Report", "leaf": true, "uid": "/zport/dmd/Reports/Performance
153
+ Reports/Interface Utilization", "deletable": true, "text": "Interface Utilization",
154
+ "path": "Interface Utilization", "expandable": false, "uiProvider": "report",
155
+ "children": [], "id": ".zport.dmd.Reports.Performance Reports.Interface Utilization"}],
156
+ "id": ".zport.dmd.Reports.Performance Reports"}, {"meta_type": "ReportClass",
157
+ "leaf": false, "uid": "/zport/dmd/Reports/Event Reports", "deletable": true,
158
+ "text": {"count": 3, "text": "Event Reports", "description": "reports"}, "path":
159
+ "Event Reports", "expandable": true, "uiProvider": "report", "children": [{"meta_type":
160
+ "Report", "leaf": true, "uid": "/zport/dmd/Reports/Event Reports/All Heartbeats",
161
+ "deletable": true, "text": "All Heartbeats", "path": "All Heartbeats", "expandable":
162
+ false, "uiProvider": "report", "children": [], "id": ".zport.dmd.Reports.Event
163
+ Reports.All Heartbeats"}, {"meta_type": "Report", "leaf": true, "uid": "/zport/dmd/Reports/Event
164
+ Reports/All EventClasses", "deletable": true, "text": "All EventClasses",
165
+ "path": "All EventClasses", "expandable": false, "uiProvider": "report", "children":
166
+ [], "id": ".zport.dmd.Reports.Event Reports.All EventClasses"}, {"meta_type":
167
+ "Report", "leaf": true, "uid": "/zport/dmd/Reports/Event Reports/All EventMappings",
168
+ "deletable": true, "text": "All EventMappings", "path": "All EventMappings",
169
+ "expandable": false, "uiProvider": "report", "children": [], "id": ".zport.dmd.Reports.Event
170
+ Reports.All EventMappings"}], "id": ".zport.dmd.Reports.Event Reports"}, {"meta_type":
171
+ "ReportClass", "leaf": false, "uid": "/zport/dmd/Reports/User Reports", "deletable":
172
+ true, "text": {"count": 1, "text": "User Reports", "description": "report"},
173
+ "path": "User Reports", "expandable": true, "uiProvider": "report", "children":
174
+ [{"meta_type": "Report", "leaf": true, "uid": "/zport/dmd/Reports/User Reports/Notification
175
+ Schedules", "deletable": true, "text": "Notification Schedules", "path": "Notification
176
+ Schedules", "expandable": false, "uiProvider": "report", "children": [], "id":
177
+ ".zport.dmd.Reports.User Reports.Notification Schedules"}], "id": ".zport.dmd.Reports.User
178
+ Reports"}], "id": ".zport.dmd.Reports"}]}'
179
+ http_version:
180
+ recorded_at: Fri, 22 May 2015 12:19:39 GMT
181
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,82 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://192.168.56.2:9080/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":18}]'
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:19:39 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Cookie:
19
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
27
+ Date:
28
+ - Fri, 22 May 2015 12:19:39 GMT
29
+ Content-Length:
30
+ - '577'
31
+ Content-Type:
32
+ - application/json
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"tid": 18, "action": "DeviceRouter", "type": "rpc", "method": "getDevices",
36
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"groups":
37
+ [], "serialNumber": "", "name": "UnitTestDevice", "collector": "localhost",
38
+ "osModel": null, "productionState": "Production", "location": null, "priority":
39
+ "Normal", "hwModel": null, "tagNumber": "", "osManufacturer": null, "systems":
40
+ [], "hwManufacturer": null, "ipAddress": null, "events": {"info": 0, "debug":
41
+ 0, "critical": 0, "warning": 0, "error": 0}, "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice"}]}}'
42
+ http_version:
43
+ recorded_at: Fri, 22 May 2015 12:19:39 GMT
44
+ - request:
45
+ method: post
46
+ uri: http://192.168.56.2:9080/zport/dmd/zport/dmd/report_router
47
+ body:
48
+ encoding: UTF-8
49
+ string: '[{"action":"ReportRouter","method":"getReportTypes","data":{},"type":"rpc","tid":19}]'
50
+ headers:
51
+ User-Agent:
52
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
53
+ Accept:
54
+ - "*/*"
55
+ Date:
56
+ - Fri, 22 May 2015 12:19:39 GMT
57
+ Content-Type:
58
+ - application/json; charset=utf-8
59
+ Cookie:
60
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
61
+ response:
62
+ status:
63
+ code: 200
64
+ message: OK
65
+ headers:
66
+ Server:
67
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
68
+ Date:
69
+ - Fri, 22 May 2015 12:19:39 GMT
70
+ Content-Length:
71
+ - '259'
72
+ Content-Type:
73
+ - application/json
74
+ body:
75
+ encoding: UTF-8
76
+ string: '{"tid": 19, "action": "ReportRouter", "type": "rpc", "method": "getReportTypes",
77
+ "result": {"menuText": ["Custom Device Report", "Graph Report", "Multi-Graph
78
+ Report"], "reportTypes": ["customDeviceReport", "graphReport", "multiGraphReport"],
79
+ "success": true}}'
80
+ http_version:
81
+ recorded_at: Fri, 22 May 2015 12:19:39 GMT
82
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,151 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://192.168.56.2:9080/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":20}]'
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:19:39 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Cookie:
19
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
27
+ Date:
28
+ - Fri, 22 May 2015 12:19:39 GMT
29
+ Content-Length:
30
+ - '577'
31
+ Content-Type:
32
+ - application/json
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"tid": 20, "action": "DeviceRouter", "type": "rpc", "method": "getDevices",
36
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"groups":
37
+ [], "serialNumber": "", "name": "UnitTestDevice", "collector": "localhost",
38
+ "osModel": null, "productionState": "Production", "location": null, "priority":
39
+ "Normal", "hwModel": null, "tagNumber": "", "osManufacturer": null, "systems":
40
+ [], "hwManufacturer": null, "ipAddress": null, "events": {"info": 0, "debug":
41
+ 0, "critical": 0, "warning": 0, "error": 0}, "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice"}]}}'
42
+ http_version:
43
+ recorded_at: Fri, 22 May 2015 12:19:39 GMT
44
+ - request:
45
+ method: get
46
+ uri: http://192.168.56.2:9080/zport/dmd/zport/dmd/Devices/Server/devices/UnitTestDevice/renameDevice?newId=unit_test_temporary_device_name
47
+ body:
48
+ encoding: UTF-8
49
+ string: ''
50
+ headers:
51
+ User-Agent:
52
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
53
+ Accept:
54
+ - "*/*"
55
+ Date:
56
+ - Fri, 22 May 2015 12:19:39 GMT
57
+ Cookie:
58
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
59
+ response:
60
+ status:
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ Server:
65
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
66
+ Date:
67
+ - Fri, 22 May 2015 12:19:39 GMT
68
+ Content-Length:
69
+ - '65'
70
+ Content-Type:
71
+ - text/plain; charset=utf-8
72
+ body:
73
+ encoding: UTF-8
74
+ string: "/zport/dmd/Devices/Server/devices/unit_test_temporary_device_name"
75
+ http_version:
76
+ recorded_at: Fri, 22 May 2015 12:19:39 GMT
77
+ - request:
78
+ method: post
79
+ uri: http://192.168.56.2:9080/zport/dmd/zport/dmd/device_router
80
+ body:
81
+ encoding: UTF-8
82
+ string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"unit_test_temporary_device_name"}}],"type":"rpc","tid":21}]'
83
+ headers:
84
+ User-Agent:
85
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
86
+ Accept:
87
+ - "*/*"
88
+ Date:
89
+ - Fri, 22 May 2015 12:19:39 GMT
90
+ Content-Type:
91
+ - application/json; charset=utf-8
92
+ Cookie:
93
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
94
+ response:
95
+ status:
96
+ code: 200
97
+ message: OK
98
+ headers:
99
+ Server:
100
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
101
+ Date:
102
+ - Fri, 22 May 2015 12:19:39 GMT
103
+ Content-Length:
104
+ - '611'
105
+ Content-Type:
106
+ - application/json
107
+ body:
108
+ encoding: UTF-8
109
+ string: '{"tid": 21, "action": "DeviceRouter", "type": "rpc", "method": "getDevices",
110
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"groups":
111
+ [], "serialNumber": "", "name": "unit_test_temporary_device_name", "collector":
112
+ "localhost", "osModel": null, "productionState": "Production", "location":
113
+ null, "priority": "Normal", "hwModel": null, "tagNumber": "", "osManufacturer":
114
+ null, "systems": [], "hwManufacturer": null, "ipAddress": null, "events":
115
+ {"info": 0, "debug": 0, "critical": 0, "warning": 0, "error": 0}, "uid": "/zport/dmd/Devices/Server/devices/unit_test_temporary_device_name"}]}}'
116
+ http_version:
117
+ recorded_at: Fri, 22 May 2015 12:19:39 GMT
118
+ - request:
119
+ method: get
120
+ uri: http://192.168.56.2:9080/zport/dmd/zport/dmd/Devices/Server/devices/unit_test_temporary_device_name/renameDevice?newId=UnitTestDevice
121
+ body:
122
+ encoding: UTF-8
123
+ string: ''
124
+ headers:
125
+ User-Agent:
126
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
127
+ Accept:
128
+ - "*/*"
129
+ Date:
130
+ - Fri, 22 May 2015 12:19:39 GMT
131
+ Cookie:
132
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
133
+ response:
134
+ status:
135
+ code: 200
136
+ message: OK
137
+ headers:
138
+ Server:
139
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
140
+ Date:
141
+ - Fri, 22 May 2015 12:19:40 GMT
142
+ Content-Length:
143
+ - '48'
144
+ Content-Type:
145
+ - text/plain; charset=utf-8
146
+ body:
147
+ encoding: UTF-8
148
+ string: "/zport/dmd/Devices/Server/devices/UnitTestDevice"
149
+ http_version:
150
+ recorded_at: Fri, 22 May 2015 12:19:40 GMT
151
+ recorded_with: VCR 2.9.3