zenoss_client 0.7.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +8 -9
  3. data/README.rdoc +87 -0
  4. data/VERSION +1 -1
  5. data/lib/zenoss/connection.rb +1 -0
  6. data/lib/zenoss/events/event.rb +14 -2
  7. data/lib/zenoss/jsonapi/device_router.rb +28 -0
  8. data/lib/zenoss/jsonapi/report_router.rb +5 -1
  9. data/lib/zenoss/model/devices/device.rb +5 -0
  10. data/test/fixtures/vcr_cassettes/6_2_1_initial_connection.yml +232 -0
  11. data/test/fixtures/vcr_cassettes/6_2_1_test_0001_returns_an_Array_of_devices_when_searched_by_name.yml +107 -0
  12. data/test/fixtures/vcr_cassettes/6_2_1_test_0002_returns_device_uptime_when_asked.yml +131 -0
  13. data/test/fixtures/vcr_cassettes/6_2_1_test_0003_returns_an_Array_of_events_for_a_device.yml +100 -0
  14. data/test/fixtures/vcr_cassettes/6_2_1_test_0004_returns_an_Array_of_historical_events_for_a_device.yml +100 -0
  15. data/test/fixtures/vcr_cassettes/6_2_1_test_0005_returns_info_for_a_device_in_the_form_of_a_Hash.yml +265 -0
  16. data/test/fixtures/vcr_cassettes/6_2_1_test_0006_returns_an_Array_of_events_for_all_devices.yml +100 -0
  17. data/test/fixtures/vcr_cassettes/6_2_1_test_0007_fetches_the_report_tree.yml +164 -0
  18. data/test/fixtures/vcr_cassettes/6_2_1_test_0008_fetches_available_report_types_and_returns_a_Hash.yml +100 -0
  19. data/test/fixtures/vcr_cassettes/6_2_1_test_0009_renames_the_device.yml +184 -0
  20. data/test/fixtures/vcr_cassettes/6_2_1_test_0010_sets_info_for_a_device.yml +100 -0
  21. data/test/fixtures/vcr_cassettes/6_2_1_test_0011_sets_info_for_a_device_on_a_device_object.yml +100 -0
  22. data/test/fixtures/vcr_cassettes/6_2_1_test_0012_remodels_a_device.yml +99 -0
  23. data/test/test_helper.rb +14 -0
  24. data/test/zenoss_client_test.rb +89 -2
  25. data/test/zenoss_model_device_test.rb +25 -0
  26. data/zenoss_client.gemspec +7 -6
  27. metadata +30 -106
@@ -0,0 +1,107 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost: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":7}]'
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 19 Feb 2019 22:36:50 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Cookie: ''
19
+ response:
20
+ status:
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ Content-Type:
25
+ - application/json
26
+ Date:
27
+ - Tue, 19 Feb 2019 22:36:50 GMT
28
+ Server: ''
29
+ Strict-Transport-Security:
30
+ - max-age=31536000
31
+ Vary:
32
+ - Accept-Encoding
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ Content-Length:
38
+ - '904'
39
+ Set-Cookie: ''
40
+ body:
41
+ encoding: UTF-8
42
+ string: '{"uuid": "99425e21-1fb5-4a6c-8466-b1969bf927ec", "action": "DeviceRouter",
43
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
44
+ null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
45
+ null, "collector": "localhost", "osModel": null, "productionState": 400, "systems":
46
+ [], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer": null,
47
+ "location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
48
+ "ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
49
+ "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
50
+ 0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
51
+ 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
52
+ "name": "UnitTestDevice"}]}, "tid": 7, "type": "rpc", "method": "getDevices"}'
53
+ http_version:
54
+ recorded_at: Tue, 19 Feb 2019 22:36:50 GMT
55
+ - request:
56
+ method: post
57
+ uri: http://localhost:8080/zport/dmd/zport/dmd/device_router
58
+ body:
59
+ encoding: UTF-8
60
+ string: '[{"action":"DeviceRouter","method":"getDevices","data":[{"uid":"/zport/dmd/Devices","params":{"name":"UnitTestDevice"}}],"type":"rpc","tid":8}]'
61
+ headers:
62
+ User-Agent:
63
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
64
+ Accept:
65
+ - "*/*"
66
+ Date:
67
+ - Tue, 19 Feb 2019 22:36:50 GMT
68
+ Content-Type:
69
+ - application/json; charset=utf-8
70
+ Cookie: ''
71
+ response:
72
+ status:
73
+ code: 200
74
+ message: OK
75
+ headers:
76
+ Content-Type:
77
+ - application/json
78
+ Date:
79
+ - Tue, 19 Feb 2019 22:36:51 GMT
80
+ Server: ''
81
+ Strict-Transport-Security:
82
+ - max-age=31536000
83
+ Vary:
84
+ - Accept-Encoding
85
+ X-Frame-Options:
86
+ - SAMEORIGIN
87
+ X-Xss-Protection:
88
+ - 1; mode=block
89
+ Content-Length:
90
+ - '904'
91
+ Set-Cookie: ''
92
+ body:
93
+ encoding: UTF-8
94
+ string: '{"uuid": "b7f6ae66-d850-4deb-96e3-eb70954e4c4e", "action": "DeviceRouter",
95
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
96
+ null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
97
+ null, "collector": "localhost", "osModel": null, "productionState": 400, "systems":
98
+ [], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer": null,
99
+ "location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
100
+ "ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
101
+ "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
102
+ 0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
103
+ 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
104
+ "name": "UnitTestDevice"}]}, "tid": 8, "type": "rpc", "method": "getDevices"}'
105
+ http_version:
106
+ recorded_at: Tue, 19 Feb 2019 22:36:51 GMT
107
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,131 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost: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":11}]'
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 19 Feb 2019 22:36:51 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Cookie: ''
19
+ response:
20
+ status:
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ Content-Type:
25
+ - application/json
26
+ Date:
27
+ - Tue, 19 Feb 2019 22:36:51 GMT
28
+ Server: ''
29
+ Strict-Transport-Security:
30
+ - max-age=31536000
31
+ Vary:
32
+ - Accept-Encoding
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ Content-Length:
38
+ - '905'
39
+ Set-Cookie: ''
40
+ body:
41
+ encoding: UTF-8
42
+ string: '{"uuid": "252d5c1e-ede2-460f-93d5-f33be9becd07", "action": "DeviceRouter",
43
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
44
+ null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
45
+ null, "collector": "localhost", "osModel": null, "productionState": 400, "systems":
46
+ [], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer": null,
47
+ "location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
48
+ "ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
49
+ "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
50
+ 0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
51
+ 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
52
+ "name": "UnitTestDevice"}]}, "tid": 11, "type": "rpc", "method": "getDevices"}'
53
+ http_version:
54
+ recorded_at: Tue, 19 Feb 2019 22:36:51 GMT
55
+ - request:
56
+ method: get
57
+ uri: http://localhost:8080/zport/dmd/zport/dmd/Devices/Server/devices/UnitTestDevice/sysUpTime
58
+ body:
59
+ encoding: UTF-8
60
+ string: ''
61
+ headers:
62
+ User-Agent:
63
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
64
+ Accept:
65
+ - "*/*"
66
+ Date:
67
+ - Tue, 19 Feb 2019 22:36:51 GMT
68
+ Cookie: ''
69
+ response:
70
+ status:
71
+ code: 200
72
+ message: OK
73
+ headers:
74
+ Content-Length:
75
+ - '2'
76
+ Content-Type:
77
+ - text/plain; charset=utf-8
78
+ Date:
79
+ - Tue, 19 Feb 2019 22:36:52 GMT
80
+ Server: ''
81
+ Strict-Transport-Security:
82
+ - max-age=31536000
83
+ X-Frame-Options:
84
+ - SAMEORIGIN
85
+ X-Xss-Protection:
86
+ - 1; mode=block
87
+ Set-Cookie: ''
88
+ body:
89
+ encoding: UTF-8
90
+ string: "-1"
91
+ http_version:
92
+ recorded_at: Tue, 19 Feb 2019 22:36:52 GMT
93
+ - request:
94
+ method: get
95
+ uri: http://localhost:8080/zport/dmd/zport/dmd/Devices/Server/devices/UnitTestDevice/sysUpTime
96
+ body:
97
+ encoding: UTF-8
98
+ string: ''
99
+ headers:
100
+ User-Agent:
101
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
102
+ Accept:
103
+ - "*/*"
104
+ Date:
105
+ - Tue, 19 Feb 2019 22:36:52 GMT
106
+ Cookie: ''
107
+ response:
108
+ status:
109
+ code: 200
110
+ message: OK
111
+ headers:
112
+ Content-Length:
113
+ - '2'
114
+ Content-Type:
115
+ - text/plain; charset=utf-8
116
+ Date:
117
+ - Tue, 19 Feb 2019 22:36:52 GMT
118
+ Server: ''
119
+ Strict-Transport-Security:
120
+ - max-age=31536000
121
+ X-Frame-Options:
122
+ - SAMEORIGIN
123
+ X-Xss-Protection:
124
+ - 1; mode=block
125
+ Set-Cookie: ''
126
+ body:
127
+ encoding: UTF-8
128
+ string: "-1"
129
+ http_version:
130
+ recorded_at: Tue, 19 Feb 2019 22:36:52 GMT
131
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,100 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost: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":12}]'
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 19 Feb 2019 22:36:52 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Cookie: ''
19
+ response:
20
+ status:
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ Content-Type:
25
+ - application/json
26
+ Date:
27
+ - Tue, 19 Feb 2019 22:36:52 GMT
28
+ Server: ''
29
+ Strict-Transport-Security:
30
+ - max-age=31536000
31
+ Vary:
32
+ - Accept-Encoding
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ Content-Length:
38
+ - '905'
39
+ Set-Cookie: ''
40
+ body:
41
+ encoding: UTF-8
42
+ string: '{"uuid": "4c63f583-5a2f-4b72-90e0-a9cd34f011f9", "action": "DeviceRouter",
43
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
44
+ null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
45
+ null, "collector": "localhost", "osModel": null, "productionState": 400, "systems":
46
+ [], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer": null,
47
+ "location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
48
+ "ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
49
+ "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
50
+ 0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
51
+ 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
52
+ "name": "UnitTestDevice"}]}, "tid": 12, "type": "rpc", "method": "getDevices"}'
53
+ http_version:
54
+ recorded_at: Tue, 19 Feb 2019 22:36:52 GMT
55
+ - request:
56
+ method: post
57
+ uri: http://localhost:8080/zport/dmd/zport/dmd/evconsole_router
58
+ body:
59
+ encoding: UTF-8
60
+ string: '[{"action":"EventsRouter","method":"query","data":[{"limit":100,"start":0,"sort":"lastTime","dir":"DESC","uid":"/zport/dmd/Devices/Server/devices/UnitTestDevice"}],"type":"rpc","tid":13}]'
61
+ headers:
62
+ User-Agent:
63
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
64
+ Accept:
65
+ - "*/*"
66
+ Date:
67
+ - Tue, 19 Feb 2019 22:36:52 GMT
68
+ Content-Type:
69
+ - application/json; charset=utf-8
70
+ Cookie: ''
71
+ response:
72
+ status:
73
+ code: 200
74
+ message: OK
75
+ headers:
76
+ Content-Type:
77
+ - application/json
78
+ Date:
79
+ - Tue, 19 Feb 2019 22:36:52 GMT
80
+ Server: ''
81
+ Strict-Transport-Security:
82
+ - max-age=31536000
83
+ Vary:
84
+ - Accept-Encoding
85
+ X-Frame-Options:
86
+ - SAMEORIGIN
87
+ X-Xss-Protection:
88
+ - 1; mode=block
89
+ Transfer-Encoding:
90
+ - chunked
91
+ Set-Cookie: ''
92
+ body:
93
+ encoding: UTF-8
94
+ string: '{"uuid": "1", "action": "EventsRouter", "result": {"totalCount": 1,
95
+ "events": [{"prodState": "Production", "dedupid": "fan", "eventKey": "1",
96
+ "evid": "1", "eventClass": {"uid": "/zport/dmd/Events/HW/Temparature/Fan"}}],
97
+ "success": true, "tid": 19, "type": "rpc", "method": "query"}}'
98
+ http_version:
99
+ recorded_at: Tue, 19 Feb 2019 22:36:52 GMT
100
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,100 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost: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":14}]'
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 19 Feb 2019 22:36:52 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Cookie: ''
19
+ response:
20
+ status:
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ Content-Type:
25
+ - application/json
26
+ Date:
27
+ - Tue, 19 Feb 2019 22:36:53 GMT
28
+ Server: ''
29
+ Strict-Transport-Security:
30
+ - max-age=31536000
31
+ Vary:
32
+ - Accept-Encoding
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ Content-Length:
38
+ - '905'
39
+ Set-Cookie: ''
40
+ body:
41
+ encoding: UTF-8
42
+ string: '{"uuid": "fcbf5db4-6366-4df0-b9cc-d6f3193c0685", "action": "DeviceRouter",
43
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
44
+ null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
45
+ null, "collector": "localhost", "osModel": null, "productionState": 400, "systems":
46
+ [], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer": null,
47
+ "location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
48
+ "ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
49
+ "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
50
+ 0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
51
+ 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
52
+ "name": "UnitTestDevice"}]}, "tid": 14, "type": "rpc", "method": "getDevices"}'
53
+ http_version:
54
+ recorded_at: Tue, 19 Feb 2019 22:36:53 GMT
55
+ - request:
56
+ method: post
57
+ uri: http://localhost:8080/zport/dmd/zport/dmd/evconsole_router
58
+ body:
59
+ encoding: UTF-8
60
+ string: '[{"action":"EventsRouter","method":"query","data":[{"limit":100,"start":0,"sort":"lastTime","dir":"DESC","uid":"/zport/dmd/Devices/Server/devices/UnitTestDevice"}],"type":"rpc","tid":15}]'
61
+ headers:
62
+ User-Agent:
63
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
64
+ Accept:
65
+ - "*/*"
66
+ Date:
67
+ - Tue, 19 Feb 2019 22:36:53 GMT
68
+ Content-Type:
69
+ - application/json; charset=utf-8
70
+ Cookie: ''
71
+ response:
72
+ status:
73
+ code: 200
74
+ message: OK
75
+ headers:
76
+ Content-Type:
77
+ - application/json
78
+ Date:
79
+ - Tue, 19 Feb 2019 22:36:53 GMT
80
+ Server: ''
81
+ Strict-Transport-Security:
82
+ - max-age=31536000
83
+ Vary:
84
+ - Accept-Encoding
85
+ X-Frame-Options:
86
+ - SAMEORIGIN
87
+ X-Xss-Protection:
88
+ - 1; mode=block
89
+ Transfer-Encoding:
90
+ - chunked
91
+ Set-Cookie: ''
92
+ body:
93
+ encoding: UTF-8
94
+ string: '{"uuid": "1", "action": "EventsRouter", "result": {"totalCount": 1,
95
+ "events": [{"prodState": "Production", "dedupid": "fan", "eventKey": "1",
96
+ "evid": "1", "eventClass": {"uid": "/zport/dmd/Events/HW/Temparature/Fan"}}],
97
+ "success": true, "tid": 19, "type": "rpc", "method": "query"}}'
98
+ http_version:
99
+ recorded_at: Tue, 19 Feb 2019 22:36:53 GMT
100
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,265 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost: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":3}]'
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 19 Feb 2019 22:36:49 GMT
16
+ Content-Type:
17
+ - application/json; charset=utf-8
18
+ Cookie: ''
19
+ response:
20
+ status:
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ Content-Type:
25
+ - application/json
26
+ Date:
27
+ - Tue, 19 Feb 2019 22:36:49 GMT
28
+ Server: ''
29
+ Strict-Transport-Security:
30
+ - max-age=31536000
31
+ Vary:
32
+ - Accept-Encoding
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ Content-Length:
38
+ - '904'
39
+ Set-Cookie: ''
40
+ body:
41
+ encoding: UTF-8
42
+ string: '{"uuid": "f5ca4548-184a-433b-9005-46bbc3e277d6", "action": "DeviceRouter",
43
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
44
+ null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
45
+ null, "collector": "localhost", "osModel": null, "productionState": 400, "systems":
46
+ [], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer": null,
47
+ "location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
48
+ "ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
49
+ "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
50
+ 0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
51
+ 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
52
+ "name": "UnitTestDevice"}]}, "tid": 3, "type": "rpc", "method": "getDevices"}'
53
+ http_version:
54
+ recorded_at: Tue, 19 Feb 2019 22:36:49 GMT
55
+ - request:
56
+ method: post
57
+ uri: http://localhost:8080/zport/dmd/zport/dmd/device_router
58
+ body:
59
+ encoding: UTF-8
60
+ string: '[{"action":"DeviceRouter","method":"getInfo","data":[{"uid":"/zport/dmd/Devices/Server/devices/UnitTestDevice"}],"type":"rpc","tid":4}]'
61
+ headers:
62
+ User-Agent:
63
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
64
+ Accept:
65
+ - "*/*"
66
+ Date:
67
+ - Tue, 19 Feb 2019 22:36:49 GMT
68
+ Content-Type:
69
+ - application/json; charset=utf-8
70
+ Cookie: ''
71
+ response:
72
+ status:
73
+ code: 200
74
+ message: OK
75
+ headers:
76
+ Content-Type:
77
+ - application/json
78
+ Date:
79
+ - Tue, 19 Feb 2019 22:36:49 GMT
80
+ Server: ''
81
+ Strict-Transport-Security:
82
+ - max-age=31536000
83
+ Vary:
84
+ - Accept-Encoding
85
+ X-Frame-Options:
86
+ - SAMEORIGIN
87
+ X-Xss-Protection:
88
+ - 1; mode=block
89
+ Transfer-Encoding:
90
+ - chunked
91
+ Set-Cookie: ''
92
+ body:
93
+ encoding: UTF-8
94
+ string: '{"uuid": "1c49bcdd-2284-41e6-abc4-5844c3f90da0", "action": "DeviceRouter",
95
+ "result": {"disabled": false, "data": {"productionState": 400, "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
96
+ "links": "", "snmpContact": "", "osModel": "", "snmpVersion": "v2c", "hwModel":
97
+ "", "osManufacturer": "", "deviceClass": {"connectionInfo": ["zSnmpCommunity"],
98
+ "uuid": "948d8770-4c36-47b9-94f0-9139fa8f9e94", "name": "Server", "severity":
99
+ "warning", "id": "Server", "meta_type": "DeviceClass", "inspector_type": "DeviceClass",
100
+ "uid": "/zport/dmd/Devices/Server", "events": {"info": {"count": 22, "acknowledged_count":
101
+ 10}, "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count":
102
+ 1, "acknowledged_count": 0}, "critical": {"count": 0, "acknowledged_count":
103
+ 0}, "error": {"count": 0, "acknowledged_count": 0}, "debug": {"count": 0,
104
+ "acknowledged_count": 0}}, "description": ""}, "hwManufacturer": "", "docker_version":
105
+ "", "created_timestamp": 1550510987.859867, "renameInProgress": false, "collector":
106
+ "localhost", "id": "UnitTestDevice", "deviceConnectionInfo": "", "uptime":
107
+ "Unknown", "severity": "clear", "locking": {"updates": false, "deletion":
108
+ false, "events": false}, "comments": "", "name": "UnitTestDevice", "priority":
109
+ 3, "snmpCommunity": "", "location": "", "memory": {"ram": "Unknown", "swap":
110
+ "Unknown"}, "icon": "/zport/dmd/img/icons/server.png", "priorityLabel": "Normal",
111
+ "lastCollected": "Not Modeled", "events": {"info": {"count": 0, "acknowledged_count":
112
+ 0}, "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0,
113
+ "acknowledged_count": 0}, "critical": {"count": 0, "acknowledged_count": 0},
114
+ "error": {"count": 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count":
115
+ 0}}, "systems": [], "status": "", "ipAddressString": "", "description": "",
116
+ "snmpDescr": "", "groups": [], "device": "UnitTestDevice", "sshLink": "",
117
+ "firstSeen": 1550510987.859867, "snmpSysName": "", "pythonClass": "Products.ZenModel.Device",
118
+ "lastChanged": 1550535660.45533, "productionStateLabel": "Test", "serialNumber":
119
+ "", "uuid": "94251860-157a-4dd1-8386-33fa1db0d593", "tagNumber": "", "meta_type":
120
+ "Device", "inspector_type": "Device", "snmpLocation": "", "snmpAgent": "",
121
+ "ipAddress": "", "rackSlot": 0}, "success": true}, "tid": 4, "type": "rpc",
122
+ "method": "getInfo"}'
123
+ http_version:
124
+ recorded_at: Tue, 19 Feb 2019 22:36:49 GMT
125
+ - request:
126
+ method: post
127
+ uri: http://localhost:8080/zport/dmd/zport/dmd/device_router
128
+ body:
129
+ encoding: UTF-8
130
+ string: '[{"action":"DeviceRouter","method":"getInfo","data":[{"uid":"/zport/dmd/Devices/Server/devices/UnitTestDevice"}],"type":"rpc","tid":5}]'
131
+ headers:
132
+ User-Agent:
133
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
134
+ Accept:
135
+ - "*/*"
136
+ Date:
137
+ - Tue, 19 Feb 2019 22:36:49 GMT
138
+ Content-Type:
139
+ - application/json; charset=utf-8
140
+ Cookie: ''
141
+ response:
142
+ status:
143
+ code: 200
144
+ message: OK
145
+ headers:
146
+ Content-Type:
147
+ - application/json
148
+ Date:
149
+ - Tue, 19 Feb 2019 22:36:50 GMT
150
+ Server: ''
151
+ Strict-Transport-Security:
152
+ - max-age=31536000
153
+ Vary:
154
+ - Accept-Encoding
155
+ X-Frame-Options:
156
+ - SAMEORIGIN
157
+ X-Xss-Protection:
158
+ - 1; mode=block
159
+ Transfer-Encoding:
160
+ - chunked
161
+ Set-Cookie: ''
162
+ body:
163
+ encoding: UTF-8
164
+ string: '{"uuid": "739abdfd-057e-4c92-b5ac-fca0b764389b", "action": "DeviceRouter",
165
+ "result": {"disabled": false, "data": {"productionState": 400, "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
166
+ "links": "", "snmpContact": "", "osModel": "", "snmpVersion": "v2c", "hwModel":
167
+ "", "osManufacturer": "", "deviceClass": {"connectionInfo": ["zSnmpCommunity"],
168
+ "uuid": "948d8770-4c36-47b9-94f0-9139fa8f9e94", "name": "Server", "severity":
169
+ "warning", "id": "Server", "meta_type": "DeviceClass", "inspector_type": "DeviceClass",
170
+ "uid": "/zport/dmd/Devices/Server", "events": {"info": {"count": 22, "acknowledged_count":
171
+ 10}, "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count":
172
+ 1, "acknowledged_count": 0}, "critical": {"count": 0, "acknowledged_count":
173
+ 0}, "error": {"count": 0, "acknowledged_count": 0}, "debug": {"count": 0,
174
+ "acknowledged_count": 0}}, "description": ""}, "hwManufacturer": "", "docker_version":
175
+ "", "created_timestamp": 1550510987.859867, "renameInProgress": false, "collector":
176
+ "localhost", "id": "UnitTestDevice", "deviceConnectionInfo": "", "uptime":
177
+ "Unknown", "severity": "clear", "locking": {"updates": false, "deletion":
178
+ false, "events": false}, "comments": "", "name": "UnitTestDevice", "priority":
179
+ 3, "snmpCommunity": "", "location": "", "memory": {"ram": "Unknown", "swap":
180
+ "Unknown"}, "icon": "/zport/dmd/img/icons/server.png", "priorityLabel": "Normal",
181
+ "lastCollected": "Not Modeled", "events": {"info": {"count": 0, "acknowledged_count":
182
+ 0}, "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0,
183
+ "acknowledged_count": 0}, "critical": {"count": 0, "acknowledged_count": 0},
184
+ "error": {"count": 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count":
185
+ 0}}, "systems": [], "status": "", "ipAddressString": "", "description": "",
186
+ "snmpDescr": "", "groups": [], "device": "UnitTestDevice", "sshLink": "",
187
+ "firstSeen": 1550510987.859867, "snmpSysName": "", "pythonClass": "Products.ZenModel.Device",
188
+ "lastChanged": 1550535660.45533, "productionStateLabel": "Test", "serialNumber":
189
+ "", "uuid": "94251860-157a-4dd1-8386-33fa1db0d593", "tagNumber": "", "meta_type":
190
+ "Device", "inspector_type": "Device", "snmpLocation": "", "snmpAgent": "",
191
+ "ipAddress": "", "rackSlot": 0}, "success": true}, "tid": 5, "type": "rpc",
192
+ "method": "getInfo"}'
193
+ http_version:
194
+ recorded_at: Tue, 19 Feb 2019 22:36:50 GMT
195
+ - request:
196
+ method: post
197
+ uri: http://localhost:8080/zport/dmd/zport/dmd/device_router
198
+ body:
199
+ encoding: UTF-8
200
+ string: '[{"action":"DeviceRouter","method":"getInfo","data":[{"uid":"/zport/dmd/Devices/Server/devices/UnitTestDevice"}],"type":"rpc","tid":6}]'
201
+ headers:
202
+ User-Agent:
203
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
204
+ Accept:
205
+ - "*/*"
206
+ Date:
207
+ - Tue, 19 Feb 2019 22:36:50 GMT
208
+ Content-Type:
209
+ - application/json; charset=utf-8
210
+ Cookie: ''
211
+ response:
212
+ status:
213
+ code: 200
214
+ message: OK
215
+ headers:
216
+ Content-Type:
217
+ - application/json
218
+ Date:
219
+ - Tue, 19 Feb 2019 22:36:50 GMT
220
+ Server: ''
221
+ Strict-Transport-Security:
222
+ - max-age=31536000
223
+ Vary:
224
+ - Accept-Encoding
225
+ X-Frame-Options:
226
+ - SAMEORIGIN
227
+ X-Xss-Protection:
228
+ - 1; mode=block
229
+ Transfer-Encoding:
230
+ - chunked
231
+ Set-Cookie: ''
232
+ body:
233
+ encoding: UTF-8
234
+ string: '{"uuid": "e0ecd463-6c7c-40df-be7e-19851cb23d6c", "action": "DeviceRouter",
235
+ "result": {"disabled": false, "data": {"productionState": 400, "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
236
+ "links": "", "snmpContact": "", "osModel": "", "snmpVersion": "v2c", "hwModel":
237
+ "", "osManufacturer": "", "deviceClass": {"connectionInfo": ["zSnmpCommunity"],
238
+ "uuid": "948d8770-4c36-47b9-94f0-9139fa8f9e94", "name": "Server", "severity":
239
+ "warning", "id": "Server", "meta_type": "DeviceClass", "inspector_type": "DeviceClass",
240
+ "uid": "/zport/dmd/Devices/Server", "events": {"info": {"count": 22, "acknowledged_count":
241
+ 10}, "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count":
242
+ 1, "acknowledged_count": 0}, "critical": {"count": 0, "acknowledged_count":
243
+ 0}, "error": {"count": 0, "acknowledged_count": 0}, "debug": {"count": 0,
244
+ "acknowledged_count": 0}}, "description": ""}, "hwManufacturer": "", "docker_version":
245
+ "", "created_timestamp": 1550510987.859867, "renameInProgress": false, "collector":
246
+ "localhost", "id": "UnitTestDevice", "deviceConnectionInfo": "", "uptime":
247
+ "Unknown", "severity": "clear", "locking": {"updates": false, "deletion":
248
+ false, "events": false}, "comments": "", "name": "UnitTestDevice", "priority":
249
+ 3, "snmpCommunity": "", "location": "", "memory": {"ram": "Unknown", "swap":
250
+ "Unknown"}, "icon": "/zport/dmd/img/icons/server.png", "priorityLabel": "Normal",
251
+ "lastCollected": "Not Modeled", "events": {"info": {"count": 0, "acknowledged_count":
252
+ 0}, "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0,
253
+ "acknowledged_count": 0}, "critical": {"count": 0, "acknowledged_count": 0},
254
+ "error": {"count": 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count":
255
+ 0}}, "systems": [], "status": "", "ipAddressString": "", "description": "",
256
+ "snmpDescr": "", "groups": [], "device": "UnitTestDevice", "sshLink": "",
257
+ "firstSeen": 1550510987.859867, "snmpSysName": "", "pythonClass": "Products.ZenModel.Device",
258
+ "lastChanged": 1550535660.45533, "productionStateLabel": "Test", "serialNumber":
259
+ "", "uuid": "94251860-157a-4dd1-8386-33fa1db0d593", "tagNumber": "", "meta_type":
260
+ "Device", "inspector_type": "Device", "snmpLocation": "", "snmpAgent": "",
261
+ "ipAddress": "", "rackSlot": 0}, "success": true}, "tid": 6, "type": "rpc",
262
+ "method": "getInfo"}'
263
+ http_version:
264
+ recorded_at: Tue, 19 Feb 2019 22:36:50 GMT
265
+ recorded_with: VCR 4.0.0