hawkular-client 2.8.0 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -4
- data/.travis/start_hawkular_services.sh +21 -0
- data/.travis/wait_for_services.rb +26 -10
- data/CHANGES.rdoc +26 -0
- data/README.rdoc +12 -1
- data/docker-compose.yml +4 -2
- data/hawkularclient.gemspec +2 -0
- data/lib/hawkular/alerts/alerts_api.rb +22 -1
- data/lib/hawkular/base_client.rb +29 -24
- data/lib/hawkular/client_utils.rb +42 -0
- data/lib/hawkular/env_config.rb +15 -0
- data/lib/hawkular/hawkular_client.rb +33 -25
- data/lib/hawkular/inventory/entities.rb +9 -0
- data/lib/hawkular/inventory/inventory_api.rb +13 -3
- data/lib/hawkular/logger.rb +14 -0
- data/lib/hawkular/metrics/metric_api.rb +24 -8
- data/lib/hawkular/operations/operations_api.rb +57 -25
- data/lib/hawkular/tokens/tokens_api.rb +4 -1
- data/lib/hawkular/version.rb +1 -1
- data/lib/hawkularclient.rb +8 -0
- data/spec/integration/alerts_spec.rb +50 -27
- data/spec/integration/env_config_spec.rb +39 -0
- data/spec/integration/hawkular_client_spec.rb +10 -7
- data/spec/integration/inventory_spec.rb +36 -3
- data/spec/integration/logger_spec.rb +36 -0
- data/spec/integration/metric_spec.rb +62 -3
- data/spec/integration/operations_spec.rb +112 -63
- data/spec/integration/tokens_spec.rb +6 -6
- data/spec/spec_helper.rb +20 -6
- data/spec/unit/base_spec.rb +25 -3
- data/spec/unit/canonical_path_spec.rb +2 -1
- data/spec/unit/client_spec.rb +2 -1
- data/spec/unit/deprecations_spec.rb +19 -0
- data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_add_tags_to_existing_alert.yml +210 -0
- data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_remove_tags_from_existing_alert.yml +257 -0
- data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_get_the_action_definitions.yml +59 -22
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_have_a_consistent_behaviour_when_creating_an_already_existing_resource.yml +714 -0
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_return_data_from_get_entity.yml +230 -0
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/All_Tags_for_metrics/Should_fetch_all_metrics_with_some_tags.yml +1251 -0
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Tags_Metrics/setup_client.yml +3 -3
- data/spec/vcr_cassettes/Operation/NonSecure/Helpers/Templates/agent_properties.yml +124 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Helpers/Templates/get_feed.yml +7 -7
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Add_JDBC_driver_should_add_the_driver.json +4 -4
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Add_deployment_should_be_doable.json +4 -4
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Disable_should_be_performed_and_eventually_respond_with_success.json +4 -4
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Remove_JDBC_driver_should_be_performed_and_eventually_respond_with_success.json +3 -3
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Restart_can_be_run_multiple_times_in_parallel.json +5 -5
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Restart_should_be_performed_and_eventually_respond_with_success.json +4 -4
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Update_collection_intervals_should_be_performed_and_eventually_respond_with_success.json +23 -0
- metadata +57 -7
- data/lib/hawkular/hawkular_client_utils.rb +0 -41
@@ -17,8 +17,6 @@ http_interactions:
|
|
17
17
|
- hawkular
|
18
18
|
Content-Type:
|
19
19
|
- application/json
|
20
|
-
Host:
|
21
|
-
- localhost:8080
|
22
20
|
response:
|
23
21
|
status:
|
24
22
|
code: 200
|
@@ -35,18 +33,18 @@ http_interactions:
|
|
35
33
|
Pragma:
|
36
34
|
- no-cache
|
37
35
|
Date:
|
38
|
-
-
|
36
|
+
- Wed, 01 Feb 2017 22:44:58 GMT
|
39
37
|
Connection:
|
40
38
|
- keep-alive
|
41
39
|
Content-Type:
|
42
40
|
- application/json
|
43
41
|
Content-Length:
|
44
|
-
- '
|
42
|
+
- '19'
|
45
43
|
body:
|
46
44
|
encoding: UTF-8
|
47
|
-
string: '["email"]'
|
45
|
+
string: '["email","webhook"]'
|
48
46
|
http_version:
|
49
|
-
recorded_at:
|
47
|
+
recorded_at: Wed, 01 Feb 2017 22:44:58 GMT
|
50
48
|
- request:
|
51
49
|
method: get
|
52
50
|
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/plugins/email
|
@@ -64,8 +62,6 @@ http_interactions:
|
|
64
62
|
- hawkular
|
65
63
|
Content-Type:
|
66
64
|
- application/json
|
67
|
-
Host:
|
68
|
-
- localhost:8080
|
69
65
|
response:
|
70
66
|
status:
|
71
67
|
code: 200
|
@@ -82,18 +78,63 @@ http_interactions:
|
|
82
78
|
Pragma:
|
83
79
|
- no-cache
|
84
80
|
Date:
|
85
|
-
-
|
81
|
+
- Wed, 01 Feb 2017 22:44:58 GMT
|
86
82
|
Connection:
|
87
83
|
- keep-alive
|
88
84
|
Content-Type:
|
89
85
|
- application/json
|
90
86
|
Content-Length:
|
91
|
-
- '
|
87
|
+
- '94'
|
92
88
|
body:
|
93
89
|
encoding: UTF-8
|
94
|
-
string: '["cc","from","from-name","template.hawkular.url","template.html","template.plain","to"]'
|
90
|
+
string: '["cc","from","from-name","mail","template.hawkular.url","template.html","template.plain","to"]'
|
95
91
|
http_version:
|
96
|
-
recorded_at:
|
92
|
+
recorded_at: Wed, 01 Feb 2017 22:44:58 GMT
|
93
|
+
- request:
|
94
|
+
method: get
|
95
|
+
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/plugins/webhook
|
96
|
+
body:
|
97
|
+
encoding: US-ASCII
|
98
|
+
string: ''
|
99
|
+
headers:
|
100
|
+
Accept:
|
101
|
+
- application/json
|
102
|
+
Accept-Encoding:
|
103
|
+
- identity
|
104
|
+
User-Agent:
|
105
|
+
- hawkular-client-ruby
|
106
|
+
Hawkular-Tenant:
|
107
|
+
- hawkular
|
108
|
+
Content-Type:
|
109
|
+
- application/json
|
110
|
+
response:
|
111
|
+
status:
|
112
|
+
code: 200
|
113
|
+
message: OK
|
114
|
+
headers:
|
115
|
+
Expires:
|
116
|
+
- '0'
|
117
|
+
Cache-Control:
|
118
|
+
- no-cache, no-store, must-revalidate
|
119
|
+
X-Powered-By:
|
120
|
+
- Undertow/1
|
121
|
+
Server:
|
122
|
+
- WildFly/10
|
123
|
+
Pragma:
|
124
|
+
- no-cache
|
125
|
+
Date:
|
126
|
+
- Wed, 01 Feb 2017 22:44:58 GMT
|
127
|
+
Connection:
|
128
|
+
- keep-alive
|
129
|
+
Content-Type:
|
130
|
+
- application/json
|
131
|
+
Content-Length:
|
132
|
+
- '26'
|
133
|
+
body:
|
134
|
+
encoding: UTF-8
|
135
|
+
string: '["method","timeout","url"]'
|
136
|
+
http_version:
|
137
|
+
recorded_at: Wed, 01 Feb 2017 22:44:58 GMT
|
97
138
|
- request:
|
98
139
|
method: get
|
99
140
|
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/plugins/email
|
@@ -111,8 +152,6 @@ http_interactions:
|
|
111
152
|
- hawkular
|
112
153
|
Content-Type:
|
113
154
|
- application/json
|
114
|
-
Host:
|
115
|
-
- localhost:8080
|
116
155
|
response:
|
117
156
|
status:
|
118
157
|
code: 200
|
@@ -129,18 +168,18 @@ http_interactions:
|
|
129
168
|
Pragma:
|
130
169
|
- no-cache
|
131
170
|
Date:
|
132
|
-
-
|
171
|
+
- Wed, 01 Feb 2017 22:44:58 GMT
|
133
172
|
Connection:
|
134
173
|
- keep-alive
|
135
174
|
Content-Type:
|
136
175
|
- application/json
|
137
176
|
Content-Length:
|
138
|
-
- '
|
177
|
+
- '94'
|
139
178
|
body:
|
140
179
|
encoding: UTF-8
|
141
|
-
string: '["cc","from","from-name","template.hawkular.url","template.html","template.plain","to"]'
|
180
|
+
string: '["cc","from","from-name","mail","template.hawkular.url","template.html","template.plain","to"]'
|
142
181
|
http_version:
|
143
|
-
recorded_at:
|
182
|
+
recorded_at: Wed, 01 Feb 2017 22:44:58 GMT
|
144
183
|
- request:
|
145
184
|
method: get
|
146
185
|
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/plugins/-does-not-exist-
|
@@ -158,8 +197,6 @@ http_interactions:
|
|
158
197
|
- hawkular
|
159
198
|
Content-Type:
|
160
199
|
- application/json
|
161
|
-
Host:
|
162
|
-
- localhost:8080
|
163
200
|
response:
|
164
201
|
status:
|
165
202
|
code: 404
|
@@ -176,7 +213,7 @@ http_interactions:
|
|
176
213
|
Pragma:
|
177
214
|
- no-cache
|
178
215
|
Date:
|
179
|
-
-
|
216
|
+
- Wed, 01 Feb 2017 22:44:58 GMT
|
180
217
|
Connection:
|
181
218
|
- keep-alive
|
182
219
|
Content-Type:
|
@@ -187,5 +224,5 @@ http_interactions:
|
|
187
224
|
encoding: UTF-8
|
188
225
|
string: '{"errorMsg":"actionPlugin: -does-not-exist- not found"}'
|
189
226
|
http_version:
|
190
|
-
recorded_at:
|
227
|
+
recorded_at: Wed, 01 Feb 2017 22:44:58 GMT
|
191
228
|
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,714 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/entity/feed
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"properties":{},"id":"NonSecure_feed_may_exist","name":null,"outgoing":{},"incoming":{}}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- identity
|
14
|
+
User-Agent:
|
15
|
+
- hawkular-client-ruby
|
16
|
+
Hawkular-Tenant:
|
17
|
+
- hawkular
|
18
|
+
Content-Type:
|
19
|
+
- application/json
|
20
|
+
Content-Length:
|
21
|
+
- '89'
|
22
|
+
Host:
|
23
|
+
- localhost:8080
|
24
|
+
response:
|
25
|
+
status:
|
26
|
+
code: 201
|
27
|
+
message: Created
|
28
|
+
headers:
|
29
|
+
Expires:
|
30
|
+
- '0'
|
31
|
+
Cache-Control:
|
32
|
+
- no-cache, no-store, must-revalidate
|
33
|
+
X-Powered-By:
|
34
|
+
- Undertow/1
|
35
|
+
Server:
|
36
|
+
- WildFly/10
|
37
|
+
Pragma:
|
38
|
+
- no-cache
|
39
|
+
Location:
|
40
|
+
- http://localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist
|
41
|
+
Date:
|
42
|
+
- Thu, 05 Jan 2017 17:54:24 GMT
|
43
|
+
Connection:
|
44
|
+
- keep-alive
|
45
|
+
Content-Type:
|
46
|
+
- application/json
|
47
|
+
Content-Length:
|
48
|
+
- '271'
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: |-
|
52
|
+
{
|
53
|
+
"path" : "/t;hawkular/f;NonSecure_feed_may_exist",
|
54
|
+
"identityHash" : "353d88f09127d8b924e48c6daf58ee242f5fdf",
|
55
|
+
"contentHash" : "da39a3ee5e6b4bd3255bfef95601890afd879",
|
56
|
+
"syncHash" : "375bd5f424eda759c01f5bdf1334719abf2740c7",
|
57
|
+
"id" : "NonSecure_feed_may_exist"
|
58
|
+
}
|
59
|
+
http_version:
|
60
|
+
recorded_at: Thu, 05 Jan 2017 17:54:24 GMT
|
61
|
+
- request:
|
62
|
+
method: post
|
63
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/resourceType
|
64
|
+
body:
|
65
|
+
encoding: UTF-8
|
66
|
+
string: '{"properties":{},"id":"rt-123","name":"ResourceType","outgoing":{},"incoming":{}}'
|
67
|
+
headers:
|
68
|
+
Accept:
|
69
|
+
- application/json
|
70
|
+
Accept-Encoding:
|
71
|
+
- identity
|
72
|
+
User-Agent:
|
73
|
+
- hawkular-client-ruby
|
74
|
+
Hawkular-Tenant:
|
75
|
+
- hawkular
|
76
|
+
Content-Type:
|
77
|
+
- application/json
|
78
|
+
Content-Length:
|
79
|
+
- '81'
|
80
|
+
Host:
|
81
|
+
- localhost:8080
|
82
|
+
response:
|
83
|
+
status:
|
84
|
+
code: 201
|
85
|
+
message: Created
|
86
|
+
headers:
|
87
|
+
Expires:
|
88
|
+
- '0'
|
89
|
+
Cache-Control:
|
90
|
+
- no-cache, no-store, must-revalidate
|
91
|
+
X-Powered-By:
|
92
|
+
- Undertow/1
|
93
|
+
Server:
|
94
|
+
- WildFly/10
|
95
|
+
Pragma:
|
96
|
+
- no-cache
|
97
|
+
Location:
|
98
|
+
- http://localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/rt;rt-123
|
99
|
+
Date:
|
100
|
+
- Thu, 05 Jan 2017 17:54:24 GMT
|
101
|
+
Connection:
|
102
|
+
- keep-alive
|
103
|
+
Content-Type:
|
104
|
+
- application/json
|
105
|
+
Content-Length:
|
106
|
+
- '290'
|
107
|
+
body:
|
108
|
+
encoding: UTF-8
|
109
|
+
string: |-
|
110
|
+
{
|
111
|
+
"path" : "/t;hawkular/f;NonSecure_feed_may_exist/rt;rt-123",
|
112
|
+
"name" : "ResourceType",
|
113
|
+
"identityHash" : "30a52c53a93cb102e499367ecc55ed8a03b0b1",
|
114
|
+
"contentHash" : "1b49accb63cf5aa916f3ee6d952a85fe27725b",
|
115
|
+
"syncHash" : "59e97c8fa23e2ad25994ed7a136127fbbaf9e3b",
|
116
|
+
"id" : "rt-123"
|
117
|
+
}
|
118
|
+
http_version:
|
119
|
+
recorded_at: Thu, 05 Jan 2017 17:54:24 GMT
|
120
|
+
- request:
|
121
|
+
method: get
|
122
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/rt;rt-123
|
123
|
+
body:
|
124
|
+
encoding: US-ASCII
|
125
|
+
string: ''
|
126
|
+
headers:
|
127
|
+
Accept:
|
128
|
+
- application/json
|
129
|
+
Accept-Encoding:
|
130
|
+
- identity
|
131
|
+
User-Agent:
|
132
|
+
- hawkular-client-ruby
|
133
|
+
Hawkular-Tenant:
|
134
|
+
- hawkular
|
135
|
+
Content-Type:
|
136
|
+
- application/json
|
137
|
+
Host:
|
138
|
+
- localhost:8080
|
139
|
+
response:
|
140
|
+
status:
|
141
|
+
code: 200
|
142
|
+
message: OK
|
143
|
+
headers:
|
144
|
+
Expires:
|
145
|
+
- '0'
|
146
|
+
Cache-Control:
|
147
|
+
- no-cache, no-store, must-revalidate
|
148
|
+
X-Powered-By:
|
149
|
+
- Undertow/1
|
150
|
+
Server:
|
151
|
+
- WildFly/10
|
152
|
+
Pragma:
|
153
|
+
- no-cache
|
154
|
+
Date:
|
155
|
+
- Thu, 05 Jan 2017 17:54:24 GMT
|
156
|
+
Connection:
|
157
|
+
- keep-alive
|
158
|
+
Content-Type:
|
159
|
+
- application/json
|
160
|
+
Content-Length:
|
161
|
+
- '290'
|
162
|
+
body:
|
163
|
+
encoding: UTF-8
|
164
|
+
string: |-
|
165
|
+
{
|
166
|
+
"path" : "/t;hawkular/f;NonSecure_feed_may_exist/rt;rt-123",
|
167
|
+
"name" : "ResourceType",
|
168
|
+
"identityHash" : "30a52c53a93cb102e499367ecc55ed8a03b0b1",
|
169
|
+
"contentHash" : "1b49accb63cf5aa916f3ee6d952a85fe27725b",
|
170
|
+
"syncHash" : "59e97c8fa23e2ad25994ed7a136127fbbaf9e3b",
|
171
|
+
"id" : "rt-123"
|
172
|
+
}
|
173
|
+
http_version:
|
174
|
+
recorded_at: Thu, 05 Jan 2017 17:54:24 GMT
|
175
|
+
- request:
|
176
|
+
method: post
|
177
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/resource
|
178
|
+
body:
|
179
|
+
encoding: UTF-8
|
180
|
+
string: '{"properties":{"version":1.0},"id":"r999","name":"My Resource","outgoing":{},"incoming":{},"resourceTypePath":"/t;hawkular/f;NonSecure_feed_may_exist/rt;rt-123"}'
|
181
|
+
headers:
|
182
|
+
Accept:
|
183
|
+
- application/json
|
184
|
+
Accept-Encoding:
|
185
|
+
- identity
|
186
|
+
User-Agent:
|
187
|
+
- hawkular-client-ruby
|
188
|
+
Hawkular-Tenant:
|
189
|
+
- hawkular
|
190
|
+
Content-Type:
|
191
|
+
- application/json
|
192
|
+
Content-Length:
|
193
|
+
- '161'
|
194
|
+
Host:
|
195
|
+
- localhost:8080
|
196
|
+
response:
|
197
|
+
status:
|
198
|
+
code: 201
|
199
|
+
message: Created
|
200
|
+
headers:
|
201
|
+
Expires:
|
202
|
+
- '0'
|
203
|
+
Cache-Control:
|
204
|
+
- no-cache, no-store, must-revalidate
|
205
|
+
X-Powered-By:
|
206
|
+
- Undertow/1
|
207
|
+
Server:
|
208
|
+
- WildFly/10
|
209
|
+
Pragma:
|
210
|
+
- no-cache
|
211
|
+
Location:
|
212
|
+
- http://localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/r;r999
|
213
|
+
Date:
|
214
|
+
- Thu, 05 Jan 2017 17:54:24 GMT
|
215
|
+
Connection:
|
216
|
+
- keep-alive
|
217
|
+
Content-Type:
|
218
|
+
- application/json
|
219
|
+
Content-Length:
|
220
|
+
- '649'
|
221
|
+
body:
|
222
|
+
encoding: UTF-8
|
223
|
+
string: |-
|
224
|
+
{
|
225
|
+
"path" : "/t;hawkular/f;NonSecure_feed_may_exist/r;r999",
|
226
|
+
"properties" : {
|
227
|
+
"version" : 1.0
|
228
|
+
},
|
229
|
+
"name" : "My Resource",
|
230
|
+
"identityHash" : "a1699b33d9c8e63357ba65e5cf59b2c46552cb45",
|
231
|
+
"contentHash" : "72591f28d2c8c7fe844cd85796463541cfb4c8f",
|
232
|
+
"syncHash" : "f55a78843cc58b52a3b114e9718b8aee6dbc2961",
|
233
|
+
"type" : {
|
234
|
+
"path" : "/t;hawkular/f;NonSecure_feed_may_exist/rt;rt-123",
|
235
|
+
"name" : "ResourceType",
|
236
|
+
"identityHash" : "30a52c53a93cb102e499367ecc55ed8a03b0b1",
|
237
|
+
"contentHash" : "1b49accb63cf5aa916f3ee6d952a85fe27725b",
|
238
|
+
"syncHash" : "59e97c8fa23e2ad25994ed7a136127fbbaf9e3b",
|
239
|
+
"id" : "rt-123"
|
240
|
+
},
|
241
|
+
"id" : "r999"
|
242
|
+
}
|
243
|
+
http_version:
|
244
|
+
recorded_at: Thu, 05 Jan 2017 17:54:24 GMT
|
245
|
+
- request:
|
246
|
+
method: post
|
247
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/resource
|
248
|
+
body:
|
249
|
+
encoding: UTF-8
|
250
|
+
string: '{"properties":{"version":1.0},"id":"r999","name":"My Resource","outgoing":{},"incoming":{},"resourceTypePath":"/t;hawkular/f;NonSecure_feed_may_exist/rt;rt-123"}'
|
251
|
+
headers:
|
252
|
+
Accept:
|
253
|
+
- application/json
|
254
|
+
Accept-Encoding:
|
255
|
+
- identity
|
256
|
+
User-Agent:
|
257
|
+
- hawkular-client-ruby
|
258
|
+
Hawkular-Tenant:
|
259
|
+
- hawkular
|
260
|
+
Content-Type:
|
261
|
+
- application/json
|
262
|
+
Content-Length:
|
263
|
+
- '161'
|
264
|
+
Host:
|
265
|
+
- localhost:8080
|
266
|
+
response:
|
267
|
+
status:
|
268
|
+
code: 409
|
269
|
+
message: Conflict
|
270
|
+
headers:
|
271
|
+
Expires:
|
272
|
+
- '0'
|
273
|
+
Cache-Control:
|
274
|
+
- no-cache, no-store, must-revalidate
|
275
|
+
X-Powered-By:
|
276
|
+
- Undertow/1
|
277
|
+
Server:
|
278
|
+
- WildFly/10
|
279
|
+
Pragma:
|
280
|
+
- no-cache
|
281
|
+
Date:
|
282
|
+
- Thu, 05 Jan 2017 17:54:24 GMT
|
283
|
+
Connection:
|
284
|
+
- keep-alive
|
285
|
+
Content-Type:
|
286
|
+
- application/json
|
287
|
+
Content-Length:
|
288
|
+
- '830'
|
289
|
+
body:
|
290
|
+
encoding: UTF-8
|
291
|
+
string: |-
|
292
|
+
{
|
293
|
+
"errorMsg" : "Entity with id 'r999' already exists at some of the positions: [[Types[Tenant], Ids[hawkular], Related[, rel='contains', role=SOURCE], Types[Feed], Ids[NonSecure_feed_may_exist], Related[, rel='contains', role=SOURCE], Types[Resource], Ids[r999]]]",
|
294
|
+
"details" : {
|
295
|
+
"entityId" : "r999",
|
296
|
+
"paths" : [ [ {
|
297
|
+
"types" : [ "org.hawkular.inventory.api.model.Tenant" ]
|
298
|
+
}, {
|
299
|
+
"ids" : [ "hawkular" ]
|
300
|
+
}, {
|
301
|
+
"relationshipName" : "contains",
|
302
|
+
"entityRole" : "SOURCE"
|
303
|
+
}, {
|
304
|
+
"types" : [ "org.hawkular.inventory.api.model.Feed" ]
|
305
|
+
}, {
|
306
|
+
"ids" : [ "NonSecure_feed_may_exist" ]
|
307
|
+
}, {
|
308
|
+
"relationshipName" : "contains",
|
309
|
+
"entityRole" : "SOURCE"
|
310
|
+
}, {
|
311
|
+
"types" : [ "org.hawkular.inventory.api.model.Resource" ]
|
312
|
+
}, {
|
313
|
+
"ids" : [ "r999" ]
|
314
|
+
} ] ]
|
315
|
+
}
|
316
|
+
}
|
317
|
+
http_version:
|
318
|
+
recorded_at: Thu, 05 Jan 2017 17:54:24 GMT
|
319
|
+
- request:
|
320
|
+
method: get
|
321
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/r;r999
|
322
|
+
body:
|
323
|
+
encoding: US-ASCII
|
324
|
+
string: ''
|
325
|
+
headers:
|
326
|
+
Accept:
|
327
|
+
- application/json
|
328
|
+
Accept-Encoding:
|
329
|
+
- identity
|
330
|
+
User-Agent:
|
331
|
+
- hawkular-client-ruby
|
332
|
+
Hawkular-Tenant:
|
333
|
+
- hawkular
|
334
|
+
Content-Type:
|
335
|
+
- application/json
|
336
|
+
Host:
|
337
|
+
- localhost:8080
|
338
|
+
response:
|
339
|
+
status:
|
340
|
+
code: 200
|
341
|
+
message: OK
|
342
|
+
headers:
|
343
|
+
Expires:
|
344
|
+
- '0'
|
345
|
+
Cache-Control:
|
346
|
+
- no-cache, no-store, must-revalidate
|
347
|
+
X-Powered-By:
|
348
|
+
- Undertow/1
|
349
|
+
Server:
|
350
|
+
- WildFly/10
|
351
|
+
Pragma:
|
352
|
+
- no-cache
|
353
|
+
Date:
|
354
|
+
- Thu, 05 Jan 2017 17:54:24 GMT
|
355
|
+
Connection:
|
356
|
+
- keep-alive
|
357
|
+
Content-Type:
|
358
|
+
- application/json
|
359
|
+
Content-Length:
|
360
|
+
- '649'
|
361
|
+
body:
|
362
|
+
encoding: UTF-8
|
363
|
+
string: |-
|
364
|
+
{
|
365
|
+
"path" : "/t;hawkular/f;NonSecure_feed_may_exist/r;r999",
|
366
|
+
"properties" : {
|
367
|
+
"version" : 1.0
|
368
|
+
},
|
369
|
+
"name" : "My Resource",
|
370
|
+
"identityHash" : "a1699b33d9c8e63357ba65e5cf59b2c46552cb45",
|
371
|
+
"contentHash" : "72591f28d2c8c7fe844cd85796463541cfb4c8f",
|
372
|
+
"syncHash" : "f55a78843cc58b52a3b114e9718b8aee6dbc2961",
|
373
|
+
"type" : {
|
374
|
+
"path" : "/t;hawkular/f;NonSecure_feed_may_exist/rt;rt-123",
|
375
|
+
"name" : "ResourceType",
|
376
|
+
"identityHash" : "30a52c53a93cb102e499367ecc55ed8a03b0b1",
|
377
|
+
"contentHash" : "1b49accb63cf5aa916f3ee6d952a85fe27725b",
|
378
|
+
"syncHash" : "59e97c8fa23e2ad25994ed7a136127fbbaf9e3b",
|
379
|
+
"id" : "rt-123"
|
380
|
+
},
|
381
|
+
"id" : "r999"
|
382
|
+
}
|
383
|
+
http_version:
|
384
|
+
recorded_at: Thu, 05 Jan 2017 17:54:24 GMT
|
385
|
+
- request:
|
386
|
+
method: get
|
387
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/r;r999/d;configuration
|
388
|
+
body:
|
389
|
+
encoding: US-ASCII
|
390
|
+
string: ''
|
391
|
+
headers:
|
392
|
+
Accept:
|
393
|
+
- application/json
|
394
|
+
Accept-Encoding:
|
395
|
+
- identity
|
396
|
+
User-Agent:
|
397
|
+
- hawkular-client-ruby
|
398
|
+
Hawkular-Tenant:
|
399
|
+
- hawkular
|
400
|
+
Content-Type:
|
401
|
+
- application/json
|
402
|
+
Host:
|
403
|
+
- localhost:8080
|
404
|
+
response:
|
405
|
+
status:
|
406
|
+
code: 404
|
407
|
+
message: Not Found
|
408
|
+
headers:
|
409
|
+
Expires:
|
410
|
+
- '0'
|
411
|
+
Cache-Control:
|
412
|
+
- no-cache, no-store, must-revalidate
|
413
|
+
X-Powered-By:
|
414
|
+
- Undertow/1
|
415
|
+
Server:
|
416
|
+
- WildFly/10
|
417
|
+
Pragma:
|
418
|
+
- no-cache
|
419
|
+
Date:
|
420
|
+
- Thu, 05 Jan 2017 17:54:24 GMT
|
421
|
+
Connection:
|
422
|
+
- keep-alive
|
423
|
+
Content-Type:
|
424
|
+
- application/json
|
425
|
+
Content-Length:
|
426
|
+
- '320'
|
427
|
+
body:
|
428
|
+
encoding: UTF-8
|
429
|
+
string: |-
|
430
|
+
{
|
431
|
+
"errorMsg" : "No DataEntity found on any of the following paths: [[CanonicalPaths[/t;hawkular/f;NonSecure_feed_may_exist/r;r999/d;configuration]]]",
|
432
|
+
"details" : {
|
433
|
+
"entityType" : "DataEntity",
|
434
|
+
"path" : [ [ {
|
435
|
+
"paths" : [ "/t;hawkular/f;NonSecure_feed_may_exist/r;r999/d;configuration" ]
|
436
|
+
} ] ]
|
437
|
+
}
|
438
|
+
}
|
439
|
+
http_version:
|
440
|
+
recorded_at: Thu, 05 Jan 2017 17:54:24 GMT
|
441
|
+
- request:
|
442
|
+
method: post
|
443
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/r;r999/resource
|
444
|
+
body:
|
445
|
+
encoding: UTF-8
|
446
|
+
string: '{"properties":{"version":1.0},"id":"r1000","name":"My Resource","outgoing":{},"incoming":{},"resourceTypePath":"/t;hawkular/f;NonSecure_feed_may_exist/rt;rt-123"}'
|
447
|
+
headers:
|
448
|
+
Accept:
|
449
|
+
- application/json
|
450
|
+
Accept-Encoding:
|
451
|
+
- identity
|
452
|
+
User-Agent:
|
453
|
+
- hawkular-client-ruby
|
454
|
+
Hawkular-Tenant:
|
455
|
+
- hawkular
|
456
|
+
Content-Type:
|
457
|
+
- application/json
|
458
|
+
Content-Length:
|
459
|
+
- '162'
|
460
|
+
Host:
|
461
|
+
- localhost:8080
|
462
|
+
response:
|
463
|
+
status:
|
464
|
+
code: 201
|
465
|
+
message: Created
|
466
|
+
headers:
|
467
|
+
Expires:
|
468
|
+
- '0'
|
469
|
+
Cache-Control:
|
470
|
+
- no-cache, no-store, must-revalidate
|
471
|
+
X-Powered-By:
|
472
|
+
- Undertow/1
|
473
|
+
Server:
|
474
|
+
- WildFly/10
|
475
|
+
Pragma:
|
476
|
+
- no-cache
|
477
|
+
Location:
|
478
|
+
- http://localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/r;r999/r;r1000
|
479
|
+
Date:
|
480
|
+
- Thu, 05 Jan 2017 17:54:24 GMT
|
481
|
+
Connection:
|
482
|
+
- keep-alive
|
483
|
+
Content-Type:
|
484
|
+
- application/json
|
485
|
+
Content-Length:
|
486
|
+
- '657'
|
487
|
+
body:
|
488
|
+
encoding: UTF-8
|
489
|
+
string: |-
|
490
|
+
{
|
491
|
+
"path" : "/t;hawkular/f;NonSecure_feed_may_exist/r;r999/r;r1000",
|
492
|
+
"properties" : {
|
493
|
+
"version" : 1.0
|
494
|
+
},
|
495
|
+
"name" : "My Resource",
|
496
|
+
"identityHash" : "5c5259d4c6ae817c118d2bd9ab4595cb402da40",
|
497
|
+
"contentHash" : "3193964b5578ac51533be1b493b3dc0123a4b4a",
|
498
|
+
"syncHash" : "89e5fdccc4a7d979a4bc3b1a20c842d9d4205113",
|
499
|
+
"type" : {
|
500
|
+
"path" : "/t;hawkular/f;NonSecure_feed_may_exist/rt;rt-123",
|
501
|
+
"name" : "ResourceType",
|
502
|
+
"identityHash" : "30a52c53a93cb102e499367ecc55ed8a03b0b1",
|
503
|
+
"contentHash" : "1b49accb63cf5aa916f3ee6d952a85fe27725b",
|
504
|
+
"syncHash" : "59e97c8fa23e2ad25994ed7a136127fbbaf9e3b",
|
505
|
+
"id" : "rt-123"
|
506
|
+
},
|
507
|
+
"id" : "r1000"
|
508
|
+
}
|
509
|
+
http_version:
|
510
|
+
recorded_at: Thu, 05 Jan 2017 17:54:24 GMT
|
511
|
+
- request:
|
512
|
+
method: post
|
513
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/r;r999/resource
|
514
|
+
body:
|
515
|
+
encoding: UTF-8
|
516
|
+
string: '{"properties":{"version":1.0},"id":"r1000","name":"My Resource","outgoing":{},"incoming":{},"resourceTypePath":"/t;hawkular/f;NonSecure_feed_may_exist/rt;rt-123"}'
|
517
|
+
headers:
|
518
|
+
Accept:
|
519
|
+
- application/json
|
520
|
+
Accept-Encoding:
|
521
|
+
- identity
|
522
|
+
User-Agent:
|
523
|
+
- hawkular-client-ruby
|
524
|
+
Hawkular-Tenant:
|
525
|
+
- hawkular
|
526
|
+
Content-Type:
|
527
|
+
- application/json
|
528
|
+
Content-Length:
|
529
|
+
- '162'
|
530
|
+
Host:
|
531
|
+
- localhost:8080
|
532
|
+
response:
|
533
|
+
status:
|
534
|
+
code: 409
|
535
|
+
message: Conflict
|
536
|
+
headers:
|
537
|
+
Expires:
|
538
|
+
- '0'
|
539
|
+
Cache-Control:
|
540
|
+
- no-cache, no-store, must-revalidate
|
541
|
+
X-Powered-By:
|
542
|
+
- Undertow/1
|
543
|
+
Server:
|
544
|
+
- WildFly/10
|
545
|
+
Pragma:
|
546
|
+
- no-cache
|
547
|
+
Date:
|
548
|
+
- Thu, 05 Jan 2017 17:54:24 GMT
|
549
|
+
Connection:
|
550
|
+
- keep-alive
|
551
|
+
Content-Type:
|
552
|
+
- application/json
|
553
|
+
Content-Length:
|
554
|
+
- '1087'
|
555
|
+
body:
|
556
|
+
encoding: UTF-8
|
557
|
+
string: |-
|
558
|
+
{
|
559
|
+
"errorMsg" : "Entity with id 'r1000' already exists at some of the positions: [[Types[Tenant], Ids[hawkular], Related[, rel='contains', role=SOURCE], Types[Feed], Ids[NonSecure_feed_may_exist], Related[, rel='contains', role=SOURCE], Types[Resource], Ids[r999], Related[, rel='contains', role=SOURCE], Types[Resource], Ids[r1000]]]",
|
560
|
+
"details" : {
|
561
|
+
"entityId" : "r1000",
|
562
|
+
"paths" : [ [ {
|
563
|
+
"types" : [ "org.hawkular.inventory.api.model.Tenant" ]
|
564
|
+
}, {
|
565
|
+
"ids" : [ "hawkular" ]
|
566
|
+
}, {
|
567
|
+
"relationshipName" : "contains",
|
568
|
+
"entityRole" : "SOURCE"
|
569
|
+
}, {
|
570
|
+
"types" : [ "org.hawkular.inventory.api.model.Feed" ]
|
571
|
+
}, {
|
572
|
+
"ids" : [ "NonSecure_feed_may_exist" ]
|
573
|
+
}, {
|
574
|
+
"relationshipName" : "contains",
|
575
|
+
"entityRole" : "SOURCE"
|
576
|
+
}, {
|
577
|
+
"types" : [ "org.hawkular.inventory.api.model.Resource" ]
|
578
|
+
}, {
|
579
|
+
"ids" : [ "r999" ]
|
580
|
+
}, {
|
581
|
+
"relationshipName" : "contains",
|
582
|
+
"entityRole" : "SOURCE"
|
583
|
+
}, {
|
584
|
+
"types" : [ "org.hawkular.inventory.api.model.Resource" ]
|
585
|
+
}, {
|
586
|
+
"ids" : [ "r1000" ]
|
587
|
+
} ] ]
|
588
|
+
}
|
589
|
+
}
|
590
|
+
http_version:
|
591
|
+
recorded_at: Thu, 05 Jan 2017 17:54:24 GMT
|
592
|
+
- request:
|
593
|
+
method: get
|
594
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/r;r999/r;r1000
|
595
|
+
body:
|
596
|
+
encoding: US-ASCII
|
597
|
+
string: ''
|
598
|
+
headers:
|
599
|
+
Accept:
|
600
|
+
- application/json
|
601
|
+
Accept-Encoding:
|
602
|
+
- identity
|
603
|
+
User-Agent:
|
604
|
+
- hawkular-client-ruby
|
605
|
+
Hawkular-Tenant:
|
606
|
+
- hawkular
|
607
|
+
Content-Type:
|
608
|
+
- application/json
|
609
|
+
Host:
|
610
|
+
- localhost:8080
|
611
|
+
response:
|
612
|
+
status:
|
613
|
+
code: 200
|
614
|
+
message: OK
|
615
|
+
headers:
|
616
|
+
Expires:
|
617
|
+
- '0'
|
618
|
+
Cache-Control:
|
619
|
+
- no-cache, no-store, must-revalidate
|
620
|
+
X-Powered-By:
|
621
|
+
- Undertow/1
|
622
|
+
Server:
|
623
|
+
- WildFly/10
|
624
|
+
Pragma:
|
625
|
+
- no-cache
|
626
|
+
Date:
|
627
|
+
- Thu, 05 Jan 2017 17:54:24 GMT
|
628
|
+
Connection:
|
629
|
+
- keep-alive
|
630
|
+
Content-Type:
|
631
|
+
- application/json
|
632
|
+
Content-Length:
|
633
|
+
- '657'
|
634
|
+
body:
|
635
|
+
encoding: UTF-8
|
636
|
+
string: |-
|
637
|
+
{
|
638
|
+
"path" : "/t;hawkular/f;NonSecure_feed_may_exist/r;r999/r;r1000",
|
639
|
+
"properties" : {
|
640
|
+
"version" : 1.0
|
641
|
+
},
|
642
|
+
"name" : "My Resource",
|
643
|
+
"identityHash" : "5c5259d4c6ae817c118d2bd9ab4595cb402da40",
|
644
|
+
"contentHash" : "3193964b5578ac51533be1b493b3dc0123a4b4a",
|
645
|
+
"syncHash" : "89e5fdccc4a7d979a4bc3b1a20c842d9d4205113",
|
646
|
+
"type" : {
|
647
|
+
"path" : "/t;hawkular/f;NonSecure_feed_may_exist/rt;rt-123",
|
648
|
+
"name" : "ResourceType",
|
649
|
+
"identityHash" : "30a52c53a93cb102e499367ecc55ed8a03b0b1",
|
650
|
+
"contentHash" : "1b49accb63cf5aa916f3ee6d952a85fe27725b",
|
651
|
+
"syncHash" : "59e97c8fa23e2ad25994ed7a136127fbbaf9e3b",
|
652
|
+
"id" : "rt-123"
|
653
|
+
},
|
654
|
+
"id" : "r1000"
|
655
|
+
}
|
656
|
+
http_version:
|
657
|
+
recorded_at: Thu, 05 Jan 2017 17:54:24 GMT
|
658
|
+
- request:
|
659
|
+
method: get
|
660
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/entity/f;NonSecure_feed_may_exist/r;r999/r;r1000/d;configuration
|
661
|
+
body:
|
662
|
+
encoding: US-ASCII
|
663
|
+
string: ''
|
664
|
+
headers:
|
665
|
+
Accept:
|
666
|
+
- application/json
|
667
|
+
Accept-Encoding:
|
668
|
+
- identity
|
669
|
+
User-Agent:
|
670
|
+
- hawkular-client-ruby
|
671
|
+
Hawkular-Tenant:
|
672
|
+
- hawkular
|
673
|
+
Content-Type:
|
674
|
+
- application/json
|
675
|
+
Host:
|
676
|
+
- localhost:8080
|
677
|
+
response:
|
678
|
+
status:
|
679
|
+
code: 404
|
680
|
+
message: Not Found
|
681
|
+
headers:
|
682
|
+
Expires:
|
683
|
+
- '0'
|
684
|
+
Cache-Control:
|
685
|
+
- no-cache, no-store, must-revalidate
|
686
|
+
X-Powered-By:
|
687
|
+
- Undertow/1
|
688
|
+
Server:
|
689
|
+
- WildFly/10
|
690
|
+
Pragma:
|
691
|
+
- no-cache
|
692
|
+
Date:
|
693
|
+
- Thu, 05 Jan 2017 17:54:24 GMT
|
694
|
+
Connection:
|
695
|
+
- keep-alive
|
696
|
+
Content-Type:
|
697
|
+
- application/json
|
698
|
+
Content-Length:
|
699
|
+
- '336'
|
700
|
+
body:
|
701
|
+
encoding: UTF-8
|
702
|
+
string: |-
|
703
|
+
{
|
704
|
+
"errorMsg" : "No DataEntity found on any of the following paths: [[CanonicalPaths[/t;hawkular/f;NonSecure_feed_may_exist/r;r999/r;r1000/d;configuration]]]",
|
705
|
+
"details" : {
|
706
|
+
"entityType" : "DataEntity",
|
707
|
+
"path" : [ [ {
|
708
|
+
"paths" : [ "/t;hawkular/f;NonSecure_feed_may_exist/r;r999/r;r1000/d;configuration" ]
|
709
|
+
} ] ]
|
710
|
+
}
|
711
|
+
}
|
712
|
+
http_version:
|
713
|
+
recorded_at: Thu, 05 Jan 2017 17:54:24 GMT
|
714
|
+
recorded_with: VCR 3.0.3
|