Class: Puppet::Parser::Compiler::CatalogValidator::RelationshipValidator
- Inherits:
-
Puppet::Parser::Compiler::CatalogValidator
- Object
- Puppet::Parser::Compiler::CatalogValidator
- Puppet::Parser::Compiler::CatalogValidator::RelationshipValidator
- Defined in:
- lib/puppet/parser/compiler/catalog_validator/relationship_validator.rb
Overview
Validator that asserts that only ‘require’, ‘consume’, and ‘export’ is used when declaring relationships to capability resources.
Constant Summary
Constants inherited from Puppet::Parser::Compiler::CatalogValidator
Instance Attribute Summary
Attributes inherited from Puppet::Parser::Compiler::CatalogValidator
Instance Method Summary collapse
Methods inherited from Puppet::Parser::Compiler::CatalogValidator
#initialize, validation_stage?
Constructor Details
This class inherits a constructor from Puppet::Parser::Compiler::CatalogValidator
Instance Method Details
#validate ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/puppet/parser/compiler/catalog_validator/relationship_validator.rb', line 5 def validate catalog.resources.each do |resource| next unless resource.is_a?(Puppet::Parser::Resource) next if resource.virtual? resource.eachparam do |param| pclass = Puppet::Type.(param.name) validate_relationship(param) if !pclass.nil? && pclass < Puppet::Type::RelationshipMetaparam end end nil end |