Bug #30708
closedSyspurpose role is showing empty in the subscription page and rest api even it has a role
Description
Description of problem:
Go to Web UI -> Content -> Subscriptions -> pick a subscription with role, "Red Hat Enterprise Linux Server with Smart Management, Premium (Physical or Virtual Nodes)" is a good candidate -> Details tab
Under "System Purpose" section, role is empty.
You can also reproduce via rest api:
curl -v -k -u "username:password" https://satellite.example.com/katello/api/organizations/1/subscriptions/<subscription id> | python -m json.tool
{
...
"roles": null, <================== Role is null
"support_level": "Premium",
"support_type": "L1-L3",
"type": "NORMAL",
...
"usage": "Production",
...
}
Additional info:
It is because of the "s" word (plural). Candlepin calls it roles but Katello calls it role.
See the below lines in "glue/candlepin/pool.rb" for more details:
lazy_accessor :pool_derived, :owner, :source_pool_id, :virt_limit, :arch, :description, :product_family,
:variant, :suggested_quantity, :support_type, :product_id, :type, :upstream_entitlement_id, :roles, :usage, :addons,
:initializer => :pool_facts
Updated by Jonathon Turel over 4 years ago
- Target version set to Katello 3.18.0
- Triaged changed from No to Yes
Updated by Jonathon Turel about 4 years ago
- Target version changed from Katello 3.18.0 to Katello 4.1.0
Updated by The Foreman Bot almost 4 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/9233 added
Updated by The Foreman Bot over 3 years ago
- Fixed in Releases Katello 4.2.0 added
Updated by Jonathon Turel over 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|bc682301b52cac8c42b3979286fff0749f13d1d1.