Class: Puppet::Parser::Compiler::CatalogValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/parser/compiler/catalog_validator.rb

Direct Known Subclasses

RelationshipValidator

Defined Under Namespace

Classes: RelationshipValidator

Constant Summary collapse

PRE_FINISH =
:pre_finish
FINAL =
:final

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(catalog) ⇒ CatalogValidator

Returns a new instance of CatalogValidator.

Parameters:



23
24
25
# File 'lib/puppet/parser/compiler/catalog_validator.rb', line 23

def initialize(catalog)
  @catalog = catalog
end

Instance Attribute Details

#catalogObject (readonly)



20
21
22
# File 'lib/puppet/parser/compiler/catalog_validator.rb', line 20

def catalog
  @catalog
end

Class Method Details

.validation_stage?(stage) ⇒ Boolean

Returns true if the validator should run at the given stage. The default implementation will only run at stage ‘FINAL`

Parameters:

  • stage (Symbol)

    One of the stage constants defined in this class

Returns:

  • (Boolean)

    true if the validator should run at the given stage



16
17
18
# File 'lib/puppet/parser/compiler/catalog_validator.rb', line 16

def self.validation_stage?(stage)
  FINAL.equal?(stage)
end

Instance Method Details

#validateObject

Validate some aspect of the catalog and raise a ‘CatalogValidationError` on failure



28
29
# File 'lib/puppet/parser/compiler/catalog_validator.rb', line 28

def validate
end