Sha256: 5c46857499b87d1d6087991dbb40871e78c1f31b9e73727d374b14404def5873

Contents?: true

Size: 787 Bytes

Versions: 72

Compression:

Stored size: 787 Bytes

Contents

class Puppet::Parser::Compiler
  # Validator that asserts that only application components can appear inside a site.
  #
  # @deprecated application orchestration will be removed in puppet 7
  class CatalogValidator::SiteValidator < CatalogValidator
    def self.validation_stage?(stage)
      PRE_FINISH.equal?(stage)
    end

    def validate
      the_site_resource = catalog.resource('Site', 'site')
      return unless the_site_resource

      catalog.downstream_from_vertex(the_site_resource).keys.each do |r|
        unless r.is_application_component? || r.resource_type.application?
          raise CatalogValidationError.new(_("Only application components can appear inside a site - %{res} is not allowed") % { res: r }, r.file, r.line)
        end
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
puppet-6.29.0 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.29.0-x86-mingw32 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.29.0-x64-mingw32 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.29.0-universal-darwin lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.28.0 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.28.0-x86-mingw32 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.28.0-x64-mingw32 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.28.0-universal-darwin lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.27.0 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.27.0-x86-mingw32 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.27.0-x64-mingw32 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.27.0-universal-darwin lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.26.0 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.26.0-x86-mingw32 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.26.0-x64-mingw32 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.26.0-universal-darwin lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.25.1 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.25.1-x86-mingw32 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.25.1-x64-mingw32 lib/puppet/parser/compiler/catalog_validator/site_validator.rb
puppet-6.25.1-universal-darwin lib/puppet/parser/compiler/catalog_validator/site_validator.rb