zenoss_client 0.8.0 → 0.9.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.
- checksums.yaml +5 -5
- data/.travis.yml +1 -1
- data/VERSION +1 -1
- data/lib/zenoss/connection.rb +1 -0
- data/lib/zenoss/jsonapi/report_router.rb +5 -1
- data/test/fixtures/vcr_cassettes/6_2_1_initial_connection.yml +188 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0001_returns_an_Array_of_devices_when_searched_by_name.yml +107 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0002_returns_device_uptime_when_asked.yml +131 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0003_returns_an_Array_of_events_for_a_device.yml +100 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0004_returns_an_Array_of_historical_events_for_a_device.yml +100 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0005_returns_info_for_a_device_in_the_form_of_a_Hash.yml +265 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0006_returns_an_Array_of_events_for_all_devices.yml +100 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0007_fetches_the_report_tree.yml +164 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0008_fetches_available_report_types_and_returns_a_Hash.yml +100 -0
- data/test/fixtures/vcr_cassettes/6_2_1_test_0009_renames_the_device.yml +184 -0
- data/test/test_helper.rb +14 -0
- data/test/zenoss_client_test.rb +3 -1
- metadata +13 -3
data/test/test_helper.rb
CHANGED
|
@@ -17,4 +17,18 @@ WebMock.enable!
|
|
|
17
17
|
VCR.configure do |config|
|
|
18
18
|
config.cassette_library_dir = "test/fixtures/vcr_cassettes"
|
|
19
19
|
config.hook_into :webmock
|
|
20
|
+
|
|
21
|
+
config.filter_sensitive_data('admin') { ZENOSS_USER }
|
|
22
|
+
config.filter_sensitive_data('http://localhost:8080/zport/dmd') { ZENOSS_URL }
|
|
23
|
+
config.filter_sensitive_data('zenoss') { ZENOSS_PASSWORD }
|
|
24
|
+
|
|
25
|
+
config.before_record do |interaction, cassette|
|
|
26
|
+
if cassette.name == '6.2.1_initial connection'
|
|
27
|
+
interaction.request.body = '__ac_name=admin&__ac_password=zenoss'\
|
|
28
|
+
'&submitted=true&came_from=https%3A%2F'\
|
|
29
|
+
'%2Fhttp:://localhost:8080/zport/dmd'\
|
|
30
|
+
'%2Fzport%2Fdmd'
|
|
31
|
+
end
|
|
32
|
+
end
|
|
20
33
|
end
|
|
34
|
+
|
data/test/zenoss_client_test.rb
CHANGED
|
@@ -11,7 +11,9 @@ describe Zenoss do
|
|
|
11
11
|
def self.zen
|
|
12
12
|
VCR.use_cassette "#{ZENOSS_VERSION}_initial connection", :match_requests_on => [:method, :path, :query] do
|
|
13
13
|
@zen ||= begin
|
|
14
|
-
|
|
14
|
+
opts = {}
|
|
15
|
+
opts[:version] = ZENOSS_VERSION
|
|
16
|
+
connection = Zenoss.connect ZENOSS_URL, ZENOSS_USER, ZENOSS_PASSWORD, opts
|
|
15
17
|
# We Need to Create A Device for testing
|
|
16
18
|
# We do this here, so we can re-use the same device over and over
|
|
17
19
|
# Without needing to create a new one per test
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zenoss_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dan Wanek
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2019-03-08 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: httpclient
|
|
@@ -195,6 +195,16 @@ files:
|
|
|
195
195
|
- test/fixtures/vcr_cassettes/4_2_5_test_0007_fetches_the_report_tree.yml
|
|
196
196
|
- test/fixtures/vcr_cassettes/4_2_5_test_0008_fetches_available_report_types_and_returns_a_Hash.yml
|
|
197
197
|
- test/fixtures/vcr_cassettes/4_2_5_test_0009_renames_the_device.yml
|
|
198
|
+
- test/fixtures/vcr_cassettes/6_2_1_initial_connection.yml
|
|
199
|
+
- test/fixtures/vcr_cassettes/6_2_1_test_0001_returns_an_Array_of_devices_when_searched_by_name.yml
|
|
200
|
+
- test/fixtures/vcr_cassettes/6_2_1_test_0002_returns_device_uptime_when_asked.yml
|
|
201
|
+
- test/fixtures/vcr_cassettes/6_2_1_test_0003_returns_an_Array_of_events_for_a_device.yml
|
|
202
|
+
- test/fixtures/vcr_cassettes/6_2_1_test_0004_returns_an_Array_of_historical_events_for_a_device.yml
|
|
203
|
+
- test/fixtures/vcr_cassettes/6_2_1_test_0005_returns_info_for_a_device_in_the_form_of_a_Hash.yml
|
|
204
|
+
- test/fixtures/vcr_cassettes/6_2_1_test_0006_returns_an_Array_of_events_for_all_devices.yml
|
|
205
|
+
- test/fixtures/vcr_cassettes/6_2_1_test_0007_fetches_the_report_tree.yml
|
|
206
|
+
- test/fixtures/vcr_cassettes/6_2_1_test_0008_fetches_available_report_types_and_returns_a_Hash.yml
|
|
207
|
+
- test/fixtures/vcr_cassettes/6_2_1_test_0009_renames_the_device.yml
|
|
198
208
|
- test/test_helper.rb
|
|
199
209
|
- test/zenoss_client_test.rb
|
|
200
210
|
- tools/callZenossMethod.py
|
|
@@ -223,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
223
233
|
version: '0'
|
|
224
234
|
requirements: []
|
|
225
235
|
rubyforge_project:
|
|
226
|
-
rubygems_version: 2.
|
|
236
|
+
rubygems_version: 2.5.2.3
|
|
227
237
|
signing_key:
|
|
228
238
|
specification_version: 4
|
|
229
239
|
summary: A wrapper around the Zenoss JSON and REST APIs
|