hawkular-client 0.2.2 → 1.0.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 (108) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -0
  3. data/.yardopts +1 -0
  4. data/CHANGES.rdoc +17 -4
  5. data/README.rdoc +15 -6
  6. data/api_breaking_changes.rdoc +79 -0
  7. data/hawkularclient.gemspec +6 -5
  8. data/lib/{alerts → hawkular/alerts}/alerts_api.rb +168 -7
  9. data/lib/{hawkular.rb → hawkular/base_client.rb} +7 -44
  10. data/lib/hawkular/hawkular_client.rb +60 -0
  11. data/lib/hawkular/hawkular_client_utils.rb +40 -0
  12. data/lib/{inventory → hawkular/inventory}/inventory_api.rb +167 -142
  13. data/lib/{metrics → hawkular/metrics}/metric_api.rb +1 -0
  14. data/lib/{metrics → hawkular/metrics}/metrics_client.rb +4 -4
  15. data/lib/{metrics → hawkular/metrics}/tenant_api.rb +0 -0
  16. data/lib/{metrics → hawkular/metrics}/types.rb +0 -0
  17. data/lib/{operations → hawkular/operations}/operations_api.rb +11 -8
  18. data/lib/{tokens → hawkular/tokens}/tokens_api.rb +1 -1
  19. data/lib/{version.rb → hawkular/version.rb} +1 -1
  20. data/spec/integration/alerts_spec.rb +200 -0
  21. data/spec/integration/hawkular_client_spec.rb +228 -0
  22. data/spec/integration/inventory_spec.rb +246 -160
  23. data/spec/integration/metric_spec.rb +52 -59
  24. data/spec/integration/operations_spec.rb +53 -29
  25. data/spec/spec_helper.rb +109 -8
  26. data/spec/unit/base_spec.rb +9 -0
  27. data/spec/unit/canonical_path_spec.rb +2 -2
  28. data/spec/vcr/vcr_setup.rb +6 -0
  29. data/spec/vcr_cassettes/Alert/Events/Should_create_an_event.yml +50 -0
  30. data/spec/vcr_cassettes/Alert/Groups/Should_operate_a_complex_group_trigger.yml +1726 -0
  31. data/spec/vcr_cassettes/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +190 -0
  32. data/spec/vcr_cassettes/Counter_metrics/Should_get_metrics_with_limit_and_order.yml +30 -42
  33. data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_both_create_and_delete_feed.yml +287 -0
  34. data/spec/vcr_cassettes/{Inventory/Should_list_URLs.yml → HawkularClient/and_Inventory_client/Should_both_list_WildFlys.yml} +35 -33
  35. data/spec/vcr_cassettes/{Inventory/Should_list_types_with_bad_feed.yml → HawkularClient/and_Inventory_client/Should_both_list_types_with_bad_feed.yml} +16 -19
  36. data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_list_same_types_when_param_is_given.yml +245 -0
  37. data/spec/vcr_cassettes/{Inventory/Should_list_feeds.yml → HawkularClient/and_Inventory_client/Should_list_the_same_feeds.yml} +20 -20
  38. data/spec/vcr_cassettes/HawkularClient/and_Inventory_client/Should_list_the_same_resource_types.yml +249 -0
  39. data/spec/vcr_cassettes/HawkularClient/and_Metrics_client/Should_both_create_and_retrieve_tags_for_Availability.yml +155 -0
  40. data/spec/vcr_cassettes/HawkularClient/and_Metrics_client/Should_both_create_and_return_Availability_using_Hash_parameter.yml +155 -0
  41. data/spec/vcr_cassettes/HawkularClient/and_Metrics_client/Should_both_return_the_version.yml +89 -0
  42. data/spec/vcr_cassettes/HawkularClient/and_Metrics_client/Should_both_work_the_same_way_when_pushing_metric_data_to_non-existing_counter.yml +114 -0
  43. data/spec/vcr_cassettes/{Inventory/Should_list_WildFlys_with_props.yml → HawkularClient/and_Operations_client/Should_both_work_the_same_way.yml} +28 -50
  44. data/spec/vcr_cassettes/HawkularClient/and_Operations_client_Should_both_work_the_same_way.json +44 -0
  45. data/spec/vcr_cassettes/Inventory/Helpers/create_url.yml +48 -0
  46. data/spec/vcr_cassettes/Inventory/Helpers/generate_some_events_for_websocket.yml +4446 -0
  47. data/spec/vcr_cassettes/Inventory/Helpers/get_feeds.yml +54 -0
  48. data/spec/vcr_cassettes/Inventory/Templates/Client_should_listen_on_various_inventory_events.json +47 -0
  49. data/spec/vcr_cassettes/Inventory/{Should_create_a_resourcetype.yml → Templates/Client_should_listen_on_various_inventory_events.yml} +47 -61
  50. data/spec/vcr_cassettes/Inventory/Templates/Helpers/generate_some_events_for_websocket.yml +542 -0
  51. data/spec/vcr_cassettes/Inventory/{Should_List_datasources_with_no_props.yml → Templates/Should_List_datasources_with_no_props.yml} +26 -85
  52. data/spec/vcr_cassettes/Inventory/Templates/Should_create_a_feed.yml +54 -0
  53. data/spec/vcr_cassettes/Inventory/Templates/Should_create_a_feed_again.yml +164 -0
  54. data/spec/vcr_cassettes/Inventory/{Should_create_a_nested_resource_and_metric_on_it.yml → Templates/Should_create_a_nested_resource_and_metric_on_it.yml} +93 -74
  55. data/spec/vcr_cassettes/Inventory/{Should_create_a_resource_.yml → Templates/Should_create_a_resource.yml} +103 -76
  56. data/spec/vcr_cassettes/Inventory/{Should_create_a_resource_with_metric.yml → Templates/Should_create_a_resource_with_metric.yml} +91 -197
  57. data/spec/vcr_cassettes/Inventory/Templates/Should_create_a_resourcetype.yml +154 -0
  58. data/spec/vcr_cassettes/Inventory/Templates/Should_create_and_delete_feed.yml +145 -0
  59. data/spec/vcr_cassettes/Inventory/{Should_create_and_get_a_resource.yml → Templates/Should_create_and_get_a_resource.yml} +35 -20
  60. data/spec/vcr_cassettes/Inventory/Templates/Should_list_URLs.yml +65 -0
  61. data/spec/vcr_cassettes/Inventory/Templates/Should_list_WildFlys.yml +61 -0
  62. data/spec/vcr_cassettes/Inventory/{Should_list_WildFlys.yml → Templates/Should_list_WildFlys_with_props.yml} +36 -33
  63. data/spec/vcr_cassettes/Inventory/Templates/Should_list_all_the_resource_types.yml +126 -0
  64. data/spec/vcr_cassettes/Inventory/{Should_list_children_of_WildFly.yml → Templates/Should_list_children_of_WildFly.yml} +66 -112
  65. data/spec/vcr_cassettes/Inventory/{Should_list_children_of_nested_resource.yml → Templates/Should_list_children_of_nested_resource.yml} +13 -13
  66. data/spec/vcr_cassettes/Inventory/Templates/Should_list_feeds.yml +54 -0
  67. data/spec/vcr_cassettes/Inventory/Templates/Should_list_heap_metrics_for_WildFlys.yml +712 -0
  68. data/spec/vcr_cassettes/Inventory/Templates/Should_list_metrics_for_WildFlys.yml +278 -0
  69. data/spec/vcr_cassettes/Inventory/Templates/Should_list_metrics_of_given_metric_type.yml +530 -0
  70. data/spec/vcr_cassettes/Inventory/Templates/Should_list_metrics_of_given_resource_type.yml +278 -0
  71. data/spec/vcr_cassettes/Inventory/Templates/Should_list_operation_definitions_of_given_resource.yml +185 -0
  72. data/spec/vcr_cassettes/Inventory/Templates/Should_list_operation_definitions_of_given_resource_type.yml +126 -0
  73. data/spec/vcr_cassettes/Inventory/Templates/Should_list_recursive_children_of_WildFly.yml +2369 -0
  74. data/spec/vcr_cassettes/Inventory/Templates/Should_list_relationships_of_WildFly.yml +415 -0
  75. data/spec/vcr_cassettes/Inventory/Templates/Should_list_types_with_bad_feed.yml +51 -0
  76. data/spec/vcr_cassettes/Inventory/Templates/Should_list_types_with_feed.yml +124 -0
  77. data/spec/vcr_cassettes/Inventory/{Should_not_find_an_unknown_resource.yml → Templates/Should_not_find_an_unknown_resource.yml} +14 -13
  78. data/spec/vcr_cassettes/Inventory/{Should_return_config_data_of_given_nested_resource.yml → Templates/Should_return_config_data_of_given_nested_resource.yml} +4 -4
  79. data/spec/vcr_cassettes/Inventory/{Should_return_config_data_of_given_resource.yml → Templates/Should_return_config_data_of_given_resource.yml} +4 -4
  80. data/spec/vcr_cassettes/Inventory/Tenants/Should_Get_Tenant_For_Explicit_Credentials.yml +50 -0
  81. data/spec/vcr_cassettes/Inventory/Tenants/Should_Get_Tenant_For_Implicit_Credentials.yml +50 -0
  82. data/spec/vcr_cassettes/Operation/Helpers/get_feed.yml +54 -0
  83. data/spec/vcr_cassettes/Operation/Helpers/get_tenant.yml +50 -0
  84. data/spec/vcr_cassettes/Operation/Operation/Add_JDBC_driver_should_add_the_driver.json +26 -0
  85. data/spec/vcr_cassettes/Operation/Operation/Add_datasource_should_be_doable.json +26 -0
  86. data/spec/vcr_cassettes/Operation/Operation/Add_deployment_should_be_doable.json +26 -0
  87. data/spec/vcr_cassettes/Operation/Operation/Redeploy_can_be_run_multiple_times_in_parallel.json +40 -0
  88. data/spec/vcr_cassettes/Operation/Operation/Redeploy_should_be_performed_and_eventually_respond_with_success.json +26 -0
  89. data/spec/vcr_cassettes/Operation/Operation/Redeploy_should_not_be_performed_if_resource_path_is_wrong.json +26 -0
  90. data/spec/vcr_cassettes/Operation/Operation/Remove_JDBC_driver_should_be_performed_and_eventually_respond_with_success.json +26 -0
  91. data/spec/vcr_cassettes/Operation/Operation/Remove_datasource_should_be_performed_and_eventually_respond_with_success.json +26 -0
  92. data/spec/vcr_cassettes/Operation/Operation/Remove_deployment_should_be_performed_and_eventually_respond_with_success.json +26 -0
  93. data/spec/vcr_cassettes/Operation/Operation/Undeploy_should_be_performed_and_eventually_respond_with_success.json +26 -0
  94. data/spec/vcr_cassettes/Operation/Operation/should_not_be_possible_to_perform_on_closed_client.json +12 -0
  95. data/spec/vcr_cassettes/Operation/Websocket_connection/should_be_established.json +9 -0
  96. metadata +171 -72
  97. data/lib/hawkular_all.rb +0 -9
  98. data/spec/vcr_cassettes/Inventory/Should_create_a_feed.yml +0 -107
  99. data/spec/vcr_cassettes/Inventory/Should_create_a_feed_again.yml +0 -211
  100. data/spec/vcr_cassettes/Inventory/Should_create_and_delete_feed.yml +0 -201
  101. data/spec/vcr_cassettes/Inventory/Should_list_all_the_resource_types.yml +0 -177
  102. data/spec/vcr_cassettes/Inventory/Should_list_heap_metrics_for_WildFlys.yml +0 -775
  103. data/spec/vcr_cassettes/Inventory/Should_list_metrics_for_WildFlys.yml +0 -333
  104. data/spec/vcr_cassettes/Inventory/Should_list_metrics_of_given_metric_type.yml +0 -613
  105. data/spec/vcr_cassettes/Inventory/Should_list_metrics_of_given_resource_type.yml +0 -333
  106. data/spec/vcr_cassettes/Inventory/Should_list_recursive_children_of_WildFly.yml +0 -2064
  107. data/spec/vcr_cassettes/Inventory/Should_list_relationships_of_WildFly.yml +0 -460
  108. data/spec/vcr_cassettes/Inventory/Should_list_types_with_feed.yml +0 -175
@@ -22,8 +22,6 @@ http_interactions:
22
22
  code: 409
23
23
  message: Conflict
24
24
  headers:
25
- Content-Encoding:
26
- - gzip
27
25
  Expires:
28
26
  - '0'
29
27
  Cache-Control:
@@ -35,27 +33,36 @@ http_interactions:
35
33
  Pragma:
36
34
  - no-cache
37
35
  Date:
38
- - Fri, 19 Feb 2016 10:41:32 GMT
36
+ - Thu, 05 May 2016 11:18:45 GMT
39
37
  Connection:
40
38
  - keep-alive
41
39
  Content-Type:
42
40
  - application/json
43
41
  Content-Length:
44
- - '370'
42
+ - '747'
45
43
  body:
46
44
  encoding: ASCII-8BIT
47
- string: !binary |-
48
- H4sIAAAAAAAAAJWQzW7CMBCE7zzFKpdcktAmKY1AnCoqcWgrUXqKImTwhlhN
49
- 4sh2SyPEu9d2+BG0qqh88do7szvftgfgoBBcPMm1A0NwHhEpbJgqgFFwTZU2
50
- RBVjt69GYXITDpbRwE9yjP04ikI/iVeJfxfGeHsfkUGyzPv5KNeiRUXaBX4x
51
- qdzMhYJIWCLWQEqBhLYgcK2/UCANYFIrptrTzAv5UWNLCUSB5BUCz0EVCA2X
52
- TDFeyyGk6bxtUKZzrEmtMg+mVKbX7KxbZ1gSpbN6erVy7K54rQirpatrXuL4
53
- 9eVt9jDRfd0Eg2Xvf75tlmWOZ5hS1PpSGqRbXRvKNuaUWsrnKivRLQa0laT6
54
- dDL9qszI7tXhYh0UZPP+URIRsPpTm3LRBqRhQcUplkGX3YHMqnfeyYbRg8k1
55
- SH5zEIaRQV2w5plUaJMcSO0zHIPONDbb0KFzfrj9K5YB/neoC6KHXsjsbdfb
56
- fQOfEN7S6wIAAA==
45
+ string: |-
46
+ {
47
+ "errorMsg" : "Feed with id 'Feed[path='/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist']' has been already registered. Entity with id 'feed_may_exist' already exists at some of the positions: [[Types[Tenant], Ids[28026b36-8fe4-4332-84c8-524e173a68bf], Related[, rel='contains', role=SOURCE], Types[Feed], Ids[feed_may_exist]]]",
48
+ "details" : {
49
+ "entityId" : "feed_may_exist",
50
+ "paths" : [ [ {
51
+ "types" : [ "org.hawkular.inventory.api.model.Tenant" ]
52
+ }, {
53
+ "ids" : [ "28026b36-8fe4-4332-84c8-524e173a68bf" ]
54
+ }, {
55
+ "relationshipName" : "contains",
56
+ "entityRole" : "SOURCE"
57
+ }, {
58
+ "types" : [ "org.hawkular.inventory.api.model.Feed" ]
59
+ }, {
60
+ "ids" : [ "feed_may_exist" ]
61
+ } ] ]
62
+ }
63
+ }
57
64
  http_version:
58
- recorded_at: Fri, 19 Feb 2016 10:41:32 GMT
65
+ recorded_at: Thu, 05 May 2016 11:18:45 GMT
59
66
  - request:
60
67
  method: get
61
68
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist
@@ -76,8 +83,6 @@ http_interactions:
76
83
  code: 200
77
84
  message: OK
78
85
  headers:
79
- Content-Encoding:
80
- - gzip
81
86
  Expires:
82
87
  - '0'
83
88
  Cache-Control:
@@ -89,21 +94,22 @@ http_interactions:
89
94
  Pragma:
90
95
  - no-cache
91
96
  Date:
92
- - Fri, 19 Feb 2016 10:41:32 GMT
97
+ - Thu, 05 May 2016 11:18:45 GMT
93
98
  Connection:
94
99
  - keep-alive
95
100
  Content-Type:
96
101
  - application/json
97
102
  Content-Length:
98
- - '102'
103
+ - '100'
99
104
  body:
100
105
  encoding: ASCII-8BIT
101
- string: !binary |-
102
- H4sIAAAAAAAAAKvmUlBQKkgsyVBSsFJQ0i+xNrIwMDJLMjbTtUhLNdE1MTY2
103
- 0rUwSbbQNTUySTU0N040s0hK00+zTktNTYnPTayMT63ILC5R0gEZk5kCNgRN
104
- iqsWADiVKMdkAAAA
106
+ string: |-
107
+ {
108
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist",
109
+ "id" : "feed_may_exist"
110
+ }
105
111
  http_version:
106
- recorded_at: Fri, 19 Feb 2016 10:41:32 GMT
112
+ recorded_at: Thu, 05 May 2016 11:18:45 GMT
107
113
  - request:
108
114
  method: post
109
115
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/resourceTypes
@@ -126,8 +132,6 @@ http_interactions:
126
132
  code: 409
127
133
  message: Conflict
128
134
  headers:
129
- Content-Encoding:
130
- - gzip
131
135
  Expires:
132
136
  - '0'
133
137
  Cache-Control:
@@ -139,21 +143,22 @@ http_interactions:
139
143
  Pragma:
140
144
  - no-cache
141
145
  Date:
142
- - Fri, 19 Feb 2016 10:41:32 GMT
146
+ - Thu, 05 May 2016 11:18:45 GMT
143
147
  Connection:
144
148
  - keep-alive
145
149
  Content-Type:
146
150
  - application/json
147
151
  Content-Length:
148
- - '109'
152
+ - '107'
149
153
  body:
150
154
  encoding: ASCII-8BIT
151
- string: !binary |-
152
- H4sIAAAAAAAAABXMMQqAMAwF0L2n+HTp4gncHT1EodEGaiNNRIt4d+n+eK8D
153
- PLUmbdXdY4ZfqrF13GwZnBDqVUpALI1i6qCH1RTRoHIQZINlwinKxlJ1xuB+
154
- Gmsii1x0pC8+9/2FU7bnawAAAA==
155
+ string: |-
156
+ {
157
+ "errorMsg" : "Entity with id 'null' already exists at some of the positions: null",
158
+ "details" : { }
159
+ }
155
160
  http_version:
156
- recorded_at: Fri, 19 Feb 2016 10:41:32 GMT
161
+ recorded_at: Thu, 05 May 2016 11:18:45 GMT
157
162
  - request:
158
163
  method: get
159
164
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/resourceTypes/rt-123
@@ -174,8 +179,6 @@ http_interactions:
174
179
  code: 200
175
180
  message: OK
176
181
  headers:
177
- Content-Encoding:
178
- - gzip
179
182
  Expires:
180
183
  - '0'
181
184
  Cache-Control:
@@ -187,21 +190,23 @@ http_interactions:
187
190
  Pragma:
188
191
  - no-cache
189
192
  Date:
190
- - Fri, 19 Feb 2016 10:41:33 GMT
193
+ - Thu, 05 May 2016 11:18:45 GMT
191
194
  Connection:
192
195
  - keep-alive
193
196
  Content-Type:
194
197
  - application/json
195
198
  Content-Length:
196
- - '130'
199
+ - '129'
197
200
  body:
198
201
  encoding: ASCII-8BIT
199
- string: !binary |-
200
- H4sIAAAAAAAAAC3MQQ6CMBBA0T2naLp2UpmpdWJvYdyTAtPIAiVlTCTGuxPQ
201
- 9fv5n8oYOyW9W3Mx1mlEPmJoKQBn8eCJENh3DCf0Up8pBW6zyzGL9M2Ylkbe
202
- w6yuaCwKNZI9bMNHGmUfXmV+vkont2WSHw39Dv+6+q5ugH8sgQAAAA==
202
+ string: |-
203
+ {
204
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/rt;rt-123",
205
+ "name" : "ResourceType",
206
+ "id" : "rt-123"
207
+ }
203
208
  http_version:
204
- recorded_at: Fri, 19 Feb 2016 10:41:33 GMT
209
+ recorded_at: Thu, 05 May 2016 11:18:45 GMT
205
210
  - request:
206
211
  method: post
207
212
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/resources
@@ -221,11 +226,9 @@ http_interactions:
221
226
  - Ruby
222
227
  response:
223
228
  status:
224
- code: 409
225
- message: Conflict
229
+ code: 201
230
+ message: Created
226
231
  headers:
227
- Content-Encoding:
228
- - gzip
229
232
  Expires:
230
233
  - '0'
231
234
  Cache-Control:
@@ -236,22 +239,34 @@ http_interactions:
236
239
  - WildFly/10
237
240
  Pragma:
238
241
  - no-cache
242
+ Location:
243
+ - http://localhost:8080/hawkular/inventory/feeds/feed_may_exist/resources/r123
239
244
  Date:
240
- - Fri, 19 Feb 2016 10:41:33 GMT
245
+ - Thu, 05 May 2016 11:18:46 GMT
241
246
  Connection:
242
247
  - keep-alive
243
248
  Content-Type:
244
249
  - application/json
245
250
  Content-Length:
246
- - '109'
251
+ - '317'
247
252
  body:
248
253
  encoding: ASCII-8BIT
249
- string: !binary |-
250
- H4sIAAAAAAAAABXMMQqAMAwF0L2n+HTp4gncHT1EodEGaiNNRIt4d+n+eK8D
251
- PLUmbdXdY4ZfqrF13GwZnBDqVUpALI1i6qCH1RTRoHIQZINlwinKxlJ1xuB+
252
- Gmsii1x0pC8+9/2FU7bnawAAAA==
254
+ string: |-
255
+ {
256
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/r;r123",
257
+ "type" : {
258
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/rt;rt-123",
259
+ "name" : "ResourceType",
260
+ "id" : "rt-123"
261
+ },
262
+ "properties" : {
263
+ "version" : 1.0
264
+ },
265
+ "name" : "My Resource",
266
+ "id" : "r123"
267
+ }
253
268
  http_version:
254
- recorded_at: Fri, 19 Feb 2016 10:41:33 GMT
269
+ recorded_at: Thu, 05 May 2016 11:18:46 GMT
255
270
  - request:
256
271
  method: get
257
272
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/resources/r123
@@ -272,8 +287,6 @@ http_interactions:
272
287
  code: 200
273
288
  message: OK
274
289
  headers:
275
- Content-Encoding:
276
- - gzip
277
290
  Expires:
278
291
  - '0'
279
292
  Cache-Control:
@@ -285,23 +298,31 @@ http_interactions:
285
298
  Pragma:
286
299
  - no-cache
287
300
  Date:
288
- - Fri, 19 Feb 2016 10:41:33 GMT
301
+ - Thu, 05 May 2016 11:18:46 GMT
289
302
  Connection:
290
303
  - keep-alive
291
304
  Content-Type:
292
305
  - application/json
293
306
  Content-Length:
294
- - '185'
307
+ - '317'
295
308
  body:
296
309
  encoding: ASCII-8BIT
297
- string: !binary |-
298
- H4sIAAAAAAAAAK2PQQ7CIBBF956CsBbbAlYiZ3Bj3De0DpFFWwJobJre3YJt
299
- 4wFczv8z7/8Zdwhhq8IDozPCWZBU5LSsWUmEBk44Y5QI3ghypByKE1OlqHWm
300
- pQa4V60aKngbHzInXUEZ3kdaGCxE2jgP/4EH6QJZ+TOyU21KwFfw/dM1cIuR
301
- i2nuyVouZm1KrazrLbhgwP90e4Hzpu+iUhzybXfjXwa0Rnx/W+EJPX0A9wC4
302
- kz0BAAA=
310
+ string: |-
311
+ {
312
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/r;r123",
313
+ "type" : {
314
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/rt;rt-123",
315
+ "name" : "ResourceType",
316
+ "id" : "rt-123"
317
+ },
318
+ "properties" : {
319
+ "version" : 1.0
320
+ },
321
+ "name" : "My Resource",
322
+ "id" : "r123"
323
+ }
303
324
  http_version:
304
- recorded_at: Fri, 19 Feb 2016 10:41:33 GMT
325
+ recorded_at: Thu, 05 May 2016 11:18:46 GMT
305
326
  - request:
306
327
  method: get
307
328
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/resources/r123
@@ -322,8 +343,6 @@ http_interactions:
322
343
  code: 200
323
344
  message: OK
324
345
  headers:
325
- Content-Encoding:
326
- - gzip
327
346
  Expires:
328
347
  - '0'
329
348
  Cache-Control:
@@ -335,21 +354,29 @@ http_interactions:
335
354
  Pragma:
336
355
  - no-cache
337
356
  Date:
338
- - Fri, 19 Feb 2016 10:41:33 GMT
357
+ - Thu, 05 May 2016 11:18:46 GMT
339
358
  Connection:
340
359
  - keep-alive
341
360
  Content-Type:
342
361
  - application/json
343
362
  Content-Length:
344
- - '185'
363
+ - '317'
345
364
  body:
346
365
  encoding: ASCII-8BIT
347
- string: !binary |-
348
- H4sIAAAAAAAAAK2PQQ7CIBBF956CsBbbAlYiZ3Bj3De0DpFFWwJobJre3YJt
349
- 4wFczv8z7/8Zdwhhq8IDozPCWZBU5LSsWUmEBk44Y5QI3ghypByKE1OlqHWm
350
- pQa4V60aKngbHzInXUEZ3kdaGCxE2jgP/4EH6QJZ+TOyU21KwFfw/dM1cIuR
351
- i2nuyVouZm1KrazrLbhgwP90e4Hzpu+iUhzybXfjXwa0Rnx/W+EJPX0A9wC4
352
- kz0BAAA=
366
+ string: |-
367
+ {
368
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/r;r123",
369
+ "type" : {
370
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/rt;rt-123",
371
+ "name" : "ResourceType",
372
+ "id" : "rt-123"
373
+ },
374
+ "properties" : {
375
+ "version" : 1.0
376
+ },
377
+ "name" : "My Resource",
378
+ "id" : "r123"
379
+ }
353
380
  http_version:
354
- recorded_at: Fri, 19 Feb 2016 10:41:33 GMT
355
- recorded_with: VCR 3.0.0
381
+ recorded_at: Thu, 05 May 2016 11:18:46 GMT
382
+ recorded_with: VCR 3.0.1
@@ -19,8 +19,8 @@ http_interactions:
19
19
  - Ruby
20
20
  response:
21
21
  status:
22
- code: 409
23
- message: Conflict
22
+ code: 201
23
+ message: Created
24
24
  headers:
25
25
  Expires:
26
26
  - '0'
@@ -32,69 +32,10 @@ http_interactions:
32
32
  - WildFly/10
33
33
  Pragma:
34
34
  - no-cache
35
+ Location:
36
+ - http://localhost:8080/hawkular/inventory/feeds/feed_may_exist
35
37
  Date:
36
- - Mon, 29 Feb 2016 11:18:11 GMT
37
- Connection:
38
- - keep-alive
39
- Content-Type:
40
- - application/json
41
- Content-Length:
42
- - '747'
43
- body:
44
- encoding: ASCII-8BIT
45
- string: |-
46
- {
47
- "errorMsg" : "Feed with id 'Feed[path='/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist']' has been already registered. Entity with id 'feed_may_exist' already exists at some of the positions: [[Types[Tenant], Ids[28026b36-8fe4-4332-84c8-524e173a68bf], Related[, rel='contains', role=SOURCE], Types[Feed], Ids[feed_may_exist]]]",
48
- "details" : {
49
- "entityId" : "feed_may_exist",
50
- "paths" : [ [ {
51
- "types" : [ "org.hawkular.inventory.api.model.Tenant" ]
52
- }, {
53
- "ids" : [ "28026b36-8fe4-4332-84c8-524e173a68bf" ]
54
- }, {
55
- "relationshipName" : "contains",
56
- "entityRole" : "SOURCE"
57
- }, {
58
- "types" : [ "org.hawkular.inventory.api.model.Feed" ]
59
- }, {
60
- "ids" : [ "feed_may_exist" ]
61
- } ] ]
62
- }
63
- }
64
- http_version:
65
- recorded_at: Mon, 29 Feb 2016 11:18:11 GMT
66
- - request:
67
- method: get
68
- uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist
69
- body:
70
- encoding: US-ASCII
71
- string: ''
72
- headers:
73
- Accept:
74
- - application/json
75
- Accept-Encoding:
76
- - gzip, deflate
77
- Content-Type:
78
- - application/json
79
- User-Agent:
80
- - Ruby
81
- response:
82
- status:
83
- code: 200
84
- message: OK
85
- headers:
86
- Expires:
87
- - '0'
88
- Cache-Control:
89
- - no-cache, no-store, must-revalidate
90
- X-Powered-By:
91
- - Undertow/1
92
- Server:
93
- - WildFly/10
94
- Pragma:
95
- - no-cache
96
- Date:
97
- - Mon, 29 Feb 2016 11:18:11 GMT
38
+ - Tue, 10 May 2016 14:55:04 GMT
98
39
  Connection:
99
40
  - keep-alive
100
41
  Content-Type:
@@ -109,7 +50,7 @@ http_interactions:
109
50
  "id" : "feed_may_exist"
110
51
  }
111
52
  http_version:
112
- recorded_at: Mon, 29 Feb 2016 11:18:11 GMT
53
+ recorded_at: Tue, 10 May 2016 14:55:04 GMT
113
54
  - request:
114
55
  method: post
115
56
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/resourceTypes
@@ -129,8 +70,8 @@ http_interactions:
129
70
  - Ruby
130
71
  response:
131
72
  status:
132
- code: 409
133
- message: Conflict
73
+ code: 201
74
+ message: Created
134
75
  headers:
135
76
  Expires:
136
77
  - '0'
@@ -142,23 +83,26 @@ http_interactions:
142
83
  - WildFly/10
143
84
  Pragma:
144
85
  - no-cache
86
+ Location:
87
+ - http://localhost:8080/hawkular/inventory/feeds/feed_may_exist/resourceTypes/rt-123
145
88
  Date:
146
- - Mon, 29 Feb 2016 11:18:11 GMT
89
+ - Tue, 10 May 2016 14:55:04 GMT
147
90
  Connection:
148
91
  - keep-alive
149
92
  Content-Type:
150
93
  - application/json
151
94
  Content-Length:
152
- - '107'
95
+ - '129'
153
96
  body:
154
97
  encoding: ASCII-8BIT
155
98
  string: |-
156
99
  {
157
- "errorMsg" : "Entity with id 'null' already exists at some of the positions: null",
158
- "details" : { }
100
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/rt;rt-123",
101
+ "name" : "ResourceType",
102
+ "id" : "rt-123"
159
103
  }
160
104
  http_version:
161
- recorded_at: Mon, 29 Feb 2016 11:18:11 GMT
105
+ recorded_at: Tue, 10 May 2016 14:55:04 GMT
162
106
  - request:
163
107
  method: get
164
108
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/resourceTypes/rt-123
@@ -190,7 +134,7 @@ http_interactions:
190
134
  Pragma:
191
135
  - no-cache
192
136
  Date:
193
- - Mon, 29 Feb 2016 11:18:11 GMT
137
+ - Tue, 10 May 2016 14:55:04 GMT
194
138
  Connection:
195
139
  - keep-alive
196
140
  Content-Type:
@@ -206,7 +150,7 @@ http_interactions:
206
150
  "id" : "rt-123"
207
151
  }
208
152
  http_version:
209
- recorded_at: Mon, 29 Feb 2016 11:18:11 GMT
153
+ recorded_at: Tue, 10 May 2016 14:55:04 GMT
210
154
  - request:
211
155
  method: post
212
156
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/resources
@@ -226,8 +170,8 @@ http_interactions:
226
170
  - Ruby
227
171
  response:
228
172
  status:
229
- code: 409
230
- message: Conflict
173
+ code: 201
174
+ message: Created
231
175
  headers:
232
176
  Expires:
233
177
  - '0'
@@ -239,55 +183,10 @@ http_interactions:
239
183
  - WildFly/10
240
184
  Pragma:
241
185
  - no-cache
186
+ Location:
187
+ - http://localhost:8080/hawkular/inventory/feeds/feed_may_exist/resources/r124
242
188
  Date:
243
- - Mon, 29 Feb 2016 11:18:11 GMT
244
- Connection:
245
- - keep-alive
246
- Content-Type:
247
- - application/json
248
- Content-Length:
249
- - '107'
250
- body:
251
- encoding: ASCII-8BIT
252
- string: |-
253
- {
254
- "errorMsg" : "Entity with id 'null' already exists at some of the positions: null",
255
- "details" : { }
256
- }
257
- http_version:
258
- recorded_at: Mon, 29 Feb 2016 11:18:11 GMT
259
- - request:
260
- method: get
261
- uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/resources/r124
262
- body:
263
- encoding: US-ASCII
264
- string: ''
265
- headers:
266
- Accept:
267
- - application/json
268
- Accept-Encoding:
269
- - gzip, deflate
270
- Content-Type:
271
- - application/json
272
- User-Agent:
273
- - Ruby
274
- response:
275
- status:
276
- code: 200
277
- message: OK
278
- headers:
279
- Expires:
280
- - '0'
281
- Cache-Control:
282
- - no-cache, no-store, must-revalidate
283
- X-Powered-By:
284
- - Undertow/1
285
- Server:
286
- - WildFly/10
287
- Pragma:
288
- - no-cache
289
- Date:
290
- - Mon, 29 Feb 2016 11:18:11 GMT
189
+ - Tue, 10 May 2016 14:55:04 GMT
291
190
  Connection:
292
191
  - keep-alive
293
192
  Content-Type:
@@ -311,7 +210,7 @@ http_interactions:
311
210
  "id" : "r124"
312
211
  }
313
212
  http_version:
314
- recorded_at: Mon, 29 Feb 2016 11:18:11 GMT
213
+ recorded_at: Tue, 10 May 2016 14:55:04 GMT
315
214
  - request:
316
215
  method: get
317
216
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/resources/r124
@@ -343,7 +242,7 @@ http_interactions:
343
242
  Pragma:
344
243
  - no-cache
345
244
  Date:
346
- - Mon, 29 Feb 2016 11:18:11 GMT
245
+ - Tue, 10 May 2016 14:55:04 GMT
347
246
  Connection:
348
247
  - keep-alive
349
248
  Content-Type:
@@ -367,7 +266,7 @@ http_interactions:
367
266
  "id" : "r124"
368
267
  }
369
268
  http_version:
370
- recorded_at: Mon, 29 Feb 2016 11:18:11 GMT
269
+ recorded_at: Tue, 10 May 2016 14:55:04 GMT
371
270
  - request:
372
271
  method: post
373
272
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/metricTypes
@@ -387,8 +286,8 @@ http_interactions:
387
286
  - Ruby
388
287
  response:
389
288
  status:
390
- code: 409
391
- message: Conflict
289
+ code: 201
290
+ message: Created
392
291
  headers:
393
292
  Expires:
394
293
  - '0'
@@ -400,23 +299,28 @@ http_interactions:
400
299
  - WildFly/10
401
300
  Pragma:
402
301
  - no-cache
302
+ Location:
303
+ - http://localhost:8080/hawkular/inventory/feeds/feed_may_exist/metricTypes/mt-124
403
304
  Date:
404
- - Mon, 29 Feb 2016 11:18:11 GMT
305
+ - Tue, 10 May 2016 14:55:04 GMT
405
306
  Connection:
406
307
  - keep-alive
407
308
  Content-Type:
408
309
  - application/json
409
310
  Content-Length:
410
- - '107'
311
+ - '170'
411
312
  body:
412
313
  encoding: ASCII-8BIT
413
314
  string: |-
414
315
  {
415
- "errorMsg" : "Entity with id 'null' already exists at some of the positions: null",
416
- "details" : { }
316
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/mt;mt-124",
317
+ "unit" : "NONE",
318
+ "type" : "GAUGE",
319
+ "collectionInterval" : 60,
320
+ "id" : "mt-124"
417
321
  }
418
322
  http_version:
419
- recorded_at: Mon, 29 Feb 2016 11:18:11 GMT
323
+ recorded_at: Tue, 10 May 2016 14:55:04 GMT
420
324
  - request:
421
325
  method: get
422
326
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/metricTypes/mt-124
@@ -448,7 +352,7 @@ http_interactions:
448
352
  Pragma:
449
353
  - no-cache
450
354
  Date:
451
- - Mon, 29 Feb 2016 11:18:11 GMT
355
+ - Tue, 10 May 2016 14:55:05 GMT
452
356
  Connection:
453
357
  - keep-alive
454
358
  Content-Type:
@@ -466,7 +370,7 @@ http_interactions:
466
370
  "id" : "mt-124"
467
371
  }
468
372
  http_version:
469
- recorded_at: Mon, 29 Feb 2016 11:18:11 GMT
373
+ recorded_at: Tue, 10 May 2016 14:55:05 GMT
470
374
  - request:
471
375
  method: post
472
376
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/metrics
@@ -486,8 +390,8 @@ http_interactions:
486
390
  - Ruby
487
391
  response:
488
392
  status:
489
- code: 409
490
- message: Conflict
393
+ code: 201
394
+ message: Created
491
395
  headers:
492
396
  Expires:
493
397
  - '0'
@@ -499,23 +403,33 @@ http_interactions:
499
403
  - WildFly/10
500
404
  Pragma:
501
405
  - no-cache
406
+ Location:
407
+ - http://localhost:8080/hawkular/inventory/feeds/feed_may_exist/metrics/m-124
502
408
  Date:
503
- - Mon, 29 Feb 2016 11:18:11 GMT
409
+ - Tue, 10 May 2016 14:55:05 GMT
504
410
  Connection:
505
411
  - keep-alive
506
412
  Content-Type:
507
413
  - application/json
508
414
  Content-Length:
509
- - '107'
415
+ - '314'
510
416
  body:
511
417
  encoding: ASCII-8BIT
512
418
  string: |-
513
419
  {
514
- "errorMsg" : "Entity with id 'null' already exists at some of the positions: null",
515
- "details" : { }
420
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/m;m-124",
421
+ "type" : {
422
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/mt;mt-124",
423
+ "unit" : "NONE",
424
+ "type" : "GAUGE",
425
+ "collectionInterval" : 60,
426
+ "id" : "mt-124"
427
+ },
428
+ "name" : "m-124",
429
+ "id" : "m-124"
516
430
  }
517
431
  http_version:
518
- recorded_at: Mon, 29 Feb 2016 11:18:11 GMT
432
+ recorded_at: Tue, 10 May 2016 14:55:05 GMT
519
433
  - request:
520
434
  method: get
521
435
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/metrics/m-124
@@ -547,7 +461,7 @@ http_interactions:
547
461
  Pragma:
548
462
  - no-cache
549
463
  Date:
550
- - Mon, 29 Feb 2016 11:18:11 GMT
464
+ - Tue, 10 May 2016 14:55:05 GMT
551
465
  Connection:
552
466
  - keep-alive
553
467
  Content-Type:
@@ -570,7 +484,7 @@ http_interactions:
570
484
  "id" : "m-124"
571
485
  }
572
486
  http_version:
573
- recorded_at: Mon, 29 Feb 2016 11:18:12 GMT
487
+ recorded_at: Tue, 10 May 2016 14:55:05 GMT
574
488
  - request:
575
489
  method: post
576
490
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/resources/r124/metrics
@@ -590,8 +504,8 @@ http_interactions:
590
504
  - Ruby
591
505
  response:
592
506
  status:
593
- code: 409
594
- message: Conflict
507
+ code: 204
508
+ message: No Content
595
509
  headers:
596
510
  Expires:
597
511
  - '0'
@@ -604,27 +518,12 @@ http_interactions:
604
518
  Pragma:
605
519
  - no-cache
606
520
  Date:
607
- - Mon, 29 Feb 2016 11:18:12 GMT
608
- Connection:
609
- - keep-alive
610
- Content-Type:
611
- - application/json
612
- Content-Length:
613
- - '359'
521
+ - Tue, 10 May 2016 14:55:05 GMT
614
522
  body:
615
- encoding: ASCII-8BIT
616
- string: |-
617
- {
618
- "errorMsg" : "Relation with id 'incorporates' already exists at some of the positions: [[CanonicalPaths[/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/r;r124]]]",
619
- "details" : {
620
- "relationshipNameOrId" : "incorporates",
621
- "paths" : [ [ {
622
- "paths" : [ "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/r;r124" ]
623
- } ] ]
624
- }
625
- }
523
+ encoding: UTF-8
524
+ string: ''
626
525
  http_version:
627
- recorded_at: Mon, 29 Feb 2016 11:18:12 GMT
526
+ recorded_at: Tue, 10 May 2016 14:55:05 GMT
628
527
  - request:
629
528
  method: post
630
529
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/metrics
@@ -644,8 +543,8 @@ http_interactions:
644
543
  - Ruby
645
544
  response:
646
545
  status:
647
- code: 409
648
- message: Conflict
546
+ code: 201
547
+ message: Created
649
548
  headers:
650
549
  Expires:
651
550
  - '0'
@@ -657,23 +556,33 @@ http_interactions:
657
556
  - WildFly/10
658
557
  Pragma:
659
558
  - no-cache
559
+ Location:
560
+ - http://localhost:8080/hawkular/inventory/feeds/feed_may_exist/metrics/m-124-1
660
561
  Date:
661
- - Mon, 29 Feb 2016 11:18:12 GMT
562
+ - Tue, 10 May 2016 14:55:05 GMT
662
563
  Connection:
663
564
  - keep-alive
664
565
  Content-Type:
665
566
  - application/json
666
567
  Content-Length:
667
- - '107'
568
+ - '320'
668
569
  body:
669
570
  encoding: ASCII-8BIT
670
571
  string: |-
671
572
  {
672
- "errorMsg" : "Entity with id 'null' already exists at some of the positions: null",
673
- "details" : { }
573
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/m;m-124-1",
574
+ "type" : {
575
+ "path" : "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/mt;mt-124",
576
+ "unit" : "NONE",
577
+ "type" : "GAUGE",
578
+ "collectionInterval" : 60,
579
+ "id" : "mt-124"
580
+ },
581
+ "name" : "Metric1",
582
+ "id" : "m-124-1"
674
583
  }
675
584
  http_version:
676
- recorded_at: Mon, 29 Feb 2016 11:18:12 GMT
585
+ recorded_at: Tue, 10 May 2016 14:55:05 GMT
677
586
  - request:
678
587
  method: get
679
588
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/metrics/m-124-1
@@ -705,7 +614,7 @@ http_interactions:
705
614
  Pragma:
706
615
  - no-cache
707
616
  Date:
708
- - Mon, 29 Feb 2016 11:18:12 GMT
617
+ - Tue, 10 May 2016 14:55:05 GMT
709
618
  Connection:
710
619
  - keep-alive
711
620
  Content-Type:
@@ -728,7 +637,7 @@ http_interactions:
728
637
  "id" : "m-124-1"
729
638
  }
730
639
  http_version:
731
- recorded_at: Mon, 29 Feb 2016 11:18:12 GMT
640
+ recorded_at: Tue, 10 May 2016 14:55:05 GMT
732
641
  - request:
733
642
  method: post
734
643
  uri: http://jdoe:password@localhost:8080/hawkular/inventory/feeds/feed_may_exist/resources/r124/metrics
@@ -748,8 +657,8 @@ http_interactions:
748
657
  - Ruby
749
658
  response:
750
659
  status:
751
- code: 409
752
- message: Conflict
660
+ code: 204
661
+ message: No Content
753
662
  headers:
754
663
  Expires:
755
664
  - '0'
@@ -762,25 +671,10 @@ http_interactions:
762
671
  Pragma:
763
672
  - no-cache
764
673
  Date:
765
- - Mon, 29 Feb 2016 11:18:12 GMT
766
- Connection:
767
- - keep-alive
768
- Content-Type:
769
- - application/json
770
- Content-Length:
771
- - '359'
674
+ - Tue, 10 May 2016 14:55:05 GMT
772
675
  body:
773
- encoding: ASCII-8BIT
774
- string: |-
775
- {
776
- "errorMsg" : "Relation with id 'incorporates' already exists at some of the positions: [[CanonicalPaths[/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/r;r124]]]",
777
- "details" : {
778
- "relationshipNameOrId" : "incorporates",
779
- "paths" : [ [ {
780
- "paths" : [ "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;feed_may_exist/r;r124" ]
781
- } ] ]
782
- }
783
- }
676
+ encoding: UTF-8
677
+ string: ''
784
678
  http_version:
785
- recorded_at: Mon, 29 Feb 2016 11:18:12 GMT
786
- recorded_with: VCR 3.0.0
679
+ recorded_at: Tue, 10 May 2016 14:55:05 GMT
680
+ recorded_with: VCR 3.0.1