Feature #7220
Replace cloudpack validation of options with Face API validation of options
| Status: | Merged - Pending Release | Start date: | 04/22/2011 | |
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | cloudpack | Spent time: | - | |
| Target version: | 1.0.2 | |||
| Keywords: | Roadmapped: | No | ||
| Branch: | https://github.com/puppetlabs/puppetlabs-cloud-provisioner/pull/73 | |||
| Votes: | 0 |
Description
CloudPack needs better option validation.
History
Updated by Daniel Pittman about 1 year ago
- Category set to Faces
- Affected Puppet version set to development
Commit 9329a1f33b4d7df81ad8661de74f8a3656428570 on 2.7.next introduced an “inherit_options_from” feature to copy some-but-not-all of the current behaviour of options from another action on another face. Specifically, it would copy the option and the related optparse arguments, but not the hooks used for (eg) validation.
This is being reverted because while there are some use cases that this might be appropriate for, it was overly specific to a single case given the presence in the core; if we introduce a similar feature it needs to be considerably more generic to support a wider range of use cases. (Which, at this point, are not yet identified.)
This had never been in any released code, only briefly in here before the reversion.
This doesn’t close the ticket, as the problem is still outstanding, just the specific solution is not folded in to core.
Updated by Jeff McCune 11 months ago
- Project changed from Puppet to Cloud-Provisioner
- Category deleted (
Faces) - Support Urls deleted (
)
Updated by Jeff McCune 11 months ago
- Priority changed from Normal to Low
- Roadmapped set to No
Updated by Nigel Kersten 10 months ago
- Category set to cloudpack
Updated by Jeff McCune 10 months ago
- Subject changed from Add option validation to CloudPack to Replace cloudpack validation of options with Face API validation of options
If I understand this ticket correct, Cloud Pack itself is doing option validation, but instead it should switch over to the Faces API for option validation.
The current version of the Faces API in 2.7.2 does not support the type of multi-argument validation and default values we need in the Cloud Pack actions at the moment. As a result, this ticket is open until the Faces API matures to the point of supporting robust option defaults and multi-argument.
Is this correct?
Updated by Dan Bode 4 months ago
I just had a look at this. It looks like default_to has been supported as a method for options since 2.7.1.
Faces also ensures that default_to is invoked for every option before before_action is called, so we can reliably set defaults and ensure that all defaults have been set before before_action is invoked for any of the options.
Updated by Dan Bode 4 months ago
- Status changed from Accepted to In Topic Branch Pending Review
- Branch set to https://github.com/puppetlabs/puppetlabs-cloud-provisioner/pull/73
Updated by Jeff McCune 4 months ago
- Status changed from In Topic Branch Pending Review to Merged - Pending Release
- Target version set to 1.0.2