Host class does not change with managed state
A Host::Base can be a Host::Managed if it's managed? attribute is set. When managed? is false, the host should no longer be a Host::Managed. In nightly, this is not the case.
To reproduce (in rake console):
h = Host.new
h.managed? # false
h.class # Host::Managed
h.class # Host::Base
This is an issue if we ever want to use polymorphism, and it should be as easy as setting the type correctly on the host. Hopefully, there is no behavior on Host::Managed that shouldn't be there, but if so, it should be moved to Host::Base.
Updated by Tomer Brisker over 3 years ago
- Status changed from New to Rejected
It is a bit confusing, but the `managed` flag does not relate to the `Host::Managed` class. There should not be any hosts with `Host::Base` class, as it is a base class for STI, and a `Host::Managed` could either have the `managed` flag set or not.