Class: Puppet::Pops::Validation::ValidatorFactory_4_0
- Defined in:
- lib/puppet/pops/validation/validator_factory_4_0.rb
Overview
Configures validation suitable for 4.0
Constant Summary collapse
- Issues =
Puppet::Pops::Issues
Instance Method Summary collapse
-
#checker(diagnostic_producer) ⇒ Object
Produces the checker to use.
-
#label_provider ⇒ Object
Produces the label provider to use.
-
#severity_producer ⇒ Object
Produces the severity producer to use.
Methods inherited from Factory
#diagnostic_producer, #validator
Instance Method Details
#checker(diagnostic_producer) ⇒ Object
Produces the checker to use
7 8 9 |
# File 'lib/puppet/pops/validation/validator_factory_4_0.rb', line 7 def checker diagnostic_producer Puppet::Pops::Validation::Checker4_0.new(diagnostic_producer) end |
#label_provider ⇒ Object
Produces the label provider to use
12 13 14 |
# File 'lib/puppet/pops/validation/validator_factory_4_0.rb', line 12 def label_provider Puppet::Pops::Model::ModelLabelProvider.new() end |
#severity_producer ⇒ Object
Produces the severity producer to use
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/puppet/pops/validation/validator_factory_4_0.rb', line 17 def severity_producer p = super # Configure each issue that should **not** be an error # # Validate as per the current runtime configuration p[Issues::RT_NO_STORECONFIGS_EXPORT] = Puppet[:storeconfigs] ? :ignore : :warning p[Issues::RT_NO_STORECONFIGS] = Puppet[:storeconfigs] ? :ignore : :warning p[Issues::NAME_WITH_HYPHEN] = :error p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :ignore p end |