Sha256: fed749b9ce71306bb7b7113f82d4dcfcd82c26b1f934f0b19b37cb2e95cb3b80

Contents?: true

Size: 343 Bytes

Versions: 20

Compression:

Stored size: 343 Bytes

Contents

# frozen_string_literal: true
module Puppet::Resource::Validator
  def validate_key(request)
    type, title = request.key.split('/', 2)
    unless type.casecmp(request.instance.type).zero? and title == request.instance.title
      raise Puppet::Indirector::ValidationError, _("Resource instance does not match request key")
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/indirector/resource/validator.rb
puppet-8.3.0-x86-mingw32 lib/puppet/indirector/resource/validator.rb
puppet-8.3.0-x64-mingw32 lib/puppet/indirector/resource/validator.rb
puppet-8.3.0-universal-darwin lib/puppet/indirector/resource/validator.rb
puppet-8.3.1 lib/puppet/indirector/resource/validator.rb
puppet-8.3.1-x86-mingw32 lib/puppet/indirector/resource/validator.rb
puppet-8.3.1-x64-mingw32 lib/puppet/indirector/resource/validator.rb
puppet-8.3.1-universal-darwin lib/puppet/indirector/resource/validator.rb
puppet-8.2.0 lib/puppet/indirector/resource/validator.rb
puppet-8.2.0-x86-mingw32 lib/puppet/indirector/resource/validator.rb
puppet-8.2.0-x64-mingw32 lib/puppet/indirector/resource/validator.rb
puppet-8.2.0-universal-darwin lib/puppet/indirector/resource/validator.rb
puppet-8.1.0 lib/puppet/indirector/resource/validator.rb
puppet-8.1.0-x86-mingw32 lib/puppet/indirector/resource/validator.rb
puppet-8.1.0-x64-mingw32 lib/puppet/indirector/resource/validator.rb
puppet-8.1.0-universal-darwin lib/puppet/indirector/resource/validator.rb
puppet-8.0.1 lib/puppet/indirector/resource/validator.rb
puppet-8.0.1-x86-mingw32 lib/puppet/indirector/resource/validator.rb
puppet-8.0.1-x64-mingw32 lib/puppet/indirector/resource/validator.rb
puppet-8.0.1-universal-darwin lib/puppet/indirector/resource/validator.rb