hammer_cli_katello 0.24.1 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hammer_cli_katello.rb +6 -14
  3. data/lib/hammer_cli_katello/activation_key.rb +5 -5
  4. data/lib/hammer_cli_katello/capsule.rb +2 -3
  5. data/lib/hammer_cli_katello/command_extensions/lifecycle_environment.rb +10 -7
  6. data/lib/hammer_cli_katello/command_extensions/lifecycle_environments.rb +11 -8
  7. data/lib/hammer_cli_katello/content_credential.rb +20 -19
  8. data/lib/hammer_cli_katello/content_export.rb +1 -0
  9. data/lib/hammer_cli_katello/content_export_helper.rb +23 -14
  10. data/lib/hammer_cli_katello/content_view.rb +16 -31
  11. data/lib/hammer_cli_katello/content_view_version.rb +18 -13
  12. data/lib/hammer_cli_katello/cv_import_export_helper.rb +21 -0
  13. data/lib/hammer_cli_katello/deb_package.rb +3 -3
  14. data/lib/hammer_cli_katello/erratum.rb +1 -1
  15. data/lib/hammer_cli_katello/erratum_info_command.rb +1 -1
  16. data/lib/hammer_cli_katello/file.rb +3 -3
  17. data/lib/hammer_cli_katello/filter.rb +2 -2
  18. data/lib/hammer_cli_katello/foreman_search_options_creators.rb +0 -12
  19. data/lib/hammer_cli_katello/host_collection.rb +2 -2
  20. data/lib/hammer_cli_katello/host_deb.rb +1 -1
  21. data/lib/hammer_cli_katello/host_errata.rb +1 -1
  22. data/lib/hammer_cli_katello/host_extensions.rb +5 -5
  23. data/lib/hammer_cli_katello/host_package.rb +1 -1
  24. data/lib/hammer_cli_katello/hostgroup_extensions.rb +4 -4
  25. data/lib/hammer_cli_katello/id_resolver.rb +5 -6
  26. data/lib/hammer_cli_katello/lifecycle_environment.rb +2 -2
  27. data/lib/hammer_cli_katello/module_stream.rb +8 -8
  28. data/lib/hammer_cli_katello/organization_options.rb +8 -6
  29. data/lib/hammer_cli_katello/ostree_branch.rb +2 -2
  30. data/lib/hammer_cli_katello/package.rb +5 -5
  31. data/lib/hammer_cli_katello/package_group.rb +4 -4
  32. data/lib/hammer_cli_katello/ping.rb +0 -14
  33. data/lib/hammer_cli_katello/product.rb +3 -3
  34. data/lib/hammer_cli_katello/product_content.rb +2 -2
  35. data/lib/hammer_cli_katello/repository.rb +6 -37
  36. data/lib/hammer_cli_katello/repository_set.rb +4 -4
  37. data/lib/hammer_cli_katello/simple_content_access.rb +40 -0
  38. data/lib/hammer_cli_katello/srpm.rb +2 -2
  39. data/lib/hammer_cli_katello/subscription.rb +2 -3
  40. data/lib/hammer_cli_katello/sync_plan.rb +2 -2
  41. data/lib/hammer_cli_katello/version.rb +1 -1
  42. data/test/data/3.18/foreman_api.json +1 -1
  43. data/test/data/3.19/foreman_api.json +1 -0
  44. data/test/data/4.0/foreman_api.json +1 -0
  45. data/test/functional/capsule/content/info_test.rb +1 -2
  46. data/test/functional/content_credentials/create_test.rb +32 -0
  47. data/test/functional/{repository → content_credentials}/data/test_cert.json +0 -0
  48. data/test/functional/content_credentials/list_test.rb +6 -8
  49. data/test/functional/content_export/complete/version_test.rb +35 -3
  50. data/test/functional/content_export/content_export_helpers.rb +19 -14
  51. data/test/functional/content_export/incremental/version_test.rb +35 -3
  52. data/test/functional/content_export/list_test.rb +33 -3
  53. data/test/functional/content_view/content_view_helpers.rb +3 -1
  54. data/test/functional/content_view/list_test.rb +0 -2
  55. data/test/functional/content_view/publish_test.rb +0 -21
  56. data/test/functional/content_view/version/cv_import_export_helper_test.rb +20 -0
  57. data/test/functional/content_view/version/export_test.rb +12 -0
  58. data/test/functional/content_view/version/import_test.rb +28 -0
  59. data/test/functional/content_view/version/promote_test.rb +1 -2
  60. data/test/functional/content_view/version/republish_repositories_test.rb +1 -2
  61. data/test/functional/host/errata/apply_test.rb +0 -2
  62. data/test/functional/host/errata/recalculate_test.rb +0 -2
  63. data/test/functional/lifecycle_environment/lifecycle_environment_helpers.rb +1 -1
  64. data/test/functional/ping_test.rb +0 -2
  65. data/test/functional/repository/create_test.rb +0 -30
  66. data/test/functional/repository/info_test.rb +4 -4
  67. data/test/functional/repository/list_test.rb +0 -2
  68. data/test/functional/search_helpers.rb +11 -0
  69. data/test/functional/simple_content_access/disable_test.rb +48 -0
  70. data/test/functional/simple_content_access/enable_test.rb +46 -0
  71. data/test/test_helper.rb +1 -1
  72. metadata +18 -18
  73. data/lib/hammer_cli_katello/content_view_puppet_module.rb +0 -60
  74. data/lib/hammer_cli_katello/gpg_key.rb +0 -67
  75. data/lib/hammer_cli_katello/puppet_module.rb +0 -59
  76. data/test/functional/content_view/puppet_module/add_test.rb +0 -24
  77. data/test/functional/content_view/puppet_module/remove_test.rb +0 -54
  78. data/test/functional/gpg_test.rb +0 -39
  79. data/test/functional/repository/data/test_ca.json +0 -43
  80. data/test/functional/repository/data/test_key.json +0 -43
@@ -1,8 +1,6 @@
1
1
  require File.join(File.dirname(__FILE__), '../test_helper')
2
2
  require File.join(File.dirname(__FILE__), '../lifecycle_environment/lifecycle_environment_helpers')
3
3
 
4
- require 'hammer_cli_katello/content_view_puppet_module'
5
-
6
4
  describe 'listing repositories' do
7
5
  include LifecycleEnvironmentHelpers
8
6
 
@@ -3,4 +3,15 @@ module SearchHelpers
3
3
  ex = api_expects(resource, :index, "Find the #{resource}").with_params(args[:params])
4
4
  ex.returns(index_response([args[:returns]]))
5
5
  end
6
+
7
+ def expect_lenient_search(resource, params:, returns:)
8
+ ex = api_expects(resource, :index, "Find the #{resource}") do |p|
9
+ params.each do |key, expected|
10
+ actual = p[key] || p[key.to_sym] || p[key.to_s]
11
+ assert_equal expected.to_s, actual.to_s, "key: '#{key}', resource: #{resource}"
12
+ end
13
+ end
14
+ returns = [returns] unless returns.is_a? Array
15
+ ex.returns(index_response(returns))
16
+ end
6
17
  end
@@ -0,0 +1,48 @@
1
+ require File.join(File.dirname(__FILE__), '../../test_helper')
2
+
3
+ describe 'simple-content-access disable' do
4
+ before do
5
+ @cmd = %w(simple-content-access disable)
6
+ end
7
+
8
+ let(:organization_id) { 3 }
9
+
10
+ it "disables with required options" do
11
+ params = ["--organization-id=#{organization_id}"]
12
+
13
+ api_expects(:simple_content_access, :eligible).
14
+ with_params('organization_id' => organization_id).
15
+ returns("simple_content_access_eligible" => true)
16
+
17
+ api_expects(:simple_content_access, :disable)
18
+ .with_params('organization_id' => organization_id)
19
+ run_cmd(@cmd + params)
20
+ end
21
+
22
+ it 'fails on missing required params' do
23
+ params = []
24
+
25
+ result = run_cmd(@cmd + params)
26
+ expected_error = "Could not disable Simple Content Access for this organization"
27
+
28
+ assert_equal(result.exit_code, HammerCLI::EX_SOFTWARE)
29
+ assert_equal(result.err[/#{expected_error}/], expected_error)
30
+ end
31
+
32
+ it 'fails on non eligible org' do
33
+ params = ["--organization-id=#{organization_id}"]
34
+
35
+ api_expects(:simple_content_access, :eligible).
36
+ with_params('organization_id' => organization_id).
37
+ returns("simple_content_access_eligible" => false)
38
+
39
+ api_expects(:simple_content_access, :disable)
40
+ .with_params('organization_id' => organization_id).never
41
+ result = run_cmd(@cmd + params)
42
+
43
+ expected_error = "Could not disable Simple Content Access for this organization"
44
+
45
+ assert_equal(result.exit_code, HammerCLI::EX_SOFTWARE)
46
+ assert_equal(result.err[/#{expected_error}/], expected_error)
47
+ end
48
+ end
@@ -0,0 +1,46 @@
1
+ require File.join(File.dirname(__FILE__), '../../test_helper')
2
+
3
+ describe 'simple-content-access enable' do
4
+ before do
5
+ @cmd = %w(simple-content-access enable)
6
+ end
7
+
8
+ let(:organization_id) { 3 }
9
+
10
+ it "enables with required options" do
11
+ params = ["--organization-id=#{organization_id}"]
12
+ api_expects(:simple_content_access, :eligible).
13
+ with_params('organization_id' => organization_id).
14
+ returns("simple_content_access_eligible" => true)
15
+
16
+ api_expects(:simple_content_access, :enable)
17
+ .with_params('organization_id' => organization_id)
18
+ run_cmd(@cmd + params)
19
+ end
20
+
21
+ it 'fails on missing required params' do
22
+ params = []
23
+ result = run_cmd(@cmd + params)
24
+ expected_error = "Could not enable Simple Content Access for this organization"
25
+
26
+ assert_equal(result.exit_code, HammerCLI::EX_SOFTWARE)
27
+ assert_equal(result.err[/#{expected_error}/], expected_error)
28
+ end
29
+
30
+ it 'fails on non eligible org' do
31
+ params = ["--organization-id=#{organization_id}"]
32
+
33
+ api_expects(:simple_content_access, :eligible).
34
+ with_params('organization_id' => organization_id).
35
+ returns("simple_content_access_eligible" => false)
36
+
37
+ api_expects(:simple_content_access, :enable)
38
+ .with_params('organization_id' => organization_id).never
39
+ result = run_cmd(@cmd + params)
40
+
41
+ expected_error = "Could not enable Simple Content Access for this organization"
42
+
43
+ assert_equal(result.exit_code, HammerCLI::EX_SOFTWARE)
44
+ assert_equal(result.err[/#{expected_error}/], expected_error)
45
+ end
46
+ end
data/test/test_helper.rb CHANGED
@@ -17,7 +17,7 @@ require 'minitest/spec'
17
17
  require 'mocha/minitest'
18
18
  require 'hammer_cli'
19
19
 
20
- KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '3.18')
20
+ KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '4.0')
21
21
 
22
22
  if HammerCLI.context[:api_connection]
23
23
  HammerCLI.context[:api_connection].create('foreman') do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli_katello
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.1
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Price
@@ -35,7 +35,7 @@ authors:
35
35
  autorequire:
36
36
  bindir: bin
37
37
  cert_chain: []
38
- date: 2020-12-09 00:00:00.000000000 Z
38
+ date: 2021-05-13 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: hammer_cli_foreman
@@ -249,7 +249,6 @@ files:
249
249
  - lib/hammer_cli_katello/content_view.rb
250
250
  - lib/hammer_cli_katello/content_view_component.rb
251
251
  - lib/hammer_cli_katello/content_view_name_resolvable.rb
252
- - lib/hammer_cli_katello/content_view_puppet_module.rb
253
252
  - lib/hammer_cli_katello/content_view_purge.rb
254
253
  - lib/hammer_cli_katello/content_view_version.rb
255
254
  - lib/hammer_cli_katello/cv_import_export_helper.rb
@@ -261,7 +260,6 @@ files:
261
260
  - lib/hammer_cli_katello/filter.rb
262
261
  - lib/hammer_cli_katello/filter_rule.rb
263
262
  - lib/hammer_cli_katello/foreman_search_options_creators.rb
264
- - lib/hammer_cli_katello/gpg_key.rb
265
263
  - lib/hammer_cli_katello/host.rb
266
264
  - lib/hammer_cli_katello/host_collection.rb
267
265
  - lib/hammer_cli_katello/host_collection_erratum.rb
@@ -298,11 +296,11 @@ files:
298
296
  - lib/hammer_cli_katello/ping.rb
299
297
  - lib/hammer_cli_katello/product.rb
300
298
  - lib/hammer_cli_katello/product_content.rb
301
- - lib/hammer_cli_katello/puppet_module.rb
302
299
  - lib/hammer_cli_katello/repository.rb
303
300
  - lib/hammer_cli_katello/repository_scoped_to_product.rb
304
301
  - lib/hammer_cli_katello/repository_set.rb
305
302
  - lib/hammer_cli_katello/search_options_creators.rb
303
+ - lib/hammer_cli_katello/simple_content_access.rb
306
304
  - lib/hammer_cli_katello/srpm.rb
307
305
  - lib/hammer_cli_katello/status.rb
308
306
  - lib/hammer_cli_katello/subscription.rb
@@ -335,6 +333,7 @@ files:
335
333
  - test/data/3.16/foreman_api.json
336
334
  - test/data/3.17/foreman_api.json
337
335
  - test/data/3.18/foreman_api.json
336
+ - test/data/3.19/foreman_api.json
338
337
  - test/data/3.2/foreman_api.json
339
338
  - test/data/3.4/foreman_api.json
340
339
  - test/data/3.5/foreman_api.json
@@ -342,6 +341,7 @@ files:
342
341
  - test/data/3.7/foreman_api.json
343
342
  - test/data/3.8/foreman_api.json
344
343
  - test/data/3.9/foreman_api.json
344
+ - test/data/4.0/foreman_api.json
345
345
  - test/data/Readme.md
346
346
  - test/functional/activation_key/add_host_collection_test.rb
347
347
  - test/functional/activation_key/content_override_test.rb
@@ -367,6 +367,8 @@ files:
367
367
  - test/functional/capsule/content/synchronization_status_test.rb
368
368
  - test/functional/capsule/info_test.rb
369
369
  - test/functional/capsule/list_test.rb
370
+ - test/functional/content_credentials/create_test.rb
371
+ - test/functional/content_credentials/data/test_cert.json
370
372
  - test/functional/content_credentials/info_test.rb
371
373
  - test/functional/content_credentials/list_test.rb
372
374
  - test/functional/content_export/complete/library_test.rb
@@ -396,12 +398,11 @@ files:
396
398
  - test/functional/content_view/filter/update_test.rb
397
399
  - test/functional/content_view/list_test.rb
398
400
  - test/functional/content_view/publish_test.rb
399
- - test/functional/content_view/puppet_module/add_test.rb
400
- - test/functional/content_view/puppet_module/remove_test.rb
401
401
  - test/functional/content_view/purge_test.rb
402
402
  - test/functional/content_view/remove_content_view_version_test.rb
403
403
  - test/functional/content_view/remove_test.rb
404
404
  - test/functional/content_view/update_test.rb
405
+ - test/functional/content_view/version/cv_import_export_helper_test.rb
405
406
  - test/functional/content_view/version/default_export_test.rb
406
407
  - test/functional/content_view/version/export_test.rb
407
408
  - test/functional/content_view/version/import_test.rb
@@ -422,7 +423,6 @@ files:
422
423
  - test/functional/filter_rule/info_test.rb
423
424
  - test/functional/filter_rule/list_test.rb
424
425
  - test/functional/filter_rule/update_test.rb
425
- - test/functional/gpg_test.rb
426
426
  - test/functional/host/errata/apply_test.rb
427
427
  - test/functional/host/errata/info_test.rb
428
428
  - test/functional/host/errata/list_test.rb
@@ -482,9 +482,6 @@ files:
482
482
  - test/functional/product/update_proxy.rb
483
483
  - test/functional/product/update_test.rb
484
484
  - test/functional/repository/create_test.rb
485
- - test/functional/repository/data/test_ca.json
486
- - test/functional/repository/data/test_cert.json
487
- - test/functional/repository/data/test_key.json
488
485
  - test/functional/repository/delete_test.rb
489
486
  - test/functional/repository/export_test.rb
490
487
  - test/functional/repository/info_test.rb
@@ -501,6 +498,8 @@ files:
501
498
  - test/functional/repository_set/list_test.rb
502
499
  - test/functional/repository_set/repository_set_helpers.rb
503
500
  - test/functional/search_helpers.rb
501
+ - test/functional/simple_content_access/disable_test.rb
502
+ - test/functional/simple_content_access/enable_test.rb
504
503
  - test/functional/srpm/list_test.rb
505
504
  - test/functional/subscription/list_test.rb
506
505
  - test/functional/sync_plan/create_test.rb
@@ -535,7 +534,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
535
534
  - !ruby/object:Gem::Version
536
535
  version: '0'
537
536
  requirements: []
538
- rubygems_version: 3.1.4
537
+ rubygems_version: 3.1.2
539
538
  signing_key:
540
539
  specification_version: 4
541
540
  summary: Katello commands for Hammer
@@ -551,6 +550,7 @@ test_files:
551
550
  - test/data/3.16/foreman_api.json
552
551
  - test/data/3.17/foreman_api.json
553
552
  - test/data/3.18/foreman_api.json
553
+ - test/data/3.19/foreman_api.json
554
554
  - test/data/3.2/foreman_api.json
555
555
  - test/data/3.4/foreman_api.json
556
556
  - test/data/3.5/foreman_api.json
@@ -558,6 +558,7 @@ test_files:
558
558
  - test/data/3.7/foreman_api.json
559
559
  - test/data/3.8/foreman_api.json
560
560
  - test/data/3.9/foreman_api.json
561
+ - test/data/4.0/foreman_api.json
561
562
  - test/data/Readme.md
562
563
  - test/functional/activation_key/add_host_collection_test.rb
563
564
  - test/functional/activation_key/content_override_test.rb
@@ -583,6 +584,8 @@ test_files:
583
584
  - test/functional/capsule/content/synchronization_status_test.rb
584
585
  - test/functional/capsule/info_test.rb
585
586
  - test/functional/capsule/list_test.rb
587
+ - test/functional/content_credentials/create_test.rb
588
+ - test/functional/content_credentials/data/test_cert.json
586
589
  - test/functional/content_credentials/info_test.rb
587
590
  - test/functional/content_credentials/list_test.rb
588
591
  - test/functional/content_export/complete/library_test.rb
@@ -612,12 +615,11 @@ test_files:
612
615
  - test/functional/content_view/filter/update_test.rb
613
616
  - test/functional/content_view/list_test.rb
614
617
  - test/functional/content_view/publish_test.rb
615
- - test/functional/content_view/puppet_module/add_test.rb
616
- - test/functional/content_view/puppet_module/remove_test.rb
617
618
  - test/functional/content_view/purge_test.rb
618
619
  - test/functional/content_view/remove_content_view_version_test.rb
619
620
  - test/functional/content_view/remove_test.rb
620
621
  - test/functional/content_view/update_test.rb
622
+ - test/functional/content_view/version/cv_import_export_helper_test.rb
621
623
  - test/functional/content_view/version/default_export_test.rb
622
624
  - test/functional/content_view/version/export_test.rb
623
625
  - test/functional/content_view/version/import_test.rb
@@ -638,7 +640,6 @@ test_files:
638
640
  - test/functional/filter_rule/info_test.rb
639
641
  - test/functional/filter_rule/list_test.rb
640
642
  - test/functional/filter_rule/update_test.rb
641
- - test/functional/gpg_test.rb
642
643
  - test/functional/host/errata/apply_test.rb
643
644
  - test/functional/host/errata/info_test.rb
644
645
  - test/functional/host/errata/list_test.rb
@@ -698,9 +699,6 @@ test_files:
698
699
  - test/functional/product/update_proxy.rb
699
700
  - test/functional/product/update_test.rb
700
701
  - test/functional/repository/create_test.rb
701
- - test/functional/repository/data/test_ca.json
702
- - test/functional/repository/data/test_cert.json
703
- - test/functional/repository/data/test_key.json
704
702
  - test/functional/repository/delete_test.rb
705
703
  - test/functional/repository/export_test.rb
706
704
  - test/functional/repository/info_test.rb
@@ -717,6 +715,8 @@ test_files:
717
715
  - test/functional/repository_set/list_test.rb
718
716
  - test/functional/repository_set/repository_set_helpers.rb
719
717
  - test/functional/search_helpers.rb
718
+ - test/functional/simple_content_access/disable_test.rb
719
+ - test/functional/simple_content_access/enable_test.rb
720
720
  - test/functional/srpm/list_test.rb
721
721
  - test/functional/subscription/list_test.rb
722
722
  - test/functional/sync_plan/create_test.rb
@@ -1,60 +0,0 @@
1
- module HammerCLIKatello
2
- class ContentViewPuppetModule < HammerCLIKatello::Command
3
- resource :content_view_puppet_modules
4
- command_name 'puppet-module'
5
- desc 'View and manage puppet modules'
6
-
7
- class ListCommand < HammerCLIKatello::ListCommand
8
- include OrganizationOptions
9
-
10
- output do
11
- field :uuid, _("UUID")
12
- field :name, _("Name")
13
- field :author, _("Author")
14
- field :version, _("Version")
15
- end
16
-
17
- def extend_data(mod)
18
- mod['version'] = if mod['uuid']
19
- mod['computed_version']
20
- else
21
- _("Latest(Currently %s)") % mod['computed_version']
22
- end
23
- mod
24
- end
25
-
26
- build_options
27
- end
28
-
29
- class CreateCommand < HammerCLIKatello::CreateCommand
30
- include OrganizationOptions
31
-
32
- command_name "add"
33
-
34
- success_message _("Puppet module added to content view.")
35
- failure_message _("Could not add the puppet module")
36
-
37
- build_options
38
-
39
- def get_identifier(*)
40
- # This will intentionally disable the id resolver. Without it, if the user were to
41
- # execute the 'add' command specifying a 'name', the id resolver will attempt to
42
- # translate the 'name' to an 'id'. That is not desirable for this command.
43
- nil
44
- end
45
- end
46
-
47
- class DeleteCommand < HammerCLIKatello::DeleteCommand
48
- include OrganizationOptions
49
-
50
- command_name "remove"
51
-
52
- success_message _("Puppet module removed from content view.")
53
- failure_message _("Couldn't remove puppet module from the content view")
54
-
55
- build_options
56
- end
57
-
58
- autoload_subcommands
59
- end
60
- end
@@ -1,67 +0,0 @@
1
- module HammerCLIKatello
2
- class GpgKeyCommand < HammerCLIForeman::Command
3
- resource :gpg_keys
4
-
5
- class ListCommand < HammerCLIKatello::ListCommand
6
- output do
7
- field :id, _("ID")
8
- field :name, _("Name")
9
- end
10
-
11
- build_options
12
- end
13
-
14
- class InfoCommand < HammerCLIKatello::InfoCommand
15
- output do
16
- field :id, _("ID")
17
- field :name, _("Name")
18
- from :organization do
19
- field :name, _("Organization")
20
- end
21
-
22
- collection :repositories, "Repositories" do
23
- field :id, _("ID")
24
- field :name, _("Name")
25
- field :content_type, _("Content Type")
26
- from :product do
27
- field :name, _("Product")
28
- end
29
- end
30
-
31
- field :content, _("Content"), Fields::LongText
32
- end
33
-
34
- build_options
35
- end
36
-
37
- class CreateCommand < HammerCLIKatello::CreateCommand
38
- success_message _("GPG Key created.")
39
- failure_message _("Could not create GPG Key")
40
-
41
- build_options :without => [:content]
42
- option "--key", "GPG_KEY_FILE", _("GPG Key file"),
43
- :attribute_name => :option_content,
44
- :required => true,
45
- :format => HammerCLI::Options::Normalizers::File.new
46
- end
47
-
48
- class UpdateCommand < HammerCLIKatello::UpdateCommand
49
- success_message _("GPG Key updated.")
50
- failure_message _("Could not update GPG Key")
51
-
52
- build_options :without => [:content]
53
- option "--key", "GPG_KEY_FILE", _("GPG Key file"),
54
- :attribute_name => :option_content,
55
- :format => HammerCLI::Options::Normalizers::File.new
56
- end
57
-
58
- class DeleteCommand < HammerCLIKatello::DeleteCommand
59
- success_message _("GPG Key deleted.")
60
- failure_message _("Could not delete the GPG Key")
61
-
62
- build_options
63
- end
64
-
65
- autoload_subcommands
66
- end
67
- end
@@ -1,59 +0,0 @@
1
- module HammerCLIKatello
2
- class PuppetModule < HammerCLIKatello::Command
3
- resource :puppet_modules
4
-
5
- class ListCommand < HammerCLIKatello::ListCommand
6
- extend RepositoryScopedToProduct
7
-
8
- validate_repo_name_requires_product_options(:option_repository_name)
9
-
10
- output do
11
- field :id, _("ID")
12
- field :name, _("Name")
13
- field :author, _("Author")
14
- field :version, _("Version")
15
- field :uuid, _("Uuid")
16
- end
17
-
18
- build_options do |o|
19
- o.expand(:all).including(:organizations, :products, :content_views)
20
- end
21
- end
22
-
23
- class InfoCommand < HammerCLIKatello::InfoCommand
24
- output do
25
- field :id, _("ID")
26
- field :name, _("Name")
27
- field :version, _("Version")
28
- field :author, _("Author")
29
- field :uuid, _("Uuid")
30
-
31
- field :summary, _("Summary")
32
- field :description, _("Description")
33
- field :license, _("License")
34
- field :project_page, _("Project Page")
35
- field :source, _("Source")
36
-
37
- collection :dependencies, _("Dependencies"), :numbered => false do
38
- field nil, nil, HammerCLIKatello::Output::Fields::Dependency
39
- end
40
- collection :checksums, _("File checksums"), :numbered => false do
41
- field nil, nil, HammerCLIKatello::Output::Fields::ChecksumFilePair
42
- end
43
-
44
- field :tag_list, _("Tag List"), Fields::List
45
-
46
- collection :repositories, _("Repositories") do
47
- field :id, _("Id")
48
- field :name, _("Name")
49
- end
50
- end
51
-
52
- build_options do |o|
53
- o.expand(:all).including(:organizations)
54
- end
55
- end
56
-
57
- autoload_subcommands
58
- end
59
- end