Refactor #9546

Discovery should provide a convinient method to convert discovered host into managed host (aka provision)

Added by Marek Hulán about 2 years ago. Updated about 2 years ago.

Status:Closed
Priority:Urgent
Assigned To:Lukas Zapletal
Category:Discovery plugin
Target version:Plugin 2.0.1
Difficulty: Pull request:https://github.com/theforeman/foreman_discovery/pull/161
Bugzilla link:
Story points-
Velocity based estimate-

Description

There's no reusable way to transform discovered host into managed host provided by Discovery, which leads to custom code copied from discovery controller like this Unfortunately this leads to problems when the "official" provision code changes, like someone adds deletion of discovered host facts. I know that there's already perform_auto_provision which is shared among controllers using concern, but it does not belong to controller. I see it as a Host::Discovered responsibility or if not directly this class, then some new HostConverter, not controller.


Related issues

Related to Discovery - Bug #9488: Unable delete the discovered hosts from foreman Closed 02/20/2015

Associated revisions

Revision 4376e3ca
Added by Lukas Zapletal about 2 years ago

Fixes #9546 - added converter STI helper API

Revision d01c6981
Added by Ori Rabin about 2 years ago

refs #9546 - moving host_converter to proper directory for rails

History

#1 Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_discovery/pull/161 added

#2 Updated by Lukas Zapletal about 2 years ago

  • Assigned To set to Lukas Zapletal
  • Target version set to Plugin 3.0.0

Agreed, pushed first version. Feel free to review.

#3 Updated by Ori Rabin about 2 years ago

  • Related to Bug #9488: Unable delete the discovered hosts from foreman added

#4 Updated by Lukas Zapletal about 2 years ago

  • Priority changed from Normal to Urgent
  • Target version changed from Plugin 3.0.0 to Plugin 2.0.1

#5 Updated by Anonymous about 2 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF