Class: Puppet::Pops::Validation::ValidatorFactory_4_0 Private
- Defined in:
- lib/puppet/pops/validation/validator_factory_4_0.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Configures validation suitable for 4.0
Constant Summary collapse
- Issues =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Issues
Instance Method Summary collapse
-
#checker(diagnostic_producer) ⇒ Object
private
Produces the checker to use.
-
#label_provider ⇒ Object
private
Produces the label provider to use.
-
#severity_producer ⇒ Object
private
Produces the severity producer to use.
Methods inherited from Factory
#diagnostic_producer, #validator
Instance Method Details
#checker(diagnostic_producer) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Produces the checker to use
10 11 12 13 14 15 16 17 |
# File 'lib/puppet/pops/validation/validator_factory_4_0.rb', line 10 def checker diagnostic_producer if Puppet[:tasks] require_relative 'tasks_checker' TasksChecker.new(diagnostic_producer) else Checker4_0.new(diagnostic_producer) end end |
#label_provider ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Produces the label provider to use
20 21 22 |
# File 'lib/puppet/pops/validation/validator_factory_4_0.rb', line 20 def label_provider Model::ModelLabelProvider.new() end |
#severity_producer ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Produces the severity producer to use
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/puppet/pops/validation/validator_factory_4_0.rb', line 25 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::FUTURE_RESERVED_WORD] = :deprecation p[Issues::DUPLICATE_KEY] = Puppet[:strict] == :off ? :ignore : Puppet[:strict] p[Issues::NAME_WITH_HYPHEN] = :error p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :ignore p[Issues::CLASS_NOT_VIRTUALIZABLE] = :error p end |