hammer_cli_katello 0.0.20 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52e70cdfe9705efe7c645d5c95b7bd868480152a
4
- data.tar.gz: e36b268db05c3c29a0beee9da45377a1ec0e5d5b
3
+ metadata.gz: 98af7a9663fc4e98bb4519596d20565e4951c8a4
4
+ data.tar.gz: e2a4f407aebb23efacc835290a789a7634f8943a
5
5
  SHA512:
6
- metadata.gz: ee5a6423610a125a4cb5f6342cd6ee1566fdd1079abc75eeeaa7b61bc4c06f1597687d9f737ec7da6ae7359e33666a56ee3ed3b8ed3ebcc71c2c333fe507d88f
7
- data.tar.gz: 9308563e7d90a57bc6a34301fc6c10e230e90a480167fb7facd9c19358c9c076378e9d79067c5e93a5b69a24d8f149ee01ce9a41a89a1a6285baef40d3300cb0
6
+ metadata.gz: 4f783366272ba4a129d5979559d06eb325ac2c04342106c0d91298aac355f724c02917be172544c070ffcffdb65d9a6f8a14b223759ed56cce2f26a113246d65
7
+ data.tar.gz: 59e264ec16c2249a2642372751f87c01398a40d3d38eb14bf270946fcc30e1c717bdf181cf89d362558ae86c3ca5494cda8a10995b1a52670f9ac97818966af0
@@ -65,23 +65,23 @@ module HammerCLIKatello
65
65
 
66
66
  end
67
67
 
68
- module ContentHost
68
+ module Host
69
69
  extend HammerCLIForeman::AssociatingCommands::CommandExtension
70
70
 
71
- class AddContentHostCommand < HammerCLIKatello::AddAssociatedCommand
72
- command_name 'add-content-host'
73
- associated_resource :systems
71
+ class AddHostCommand < HammerCLIKatello::AddAssociatedCommand
72
+ command_name 'add-host'
73
+ associated_resource :hosts
74
74
 
75
- success_message _("The content host has been added")
76
- failure_message _("Could not add content host")
75
+ success_message _("The host has been added")
76
+ failure_message _("Could not add host")
77
77
  end
78
78
 
79
- class RemoveContentHostCommand < HammerCLIKatello::RemoveAssociatedCommand
80
- command_name 'remove-content-host'
81
- associated_resource :systems
79
+ class RemoveHostCommand < HammerCLIKatello::RemoveAssociatedCommand
80
+ command_name 'remove-host'
81
+ associated_resource :hosts
82
82
 
83
- success_message _("The content host has been removed")
84
- failure_message _("Could not remove content host")
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 content host ids to replace the content hosts in host collection"),
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['system_uuids'] = option_system_ids unless option_system_ids.nil?
17
- params.delete('system_ids') if params.keys.include? 'system_ids'
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['unlimited_content_hosts'] ? 'None' : data['max_content_hosts']
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['max_content_hosts'] && params['unlimited_content_hosts'].nil?
49
- params['unlimited_content_hosts'] = false
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 => [:system_uuids]
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 :total_content_hosts, _("Total Content Hosts")
64
+ field :total_hosts, _("Total Hosts")
65
65
  end
66
66
 
67
67
  build_options
68
68
  end
69
69
 
70
- class ContentHostsCommand < HammerCLIKatello::ListCommand
71
- resource :host_collections, :systems
72
- command_name "content-hosts"
70
+ class HostsCommand < HammerCLIKatello::ListCommand
71
+ resource :host_collections, :hosts
72
+ command_name "hosts"
73
73
 
74
74
  output do
75
- field :uuid, _("ID")
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 => [:system_uuids]
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 AddContentHostCommand < HammerCLIKatello::SingleResourceCommand
116
- command_name 'add-content-host'
117
- action :add_systems
115
+ class AddHostCommand < HammerCLIKatello::SingleResourceCommand
116
+ command_name 'add-host'
117
+ action :add_hosts
118
118
 
119
- success_message _("The content host(s) has been added")
120
- failure_message _("Could not add content host(s)")
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 RemoveContentHostCommand < HammerCLIKatello::SingleResourceCommand
126
- command_name 'remove-content-host'
127
- action :remove_systems
125
+ class RemoveHostCommand < HammerCLIKatello::SingleResourceCommand
126
+ command_name 'remove-host'
127
+ action :remove_hosts
128
128
 
129
- success_message _("The content host(s) has been removed")
130
- failure_message _("Could not remove content host(s)")
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 ContentHostErrata < HammerCLIKatello::Command
2
+ class HostErrata < HammerCLIKatello::Command
3
3
 
4
- desc "Manage errata on your content hosts"
4
+ desc "Manage errata on your hosts"
5
5
 
6
6
  class ApplyCommand < HammerCLIKatello::SingleResourceCommand
7
7
  include HammerCLIForemanTasks::Async
8
- resource :system_errata, :apply
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 :system_errata, :index
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 :system_errata, :show
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 :docker_image_total, _("Docker Images"), Fields::Field, :hide_blank => true
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["docker_image_total"] = content_counts["docker_image"]
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
- _("Comma separated list of package/puppet module/docker image ids"),
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 |opts|
282
- opts[:uuids] = option_content_ids
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
- build_options :without => ["uuids"]
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
@@ -1,5 +1,5 @@
1
1
  module HammerCLIKatello
2
2
  def self.version
3
- @version ||= Gem::Version.new('0.0.20')
3
+ @version ||= Gem::Version.new('0.0.21')
4
4
  end
5
5
  end
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.20
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-01-22 00:00:00.000000000 Z
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.2.3
304
+ rubygems_version: 2.4.8
296
305
  signing_key:
297
306
  specification_version: 4
298
307
  summary: Katello commands for Hammer