hawkular-client 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.rdoc +9 -0
- data/lib/hawkular/base_client.rb +8 -0
- data/lib/hawkular/inventory/entities.rb +1 -0
- data/lib/hawkular/operations/operations_api.rb +83 -11
- data/lib/hawkular/version.rb +1 -1
- data/spec/integration/inventory_spec.rb +2 -0
- data/spec/integration/operations_spec.rb +39 -39
- data/spec/unit/base_spec.rb +47 -0
- data/spec/vcr_cassettes/Inventory/inventory_0_17/Templates/Should_list_operation_definitions_of_given_resource_type.yml +0 -3
- data/spec/vcr_cassettes/Operation/Operation/Add_deployment_should_be_doable.json +1 -1
- data/spec/vcr_cassettes/Operation/Operation/Disable_should_be_performed_and_eventually_respond_with_success.json +26 -0
- data/spec/vcr_cassettes/Operation/Operation/Restart_can_be_run_multiple_times_in_parallel.json +40 -0
- data/spec/vcr_cassettes/Operation/Operation/Restart_should_be_performed_and_eventually_respond_with_success.json +26 -0
- data/spec/vcr_cassettes/Operation/Operation/Restart_should_not_be_performed_if_resource_path_is_wrong.json +26 -0
- data/spec/vcr_cassettes/Operation/Operation/{Undeploy_should_be_performed_and_eventually_respond_with_success.json → Undeploy_deployment_should_be_performed_and_eventually_respond_with_success.json} +2 -2
- metadata +14 -14
- data/spec/vcr_cassettes/Operation/Operation/Redeploy_can_be_run_multiple_times_in_parallel.json +0 -40
- data/spec/vcr_cassettes/Operation/Operation/Redeploy_should_be_performed_and_eventually_respond_with_success.json +0 -26
- data/spec/vcr_cassettes/Operation/Operation/Redeploy_should_not_be_performed_if_resource_path_is_wrong.json +0 -26
- data/spec/vcr_cassettes/Operation/Operation/Remove_deployment_should_be_performed_and_eventually_respond_with_success.json +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db083fe96638b6d090b78d7a0a5a4af6a4fe54b2
|
4
|
+
data.tar.gz: 1a1ce49dde751e3870507d91dcb69e783af04384
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b32136387fc08ea18c5b72fe9c63d6cd61ab81455ed1f65ddbb8dbdaf70eb3944c29737a8716f7fa222b435ba25e2a05eea3e21ace1fa3d81979ac717917bbe4
|
7
|
+
data.tar.gz: b20088f8a974b791e73177551c1fd4fd352cfa3c0288b4b59dfa2006c6bae481b65e65e319d65aaad8a3e112d955d461b9e13ba58cbc6fae9c507407c7b0a204
|
data/CHANGES.rdoc
CHANGED
@@ -3,6 +3,15 @@
|
|
3
3
|
This document describes the relevant changes between releases of the
|
4
4
|
_hawkular-client_ project.
|
5
5
|
|
6
|
+
|
7
|
+
=== V 2.5.0
|
8
|
+
|
9
|
+
* Fix failure of list operations when no properties are passed - don't parse params
|
10
|
+
* Adds url_with_websocket method for helping to generate a ws(s) url
|
11
|
+
* Use server-level operation commands for deployments
|
12
|
+
|
13
|
+
Full list of items can be found at https://github.com/hawkular/hawkular-client-ruby/milestone/10?closed=1
|
14
|
+
|
6
15
|
=== V 2.4.0
|
7
16
|
|
8
17
|
* Expose `metric.type.id` in metric definitions from Inventory, as the agent changed what it sends
|
data/lib/hawkular/base_client.rb
CHANGED
@@ -151,6 +151,14 @@ module Hawkular
|
|
151
151
|
end
|
152
152
|
end
|
153
153
|
|
154
|
+
# Generate a new url using the websocket scheme. It changes the current scheme to
|
155
|
+
# 'ws' for 'http' and 'wss' for 'https' urls.
|
156
|
+
# @param url [String|URI] url
|
157
|
+
# @return [String] URL with the scheme changed to 'ws' or 'wss' depending on the current scheme.
|
158
|
+
def url_with_websocket_scheme(url)
|
159
|
+
url.to_s.sub(/^http(s?)/, 'ws\1')
|
160
|
+
end
|
161
|
+
|
154
162
|
# Specialized exception to be thrown
|
155
163
|
# when the interaction with Hawkular fails
|
156
164
|
class HawkularException < StandardError
|
@@ -128,17 +128,20 @@ module Hawkular::Operations
|
|
128
128
|
invoke_operation_helper(operation_payload, operation_name, &callback)
|
129
129
|
end
|
130
130
|
|
131
|
-
# Deploys
|
131
|
+
# Deploys an archive file into WildFly
|
132
132
|
#
|
133
133
|
# @param [Hash] hash Arguments for deployment
|
134
134
|
# @option hash [String] :resource_path canonical path of the WildFly server into which we deploy
|
135
135
|
# @option hash [String] :destination_file_name resulting file name
|
136
136
|
# @option hash [String] :binary_content binary content representing the war file
|
137
|
-
# @option hash [String] :enabled whether the deployment should be enabled or not
|
137
|
+
# @option hash [String] :enabled whether the deployment should be enabled immediately, or not (default = true)
|
138
|
+
# @option hash [String] :force_deploy whether to replace existing content or not (default = false)
|
139
|
+
# @option hash [String] :server_groups comma-separated list of server groups for the operation (default = ignored)
|
138
140
|
#
|
139
141
|
# @param callback [Block] callback that is run after the operation is done
|
140
142
|
def add_deployment(hash, &callback)
|
141
143
|
hash[:enabled] = hash.key?(:enabled) ? hash[:enabled] : true
|
144
|
+
hash[:force_deploy] = hash.key?(:force_deploy) ? hash[:force_deploy] : false
|
142
145
|
required = [:resource_path, :destination_file_name, :binary_content]
|
143
146
|
check_pre_conditions hash, required, &callback
|
144
147
|
|
@@ -146,28 +149,97 @@ module Hawkular::Operations
|
|
146
149
|
invoke_operation_helper(operation_payload, 'DeployApplication', hash[:binary_content], &callback)
|
147
150
|
end
|
148
151
|
|
149
|
-
#
|
152
|
+
# Undeploy a WildFly deployment
|
150
153
|
#
|
151
154
|
# @param [Hash] hash Arguments for deployment removal
|
152
|
-
# @option hash [String] :resource_path canonical path of the WildFly server from which to
|
153
|
-
# @option hash [String] :deployment_name name of deployment to
|
155
|
+
# @option hash [String] :resource_path canonical path of the WildFly server from which to undeploy the deployment
|
156
|
+
# @option hash [String] :deployment_name name of deployment to undeploy
|
157
|
+
# @option hash [String] :remove_content whether to remove the deployment content or not (default = true)
|
158
|
+
# @option hash [String] :server_groups comma-separated list of server groups for the operation (default = ignored)
|
154
159
|
#
|
155
160
|
# @param callback [Block] callback that is run after the operation is done
|
156
|
-
def
|
161
|
+
def undeploy(hash, &callback)
|
162
|
+
hash[:remove_content] = hash.key?(:remove_content) ? hash[:remove_content] : true
|
157
163
|
required = [:resource_path, :deployment_name]
|
158
164
|
check_pre_conditions hash, required, &callback
|
159
165
|
|
160
166
|
cp = ::Hawkular::Inventory::CanonicalPath.parse hash[:resource_path]
|
161
167
|
server_path = cp.up.to_s
|
168
|
+
hash[:resource_path] = server_path
|
169
|
+
hash[:destination_file_name] = hash[:deployment_name]
|
162
170
|
|
163
|
-
|
164
|
-
resource_path: server_path,
|
165
|
-
destination_file_name: hash[:deployment_name]
|
166
|
-
}
|
167
|
-
operation_payload = prepare_payload_hash([], payload_hash)
|
171
|
+
operation_payload = prepare_payload_hash([:deployment_name], hash)
|
168
172
|
invoke_operation_helper(operation_payload, 'UndeployApplication', &callback)
|
169
173
|
end
|
170
174
|
|
175
|
+
# @deprecated Please use undeploy() instead
|
176
|
+
def remove_deployment(hash, &callback)
|
177
|
+
undeploy(hash, &callback)
|
178
|
+
end
|
179
|
+
|
180
|
+
# Enable a WildFly deployment
|
181
|
+
#
|
182
|
+
# @param [Hash] hash Arguments for enable deployment
|
183
|
+
# @option hash [String] :resource_path canonical path of the WildFly server from which to enable the deployment
|
184
|
+
# @option hash [String] :deployment_name name of deployment to enable
|
185
|
+
# @option hash [String] :server_groups comma-separated list of server groups for the operation (default = ignored)
|
186
|
+
#
|
187
|
+
# @param callback [Block] callback that is run after the operation is done
|
188
|
+
def enable_deployment(hash, &callback)
|
189
|
+
required = [:resource_path, :deployment_name]
|
190
|
+
check_pre_conditions hash, required, &callback
|
191
|
+
|
192
|
+
cp = ::Hawkular::Inventory::CanonicalPath.parse hash[:resource_path]
|
193
|
+
server_path = cp.up.to_s
|
194
|
+
hash[:resource_path] = server_path
|
195
|
+
hash[:destination_file_name] = hash[:deployment_name]
|
196
|
+
|
197
|
+
operation_payload = prepare_payload_hash([:deployment_name], hash)
|
198
|
+
invoke_operation_helper(operation_payload, 'EnableApplication', &callback)
|
199
|
+
end
|
200
|
+
|
201
|
+
# Disable a WildFly deployment
|
202
|
+
#
|
203
|
+
# @param [Hash] hash Arguments for disable deployment
|
204
|
+
# @option hash [String] :resource_path canonical path of the WildFly server from which to disable the deployment
|
205
|
+
# @option hash [String] :deployment_name name of deployment to disable
|
206
|
+
# @option hash [String] :server_groups comma-separated list of server groups for the operation (default = ignored)
|
207
|
+
#
|
208
|
+
# @param callback [Block] callback that is run after the operation is done
|
209
|
+
def disable_deployment(hash, &callback)
|
210
|
+
required = [:resource_path, :deployment_name]
|
211
|
+
check_pre_conditions hash, required, &callback
|
212
|
+
|
213
|
+
cp = ::Hawkular::Inventory::CanonicalPath.parse hash[:resource_path]
|
214
|
+
server_path = cp.up.to_s
|
215
|
+
hash[:resource_path] = server_path
|
216
|
+
hash[:destination_file_name] = hash[:deployment_name]
|
217
|
+
|
218
|
+
operation_payload = prepare_payload_hash([:deployment_name], hash)
|
219
|
+
invoke_operation_helper(operation_payload, 'DisableApplication', &callback)
|
220
|
+
end
|
221
|
+
|
222
|
+
# Restart a WildFly deployment
|
223
|
+
#
|
224
|
+
# @param [Hash] hash Arguments for restart deployment
|
225
|
+
# @option hash [String] :resource_path canonical path of the WildFly server from which to restart the deployment
|
226
|
+
# @option hash [String] :deployment_name name of deployment to restart
|
227
|
+
# @option hash [String] :server_groups comma-separated list of server groups for the operation (default = ignored)
|
228
|
+
#
|
229
|
+
# @param callback [Block] callback that is run after the operation is done
|
230
|
+
def restart_deployment(hash, &callback)
|
231
|
+
required = [:resource_path, :deployment_name]
|
232
|
+
check_pre_conditions hash, required, &callback
|
233
|
+
|
234
|
+
cp = ::Hawkular::Inventory::CanonicalPath.parse hash[:resource_path]
|
235
|
+
server_path = cp.up.to_s
|
236
|
+
hash[:resource_path] = server_path
|
237
|
+
hash[:destination_file_name] = hash[:deployment_name]
|
238
|
+
|
239
|
+
operation_payload = prepare_payload_hash([:deployment_name], hash)
|
240
|
+
invoke_operation_helper(operation_payload, 'RestartApplication', &callback)
|
241
|
+
end
|
242
|
+
|
171
243
|
# Adds a new datasource
|
172
244
|
#
|
173
245
|
# @param [Hash] hash Arguments for the datasource
|
data/lib/hawkular/version.rb
CHANGED
@@ -333,6 +333,8 @@ module Hawkular::Inventory::RSpec
|
|
333
333
|
expect(shutdown_def.params).to include('restart')
|
334
334
|
restart_param = shutdown_def.params.fetch 'restart'
|
335
335
|
expect(restart_param['type']).to eq('bool')
|
336
|
+
resume_def = operation_definitions.fetch 'Resume'
|
337
|
+
expect(resume_def.params).to be {}
|
336
338
|
end
|
337
339
|
|
338
340
|
it 'Should list operation definitions of given resource' do
|
@@ -265,20 +265,20 @@ module Hawkular::Operations::RSpec
|
|
265
265
|
expect(actual_data['driverName']).to eq(driver_name)
|
266
266
|
end
|
267
267
|
|
268
|
-
it '
|
268
|
+
it 'Restart should be performed and eventually respond with success' do
|
269
269
|
wf_server_resource_id = 'Local~~'
|
270
270
|
alerts_war_resource_id = 'Local~%2Fdeployment%3Dhawkular-alerts-actions-email.war'
|
271
271
|
path = CanonicalPath.new(tenant_id: @tenant_id,
|
272
272
|
feed_id: @feed_id,
|
273
273
|
resource_ids: [wf_server_resource_id, alerts_war_resource_id])
|
274
274
|
|
275
|
-
|
276
|
-
|
277
|
-
|
275
|
+
restart = {
|
276
|
+
resource_path: path.to_s,
|
277
|
+
deployment_name: 'hawkular-alerts-actions-email.war'
|
278
278
|
}
|
279
279
|
|
280
280
|
actual_data = {}
|
281
|
-
@client.
|
281
|
+
@client.restart_deployment(restart) do |on|
|
282
282
|
on.success do |data|
|
283
283
|
actual_data[:data] = data
|
284
284
|
end
|
@@ -291,23 +291,23 @@ module Hawkular::Operations::RSpec
|
|
291
291
|
# expectations don't work from callbacks so waiting for the results via blocking helper `wait_for`
|
292
292
|
actual_data = wait_for actual_data
|
293
293
|
expect(actual_data['status']).to eq('OK')
|
294
|
-
expect(actual_data['resourcePath']).to eq(path.to_s)
|
295
|
-
expect(actual_data['message']).to start_with('Performed [
|
294
|
+
expect(actual_data['resourcePath']).to eq(path.up.to_s)
|
295
|
+
expect(actual_data['message']).to start_with('Performed [Restart Deployment] on')
|
296
296
|
end
|
297
297
|
|
298
|
-
it '
|
299
|
-
wf_server_resource_id = '
|
300
|
-
wrong_war_resource_id = '
|
298
|
+
it 'Restart should not be performed if resource path is wrong' do
|
299
|
+
wf_server_resource_id = 'Unknown~~'
|
300
|
+
wrong_war_resource_id = 'Unknown~%2Fdeployment%3Dnon-existent.war'
|
301
301
|
path = CanonicalPath.new(tenant_id: @tenant_id,
|
302
302
|
feed_id: @feed_id,
|
303
303
|
resource_ids: [wf_server_resource_id, wrong_war_resource_id])
|
304
304
|
|
305
|
-
|
306
|
-
|
307
|
-
|
305
|
+
restart = {
|
306
|
+
resource_path: path.to_s,
|
307
|
+
deployment_name: 'non-existent.war'
|
308
308
|
}
|
309
309
|
actual_data = {}
|
310
|
-
@client.
|
310
|
+
@client.restart_deployment(restart) do |on|
|
311
311
|
on.success do |_|
|
312
312
|
actual_data[:data] = { error: 'the operation should have failed' }
|
313
313
|
end
|
@@ -316,22 +316,22 @@ module Hawkular::Operations::RSpec
|
|
316
316
|
end
|
317
317
|
end
|
318
318
|
actual_data = wait_for actual_data
|
319
|
-
expect(actual_data[:error]).to start_with('
|
319
|
+
expect(actual_data[:error]).to start_with('Cannot restart application: unknown resource')
|
320
320
|
end
|
321
321
|
|
322
|
-
it '
|
322
|
+
it 'Disable should be performed and eventually respond with success' do
|
323
323
|
wf_server_resource_id = 'Local~~'
|
324
324
|
alerts_war_resource_id = 'Local~%2Fdeployment%3Dhawkular-alerts-actions-email.war'
|
325
325
|
path = CanonicalPath.new(tenant_id: @tenant_id,
|
326
326
|
feed_id: @feed_id,
|
327
327
|
resource_ids: [wf_server_resource_id, alerts_war_resource_id])
|
328
328
|
|
329
|
-
|
329
|
+
disable = {
|
330
330
|
resource_path: path.to_s,
|
331
331
|
deployment_name: 'hawkular-alerts-actions-email.war'
|
332
332
|
}
|
333
333
|
actual_data = {}
|
334
|
-
@client.
|
334
|
+
@client.disable_deployment(disable) do |on|
|
335
335
|
on.success do |data|
|
336
336
|
actual_data[:data] = data
|
337
337
|
end
|
@@ -395,19 +395,19 @@ module Hawkular::Operations::RSpec
|
|
395
395
|
# open the connection
|
396
396
|
operations_client = OperationsClient.new(entrypoint: 'http://localhost:8080', credentials: @creds)
|
397
397
|
|
398
|
-
|
399
|
-
|
400
|
-
|
398
|
+
restart = {
|
399
|
+
resource_path: '/t;t1/f;whatever/r;something',
|
400
|
+
deployment_name: 'something.war'
|
401
401
|
}
|
402
402
|
|
403
403
|
# close the connection
|
404
404
|
operations_client.close_connection!
|
405
405
|
expect do
|
406
|
-
operations_client.
|
406
|
+
operations_client.restart_deployment(restart)
|
407
407
|
end.to raise_error(RuntimeError, /Handshake with server has not been done./)
|
408
408
|
end
|
409
409
|
|
410
|
-
it '
|
410
|
+
it 'Restart can be run multiple times in parallel' do
|
411
411
|
wf_server_resource_id = 'Local~~'
|
412
412
|
alerts_war_resource_id = 'Local~%2Fdeployment%3Dhawkular-alerts-actions-email.war'
|
413
413
|
console_war_resource_id = 'Local~%2Fdeployment%3Dhawkular-console.war'
|
@@ -418,22 +418,22 @@ module Hawkular::Operations::RSpec
|
|
418
418
|
feed_id: @feed_id,
|
419
419
|
resource_ids: [wf_server_resource_id, console_war_resource_id])
|
420
420
|
|
421
|
-
|
422
|
-
|
423
|
-
|
421
|
+
restart1 = {
|
422
|
+
resource_path: path1.to_s,
|
423
|
+
deployment_name: 'hawkular-alerts-actions-email.war'
|
424
424
|
}
|
425
425
|
|
426
|
-
|
427
|
-
|
428
|
-
|
426
|
+
restart2 = {
|
427
|
+
resource_path: path2.to_s,
|
428
|
+
deployment_name: 'hawkular-console.war'
|
429
429
|
}
|
430
430
|
|
431
431
|
# run the first operation w/o registering the callback
|
432
|
-
@client.
|
432
|
+
@client.restart_deployment(restart1)
|
433
433
|
|
434
434
|
actual_data = {}
|
435
435
|
# run the 2nd operation with 2 callback blocks (the happy path and the less happy path)
|
436
|
-
@client.
|
436
|
+
@client.restart_deployment(restart2) do |on|
|
437
437
|
on.success do |data|
|
438
438
|
actual_data[:data] = data
|
439
439
|
end
|
@@ -445,8 +445,8 @@ module Hawkular::Operations::RSpec
|
|
445
445
|
|
446
446
|
actual_data = wait_for actual_data
|
447
447
|
expect(actual_data['status']).to eq('OK')
|
448
|
-
expect(actual_data['resourcePath']).to eq(path2.to_s)
|
449
|
-
expect(actual_data['message']).to start_with('Performed [
|
448
|
+
expect(actual_data['resourcePath']).to eq(path2.up.to_s)
|
449
|
+
expect(actual_data['message']).to start_with('Performed [Restart Deployment] on')
|
450
450
|
end
|
451
451
|
|
452
452
|
it 'Add deployment should be doable' do
|
@@ -476,18 +476,18 @@ module Hawkular::Operations::RSpec
|
|
476
476
|
expect(actual_data['resourcePath']).to eq(wf_path)
|
477
477
|
end
|
478
478
|
|
479
|
-
it '
|
479
|
+
it 'Undeploy deployment should be performed and eventually respond with success' do
|
480
480
|
wf_server_resource_id = 'Local~~'
|
481
481
|
sample_app_resource_id = 'Local~%2Fdeployment=sample.war'
|
482
482
|
path = CanonicalPath.new(tenant_id: @tenant_id,
|
483
483
|
feed_id: @feed_id,
|
484
484
|
resource_ids: [wf_server_resource_id, sample_app_resource_id])
|
485
|
-
|
486
|
-
|
487
|
-
|
485
|
+
undeploy = {
|
486
|
+
resource_path: path.to_s,
|
487
|
+
deployment_name: 'sample.war'
|
488
488
|
}
|
489
489
|
actual_data = {}
|
490
|
-
@client.
|
490
|
+
@client.undeploy(undeploy) do |on|
|
491
491
|
on.success do |data|
|
492
492
|
actual_data[:data] = data
|
493
493
|
end
|
@@ -498,7 +498,7 @@ module Hawkular::Operations::RSpec
|
|
498
498
|
end
|
499
499
|
actual_data = wait_for actual_data
|
500
500
|
expect(actual_data['status']).to eq('OK')
|
501
|
-
expect(actual_data['message']).to start_with('Performed [
|
501
|
+
expect(actual_data['message']).to start_with('Performed [Undeploy] on')
|
502
502
|
end
|
503
503
|
|
504
504
|
it 'Remove datasource should be performed and eventually respond with success' do
|
data/spec/unit/base_spec.rb
CHANGED
@@ -157,6 +157,53 @@ describe 'Base Spec' do
|
|
157
157
|
expect(ret).to eq('http://localhost:8080/hawkular/alerts')
|
158
158
|
end
|
159
159
|
|
160
|
+
it 'Should change http to ws and https to wss on different types of urls' do
|
161
|
+
c = Hawkular::BaseClient.new('not-needed-for-this-test')
|
162
|
+
ret = c.url_with_websocket_scheme 'http://localhost:8080'
|
163
|
+
expect(ret).to eq('ws://localhost:8080')
|
164
|
+
|
165
|
+
ret = c.url_with_websocket_scheme 'https://localhost:8443'
|
166
|
+
expect(ret).to eq('wss://localhost:8443')
|
167
|
+
|
168
|
+
ret = c.url_with_websocket_scheme 'http://localhost'
|
169
|
+
expect(ret).to eq('ws://localhost')
|
170
|
+
|
171
|
+
ret = c.url_with_websocket_scheme 'https://localhost'
|
172
|
+
expect(ret).to eq('wss://localhost')
|
173
|
+
|
174
|
+
ret = c.url_with_websocket_scheme 'http://localhost:8080/hawkular/inventory/'
|
175
|
+
expect(ret).to eq('ws://localhost:8080/hawkular/inventory/')
|
176
|
+
|
177
|
+
ret = c.url_with_websocket_scheme 'https://localhost:8443/hawkular/inventory/'
|
178
|
+
expect(ret).to eq('wss://localhost:8443/hawkular/inventory/')
|
179
|
+
|
180
|
+
ret = c.url_with_websocket_scheme 'http://localhost/hawkular/inventory/'
|
181
|
+
expect(ret).to eq('ws://localhost/hawkular/inventory/')
|
182
|
+
|
183
|
+
ret = c.url_with_websocket_scheme 'https://localhost/hawkular/inventory/'
|
184
|
+
expect(ret).to eq('wss://localhost/hawkular/inventory/')
|
185
|
+
|
186
|
+
ret = c.url_with_websocket_scheme 'http://localhost:8080/http'
|
187
|
+
expect(ret).to eq('ws://localhost:8080/http')
|
188
|
+
|
189
|
+
ret = c.url_with_websocket_scheme 'https://localhost:8443/http/https'
|
190
|
+
expect(ret).to eq('wss://localhost:8443/http/https')
|
191
|
+
|
192
|
+
ret = c.url_with_websocket_scheme 'ftp://http:8080'
|
193
|
+
expect(ret).to eq('ftp://http:8080')
|
194
|
+
|
195
|
+
ret = c.url_with_websocket_scheme 'ftp://https'
|
196
|
+
expect(ret).to eq('ftp://https')
|
197
|
+
|
198
|
+
uri = URI.parse 'http://localhost:8080/hawkular/inventory'
|
199
|
+
ret = c.url_with_websocket_scheme uri
|
200
|
+
expect(ret).to eq('ws://localhost:8080/hawkular/inventory')
|
201
|
+
|
202
|
+
uri = URI.parse 'https://localhost:8443/hawkular/inventory'
|
203
|
+
ret = c.url_with_websocket_scheme uri
|
204
|
+
expect(ret).to eq('wss://localhost:8443/hawkular/inventory')
|
205
|
+
end
|
206
|
+
|
160
207
|
it 'Should throw a HawkularConnectionException when host not listening to port' do
|
161
208
|
begin
|
162
209
|
WebMock.disable!
|
@@ -66,9 +66,6 @@ http_interactions:
|
|
66
66
|
"id" : "Reload"
|
67
67
|
}, {
|
68
68
|
"path" : "/t;hawkular/f;<%= feed_uuid %>/rt;WildFly%20Server/ot;Resume",
|
69
|
-
"properties" : {
|
70
|
-
"__identityHash" : "b5103168d783b0bb67bf88f30c1fad462b635e"
|
71
|
-
},
|
72
69
|
"name" : "Resume",
|
73
70
|
"identityHash" : "b5103168d783b0bb67bf88f30c1fad462b635e",
|
74
71
|
"id" : "Resume"
|
@@ -7,7 +7,7 @@
|
|
7
7
|
},
|
8
8
|
{
|
9
9
|
"operation": "write",
|
10
|
-
"data": "RGVwbG95QXBwbGljYXRpb25SZXF1ZXN0PXsicmVzb3VyY2VQYXRoIjoiL3Q7\naGF3a3VsYXIvZjszM2YyMmM0YS00NDVhLTRmOTAtYTI1ZS1jYWVmZjk1Nzlh\nMTAvcjtMb2NhbH5+IiwiZGVzdGluYXRpb25GaWxlTmFtZSI6InNhbXBsZS53\
|
10
|
+
"data": "RGVwbG95QXBwbGljYXRpb25SZXF1ZXN0PXsicmVzb3VyY2VQYXRoIjoiL3Q7\naGF3a3VsYXIvZjszM2YyMmM0Y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Wdlcy90b21jYXQuZ2lmUEsBAhQDCgAA\nAAgAToP+Nt0wgY9fAQAAfAIAAAoAAAAAAAAAAAAAAKSBew0AAGluZGV4Lmh0\nbWxQSwUGAAAAAAwADADmAgAAAg8AAAAA\n"
|
11
11
|
},
|
12
12
|
{
|
13
13
|
"operation": "read",
|
@@ -0,0 +1,26 @@
|
|
1
|
+
[
|
2
|
+
[
|
3
|
+
{
|
4
|
+
"operation": "read",
|
5
|
+
"type": "text",
|
6
|
+
"data": "WelcomeResponse={\"sessionId\":\"1j9HQbWoBj9RMQZIR0BwpnU3IkxoMwQ-O9_Cr1Ds\"}"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"operation": "write",
|
10
|
+
"data": "DisableApplicationRequest={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~\",\"destinationFileName\":\"\hawkular-alerts-actions-email.war\",\"authentication\":{\"username\":\"jdoe\",\"password\":\"password\"}}"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"operation": "read",
|
14
|
+
"type": "text",
|
15
|
+
"data": "GenericSuccessResponse={\"message\":\"The request has been forwarded to feed [33f22c4a-445a-4f90-a25e-caeff9579a10] (MessageId=ID:36ddc6df-fb44-11e5-b1c9-a1ce6a627f23)\"}"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"operation": "read",
|
19
|
+
"type": "text",
|
20
|
+
"data": "DisableApplicationResponse={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~\",\"destinationFileName\":\"\hawkular-alerts-actions-email.war\",\"destinationSessionId\":\"1j9HQbWoBj9RMQZIR0BwpnU3IkxoMwQ-O9_Cr1Ds\",\"status\":\"OK\",\"message\":\"Performed [Undeploy] on a [DMR Node] given by Inventory path [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dhawkular-alerts-actions-email.war]\"}"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"operation": "close"
|
24
|
+
}
|
25
|
+
]
|
26
|
+
]
|
data/spec/vcr_cassettes/Operation/Operation/Restart_can_be_run_multiple_times_in_parallel.json
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
[
|
2
|
+
[
|
3
|
+
{
|
4
|
+
"operation": "read",
|
5
|
+
"type": "text",
|
6
|
+
"data": "WelcomeResponse={\"sessionId\":\"CB5bP3YS_n9_k7ARVPvAR5BoQ1igWPQ6fC19j6ye\"}"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"operation": "write",
|
10
|
+
"data": "RestartApplicationRequest={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~\",\"destinationFileName\":\"hawkular-alerts-actions-email.war\",\"authentication\":{\"username\":\"jdoe\",\"password\":\"password\"}}"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"operation": "write",
|
14
|
+
"data": "RestartApplicationRequest={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~\",\"destinationFileName\":\"hawkular-console.war\",\"authentication\":{\"username\":\"jdoe\",\"password\":\"password\"}}"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"operation": "read",
|
18
|
+
"type": "text",
|
19
|
+
"data": "GenericSuccessResponse={\"message\":\"The request has been forwarded to feed [33f22c4a-445a-4f90-a25e-caeff9579a10] (MessageId=ID:38d0e491-fb44-11e5-b1c9-a1ce6a627f23)\"}"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"operation": "read",
|
23
|
+
"type": "text",
|
24
|
+
"data": "GenericSuccessResponse={\"message\":\"The request has been forwarded to feed [33f22c4a-445a-4f90-a25e-caeff9579a10] (MessageId=ID:38daf6bd-fb44-11e5-b1c9-a1ce6a627f23)\"}"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"operation": "read",
|
28
|
+
"type": "text",
|
29
|
+
"data": "RestartApplicationResponse={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~,\"destinationFileName\":\"hawkular-alerts-actions-email.war\",\"destinationSessionId\":\"CB5bP3YS_n9_k7ARVPvAR5BoQ1igWPQ6fC19j6ye\",\"status\":\"OK\",\"message\":\"Performed [Restart Deployment] on a [DMR Node] given by Inventory path [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dhawkular-alerts-actions-email.war]\"}"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"operation": "read",
|
33
|
+
"type": "text",
|
34
|
+
"data": "RestartApplicationResponse={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~\",\"destinationFileName\":\"hawkular-console.war\",\"destinationSessionId\":\"CB5bP3YS_n9_k7ARVPvAR5BoQ1igWPQ6fC19j6ye\",\"status\":\"OK\",\"message\":\"Performed [Restart Deployment] on a [DMR Node] given by Inventory path [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dhawkular-console.war]\"}"
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"operation": "close"
|
38
|
+
}
|
39
|
+
]
|
40
|
+
]
|
@@ -0,0 +1,26 @@
|
|
1
|
+
[
|
2
|
+
[
|
3
|
+
{
|
4
|
+
"operation": "read",
|
5
|
+
"type": "text",
|
6
|
+
"data": "WelcomeResponse={\"sessionId\":\"D81EmhsShV22hk4gNJrNgfIrnvwMVez_KkmkOaPj\"}"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"operation": "write",
|
10
|
+
"data": "RestartApplicationRequest={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~\",\"destinationFileName\":\"hawkular-alerts-actions-email.war\",\"authentication\":{\"username\":\"jdoe\",\"password\":\"password\"}}"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"operation": "read",
|
14
|
+
"type": "text",
|
15
|
+
"data": "GenericSuccessResponse={\"message\":\"The request has been forwarded to feed [33f22c4a-445a-4f90-a25e-caeff9579a10] (MessageId=ID:329101d3-fb44-11e5-b1c9-a1ce6a627f23)\"}"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"operation": "read",
|
19
|
+
"type": "text",
|
20
|
+
"data": "RestartApplicationResponse={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~\",\"destinationFileName\":\"hawkular-alerts-actions-email.war\",\"SessionId\":\"D81EmhsShV22hk4gNJrNgfIrnvwMVez_KkmkOaPj\",\"status\":\"OK\",\"message\":\"Performed [Restart Deployment] on a [DMR Node] given by Inventory path [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~]\"}"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"operation": "close"
|
24
|
+
}
|
25
|
+
]
|
26
|
+
]
|
@@ -0,0 +1,26 @@
|
|
1
|
+
[
|
2
|
+
[
|
3
|
+
{
|
4
|
+
"operation": "read",
|
5
|
+
"type": "text",
|
6
|
+
"data": "WelcomeResponse={\"sessionId\":\"xlRRFghvhkdeTkwQuhWlfFMdkV1Nt5trBWsOGf5O\"}"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"operation": "write",
|
10
|
+
"data": "RestartApplicationRequest={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Unknown~~\",\"destinationFileName\":\"non-existent.war\",\"authentication\":{\"username\":\"jdoe\",\"password\":\"password\"}}"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"operation": "read",
|
14
|
+
"type": "text",
|
15
|
+
"data": "GenericSuccessResponse={\"message\":\"The request has been forwarded to feed [33f22c4a-445a-4f90-a25e-caeff9579a10] (MessageId=ID:f2b3d9e3-6490-11e6-9315-873fe20652b4)\"}"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"operation": "read",
|
19
|
+
"type": "text",
|
20
|
+
"data": "RestartApplicationResponse={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Unknown~~\",\"destinationFileName\":\"non-existent.war\",\"SessionId\":\"xlRRFghvhkdeTkwQuhWlfFMdkV1Nt5trBWsOGf5O\",\"status\":\"ERROR\",\"message\":\"Cannot restart application: unknown resource [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Unknown~~]\"}"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"operation": "close"
|
24
|
+
}
|
25
|
+
]
|
26
|
+
]
|
@@ -7,7 +7,7 @@
|
|
7
7
|
},
|
8
8
|
{
|
9
9
|
"operation": "write",
|
10
|
-
"data": "UndeployApplicationRequest={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~\",\"destinationFileName\":\"\
|
10
|
+
"data": "UndeployApplicationRequest={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~\",\"removeContent\":true,\"destinationFileName\":\"\sample.war\",\"authentication\":{\"username\":\"jdoe\",\"password\":\"password\"}}"
|
11
11
|
},
|
12
12
|
{
|
13
13
|
"operation": "read",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
{
|
18
18
|
"operation": "read",
|
19
19
|
"type": "text",
|
20
|
-
"data": "UndeployApplicationResponse={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~\",\"destinationFileName\":\"\hawkular-alerts-actions-email.war\",\"destinationSessionId\":\"1j9HQbWoBj9RMQZIR0BwpnU3IkxoMwQ-O9_Cr1Ds\",\"status\":\"OK\",\"message\":\"Performed [Undeploy] on a [DMR Node] given by Inventory path [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%
|
20
|
+
"data": "UndeployApplicationResponse={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~\",\"destinationFileName\":\"\hawkular-alerts-actions-email.war\",\"destinationSessionId\":\"1j9HQbWoBj9RMQZIR0BwpnU3IkxoMwQ-O9_Cr1Ds\",\"status\":\"OK\",\"message\":\"Performed [Undeploy] on a [DMR Node] given by Inventory path [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dsample.war]\"}"
|
21
21
|
},
|
22
22
|
{
|
23
23
|
"operation": "close"
|
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: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Libor Zoubek
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-08-
|
14
|
+
date: 2016-08-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rest-client
|
@@ -195,7 +195,8 @@ dependencies:
|
|
195
195
|
- - "~>"
|
196
196
|
- !ruby/object:Gem::Version
|
197
197
|
version: 1.6.4
|
198
|
-
description:
|
198
|
+
description: |2
|
199
|
+
A Ruby client for Hawkular
|
199
200
|
email:
|
200
201
|
- lzoubek@redhat.com
|
201
202
|
- hrupp@redhat.com
|
@@ -418,13 +419,13 @@ files:
|
|
418
419
|
- spec/vcr_cassettes/Operation/Operation/Add_JDBC_driver_should_add_the_driver.json
|
419
420
|
- spec/vcr_cassettes/Operation/Operation/Add_datasource_should_be_doable.json
|
420
421
|
- spec/vcr_cassettes/Operation/Operation/Add_deployment_should_be_doable.json
|
421
|
-
- spec/vcr_cassettes/Operation/Operation/
|
422
|
-
- spec/vcr_cassettes/Operation/Operation/Redeploy_should_be_performed_and_eventually_respond_with_success.json
|
423
|
-
- spec/vcr_cassettes/Operation/Operation/Redeploy_should_not_be_performed_if_resource_path_is_wrong.json
|
422
|
+
- spec/vcr_cassettes/Operation/Operation/Disable_should_be_performed_and_eventually_respond_with_success.json
|
424
423
|
- spec/vcr_cassettes/Operation/Operation/Remove_JDBC_driver_should_be_performed_and_eventually_respond_with_success.json
|
425
424
|
- spec/vcr_cassettes/Operation/Operation/Remove_datasource_should_be_performed_and_eventually_respond_with_success.json
|
426
|
-
- spec/vcr_cassettes/Operation/Operation/
|
427
|
-
- spec/vcr_cassettes/Operation/Operation/
|
425
|
+
- spec/vcr_cassettes/Operation/Operation/Restart_can_be_run_multiple_times_in_parallel.json
|
426
|
+
- spec/vcr_cassettes/Operation/Operation/Restart_should_be_performed_and_eventually_respond_with_success.json
|
427
|
+
- spec/vcr_cassettes/Operation/Operation/Restart_should_not_be_performed_if_resource_path_is_wrong.json
|
428
|
+
- spec/vcr_cassettes/Operation/Operation/Undeploy_deployment_should_be_performed_and_eventually_respond_with_success.json
|
428
429
|
- spec/vcr_cassettes/Operation/Operation/should_not_be_possible_to_perform_on_closed_client.json
|
429
430
|
- spec/vcr_cassettes/Operation/Websocket_connection/should_bail_with_hash_property_error_because_no_callback_at_all.json
|
430
431
|
- spec/vcr_cassettes/Operation/Websocket_connection/should_bail_with_hash_property_error_because_no_error-callback_.json
|
@@ -655,13 +656,13 @@ test_files:
|
|
655
656
|
- spec/vcr_cassettes/Operation/Operation/Add_JDBC_driver_should_add_the_driver.json
|
656
657
|
- spec/vcr_cassettes/Operation/Operation/Add_datasource_should_be_doable.json
|
657
658
|
- spec/vcr_cassettes/Operation/Operation/Add_deployment_should_be_doable.json
|
658
|
-
- spec/vcr_cassettes/Operation/Operation/
|
659
|
-
- spec/vcr_cassettes/Operation/Operation/Redeploy_should_be_performed_and_eventually_respond_with_success.json
|
660
|
-
- spec/vcr_cassettes/Operation/Operation/Redeploy_should_not_be_performed_if_resource_path_is_wrong.json
|
659
|
+
- spec/vcr_cassettes/Operation/Operation/Disable_should_be_performed_and_eventually_respond_with_success.json
|
661
660
|
- spec/vcr_cassettes/Operation/Operation/Remove_JDBC_driver_should_be_performed_and_eventually_respond_with_success.json
|
662
661
|
- spec/vcr_cassettes/Operation/Operation/Remove_datasource_should_be_performed_and_eventually_respond_with_success.json
|
663
|
-
- spec/vcr_cassettes/Operation/Operation/
|
664
|
-
- spec/vcr_cassettes/Operation/Operation/
|
662
|
+
- spec/vcr_cassettes/Operation/Operation/Restart_can_be_run_multiple_times_in_parallel.json
|
663
|
+
- spec/vcr_cassettes/Operation/Operation/Restart_should_be_performed_and_eventually_respond_with_success.json
|
664
|
+
- spec/vcr_cassettes/Operation/Operation/Restart_should_not_be_performed_if_resource_path_is_wrong.json
|
665
|
+
- spec/vcr_cassettes/Operation/Operation/Undeploy_deployment_should_be_performed_and_eventually_respond_with_success.json
|
665
666
|
- spec/vcr_cassettes/Operation/Operation/should_not_be_possible_to_perform_on_closed_client.json
|
666
667
|
- spec/vcr_cassettes/Operation/Websocket_connection/should_bail_with_hash_property_error_because_no_callback_at_all.json
|
667
668
|
- spec/vcr_cassettes/Operation/Websocket_connection/should_bail_with_hash_property_error_because_no_error-callback_.json
|
@@ -674,4 +675,3 @@ test_files:
|
|
674
675
|
- spec/vcr_cassettes/Tokens/Should_be_able_to_list_the_available_tokens.yml
|
675
676
|
- spec/vcr_cassettes/Tokens/Should_get_a_401_when_attempting_to_create_a_token_with_a_wrong_password.yml
|
676
677
|
- spec/vcr_cassettes/Tokens/Should_get_a_401_when_attempting_to_create_a_token_without_a_password.yml
|
677
|
-
has_rdoc:
|
data/spec/vcr_cassettes/Operation/Operation/Redeploy_can_be_run_multiple_times_in_parallel.json
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
[
|
2
|
-
[
|
3
|
-
{
|
4
|
-
"operation": "read",
|
5
|
-
"type": "text",
|
6
|
-
"data": "WelcomeResponse={\"sessionId\":\"CB5bP3YS_n9_k7ARVPvAR5BoQ1igWPQ6fC19j6ye\"}"
|
7
|
-
},
|
8
|
-
{
|
9
|
-
"operation": "write",
|
10
|
-
"data": "ExecuteOperationRequest={\"operationName\":\"Redeploy\",\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dhawkular-alerts-actions-email.war\",\"authentication\":{\"username\":\"jdoe\",\"password\":\"password\"}}"
|
11
|
-
},
|
12
|
-
{
|
13
|
-
"operation": "write",
|
14
|
-
"data": "ExecuteOperationRequest={\"operationName\":\"Redeploy\",\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dhawkular-console.war\",\"authentication\":{\"username\":\"jdoe\",\"password\":\"password\"}}"
|
15
|
-
},
|
16
|
-
{
|
17
|
-
"operation": "read",
|
18
|
-
"type": "text",
|
19
|
-
"data": "GenericSuccessResponse={\"message\":\"The request has been forwarded to feed [33f22c4a-445a-4f90-a25e-caeff9579a10] (MessageId=ID:38d0e491-fb44-11e5-b1c9-a1ce6a627f23)\"}"
|
20
|
-
},
|
21
|
-
{
|
22
|
-
"operation": "read",
|
23
|
-
"type": "text",
|
24
|
-
"data": "GenericSuccessResponse={\"message\":\"The request has been forwarded to feed [33f22c4a-445a-4f90-a25e-caeff9579a10] (MessageId=ID:38daf6bd-fb44-11e5-b1c9-a1ce6a627f23)\"}"
|
25
|
-
},
|
26
|
-
{
|
27
|
-
"operation": "read",
|
28
|
-
"type": "text",
|
29
|
-
"data": "ExecuteOperationResponse={\"operationName\":\"Redeploy\",\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dhawkular-alerts-actions-email.war\",\"destinationSessionId\":\"CB5bP3YS_n9_k7ARVPvAR5BoQ1igWPQ6fC19j6ye\",\"status\":\"OK\",\"message\":\"Performed [Redeploy] on a [DMR Node] given by Inventory path [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dhawkular-alerts-actions-email.war]\"}"
|
30
|
-
},
|
31
|
-
{
|
32
|
-
"operation": "read",
|
33
|
-
"type": "text",
|
34
|
-
"data": "ExecuteOperationResponse={\"operationName\":\"Redeploy\",\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dhawkular-console.war\",\"destinationSessionId\":\"CB5bP3YS_n9_k7ARVPvAR5BoQ1igWPQ6fC19j6ye\",\"status\":\"OK\",\"message\":\"Performed [Redeploy] on a [DMR Node] given by Inventory path [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dhawkular-console.war]\"}"
|
35
|
-
},
|
36
|
-
{
|
37
|
-
"operation": "close"
|
38
|
-
}
|
39
|
-
]
|
40
|
-
]
|
@@ -1,26 +0,0 @@
|
|
1
|
-
[
|
2
|
-
[
|
3
|
-
{
|
4
|
-
"operation": "read",
|
5
|
-
"type": "text",
|
6
|
-
"data": "WelcomeResponse={\"sessionId\":\"D81EmhsShV22hk4gNJrNgfIrnvwMVez_KkmkOaPj\"}"
|
7
|
-
},
|
8
|
-
{
|
9
|
-
"operation": "write",
|
10
|
-
"data": "ExecuteOperationRequest={\"operationName\":\"Redeploy\",\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dhawkular-alerts-actions-email.war\",\"authentication\":{\"username\":\"jdoe\",\"password\":\"password\"}}"
|
11
|
-
},
|
12
|
-
{
|
13
|
-
"operation": "read",
|
14
|
-
"type": "text",
|
15
|
-
"data": "GenericSuccessResponse={\"message\":\"The request has been forwarded to feed [33f22c4a-445a-4f90-a25e-caeff9579a10] (MessageId=ID:329101d3-fb44-11e5-b1c9-a1ce6a627f23)\"}"
|
16
|
-
},
|
17
|
-
{
|
18
|
-
"operation": "read",
|
19
|
-
"type": "text",
|
20
|
-
"data": "ExecuteOperationResponse={\"operationName\":\"Redeploy\",\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dhawkular-alerts-actions-email.war\",\"destinationSessionId\":\"D81EmhsShV22hk4gNJrNgfIrnvwMVez_KkmkOaPj\",\"status\":\"OK\",\"message\":\"Performed [Redeploy] on a [DMR Node] given by Inventory path [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dhawkular-alerts-actions-email.war]\"}"
|
21
|
-
},
|
22
|
-
{
|
23
|
-
"operation": "close"
|
24
|
-
}
|
25
|
-
]
|
26
|
-
]
|
@@ -1,26 +0,0 @@
|
|
1
|
-
[
|
2
|
-
[
|
3
|
-
{
|
4
|
-
"operation": "read",
|
5
|
-
"type": "text",
|
6
|
-
"data": "WelcomeResponse={\"sessionId\":\"43-JJwrYjacaVjWtUXmNc6Y6kphr6OXzbxbgsfic\"}"
|
7
|
-
},
|
8
|
-
{
|
9
|
-
"operation": "write",
|
10
|
-
"data": "ExecuteOperationRequest={\"operationName\":\"Redeploy\",\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dnon-existent.war\",\"authentication\":{\"username\":\"jdoe\",\"password\":\"password\"}}"
|
11
|
-
},
|
12
|
-
{
|
13
|
-
"operation": "read",
|
14
|
-
"type": "text",
|
15
|
-
"data": "GenericSuccessResponse={\"message\":\"The request has been forwarded to feed [33f22c4a-445a-4f90-a25e-caeff9579a10] (MessageId=ID:360b0d35-fb44-11e5-b1c9-a1ce6a627f23)\"}"
|
16
|
-
},
|
17
|
-
{
|
18
|
-
"operation": "read",
|
19
|
-
"type": "text",
|
20
|
-
"data": "ExecuteOperationResponse={\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dnon-existent.war\",\"destinationSessionId\":\"43-JJwrYjacaVjWtUXmNc6Y6kphr6OXzbxbgsfic\",\"status\":\"ERROR\",\"message\":\"Could not perform [Redeploy] on a [DMR Node] given by inventory path [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dnon-existent.war] requested on [2016-04-05T15:36Z]: Cannot execute operation: unknown resource [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment%3Dnon-existent.war]\"}"
|
21
|
-
},
|
22
|
-
{
|
23
|
-
"operation": "close"
|
24
|
-
}
|
25
|
-
]
|
26
|
-
]
|
@@ -1,26 +0,0 @@
|
|
1
|
-
[
|
2
|
-
[
|
3
|
-
{
|
4
|
-
"operation": "read",
|
5
|
-
"type": "text",
|
6
|
-
"data": "WelcomeResponse={\"sessionId\":\"ooyUICUPRH9DYgcp97vj4MyBnvBZmbDDk86mkBio\"}"
|
7
|
-
},
|
8
|
-
{
|
9
|
-
"operation": "write",
|
10
|
-
"data": "ExecuteOperationRequest={\"operationName\":\"Remove\",\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment=sample.war\",\"authentication\":{\"username\":\"jdoe\",\"password\":\"password\"}}"
|
11
|
-
},
|
12
|
-
{
|
13
|
-
"operation": "read",
|
14
|
-
"type": "text",
|
15
|
-
"data": "GenericSuccessResponse={\"message\":\"The request has been forwarded to feed [33f22c4a-445a-4f90-a25e-caeff9579a10] (MessageId=ID:99066924-fb44-11e5-b1c9-a1ce6a627f23)\"}"
|
16
|
-
},
|
17
|
-
{
|
18
|
-
"operation": "read",
|
19
|
-
"type": "text",
|
20
|
-
"data": "ExecuteOperationResponse={\"operationName\":\"Remove\",\"resourcePath\":\"/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment=sample.war\",\"destinationSessionId\":\"ooyUICUPRH9DYgcp97vj4MyBnvBZmbDDk86mkBio\",\"status\":\"OK\",\"message\":\"Performed [Remove] on a [DMR Node] given by Inventory path [/t;hawkular/f;33f22c4a-445a-4f90-a25e-caeff9579a10/r;Local~~/r;Local~%2Fdeployment=sample.war]\",\"serverRefreshIndicator\":\"RELOAD-REQUIRED\"}"
|
21
|
-
},
|
22
|
-
{
|
23
|
-
"operation": "close"
|
24
|
-
}
|
25
|
-
]
|
26
|
-
]
|