Katello/katello — pull request #4188 by bbuckingham (2014-05-31 18:18:54+00:00)
Title: refs #5184 - fix couple of issues when deleting foreman hosts

This commit addresses a couple of issues that were observed with the
foreman host <-> katello content host integration, in the production
configuration.

1. Deleting the foreman host would result in a 404 to the user.
2. Unregistering a content host and visiting the foreman host would
show an 410 error to the user.

The key issues that caused these were:
a. There were 2 bindings of the host extensions to the host. This
triggered the deletion of the content host twice.
b. The model relation for host and content_host did not have the
proper 'inverse_of' definition, so it could lead to foreign key
errors.