hawkular-client 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -3
  3. data/CHANGES.rdoc +8 -0
  4. data/README.rdoc +12 -5
  5. data/hawkularclient.gemspec +2 -2
  6. data/lib/alerts/alerts_api.rb +193 -0
  7. data/lib/{hawkularclient.rb → hawkular.rb} +93 -52
  8. data/lib/hawkular_all.rb +7 -0
  9. data/lib/inventory/inventory_api.rb +378 -0
  10. data/lib/metrics/metric_api.rb +20 -10
  11. data/lib/metrics/metrics_client.rb +52 -0
  12. data/lib/metrics/tenant_api.rb +1 -1
  13. data/lib/metrics/version.rb +3 -1
  14. data/lib/version.rb +8 -0
  15. data/spec/integration/alerts_spec.rb +143 -0
  16. data/spec/integration/inventory_spec.rb +191 -0
  17. data/spec/integration/metric_spec.rb +33 -0
  18. data/spec/spec_helper.rb +14 -1
  19. data/spec/unit/base_spec.rb +57 -0
  20. data/spec/vcr_cassettes/Alert/Alerts/Should_acknowledge_an_alert.yml +183 -0
  21. data/spec/vcr_cassettes/Alert/Alerts/Should_fetch_single_alert.yml +69 -0
  22. data/spec/vcr_cassettes/Alert/Alerts/Should_list_alerts.yml +85 -0
  23. data/spec/vcr_cassettes/Alert/Alerts/Should_list_alerts_for_trigger.yml +142 -0
  24. data/spec/vcr_cassettes/Alert/Alerts/Should_list_alerts_for_unknown_trigger.yml +46 -0
  25. data/spec/vcr_cassettes/Alert/Alerts/Should_resolve_an_alert.yml +181 -0
  26. data/spec/vcr_cassettes/Alert/Alerts/Should_resolve_an_alert2.yml +49 -0
  27. data/spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers.yml +62 -0
  28. data/spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers_for_ID.yml +55 -0
  29. data/spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers_for_Tag.yml +68 -0
  30. data/spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers_for_Tags.yml +68 -0
  31. data/spec/vcr_cassettes/Alert/Triggers/Should_get_a_single_Trigger_with_conditions.yml +138 -0
  32. data/spec/vcr_cassettes/Alert/Triggers/Should_get_a_single_metric_Trigger.yml +50 -0
  33. data/spec/vcr_cassettes/Gauge_metrics/Platform_mem.yml +44 -0
  34. data/spec/vcr_cassettes/Gauge_metrics/Platform_mem_def.yml +45 -0
  35. data/spec/vcr_cassettes/Inventory/Should_List_datasources_with_no_props.yml +228 -0
  36. data/spec/vcr_cassettes/Inventory/Should_list_URLs.yml +105 -0
  37. data/spec/vcr_cassettes/Inventory/Should_list_WildFlys.yml +104 -0
  38. data/spec/vcr_cassettes/Inventory/Should_list_WildFlys_with_props.yml +162 -0
  39. data/spec/vcr_cassettes/Inventory/Should_list_children_of_WildFly.yml +180 -0
  40. data/spec/vcr_cassettes/Inventory/Should_list_feeds.yml +102 -0
  41. data/spec/vcr_cassettes/Inventory/Should_list_heap_metrics_for_WildFlys.yml +308 -0
  42. data/spec/vcr_cassettes/Inventory/Should_list_metrics_for_WildFlys.yml +172 -0
  43. data/spec/vcr_cassettes/Inventory/Should_list_types_with_bad_feed.yml +101 -0
  44. data/spec/vcr_cassettes/Inventory/Should_list_types_with_feed.yml +109 -0
  45. data/spec/vcr_cassettes/Inventory/Should_list_types_without_feed.yml +110 -0
  46. data/spec/vcr_cassettes/Metrics/Status.yml +44 -0
  47. data/spec/vcr_cassettes/No_Tenant/Should_fail.yml +42 -0
  48. data/spec/vcr_cassettes/Tenants/Should_Get_Tenant_For_Explicit_Credentials.yml +50 -0
  49. data/spec/vcr_cassettes/Tenants/Should_Get_Tenant_For_Implicit_Credentials.yml +50 -0
  50. metadata +74 -3
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://jdoe:password@localhost:8080/hawkular/inventory/tenant
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Content-Encoding:
24
+ - gzip
25
+ Expires:
26
+ - '0'
27
+ Cache-Control:
28
+ - no-cache, no-store, must-revalidate
29
+ X-Powered-By:
30
+ - Undertow/1
31
+ Server:
32
+ - WildFly/9
33
+ Pragma:
34
+ - no-cache
35
+ Date:
36
+ - Fri, 06 Nov 2015 13:21:12 GMT
37
+ Connection:
38
+ - keep-alive
39
+ Content-Type:
40
+ - application/json
41
+ Content-Length:
42
+ - '85'
43
+ body:
44
+ encoding: ASCII-8BIT
45
+ string: !binary |-
46
+ H4sIAAAAAAAAAKvmUlBQKkgsyVBSsFJQ0i+xNrIwMDJLMjbTtUhLNdE1MTY2
47
+ 0rUwSbbQNTUySTU0N040s0hKU9IB6cpMAeshSgNXLQAnmwH5aQAAAA==
48
+ http_version:
49
+ recorded_at: Fri, 06 Nov 2015 13:21:12 GMT
50
+ recorded_with: VCR 3.0.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hawkular-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Libor Zoubek
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-11-05 00:00:00.000000000 Z
13
+ date: 2016-02-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
@@ -144,16 +144,37 @@ files:
144
144
  - README.rdoc
145
145
  - Rakefile
146
146
  - hawkularclient.gemspec
147
- - lib/hawkularclient.rb
147
+ - lib/alerts/alerts_api.rb
148
+ - lib/hawkular.rb
149
+ - lib/hawkular_all.rb
150
+ - lib/inventory/inventory_api.rb
148
151
  - lib/metrics/metric_api.rb
152
+ - lib/metrics/metrics_client.rb
149
153
  - lib/metrics/tenant_api.rb
150
154
  - lib/metrics/types.rb
151
155
  - lib/metrics/version.rb
156
+ - lib/version.rb
152
157
  - spec/endpoint.yml
158
+ - spec/integration/alerts_spec.rb
159
+ - spec/integration/inventory_spec.rb
153
160
  - spec/integration/metric_spec.rb
154
161
  - spec/spec_helper.rb
162
+ - spec/unit/base_spec.rb
155
163
  - spec/unit/client_spec.rb
156
164
  - spec/vcr/vcr_setup.rb
165
+ - spec/vcr_cassettes/Alert/Alerts/Should_acknowledge_an_alert.yml
166
+ - spec/vcr_cassettes/Alert/Alerts/Should_fetch_single_alert.yml
167
+ - spec/vcr_cassettes/Alert/Alerts/Should_list_alerts.yml
168
+ - spec/vcr_cassettes/Alert/Alerts/Should_list_alerts_for_trigger.yml
169
+ - spec/vcr_cassettes/Alert/Alerts/Should_list_alerts_for_unknown_trigger.yml
170
+ - spec/vcr_cassettes/Alert/Alerts/Should_resolve_an_alert.yml
171
+ - spec/vcr_cassettes/Alert/Alerts/Should_resolve_an_alert2.yml
172
+ - spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers.yml
173
+ - spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers_for_ID.yml
174
+ - spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers_for_Tag.yml
175
+ - spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers_for_Tags.yml
176
+ - spec/vcr_cassettes/Alert/Triggers/Should_get_a_single_Trigger_with_conditions.yml
177
+ - spec/vcr_cassettes/Alert/Triggers/Should_get_a_single_metric_Trigger.yml
157
178
  - spec/vcr_cassettes/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml
158
179
  - spec/vcr_cassettes/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml
159
180
  - spec/vcr_cassettes/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml
@@ -162,15 +183,32 @@ files:
162
183
  - spec/vcr_cassettes/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml
163
184
  - spec/vcr_cassettes/Counter_metrics/Should_push_metric_data_to_existing_counter.yml
164
185
  - spec/vcr_cassettes/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml
186
+ - spec/vcr_cassettes/Gauge_metrics/Platform_mem.yml
187
+ - spec/vcr_cassettes/Gauge_metrics/Platform_mem_def.yml
165
188
  - spec/vcr_cassettes/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml
166
189
  - spec/vcr_cassettes/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml
167
190
  - spec/vcr_cassettes/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml
168
191
  - spec/vcr_cassettes/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml
169
192
  - spec/vcr_cassettes/Gauge_metrics/Should_return_periods.yml
170
193
  - spec/vcr_cassettes/Gauge_metrics/Should_update_tags_for_gauge_definition.yml
194
+ - spec/vcr_cassettes/Inventory/Should_List_datasources_with_no_props.yml
195
+ - spec/vcr_cassettes/Inventory/Should_list_URLs.yml
196
+ - spec/vcr_cassettes/Inventory/Should_list_WildFlys.yml
197
+ - spec/vcr_cassettes/Inventory/Should_list_WildFlys_with_props.yml
198
+ - spec/vcr_cassettes/Inventory/Should_list_children_of_WildFly.yml
199
+ - spec/vcr_cassettes/Inventory/Should_list_feeds.yml
200
+ - spec/vcr_cassettes/Inventory/Should_list_heap_metrics_for_WildFlys.yml
201
+ - spec/vcr_cassettes/Inventory/Should_list_metrics_for_WildFlys.yml
202
+ - spec/vcr_cassettes/Inventory/Should_list_types_with_bad_feed.yml
203
+ - spec/vcr_cassettes/Inventory/Should_list_types_with_feed.yml
204
+ - spec/vcr_cassettes/Inventory/Should_list_types_without_feed.yml
205
+ - spec/vcr_cassettes/Metrics/Status.yml
171
206
  - spec/vcr_cassettes/Mixed_metrics/Should_send_mixed_metric_request.yml
172
207
  - spec/vcr_cassettes/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml
208
+ - spec/vcr_cassettes/No_Tenant/Should_fail.yml
173
209
  - spec/vcr_cassettes/Simple/Should_be_Cool.yml
210
+ - spec/vcr_cassettes/Tenants/Should_Get_Tenant_For_Explicit_Credentials.yml
211
+ - spec/vcr_cassettes/Tenants/Should_Get_Tenant_For_Implicit_Credentials.yml
174
212
  - spec/vcr_cassettes/Tenants/Should_create_and_return_tenant.yml
175
213
  homepage: https://github.com/hawkular/hawkular-client-ruby
176
214
  licenses:
@@ -204,10 +242,26 @@ specification_version: 4
204
242
  summary: A Ruby client for Hawkular
205
243
  test_files:
206
244
  - spec/endpoint.yml
245
+ - spec/integration/alerts_spec.rb
246
+ - spec/integration/inventory_spec.rb
207
247
  - spec/integration/metric_spec.rb
208
248
  - spec/spec_helper.rb
249
+ - spec/unit/base_spec.rb
209
250
  - spec/unit/client_spec.rb
210
251
  - spec/vcr/vcr_setup.rb
252
+ - spec/vcr_cassettes/Alert/Alerts/Should_acknowledge_an_alert.yml
253
+ - spec/vcr_cassettes/Alert/Alerts/Should_fetch_single_alert.yml
254
+ - spec/vcr_cassettes/Alert/Alerts/Should_list_alerts.yml
255
+ - spec/vcr_cassettes/Alert/Alerts/Should_list_alerts_for_trigger.yml
256
+ - spec/vcr_cassettes/Alert/Alerts/Should_list_alerts_for_unknown_trigger.yml
257
+ - spec/vcr_cassettes/Alert/Alerts/Should_resolve_an_alert.yml
258
+ - spec/vcr_cassettes/Alert/Alerts/Should_resolve_an_alert2.yml
259
+ - spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers.yml
260
+ - spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers_for_ID.yml
261
+ - spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers_for_Tag.yml
262
+ - spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers_for_Tags.yml
263
+ - spec/vcr_cassettes/Alert/Triggers/Should_get_a_single_Trigger_with_conditions.yml
264
+ - spec/vcr_cassettes/Alert/Triggers/Should_get_a_single_metric_Trigger.yml
211
265
  - spec/vcr_cassettes/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml
212
266
  - spec/vcr_cassettes/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml
213
267
  - spec/vcr_cassettes/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml
@@ -216,14 +270,31 @@ test_files:
216
270
  - spec/vcr_cassettes/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml
217
271
  - spec/vcr_cassettes/Counter_metrics/Should_push_metric_data_to_existing_counter.yml
218
272
  - spec/vcr_cassettes/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml
273
+ - spec/vcr_cassettes/Gauge_metrics/Platform_mem.yml
274
+ - spec/vcr_cassettes/Gauge_metrics/Platform_mem_def.yml
219
275
  - spec/vcr_cassettes/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml
220
276
  - spec/vcr_cassettes/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml
221
277
  - spec/vcr_cassettes/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml
222
278
  - spec/vcr_cassettes/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml
223
279
  - spec/vcr_cassettes/Gauge_metrics/Should_return_periods.yml
224
280
  - spec/vcr_cassettes/Gauge_metrics/Should_update_tags_for_gauge_definition.yml
281
+ - spec/vcr_cassettes/Inventory/Should_List_datasources_with_no_props.yml
282
+ - spec/vcr_cassettes/Inventory/Should_list_URLs.yml
283
+ - spec/vcr_cassettes/Inventory/Should_list_WildFlys.yml
284
+ - spec/vcr_cassettes/Inventory/Should_list_WildFlys_with_props.yml
285
+ - spec/vcr_cassettes/Inventory/Should_list_children_of_WildFly.yml
286
+ - spec/vcr_cassettes/Inventory/Should_list_feeds.yml
287
+ - spec/vcr_cassettes/Inventory/Should_list_heap_metrics_for_WildFlys.yml
288
+ - spec/vcr_cassettes/Inventory/Should_list_metrics_for_WildFlys.yml
289
+ - spec/vcr_cassettes/Inventory/Should_list_types_with_bad_feed.yml
290
+ - spec/vcr_cassettes/Inventory/Should_list_types_with_feed.yml
291
+ - spec/vcr_cassettes/Inventory/Should_list_types_without_feed.yml
292
+ - spec/vcr_cassettes/Metrics/Status.yml
225
293
  - spec/vcr_cassettes/Mixed_metrics/Should_send_mixed_metric_request.yml
226
294
  - spec/vcr_cassettes/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml
295
+ - spec/vcr_cassettes/No_Tenant/Should_fail.yml
227
296
  - spec/vcr_cassettes/Simple/Should_be_Cool.yml
297
+ - spec/vcr_cassettes/Tenants/Should_Get_Tenant_For_Explicit_Credentials.yml
298
+ - spec/vcr_cassettes/Tenants/Should_Get_Tenant_For_Implicit_Credentials.yml
228
299
  - spec/vcr_cassettes/Tenants/Should_create_and_return_tenant.yml
229
300
  has_rdoc: