hammer_cli_katello 0.23.1 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hammer_cli_katello.rb +20 -16
- data/lib/hammer_cli_katello/activation_key.rb +5 -5
- data/lib/hammer_cli_katello/capsule.rb +2 -3
- data/lib/hammer_cli_katello/command_extensions/lifecycle_environment.rb +10 -7
- data/lib/hammer_cli_katello/command_extensions/lifecycle_environments.rb +11 -8
- data/lib/hammer_cli_katello/content_credential.rb +20 -19
- data/lib/hammer_cli_katello/content_export.rb +73 -0
- data/lib/hammer_cli_katello/content_export_complete.rb +25 -0
- data/lib/hammer_cli_katello/content_export_helper.rb +181 -0
- data/lib/hammer_cli_katello/content_export_incremental.rb +25 -0
- data/lib/hammer_cli_katello/content_import.rb +63 -0
- data/lib/hammer_cli_katello/content_view.rb +19 -32
- data/lib/hammer_cli_katello/content_view_version.rb +4 -11
- data/lib/hammer_cli_katello/deb_package.rb +3 -3
- data/lib/hammer_cli_katello/erratum.rb +1 -1
- data/lib/hammer_cli_katello/erratum_info_command.rb +1 -1
- data/lib/hammer_cli_katello/file.rb +3 -3
- data/lib/hammer_cli_katello/filter.rb +2 -2
- data/lib/hammer_cli_katello/foreman_search_options_creators.rb +0 -12
- data/lib/hammer_cli_katello/host_collection.rb +2 -2
- data/lib/hammer_cli_katello/host_deb.rb +1 -1
- data/lib/hammer_cli_katello/host_errata.rb +1 -1
- data/lib/hammer_cli_katello/host_extensions.rb +5 -5
- data/lib/hammer_cli_katello/host_package.rb +1 -1
- data/lib/hammer_cli_katello/host_traces.rb +17 -0
- data/lib/hammer_cli_katello/hostgroup_extensions.rb +4 -4
- data/lib/hammer_cli_katello/id_resolver.rb +5 -6
- data/lib/hammer_cli_katello/lifecycle_environment.rb +2 -2
- data/lib/hammer_cli_katello/module_stream.rb +8 -8
- data/lib/hammer_cli_katello/organization_options.rb +8 -6
- data/lib/hammer_cli_katello/ostree_branch.rb +2 -2
- data/lib/hammer_cli_katello/package.rb +5 -5
- data/lib/hammer_cli_katello/package_group.rb +4 -4
- data/lib/hammer_cli_katello/ping.rb +2 -9
- data/lib/hammer_cli_katello/product.rb +3 -3
- data/lib/hammer_cli_katello/product_content.rb +2 -2
- data/lib/hammer_cli_katello/repository.rb +6 -37
- data/lib/hammer_cli_katello/repository_set.rb +4 -4
- data/lib/hammer_cli_katello/simple_content_access.rb +40 -0
- data/lib/hammer_cli_katello/srpm.rb +2 -2
- data/lib/hammer_cli_katello/subscription.rb +2 -3
- data/lib/hammer_cli_katello/sync_plan.rb +2 -2
- data/lib/hammer_cli_katello/version.rb +1 -1
- data/test/data/3.18/foreman_api.json +1 -0
- data/test/data/3.19/foreman_api.json +1 -0
- data/test/data/4.0/foreman_api.json +1 -0
- data/test/functional/capsule/content/info_test.rb +1 -2
- data/test/functional/content_credentials/create_test.rb +32 -0
- data/test/functional/{repository → content_credentials}/data/test_cert.json +0 -0
- data/test/functional/content_credentials/list_test.rb +6 -8
- data/test/functional/content_export/complete/library_test.rb +155 -0
- data/test/functional/content_export/complete/version_test.rb +217 -0
- data/test/functional/content_export/content_export_helpers.rb +26 -0
- data/test/functional/content_export/generate_metadata_test.rb +64 -0
- data/test/functional/content_export/incremental/library_test.rb +172 -0
- data/test/functional/content_export/incremental/version_test.rb +268 -0
- data/test/functional/content_export/list_test.rb +64 -0
- data/test/functional/content_import/library_test.rb +85 -0
- data/test/functional/content_import/metadata.json +1 -0
- data/test/functional/content_import/version_test.rb +85 -0
- data/test/functional/content_view/content_view_helpers.rb +3 -1
- data/test/functional/content_view/list_test.rb +0 -2
- data/test/functional/content_view/publish_test.rb +0 -21
- data/test/functional/content_view/version/promote_test.rb +1 -2
- data/test/functional/content_view/version/republish_repositories_test.rb +1 -2
- data/test/functional/host/errata/apply_test.rb +0 -2
- data/test/functional/host/errata/recalculate_test.rb +0 -2
- data/test/functional/host/extensions/update_test.rb +0 -1
- data/test/functional/host/traces/resolve_test.rb +31 -0
- data/test/functional/lifecycle_environment/lifecycle_environment_helpers.rb +1 -1
- data/test/functional/ping_test.rb +1 -2
- data/test/functional/repository/create_test.rb +0 -30
- data/test/functional/repository/info_test.rb +4 -4
- data/test/functional/repository/list_test.rb +0 -2
- data/test/functional/search_helpers.rb +11 -0
- data/test/functional/simple_content_access/disable_test.rb +48 -0
- data/test/functional/simple_content_access/enable_test.rb +46 -0
- data/test/test_helper.rb +1 -1
- metadata +45 -18
- data/lib/hammer_cli_katello/content_view_puppet_module.rb +0 -60
- data/lib/hammer_cli_katello/gpg_key.rb +0 -67
- data/lib/hammer_cli_katello/puppet_module.rb +0 -59
- data/test/functional/content_view/puppet_module/add_test.rb +0 -24
- data/test/functional/content_view/puppet_module/remove_test.rb +0 -54
- data/test/functional/gpg_test.rb +0 -39
- data/test/functional/repository/data/test_ca.json +0 -43
- 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'] || '
|
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
|
4
|
+
version: '1.0'
|
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:
|
38
|
+
date: 2021-02-04 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: hammer_cli_foreman
|
@@ -240,11 +240,15 @@ files:
|
|
240
240
|
- lib/hammer_cli_katello/commands.rb
|
241
241
|
- lib/hammer_cli_katello/composite_content_view_name_resolvable.rb
|
242
242
|
- lib/hammer_cli_katello/content_credential.rb
|
243
|
+
- lib/hammer_cli_katello/content_export.rb
|
244
|
+
- lib/hammer_cli_katello/content_export_complete.rb
|
245
|
+
- lib/hammer_cli_katello/content_export_helper.rb
|
246
|
+
- lib/hammer_cli_katello/content_export_incremental.rb
|
247
|
+
- lib/hammer_cli_katello/content_import.rb
|
243
248
|
- lib/hammer_cli_katello/content_override.rb
|
244
249
|
- lib/hammer_cli_katello/content_view.rb
|
245
250
|
- lib/hammer_cli_katello/content_view_component.rb
|
246
251
|
- lib/hammer_cli_katello/content_view_name_resolvable.rb
|
247
|
-
- lib/hammer_cli_katello/content_view_puppet_module.rb
|
248
252
|
- lib/hammer_cli_katello/content_view_purge.rb
|
249
253
|
- lib/hammer_cli_katello/content_view_version.rb
|
250
254
|
- lib/hammer_cli_katello/cv_import_export_helper.rb
|
@@ -256,7 +260,6 @@ files:
|
|
256
260
|
- lib/hammer_cli_katello/filter.rb
|
257
261
|
- lib/hammer_cli_katello/filter_rule.rb
|
258
262
|
- lib/hammer_cli_katello/foreman_search_options_creators.rb
|
259
|
-
- lib/hammer_cli_katello/gpg_key.rb
|
260
263
|
- lib/hammer_cli_katello/host.rb
|
261
264
|
- lib/hammer_cli_katello/host_collection.rb
|
262
265
|
- lib/hammer_cli_katello/host_collection_erratum.rb
|
@@ -293,11 +296,11 @@ files:
|
|
293
296
|
- lib/hammer_cli_katello/ping.rb
|
294
297
|
- lib/hammer_cli_katello/product.rb
|
295
298
|
- lib/hammer_cli_katello/product_content.rb
|
296
|
-
- lib/hammer_cli_katello/puppet_module.rb
|
297
299
|
- lib/hammer_cli_katello/repository.rb
|
298
300
|
- lib/hammer_cli_katello/repository_scoped_to_product.rb
|
299
301
|
- lib/hammer_cli_katello/repository_set.rb
|
300
302
|
- lib/hammer_cli_katello/search_options_creators.rb
|
303
|
+
- lib/hammer_cli_katello/simple_content_access.rb
|
301
304
|
- lib/hammer_cli_katello/srpm.rb
|
302
305
|
- lib/hammer_cli_katello/status.rb
|
303
306
|
- lib/hammer_cli_katello/subscription.rb
|
@@ -329,6 +332,8 @@ files:
|
|
329
332
|
- test/data/3.15/foreman_api.json
|
330
333
|
- test/data/3.16/foreman_api.json
|
331
334
|
- test/data/3.17/foreman_api.json
|
335
|
+
- test/data/3.18/foreman_api.json
|
336
|
+
- test/data/3.19/foreman_api.json
|
332
337
|
- test/data/3.2/foreman_api.json
|
333
338
|
- test/data/3.4/foreman_api.json
|
334
339
|
- test/data/3.5/foreman_api.json
|
@@ -336,6 +341,7 @@ files:
|
|
336
341
|
- test/data/3.7/foreman_api.json
|
337
342
|
- test/data/3.8/foreman_api.json
|
338
343
|
- test/data/3.9/foreman_api.json
|
344
|
+
- test/data/4.0/foreman_api.json
|
339
345
|
- test/data/Readme.md
|
340
346
|
- test/functional/activation_key/add_host_collection_test.rb
|
341
347
|
- test/functional/activation_key/content_override_test.rb
|
@@ -361,8 +367,20 @@ files:
|
|
361
367
|
- test/functional/capsule/content/synchronization_status_test.rb
|
362
368
|
- test/functional/capsule/info_test.rb
|
363
369
|
- test/functional/capsule/list_test.rb
|
370
|
+
- test/functional/content_credentials/create_test.rb
|
371
|
+
- test/functional/content_credentials/data/test_cert.json
|
364
372
|
- test/functional/content_credentials/info_test.rb
|
365
373
|
- test/functional/content_credentials/list_test.rb
|
374
|
+
- test/functional/content_export/complete/library_test.rb
|
375
|
+
- test/functional/content_export/complete/version_test.rb
|
376
|
+
- test/functional/content_export/content_export_helpers.rb
|
377
|
+
- test/functional/content_export/generate_metadata_test.rb
|
378
|
+
- test/functional/content_export/incremental/library_test.rb
|
379
|
+
- test/functional/content_export/incremental/version_test.rb
|
380
|
+
- test/functional/content_export/list_test.rb
|
381
|
+
- test/functional/content_import/library_test.rb
|
382
|
+
- test/functional/content_import/metadata.json
|
383
|
+
- test/functional/content_import/version_test.rb
|
366
384
|
- test/functional/content_view/add_content_view_version_test.rb
|
367
385
|
- test/functional/content_view/add_repository_test.rb
|
368
386
|
- test/functional/content_view/component/add_test.rb
|
@@ -380,8 +398,6 @@ files:
|
|
380
398
|
- test/functional/content_view/filter/update_test.rb
|
381
399
|
- test/functional/content_view/list_test.rb
|
382
400
|
- test/functional/content_view/publish_test.rb
|
383
|
-
- test/functional/content_view/puppet_module/add_test.rb
|
384
|
-
- test/functional/content_view/puppet_module/remove_test.rb
|
385
401
|
- test/functional/content_view/purge_test.rb
|
386
402
|
- test/functional/content_view/remove_content_view_version_test.rb
|
387
403
|
- test/functional/content_view/remove_test.rb
|
@@ -406,7 +422,6 @@ files:
|
|
406
422
|
- test/functional/filter_rule/info_test.rb
|
407
423
|
- test/functional/filter_rule/list_test.rb
|
408
424
|
- test/functional/filter_rule/update_test.rb
|
409
|
-
- test/functional/gpg_test.rb
|
410
425
|
- test/functional/host/errata/apply_test.rb
|
411
426
|
- test/functional/host/errata/info_test.rb
|
412
427
|
- test/functional/host/errata/list_test.rb
|
@@ -426,6 +441,7 @@ files:
|
|
426
441
|
- test/functional/host/subscription/remove_test.rb
|
427
442
|
- test/functional/host/subscription/unregister_test.rb
|
428
443
|
- test/functional/host/traces/list_test.rb
|
444
|
+
- test/functional/host/traces/resolve_test.rb
|
429
445
|
- test/functional/host_collection/add_host_test.rb
|
430
446
|
- test/functional/host_collection/content_api_expectations.rb
|
431
447
|
- test/functional/host_collection/content_install_test.rb
|
@@ -465,9 +481,6 @@ files:
|
|
465
481
|
- test/functional/product/update_proxy.rb
|
466
482
|
- test/functional/product/update_test.rb
|
467
483
|
- test/functional/repository/create_test.rb
|
468
|
-
- test/functional/repository/data/test_ca.json
|
469
|
-
- test/functional/repository/data/test_cert.json
|
470
|
-
- test/functional/repository/data/test_key.json
|
471
484
|
- test/functional/repository/delete_test.rb
|
472
485
|
- test/functional/repository/export_test.rb
|
473
486
|
- test/functional/repository/info_test.rb
|
@@ -484,6 +497,8 @@ files:
|
|
484
497
|
- test/functional/repository_set/list_test.rb
|
485
498
|
- test/functional/repository_set/repository_set_helpers.rb
|
486
499
|
- test/functional/search_helpers.rb
|
500
|
+
- test/functional/simple_content_access/disable_test.rb
|
501
|
+
- test/functional/simple_content_access/enable_test.rb
|
487
502
|
- test/functional/srpm/list_test.rb
|
488
503
|
- test/functional/subscription/list_test.rb
|
489
504
|
- test/functional/sync_plan/create_test.rb
|
@@ -518,7 +533,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
518
533
|
- !ruby/object:Gem::Version
|
519
534
|
version: '0'
|
520
535
|
requirements: []
|
521
|
-
rubygems_version: 3.1.
|
536
|
+
rubygems_version: 3.1.4
|
522
537
|
signing_key:
|
523
538
|
specification_version: 4
|
524
539
|
summary: Katello commands for Hammer
|
@@ -533,6 +548,8 @@ test_files:
|
|
533
548
|
- test/data/3.15/foreman_api.json
|
534
549
|
- test/data/3.16/foreman_api.json
|
535
550
|
- test/data/3.17/foreman_api.json
|
551
|
+
- test/data/3.18/foreman_api.json
|
552
|
+
- test/data/3.19/foreman_api.json
|
536
553
|
- test/data/3.2/foreman_api.json
|
537
554
|
- test/data/3.4/foreman_api.json
|
538
555
|
- test/data/3.5/foreman_api.json
|
@@ -540,6 +557,7 @@ test_files:
|
|
540
557
|
- test/data/3.7/foreman_api.json
|
541
558
|
- test/data/3.8/foreman_api.json
|
542
559
|
- test/data/3.9/foreman_api.json
|
560
|
+
- test/data/4.0/foreman_api.json
|
543
561
|
- test/data/Readme.md
|
544
562
|
- test/functional/activation_key/add_host_collection_test.rb
|
545
563
|
- test/functional/activation_key/content_override_test.rb
|
@@ -565,8 +583,20 @@ test_files:
|
|
565
583
|
- test/functional/capsule/content/synchronization_status_test.rb
|
566
584
|
- test/functional/capsule/info_test.rb
|
567
585
|
- test/functional/capsule/list_test.rb
|
586
|
+
- test/functional/content_credentials/create_test.rb
|
587
|
+
- test/functional/content_credentials/data/test_cert.json
|
568
588
|
- test/functional/content_credentials/info_test.rb
|
569
589
|
- test/functional/content_credentials/list_test.rb
|
590
|
+
- test/functional/content_export/complete/library_test.rb
|
591
|
+
- test/functional/content_export/complete/version_test.rb
|
592
|
+
- test/functional/content_export/content_export_helpers.rb
|
593
|
+
- test/functional/content_export/generate_metadata_test.rb
|
594
|
+
- test/functional/content_export/incremental/library_test.rb
|
595
|
+
- test/functional/content_export/incremental/version_test.rb
|
596
|
+
- test/functional/content_export/list_test.rb
|
597
|
+
- test/functional/content_import/library_test.rb
|
598
|
+
- test/functional/content_import/metadata.json
|
599
|
+
- test/functional/content_import/version_test.rb
|
570
600
|
- test/functional/content_view/add_content_view_version_test.rb
|
571
601
|
- test/functional/content_view/add_repository_test.rb
|
572
602
|
- test/functional/content_view/component/add_test.rb
|
@@ -584,8 +614,6 @@ test_files:
|
|
584
614
|
- test/functional/content_view/filter/update_test.rb
|
585
615
|
- test/functional/content_view/list_test.rb
|
586
616
|
- test/functional/content_view/publish_test.rb
|
587
|
-
- test/functional/content_view/puppet_module/add_test.rb
|
588
|
-
- test/functional/content_view/puppet_module/remove_test.rb
|
589
617
|
- test/functional/content_view/purge_test.rb
|
590
618
|
- test/functional/content_view/remove_content_view_version_test.rb
|
591
619
|
- test/functional/content_view/remove_test.rb
|
@@ -610,7 +638,6 @@ test_files:
|
|
610
638
|
- test/functional/filter_rule/info_test.rb
|
611
639
|
- test/functional/filter_rule/list_test.rb
|
612
640
|
- test/functional/filter_rule/update_test.rb
|
613
|
-
- test/functional/gpg_test.rb
|
614
641
|
- test/functional/host/errata/apply_test.rb
|
615
642
|
- test/functional/host/errata/info_test.rb
|
616
643
|
- test/functional/host/errata/list_test.rb
|
@@ -630,6 +657,7 @@ test_files:
|
|
630
657
|
- test/functional/host/subscription/remove_test.rb
|
631
658
|
- test/functional/host/subscription/unregister_test.rb
|
632
659
|
- test/functional/host/traces/list_test.rb
|
660
|
+
- test/functional/host/traces/resolve_test.rb
|
633
661
|
- test/functional/host_collection/add_host_test.rb
|
634
662
|
- test/functional/host_collection/content_api_expectations.rb
|
635
663
|
- test/functional/host_collection/content_install_test.rb
|
@@ -669,9 +697,6 @@ test_files:
|
|
669
697
|
- test/functional/product/update_proxy.rb
|
670
698
|
- test/functional/product/update_test.rb
|
671
699
|
- test/functional/repository/create_test.rb
|
672
|
-
- test/functional/repository/data/test_ca.json
|
673
|
-
- test/functional/repository/data/test_cert.json
|
674
|
-
- test/functional/repository/data/test_key.json
|
675
700
|
- test/functional/repository/delete_test.rb
|
676
701
|
- test/functional/repository/export_test.rb
|
677
702
|
- test/functional/repository/info_test.rb
|
@@ -688,6 +713,8 @@ test_files:
|
|
688
713
|
- test/functional/repository_set/list_test.rb
|
689
714
|
- test/functional/repository_set/repository_set_helpers.rb
|
690
715
|
- test/functional/search_helpers.rb
|
716
|
+
- test/functional/simple_content_access/disable_test.rb
|
717
|
+
- test/functional/simple_content_access/enable_test.rb
|
691
718
|
- test/functional/srpm/list_test.rb
|
692
719
|
- test/functional/subscription/list_test.rb
|
693
720
|
- 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
|