hammer_cli_katello 0.20.0 → 0.22.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hammer_cli_katello.rb +13 -2
  3. data/lib/hammer_cli_katello/content_credential.rb +67 -0
  4. data/lib/hammer_cli_katello/content_view_version.rb +2 -6
  5. data/lib/hammer_cli_katello/exception_handler.rb +15 -8
  6. data/lib/hammer_cli_katello/foreman_search_options_creators.rb +8 -0
  7. data/lib/hammer_cli_katello/host.rb +5 -0
  8. data/lib/hammer_cli_katello/host_errata.rb +3 -0
  9. data/lib/hammer_cli_katello/host_extensions.rb +4 -0
  10. data/lib/hammer_cli_katello/host_traces.rb +19 -0
  11. data/lib/hammer_cli_katello/id_resolver.rb +1 -0
  12. data/lib/hammer_cli_katello/ping.rb +16 -0
  13. data/lib/hammer_cli_katello/product.rb +19 -1
  14. data/lib/hammer_cli_katello/repository.rb +37 -1
  15. data/lib/hammer_cli_katello/sync_plan.rb +1 -0
  16. data/lib/hammer_cli_katello/version.rb +1 -1
  17. data/test/data/3.15/foreman_api.json +1 -0
  18. data/test/data/3.16/foreman_api.json +1 -0
  19. data/test/data/3.17/foreman_api.json +1 -0
  20. data/test/functional/content_credentials/info_test.rb +50 -0
  21. data/test/functional/content_credentials/list_test.rb +68 -0
  22. data/test/functional/content_view/version/promote_test.rb +1 -1
  23. data/test/functional/gpg_test.rb +39 -0
  24. data/test/functional/host/errata/list_test.rb +49 -0
  25. data/test/functional/host/extensions/data/host.json +1 -0
  26. data/test/functional/host/extensions/data/host_list.json +2 -0
  27. data/test/functional/host/extensions/info_test.rb +2 -1
  28. data/test/functional/host/extensions/list_test.rb +2 -2
  29. data/test/functional/host/extensions/update_test.rb +2 -2
  30. data/test/functional/host/traces/list_test.rb +37 -0
  31. data/test/functional/organization/delete_test.rb +26 -0
  32. data/test/functional/package/list_test.rb +3 -2
  33. data/test/functional/ping_test.rb +2 -0
  34. data/test/functional/product/update_proxy.rb +48 -0
  35. data/test/functional/repository/create_test.rb +51 -0
  36. data/test/functional/repository/data/test_ca.json +43 -0
  37. data/test/functional/repository/data/test_cert.json +43 -0
  38. data/test/functional/repository/data/test_key.json +43 -0
  39. data/test/functional/srpm/list_test.rb +1 -0
  40. data/test/test_helper.rb +2 -2
  41. data/test/unit/search_options_creators_test.rb +6 -0
  42. metadata +37 -8
@@ -0,0 +1,43 @@
1
+ {
2
+ "name":"test_cert",
3
+ "content_type":"cert",
4
+ "content":"hi",
5
+ "id":2,
6
+ "organization_id":1,
7
+ "organization":{
8
+ "name":"org2",
9
+ "label":"org2",
10
+ "id":1
11
+ },
12
+ "created_at":"2020-01-28 09:30:54 -0500",
13
+ "updated_at":"2020-01-28 09:30:54 -0500",
14
+ "gpg_key_products":[
15
+
16
+ ],
17
+ "gpg_key_repos":[
18
+
19
+ ],
20
+ "ssl_ca_products":[
21
+
22
+ ],
23
+ "ssl_ca_root_repos":[
24
+
25
+ ],
26
+ "ssl_client_products":[
27
+
28
+ ],
29
+ "ssl_client_root_repos":[
30
+
31
+ ],
32
+ "ssl_key_products":[
33
+
34
+ ],
35
+ "ssl_key_root_repos":[
36
+
37
+ ],
38
+ "permissions":{
39
+ "view_content_credenials":true,
40
+ "edit_content_credenials":true,
41
+ "destroy_content_credenials":true
42
+ }
43
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "name":"test_key",
3
+ "content_type":"cert",
4
+ "content":"hi again",
5
+ "id":3,
6
+ "organization_id":1,
7
+ "organization":{
8
+ "name":"org2",
9
+ "label":"org2",
10
+ "id":1
11
+ },
12
+ "created_at":"2020-01-28 09:31:05 -0500",
13
+ "updated_at":"2020-01-28 09:31:05 -0500",
14
+ "gpg_key_products":[
15
+
16
+ ],
17
+ "gpg_key_repos":[
18
+
19
+ ],
20
+ "ssl_ca_products":[
21
+
22
+ ],
23
+ "ssl_ca_root_repos":[
24
+
25
+ ],
26
+ "ssl_client_products":[
27
+
28
+ ],
29
+ "ssl_client_root_repos":[
30
+
31
+ ],
32
+ "ssl_key_products":[
33
+
34
+ ],
35
+ "ssl_key_root_repos":[
36
+
37
+ ],
38
+ "permissions":{
39
+ "view_content_credenials":true,
40
+ "edit_content_credenials":true,
41
+ "destroy_content_credenials":true
42
+ }
43
+ }
@@ -2,6 +2,7 @@ require_relative '../test_helper'
2
2
  require_relative '../repository/repository_helpers'
3
3
  require_relative '../product/product_helpers'
4
4
  require_relative '../organization/organization_helpers'
5
+ require 'hammer_cli_katello/package'
5
6
  require 'hammer_cli_katello/srpm'
6
7
 
7
8
  module HammerCLIKatello
@@ -14,10 +14,10 @@ end
14
14
  require File.join(File.dirname(__FILE__), './task_helper.rb')
15
15
  require 'minitest/autorun'
16
16
  require 'minitest/spec'
17
- require 'mocha/setup'
17
+ require 'mocha/minitest'
18
18
  require 'hammer_cli'
19
19
 
20
- KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '3.14')
20
+ KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '3.17')
21
21
 
22
22
  if HammerCLI.context[:api_connection]
23
23
  HammerCLI.context[:api_connection].create('foreman') do
@@ -110,6 +110,12 @@ describe HammerCLIKatello::SearchOptionsCreators do
110
110
  end
111
111
  end
112
112
 
113
+ describe '#create_usergroups_search_options(options)' do
114
+ it 'does not use the katello api' do
115
+ search_options_creators.create_usergroups_search_options(:anything)
116
+ end
117
+ end
118
+
113
119
  describe '#create_compute_profiles_search_options(options, mode = nil)' do
114
120
  it 'does not use the katello api' do
115
121
  search_options_creators.create_compute_profiles_search_options(:anything)
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.20.0
4
+ version: 0.22.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Price
@@ -35,22 +35,22 @@ authors:
35
35
  autorequire:
36
36
  bindir: bin
37
37
  cert_chain: []
38
- date: 2019-10-29 00:00:00.000000000 Z
38
+ date: 2020-06-01 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: hammer_cli_foreman
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - "~>"
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 0.19.0
46
+ version: '0'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 0.19.0
53
+ version: '0'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: hammer_cli_foreman_tasks
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -239,6 +239,7 @@ files:
239
239
  - lib/hammer_cli_katello/command_extensions/ping.rb
240
240
  - lib/hammer_cli_katello/commands.rb
241
241
  - lib/hammer_cli_katello/composite_content_view_name_resolvable.rb
242
+ - lib/hammer_cli_katello/content_credential.rb
242
243
  - lib/hammer_cli_katello/content_override.rb
243
244
  - lib/hammer_cli_katello/content_view.rb
244
245
  - lib/hammer_cli_katello/content_view_component.rb
@@ -267,6 +268,7 @@ files:
267
268
  - lib/hammer_cli_katello/host_package.rb
268
269
  - lib/hammer_cli_katello/host_package_group.rb
269
270
  - lib/hammer_cli_katello/host_subscription.rb
271
+ - lib/hammer_cli_katello/host_traces.rb
270
272
  - lib/hammer_cli_katello/hostgroup.rb
271
273
  - lib/hammer_cli_katello/hostgroup_extensions.rb
272
274
  - lib/hammer_cli_katello/i18n.rb
@@ -322,6 +324,9 @@ files:
322
324
  - test/data/3.12/foreman_api.json
323
325
  - test/data/3.13/foreman_api.json
324
326
  - test/data/3.14/foreman_api.json
327
+ - test/data/3.15/foreman_api.json
328
+ - test/data/3.16/foreman_api.json
329
+ - test/data/3.17/foreman_api.json
325
330
  - test/data/3.2/foreman_api.json
326
331
  - test/data/3.4/foreman_api.json
327
332
  - test/data/3.5/foreman_api.json
@@ -354,6 +359,8 @@ files:
354
359
  - test/functional/capsule/content/synchronization_status_test.rb
355
360
  - test/functional/capsule/info_test.rb
356
361
  - test/functional/capsule/list_test.rb
362
+ - test/functional/content_credentials/info_test.rb
363
+ - test/functional/content_credentials/list_test.rb
357
364
  - test/functional/content_view/add_content_view_version_test.rb
358
365
  - test/functional/content_view/add_repository_test.rb
359
366
  - test/functional/content_view/component/add_test.rb
@@ -397,8 +404,10 @@ files:
397
404
  - test/functional/filter_rule/info_test.rb
398
405
  - test/functional/filter_rule/list_test.rb
399
406
  - test/functional/filter_rule/update_test.rb
407
+ - test/functional/gpg_test.rb
400
408
  - test/functional/host/errata/apply_test.rb
401
409
  - test/functional/host/errata/info_test.rb
410
+ - test/functional/host/errata/list_test.rb
402
411
  - test/functional/host/errata/recalculate_test.rb
403
412
  - test/functional/host/extensions/create_test.rb
404
413
  - test/functional/host/extensions/data/host.json
@@ -414,6 +423,7 @@ files:
414
423
  - test/functional/host/subscription/register_test.rb
415
424
  - test/functional/host/subscription/remove_test.rb
416
425
  - test/functional/host/subscription/unregister_test.rb
426
+ - test/functional/host/traces/list_test.rb
417
427
  - test/functional/host_collection/add_host_test.rb
418
428
  - test/functional/host_collection/content_api_expectations.rb
419
429
  - test/functional/host_collection/content_install_test.rb
@@ -438,6 +448,7 @@ files:
438
448
  - test/functional/local_helper_test.rb
439
449
  - test/functional/module_stream/info_test.rb
440
450
  - test/functional/module_stream/list_test.rb
451
+ - test/functional/organization/delete_test.rb
441
452
  - test/functional/organization/organization_helpers.rb
442
453
  - test/functional/package/list_test.rb
443
454
  - test/functional/package_group/list_test.rb
@@ -449,7 +460,12 @@ files:
449
460
  - test/functional/product/product_helpers.rb
450
461
  - test/functional/product/remove_sync_plan_test.rb
451
462
  - test/functional/product/set_sync_plan_test.rb
463
+ - test/functional/product/update_proxy.rb
452
464
  - test/functional/product/update_test.rb
465
+ - test/functional/repository/create_test.rb
466
+ - test/functional/repository/data/test_ca.json
467
+ - test/functional/repository/data/test_cert.json
468
+ - test/functional/repository/data/test_key.json
453
469
  - test/functional/repository/delete_test.rb
454
470
  - test/functional/repository/export_test.rb
455
471
  - test/functional/repository/info_test.rb
@@ -500,8 +516,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
500
516
  - !ruby/object:Gem::Version
501
517
  version: '0'
502
518
  requirements: []
503
- rubyforge_project:
504
- rubygems_version: 2.7.6.2
519
+ rubygems_version: 3.1.2
505
520
  signing_key:
506
521
  specification_version: 4
507
522
  summary: Katello commands for Hammer
@@ -513,6 +528,9 @@ test_files:
513
528
  - test/data/3.12/foreman_api.json
514
529
  - test/data/3.13/foreman_api.json
515
530
  - test/data/3.14/foreman_api.json
531
+ - test/data/3.15/foreman_api.json
532
+ - test/data/3.16/foreman_api.json
533
+ - test/data/3.17/foreman_api.json
516
534
  - test/data/3.2/foreman_api.json
517
535
  - test/data/3.4/foreman_api.json
518
536
  - test/data/3.5/foreman_api.json
@@ -545,6 +563,8 @@ test_files:
545
563
  - test/functional/capsule/content/synchronization_status_test.rb
546
564
  - test/functional/capsule/info_test.rb
547
565
  - test/functional/capsule/list_test.rb
566
+ - test/functional/content_credentials/info_test.rb
567
+ - test/functional/content_credentials/list_test.rb
548
568
  - test/functional/content_view/add_content_view_version_test.rb
549
569
  - test/functional/content_view/add_repository_test.rb
550
570
  - test/functional/content_view/component/add_test.rb
@@ -588,8 +608,10 @@ test_files:
588
608
  - test/functional/filter_rule/info_test.rb
589
609
  - test/functional/filter_rule/list_test.rb
590
610
  - test/functional/filter_rule/update_test.rb
611
+ - test/functional/gpg_test.rb
591
612
  - test/functional/host/errata/apply_test.rb
592
613
  - test/functional/host/errata/info_test.rb
614
+ - test/functional/host/errata/list_test.rb
593
615
  - test/functional/host/errata/recalculate_test.rb
594
616
  - test/functional/host/extensions/create_test.rb
595
617
  - test/functional/host/extensions/data/host.json
@@ -605,6 +627,7 @@ test_files:
605
627
  - test/functional/host/subscription/register_test.rb
606
628
  - test/functional/host/subscription/remove_test.rb
607
629
  - test/functional/host/subscription/unregister_test.rb
630
+ - test/functional/host/traces/list_test.rb
608
631
  - test/functional/host_collection/add_host_test.rb
609
632
  - test/functional/host_collection/content_api_expectations.rb
610
633
  - test/functional/host_collection/content_install_test.rb
@@ -629,6 +652,7 @@ test_files:
629
652
  - test/functional/local_helper_test.rb
630
653
  - test/functional/module_stream/info_test.rb
631
654
  - test/functional/module_stream/list_test.rb
655
+ - test/functional/organization/delete_test.rb
632
656
  - test/functional/organization/organization_helpers.rb
633
657
  - test/functional/package/list_test.rb
634
658
  - test/functional/package_group/list_test.rb
@@ -640,7 +664,12 @@ test_files:
640
664
  - test/functional/product/product_helpers.rb
641
665
  - test/functional/product/remove_sync_plan_test.rb
642
666
  - test/functional/product/set_sync_plan_test.rb
667
+ - test/functional/product/update_proxy.rb
643
668
  - test/functional/product/update_test.rb
669
+ - test/functional/repository/create_test.rb
670
+ - test/functional/repository/data/test_ca.json
671
+ - test/functional/repository/data/test_cert.json
672
+ - test/functional/repository/data/test_key.json
644
673
  - test/functional/repository/delete_test.rb
645
674
  - test/functional/repository/export_test.rb
646
675
  - test/functional/repository/info_test.rb