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

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

Defined Under Namespace

Classes: EnvironmentRelationshipValidator, RelationshipValidator, SiteValidator

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:


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

def initialize(catalog)
  @catalog = catalog
end

Instance Attribute Details

#catalogObject (readonly)

Returns the value of attribute catalog


18
19
20
# File 'lib/puppet/parser/compiler/catalog_validator.rb', line 18

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


14
15
16
# File 'lib/puppet/parser/compiler/catalog_validator.rb', line 14

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


26
27
# File 'lib/puppet/parser/compiler/catalog_validator.rb', line 26

def validate
end