Project

General

Custom queries

Profile

Actions

Bug #23840

closed

Host class does not change with managed state

Added by Andrew Kofink almost 7 years ago. Updated almost 5 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Host creation
Target version:
-
Difficulty:
easy
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

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

Actual:
h.class # Host::Managed

Expected:
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.

#1

Updated by Akshay Mendhe over 6 years ago

  • Assignee set to Akshay Mendhe
#3

Updated by Akshay Mendhe over 6 years ago

  • Triaged changed from No to Yes
#5

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6020 added
#7

Updated by Tomer Brisker over 5 years ago

  • Status changed from Ready For Testing to New
  • Assignee deleted (Akshay Mendhe)
#8

Updated by Andrew Kofink over 5 years ago

  • Pull request deleted (https://github.com/theforeman/foreman/pull/6020)
#9

Updated by Tomer Brisker almost 5 years ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF