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,85 @@
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":11}]'
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": 11, "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/device_router
47
+ body:
48
+ encoding: UTF-8
49
+ string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"UnitTestDevice"}}],"type":"rpc","tid":12}]'
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
+ - '577'
72
+ Content-Type:
73
+ - application/json
74
+ body:
75
+ encoding: UTF-8
76
+ string: '{"tid": 12, "action": "DeviceRouter", "type": "rpc", "method": "getDevices",
77
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"groups":
78
+ [], "serialNumber": "", "name": "UnitTestDevice", "collector": "localhost",
79
+ "osModel": null, "productionState": "Production", "location": null, "priority":
80
+ "Normal", "hwModel": null, "tagNumber": "", "osManufacturer": null, "systems":
81
+ [], "hwManufacturer": null, "ipAddress": null, "events": {"info": 0, "debug":
82
+ 0, "critical": 0, "warning": 0, "error": 0}, "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice"}]}}'
83
+ http_version:
84
+ recorded_at: Fri, 22 May 2015 12:19:39 GMT
85
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,110 @@
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":17}]'
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": 17, "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/sysUpTime
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
+ - '2'
70
+ Content-Type:
71
+ - text/plain; charset=utf-8
72
+ body:
73
+ encoding: UTF-8
74
+ string: "-1"
75
+ http_version:
76
+ recorded_at: Fri, 22 May 2015 12:19:39 GMT
77
+ - request:
78
+ method: get
79
+ uri: http://192.168.56.2:9080/zport/dmd/zport/dmd/Devices/Server/devices/UnitTestDevice/sysUpTime
80
+ body:
81
+ encoding: UTF-8
82
+ string: ''
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
+ Cookie:
91
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
92
+ response:
93
+ status:
94
+ code: 200
95
+ message: OK
96
+ headers:
97
+ Server:
98
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
99
+ Date:
100
+ - Fri, 22 May 2015 12:19:39 GMT
101
+ Content-Length:
102
+ - '2'
103
+ Content-Type:
104
+ - text/plain; charset=utf-8
105
+ body:
106
+ encoding: UTF-8
107
+ string: "-1"
108
+ http_version:
109
+ recorded_at: Fri, 22 May 2015 12:19:39 GMT
110
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,80 @@
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":5}]'
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": 5, "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","uid":"/zport/dmd/Devices/Server/devices/UnitTestDevice"}],"type":"rpc","tid":6}]'
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
+ - '141'
72
+ Content-Type:
73
+ - application/json
74
+ body:
75
+ encoding: UTF-8
76
+ string: '{"tid": 6, "action": "EventsRouter", "type": "rpc", "method": "query",
77
+ "result": {"totalCount": 0, "events": [], "asof": 1432297178.8344669}}'
78
+ http_version:
79
+ recorded_at: Fri, 22 May 2015 12:19:38 GMT
80
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,80 @@
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":7}]'
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": 7, "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","uid":"/zport/dmd/Devices/Server/devices/UnitTestDevice"}],"type":"rpc","tid":8}]'
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
+ - '141'
72
+ Content-Type:
73
+ - application/json
74
+ body:
75
+ encoding: UTF-8
76
+ string: '{"tid": 8, "action": "EventsRouter", "type": "rpc", "method": "query",
77
+ "result": {"totalCount": 0, "events": [], "asof": 1432297178.8653581}}'
78
+ http_version:
79
+ recorded_at: Fri, 22 May 2015 12:19:38 GMT
80
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,251 @@
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":13}]'
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": 13, "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/device_router
47
+ body:
48
+ encoding: UTF-8
49
+ string: '[{"action":"DeviceRouter","method":"getInfo","data":[{"uid":"/zport/dmd/Devices/Server/devices/UnitTestDevice"}],"type":"rpc","tid":14}]'
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
+ - '2772'
72
+ Content-Type:
73
+ - application/json
74
+ body:
75
+ encoding: UTF-8
76
+ string: '{"tid": 14, "action": "DeviceRouter", "type": "rpc", "method": "getInfo",
77
+ "result": {"disabled": false, "data": {"productionState": "Production", "uid":
78
+ "/zport/dmd/Devices/Server/devices/UnitTestDevice", "links": "", "snmpContact":
79
+ "", "osModel": null, "hwModel": null, "osManufacturer": null, "deviceClass":
80
+ {"description": "", "name": "/Server", "id": "Server", "meta_type": "DeviceClass",
81
+ "inspector_type": "DeviceClass", "path": "/Devices/Server", "objectProperties":
82
+ [{"type": "string", "id": "description", "mode": "w"}, {"type": "lines", "id":
83
+ "devtypes", "mode": "w"}, {"visible": true, "type": "lines", "id": "zCollectorPlugins"},
84
+ {"visible": true, "type": "string", "id": "zIcon"}], "events": {"info": 0,
85
+ "debug": 0, "critical": 0, "warning": 0, "error": 1}, "uid": "/zport/dmd/Devices/Server"},
86
+ "hwManufacturer": null, "snmpVersion": "v1", "objectProperties": [{"type":
87
+ "string", "id": "snmpindex", "mode": "w"}, {"type": "boolean", "id": "monitor",
88
+ "mode": "w"}, {"type": "string", "id": "manageIp", "mode": "w"}, {"select_variable":
89
+ "getProdStateConversions", "mode": "w", "type": "keyedselection", "id": "productionState",
90
+ "setter": "setProdState"}, {"select_variable": "getProdStateConversions",
91
+ "mode": "w", "type": "keyedselection", "id": "preMWProductionState", "setter":
92
+ "setProdState"}, {"type": "string", "id": "snmpAgent", "mode": "w"}, {"type":
93
+ "string", "id": "snmpDescr", "mode": ""}, {"type": "string", "id": "snmpOid",
94
+ "mode": ""}, {"type": "string", "id": "snmpContact", "mode": ""}, {"type":
95
+ "string", "id": "snmpSysName", "mode": ""}, {"type": "string", "id": "snmpLocation",
96
+ "mode": ""}, {"type": "date", "id": "snmpLastCollection", "mode": ""}, {"type":
97
+ "string", "id": "snmpAgent", "mode": ""}, {"type": "string", "id": "rackSlot",
98
+ "mode": "w"}, {"type": "text", "id": "comments", "mode": "w"}, {"type": "string",
99
+ "id": "sysedgeLicenseMode", "mode": ""}, {"type": "int", "id": "priority",
100
+ "mode": "w"}], "collector": "localhost", "id": "UnitTestDevice", "uptime":
101
+ "Unknown", "locking": {"updates": false, "deletion": false, "events": false},
102
+ "comments": "", "name": "UnitTestDevice", "priority": "Normal", "snmpCommunity":
103
+ "public", "location": null, "memory": {"ram": "Unknown", "swap": "Unknown"},
104
+ "lastCollected": "1970/01/01 00:00:00", "events": {"info": 0, "debug": 0,
105
+ "critical": 0, "warning": 0, "error": 0}, "systems": [], "status": true, "description":
106
+ "", "snmpDescr": "", "groups": [], "device": "UnitTestDevice", "firstSeen":
107
+ "2015/05/22 11:17:52", "icon": "/zport/dmd/img/icons/server.png", "snmpSysName":
108
+ "", "lastChanged": "2015/05/22 11:44:50", "serialNumber": "", "tagNumber":
109
+ "", "meta_type": "Device", "inspector_type": "Device", "snmpLocation": "",
110
+ "snmpAgent": "", "ipAddress": null, "rackSlot": 0}, "success": true}}'
111
+ http_version:
112
+ recorded_at: Fri, 22 May 2015 12:19:39 GMT
113
+ - request:
114
+ method: post
115
+ uri: http://192.168.56.2:9080/zport/dmd/zport/dmd/device_router
116
+ body:
117
+ encoding: UTF-8
118
+ string: '[{"action":"DeviceRouter","method":"getInfo","data":[{"uid":"/zport/dmd/Devices/Server/devices/UnitTestDevice"}],"type":"rpc","tid":15}]'
119
+ headers:
120
+ User-Agent:
121
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
122
+ Accept:
123
+ - "*/*"
124
+ Date:
125
+ - Fri, 22 May 2015 12:19:39 GMT
126
+ Content-Type:
127
+ - application/json; charset=utf-8
128
+ Cookie:
129
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
130
+ response:
131
+ status:
132
+ code: 200
133
+ message: OK
134
+ headers:
135
+ Server:
136
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
137
+ Date:
138
+ - Fri, 22 May 2015 12:19:39 GMT
139
+ Content-Length:
140
+ - '2772'
141
+ Content-Type:
142
+ - application/json
143
+ body:
144
+ encoding: UTF-8
145
+ string: '{"tid": 15, "action": "DeviceRouter", "type": "rpc", "method": "getInfo",
146
+ "result": {"disabled": false, "data": {"productionState": "Production", "uid":
147
+ "/zport/dmd/Devices/Server/devices/UnitTestDevice", "links": "", "snmpContact":
148
+ "", "osModel": null, "hwModel": null, "osManufacturer": null, "deviceClass":
149
+ {"description": "", "name": "/Server", "id": "Server", "meta_type": "DeviceClass",
150
+ "inspector_type": "DeviceClass", "path": "/Devices/Server", "objectProperties":
151
+ [{"type": "string", "id": "description", "mode": "w"}, {"type": "lines", "id":
152
+ "devtypes", "mode": "w"}, {"visible": true, "type": "lines", "id": "zCollectorPlugins"},
153
+ {"visible": true, "type": "string", "id": "zIcon"}], "events": {"info": 0,
154
+ "debug": 0, "critical": 0, "warning": 0, "error": 1}, "uid": "/zport/dmd/Devices/Server"},
155
+ "hwManufacturer": null, "snmpVersion": "v1", "objectProperties": [{"type":
156
+ "string", "id": "snmpindex", "mode": "w"}, {"type": "boolean", "id": "monitor",
157
+ "mode": "w"}, {"type": "string", "id": "manageIp", "mode": "w"}, {"select_variable":
158
+ "getProdStateConversions", "mode": "w", "type": "keyedselection", "id": "productionState",
159
+ "setter": "setProdState"}, {"select_variable": "getProdStateConversions",
160
+ "mode": "w", "type": "keyedselection", "id": "preMWProductionState", "setter":
161
+ "setProdState"}, {"type": "string", "id": "snmpAgent", "mode": "w"}, {"type":
162
+ "string", "id": "snmpDescr", "mode": ""}, {"type": "string", "id": "snmpOid",
163
+ "mode": ""}, {"type": "string", "id": "snmpContact", "mode": ""}, {"type":
164
+ "string", "id": "snmpSysName", "mode": ""}, {"type": "string", "id": "snmpLocation",
165
+ "mode": ""}, {"type": "date", "id": "snmpLastCollection", "mode": ""}, {"type":
166
+ "string", "id": "snmpAgent", "mode": ""}, {"type": "string", "id": "rackSlot",
167
+ "mode": "w"}, {"type": "text", "id": "comments", "mode": "w"}, {"type": "string",
168
+ "id": "sysedgeLicenseMode", "mode": ""}, {"type": "int", "id": "priority",
169
+ "mode": "w"}], "collector": "localhost", "id": "UnitTestDevice", "uptime":
170
+ "Unknown", "locking": {"updates": false, "deletion": false, "events": false},
171
+ "comments": "", "name": "UnitTestDevice", "priority": "Normal", "snmpCommunity":
172
+ "public", "location": null, "memory": {"ram": "Unknown", "swap": "Unknown"},
173
+ "lastCollected": "1970/01/01 00:00:00", "events": {"info": 0, "debug": 0,
174
+ "critical": 0, "warning": 0, "error": 0}, "systems": [], "status": true, "description":
175
+ "", "snmpDescr": "", "groups": [], "device": "UnitTestDevice", "firstSeen":
176
+ "2015/05/22 11:17:52", "icon": "/zport/dmd/img/icons/server.png", "snmpSysName":
177
+ "", "lastChanged": "2015/05/22 11:44:50", "serialNumber": "", "tagNumber":
178
+ "", "meta_type": "Device", "inspector_type": "Device", "snmpLocation": "",
179
+ "snmpAgent": "", "ipAddress": null, "rackSlot": 0}, "success": true}}'
180
+ http_version:
181
+ recorded_at: Fri, 22 May 2015 12:19:39 GMT
182
+ - request:
183
+ method: post
184
+ uri: http://192.168.56.2:9080/zport/dmd/zport/dmd/device_router
185
+ body:
186
+ encoding: UTF-8
187
+ string: '[{"action":"DeviceRouter","method":"getInfo","data":[{"uid":"/zport/dmd/Devices/Server/devices/UnitTestDevice"}],"type":"rpc","tid":16}]'
188
+ headers:
189
+ User-Agent:
190
+ - HTTPClient/1.0 (2.6.0.1, ruby 2.2.0 (2014-12-25))
191
+ Accept:
192
+ - "*/*"
193
+ Date:
194
+ - Fri, 22 May 2015 12:19:39 GMT
195
+ Content-Type:
196
+ - application/json; charset=utf-8
197
+ Cookie:
198
+ - __ginger_snap=NjE2NDZkNjk2ZTo3YTY1NmU2ZjczNzM%253D
199
+ response:
200
+ status:
201
+ code: 200
202
+ message: OK
203
+ headers:
204
+ Server:
205
+ - Zope/(2.12.1, python 2.6.2, linux2) ZServer/1.1
206
+ Date:
207
+ - Fri, 22 May 2015 12:19:39 GMT
208
+ Content-Length:
209
+ - '2772'
210
+ Content-Type:
211
+ - application/json
212
+ body:
213
+ encoding: UTF-8
214
+ string: '{"tid": 16, "action": "DeviceRouter", "type": "rpc", "method": "getInfo",
215
+ "result": {"disabled": false, "data": {"productionState": "Production", "uid":
216
+ "/zport/dmd/Devices/Server/devices/UnitTestDevice", "links": "", "snmpContact":
217
+ "", "osModel": null, "hwModel": null, "osManufacturer": null, "deviceClass":
218
+ {"description": "", "name": "/Server", "id": "Server", "meta_type": "DeviceClass",
219
+ "inspector_type": "DeviceClass", "path": "/Devices/Server", "objectProperties":
220
+ [{"type": "string", "id": "description", "mode": "w"}, {"type": "lines", "id":
221
+ "devtypes", "mode": "w"}, {"visible": true, "type": "lines", "id": "zCollectorPlugins"},
222
+ {"visible": true, "type": "string", "id": "zIcon"}], "events": {"info": 0,
223
+ "debug": 0, "critical": 0, "warning": 0, "error": 1}, "uid": "/zport/dmd/Devices/Server"},
224
+ "hwManufacturer": null, "snmpVersion": "v1", "objectProperties": [{"type":
225
+ "string", "id": "snmpindex", "mode": "w"}, {"type": "boolean", "id": "monitor",
226
+ "mode": "w"}, {"type": "string", "id": "manageIp", "mode": "w"}, {"select_variable":
227
+ "getProdStateConversions", "mode": "w", "type": "keyedselection", "id": "productionState",
228
+ "setter": "setProdState"}, {"select_variable": "getProdStateConversions",
229
+ "mode": "w", "type": "keyedselection", "id": "preMWProductionState", "setter":
230
+ "setProdState"}, {"type": "string", "id": "snmpAgent", "mode": "w"}, {"type":
231
+ "string", "id": "snmpDescr", "mode": ""}, {"type": "string", "id": "snmpOid",
232
+ "mode": ""}, {"type": "string", "id": "snmpContact", "mode": ""}, {"type":
233
+ "string", "id": "snmpSysName", "mode": ""}, {"type": "string", "id": "snmpLocation",
234
+ "mode": ""}, {"type": "date", "id": "snmpLastCollection", "mode": ""}, {"type":
235
+ "string", "id": "snmpAgent", "mode": ""}, {"type": "string", "id": "rackSlot",
236
+ "mode": "w"}, {"type": "text", "id": "comments", "mode": "w"}, {"type": "string",
237
+ "id": "sysedgeLicenseMode", "mode": ""}, {"type": "int", "id": "priority",
238
+ "mode": "w"}], "collector": "localhost", "id": "UnitTestDevice", "uptime":
239
+ "Unknown", "locking": {"updates": false, "deletion": false, "events": false},
240
+ "comments": "", "name": "UnitTestDevice", "priority": "Normal", "snmpCommunity":
241
+ "public", "location": null, "memory": {"ram": "Unknown", "swap": "Unknown"},
242
+ "lastCollected": "1970/01/01 00:00:00", "events": {"info": 0, "debug": 0,
243
+ "critical": 0, "warning": 0, "error": 0}, "systems": [], "status": true, "description":
244
+ "", "snmpDescr": "", "groups": [], "device": "UnitTestDevice", "firstSeen":
245
+ "2015/05/22 11:17:52", "icon": "/zport/dmd/img/icons/server.png", "snmpSysName":
246
+ "", "lastChanged": "2015/05/22 11:44:50", "serialNumber": "", "tagNumber":
247
+ "", "meta_type": "Device", "inspector_type": "Device", "snmpLocation": "",
248
+ "snmpAgent": "", "ipAddress": null, "rackSlot": 0}, "success": true}}'
249
+ http_version:
250
+ recorded_at: Fri, 22 May 2015 12:19:39 GMT
251
+ recorded_with: VCR 2.9.3