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

Fixes #38065 - Remove syspurpose addons from hammer #978

Merged
merged 1 commit into from
Dec 9, 2024
Merged
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
3 changes: 0 additions & 3 deletions lib/hammer_cli_katello/activation_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,10 @@ def request_params
field :service_level, _('Service Level'), Fields::Field, :hide_blank => true
field :purpose_usage, _('Purpose Usage'), Fields::Field, :hide_blank => true
field :purpose_role, _('Purpose Role'), Fields::Field, :hide_blank => true
field :purpose_addons, _('Purpose Addons'), Fields::List, :hide_blank => true
end
end

def extend_data(data)
# Hack to hide purpose addons if it's not set since it's not possible to hide the Fields::List values
data["purpose_addons"] = data["purpose_addons"].length.positive? ? data["purpose_addons"] : nil
limit = data["unlimited_hosts"] ? _("Unlimited") : data["max_hosts"]

data["format_consumed"] = _("%{consumed} of %{limit}") %
Expand Down
1 change: 0 additions & 1 deletion lib/hammer_cli_katello/host_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ module HostExtensions
field :service_level, _('Service Level')
field :purpose_usage, _('Purpose Usage')
field :purpose_role, _('Purpose Role')
field :purpose_addons, _('Purpose Addons'), Fields::List
end
end
end
Expand Down
1 change: 0 additions & 1 deletion test/functional/activation_key/data/activation_key.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"name": "Library",
"id": 1
},
"purpose_addons": "Test Addon1, Test Addon2",
"multi_content_view_environment": true,
"organization": {
"name": "Default Organization",
Expand Down
1 change: 0 additions & 1 deletion test/functional/activation_key/info_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
['Description', 'Activation key'],
['Purpose Usage', 'Usage'],
['Purpose Role', 'Role'],
['Purpose Addons', 'Test Addon1, Test Addon2'],
['Multi Content View Environment', 'yes'],
['Organization', ''],
['Id', '1'],
Expand Down
1 change: 0 additions & 1 deletion test/functional/host/extensions/data/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
"release_version":"7Server",
"purpose_usage":"Production",
"purpose_role":"Role",
"purpose_addons":"Test Addon1, Test Addon2",
"autoheal":true,
"registered_at":"2016-05-26 10:46:22 -0400",
"activation_keys":[
Expand Down
1 change: 0 additions & 1 deletion test/functional/host/extensions/info_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
['Upgradable Packages', '4'],
['Purpose Usage', 'Production'],
['Purpose Role', 'Role'],
['Purpose Addons', 'Test Addon1, Test Addon2'],
['Trace Status', 'Updated'],
['Running image', 'potato'],
['Running image digest',
Expand Down
Loading