hammer_cli_katello 0.14.1 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hammer_cli_katello/apipie_helper.rb +15 -0
  3. data/lib/hammer_cli_katello/associating_commands.rb +6 -2
  4. data/lib/hammer_cli_katello/commands.rb +7 -0
  5. data/lib/hammer_cli_katello/content_view_purge.rb +1 -1
  6. data/lib/hammer_cli_katello/content_view_version.rb +238 -2
  7. data/lib/hammer_cli_katello/erratum.rb +4 -0
  8. data/lib/hammer_cli_katello/file.rb +4 -6
  9. data/lib/hammer_cli_katello/foreman_search_options_creators.rb +1 -1
  10. data/lib/hammer_cli_katello/id_resolver.rb +2 -0
  11. data/lib/hammer_cli_katello/local_helper.rb +9 -0
  12. data/lib/hammer_cli_katello/module_stream.rb +69 -0
  13. data/lib/hammer_cli_katello/module_stream_profile.rb +0 -0
  14. data/lib/hammer_cli_katello/ostree_branch.rb +4 -0
  15. data/lib/hammer_cli_katello/package_group.rb +4 -0
  16. data/lib/hammer_cli_katello/puppet_module.rb +4 -0
  17. data/lib/hammer_cli_katello/repository.rb +21 -7
  18. data/lib/hammer_cli_katello/repository_scoped_to_product.rb +3 -3
  19. data/lib/hammer_cli_katello/search_options_creators.rb +10 -2
  20. data/lib/hammer_cli_katello/sync_plan.rb +6 -8
  21. data/lib/hammer_cli_katello/version.rb +1 -1
  22. data/lib/hammer_cli_katello.rb +9 -0
  23. data/test/data/3.8/foreman_api.json +1 -1
  24. data/test/data/3.9/foreman_api.json +1 -0
  25. data/test/functional/apipie_helper_test.rb +26 -0
  26. data/test/functional/content_view/publish_test.rb +20 -0
  27. data/test/functional/content_view/version/export_test.rb +87 -0
  28. data/test/functional/content_view/version/import_test.rb +111 -0
  29. data/test/functional/content_view/version/incremental_update_test.rb +0 -0
  30. data/test/functional/local_helper_test.rb +30 -0
  31. data/test/functional/module_stream/info_test.rb +58 -0
  32. data/test/functional/module_stream/list_test.rb +53 -0
  33. data/test/functional/package_group/list_test.rb +14 -9
  34. data/test/functional/sync_plan/create_test.rb +60 -0
  35. data/test/functional/sync_plan/delete_test.rb +46 -0
  36. data/test/functional/sync_plan/update_test.rb +44 -0
  37. data/test/test_helper.rb +1 -1
  38. data/test/unit/search_options_creators_test.rb +4 -1
  39. metadata +30 -9
@@ -9,6 +9,7 @@ module HammerCLIKatello
9
9
  field :sync_date, _("Start Date"), Fields::Date
10
10
  field :interval, _("Interval")
11
11
  field :enabled, _("Enabled"), Fields::Boolean
12
+ field :cron_expression, _("Cron Expression")
12
13
  end
13
14
 
14
15
  build_options
@@ -30,10 +31,9 @@ module HammerCLIKatello
30
31
  end
31
32
 
32
33
  class CreateCommand < HammerCLIKatello::CreateCommand
33
- option "--interval", "INTERVAL", _("how often synchronization should run"),
34
- :format => HammerCLI::Options::Normalizers::Enum.new(
35
- %w(hourly daily weekly)
36
- )
34
+ option "--interval", "INTERVAL", _("how often synchronization should run")
35
+
36
+ option "--cron-expression", "CRON EXPRESSION", _("set this when interval is custom cron")
37
37
 
38
38
  option "--sync-date", "SYNC_DATE",
39
39
  _("Start date and time for the sync plan." \
@@ -47,10 +47,8 @@ module HammerCLIKatello
47
47
  end
48
48
 
49
49
  class UpdateCommand < HammerCLIKatello::UpdateCommand
50
- option "--interval", "INTERVAL", _("how often synchronization should run"),
51
- :format => HammerCLI::Options::Normalizers::Enum.new(
52
- %w(hourly daily weekly)
53
- )
50
+ option "--interval", "INTERVAL", _("how often synchronization should run")
51
+
54
52
  option "--sync-date", "SYNC_DATE", _("start date and time of the synchronization"),
55
53
  :format => HammerCLI::Options::Normalizers::DateTime.new
56
54
 
@@ -1,5 +1,5 @@
1
1
  module HammerCLIKatello
2
2
  def self.version
3
- @version ||= Gem::Version.new('0.14.1')
3
+ @version ||= Gem::Version.new('0.15.0')
4
4
  end
5
5
  end
@@ -5,6 +5,7 @@ require 'hammer_cli_foreman/commands'
5
5
  require 'hammer_cli_foreman/output/fields'
6
6
  require 'hammer_cli_foreman_tasks'
7
7
 
8
+ # rubocop:disable Metrics/ModuleLength
8
9
  module HammerCLIKatello
9
10
  def self.exception_handler_class
10
11
  HammerCLIKatello::ExceptionHandler
@@ -26,6 +27,8 @@ module HammerCLIKatello
26
27
  require 'hammer_cli_katello/id_resolver'
27
28
  require 'hammer_cli_katello/capsule'
28
29
  require 'hammer_cli_katello/id_name_options_validator'
30
+ require 'hammer_cli_katello/local_helper'
31
+ require 'hammer_cli_katello/apipie_helper'
29
32
 
30
33
  # commands
31
34
  HammerCLI::MainCommand.lazy_subcommand("activation-key", _("Manipulate activation keys"),
@@ -126,7 +129,13 @@ module HammerCLIKatello
126
129
  'hammer_cli_katello/file'
127
130
  )
128
131
 
132
+ HammerCLI::MainCommand.lazy_subcommand("module-stream", _("View Module Streams"),
133
+ 'HammerCLIKatello::ModuleStreamCommand',
134
+ 'hammer_cli_katello/module_stream'
135
+ )
136
+
129
137
  # subcommands to hammer_cli_foreman commands
130
138
  require 'hammer_cli_katello/host'
131
139
  require 'hammer_cli_katello/hostgroup'
132
140
  end
141
+ # rubocop:enable Metrics/ModuleLength