hammer_cli_katello 0.0.20 → 0.0.21
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/lib/hammer_cli_katello/associating_commands.rb +11 -11
- data/lib/hammer_cli_katello/content_host.rb +0 -6
- data/lib/hammer_cli_katello/content_view_version.rb +10 -0
- data/lib/hammer_cli_katello/host.rb +4 -0
- data/lib/hammer_cli_katello/host_collection.rb +23 -23
- data/lib/hammer_cli_katello/{content_host_errata.rb → host_errata.rb} +5 -5
- data/lib/hammer_cli_katello/repository.rb +19 -6
- data/lib/hammer_cli_katello/version.rb +1 -1
- metadata +13 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98af7a9663fc4e98bb4519596d20565e4951c8a4
|
4
|
+
data.tar.gz: e2a4f407aebb23efacc835290a789a7634f8943a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f783366272ba4a129d5979559d06eb325ac2c04342106c0d91298aac355f724c02917be172544c070ffcffdb65d9a6f8a14b223759ed56cce2f26a113246d65
|
7
|
+
data.tar.gz: 59e264ec16c2249a2642372751f87c01398a40d3d38eb14bf270946fcc30e1c717bdf181cf89d362558ae86c3ca5494cda8a10995b1a52670f9ac97818966af0
|
@@ -65,23 +65,23 @@ module HammerCLIKatello
|
|
65
65
|
|
66
66
|
end
|
67
67
|
|
68
|
-
module
|
68
|
+
module Host
|
69
69
|
extend HammerCLIForeman::AssociatingCommands::CommandExtension
|
70
70
|
|
71
|
-
class
|
72
|
-
command_name 'add-
|
73
|
-
associated_resource :
|
71
|
+
class AddHostCommand < HammerCLIKatello::AddAssociatedCommand
|
72
|
+
command_name 'add-host'
|
73
|
+
associated_resource :hosts
|
74
74
|
|
75
|
-
success_message _("The
|
76
|
-
failure_message _("Could not add
|
75
|
+
success_message _("The host has been added")
|
76
|
+
failure_message _("Could not add host")
|
77
77
|
end
|
78
78
|
|
79
|
-
class
|
80
|
-
command_name 'remove-
|
81
|
-
associated_resource :
|
79
|
+
class RemoveHostCommand < HammerCLIKatello::RemoveAssociatedCommand
|
80
|
+
command_name 'remove-host'
|
81
|
+
associated_resource :hosts
|
82
82
|
|
83
|
-
success_message _("The
|
84
|
-
failure_message _("Could not remove
|
83
|
+
success_message _("The host has been removed")
|
84
|
+
failure_message _("Could not remove host")
|
85
85
|
end
|
86
86
|
|
87
87
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'hammer_cli_katello/content_host_errata'
|
2
|
-
|
3
1
|
module HammerCLIKatello
|
4
2
|
|
5
3
|
class ContentHostCommand < HammerCLI::AbstractCommand
|
@@ -154,10 +152,6 @@ module HammerCLIKatello
|
|
154
152
|
end
|
155
153
|
|
156
154
|
autoload_subcommands
|
157
|
-
|
158
|
-
subcommand "errata",
|
159
|
-
HammerCLIKatello::ContentHostErrata.desc,
|
160
|
-
HammerCLIKatello::ContentHostErrata
|
161
155
|
end
|
162
156
|
|
163
157
|
end
|
@@ -182,6 +182,16 @@ module HammerCLIKatello
|
|
182
182
|
end
|
183
183
|
end
|
184
184
|
|
185
|
+
class ExportCommand < HammerCLIKatello::Command
|
186
|
+
action :export
|
187
|
+
command_name "export"
|
188
|
+
|
189
|
+
success_message _("Export complete")
|
190
|
+
failure_message _("Could not export")
|
191
|
+
|
192
|
+
build_options
|
193
|
+
end
|
194
|
+
|
185
195
|
autoload_subcommands
|
186
196
|
end
|
187
197
|
end
|
@@ -1,8 +1,12 @@
|
|
1
1
|
require 'hammer_cli_foreman/host'
|
2
|
+
require 'hammer_cli_katello/host_errata'
|
2
3
|
require 'hammer_cli_katello/host_package'
|
3
4
|
require 'hammer_cli_katello/host_package_group'
|
4
5
|
|
5
6
|
module HammerCLIKatello
|
7
|
+
HammerCLIForeman::Host.subcommand "errata",
|
8
|
+
HammerCLIKatello::HostErrata.desc,
|
9
|
+
HammerCLIKatello::HostErrata
|
6
10
|
|
7
11
|
HammerCLIForeman::Host.subcommand "package",
|
8
12
|
HammerCLIKatello::HostPackage.desc,
|
@@ -7,21 +7,21 @@ module HammerCLIKatello
|
|
7
7
|
def self.included(base)
|
8
8
|
base.option("--host-collection-ids",
|
9
9
|
"HOST_COLLECTION_IDS",
|
10
|
-
_("Array of
|
10
|
+
_("Array of host ids to replace the hosts in host collection"),
|
11
11
|
:format => HammerCLI::Options::Normalizers::List.new)
|
12
12
|
end
|
13
13
|
|
14
14
|
def request_params
|
15
15
|
params = super
|
16
|
-
params['
|
17
|
-
params.delete('
|
16
|
+
params['host_ids'] = option_host_ids unless option_host_ids.nil?
|
17
|
+
params.delete('host_ids') if params.keys.include? 'host_ids'
|
18
18
|
params
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
module LimitFieldDataExtension
|
23
23
|
def extend_data(data)
|
24
|
-
data['_limit'] = data['
|
24
|
+
data['_limit'] = data['unlimited_hosts'] ? 'None' : data['max_hosts']
|
25
25
|
data
|
26
26
|
end
|
27
27
|
end
|
@@ -45,15 +45,15 @@ module HammerCLIKatello
|
|
45
45
|
resource :host_collections, :create
|
46
46
|
def request_params
|
47
47
|
super.tap do |params|
|
48
|
-
if params['
|
49
|
-
params['
|
48
|
+
if params['max_hosts'] && params['unlimited_hosts'].nil?
|
49
|
+
params['unlimited_hosts'] = false
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
success_message _("Host collection created")
|
55
55
|
failure_message _("Could not create the host collection")
|
56
|
-
build_options :without => [:
|
56
|
+
build_options :without => [:host_ids]
|
57
57
|
end
|
58
58
|
|
59
59
|
class InfoCommand < HammerCLIKatello::InfoCommand
|
@@ -61,18 +61,18 @@ module HammerCLIKatello
|
|
61
61
|
resource :host_collections, :show
|
62
62
|
|
63
63
|
output ListCommand.output_definition do
|
64
|
-
field :
|
64
|
+
field :total_hosts, _("Total Hosts")
|
65
65
|
end
|
66
66
|
|
67
67
|
build_options
|
68
68
|
end
|
69
69
|
|
70
|
-
class
|
71
|
-
resource :host_collections, :
|
72
|
-
command_name "
|
70
|
+
class HostsCommand < HammerCLIKatello::ListCommand
|
71
|
+
resource :host_collections, :hosts
|
72
|
+
command_name "hosts"
|
73
73
|
|
74
74
|
output do
|
75
|
-
field :
|
75
|
+
field :id, _("ID")
|
76
76
|
field :name, _("Name")
|
77
77
|
end
|
78
78
|
|
@@ -100,7 +100,7 @@ module HammerCLIKatello
|
|
100
100
|
success_message _("Host collection updated")
|
101
101
|
failure_message _("Could not update the the host collection")
|
102
102
|
|
103
|
-
build_options :without => [:
|
103
|
+
build_options :without => [:host_ids]
|
104
104
|
end
|
105
105
|
|
106
106
|
class DeleteCommand < HammerCLIKatello::DeleteCommand
|
@@ -112,22 +112,22 @@ module HammerCLIKatello
|
|
112
112
|
build_options
|
113
113
|
end
|
114
114
|
|
115
|
-
class
|
116
|
-
command_name 'add-
|
117
|
-
action :
|
115
|
+
class AddHostCommand < HammerCLIKatello::SingleResourceCommand
|
116
|
+
command_name 'add-host'
|
117
|
+
action :add_hosts
|
118
118
|
|
119
|
-
success_message _("The
|
120
|
-
failure_message _("Could not add
|
119
|
+
success_message _("The host(s) has been added")
|
120
|
+
failure_message _("Could not add host(s)")
|
121
121
|
|
122
122
|
build_options
|
123
123
|
end
|
124
124
|
|
125
|
-
class
|
126
|
-
command_name 'remove-
|
127
|
-
action :
|
125
|
+
class RemoveHostCommand < HammerCLIKatello::SingleResourceCommand
|
126
|
+
command_name 'remove-host'
|
127
|
+
action :remove_hosts
|
128
128
|
|
129
|
-
success_message _("The
|
130
|
-
failure_message _("Could not remove
|
129
|
+
success_message _("The host(s) has been removed")
|
130
|
+
failure_message _("Could not remove host(s)")
|
131
131
|
|
132
132
|
build_options
|
133
133
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module HammerCLIKatello
|
2
|
-
class
|
2
|
+
class HostErrata < HammerCLIKatello::Command
|
3
3
|
|
4
|
-
desc "Manage errata on your
|
4
|
+
desc "Manage errata on your hosts"
|
5
5
|
|
6
6
|
class ApplyCommand < HammerCLIKatello::SingleResourceCommand
|
7
7
|
include HammerCLIForemanTasks::Async
|
8
|
-
resource :
|
8
|
+
resource :host_errata, :apply
|
9
9
|
command_name "apply"
|
10
10
|
success_message _("Errata applied successfully")
|
11
11
|
failure_message _("Could not apply errata")
|
@@ -14,7 +14,7 @@ module HammerCLIKatello
|
|
14
14
|
end
|
15
15
|
|
16
16
|
class ListCommand < HammerCLIKatello::ListCommand
|
17
|
-
resource :
|
17
|
+
resource :host_errata, :index
|
18
18
|
command_name "list"
|
19
19
|
|
20
20
|
output do
|
@@ -29,7 +29,7 @@ module HammerCLIKatello
|
|
29
29
|
end
|
30
30
|
|
31
31
|
class InfoCommand < HammerCLIKatello::InfoCommand
|
32
|
-
resource :
|
32
|
+
resource :host_errata, :show
|
33
33
|
command_name "info"
|
34
34
|
|
35
35
|
output do
|
@@ -33,6 +33,7 @@ module HammerCLIKatello
|
|
33
33
|
field :url, _("URL")
|
34
34
|
field :_publish_via_http, _("Publish Via HTTP")
|
35
35
|
field :full_path, _("Published At")
|
36
|
+
field :download_policy, _("Download Policy"), Fields::Field, :hide_blank => true
|
36
37
|
field :docker_upstream_name, _("Upstream Repository Name"),
|
37
38
|
Fields::Field, :hide_blank => true
|
38
39
|
field :container_repository_name, _("Container Repository Name"),
|
@@ -65,7 +66,7 @@ module HammerCLIKatello
|
|
65
66
|
field :package_group_total, _("Package Groups"), Fields::Field, :hide_blank => true
|
66
67
|
field :errata_total, _("Errata"), Fields::Field, :hide_blank => true
|
67
68
|
field :puppet_total, _("Puppet Modules"), Fields::Field, :hide_blank => true
|
68
|
-
field :
|
69
|
+
field :docker_manifest_total, _("Docker Manifests"), Fields::Field, :hide_blank => true
|
69
70
|
field :docker_tag_total, _("Docker Tags"), Fields::Field, :hide_blank => true
|
70
71
|
end
|
71
72
|
end
|
@@ -100,7 +101,7 @@ module HammerCLIKatello
|
|
100
101
|
data["package_group_total"] = content_counts["package_group"]
|
101
102
|
data["errata_total"] = content_counts["erratum"]
|
102
103
|
when "docker"
|
103
|
-
data["
|
104
|
+
data["docker_manifest_total"] = content_counts["docker_manifest"]
|
104
105
|
data["docker_tag_total"] = content_counts["docker_tag"]
|
105
106
|
when "puppet"
|
106
107
|
data["puppet_total"] = content_counts["puppet_module"]
|
@@ -274,19 +275,31 @@ module HammerCLIKatello
|
|
274
275
|
command_name "remove-content"
|
275
276
|
|
276
277
|
option ["--content-ids"], "CONTENT_IDS",
|
277
|
-
_("
|
278
|
+
_("package IDs, puppet module IDs, and/or docker manifest IDs"),
|
278
279
|
:format => HammerCLI::Options::Normalizers::List.new, :required => true
|
279
280
|
|
280
281
|
def request_params
|
281
|
-
super.tap do |
|
282
|
-
|
282
|
+
super.tap do |params|
|
283
|
+
params[:ids] = option_content_ids
|
284
|
+
params[:uuids] = option_content_ids
|
283
285
|
end
|
284
286
|
end
|
285
287
|
|
286
288
|
success_message _("Repository content removed")
|
287
289
|
failure_message _("Could not remove content")
|
288
290
|
|
289
|
-
|
291
|
+
# ``uuids`` is deprecated
|
292
|
+
build_options :without => %w(uuids ids)
|
293
|
+
end
|
294
|
+
|
295
|
+
class ExportCommand < HammerCLIKatello::Command
|
296
|
+
resource :repositories, :export
|
297
|
+
command_name "export"
|
298
|
+
|
299
|
+
success_message _("Exported repository")
|
300
|
+
failure_message _("Could not export repository")
|
301
|
+
|
302
|
+
build_options
|
290
303
|
end
|
291
304
|
|
292
305
|
autoload_subcommands
|
metadata
CHANGED
@@ -1,29 +1,38 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_katello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Price
|
8
|
+
- Adam Ruzicka
|
8
9
|
- Brad Buckingham
|
9
10
|
- Bryan Kearney
|
11
|
+
- Chris Duryee
|
12
|
+
- Christine Fouant
|
13
|
+
- Daniel Lobato García
|
10
14
|
- David Davis
|
11
15
|
- Dustin Tsang
|
16
|
+
- Eric D. Helms
|
12
17
|
- Ivan Nečas
|
13
18
|
- Jason L Connor
|
14
19
|
- Jason Montleon
|
20
|
+
- John Mitsch
|
15
21
|
- Justin Sherrill
|
16
22
|
- Martin Bačovský
|
17
23
|
- Michaux Kelley
|
18
24
|
- Og Maciel
|
19
25
|
- Partha Aji
|
26
|
+
- Pavel Moravec
|
27
|
+
- Roman Plevka
|
28
|
+
- Stephen Benjamin
|
20
29
|
- Tomas Strachota
|
21
30
|
- Tom McKay
|
22
31
|
- Walden Raines
|
23
32
|
autorequire:
|
24
33
|
bindir: bin
|
25
34
|
cert_chain: []
|
26
|
-
date: 2016-
|
35
|
+
date: 2016-02-12 00:00:00.000000000 Z
|
27
36
|
dependencies:
|
28
37
|
- !ruby/object:Gem::Dependency
|
29
38
|
name: hammer_cli_foreman
|
@@ -222,7 +231,6 @@ files:
|
|
222
231
|
- lib/hammer_cli_katello/capsule.rb
|
223
232
|
- lib/hammer_cli_katello/commands.rb
|
224
233
|
- lib/hammer_cli_katello/content_host.rb
|
225
|
-
- lib/hammer_cli_katello/content_host_errata.rb
|
226
234
|
- lib/hammer_cli_katello/content_view.rb
|
227
235
|
- lib/hammer_cli_katello/content_view_puppet_module.rb
|
228
236
|
- lib/hammer_cli_katello/content_view_version.rb
|
@@ -236,6 +244,7 @@ files:
|
|
236
244
|
- lib/hammer_cli_katello/host_collection_erratum.rb
|
237
245
|
- lib/hammer_cli_katello/host_collection_package.rb
|
238
246
|
- lib/hammer_cli_katello/host_collection_package_group.rb
|
247
|
+
- lib/hammer_cli_katello/host_errata.rb
|
239
248
|
- lib/hammer_cli_katello/host_package.rb
|
240
249
|
- lib/hammer_cli_katello/host_package_group.rb
|
241
250
|
- lib/hammer_cli_katello/i18n.rb
|
@@ -292,7 +301,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
292
301
|
version: '0'
|
293
302
|
requirements: []
|
294
303
|
rubyforge_project:
|
295
|
-
rubygems_version: 2.
|
304
|
+
rubygems_version: 2.4.8
|
296
305
|
signing_key:
|
297
306
|
specification_version: 4
|
298
307
|
summary: Katello commands for Hammer
|