hammer_cli_foreman_tasks 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MTM3NGJlYWMwNTdjZDFjYzRhMDBkYWU5MzhjOTdkOWUyZjExYTY4ZA==
5
+ data.tar.gz: !binary |-
6
+ Njc0NWI2NWMxN2ZjZGM4ZDE4OWExMTllZDBlNGU0ZTdiMTc1OTBmZg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZWZiY2YxNjUyYmQzOTY0ZjFjYzg5NTBjOGZiYjVmYWFiNjBmNGQxYjdiM2U2
10
+ ZjJkY2E5MTUyMWNlNDYzZGVlOTg5YjA2MmJjY2Y0MjZmYWRjOGNiZjYxNjlm
11
+ YTM1Y2IzNTJkNmZjMDAyNDIyZWVlYmZiODRlYWVlOTgwYWY1Y2Y=
12
+ data.tar.gz: !binary |-
13
+ ZjVmNTAzMjhjNjJjNjA2MDEwNzFmMTFkZjgxYTY2MGU2NTc1NWMwY2M5MTZh
14
+ ZGE2ZjJkYzA4Yzc4NGY3M2MzMGFhZjVhNWFhNmI0Y2FmYTE3Zjg3YWQ1YTJl
15
+ ZjEyN2E3NWQ0MzViYjc4Yzc4ODNlYWYwNTkxZDc2YmRkMzE4MzQ=
@@ -11,7 +11,7 @@ module HammerCLIForemanTasks
11
11
  build_options
12
12
 
13
13
  command_name "progress"
14
- desc "Show the progress of the task"
14
+ desc _("Show the progress of the task")
15
15
 
16
16
  def execute
17
17
  task_progress(option_id)
@@ -20,6 +20,71 @@ module HammerCLIForemanTasks
20
20
 
21
21
  end
22
22
 
23
+ class ListCommand < HammerCLIForeman::ListCommand
24
+ output do
25
+ field :id, _('Id')
26
+ field :action, _('Name')
27
+ field :username, _('Owner')
28
+ field :started_at, _('Started at'), Fields::Date
29
+ field :ended_at, _('Ended at'), Fields::Date
30
+ field :state, _('State')
31
+ field :result, _('Result')
32
+ from :humanized do
33
+ field :action, _('Task action')
34
+ field :errors, _('Task errors'), Fields::List, :hide_blank => true
35
+ end
36
+ end
37
+
38
+ build_options
39
+ end
40
+
41
+ class ResumeCommand < HammerCLIForeman::InfoCommand
42
+ action :bulk_resume
43
+
44
+ command_name "resume"
45
+ desc _("Resume all tasks paused in error state")
46
+
47
+ output do
48
+ field :total, _("Total tasks found paused in error state")
49
+
50
+ field :total_resumed, _("Total tasks resumed")
51
+ collection :resumed, _("Resumed tasks") do
52
+ field :id, _("Task identifier")
53
+ from :humanized do
54
+ field :action, _("Task action")
55
+ field :errors, _("Task errors"), Fields::List, :hide_blank => true
56
+ end
57
+ end
58
+
59
+ field :total_failed, _("Total tasks failed to resume")
60
+ collection :failed, _("Failed tasks") do
61
+ field :id, _("Task identifier")
62
+ from :humanized do
63
+ field :action, _("Task action")
64
+ field :errors, _("Task errors"), Fields::List, :hide_blank => true
65
+ end
66
+ end
67
+
68
+ field :total_skipped, _("Total tasks skipped")
69
+ collection :skipped, _("Skipped tasks") do
70
+ field :id, _("Task identifier")
71
+ from :humanized do
72
+ field :action, _("Task action")
73
+ field :errors, _("Task errors"), Fields::List, :hide_blank => true
74
+ end
75
+ end
76
+ end
77
+
78
+ def extend_data(data)
79
+ data["total_resumed"] = data["resumed"].length
80
+ data["total_failed"] = data["failed"].length
81
+ data["total_skipped"] = data["skipped"].length
82
+ data
83
+ end
84
+
85
+ build_options
86
+ end
87
+
23
88
  autoload_subcommands
24
89
  end
25
90
 
@@ -1,5 +1,5 @@
1
1
  module HammerCLIForemanTasks
2
2
  def self.version
3
- @version ||= Gem::Version.new('0.0.6')
3
+ @version ||= Gem::Version.new('0.0.7')
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli_foreman_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
5
- prerelease:
4
+ version: 0.0.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ivan Nečas
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-04-27 00:00:00.000000000 Z
11
+ date: 2015-08-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: powerbar
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,25 +27,23 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: hammer_cli_foreman
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>'
36
32
  - !ruby/object:Gem::Version
37
33
  version: 0.1.1
38
34
  - - <
39
35
  - !ruby/object:Gem::Version
40
- version: 0.3.0
36
+ version: 0.4.0
41
37
  type: :runtime
42
38
  prerelease: false
43
39
  version_requirements: !ruby/object:Gem::Requirement
44
- none: false
45
40
  requirements:
46
41
  - - ! '>'
47
42
  - !ruby/object:Gem::Version
48
43
  version: 0.1.1
49
44
  - - <
50
45
  - !ruby/object:Gem::Version
51
- version: 0.3.0
46
+ version: 0.4.0
52
47
  description: ! 'Contains the code for showing of the tasks (results and progress)
53
48
  in the Hammer CLI.
54
49
 
@@ -59,39 +54,38 @@ executables: []
59
54
  extensions: []
60
55
  extra_rdoc_files: []
61
56
  files:
62
- - lib/hammer_cli_foreman_tasks/version.rb
63
- - lib/hammer_cli_foreman_tasks/async_command.rb
64
- - lib/hammer_cli_foreman_tasks/task_progress.rb
65
- - lib/hammer_cli_foreman_tasks/task.rb
66
- - lib/hammer_cli_foreman_tasks/helper.rb
67
- - lib/hammer_cli_foreman_tasks.rb
68
- - config/foreman_tasks.yml
69
57
  - LICENSE
70
58
  - README.md
59
+ - config/foreman_tasks.yml
60
+ - lib/hammer_cli_foreman_tasks.rb
61
+ - lib/hammer_cli_foreman_tasks/async_command.rb
62
+ - lib/hammer_cli_foreman_tasks/helper.rb
63
+ - lib/hammer_cli_foreman_tasks/task.rb
64
+ - lib/hammer_cli_foreman_tasks/task_progress.rb
65
+ - lib/hammer_cli_foreman_tasks/version.rb
71
66
  homepage: https://github.com/theforeman/hammer-cli-foreman-tasks
72
67
  licenses:
73
68
  - GPL-3
69
+ metadata: {}
74
70
  post_install_message:
75
71
  rdoc_options: []
76
72
  require_paths:
77
73
  - lib
78
74
  required_ruby_version: !ruby/object:Gem::Requirement
79
- none: false
80
75
  requirements:
81
76
  - - ! '>='
82
77
  - !ruby/object:Gem::Version
83
78
  version: '0'
84
79
  required_rubygems_version: !ruby/object:Gem::Requirement
85
- none: false
86
80
  requirements:
87
81
  - - ! '>='
88
82
  - !ruby/object:Gem::Version
89
83
  version: '0'
90
84
  requirements: []
91
85
  rubyforge_project:
92
- rubygems_version: 1.8.23
86
+ rubygems_version: 2.4.3
93
87
  signing_key:
94
- specification_version: 3
88
+ specification_version: 4
95
89
  summary: Foreman CLI plugin for showing tasks information for resoruces and users
96
90
  test_files: []
97
91
  has_rdoc: