Feature #3103

Read only provisioning/config templates for plugins

Added by Dominic Cleal over 4 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Stephen Benjamin
Category:Templates
Target version:Sprint 26
Difficulty: Bugzilla link:1123761
Found in release: Pull request:https://github.com/theforeman/foreman/pull/1559
Story points-
Velocity based estimate-
Release1.6.0Release relationshipAuto

Description

As a plugin author, I'd like to be able to set certain provisioning templates to be read only, so I can supply originals and updates in my DB migrations and be sure that I won't lose a user's changes when they upgrade.

In the bootdisk plugin I do this by patching the config template model:
https://github.com/theforeman/foreman_bootdisk/blob/master/app/models/concerns/bootdisk/config_template_ext.rb

(this could probably be tidied and submitted to core)

I then supply the templates in DB migrations, including updates, then ask the user to copy the contents to a new template (#1646 would make this a lot easier) and to change a setting pointing to their customised template. If they then upgrade the plugin, the user can then merge the two by hand or switch the setting back to the one I supply.


Related issues

Related to Foreman - Feature #1646: Add feature to clone provisioning templates Closed 05/22/2012
Related to Foreman - Bug #2792: If you delete "PXE Localboot Default" cancel build fails New 07/15/2013
Related to Foreman - Tracker #6631: Provisioning Template Improvements New 07/16/2014
Related to Foreman - Bug #6717: Template locked/unlock message cannot be translated Closed 07/22/2014
Related to Foreman - Feature #2297: Ability for admins to lock certain templates, hostgroups,... Resolved 03/10/2013
Related to Foreman - Bug #6881: Config Templates model doesn't correctly check that chang... Closed 08/01/2014
Related to Foreman - Bug #7061: UI doesn't show browse/upload option to upload a template... Closed 08/13/2014
Related to Foreman - Bug #7563: Hammer cannot associate a locked provisioning template to... Resolved 09/22/2014
Blocks Foreman - Feature #3529: Add bootdisk support to Foreman New 10/28/2013

Associated revisions

Revision 4a28771d
Added by Stephen Benjamin over 3 years ago

fixes #1646, #3103 - enable cloning and locking of templates

History

#1 Updated by Dominic Cleal over 4 years ago

  • Related to Feature #1646: Add feature to clone provisioning templates added

#2 Updated by Dominic Cleal over 4 years ago

  • Related to Bug #2792: If you delete "PXE Localboot Default" cancel build fails added

#3 Updated by Dominic Cleal about 4 years ago

#4 Updated by Stephen Benjamin over 3 years ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Stephen Benjamin

#5 Updated by Dominic Cleal over 3 years ago

  • Target version set to Sprint 25

#6 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 25 to Sprint 26

#7 Updated by Stephen Benjamin over 3 years ago

  • Related to Tracker #6631: Provisioning Template Improvements added

#8 Updated by Daniel Lobato Garcia over 3 years ago

  • Status changed from Ready For Testing to Closed
  • Pull request https://github.com/theforeman/foreman/pull/1559 added

#9 Updated by Dominic Cleal over 3 years ago

  • Release set to 1.6.0

#10 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #6717: Template locked/unlock message cannot be translated added

#11 Updated by Stephen Benjamin over 3 years ago

  • Bugzilla link set to 1123761

#12 Updated by Stephen Benjamin over 3 years ago

  • Related to Feature #2297: Ability for admins to lock certain templates, hostgroups, and disk layouts from editing added

#13 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #6881: Config Templates model doesn't correctly check that changes are being made in rake added

#14 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #7061: UI doesn't show browse/upload option to upload a template file added

#15 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #7563: Hammer cannot associate a locked provisioning template to an Operating System, unless its cloned. But the Web UI can added

Also available in: Atom PDF