Operating System created for Satellite server does not have partition table or templates assigned
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1251041
Description of problem:
It appears that when the Satellite server checks in via Puppet, an Operating System is created. That operating system does not have any partition table or templates assigned to it; therefore, that operating system cannot be used 'as is' for provisioning hosts. This causes issues for users (such as RHCI) which assume that the OS is correctly configured for use.
Version-Release number of selected component (if applicable):
Satellite 6.1.1 SNAP15 builds:
Steps to Reproduce:
1. install Satellite on a RHEL 7.1 server
2. go to Hosts -> Operating systems
3. select the Redhat 7.1 OS
Observe that no Partition table or Templates are assigned
Partition table and Templates should be assigned
Katello has an 'after_create' filter on the redhat model (in models/katello/concerns/redhat_extentions.rb) that should get triggered to do these associations; however, that does not appear to be getting triggered by the current process for the Satellite server. It does, however, get invoked when the server creates an OS as part of syncing a kickstart repository.
fixes #11322 - associate partition table and templates to Operating System upon creation
This commit is a minor change to the existing logic to ensure that when an Operating
System is created as part of a puppet checkin (e.g. the Katello server itself),
the resultant OS has the partition tables and provisioning templates associated.
Previously, this wasn't occuring because the OS created by foreman is using
Operatingsystem.create vs Redhat.create. This makes sense as the server may
not be running Red Hat OS; howevever, it caused the redhat_extensions 'after_create'
filter to not get executed.