Class: Puppet::Pops::Evaluator::Runtime3Support::SeverityProducer Private
- Inherits:
-
Validation::SeverityProducer
- Object
- Validation::SeverityProducer
- Puppet::Pops::Evaluator::Runtime3Support::SeverityProducer
- Defined in:
- lib/puppet/pops/evaluator/runtime3_support.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.
Configure the severity of failures
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
-
#initialize ⇒ SeverityProducer
constructor
private
A new instance of SeverityProducer.
Methods inherited from Validation::SeverityProducer
#[], #[]=, #assert_issue, #assert_severity, #severity, #should_report?
Constructor Details
#initialize ⇒ SeverityProducer
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.
Returns a new instance of SeverityProducer.
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 |
# File 'lib/puppet/pops/evaluator/runtime3_support.rb', line 487 def initialize super p = self # Issues triggering warning only if --debug is on if Puppet[:debug] p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :warning else p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :ignore end # if strict variables are on, an error is raised # if strict variables are off, the Puppet[strict] defines what is done # if Puppet[:strict_variables] p[Issues::UNKNOWN_VARIABLE] = :error elsif Puppet[:strict] == :off p[Issues::UNKNOWN_VARIABLE] = :ignore else p[Issues::UNKNOWN_VARIABLE] = Puppet[:strict] end # Store config issues, ignore or warning p[Issues::RT_NO_STORECONFIGS_EXPORT] = Puppet[:storeconfigs] ? :ignore : :warning p[Issues::RT_NO_STORECONFIGS] = Puppet[:storeconfigs] ? :ignore : :warning p[Issues::CLASS_NOT_VIRTUALIZABLE] = Puppet[:strict] == :off ? :warning : Puppet[:strict] p[Issues::NUMERIC_COERCION] = Puppet[:strict] == :off ? :ignore : Puppet[:strict] p[Issues::SERIALIZATION_DEFAULT_CONVERTED_TO_STRING] = Puppet[:strict] == :off ? :warning : Puppet[:strict] p[Issues::SERIALIZATION_UNKNOWN_CONVERTED_TO_STRING] = Puppet[:strict] == :off ? :warning : Puppet[:strict] p[Issues::SERIALIZATION_UNKNOWN_KEY_CONVERTED_TO_STRING] = Puppet[:strict] == :off ? :warning : Puppet[:strict] end |