Bug 1326034

Summary: [RFE] Wrap Facet registration in plugin API
Product: Red Hat Satellite Reporter: Bryan Kearney <bkearney>
Component: ProvisioningAssignee: Eric Helms <ehelms>
Status: CLOSED ERRATA QA Contact: Lukas Zapletal <lzap>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, cwelton, lzap
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/13417
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:44:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bryan Kearney 2016-04-11 15:54:39 UTC
The current Facet registration for plugins occurs independently of registering and using the plugin interface. To me, this breaks from the idea of centralizing additions plugins need in the plugin API. Current registration:

<pre>
  Facets.register(Katello::Host::ContentFacet, :content_facet) do
    api_view :list => 'katello/api/v2/content_facet/base_with_root', :single => 'katello/api/v2/content_facet/show'
  end
</pre>

Comment 1 Bryan Kearney 2016-04-11 15:54:41 UTC
Created from redmine issue http://projects.theforeman.org/issues/13417

Comment 2 Bryan Kearney 2016-04-11 15:54:43 UTC
Upstream bug assigned to ehelms

Comment 3 Bryan Kearney 2016-04-11 16:03:06 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/13417 has been closed
-------------
Eric Helms
Applied in changeset commit:7d90b5cb23decf7d9f6f09f8114ea8a9b1f697a0.

Comment 6 Lukas Zapletal 2017-08-09 08:43:29 UTC
The code is present in

[root@winter ~]# rpm -q foreman katello
foreman-1.15.2-1.el7sat.noarch
katello-3.4.2-1.el7sat.noarch

[root@winter ~]# grep register_facet /usr/share/foreman/app/services/foreman/plugin.rb
    def register_facet(klass, name, &block)

Content facet is registered properly:

Host - Create - I see Content Source for example.

Comment 7 Satellite Program 2018-02-21 16:44:36 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.

For information on the advisory, and where to find the updated files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0336