MiamiOH / foreman_teamdynamix

A Foreman Plugin for TeamDynamix
GNU General Public License v3.0
1 stars 1 forks source link

Use Foreman Orchestration class to run the model hooks #16

Open edestecd opened 6 years ago

edestecd commented 6 years ago

This is a more structured way to do things and it ties into Foreman hooks for the progress bar upon host creation etc...

Here are orchestrations in core Foreman: https://github.com/theforeman/foreman/tree/006929d1057d5b59458d4fbf99cd20853c198ffd/app/models/concerns/orchestration

Here is a plugin that adds an orchestration: https://github.com/theforeman/puppetdb_foreman/blob/master/app/models/concerns/orchestration/puppetdb.rb#L13

nipendar commented 6 years ago

would need @edestecd's help on this to figure out how puppetdb initializes the Orchestration class since it is not in engine.rb and my first stab at it didn't work.

estimate it 4 hours (may change)

nipendar commented 6 years ago

@edestecd do we really want this since model extensions are working just fine.

edestecd commented 6 years ago

Yes, this will improve user experience by adding it to the progress bar on new hosts

And also provide hooks for failure etc. This is the preferred path for adding items to the orchestration of a host.