Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1167850

Summary: [RFE] add section for extending Satellite 6
Product: Red Hat Satellite Reporter: Bryan Kearney <bkearney>
Component: Docs User GuideAssignee: Stephen Wadeley <swadeley>
Status: CLOSED CURRENTRELEASE QA Contact: Brandi Munilla <bmcelvee>
Severity: high Docs Contact:
Priority: medium    
Version: 6.0.4CC: adahms, bkearney, dlackey, hjensas, lzap, mbacovsk, swadeley, xdmoon
Target Milestone: UnspecifiedKeywords: FutureFeature
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-17 09:21:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1310565    

Description Bryan Kearney 2014-11-25 14:11:25 UTC
Users of Satellite 6 can extend satellite 6 in two ways. One is plugins for the UI, the other is via hooks. In each of these cases the API to the extension is supported, but the actual code running is not. The extension points should be documented in the Users Guide.

* Installing UI Plugins are documented upstream at http://theforeman.org/manuals/1.6/index.html#6.1InstallaPlugin

* Foreman hooks (with plugins) is documented here
https://github.com/bkearney/foreman_hooks/blob/bkearney/katello_hooks/README.md

Comment 2 Athene Chan 2014-11-25 22:29:30 UTC
Thanks BK. Adding it to the documentation prioritization list.

Comment 3 RHEL Program Management 2015-04-21 16:08:13 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 12 Lukas Zapletal 2016-03-22 14:29:26 UTC
>SJW: Why do those look like shell variables? Should they not be replaceable values? " djuran> a list of possible objects and events would be useful" SJW: where can I find such a list?

You can format them as [VARIABLE] if you want to avoid confusion with shell variable. For all possible events, see below.

>SJW: This seems out of place, where should it go? Need to understand context to understand where it best fits

It looks good to me.

To get full list of available models, use this trick:

# foreman-rake console
> ActiveRecord::Base.descendants.collect(&:name).collect(&:underscore).sort
=> ["active_record/schema_migration", "active_record/session_store/session", "architecture", "audited/adapters/active_record/audit", "bookmark", "compute_resource", "config_report", "container", "docker_container_wizard_state", "docker_container_wizard_states/configuration", "docker_container_wizard_states/environment", "docker_container_wizard_states/image", "docker_container_wizard_states/preliminary", "domain", "environment", "fact_name", "feature", "filter", "filtering", "foreman/model/openstack", "foreman/model/ovirt", "foreman_docker/docker", "foreman_openscap/arf_report", "foreman_openscap/compliance_status", "foreman_tasks/recurring_logic", "foreman_tasks/task", "habtm_architectures", "habtm_features", "habtm_filters", "habtm_locations", "habtm_media", "habtm_operatingsystems", "habtm_operatingsystems", "habtm_operatingsystems", "habtm_operatingsystems", "habtm_operatingsystems", "habtm_organizations", "habtm_provisioning_templates", "habtm_ptables", "habtm_puppetclasses", "habtm_smart_proxies", "host/base", "host/managed", "host_status/build_status", "host_status/configuration_status", "host_status/execution_status", "host_status/status", "hostgroup", "job_template", "katello/errata_status", "katello/erratum", "katello/host/content_facet", "katello/host/subscription_facet", "katello/model", "katello/puppet_module", "katello/repository", "katello/rhsm_fact_name", "katello/rpm", "katello/subscription_status", "location", "log", "medium", "model", "nic/base", "nic/bmc", "nic/bond", "nic/bridge", "nic/interface", "nic/managed", "operatingsystem", "organization", "permission", "provisioning_template", "ptable", "puppetclass", "realm", "redhat", "remote_execution_feature", "report", "role", "setting", "setting/auth", "setting/bootdisk", "setting/discovered", "setting/foreman_tasks", "setting/general", "setting/katello", "setting/provisioning", "setting/puppet", "setting/remote_execution", "smart_proxy", "subnet", "taxonomy", "template", "user", "user_role", "usergroup"]

This also lists some technical tables which are unlikely to be used with Foreman Hooks, for example "active_record" or "habtm".

>SJW: If the task succeeds, can we say an event has occurred?

I don't understand, I hope this is explained in "⁠21.2.4. Hook Failures and Rollback" section. Orchestration hooks can be given a priority (see "Execution of hooks"), therefore it is possible to order them before or after built-in orchestration steps (before DNS record is deployed for example).

>SJW; What about NICs? 

Fixed, missing word. Note that both host and NICs can also be used via Rails hooks as well.

>SJW: Why do we have the word "object' in the Rails section? I thought that was not Rails terminology

Subjects for both rails and orchestration hooks are known as objects. 

> SJW: Can someone explain why this is a good idea?

To prevent pipe buffer from filling which would block Foreman thread.

I have filed an upstream patch to improve and clear few things, read it please: https://github.com/theforeman/foreman_hooks/pull/32

Comment 14 Andrew Dahms 2016-03-31 13:32:45 UTC
Changing the QA contact to Brandi.

Brandi - could you take a look at the changes for this bug when it is put on QA, and move the content into the new Server Administration Guide if you have time?

Comment 20 Stephen Wadeley 2016-06-17 09:21:31 UTC
Hello


This is in the "Customizing Satellite Server" chapter of the new "Server Administration Guide"


https://access.redhat.com/documentation/en/red-hat-satellite/6.2-beta/server-administration-guide/chapter-10-customizing-satellite-server

Thank you

Comment 21 Stephen Wadeley 2016-10-31 10:51:10 UTC
*** Bug 1244406 has been marked as a duplicate of this bug. ***