zenoss_client 0.6.1 → 0.10.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 (30) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +9 -7
  3. data/README.rdoc +0 -0
  4. data/VERSION +1 -1
  5. data/lib/zenoss.rb +1 -1
  6. data/lib/zenoss/connection.rb +1 -0
  7. data/lib/zenoss/events/event.rb +14 -2
  8. data/lib/zenoss/jsonapi/device_router.rb +30 -2
  9. data/lib/zenoss/jsonapi/events_router.rb +12 -0
  10. data/lib/zenoss/jsonapi/report_router.rb +6 -2
  11. data/lib/zenoss/model/devices/device.rb +6 -1
  12. data/lib/zenoss/model/z_device_loader.rb +1 -1
  13. data/test/fixtures/vcr_cassettes/6_2_1_initial_connection.yml +232 -0
  14. data/test/fixtures/vcr_cassettes/6_2_1_test_0001_returns_an_Array_of_devices_when_searched_by_name.yml +107 -0
  15. data/test/fixtures/vcr_cassettes/6_2_1_test_0002_returns_device_uptime_when_asked.yml +131 -0
  16. data/test/fixtures/vcr_cassettes/6_2_1_test_0003_returns_an_Array_of_events_for_a_device.yml +100 -0
  17. data/test/fixtures/vcr_cassettes/6_2_1_test_0004_returns_an_Array_of_historical_events_for_a_device.yml +100 -0
  18. data/test/fixtures/vcr_cassettes/6_2_1_test_0005_returns_info_for_a_device_in_the_form_of_a_Hash.yml +265 -0
  19. data/test/fixtures/vcr_cassettes/6_2_1_test_0006_returns_an_Array_of_events_for_all_devices.yml +100 -0
  20. data/test/fixtures/vcr_cassettes/6_2_1_test_0007_fetches_the_report_tree.yml +164 -0
  21. data/test/fixtures/vcr_cassettes/6_2_1_test_0008_fetches_available_report_types_and_returns_a_Hash.yml +100 -0
  22. data/test/fixtures/vcr_cassettes/6_2_1_test_0009_renames_the_device.yml +184 -0
  23. data/test/fixtures/vcr_cassettes/6_2_1_test_0010_sets_info_for_a_device.yml +100 -0
  24. data/test/fixtures/vcr_cassettes/6_2_1_test_0011_sets_info_for_a_device_on_a_device_object.yml +100 -0
  25. data/test/fixtures/vcr_cassettes/6_2_1_test_0012_remodels_a_device.yml +99 -0
  26. data/test/test_helper.rb +14 -0
  27. data/test/zenoss_client_test.rb +89 -3
  28. data/test/zenoss_model_device_test.rb +25 -0
  29. data/zenoss_client.gemspec +3 -3
  30. metadata +38 -115
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 981ffe9b6d5043244cd38fbf2edf62bdccbd62b9
4
- data.tar.gz: 80f7544773d814c72ccae5a3d2e657064e5af513
2
+ SHA256:
3
+ metadata.gz: c64cb525b567ce659a11d844a5b2d5d4e5212bdc799d320fa3134e3e3beee4d1
4
+ data.tar.gz: 1a3de47b44a7b48662d2b8135179f158d1d7fe06d204e587a063af2dcc7ef6e0
5
5
  SHA512:
6
- metadata.gz: a70d8df6d60198b6807bcc5ed44b89c80532961563f00684914abcdc4700d1459143d234519aac926b842eeeae4f5a378b8381973345347275355b76cc6e5497
7
- data.tar.gz: 8fb27680573b2bd8cc81f10bcf1700849d9acd784e963d58ea785fef9487c1bbc9204cfc05b90584ea13ac463e510f7dd31c04c3a0e002b8061d91bba9084dfc
6
+ metadata.gz: c8d2eeb2cdb2bd4db0e82b9888f6cc1d3d1c766f046bb87e4f6d7d5abc1297594136c1420cf438873b16ad3ee19e5cbf40367c1d9c869e9af76a0ebd44b0038f
7
+ data.tar.gz: 4f64c02de20bd54c98215cb93d0302f55d8b7f85e94ca65c676eb4ab240a7c935d2925ec0f93ce9904b3865959b1f9b7a67a26ac1f249fb2aec7e24cd69b9748
@@ -1,13 +1,15 @@
1
1
  language: ruby
2
2
  script: bundle exec rake test
3
3
  rvm:
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1.0
7
- - 2.2.0
8
- - ruby-head
9
- - jruby-head
4
+ - 2.0.0-p648
5
+ - 2.1.10
6
+ - 2.2.10
7
+ - 2.3.8
8
+ - 2.4.10
9
+ - 2.5.8
10
+ - 2.6.6
11
+ - 2.7.1
10
12
 
11
13
  install:
12
- - gem install bundler
14
+ - gem install bundler -v 1.17.3
13
15
  - bundle install --jobs=3 --retry=3
File without changes
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.1
1
+ 0.10.0
@@ -45,7 +45,7 @@ module Zenoss
45
45
  def plist_to_array(list)
46
46
  return nil if list.nil?
47
47
  list = sanitize_str(list)
48
- (list.gsub /[\[\]]/,'').split /,\s+/
48
+ list.gsub(/[\[\]]/, '').split(/,\s+/)
49
49
  end
50
50
 
51
51
  # Some of the REST methods return Strings that are formated like a Python list.
@@ -32,6 +32,7 @@ module Zenoss
32
32
  include Zenoss::RESTAPI
33
33
 
34
34
  def initialize(url, user, pass, opts = {}, &block)
35
+ @zenoss_version = opts[:version]
35
36
  @zenoss_uri = (url.is_a?(URI) ? url : URI.parse(url))
36
37
  @request_number = 1
37
38
  @httpcli = HTTPClient.new
@@ -28,8 +28,20 @@ module Zenoss
28
28
  def initialize(zenoss,zhash)
29
29
  @zenoss = zenoss
30
30
  super zhash
31
- self.firstTime = DateTime.parse(self.firstTime) if self.firstTime
32
- self.lastTime = DateTime.parse(self.lastTime) if self.lastTime
31
+ self.firstTime &&= convert_time(self.firstTime)
32
+ self.lastTime &&= convert_time(self.lastTime)
33
+ end
34
+
35
+ # Converts a string or float to a Time object
36
+ # Zenoss version 4 emits the time format as a string
37
+ # Zenoss version 6 emits the time as a float
38
+ # @return[Time]
39
+ def convert_time(time)
40
+ if time.is_a?(String)
41
+ Time.parse(time)
42
+ else
43
+ Time.at(time)
44
+ end
33
45
  end
34
46
 
35
47
  def detail(history = false)
@@ -51,14 +51,42 @@ module Zenoss
51
51
  end
52
52
 
53
53
  def get_templates(device_id)
54
- resp = json_request('DeviceRouter', 'getTemplates', [{:id => device_id}])
54
+ json_request('DeviceRouter', 'getTemplates', [{:id => device_id}])
55
55
  end
56
56
 
57
57
  def get_info(device_id, keys = nil)
58
58
  data = {}
59
59
  data[:uid] = device_id
60
60
  data[:keys] = keys if keys
61
- resp = json_request('DeviceRouter', 'getInfo', [data])
61
+ json_request('DeviceRouter', 'getInfo', [data])
62
+ end
63
+
64
+ # @param [Hash] opts arguments to pass to setInfo
65
+ # @option opts [String] :uid required; device id in Zenoss
66
+ def set_info(opts = {})
67
+ if @zenoss_version && @zenoss_version > '6'
68
+ json_request('DeviceRouter', 'setInfo', [opts])
69
+ else
70
+ raise ZenossError, 'setInfo method on DeviceRouter is only allowed '\
71
+ 'for version 6 and above'
72
+ end
73
+ end
74
+
75
+ # @param [String] uid required; device id in Zenoss
76
+ # @param [String] plugins takes a string. A plugin respresents a Modeler
77
+ # plugin such as cisco.snmp.Interfaces
78
+ # @param [Boolean] background whether to schedule a job in background
79
+ def remodel(uid, plugins = nil, background = false)
80
+ if @zenoss_version && @zenoss_version > '6'
81
+ data = {}
82
+ data[:deviceUid] = uid
83
+ data[:collectPlugins] = plugins || ''
84
+ data[:background] = background
85
+ json_request('DeviceRouter', 'remodel', [data])
86
+ else
87
+ raise ZenossError, 'remodel method on DeviceRouter is only allowed '\
88
+ 'for version 6 and above'
89
+ end
62
90
  end
63
91
 
64
92
  # =============== Non-API Helper methods ===============
@@ -57,7 +57,19 @@ module Zenoss
57
57
  events
58
58
  end
59
59
 
60
+ # @param [Hash] data evids that should be closed
61
+ # @option data [Array] :evids Array of evids that is closed
62
+ def close_events(data = {})
63
+ json_request('EventsRouter', 'close', [data])
64
+ end
60
65
 
66
+ # @param [Hash] data data specifying event that should have a logmessage appended
67
+ # @option data [String] :evid evid that message should be appended to
68
+ # @option data [String] :message text that should be appended to the event log
69
+ def write_log(data= {})
70
+ json_request('EventsRouter','write_log', [data])
71
+ end
72
+
61
73
  # @param [String] uid the uid to query events for. If this isn't specified
62
74
  # the query may take a very long time
63
75
  # @param [Hash] opts misc options to limit/filter events
@@ -22,11 +22,15 @@ module Zenoss
22
22
  module ReportRouter
23
23
 
24
24
  def get_report_types
25
- resp = json_request('ReportRouter', 'getReportTypes')
25
+ json_request('ReportRouter', 'getReportTypes')
26
26
  end
27
27
 
28
28
  def get_report_tree(id = '/zport/dmd/Reports')
29
- resp = json_request('ReportRouter', 'getTree', [{:id => id}])
29
+ if @zenoss_version && @zenoss_version > '6'
30
+ json_request('ReportRouter', 'asyncGetTree', [id])
31
+ else
32
+ json_request('ReportRouter', 'getTree', [{:id => id}])
33
+ end
30
34
  end
31
35
 
32
36
  end # ReportRouter
@@ -50,6 +50,11 @@ module Zenoss
50
50
  @zenoss.get_info(self.uid, keys)
51
51
  end
52
52
 
53
+ def set_info(opts = {})
54
+ opts[:uid] = self.uid
55
+ @zenoss.set_info(opts)
56
+ end
57
+
53
58
  # ------------------ Legacy REST Calls ------------------ #
54
59
 
55
60
  # Move this Device to the given DeviceClass.
@@ -181,7 +186,7 @@ module Zenoss
181
186
  components = rest(method)
182
187
 
183
188
  # Turn the return string into an array of components
184
- (components.gsub /[\[\]]/,'').split /,\s+/
189
+ components.gsub(/[\[\]]/, '').split(/,\s+/)
185
190
  end
186
191
 
187
192
  # Return list of all DeviceComponents on this device
@@ -48,7 +48,7 @@ module Zenoss
48
48
  def add_system(system_path)
49
49
  method = "addSystem?newSystemPath=#{system_path}"
50
50
  rest(method)
51
- sys = System.new("/Systems/#{system_path}")
51
+ System.new("/Systems/#{system_path}")
52
52
  end
53
53
 
54
54
 
@@ -0,0 +1,232 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost:8080/zport/dmd/zport/acl_users/cookieAuthHelper/login
6
+ body:
7
+ encoding: UTF-8
8
+ string: __ac_name=admin&__ac_password=zenoss&submitted=true&came_from=http://localhost:8080/zport/dmd
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
+ - Wed, 15 Apr 2020 20:38:47 GMT
16
+ Content-Type:
17
+ - application/x-www-form-urlencoded
18
+ Cookie: ''
19
+ response:
20
+ status:
21
+ code: 302
22
+ message: Found
23
+ headers:
24
+ Content-Length:
25
+ - '25'
26
+ Content-Type:
27
+ - text/plain; charset=utf-8
28
+ Date:
29
+ - Wed, 15 Apr 2020 20:38:50 GMT
30
+ Location:
31
+ - "/zport/dmd?submitted=true"
32
+ Server: ''
33
+ Set-Cookie: ''
34
+ Strict-Transport-Security:
35
+ - max-age=31536000
36
+ X-Frame-Options:
37
+ - SAMEORIGIN
38
+ X-Xss-Protection:
39
+ - 1; mode=block
40
+ body:
41
+ encoding: UTF-8
42
+ string: "/zport/dmd?submitted=true"
43
+ http_version:
44
+ recorded_at: Wed, 15 Apr 2020 20:38:51 GMT
45
+ - request:
46
+ method: post
47
+ uri: http://localhost:8080/zport/dmd//zport/dmd?submitted=true
48
+ body:
49
+ encoding: UTF-8
50
+ string: __ac_name=admin&__ac_password=zenoss&submitted=true&came_from=http://localhost:8080/zport/dmd
51
+ headers:
52
+ User-Agent:
53
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
54
+ Accept:
55
+ - "*/*"
56
+ Date:
57
+ - Wed, 15 Apr 2020 20:38:51 GMT
58
+ Content-Type:
59
+ - application/x-www-form-urlencoded
60
+ Cookie: ''
61
+ response:
62
+ status:
63
+ code: 200
64
+ message: OK
65
+ headers:
66
+ Cache-Control:
67
+ - max-age=0, no-cache
68
+ Content-Type:
69
+ - text/html; charset=utf-8
70
+ Date:
71
+ - Wed, 15 Apr 2020 20:38:51 GMT
72
+ Server: ''
73
+ Set-Cookie: ''
74
+ Strict-Transport-Security:
75
+ - max-age=31536000
76
+ Vary:
77
+ - Accept-Encoding
78
+ X-Frame-Options:
79
+ - SAMEORIGIN
80
+ X-Page-Speed:
81
+ - 1.11.33.4-0
82
+ X-Xss-Protection:
83
+ - 1; mode=block
84
+ Transfer-Encoding:
85
+ - chunked
86
+ body:
87
+ encoding: UTF-8
88
+ string: "\\n\\n <!DOCTYPE html>\\n<html>\\n"
89
+ http_version:
90
+ recorded_at: Wed, 15 Apr 2020 20:38:52 GMT
91
+ - request:
92
+ method: post
93
+ uri: http://localhost:8080/zport/dmd/zport/dmd/device_router
94
+ body:
95
+ encoding: UTF-8
96
+ string: __ac_name=admin&__ac_password=zenoss&submitted=true&came_from=https%3A%2F%2Fhttp:://localhost:8080/zport/dmd%2Fzport%2Fdmd
97
+ headers:
98
+ User-Agent:
99
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
100
+ Accept:
101
+ - "*/*"
102
+ Date:
103
+ - Wed, 15 Apr 2020 20:38:52 GMT
104
+ Content-Type:
105
+ - application/json; charset=utf-8
106
+ Cookie: ''
107
+ response:
108
+ status:
109
+ code: 200
110
+ message: OK
111
+ headers:
112
+ Content-Type:
113
+ - application/json
114
+ Date:
115
+ - Wed, 15 Apr 2020 20:38:54 GMT
116
+ Server: ''
117
+ Strict-Transport-Security:
118
+ - max-age=31536000
119
+ Vary:
120
+ - Accept-Encoding
121
+ X-Frame-Options:
122
+ - SAMEORIGIN
123
+ X-Xss-Protection:
124
+ - 1; mode=block
125
+ Content-Length:
126
+ - '309'
127
+ Set-Cookie: ''
128
+ body:
129
+ encoding: UTF-8
130
+ string: '{"uuid": "a34caf64-2209-480c-96ed-dd94117ef7ac", "action": "DeviceRouter",
131
+ "result": {"new_jobs": [{"uuid": "b0c01851-394f-49a1-8547-acd02633194e", "description":
132
+ "Create UnitTestDevice under /Devices/Server", "uid": "/zport/dmd/JobManager"}],
133
+ "success": true}, "tid": 1, "type": "rpc", "method": "addDevice"}'
134
+ http_version:
135
+ recorded_at: Wed, 15 Apr 2020 20:38:54 GMT
136
+ - request:
137
+ method: post
138
+ uri: http://localhost:8080/zport/dmd/zport/dmd/device_router
139
+ body:
140
+ encoding: UTF-8
141
+ string: __ac_name=admin&__ac_password=zenoss&submitted=true&came_from=https%3A%2F%2Fhttp:://localhost:8080/zport/dmd%2Fzport%2Fdmd
142
+ headers:
143
+ User-Agent:
144
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
145
+ Accept:
146
+ - "*/*"
147
+ Date:
148
+ - Wed, 15 Apr 2020 20:38:54 GMT
149
+ Content-Type:
150
+ - application/json; charset=utf-8
151
+ Cookie: ''
152
+ response:
153
+ status:
154
+ code: 200
155
+ message: OK
156
+ headers:
157
+ Content-Type:
158
+ - application/json
159
+ Date:
160
+ - Wed, 15 Apr 2020 20:38:54 GMT
161
+ Server: ''
162
+ Strict-Transport-Security:
163
+ - max-age=31536000
164
+ Vary:
165
+ - Accept-Encoding
166
+ X-Frame-Options:
167
+ - SAMEORIGIN
168
+ X-Xss-Protection:
169
+ - 1; mode=block
170
+ Content-Length:
171
+ - '197'
172
+ Set-Cookie: ''
173
+ body:
174
+ encoding: UTF-8
175
+ string: '{"uuid": "48c067ba-5c1e-4d81-aac0-3c49aadba9fc", "action": "DeviceRouter",
176
+ "result": {"totalCount": 0, "hash": "0", "success": true, "devices": []},
177
+ "tid": 2, "type": "rpc", "method": "getDevices"}'
178
+ http_version:
179
+ recorded_at: Wed, 15 Apr 2020 20:38:54 GMT
180
+ - request:
181
+ method: post
182
+ uri: http://localhost:8080/zport/dmd/zport/dmd/device_router
183
+ body:
184
+ encoding: UTF-8
185
+ string: __ac_name=admin&__ac_password=zenoss&submitted=true&came_from=https%3A%2F%2Fhttp:://localhost:8080/zport/dmd%2Fzport%2Fdmd
186
+ headers:
187
+ User-Agent:
188
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.3 (2016-11-21))
189
+ Accept:
190
+ - "*/*"
191
+ Date:
192
+ - Wed, 15 Apr 2020 20:39:09 GMT
193
+ Content-Type:
194
+ - application/json; charset=utf-8
195
+ Cookie: ''
196
+ response:
197
+ status:
198
+ code: 200
199
+ message: OK
200
+ headers:
201
+ Content-Type:
202
+ - application/json
203
+ Date:
204
+ - Wed, 15 Apr 2020 20:39:11 GMT
205
+ Server: ''
206
+ Strict-Transport-Security:
207
+ - max-age=31536000
208
+ Vary:
209
+ - Accept-Encoding
210
+ X-Frame-Options:
211
+ - SAMEORIGIN
212
+ X-Xss-Protection:
213
+ - 1; mode=block
214
+ Content-Length:
215
+ - '905'
216
+ Set-Cookie: ''
217
+ body:
218
+ encoding: UTF-8
219
+ string: '{"uuid": "91ffde13-d44b-4a5e-9846-2155070ba803", "action": "DeviceRouter",
220
+ "result": {"totalCount": 1, "hash": "1", "success": true, "devices": [{"ipAddressString":
221
+ null, "serialNumber": "", "pythonClass": "Products.ZenModel.Device", "hwManufacturer":
222
+ null, "collector": "localhost", "osModel": null, "productionState": 1000,
223
+ "systems": [], "priority": 3, "hwModel": null, "tagNumber": "", "osManufacturer":
224
+ null, "location": null, "groups": [], "uid": "/zport/dmd/Devices/Server/devices/UnitTestDevice",
225
+ "ipAddress": null, "events": {"info": {"count": 0, "acknowledged_count": 0},
226
+ "clear": {"count": 0, "acknowledged_count": 0}, "warning": {"count": 0, "acknowledged_count":
227
+ 0}, "critical": {"count": 0, "acknowledged_count": 0}, "error": {"count":
228
+ 0, "acknowledged_count": 0}, "debug": {"count": 0, "acknowledged_count": 0}},
229
+ "name": "UnitTestDevice"}]}, "tid": 3, "type": "rpc", "method": "getDevices"}'
230
+ http_version:
231
+ recorded_at: Wed, 15 Apr 2020 20:39:11 GMT
232
+ recorded_with: VCR 4.0.0
@@ -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