Description of problem: if the type of Katello::System instance is 'Host', then when working the rails console, the class type returns Host::Managed when it should return Katello::System > a = Katello::System.first > a.class => Host::Managed Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. rails console 2. find content host of type 'Host' 3. check .class on instance Actual results: => Host::Managed Expected results: => Katello::System Additional info:
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.
I thought there was a bug with type, but it appears to be caused by the Hirb gem which Foreman loads in the rails console to prettify the output Notice that type='Host' with pretty Hirb results and type='Katello::System" without. 1.9.3-p547 :002 > Katello::System.first Katello::System Load (0.7ms) SELECT "katello_systems".* FROM "katello_systems" LIMIT 1 +----+-----------------------+-----------------------+-----------------------+----------+----------------+-----------------------+-----------------------+------+-----------------+---------+ | id | uuid | name | description | location | environment_id | created_at | updated_at | type | content_view_id | host_id | +----+-----------------------+-----------------------+-----------------------+----------+----------------+-----------------------+-----------------------+------+-----------------+---------+ | 33 | cecfeafb-b378-440c... | dhcp-8-30-82.lab.e... | Initial Registrati... | None | 2 | 2014-06-25 19:49:2... | 2014-06-25 19:49:2... | Host | 2 | | +----+-----------------------+-----------------------+-----------------------+----------+----------------+-----------------------+-----------------------+------+-----------------+---------+ 1.9.3-p547 :007 > Hirb.disable => false 1.9.3-p547 :008 > Katello::System.first => #<Katello::System id: 33, uuid: "cecfeafb-b378-440c-9352-b40881b8c6f5", name: "dhcp-8-30-82.lab.eng.rdu2.redhat.com", description: "Initial Registration Params", location: "None", environment_id: 2, created_at: "2014-06-25 19:49:20", updated_at: "2014-06-25 19:49:22", type: "Katello::System", content_view_id: 2, host_id: nil>
Moving to POST since upstream bug http://projects.theforeman.org/issues/6596 has been closed ------------- Joseph Magen Applied in changeset commit:katello|19b8185e435b4d2b0df8e430bec33f98be8242bf.
This was delivered with Satellite 6.0 which was released on 10 September 2014.