dtk-client 0.7.4.1 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/dtk +10 -3
- data/bin/dtk-shell +1 -1
- data/lib/command_helpers/git_repo.rb +26 -20
- data/lib/command_helpers/jenkins_client.rb +4 -3
- data/lib/command_helpers/service_importer.rb +37 -25
- data/lib/commands.rb +2 -2
- data/lib/commands/common/thor/assembly_workspace.rb +185 -173
- data/lib/commands/common/thor/base_command_helper.rb +42 -0
- data/lib/commands/common/thor/clone.rb +1 -1
- data/lib/commands/common/thor/module.rb +37 -58
- data/lib/commands/common/thor/module/import.rb +1 -1
- data/lib/commands/common/thor/pull_from_remote.rb +7 -12
- data/lib/commands/common/thor/purge_clone.rb +1 -1
- data/lib/commands/common/thor/push_clone_changes.rb +3 -1
- data/lib/commands/common/thor/task_status.rb +52 -75
- data/lib/commands/common/thor/task_status/refresh_mode.rb +56 -0
- data/lib/commands/common/thor/task_status/snapshot_mode.rb +11 -0
- data/lib/commands/common/thor/task_status/stream_mode.rb +31 -0
- data/lib/commands/common/thor/task_status/stream_mode/element.rb +90 -0
- data/lib/commands/common/thor/task_status/stream_mode/element/no_results.rb +10 -0
- data/lib/commands/common/thor/task_status/stream_mode/element/render.rb +88 -0
- data/lib/commands/common/thor/task_status/stream_mode/element/stage.rb +13 -0
- data/lib/commands/common/thor/task_status/stream_mode/element/task_end.rb +10 -0
- data/lib/commands/common/thor/task_status/stream_mode/element/task_start.rb +10 -0
- data/lib/commands/thor/account.rb +10 -8
- data/lib/commands/thor/assembly.rb +9 -2
- data/lib/commands/thor/component_module.rb +0 -52
- data/lib/commands/thor/library.rb +1 -0
- data/lib/commands/thor/node.rb +1 -36
- data/lib/commands/thor/node_template.rb +4 -47
- data/lib/commands/thor/service.rb +57 -46
- data/lib/commands/thor/service_module.rb +2 -49
- data/lib/commands/thor/target.rb +7 -7
- data/lib/commands/thor/workspace.rb +44 -27
- data/lib/context_router.rb +4 -0
- data/lib/core.rb +71 -99
- data/lib/domain/response.rb +9 -0
- data/lib/domain/response/error_handler.rb +61 -0
- data/lib/dtk-client/version.rb +1 -1
- data/lib/dtk_client.rb +14 -0
- data/lib/dtk_error.rb +91 -0
- data/lib/error.rb +3 -9
- data/lib/execute/cli_pure/cli_rerouter.rb +82 -0
- data/lib/parser/adapters/thor.rb +3 -0
- data/lib/shell.rb +2 -1
- data/lib/shell/domain/context_params.rb +2 -0
- data/lib/util/console.rb +1 -1
- data/lib/util/os_util.rb +1 -0
- data/lib/util/remote_dependency_util.rb +20 -3
- data/lib/view_processor/table_print.rb +7 -25
- metadata +17 -5
- data/lib/commands/common/thor/test_action_agent.rb +0 -39
- data/lib/commands/thor/repo.rb +0 -35
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dtk-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rich PELAVIN
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|
@@ -214,6 +214,7 @@ files:
|
|
214
214
|
- lib/commands/common/thor/action_result_handler.rb
|
215
215
|
- lib/commands/common/thor/assembly_template.rb
|
216
216
|
- lib/commands/common/thor/assembly_workspace.rb
|
217
|
+
- lib/commands/common/thor/base_command_helper.rb
|
217
218
|
- lib/commands/common/thor/clone.rb
|
218
219
|
- lib/commands/common/thor/common.rb
|
219
220
|
- lib/commands/common/thor/common_base.rb
|
@@ -234,7 +235,15 @@ files:
|
|
234
235
|
- lib/commands/common/thor/reparse.rb
|
235
236
|
- lib/commands/common/thor/set_required_attributes.rb
|
236
237
|
- lib/commands/common/thor/task_status.rb
|
237
|
-
- lib/commands/common/thor/
|
238
|
+
- lib/commands/common/thor/task_status/refresh_mode.rb
|
239
|
+
- lib/commands/common/thor/task_status/snapshot_mode.rb
|
240
|
+
- lib/commands/common/thor/task_status/stream_mode.rb
|
241
|
+
- lib/commands/common/thor/task_status/stream_mode/element.rb
|
242
|
+
- lib/commands/common/thor/task_status/stream_mode/element/no_results.rb
|
243
|
+
- lib/commands/common/thor/task_status/stream_mode/element/render.rb
|
244
|
+
- lib/commands/common/thor/task_status/stream_mode/element/stage.rb
|
245
|
+
- lib/commands/common/thor/task_status/stream_mode/element/task_end.rb
|
246
|
+
- lib/commands/common/thor/task_status/stream_mode/element/task_start.rb
|
238
247
|
- lib/commands/thor/account.rb
|
239
248
|
- lib/commands/thor/assembly.rb
|
240
249
|
- lib/commands/thor/attribute.rb
|
@@ -251,7 +260,6 @@ files:
|
|
251
260
|
- lib/commands/thor/project.rb
|
252
261
|
- lib/commands/thor/provider.rb
|
253
262
|
- lib/commands/thor/remotes.rb
|
254
|
-
- lib/commands/thor/repo.rb
|
255
263
|
- lib/commands/thor/service.rb
|
256
264
|
- lib/commands/thor/service_module.rb
|
257
265
|
- lib/commands/thor/state_change.rb
|
@@ -271,11 +279,15 @@ files:
|
|
271
279
|
- lib/domain/git_adapter.rb
|
272
280
|
- lib/domain/git_error_handler.rb
|
273
281
|
- lib/domain/response.rb
|
282
|
+
- lib/domain/response/error_handler.rb
|
274
283
|
- lib/dtk-client/version.rb
|
284
|
+
- lib/dtk_client.rb
|
275
285
|
- lib/dtk_constants.rb
|
286
|
+
- lib/dtk_error.rb
|
276
287
|
- lib/dtk_logger.rb
|
277
288
|
- lib/error.rb
|
278
289
|
- lib/execute.rb
|
290
|
+
- lib/execute/cli_pure/cli_rerouter.rb
|
279
291
|
- lib/execute/command.rb
|
280
292
|
- lib/execute/command/api_call.rb
|
281
293
|
- lib/execute/command/api_call/map.rb
|
@@ -367,7 +379,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
367
379
|
version: '0'
|
368
380
|
requirements: []
|
369
381
|
rubyforge_project:
|
370
|
-
rubygems_version: 2.4.
|
382
|
+
rubygems_version: 2.4.1
|
371
383
|
signing_key:
|
372
384
|
specification_version: 4
|
373
385
|
summary: DTK CLI client for DTK server interaction.
|
@@ -1,39 +0,0 @@
|
|
1
|
-
module DTK::Client
|
2
|
-
module TestActionAgent
|
3
|
-
|
4
|
-
def test_agent_aux(context_params)
|
5
|
-
service_id, node_id, bash_command = context_params.retrieve_arguments([:service_id!, :node_id!, :option_1!], method_argument_names)
|
6
|
-
|
7
|
-
post_body = {
|
8
|
-
:assembly_id => service_id,
|
9
|
-
:node_id => node_id,
|
10
|
-
:bash_command => bash_command
|
11
|
-
}
|
12
|
-
|
13
|
-
response = post(rest_url("assembly/initiate_action_agent"), post_body)
|
14
|
-
return response unless response.ok?
|
15
|
-
|
16
|
-
|
17
|
-
action_results_id = response.data(:action_results_id)
|
18
|
-
response = nil
|
19
|
-
|
20
|
-
loop do
|
21
|
-
post_body = {
|
22
|
-
:action_results_id => action_results_id,
|
23
|
-
:return_only_if_complete => true,
|
24
|
-
:disable_post_processing => false
|
25
|
-
}
|
26
|
-
|
27
|
-
response = post(rest_url("assembly/get_action_results"),post_body)
|
28
|
-
|
29
|
-
if response.data(:is_complete) || !response.ok?
|
30
|
-
break
|
31
|
-
else
|
32
|
-
sleep(1)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
return response
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
data/lib/commands/thor/repo.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
module DTK::Client
|
2
|
-
class Repo < CommandBaseThor
|
3
|
-
def self.pretty_print_cols()
|
4
|
-
PPColumns.get(:repo)
|
5
|
-
end
|
6
|
-
desc "list","List repos"
|
7
|
-
def list(context_params)
|
8
|
-
search_hash = SearchHash.new()
|
9
|
-
search_hash.cols = pretty_print_cols()
|
10
|
-
post rest_url("repo/list"), search_hash.post_body_hash()
|
11
|
-
end
|
12
|
-
|
13
|
-
desc "delete REPO-ID", "Delete repo"
|
14
|
-
method_option :force, :aliases => '-y', :type => :boolean, :default => false
|
15
|
-
def delete(context_params)
|
16
|
-
repo_id = context_params.retrieve_arguments([:repo_id!],method_argument_names)
|
17
|
-
unless options.force?
|
18
|
-
# Ask user if really want to delete repo, if not then return to dtk-shell without deleting
|
19
|
-
return unless Console.confirmation_prompt("Are you sure you want to delete repo '#{repo_id}'?")
|
20
|
-
end
|
21
|
-
|
22
|
-
post_body_hash = {:repo_id => repo_id}
|
23
|
-
post rest_url("repo/delete"),post_body_hash
|
24
|
-
end
|
25
|
-
|
26
|
-
desc "sync REPO-ID", "Synchronize target repo from actual files"
|
27
|
-
def sync(context_params)
|
28
|
-
repo_id = context_params.retrieve_arguments([:repo_id!],method_argument_names)
|
29
|
-
post_body_hash = {:repo_id => repo_id}
|
30
|
-
post rest_url("repo/synchronize_target_repo"),post_body_hash
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|