Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs #38048 - Add rolling content views #974

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/hammer_cli_katello/activation_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def request_params
field :content_view_version, _("Version")
field :content_view_version_id, _("Content View version Id")
field :composite, _("Composite"), Fields::Boolean
field :rolling, _("Rolling"), Fields::Boolean
field :content_view_environment_id, _("Content View Environment id"), Fields::Field
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/hammer_cli_katello/capsule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ class InfoCommand < HammerCLIKatello::InfoCommand
collection :content_views, _("Content Views") do
field nil, _("Name"), Fields::Reference
field :composite, _('Composite'), Fields::Boolean
field :rolling, _('Rolling'), Fields::Boolean
field :last_published, _('Last Published'), Fields::Date
collection :repositories, _('Repositories') do
field :id, _("Repository ID")
Expand Down
4 changes: 4 additions & 0 deletions lib/hammer_cli_katello/content_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class ListCommand < HammerCLIKatello::ListCommand
field :name, _("Name")
field :label, _("Label")
field :composite, _("Composite"), Fields::Boolean
field :rolling, _("Rolling"), Fields::Boolean
field :last_published, _("Last Published"), Fields::Date, :hide_blank => true
field :repository_ids, _("Repository IDs"), Fields::List, :max_width => 300
end
Expand All @@ -32,6 +33,7 @@ class InfoCommand < HammerCLIKatello::InfoCommand
field :name, _("Name")
field :label, _("Label")
field :composite, _("Composite"), Fields::Boolean
field :rolling, _("Rolling"), Fields::Boolean
field :description, _("Description")
field :content_host_count, _("Content Host Count")
field :solve_dependencies, _("Solve Dependencies"), Fields::Boolean
Expand Down Expand Up @@ -142,11 +144,13 @@ class CreateCommand < HammerCLIKatello::CreateCommand
failure_message _("Could not create the content view")

option ["--composite"], :flag, _("Create a composite content view")
option ["--rolling"], :flag, _("Create a rolling content view")
option ["--import-only"], :flag, _("Designate this Content View for "\
"importing from upstream servers only.")
def request_params
super.tap do |opts|
opts['composite'] = option_composite? || false
opts['rolling'] = option_rolling? || false
opts['import_only'] = option_import_only? || false
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/hammer_cli_katello/host_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ module HostExtensions
field :id, _("Id")
field :name, _("Name")
field :composite, _("Composite"), Fields::Boolean
field :rolling, _("Rolling"), Fields::Boolean
end
end
from :lifecycle_environment do
Expand Down
12 changes: 6 additions & 6 deletions test/functional/content_view/list_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@

ex.returns(empty_response)
expected_result = success_result(
"----------------|------|-------|-----------|----------------|---------------
CONTENT VIEW ID | NAME | LABEL | COMPOSITE | LAST PUBLISHED | REPOSITORY IDS
----------------|------|-------|-----------|----------------|---------------
"----------------|------|-------|-----------|---------|----------------|---------------
CONTENT VIEW ID | NAME | LABEL | COMPOSITE | ROLLING | LAST PUBLISHED | REPOSITORY IDS
----------------|------|-------|-----------|---------|----------------|---------------
")

result = run_cmd(@cmd + params)
Expand All @@ -57,9 +57,9 @@

ex.returns(empty_response)
expected_result = success_result(
"----------------|------|-------|-----------|----------------|---------------
CONTENT VIEW ID | NAME | LABEL | COMPOSITE | LAST PUBLISHED | REPOSITORY IDS
----------------|------|-------|-----------|----------------|---------------
"----------------|------|-------|-----------|---------|----------------|---------------
CONTENT VIEW ID | NAME | LABEL | COMPOSITE | ROLLING | LAST PUBLISHED | REPOSITORY IDS
----------------|------|-------|-----------|---------|----------------|---------------
")

result = run_cmd(@cmd + params)
Expand Down
Loading